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/.gitignore b/.gitignore index b49fdf8dc86..371c8be2f5e 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ default.properties .DS_Store .idea *.iml +*.orig Thumbs.db /dolibarr_genesis.mp4 # Log files diff --git a/.travis.yml b/.travis.yml index af37fe08a8d..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,6 +50,9 @@ jobs: - if: type = push AND branch = develop php: nightly env: DB=mysql + - if: type = push AND branch = 14.0 + php: nightly + env: DB=mysql notifications: email: @@ -70,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" @@ -175,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 - | @@ -398,10 +398,14 @@ 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_SUPPLIERPROPOSAL,MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKET,MAIN_MODULE_ACCOUNTING,MAIN_MODULE_MRP > $TRAVIS_BUILD_DIR/enablemodule.log - php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_RECEPTION,MAIN_MODULE_RECRUITMENT > $TRAVIS_BUILD_DIR/enablemodule.log + 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 + php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKET,MAIN_MODULE_ACCOUNTING,MAIN_MODULE_MRP >> $TRAVIS_BUILD_DIR/enablemodule.log + php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_RECEPTION,MAIN_MODULE_RECRUITMENT >> $TRAVIS_BUILD_DIR/enablemodule.log echo $? cd - set +e 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 10b06b86811..b133b05b2cf 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -23,16 +23,16 @@ 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 PSR/Logs 1.0 Library for logs (used by DebugBar) PSR/simple-cache ? Library for cache (used by PHPSpreadSheet) -Restler 3.0.0RC6 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer) +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 diff --git a/ChangeLog b/ChangeLog index 8b3b3c97157..4734605b7d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,11 +3,143 @@ 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 +FIX: #16096 #16085 Any call of ajax pages must provide the token +FIX: #16296 +FIX: #16325 +FIX: #16341 : Fetch the Product ExtraFields in Shippment lines +FIX: #16366 +FIX: #16393 Do not sanitize +FIX: #16420 #16423 #16488 #16477 +FIX: #16431 +FIX: #16465 +FIX: #16480 +FIX: #16485 +FIX: #16487 +FIX: #16503 +FIX: #16530 +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: 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/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: 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: select list dependencies now work for ModuleBuilder sellist field +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 +FIX: Total_ht not show in contract link element +FIX: use post instead get +FIX: use var "saved_url" instead global var "$url" +FIX: Various payment - Missing fields for check transmitter & bank name +FIX: warning if setup of chart of account is not yet done. +FIX: wrong extension + + +***** ChangeLog for 13.0.1 compared to 13.0.0 ***** + +FIX: 10.0 before crediting a withdrawal receipt, check whether it has been credited already. +FIX: 11.0 when a mandatory extrafield of type sellist contains '0' it should be considered empty and trigger an error message upon insertion +FIX: 11.0 when a new intervention is created from an object, a new $extrafields object is instantiated but not initialized +FIX: create MO, Column 'tms' cannot be null +FIX: #14290 #15900 +FIX: #16076 patch user/list.php for extrafields +FIX: #16077 patch wrong timezone +FIX: #16079 error of service date at duplicated invoice +FIX: #16080 mailing list title +FIX: #16084 DB error at projects +FIX: #16107 +FIX: #16118 Timezone problem on some fields +FIX: #16131 +FIX: #16135 +FIX: #16143 +FIX: #16156 +FIX: #16160 +FIX: #16165 Create customer discount without VAT +FIX: #16185 +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 +FIX: Assignement of actors on tasks +FIX: Bad dates on info tabs +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 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 +FIX: Missing language ico +FIX: Must not be able to edit vat of all lines if not draft +FIX: Bad "htdocs" found into a path +FIX: removed no more used proc update_modified_column_date_m on pgsql (its presence triggered errors) +FIX: Vulnerability report by Ricardo Matias +FIX: select default mail template +FIX: Select transport mode function when creating a supplier invoice and add unique key to the table llx_c_transport_mode in migrate sql +FIX: Merge of thirdparties : "unknow column fk_soc" + "Delivery" label +FIX: SQL Error in group by with postgres or mysql strict mode +FIX: TakePOS : load date function +FIX: Timeout during import +FIX: Trigger on expense report was not fired +FIX: User creation of expense report not visible +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: payment term label on PDF +FIX: date selector when using reduced year (like on smartphone) + + ***** ChangeLog for 13.0.0 compared to 12.0.0 ***** For users: ---------- -NEW: Add module "Credit transfer SEPA" to manage payment of vendors using bank credit transfer SEPA files. +NEW: Module "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. @@ -16,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) +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 @@ -34,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 @@ -57,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 @@ -68,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 @@ -76,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 @@ -89,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 @@ -125,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 @@ -160,70 +278,80 @@ 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: the global header of a website can also have dynamic content -NEW: Third-Party Import new fields: mother company,outstanding debt limit,bank account,incoterms +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: 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 NEW: website page fields selection -NEW: Weighing Scale compatibility with TakePOS connector +NEW: website - global header of a website can also have dynamic content NEW: when creating a user from a member linked to a thirdparty, you can choose to create it as external or internal user -NEW: add clone button on miscellaneous payment -NEW: #15065 Add option to put the product label in bold in the PDF templates if configured -NEW: Add option "If the feature to manage kits of module Stock is used, show details of subproducts of a kit on PDF." +NEW: add clone button on miscellaneous payment +NEW: add option to put the product label in bold in the PDF templates if configured #15065 +NEW: add option "If the feature to manage kits of module Stock is used, show details of subproducts of a kit on PDF." For developers: --------------- -NEW: add __MEMBER_TYPE__ substitution key -NEW: add __TYPE__ substitution key +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: fetch contact by email with REST 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: get state by REST API -NEW: get state dictionnary by REST API -NEW: improve Product API for variant products NEW: OAuth SCOPE for Admin SDK -NEW: retrieve discount from invoice from API NEW: standardizes API thirdparties by email like other object -NEW: Thirdparty REST API: endpoint to set price level -NEW: use new category API for project list view 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 NEW: API get users by email / login +NEW: fetch contact by email with REST API +NEW: get state dictionnary by REST API +NEW: improve Product API for variant products +NEW: retrieve discount from invoice from API +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 @@ -238,7 +366,7 @@ Following changes may create regressions for some external modules, but were nec * All properties ->titre have been renamed into ->title * Property $paiementid in API 'api_supplier_invoices.php' has been renamed into into $payment_mode_id * Property 'num_paiement' has been renamed 'num_payment' everywhere for better code consistency. -* The deprecated subsitution key __SIGNATURE__ has been removed. Use __USER_SIGNATURE__ if you used the old syntax in your email templates. +* The deprecated subsitution key __SIGNATURE__ has been removed. Replace it with __USER_SIGNATURE__ if you used the old syntax in your email templates. * The hidden option HOLIDAY_MORE_PUBLIC_HOLIDAYS has been removed. Use instead the dictionary table if you need to define custom days of holiday. * If you build a class that implement CommonObject to use the incoterm properties or methods (->fk_incoterm, ->label_incoterm, ->location_incoterm), you must now also include declaration of the Trait 'CommonIncoterm' in your class. All incoterm functions were moved into this Trait. @@ -250,8 +378,67 @@ Following changes may create regressions for some external modules, but were nec * Function showStripePaymentUrl, getStripePaymentUrl, showPaypalPaymentUrl and getPaypalPaymentUrl has been removed. The generic one showOnlinePaymentUrl and getOnlinePaymentUrl are always used. * Context for hook showSocinfoOnPrint has been moved from "showsocinfoonprint" to "main" * Library htdocs/includes/phpoffice/phpexcel as been removed (replaced with htdocs/includes/phpoffice/PhpSpreadsheet) +* Database transaction in your triggers must be correctly balanced (one close for one open). If not, an error will be returned by the trigger, even if trigger did return error code. +* Dolibarr v13 is still compatible with any PHP version between 5.6.0 and 7.4.*; Unit tests are OK with PHP 8.0 but some warnings or troubles may appears with PHP 8.0. +* All your Ajax services must contains such a line at begin of file: if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Disables token renewal + +***** ChangeLog for 12.0.5 compared to 12.0.4 ***** +FIX: before crediting a withdrawal receipt, check whether it has been credited already +FIX: mandatory extrafields of type sellist +FIX: when a mandatory extrafield of type sellist contains '0' it should be considered empty and trigger an error message upon insertion +FIX: when a new intervention is created from an object, a new $extrafields object is instantiated but not initialized +FIX: "openall" filter on ticket list does not include read tickets +FIX: ticket - extrafields of type 'date' are not saved +FIX: ticket - the "openall" filter on the ticket list does not include tickets with status READ +FIX: #14290 #15900 +FIX: #15388 #15891 +FIX: #15465 External user sees last 5 shipments to other customers in the dashboard +FIX: #15629 +FIX: #15751 Miscellaneous payment type change to 0 after updating subledger account +FIX: #15946 +FIX: #15966 #15967 +FIX: Accountancy - Fix some problems on CEGID export +FIX: Accountancy - label_operation is used instead of label_compte +FIX: Accountancy - Retire entire opening balance feature +FIX: add autofix of count of email target when data is corrupted +FIX: add categories params on llxHeader filter +FIX: Add critical price patch from 12 to 11. +FIX: Bad cleaning of VAT rate when numbers are into code +FIX: Bad dates filtering in the ticket list causes sql error +FIX: balance starting and ending fiscal month #14197 +FIX: bom line unit display #13831 +FIX: cash fence for takepos with multientity +FIX: Check of customer/vendor code fails in some cases +FIX: create ticket : thirdparty/contact notification #15629 +FIX: Creation of thirdparty when setup is empty +FIX: Dates of sales start in TakePOS +FIX: dupliacete customer or supplier code must be error dipslayed with new code proposed +FIX: Export FEC - Force Carriage Return Line Feed +FIX: Facture Situation Out : status condition +FIX: Filter on date of next generation on template invoices +FIX: Fix detect dispatched product and set to received completely when the supplier order have services (support STOCK_SUPPORTS_SERVICES) +FIX: Invoice Situation Out : status condition +FIX: issue 15659 : Missing test if supplier conf is enabled +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 +FIX: missing GETPOST parameters on card_presend.tpl.php +FIX: missing socid into link to create event from project agenda tab +FIX: Must delete extrafields before main table on product deletion. +FIX: (path) htdocs removed +FIX: php alert sms.php +FIX: right to show VAT rate in product list +FIX: select default mail template +FIX: Timeout during import +FIX: update order by api +FIX: useless tracking number displayed on pdf if empty issue #14501 +FIX: Visible date of payment +FIX: warning when adding a line if $remise_percent is an empty string +FIX: When creating a new POS sell, the creation date must be modified. +FIX: wrong name for search status param issue #15516 + ***** ChangeLog for 12.0.4 compared to 12.0.3 ***** FIX: make formConfirm an addreplace-type hook FIX: regex to remove 'action' parameter: taking feedback from PR#15213 into account 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 bcc1bd7d9e0..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,23 +55,23 @@ 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 must NOT be enabled (by default, this module is not enabled. This is a developer tool) -* The module ModuleBuilder must NOT be enabled (by default, this module is not enabled. This is a developer tool) +* 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. -* CSRF attacks are accepted for all when using a POST URL, but when using GET URL, they are validated only for creating or updating data resctricted to the admin user. +* CSRF attacks are accepted when using a POST URL, but when using GET URL, they are validated only for creating, updating or deleting data resctricted from pages restricted to admin users. * Ability for a high level user to edit web site pages into the CMS by including HTML or Javascript is an expected feature. Vulnerabilities into the website module are validated only if HTML or Javascript injection can be done by a non allowed user. 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 Requests Forgery (CSRF) with real security impact +* 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 * Insecure direct object references @@ -82,7 +82,8 @@ 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 * Denial of Service attacks diff --git a/build.xml b/build.xml deleted file mode 100644 index c6995ce95f3..00000000000 --- a/build.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file 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 0ef5367072f..059325eecb9 100755 --- a/build/debian/control +++ b/build/debian/control @@ -4,7 +4,7 @@ Priority: optional Maintainer: Laurent Destailleur (eldy) # Uploaders: Laurent Destailleur (eldy) # Only if differs from Maintainer Standards-Version: 3.9.6 -Homepage: http://www.dolibarr.org +Homepage: https://www.dolibarr.org Build-Depends: debhelper (>= 9), po-debconf # This package need at least debian 7 or ubuntu 13.04 or any distribution based on this version @@ -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/debian/dolibarr.postinst b/build/debian/dolibarr.postinst index 7684d02ff3d..26a08a55826 100644 --- a/build/debian/dolibarr.postinst +++ b/build/debian/dolibarr.postinst @@ -23,7 +23,7 @@ setup_empty_conf() { mkdir -p /etc/dolibarr touch /etc/dolibarr/conf.php chown root:www-data /etc/dolibarr/conf.php - chmod 664 /etc/dolibarr/conf.php + chmod 660 /etc/dolibarr/conf.php } is_new_upstream_version() { 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"; @@ -134,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"); @@ -151,26 +158,28 @@ $iterator1 = new RecursiveIteratorIterator($dir_iterator1); $files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom?'':'custom\/|').'documents\/|conf\/|install\/))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i'); */ $regextoinclude='\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$'; -$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs +$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install|dejavu-fonts-ttf-.*|public\/test|sabre\/sabre\/.*\/tests|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs $files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname'); + $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"); @@ -198,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/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 5c5baaac3bc..906601d94d4 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -390,6 +390,9 @@ if ($nboftargetok) { $olddir=getcwd(); chdir("$SOURCE"); + print "Clean $SOURCE/htdocs\n"; + $ret=`rm -f $SOURCE/htdocs/includes/autoload.php`; + $ret=`git ls-files . --exclude-standard --others`; if ($ret) { @@ -579,7 +582,6 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/teclib*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/webmail*`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/workstation*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/allscreen*`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/theme/common/octicons/LICENSE`; @@ -614,7 +616,6 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/test`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/parsedown/LICENSE.txt`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/php-iban/docs`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/tests`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/tests`; @@ -624,8 +625,6 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/freefont-*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/ae_fonts_*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/utils`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`; - $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/vendor`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/webmozart`; 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/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec index 99061b24eab..d50c91d1f05 100755 --- a/build/rpm/dolibarr_fedora.spec +++ b/build/rpm/dolibarr_fedora.spec @@ -212,6 +212,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/product %_datadir/dolibarr/htdocs/projet %_datadir/dolibarr/htdocs/public +%_datadir/dolibarr/htdocs/recruitment %_datadir/dolibarr/htdocs/reception %_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/salaries diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index f3c86419f8e..4541868a04f 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -292,6 +292,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/product %_datadir/dolibarr/htdocs/projet %_datadir/dolibarr/htdocs/public +%_datadir/dolibarr/htdocs/recruitment %_datadir/dolibarr/htdocs/reception %_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/salaries diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec index 3c2b8adeb5b..d618b5729d5 100755 --- a/build/rpm/dolibarr_mandriva.spec +++ b/build/rpm/dolibarr_mandriva.spec @@ -209,6 +209,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/product %_datadir/dolibarr/htdocs/projet %_datadir/dolibarr/htdocs/public +%_datadir/dolibarr/htdocs/recruitment %_datadir/dolibarr/htdocs/reception %_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/salaries diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec index 71db3f43445..230a8946e99 100755 --- a/build/rpm/dolibarr_opensuse.spec +++ b/build/rpm/dolibarr_opensuse.spec @@ -220,6 +220,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/product %_datadir/dolibarr/htdocs/projet %_datadir/dolibarr/htdocs/public +%_datadir/dolibarr/htdocs/recruitment %_datadir/dolibarr/htdocs/reception %_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/salaries 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 bd81e101cfc..130fda34945 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "ckeditor/ckeditor" : "4.12.1", "mike42/escpos-php" : "2.2", "mobiledetect/mobiledetectlib" : "2.8.34", - "phpoffice/phpexcel" : "1.8.1", + "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 98a6d2176aa..e207afa5658 100644 --- a/dev/dolibarr_changes.txt +++ b/dev/dolibarr_changes.txt @@ -50,6 +50,13 @@ Replace call to serialize_val with no bugged value * In all files, replace constructor names into __construct. Replace also parent::constructor_name with parent::__construct +* Line 4222 of file nusoap.php + + $rev = array(); + preg_match('/\$Revision: ([^ ]+)/', $this->revision, $rev); + $this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".(isset($rev[1]) ? $rev[1] : '').")"; + + TCPDF: @@ -126,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]/" // @@ -168,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)) { @@ -188,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':'%' @@ -229,11 +234,21 @@ Change content of file htdocs/includes/restler/framework/Luracast/Restler/explor public static function getShortName($className) { // @CHANGE LDR - if (! is_string($className)) return; + if (!is_string($className)) return; //var_dump($className); - - +* Add line into Data/Text.php to complete function + + public static function endsWith($haystack, $needle) + { + $length = strlen($needle); + if ($length == 0) { + return true; + } + // @CHANGE LDR + if (!is_string($haystack)) return false; + + 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 84d50f0dcc3..d3527151c64 100755 --- a/dev/initdemo/initdemopassword.sh +++ b/dev/initdemo/initdemopassword.sh @@ -32,12 +32,14 @@ base=$2; port=$3; demologin=$4; demopass=$5; +demopasshash=$6; # ----------------------------- check params if [ "x$confirm" != "xconfirm" ] then echo "----- $0 -----" - echo "Usage: initdemopassword.sh confirm [base port login pass]" + echo "Usage: initdemopassword.sh confirm [base port login pass password_hash_algo]" + echo "password_hash_algo can be md5 of password_hash" exit fi @@ -148,7 +150,15 @@ fi #echo "mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile" #mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile echo "echo \"UPDATE llx_user SET pass_crypted = MD5('$demopass') WHERE login = '$demologin';\" | mysql -P$port $base" -echo "UPDATE llx_user SET pass_crypted = MD5('$demopass') WHERE login = '$demologin';" | mysql -P$port $base + +if [ "x$demopasshash" != "xpassword_hash" ] +then + newpass=`echo '' | php` +else + newpass=`echo '' | php` +fi + +echo "UPDATE llx_user SET pass_crypted = '$newpass' WHERE login = '$demologin';" | mysql -P$port $base export res=$? if [ $res -ne 0 ]; then 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 5da0d4a2498..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,66 +80,65 @@ $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') + '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') ); $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/dbmodel/dolibarr_schema.mwb b/dev/resources/dbmodel/dolibarr_schema.mwb index 27bc4ab2403..37929762bab 100644 Binary files a/dev/resources/dbmodel/dolibarr_schema.mwb and b/dev/resources/dbmodel/dolibarr_schema.mwb differ 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 47a984cd467..6f510ad3706 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -45,24 +45,40 @@ $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'); +$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), @@ -74,31 +90,45 @@ $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); - /* * 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 = ""; @@ -107,23 +137,21 @@ if (empty($reshook)) $search_array_options = array(); } if ((GETPOST('valid_change_chart', 'alpha') && GETPOST('chartofaccounts', 'int') > 0) // explicit click on button 'Change and load' with js on - || (GETPOST('chartofaccounts', 'int') > 0 && GETPOST('chartofaccounts', 'int') != $conf->global->CHARTOFACCOUNTS)) // a submit of form is done and chartofaccounts combo has been modified - { - if ($chartofaccounts > 0) - { + || (GETPOST('chartofaccounts', 'int') > 0 && GETPOST('chartofaccounts', 'int') != $conf->global->CHARTOFACCOUNTS)) { // a submit of form is done and chartofaccounts combo has been modified + if ($chartofaccounts > 0 && $permissiontoadd) { // Get language code for this $chartofaccounts $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; @@ -131,16 +159,15 @@ if (empty($reshook)) // and pass CCCNNNNN + (num of company * 100 000 000) as offset to the run_sql as a new parameter to say to update sql on the fly to add offset to rowid and account_parent value. // 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); - if (preg_match('/-- ADD (\d+) to rowid/ims', $tmp, $reg)) - { + $reg = array(); + 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'); @@ -155,7 +182,7 @@ if (empty($reshook)) } } - if ($action == 'disable') { + if ($action == 'disable' && $permissiontoadd) { if ($accounting->fetch($id)) { $mode = GETPOST('mode', 'int'); $result = $accounting->accountDeactivate($id, $mode); @@ -165,7 +192,7 @@ if (empty($reshook)) if ($result < 0) { setEventMessages($accounting->error, $accounting->errors, 'errors'); } - } elseif ($action == 'enable') { + } elseif ($action == 'enable' && $permissiontoadd) { if ($accounting->fetch($id)) { $mode = GETPOST('mode', 'int'); $result = $accounting->account_activate($id, $mode); @@ -198,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; @@ -224,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"; } @@ -781,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 @@ -826,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')) { @@ -868,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 @@ -896,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); @@ -921,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); @@ -945,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"; @@ -1001,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 05a0567a8d9..7322f92fccd 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 = ".$db->escape($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']++; + 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..25c44baa7db 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 ''; @@ -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).''.$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 7a1d5b66ece..3ed43f1664f 100644 --- a/htdocs/admin/accountant.php +++ b/htdocs/admin/accountant.php @@ -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,8 @@ 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; } @@ -114,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/agenda.php b/htdocs/admin/agenda.php index b1cc1d7619b..9829be288a5 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 { @@ -155,17 +150,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 +179,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 7fbd139072d..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 c1f77f4995e..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')); @@ -51,12 +53,11 @@ $type = 'action'; include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; -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]; $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 { @@ -64,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); @@ -94,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 { @@ -123,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; @@ -151,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); } } @@ -192,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++; @@ -206,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"; @@ -222,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); @@ -248,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")); @@ -341,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 27c6bbeed73..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,17 +167,17 @@ print ''."\n"; print ''."\n"; print ''."\n"; print ''."\n"; -print ''."\n"; } else { - if (! getIsHTTPS()) { + if (!isHTTPS()) { $langs->load("errors"); print img_warning($langs->trans("WarningAvailableOnlyForHTTPSServers"), '', 'valignmiddle size15x').' '; } @@ -232,7 +215,7 @@ if (!empty($conf->cron->enabled)) { } 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 ''; @@ -274,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').''; @@ -323,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 (! getIsHTTPS()) { + if (!isHTTPS()) { $langs->load("errors"); print img_warning($langs->trans("WarningAvailableOnlyForHTTPSServers"), '', 'valignmiddle size15x').' '; } print ''.img_picto($langs->trans('Disabled'), 'switch_off').''; 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 b5e4c0ddf45..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 8f005c0f0d7..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 ''; 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..dce5dd39b60 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 ''; @@ -1415,7 +1372,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) if (!empty($object->socid)) { print ''; print ''; } @@ -1426,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 ''; // Severity @@ -236,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')).'
'; } @@ -247,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)) { @@ -293,7 +313,7 @@ class FormTicket if ($this->withfile == 2) { // Can add other files $out .= ''; $out .= ' '; - $out .= ''; + $out .= ''; } $out .= "\n"; @@ -368,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(""); } @@ -396,36 +418,35 @@ 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 ''; } // 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 '
'.$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 ''; 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') : ''); $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').' '.$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').' '.$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 d605f75c511..00f05152a86 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -30,102 +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'; +} +// 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")); @@ -164,32 +170,35 @@ 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'); + + $action = 'edit'; } @@ -207,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 ''; @@ -216,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 ''; @@ -247,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 ''; @@ -287,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 '

'; } @@ -310,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 b1606268205..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 ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1; } - if ($id == 4) $tdsoffields .= ''; + if ($id == 4) { + $tdsoffields .= ''; + } $tdsoffields .= ''; $tdsoffields .= ''; $tdsoffields .= ''; @@ -1226,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); + } } } @@ -1240,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 ''; @@ -1279,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 '
'; } @@ -1297,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 ''; @@ -1325,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'); @@ -1351,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 @@ -1459,197 +1794,210 @@ 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; } - if ($value == 'element') - { + if ($value == 'element') { $valuetoshow = isset($elementList[$valuetoshow]) ? $elementList[$valuetoshow] : $valuetoshow; - } elseif ($value == 'source') - { + } elseif ($value == 'source') { $valuetoshow = isset($sourceList[$valuetoshow]) ? $sourceList[$valuetoshow] : $valuetoshow; } elseif ($valuetoshow == 'all') { $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 ''; + } } } @@ -1658,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"; } @@ -1732,8 +2114,8 @@ if ($id) print ''; } else { /* - * Show list of dictionary to show - */ + * Show list of dictionary to show + */ $lastlineisempty = false; @@ -1745,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; } @@ -1760,8 +2141,7 @@ if ($id) $value = $tabname[$i]; print ''; print ''; print ''; $lastlineisempty = false; } else { - if (!$lastlineisempty) - { + if (!$lastlineisempty) { $showemptyline = 1; $lastlineisempty = true; } @@ -1816,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; @@ -1842,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 '\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); @@ -357,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("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 d06f8a2ce31..2e4b88c2287 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,10 +54,18 @@ $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"; @@ -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"; @@ -236,7 +245,7 @@ $tabsqlsort[3] = "country ASC, code ASC"; $tabsqlsort[4] = "code ASC"; $tabsqlsort[5] = "label ASC"; $tabsqlsort[6] = "a.type ASC, a.module ASC, a.position ASC, a.code ASC"; -$tabsqlsort[7] = "country ASC, code ASC, a.libelle ASC"; +$tabsqlsort[7] = "c.label ASC, a.code ASC, a.libelle ASC"; $tabsqlsort[8] = "country DESC,".(!empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? ' t.position ASC,' : '')." libelle ASC"; $tabsqlsort[9] = "label ASC"; $tabsqlsort[10] = "country ASC, code ASC, taux ASC, recuperableonly ASC, localtax1 ASC, localtax2 ASC"; @@ -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,6 +628,7 @@ if ($id == 11) // 'contract' => $langs->trans('Contract'), 'project' => $langs->trans('Project'), 'project_task' => $langs->trans('Task'), + 'ticket' => $langs->trans('Ticket'), 'agenda' => $langs->trans('Agenda'), 'dolresource' => $langs->trans('Resource'), // old deprecated @@ -630,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); @@ -643,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"), @@ -662,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]); @@ -678,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')) // Code is mandatory fir 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'); } @@ -723,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 - { - $_POST["code"] = preg_replace('/\s/', '', $_POST["code"]); + 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 { @@ -783,34 +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) || $value == 'taux') { - $_POST[$keycode] = price2num($_POST[$keycode], 'MU'); + 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'); @@ -824,10 +887,14 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) dol_syslog("actionadd", LOG_DEBUG); $result = $db->query($sql); - if ($result) // Add is ok - { - setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs'); - $_POST = array('id'=>$id); // Clean $_POST array, we keep only + 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) { + $search_country_id = GETPOST('country', 'int'); + } + $_POST = array('id'=>$id); } else { if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors'); @@ -838,37 +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) || $field == 'taux') { - $_POST[$keycode] = price2num($_POST[$keycode], 'MU'); + 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'); @@ -883,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); @@ -921,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 : ''); @@ -932,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 : ''); @@ -950,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 : ''); @@ -968,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 : ''); @@ -986,8 +1070,7 @@ if ($action == 'disable_favorite') } $result = $db->query($sql); - if (!$result) - { + if (!$result) { dol_print_error($db); } } @@ -1005,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 '

'; @@ -1033,42 +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 != 9) $sql .= natural_search("code", $search_code); + if (!preg_match('/ WHERE /', $sql)) { + $sql .= " WHERE 1 = 1"; + } + if ($search_country_id > 0) { + $sql .= " AND c.rowid = ".$search_country_id; + } + if ($search_code != '' && $id == 9) { + $sql .= natural_search("code_iso", $search_code); + } elseif ($search_code != '' && $id == 28) { + $sql .= natural_search("h.code", $search_code); + } elseif ($search_code != '' && $id == 32) { + $sql .= natural_search("a.code", $search_code); + } elseif ($search_code != '' && $id == 3) { + $sql .= natural_search("r.code_region", $search_code); + } elseif ($search_code != '' && $id == 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 @@ -1081,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; } @@ -1092,16 +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]) - { - $alabelisused = 0; + if ($tabname[$id]) { $withentity = null; $fieldlist = explode(',', $tabfield[$id]); @@ -1111,111 +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; } @@ -1338,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]); @@ -1769,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'), @@ -1947,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); @@ -2014,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..ea7c7bed042 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 = '
'; 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'); @@ -385,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').''; @@ -409,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'); @@ -451,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 00dcb7c3180..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..b8b412ad6f8 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,12 +128,10 @@ 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"; @@ -141,11 +140,10 @@ if ($_POST["delete"]) $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 e3178d946a0..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'); @@ -185,7 +175,7 @@ elseif ($action == 'setdoc') $val = GETPOST('FICHINTER_USE_SERVICE_DURATION', 'alpha'); $res = dolibarr_set_const($db, "FICHINTER_USE_SERVICE_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } @@ -198,7 +188,7 @@ elseif ($action == 'setdoc') $val = GETPOST('FICHINTER_WITHOUT_DURATION', 'alpha'); $res = dolibarr_set_const($db, "FICHINTER_WITHOUT_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } @@ -211,7 +201,7 @@ elseif ($action == 'setdoc') $val = GETPOST('FICHINTER_DATE_WITHOUT_HOUR', 'alpha'); $res = dolibarr_set_const($db, "FICHINTER_DATE_WITHOUT_HOUR", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } @@ -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 ''."\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 eca8319d661..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..8b799c9c7de 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); @@ -171,27 +219,21 @@ if ($action == 'update') //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); @@ -380,8 +422,7 @@ 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("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 34da6f7d34e..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); @@ -299,7 +283,7 @@ if (empty($mysoc->country_code)) print ''.$langs->trans("UnitPriceOfProduct").": ".price2num($s, 'MU'); print " x ".$langs->trans("Quantity").": ".$qty; print " - ".$langs->trans("VAT").": ".$vat.'%'; - print '   ->   '.$langs->trans("TotalPriceAfterRounding").": ".$tmparray[0].' / '.$tmparray[1].' / '.$tmparray[2]."
\n"; + print '   ->   '.$langs->trans("TotalPriceAfterRounding").": ".$tmparray[0].' / '.$tmparray[1].' / '.$tmparray[2]."
\n"; $s = 10 / 3; $qty = 2; $vat = 10; $tmparray = calcul_price_total($qty, price2num($s, 'MU'), 0, $vat, -1, -1, 0, 'HT', 0, 0, $mysoc, $localtax_array); 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 30b92412719..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,20 +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++; + } // 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 { @@ -70,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 @@ -81,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 (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 6538d5c3011..cdb9c10ec87 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -43,7 +43,16 @@ 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 ($conf->adherent->enabled) { + $langsArray[]='members'; +} +if ($conf->eventorganization->enabled) { + $langsArray[]='eventorganization'; +} + +$langs->loadLangs($langsArray); $action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation @@ -56,7 +65,9 @@ $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(); @@ -71,13 +82,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 +106,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 +133,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 +147,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.'
'; } } @@ -210,6 +229,9 @@ if ($conf->ticket->enabled && $user->rights->ticket->read) { if ($conf->agenda->enabled) { $elementList['actioncomm_send'] = img_picto('', 'action', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendEventPush')); } +if ($conf->eventorganization->enabled && $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 +254,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 +288,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 +347,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 +397,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 +410,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 +480,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 +488,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 +497,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 +507,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 +554,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 +562,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 +605,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 +672,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 +693,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 +707,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 ''; // Limit to superadmin /*if (! empty($conf->multicompany->enabled) && !$user->entity) - { - print ''; - print ''; + print ''; // Action column print ''; print ''; - if ($sortfield == 'transkey' && strtolower($sortorder) == 'asc') ksort($recordtoshow); - if ($sortfield == 'transkey' && strtolower($sortorder) == 'desc') krsort($recordtoshow); - if ($sortfield == 'transvalue' && strtolower($sortorder) == 'asc') asort($recordtoshow); - if ($sortfield == 'transvalue' && strtolower($sortorder) == 'desc') arsort($recordtoshow); + if ($sortfield == 'transkey' && strtolower($sortorder) == 'asc') { + ksort($recordtoshow); + } + if ($sortfield == 'transkey' && strtolower($sortorder) == 'desc') { + krsort($recordtoshow); + } + if ($sortfield == 'transvalue' && strtolower($sortorder) == 'asc') { + asort($recordtoshow); + } + if ($sortfield == 'transvalue' && strtolower($sortorder) == 'desc') { + arsort($recordtoshow); + } // Show result $i = 0; - foreach ($recordtoshow as $key => $val) - { + foreach ($recordtoshow as $key => $val) { $i++; - if ($i <= $offset) continue; - if ($i > ($offset + $limit)) break; + 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 @@ -527,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); } } @@ -552,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'; - $parameters = array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); + $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) : '').'&'; @@ -601,11 +617,14 @@ if ($id) print ""; // Modify link - print ''; + print ''; // Delete link - if ($iserasable) print ''; - else print ''; + if ($iserasable) { + print ''; + } else { + print ''; + } print "\n"; } @@ -647,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'], $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 +735,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 +769,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 +812,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 +834,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 +912,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 +926,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 +954,20 @@ if ($resql) // Show line for topic, joinfiles and content print ''; print '\n"; } else { + // If template is for a module, check module is enabled. if ($obj->module) { $tempmodulekey = $obj->module; if (empty($conf->$tempmodulekey) || empty($conf->$tempmodulekey->enabled)) { @@ -847,15 +987,14 @@ if ($resql) continue; } } + $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 } @@ -868,20 +1007,24 @@ if ($resql) $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"; $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'; + $valuetoshow = ''.$valuetoshow.''; } /*if ($value == 'topic') { $class .= ' tdoverflowmax300'; @@ -894,8 +1037,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); @@ -903,83 +1045,96 @@ 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; + if ($param) { + $url .= '&'.$param; + } $url .= '&'; // 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"; } @@ -1022,21 +1177,17 @@ 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 ($fieldlist[$field] == 'fk_user') { print ''; - } elseif ($fieldlist[$field] == 'lang') - { + } elseif ($fieldlist[$field] == 'lang') { print ''; - } - // Le type de template - elseif ($fieldlist[$field] == 'type_template') - { + } elseif ($fieldlist[$field] == '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($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 { $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 ($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" '; + } print ''; - if ($fieldlist[$field] == 'private') - { - if (empty($user->admin)) - { + if ($fieldlist[$field] == 'private') { + if (empty($user->admin)) { print $form->selectyesno($fieldlist[$field], '1', 1); } else { //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 6e0b0508a07..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,12 +120,11 @@ $result = dol_mkdir($outputdir); $utils = new Utils($db); -if ($compression == 'zip') -{ +if ($compression == 'zip') { $file .= '.zip'; - $ret = dol_compress_dir(DOL_DATA_ROOT, $outputdir."/".$file, $compression, '/(\.back|\.old|\.log|[\\\/]temp[\\\/]|documents[\\\/]admin[\\\/]documents[\\\/])/i'); - if ($ret < 0) - { + $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 == -2) { $langs->load("errors"); $errormsg = $langs->trans("ErrNoZipEngine"); @@ -124,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 @@ -137,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 00c4bdc36dd..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"); @@ -63,23 +69,34 @@ $search_desc = GETPOST("search_desc", "alpha"); $search_ua = GETPOST("search_ua", "restricthtml"); $search_prefix_session = GETPOST("search_prefix_session", "restricthtml"); -if (GETPOST("date_startmonth") == '' || GETPOST("date_startmonth") > 0) $date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear")); -else $date_start = -1; -if (GETPOST("date_endmonth") == '' || GETPOST("date_endmonth") > 0) $date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear")); -else $date_end = -1; - -// 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; - $now = dol_now(); $nowarray = dol_getdate($now); -if (empty($date_start)) // We define date_start and date_end -{ +if (!GETPOSTISSET("date_startmonth")) { + $date_start = dol_get_first_day($nowarray['year'], $nowarray['mon'], 'tzuserrel'); +} elseif (GETPOST("date_startmonth") > 0) { + $date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth", 'int'), GETPOST("date_startday", 'int'), GETPOST("date_startyear", 'int'), 'tzuserrel'); +} else { + $date_start = -1; +} +if (!GETPOSTISSET("date_endmonth")) { + $date_end = dol_get_last_hour(dol_now('gmt'), 'tzuserrel'); +} elseif (GETPOST("date_endmonth") > 0) { + $date_end = dol_get_last_hour(dol_mktime(23, 59, 59, GETPOST("date_endmonth", 'int'), GETPOST("date_endday", 'int'), GETPOST("date_endyear", 'int'), 'tzuserrel'), 'tzuserrel'); +} else { + $date_end = -1; +} + +// 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 (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... @@ -92,8 +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 @@ -102,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 = ''; @@ -115,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(); @@ -128,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'); } @@ -142,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 { @@ -158,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); @@ -171,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_sessiona) $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").''; } @@ -230,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); } @@ -256,36 +320,37 @@ if ($result) // Fields title search print '
'; - print ''; + print ''; print ''; // IP print ''; 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 ''; } @@ -303,25 +368,22 @@ 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 ''; // Date - print ''; + print ''; // Code print ''; @@ -333,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 +847,62 @@ if ($resql) // Title of lines print '
'; @@ -798,12 +940,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); } @@ -840,6 +979,7 @@ if ($resql) print "
'.$valuetoshow.''.$valuetoshow.''; - 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) - { + 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'); } 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->{$fieldlist[$field]}) && $obj->{$fieldlist[$field]} > 0) { $fuser = new User($db); $fuser->fetch($obj->{$fieldlist[$field]}); print $fuser->getNomUrl(1); @@ -1049,31 +1200,29 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') 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->{$fieldlist[$field]}; + } print $formadmin->select_language($selectedlang, 'langcode', 0, null, 1, 0, 0, 'maxwidth150'); } else { - if (!empty($obj->{$fieldlist[$field]})) - { + if (!empty($obj->{$fieldlist[$field]})) { print $obj->{$fieldlist[$field]}.' - '.$langs->trans('Language_'.$obj->{$fieldlist[$field]}); } $keyname = $fieldlist[$field]; - if ($keyname == 'lang') $keyname = 'langcode'; // Avoid conflict with lang param + 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->{$fieldlist[$field]}) && !in_array($obj->{$fieldlist[$field]}, array_keys($elementList))) { // Current template type is an unknown type, so we must keep it as it is. print ''; print $obj->{$fieldlist[$field]}; @@ -1081,24 +1230,39 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') 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->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0).''; + print $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzuserrel'); + print $form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzuserrel'); + print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; //print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print '
'.dol_print_date($db->jdate($obj->dateevent), '%Y-%m-%d %H:%M:%S').''.dol_print_date($db->jdate($obj->dateevent), '%Y-%m-%d %H:%M:%S', 'tzuserrel').''.$obj->type.''; - if ($obj->fk_user) - { + if ($obj->fk_user) { $userstatic->id = $obj->fk_user; $userstatic->login = $obj->login; $userstatic->admin = $obj->admin; @@ -342,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; @@ -392,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..315673f1582 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"); @@ -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"; @@ -325,12 +340,11 @@ if ($mode == 'overwrite') // Value 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 ''; @@ -461,34 +490,45 @@ 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.''; print dol_escape_htmltag($val); print ''; @@ -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 0ca4be65910..f55f432ed5a 100644 --- a/htdocs/admin/website.php +++ b/htdocs/admin/website.php @@ -42,7 +42,9 @@ $rowid = GETPOST('rowid', 'alpha'); $id = 1; -if (!$user->admin) accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $acts[0] = "activate"; $acts[1] = "disable"; @@ -54,13 +56,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 (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,35 +439,39 @@ if ($id) print ''; // Form to add a new line - if ($tabname[$id]) - { - $alabelisused = 0; - $var = false; - + 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 ''; } - if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1; } print ''; // Line to enter new values - print ""; + print ''; $obj = new stdClass(); // If data was already input, we define them in obj to populate input fields. - if (GETPOST('actionadd', '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 ''; @@ -469,30 +479,29 @@ if ($id) print '
'; - if ($action != 'edit') - { + if ($action != 'edit') { print ''; } print '
'; @@ -501,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 '
'; @@ -518,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 e101fb89602..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); @@ -173,7 +175,7 @@ class DolibarrApi unset($object->name_bis); unset($object->newref); - if ($object->table_element != 'ticket') { + if (!isset($object->table_element) || $object->table_element != 'ticket') { unset($object->comments); } @@ -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 bdf86a5c2c9..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) { @@ -425,10 +399,8 @@ class Documents extends DolibarrApi throw new RestException(500, 'Error while fetching object: '.$object->error); } - $upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 0, $object, 'product').dol_sanitizeFileName($object->ref); - } - elseif ($modulepart == 'agenda' || $modulepart == 'action' || $modulepart == 'event') - { + $upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, 'product'); + } 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'); @@ -707,7 +661,7 @@ class Documents extends DolibarrApi if (!empty($createdirifnotexists)) { if (dol_mkdir($upload_dir) < 0) { // needed by products - throw new RestException(500, 'Error while trying to create directory.'); + throw new RestException(500, 'Error while trying to create directory '.$upload_dir); } } @@ -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 cb2fdd54d66..5209cc51157 100644 --- a/htdocs/api/class/api_login.class.php +++ b/htdocs/api/class/api_login.class.php @@ -48,8 +48,8 @@ class Login * @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 - * @throws RestException 500 + * @throws RestException 403 Access denied + * @throws RestException 500 System error * * @url GET / * @url POST / @@ -58,17 +58,23 @@ class Login { 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 +83,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,22 +100,19 @@ 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'); } // Generate token for user - $token = dol_hash($login.uniqid().$conf->global->MAIN_API_KEY, 1); + $token = dol_hash($login.uniqid().(empty($conf->global->MAIN_API_KEY)?'':$conf->global->MAIN_API_KEY), 1); // We store API token into database $sql = "UPDATE ".MAIN_DB_PREFIX."user"; @@ -118,8 +121,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 { @@ -132,7 +134,7 @@ class Login 'code' => 200, 'token' => $token, 'entity' => $tmpuser->entity, - 'message' => 'Welcome '.$login.($reset ? ' - Token is new' : ' - This is your token (generated by a previous call). You can use it to make any REST API call, or enter it into the DOLAPIKEY field to use the Dolibarr API explorer.') + 'message' => 'Welcome '.$login.($reset ? ' - Token is new' : ' - This is your token (recorded for your user). You can use it to make any REST API call, or enter it into the DOLAPIKEY field to use the Dolibarr API explorer.') ) ); } diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index 84d4ddc3679..0029d0fd110 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, 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)) { @@ -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,10 @@ class Setup extends DolibarrApi if (empty($xmlremote)) { $xmlremote = 'https://www.dolibarr.org/files/stable/signatures/filelist-'.DOL_VERSION.'.xml'; } + if ($xmlremote && !preg_match('/^https?:\/\//', $xmlremote)) { + $langs->load("errors"); + throw new RestException(500, $langs->trans("ErrorURLMustStartWithHttp", $xmlremote)); + } if ($target == 'local') { if (dol_is_file($xmlfile)) { @@ -1726,7 +1673,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 // 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') { 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..89b5a696462 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,64 @@ 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; + } $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 +244,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 +252,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,21 +265,27 @@ 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); @@ -271,8 +294,9 @@ if (!empty($reg[1]) && ($reg[1] != 'explorer' || ($reg[2] != '/swagger.json' && 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 +305,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 output 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 58307781cf2..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')); } @@ -125,48 +129,31 @@ if (empty($reshook)) 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); -$title = $langs->trans("Assets").' - '.$langs->trans("Card"); +$title = $langs->trans("Asset").' - '.$langs->trans("Card"); $help_url = ''; llxHeader('', $title, $help_url); -// Example : Adding jquery code -print ''; - - // 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(), ''); @@ -194,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 ''; @@ -203,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(); @@ -228,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); @@ -238,23 +227,18 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $formconfirm = ''; // Confirmation to delete - if ($action == 'delete') - { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteAssets'), $langs->trans('ConfirmDeleteAssets'), 'confirm_delete', '', 0, 1); - } - - // Confirmation of action xxxx - if ($action == 'xxx') - { - $formquestion = array(); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220); + 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; @@ -292,78 +276,59 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; print $form->textwithpicto($langs->trans($key), $langs->trans($key.'Tooltip')); print ''.$conf->global->$key.'
'; print ''; - print ''; - print ''; print '
'; print dol_get_fiche_end(); - // Buttons for actions - if ($action != 'presend' && $action != 'editline') { - print '
'."\n"; + /* + * Buttons + */ + 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 ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - if (empty($reshook)) - { - // Send - if (empty($user->socid)) { - print ''.$langs->trans('SendMail').''."\n"; - } - - 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"; } } - print '
'."\n"; + print "
"; } - - // Select mail models is same action as presend - if (GETPOST('modelselected')) { - $action = 'presend'; - } - - if ($action != 'presend') - { + if ($action != 'presend') { print '
'; print ''; // ancre // Documents - /*$objref = dol_sanitizeFileName($object->ref); - $relativepath = $comref . '/' . $comref . '.pdf'; - $filedir = $conf->asset->dir_output . '/' . $objref; - $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id; + $filename = dol_sanitizeFileName($object->ref); + $filedir = $conf->contrat->dir_output."/".dol_sanitizeFileName($object->ref); + $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; $genallowed = $user->rights->asset->read; // If you can read, you can build the PDF to read content - $delallowed = $user->rights->asset->create; // If you can create/edit, you can remove a file on card - print $formfile->showdocuments('asset', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang); - */ + $delallowed = $user->rights->asset->write; // If you can create/edit, you can remove a file on card + + print $formfile->showdocuments('asset', $filename, $filedir, $urlsource, 0, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang); // Show links to link elements $linktoelem = $form->showLinkToObjectBlock($object, null, array('asset')); $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - print '
'; $MAXEVENT = 10; - $morehtmlright = ''; - $morehtmlright .= $langs->trans("SeeAll"); - $morehtmlright .= ''; + $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt imgforviewmode', DOL_URL_ROOT.'/asset/info.php?id='.$object->id); // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; @@ -372,19 +337,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '
'; } - - //Select mail models is same action as presend - if (GETPOST('modelselected')) $action = 'presend'; - - // Presend form - /* - $modelmail='asset'; - $defaulttopic='InformationMessage'; - $diroutput = $conf->asset->dir_output.'/asset'; - $trackid = 'asset'.$object->id; - - include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; - */ } 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..99205d2b3f3 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 { @@ -193,30 +191,27 @@ class AssetType extends CommonObject $sql .= " WHERE rowid =".$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 4c2e36aed9a..e6f5ed9b353 100644 --- a/htdocs/asset/document.php +++ b/htdocs/asset/document.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018 Alexandre Spangaro + * Copyright (C) 2018-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 @@ -19,7 +19,7 @@ /** * \file htdocs/asset/document.php * \ingroup asset - * \brief Tab for documents linked to Assets + * \brief Page for attached files on assets */ require '../main.inc.php'; @@ -31,125 +31,110 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; // Load translation files required by the page -$langs->loadLangs(array("assets", "companies")); +$langs->loadLangs(array('assets', 'companies', 'other')); -$action = GETPOST('action', 'aZ09'); -$confirm = GETPOST('confirm'); -$id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); +$id = (GETPOST('id', 'int') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility $ref = GETPOST('ref', 'alpha'); +$socid = GETPOST('socid', 'int'); +$action = GETPOST('action', 'aZ09'); +$confirm = GETPOST('confirm', 'alpha'); -// Security check - Protection if external user -//if ($user->socid > 0) accessforbidden(); -//if ($user->socid > 0) $socid = $user->socid; -//$result = restrictedArea($user, 'asset', $id); +// Security check +if ($user->socid) { + $socid = $user->socid; +} +$result=restrictedArea($user, 'asset', $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"; +} -// Initialize technical objects $object = new Asset($db); -$extrafields = new ExtraFields($db); -$diroutputmassaction = $conf->assets->dir_output.'/temp/massgeneration/'.$user->id; -$hookmanager->initHooks(array('assetdocument')); // 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 -if (!empty($user->socid)) $socid = $user->socid; -$result = restrictedArea($user, 'asset', $id); - -//if ($id > 0 || ! empty($ref)) $upload_dir = $conf->sellyoursaas->multidir_output[$object->entity] . "/packages/" . dol_sanitizeFileName($object->id); -if ($id > 0 || !empty($ref)) $upload_dir = $conf->sellyoursaas->multidir_output[$object->entity]."/packages/".dol_sanitizeFileName($object->ref); - +if ($object->fetch($id)) { + $upload_dir = $conf->asset->dir_output."/".dol_sanitizeFileName($object->ref); +} /* * Actions */ -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* * View */ -$form = new Form($db); +$title = $langs->trans('Assets')." - ".$langs->trans('Documents'); -$title = $langs->trans("Assets").' - '.$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 - */ - if (!empty($conf->notification->enabled)) $langs->load("mails"); - $head = asset_prepare_head($object); - - print dol_get_fiche_head($head, 'document', $langs->trans("Asset"), -1, 'generic'); +$form = new Form($db); - // 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']; + +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); + print dol_get_fiche_head($head, 'documents', $langs->trans('Asset'), -1, 'accounting'); + + // 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']; + } + + // Asset content + + $linkback = ''.$langs->trans("BackToList").''; + + $morehtmlref = ''; + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0); + + print '
'; + print '
'; + + print ''; + + print ''; + print ''; + print "
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.dol_print_size($totalsize, 1, 1).'
\n"; + + print "
\n"; + + print dol_get_fiche_end(); + + $modulepart = 'asset'; + $permission = $user->rights->asset->write; + $permtoedit = $user->rights->asset->write; + $param = '&id='.$object->id; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + } else { + dol_print_error($db); } - - // Object card - // ------------------------------------------------------------ - $linkback = ''.$langs->trans("BackToList").''; - - dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); - - print '
'; - - print '
'; - print ''; - - // Number of files - print ''; - - // Total size - print ''; - - print '
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'; - - print '
'; - - print dol_get_fiche_end(); - - $modulepart = 'asset'; - //$permission = $user->rights->asset->create; - $permission = 1; - //$permtoedit = $user->rights->asset->create; - $permtoedit = 1; - $param = '&id='.$object->id; - - //$relativepathwithnofile='asset/' . dol_sanitizeFileName($object->id).'/'; - $relativepathwithnofile = 'asset/'.dol_sanitizeFileName($object->ref).'/'; - - include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { - accessforbidden('', 0, 1); + print $langs->trans("ErrorUnknown"); } // End of page 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 ''; -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 fecebb676a8..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,13 +159,14 @@ 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)) - { - setEventMessages($langs->trans("AssetsTypeModified"), null, 'mesgs'); + 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 '
'; + 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 ''; @@ -357,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..9fc10fdc59e 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); @@ -148,8 +150,7 @@ class BlockedLogAuthority dol_syslog(get_class($this)."::fetch id=".$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 5c170d0aa72..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,17 +134,16 @@ 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; // Set if we used free entry or predefined product $idprod = (int) GETPOST('idprod', 'int'); - $qty = GETPOST('qty', 'int'); - $qty_frozen = GETPOST('qty_frozen', 'int'); + $qty = price2num(GETPOST('qty', 'alpha'), 'MS'); + $qty_frozen = price2num(GETPOST('qty_frozen', 'alpha'), 'MS'); $disable_stock_change = GETPOST('disable_stock_change', 'int'); - $efficiency = GETPOST('efficiency', 'int'); + $efficiency = price2num(GETPOST('efficiency', 'alpha')); if ($qty == '') { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), null, 'errors'); @@ -153,10 +159,7 @@ if (empty($reshook)) $error++; } - if (!$error) - { - $lastposition = 0; - + if (!$error) { $bomline = new BOMLine($db); $bomline->fk_bom = $id; $bomline->fk_product = $idprod; @@ -166,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) { @@ -182,21 +185,22 @@ if (empty($reshook)) unset($_POST['disable_stock_change']); $object->fetchLines(); + + $object->calculateCosts(); } } } // Add line - if ($action == 'updateline' && $user->rights->bom->write) - { + if ($action == 'updateline' && $user->rights->bom->write) { $langs->load('errors'); $error = 0; // Set if we used free entry or predefined product - $qty = price2num(GETPOST('qty', 'int')); - $qty_frozen = GETPOST('qty_frozen', 'int'); + $qty = price2num(GETPOST('qty', 'alpha'), 'MS'); + $qty_frozen = price2num(GETPOST('qty_frozen', 'alpha'), 'MS'); $disable_stock_change = GETPOST('disable_stock_change', 'int'); - $efficiency = price2num(GETPOST('efficiency', 'int')); + $efficiency = price2num(GETPOST('efficiency', 'alpha')); if ($qty == '') { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), null, 'errors'); @@ -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 { @@ -222,6 +225,8 @@ if (empty($reshook)) unset($_POST['disable_stock_change']); $object->fetchLines(); + + $object->calculateCosts(); } } } @@ -234,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/bookmark.php b/htdocs/bookmarks/admin/bookmark.php index c049d4af16f..5f30db5d7f2 100644 --- a/htdocs/bookmarks/admin/bookmark.php +++ b/htdocs/bookmarks/admin/bookmark.php @@ -38,7 +38,7 @@ if ($action == 'setvalue') { $showmenu = GETPOST('BOOKMARKS_SHOW_IN_MENU', 'alpha'); $res = dolibarr_set_const($db, "BOOKMARKS_SHOW_IN_MENU", $showmenu, 'chaine', 0, '', $conf->entity); - if (!$res > 0) { + if (!($res > 0)) { $error++; } 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..4fe8c3cee83 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); @@ -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 5f0e9baddf5..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 9468c395756..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') - { - // We set status to payed - $result = $invoice->set_paid($user); - //print 'set paid';exit; + && $obj_facturation->getSetPaymentMode() != 'DIFF') { + // We set status to paid + $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 feca9c4f204..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' || $_POST["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 8e2f07ec4fc..1f467b507d1 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; @@ -1146,6 +1182,8 @@ class Categorie extends CommonObject // First build full array $motherof //$this->load_motherof(); // Disabled because already done by caller of build_path_from_id_categ + // $this->cats[$id_categ] is supposed to be already an array. We just want to complete it with property fullpath and fulllabel + // Define fullpath and fulllabel $this->cats[$id_categ]['fullpath'] = '_'.$id_categ; $this->cats[$id_categ]['fulllabel'] = $this->cats[$id_categ]['label']; @@ -1200,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) { @@ -1248,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 @@ -1256,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)."'"; @@ -1314,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'; + } } } } @@ -1395,8 +1441,9 @@ class Categorie extends CommonObject } } - if (count($ways) == 0) + if (count($ways) == 0) { $ways[0][0] = $this; + } return $ways; } @@ -1415,7 +1462,9 @@ 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 @@ -1471,7 +1520,6 @@ class Categorie extends CommonObject return $cats; } - /** * Returns categories whose id or name match * add wildcards in the name unless $exact = true @@ -1505,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); @@ -1550,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 = ''; @@ -1559,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; } @@ -1649,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; + } } } @@ -1727,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); @@ -1760,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; @@ -1872,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; } @@ -1887,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 5adc7bbb17b..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,8 +45,12 @@ $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')); /* * View @@ -54,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'); } @@ -100,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 ''; @@ -128,7 +137,9 @@ if (empty($nosearch)) { print "\t
"; - } else print ' '; + } else { + print ' '; + } print ''; } @@ -143,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); } @@ -187,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 864de6e2e98..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 '
'; @@ -285,23 +275,25 @@ print dol_get_fiche_end(); */ print "
\n"; - -if ($user->rights->categorie->creer) -{ - $socid = ($object->socid ? "&socid=".$object->socid : ""); - print ''.$langs->trans("Modify").''; +$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 (empty($reshook)) { + 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; @@ -330,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 " | "; @@ -343,11 +334,9 @@ print '
'.$langs->trans("NoSubCat").'
".(is_countable($elements) ? count($elements) : '0')."
'; $entry .= ''; $entry .= ''; - $entry .= ''; + $entry .= $counter; $entry .= ''; + $entry .= ''; + $entry .= ''; $entry .= ''; @@ -409,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 ''; 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 '
'; - $entry .= ''.$categstatic->getNomUrl(1, '', 60).''; + $entry .= ''.$li.''; $entry .= ''.$counter.''; - $entry .= ''.img_view().''; + $entry .= ''.img_view().''; + $entry .= ''; + $entry .= ''.img_edit().''; + $entry .= ''; + $entry .= ''.img_delete().''; $entry .= '
'; @@ -453,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 ''; @@ -498,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 ''; 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("Ref").'
'; @@ -513,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'); @@ -532,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 ''; @@ -576,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 '
'.$langs->trans("Name").'
'; @@ -590,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'); @@ -610,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 ''; @@ -654,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 ''; $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..9cfeb860d33 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("Name")."
'; @@ -668,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'); @@ -689,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 ''; @@ -714,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 '\n"; + $i++; + } + print "
'.$langs->trans("Name").'
'; @@ -731,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'); @@ -750,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 ''; @@ -776,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 ''; 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").'
'; @@ -790,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'); @@ -810,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 ''; @@ -835,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 ''; @@ -414,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 fb2f114b579..92f9c320acd 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; @@ -242,8 +238,7 @@ class BonPrelevement extends CommonObject $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 = ".$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++) - { - /* Tag invoice as payed */ + 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'); @@ -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])) { @@ -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; @@ -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; @@ -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..6fa9b94b637 100644 --- a/htdocs/compta/prelevement/class/ligneprelevement.class.php +++ b/htdocs/compta/prelevement/class/ligneprelevement.class.php @@ -84,10 +84,8 @@ class LignePrelevement $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("Ref").'
'; @@ -851,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'); @@ -870,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 ''; @@ -896,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 '
'.$langs->trans("Ref").'
'; @@ -912,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'); @@ -931,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 ''; @@ -957,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 ''; print ''; -print '
'.$langs->trans("Users").' '.$num.'
'; print $userentry->getNomUrl(1); @@ -970,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'); @@ -990,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 ''; @@ -1016,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").'
'; @@ -1032,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 7353ea881ee..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 124b8dcf1dd..74ff6c6aa62 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; } @@ -228,27 +243,24 @@ if (empty($reshook) && $action == 'add') $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 - $datep = dol_mktime($fulldayevent ? '00' : GETPOST("aphour", 'int'), $fulldayevent ? '00' : GETPOST("apmin", 'int'), $fulldayevent ? '00' : GETPOST("apsec", 'int'), GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int')); - $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')); + $datep = dol_mktime($fulldayevent ? '00' : GETPOST("aphour", 'int'), $fulldayevent ? '00' : GETPOST("apmin", 'int'), $fulldayevent ? '00' : GETPOST("apsec", 'int'), GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'), 'tzuser'); + $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,30 +464,36 @@ 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'); - $apmin = GETPOST('apmin'); - $p2hour = GETPOST('p2hour'); - $p2min = GETPOST('p2min'); + $aphour = GETPOST('aphour', 'int'); + $apmin = GETPOST('apmin', 'int'); + $p2hour = GETPOST('p2hour', 'int'); + $p2min = GETPOST('p2min', 'int'); $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(); $object->fetch_userassigned(); $object->oldcopy = clone $object; - $datep = dol_mktime($fulldayevent ? '00' : $aphour, $fulldayevent ? '00' : $apmin, 0, $_POST["apmonth"], $_POST["apday"], $_POST["apyear"]); - $datef = dol_mktime($fulldayevent ? '23' : $p2hour, $fulldayevent ? '59' : $p2min, $fulldayevent ? '59' : '0', $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]); + $datep = dol_mktime($fulldayevent ? '00' : $aphour, $fulldayevent ? '00' : $apmin, 0, GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'), 'tzuser'); + $datef = dol_mktime($fulldayevent ? '23' : $p2hour, $fulldayevent ? '59' : $p2min, $fulldayevent ? '59' : '0', GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'), 'tzuser'); $object->type_id = dol_getIdFromCode($db, GETPOST("actioncode", 'aZ09'), 'c_actioncomm'); $object->label = GETPOST("label", "alphanohtml"); @@ -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,25 +739,23 @@ 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"); - $smin = dol_print_date($object->datep, "%M"); + $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; } - $datep = dol_mktime($shour, $smin, 0, substr($newdate, 13, 2), substr($newdate, 15, 2), substr($newdate, 9, 4)); - if ($datep != $object->datep) - { - if (!empty($object->datef)) - { + $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)) { $object->datef += $datep - $object->datep; } $object->datep = $datep; @@ -820,8 +831,7 @@ if (empty($reshook) && GETPOST('actionmove', 'alpha') == 'mupdate') } } } - if (!empty($backtopage)) - { + if (!empty($backtopage)) { header("Location: ".$backtopage); exit; } else { @@ -855,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 .= '
'.$val['name'].'  
'; + $s .= '
 
'; } } @@ -523,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,'; @@ -556,57 +631,80 @@ $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 ($action == 'show_day') -{ +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') { $sql .= " AND ("; - $sql .= " (a.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."'"; - $sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')"; + $sql .= " (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'))."')"; $sql .= " OR "; - $sql .= " (a.datep2 BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."'"; - $sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')"; + $sql .= " (a.datep2 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'))."')"; $sql .= " OR "; - $sql .= " (a.datep < '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."'"; - $sql .= " AND a.datep2 > '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')"; + $sql .= " (a.datep < '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year, 'tzuserrel'))."'"; + $sql .= " AND a.datep2 > '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year, 'tzuserrel'))."')"; $sql .= ')'; } else { // To limit array @@ -621,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 = ".$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 @@ -642,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; } @@ -667,19 +777,24 @@ if ($resql) $event->datep = $db->jdate($obj->datep); // datep and datef are GMT date. Example: 1970-01-01 01:00:00, jdate will return 0 if TZ of PHP server is Europe/Berlin $event->datef = $db->jdate($obj->datep2); + //$event->datep_formated_gmt = dol_print_date($event->datep, 'dayhour', 'gmt'); //var_dump($obj->datep); //var_dump($event->datep); $event->type_code = $obj->type_code; $event->type_label = $obj->type_label; $event->type_color = $obj->type_color; + $event->type = $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; @@ -695,40 +810,49 @@ 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; } // Check values - 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) { // 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'); + //var_dump(dol_print_date($event->date_start_in_calendar, 'dayhour', 'gmt')); // Hour at greenwich + //var_dump($annee.'-'.$mois.'-'.$jour); // Loop on each day covered by action to prepare an index to show on calendar $loop = true; $j = 0; - $daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee); + $daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee, 'gmt'); do { - //if ($event->id==408) print 'daykey='.$daykey.' '.$event->datep.' '.$event->datef.'
'; + //if ($event->id==408) + //print 'daykey='.$daykey.' '.dol_print_date($daykey, 'dayhour', 'gmt').' '.$event->datep.' '.$event->datef.'
'; $eventarray[$daykey][] = $event; $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); @@ -739,17 +863,17 @@ if ($resql) } else { dol_print_error($db); } +//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 { @@ -759,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 @@ -776,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 = date('Y', $daycursor); - $mois = date('m', $daycursor); - $jour = date('d', $daycursor); + // 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 { @@ -805,128 +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"; - } 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; - } - - $annee = date('Y', $event->date_start_in_calendar); - $mois = date('m', $event->date_start_in_calendar); - $jour = date('d', $event->date_start_in_calendar); - $daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee); - - do { - $eventarray[$daykey][] = $event; - - $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; @@ -934,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; @@ -951,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 { @@ -974,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; @@ -1005,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']; @@ -1035,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']; @@ -1044,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); @@ -1064,20 +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; @@ -1085,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 @@ -1109,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); } } @@ -1173,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'); } @@ -1186,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); @@ -1219,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++; } @@ -1243,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); } @@ -1264,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"; @@ -1272,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"; @@ -1330,18 +1481,24 @@ if (empty($action) || $action == 'show_month') // View by month for ($iter_day = 0; $iter_day < 7; $iter_day++) { // Show days of the current week - $curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd'); - $tmparray = dol_getdate($curtime, true); - $tmpday = $tmparray['mday']; - $tmpmonth = $tmparray['mon']; - $tmpyear = $tmparray['year']; + $curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd'); // $firstdaytoshow is in timezone of server + $tmpday = dol_print_date($curtime, '%d', 'tzuserrel'); + $tmpmonth = dol_print_date($curtime, '%m', 'tzuserrel'); + $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); @@ -1284,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); @@ -1366,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); @@ -1384,12 +1543,12 @@ if (empty($action) || $action == 'show_month') // View by month echo "
'; @@ -1397,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 @@ -1411,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"; @@ -1473,33 +1636,39 @@ 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; + print "\n"; $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 : '')); } // Line with title of day - print '
'."\n"; + print '
'."\n"; - if ($nonew <= 0) - { - print '
'; + 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 ''; @@ -1507,8 +1676,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa print '
'."\n"; } - if ($nonew < 0) - { + if ($nonew < 0) { print '
'; return; } @@ -1518,35 +1686,35 @@ 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); - foreach ($eventarray as $daykey => $notused) - { - $annee = date('Y', $daykey); - $mois = date('m', $daykey); - $jour = date('d', $daykey); - if ($day == $jour && $month == $mois && $year == $annee) - { - foreach ($eventarray[$daykey] as $index => $event) - { - if ($i < $maxprint || $maxprint == 0 || !empty($conf->global->MAIN_JS_SWITCH_AGENDA)) - { + 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' + $jour = dol_print_date($daykey, '%d', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD' + + //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)) { $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; @@ -1554,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)])) { @@ -1567,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"; @@ -1631,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 = date('Y', $event->date_start_in_calendar); - $tmpmonthstart = date('m', $event->date_start_in_calendar); - $tmpdaystart = date('d', $event->date_start_in_calendar); - $tmpyearend = date('Y', $event->date_end_in_calendar); - $tmpmonthend = date('m', $event->date_end_in_calendar); - $tmpdayend = date('d', $event->date_end_in_calendar); + $tmpyearstart = dol_print_date($event->date_start_in_calendar, '%Y', 'tzuserrel'); + $tmpmonthstart = dol_print_date($event->date_start_in_calendar, '%m', 'tzuserrel'); + $tmpdaystart = dol_print_date($event->date_start_in_calendar, '%d', 'tzuserrel'); + $tmpyearend = dol_print_date($event->date_end_in_calendar, '%Y', 'tzuserrel'); + $tmpmonthend = dol_print_date($event->date_end_in_calendar, '%m', 'tzuserrel'); + $tmpdayend = dol_print_date($event->date_end_in_calendar, '%d', 'tzuserrel'); + // Hour start - if ($tmpyearstart == $annee && $tmpmonthstart == $mois && $tmpdaystart == $jour) - { - $daterange .= dol_print_date($event->date_start_in_calendar, 'hour'); // Il faudrait utiliser ici tzuser, mais si on ne peut pas car qd on rentre un date dans fiche action, en input la conversion local->gmt se base sur le TZ server et non user - if ($event->date_end_in_calendar && $event->date_start_in_calendar != $event->date_end_in_calendar) - { - if ($tmpyearstart == $tmpyearend && $tmpmonthstart == $tmpmonthend && $tmpdaystart == $tmpdayend) - $daterange .= '-'; + 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 .= '-'; + } //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'); // Il faudrait utiliser ici tzuser, mais si on ne peut pas car qd on rentre un date dans fiche action, en input la conversion local->gmt se base sur le TZ server et non user + if ($event->date_end_in_calendar && $event->date_start_in_calendar != $event->date_end_in_calendar) { + if ($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"; } } @@ -1737,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; } @@ -1745,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; @@ -1762,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; } @@ -1812,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"; } @@ -1881,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)); @@ -1902,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; } @@ -1916,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); } @@ -1949,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 510fa67dcdb..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,23 +57,30 @@ $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'); -$dateselect = dol_mktime(0, 0, 0, GETPOST('dateselectmonth', 'int'), GETPOST('dateselectday', 'int'), GETPOST('dateselectyear', 'int')); -$datestart = dol_mktime(0, 0, 0, GETPOST('datestartmonth', 'int'), GETPOST('datestartday', 'int'), GETPOST('datestartyear', 'int')); -$dateend = dol_mktime(0, 0, 0, GETPOST('dateendmonth', 'int'), GETPOST('dateendday', 'int'), GETPOST('dateendyear', 'int')); -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); +$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); +} $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; } @@ -136,40 +154,34 @@ $arrayfields = array( 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1), 'a.fk_contact'=>array('label'=>"Contact", 'checked'=>0), 'a.fk_element'=>array('label'=>"LinkedObject", 'checked'=>1, 'enabled'=>(!empty($conf->global->AGENDA_SHOW_LINKED_OBJECT))), - 'a.percent'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), - 'a.datec'=>array('label'=>'DateCreation', 'checked'=>0), - 'a.tms'=>array('label'=>'DateModification', 'checked'=>0) + 'a.datec'=>array('label'=>'DateCreation', 'checked'=>0, 'position'=>510), + 'a.tms'=>array('label'=>'DateModification', 'checked'=>0, 'position'=>520), + 'a.percent'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000) ); // 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])) - $arrayfields["ef.".$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($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key])); - } -} +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); } } @@ -180,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 = ''; @@ -198,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; @@ -217,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; } @@ -232,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'; } @@ -263,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 @@ -327,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'; @@ -403,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; } @@ -419,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); @@ -440,7 +553,9 @@ if ($resql) print ''."\n"; - if ($optioncss != '') print ''; + if ($optioncss != '') { + print ''; + } print ''; print ''; print ''; @@ -448,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'); @@ -459,59 +578,57 @@ 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; // 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; } $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 .= ''; @@ -519,6 +636,15 @@ if ($resql) $viewmode .= ''; + // Add more views from hooks + $parameters = array(); $object = null; + $reshook = $hookmanager->executeHooks('addCalendarView', $parameters, $object, $action); + if (empty($reshook)) { + $viewmode .= $hookmanager->resPrint; + } elseif ($reshook > 1) { + $viewmode = $hookmanager->resPrint; + } + $tmpforcreatebutton = dol_getdate(dol_now(), true); $newparam .= '&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$tmpforcreatebutton['year']; @@ -538,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 '
'; @@ -555,26 +684,40 @@ 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.datep2']['checked'])) { print ''; } if (!empty($arrayfields['s.nom']['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'; @@ -584,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'; @@ -620,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"; @@ -636,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; } @@ -653,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); @@ -669,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 ''; @@ -735,35 +894,46 @@ if ($resql) // Start date if (!empty($arrayfields['a.datep']['checked'])) { print ''; } // End date if (!empty($arrayfields['a.datep2']['checked'])) { print ''; } // Third party if (!empty($arrayfields['s.nom']['checked'])) { print ''; } @@ -771,17 +941,13 @@ if ($resql) if (!empty($arrayfields['a.fk_contact']['checked'])) { print ''; + print ''; } // Date update if (!empty($arrayfields['a.tms']['checked'])) { - print ''; + print ''; } if (!empty($arrayfields['a.percent']['checked'])) { // Status/Percent @@ -846,10 +1011,11 @@ if ($resql) } // Action column print ''; diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index c5f81e358cc..8d436f0e0f6 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; @@ -265,13 +334,13 @@ $next_month = $month; $next_day = $day; // Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1) -$firstdaytoshow = dol_mktime(0, 0, 0, $first_month, $first_day, $first_year); +$firstdaytoshow = dol_mktime(0, 0, 0, $first_month, $first_day, $first_year, 'tzuserrel'); $lastdaytoshow = dol_time_plus_duree($firstdaytoshow, 7, 'd'); //print $firstday.'-'.$first_month.'-'.$first_year; //print dol_print_date($firstdaytoshow,'dayhour'); //print dol_print_date($lastdaytoshow,'dayhour'); -$max_day_in_month = date("t", dol_mktime(0, 0, 0, $month, 1, $year)); +$max_day_in_month = date("t", dol_mktime(0, 0, 0, $month, 1, $year, 'gmt')); $tmpday = $first_day; $picto = 'calendarweek'; @@ -291,14 +360,6 @@ $param .= '&year='.urlencode($year).'&month='.urlencode($month).($day ? '&day='. //print 'x'.$param; -$tabactive = ''; -if ($action == 'show_month') $tabactive = 'cardmonth'; -if ($action == 'show_week') $tabactive = 'cardweek'; -if ($action == 'show_day') $tabactive = 'cardday'; -if ($action == 'show_list') $tabactive = 'cardlist'; -if ($action == 'show_peruser') $tabactive = 'cardperuser'; -if ($action == 'show_pertype') $tabactive = 'cardpertype'; - $paramnoaction = preg_replace('/action=[a-z_]+/', '', $param); $head = calendars_prepare_head($paramnoaction); @@ -307,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 .= ''; @@ -1270,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 0d621dfa186..ac21db8cff8 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,21 @@ 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; + //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,38 +126,35 @@ 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); // List of selected targets - $sql = "SELECT mc.rowid, mc.lastname, mc.firstname, mc.email, mc.other, mc.statut, mc.date_envoi, mc.tms,"; - $sql .= " mc.source_url, mc.source_id, mc.source_type, mc.error_text"; + $sql = "SELECT mc.rowid, mc.lastname, mc.firstname, mc.email, mc.other, mc.statut as status, mc.date_envoi, mc.tms,"; + $sql .= " mc.source_id, mc.source_type, mc.error_text"; $sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc"; $sql .= " WHERE mc.fk_mailing=".$object->id; $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; + print '"'.$obj->lastname.'"'.$sep; + print '"'.$obj->firstname.'"'.$sep; print $obj->email.$sep; print $obj->other.$sep; - print $obj->date_envoi.$sep; print $obj->tms.$sep; - print $obj->source_url.$sep; - print $obj->source_id.$sep; print $obj->source_type.$sep; - print $obj->error_text.$sep; + print $obj->source_id.$sep; + print $obj->date_envoi.$sep; + print $obj->status.$sep; + print '"'.$obj->error_text.'"'.$sep; print "\n"; } @@ -166,15 +165,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; $resql = $db->query($sql); - if ($resql) - { - if (!empty($id)) - { + if ($resql) { + if (!empty($id)) { $obj = new MailingTargets($db); $obj->update_nb($id); @@ -189,8 +185,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 +204,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 +213,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 +274,19 @@ if ($object->fetch($id) >= 0) print $langs->trans("TotalNbOfDistinctRecipients"); print '
'; print ''; - if (!$filteremail) print ''; + if (!$filteremail) { + print ''; + } print ''; print ''; print '\n"; @@ -225,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; @@ -238,16 +276,16 @@ if ($resql) print $email->getNomUrl(1); print ''; + // Title print ''; - // Date creation + // Date creation 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 ''; @@ -2062,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 ''; $i = 0; - foreach ($arrayofpaymentmode as $key => $val) - { + foreach ($arrayofpaymentmode as $key => $val) { print ''; @@ -791,8 +801,7 @@ if (empty($action) || $action == "view" || $action == "close") print ''; // Amount per payment type $i = 0; - foreach ($arrayofpaymentmode as $key => $val) - { + foreach ($arrayofpaymentmode as $key => $val) { print ''; @@ -810,8 +819,7 @@ if (empty($action) || $action == "view" || $action == "close") print ''; // Amount per payment type $i = 0; - foreach ($arrayofpaymentmode as $key => $val) - { + foreach ($arrayofpaymentmode as $key => $val) { print ''; // Amount per payment type $i = 0; - foreach ($arrayofpaymentmode as $key => $val) - { + foreach ($arrayofpaymentmode as $key => $val) { print ''; $i++; @@ -854,8 +866,11 @@ if (empty($action) || $action == "view" || $action == "close") // Save print ''; print ''; diff --git a/htdocs/compta/cashcontrol/cashcontrol_list.php b/htdocs/compta/cashcontrol/cashcontrol_list.php index fdc3e57bdba..34264649ead 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_list.php +++ b/htdocs/compta/cashcontrol/cashcontrol_list.php @@ -31,14 +31,17 @@ //if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). //if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) //if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data -//if (! defined('NOIPCHECK')) define('NOIPCHECK','1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip //if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu //if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php //if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session) +//if (! defined("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 require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/cashcontrol/class/cashcontrol.class.php'; @@ -66,7 +69,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 < 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; @@ -81,87 +86,100 @@ $hookmanager->initHooks(array('cashcontrol')); // Note that conf->hooks_modules // 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"; - -// Security check -$socid = 0; -if ($user->socid > 0) // Protection if external user -{ - //$socid = $user->socid; - accessforbidden(); +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"; } -//$result = restrictedArea($user, 'monmodule', $id, ''); // Initialize array of search criterias -$search_all = GETPOST("search_all", 'alpha'); +$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 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']); -} -// 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])) - $arrayfields["ef.".$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($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key])); + 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'); +// Security check +if ($user->socid > 0) { // Protection if external user + //$socid = $user->socid; + accessforbidden(); +} +if (!$user->rights->cashdesk->run && !$user->rights->takepos->run) { + 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] = ''; + 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 } @@ -193,31 +211,63 @@ $title = $langs->trans('CashControl'); // 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.', ' : ''); +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 .= 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; - $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 (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); } -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 @@ -226,45 +276,43 @@ $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $objec $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.= " 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)) -{ +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 || empty($limit))) { $num = $nbtotalofrecords; } else { - $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; } @@ -273,11 +321,10 @@ 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 && !$page) { $obj = $db->fetch_object($resql); $id = $obj->rowid; - header("Location: ".dol_buildpath('/compta/cashcontrol/cashcontrol_card.php', 1).'?id='.$id); + header("Location: ".DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_card.php?id='.$id); exit; } @@ -285,7 +332,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 ''; } - if (!GETPOST('fac_rec', 'int')) print ' '; + if (!GETPOST('fac_rec', 'int')) { + print ' '; + } 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); @@ -162,7 +162,7 @@ print dol_get_fiche_end(); /* - * List of social contributions payed + * List of social contributions paid */ $disable_delete = 0; @@ -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 payed - print ''; + // Amount paid + 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 '
'; - print $form->selectDate($datestart, 'datestart', 0, 0, 1, '', 1, 0); + print $form->selectDate($datestart, 'datestart', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzuserrel'); print ''; - print $form->selectDate($dateend, 'dateend', 0, 0, 1, '', 1, 0); + print $form->selectDate($dateend, 'dateend', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzuserrel'); print ''; $formactions->form_select_status_action('formaction', $search_status, 1, 'search_status', 1, 2, 'minwidth100imp maxwidth125'); @@ -600,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); + 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 ''; - print dol_print_date($db->jdate($obj->dp2), $formatToUse); + print dol_print_date($db->jdate($obj->dp2), $formatToUse, 'tzuser'); 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); } @@ -793,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; @@ -833,11 +998,11 @@ if ($resql) // Date creation if (!empty($arrayfields['a.datec']['checked'])) { // Status/Percent - print ''.dol_print_date($db->jdate($obj->datec), 'dayhour').''.dol_print_date($db->jdate($obj->datec), 'dayhour', 'tzuser').''.dol_print_date($db->jdate($obj->datem), 'dayhour').''.dol_print_date($db->jdate($obj->datem), 'dayhour', 'tzuser').''; - 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 +306,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 +327,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 +354,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 +364,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 +373,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 +384,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 +394,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 +407,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 +431,11 @@ if ($object->fetch($id) >= 0) } print '
'; - if ($allowaddtarget) print ''; - else print '
'; + if ($allowaddtarget) { + print ''; + } else { + print ''; + } } } } // End foreach dir @@ -463,41 +450,76 @@ if ($object->fetch($id) >= 0) $sql .= " mc.source_url, mc.source_id, mc.source_type, mc.error_text"; $sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc"; $sql .= " WHERE mc.fk_mailing=".$object->id; - if ($search_lastname) $sql .= natural_search("mc.lastname", $search_lastname); - if ($search_firstname) $sql .= natural_search("mc.firstname", $search_firstname); - if ($search_email) $sql .= natural_search("mc.email", $search_email); - if ($search_other) $sql .= natural_search("mc.other", $search_other); - if ($search_dest_status != '' && $search_dest_status >= -1) $sql .= " AND mc.statut=".$db->escape($search_dest_status)." "; + $asearchcriteriahasbeenset = 0; + if ($search_lastname) { + $sql .= natural_search("mc.lastname", $search_lastname); + $asearchcriteriahasbeenset++; + } + if ($search_firstname) { + $sql .= natural_search("mc.firstname", $search_firstname); + $asearchcriteriahasbeenset++; + } + if ($search_email) { + $sql .= natural_search("mc.email", $search_email); + $asearchcriteriahasbeenset++; + } + if ($search_other) { + $sql .= natural_search("mc.other", $search_other); + $asearchcriteriahasbeenset++; + } + if ($search_dest_status != '' && $search_dest_status >= -1) { + $sql .= " AND mc.statut=".$db->escape($search_dest_status)." "; + $asearchcriteriahasbeenset++; + } $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; } + + // 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 ''; @@ -548,17 +570,17 @@ if ($object->fetch($id) >= 0) print ''; // Source print ''; // Date last update print ''; // Date sending print ''; //Statut @@ -572,7 +594,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); @@ -590,8 +614,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'; @@ -601,8 +624,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 ''; @@ -611,24 +633,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 { @@ -638,22 +655,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); @@ -662,8 +678,7 @@ if ($object->fetch($id) >= 0) // Search Icon print ''; - if ($obj->statut == 0) // Not sent yet - { + if ($obj->statut == 0) { // Not sent yet if ($user->rights->mailing->creer && $allowaddtarget) { print ''.img_delete($langs->trans("RemoveRecipient")).''; } @@ -678,8 +693,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 9da825e262e..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 } @@ -119,36 +130,49 @@ llxHeader('', $langs->trans("Mailing"), 'EN:Module_EMailing|FR:Module_Mailing|ES $form = new Form($db); -if ($filteremail) -{ - $sql = "SELECT m.rowid, m.titre, m.nbemail, m.statut, m.date_creat as datec, m.date_envoi as date_envoi,"; +if ($filteremail) { + $sql = "SELECT m.rowid, m.titre as title, m.nbemail, m.statut, m.date_creat as datec, m.date_envoi as date_envoi,"; $sql .= " mc.statut as sendstatut"; $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, m.nbemail, m.statut, m.date_creat as datec, m.date_envoi as date_envoi"; + $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; } @@ -159,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 ''; @@ -202,7 +234,9 @@ if ($resql) print ''; print '
     '; @@ -215,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 "
'.$obj->title.''; print dol_print_date($db->jdate($obj->datec), 'day'); 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 12146179db0..ebca0177868 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,34 +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'])); - if ($result < 0) + $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); + 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(); @@ -332,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; @@ -349,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'); @@ -380,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'); @@ -397,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'); } @@ -410,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)) { @@ -449,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); @@ -459,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); @@ -480,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) { @@ -508,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); @@ -530,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++; @@ -540,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); @@ -586,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); @@ -602,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; @@ -740,8 +742,7 @@ if (empty($reshook)) } } - if ($error) - { + if ($error) { setEventMessages($langs->trans('ErrorsOnXLines', $error), null, 'errors'); } } @@ -758,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)) { @@ -772,19 +771,21 @@ 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'); } } } - } elseif ($action == 'addline' && GETPOST('submitforalllines', 'aZ09') && GETPOST('vatforalllines', 'alpha')) { + } elseif ($action == 'addline' && GETPOST('submitforalllines', 'alpha') && GETPOST('vatforalllines', 'alpha') !== '') { // Define vat_rate $vat_rate = (GETPOST('vatforalllines') ? GETPOST('vatforalllines') : 0); $vat_rate = str_replace('*', '', $vat_rate); @@ -796,12 +797,11 @@ if (empty($reshook)) } elseif ($action == 'addline' && $usercancreate) { // Add 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')); - $price_ht_devise = price2num(GETPOST('multicurrency_price_ht')); + $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); $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 { @@ -809,9 +809,11 @@ if (empty($reshook)) $tva_tx = ''; } - $qty = price2num(GETPOST('qty'.$predef), 'MS'); - $remise_percent = GETPOST('remise_percent'.$predef); - if (empty($remise_percent)) $remise_percent = 0; + $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS'); + $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); @@ -829,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++; } @@ -876,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; @@ -885,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); @@ -914,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']; @@ -942,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']; @@ -974,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 { @@ -990,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)) @@ -1020,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); @@ -1081,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)); @@ -1148,15 +1170,15 @@ 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'))) + if (preg_match('/\*/', GETPOST('tva_tx'))) { $info_bits |= 0x01; + } - // Clean parameters + // Clean parameters $description = dol_htmlcleanlastbr(GETPOST('product_desc', 'restricthtml')); // Define vat_rate @@ -1164,13 +1186,13 @@ if (empty($reshook)) $vat_rate = str_replace('*', '', $vat_rate); $localtax1_rate = get_localtax($vat_rate, 1, $object->thirdparty, $mysoc); $localtax2_rate = get_localtax($vat_rate, 2, $object->thirdparty, $mysoc); - $pu_ht = GETPOST('price_ht'); + $pu_ht = price2num(GETPOST('price_ht'), '', 2); // Add buying price $fournprice = price2num(GETPOST('fournprice') ? GETPOST('fournprice') : ''); $buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we muste keep this value - $pu_ht_devise = GETPOST('multicurrency_subprice'); + $pu_ht_devise = price2num(GETPOST('multicurrency_subprice'), '', 2); $date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), GETPOST('date_startsec'), GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); $date_end = dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); @@ -1188,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'); @@ -1199,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++; } @@ -1221,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')) { $fournprice = $line->fk_fournprice; $buyingprice = $line->pa_ht; break; @@ -1234,9 +1256,9 @@ if (empty($reshook)) } } - $qty = price2num(GETPOST('qty'), 'MS'); + $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(); @@ -1250,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); } @@ -1292,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) { - $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx'))); - } // bank account - elseif ($action == 'setbankaccount' && $usercancreate) { + } elseif ($action == 'setmulticurrencyrate' && $usercancreate) { + // Multicurrency rate + $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int')); + } 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')); @@ -1359,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); @@ -1397,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(); @@ -1449,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(); @@ -1464,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); @@ -1512,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 @@ -1559,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 ''; } @@ -1585,9 +1638,11 @@ if ($action == 'create') // Delivery delay print ''; @@ -1597,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 ''; } // Incoterms - if (!empty($conf->incoterm->enabled)) - { + if (!empty($conf->incoterm->enabled)) { print ''; print ''; print ''; print ''; print '"; // Multicurrency - if (!empty($conf->multicurrency->enabled)) - { + if (!empty($conf->multicurrency->enabled)) { print ''; print ''; print ''; print ''; print ''; print ''; @@ -1680,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 @@ -1699,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 '"; @@ -1735,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 $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'); + 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 ''; @@ -1534,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").''; @@ -1616,20 +1681,18 @@ if ($action == 'create') print '
'.$langs->trans("Project").''; - $numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500'); + print img_picto('', 'project').$formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); print ' id).'">'; print '
'; @@ -1641,13 +1704,14 @@ if ($action == 'create') print '
'.$langs->trans("DefaultModel").''; + print img_picto('', 'pdf').' '; $liste = ModelePDFPropales::liste_modeles($db); - print $form->selectarray('model', $liste, ($conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT ? $conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT : $conf->global->PROPALE_ADDON_PDF)); + $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).''; @@ -1660,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 @@ -1834,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( @@ -1852,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 @@ -1885,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; @@ -1909,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 .= ''; @@ -1983,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 ''; @@ -2009,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 ''; @@ -2023,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 ' '; } @@ -2037,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 { @@ -2049,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 { @@ -2084,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 { @@ -2097,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 { @@ -2114,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 { @@ -2152,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); @@ -2181,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); @@ -2194,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 { @@ -2219,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); @@ -2263,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 ''; @@ -2292,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 ''; @@ -2316,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); } @@ -2358,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); @@ -2383,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 '
'; @@ -2404,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. @@ -2438,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').''; + } } } @@ -2450,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").''; } @@ -2477,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").''; @@ -2519,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); @@ -2540,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); @@ -2549,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..c697b1b9eb9 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); @@ -319,32 +329,32 @@ class Proposals extends DolibarrApi $request_data = (object) $request_data; $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, + '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 ); if ($updateRes > 0) { @@ -378,15 +388,15 @@ 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'); - } + $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, @@ -572,25 +582,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 +766,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 +842,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 f572f6110bf..ffee98ffbba 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 { @@ -484,6 +502,7 @@ class Propal extends CommonObject } } else { $this->error = $line->error; + $this->errors = $line->errors; $this->db->rollback(); return -2; } @@ -535,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); @@ -557,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"); @@ -576,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; @@ -600,8 +628,8 @@ class Propal extends CommonObject // Clean vat code $reg = array(); $vat_src_code = ''; - if (preg_match('/\((.*)\)/', $txtva, $reg)) - { + $reg = array(); + if (preg_match('/\((.*)\)/', $txtva, $reg)) { $vat_src_code = $reg[1]; $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. } @@ -625,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; } @@ -635,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; } @@ -691,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; @@ -702,15 +730,16 @@ 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. - if ($result > 0) - { + + if ($result > 0) { $this->db->commit(); return $this->line->id; } else { @@ -720,6 +749,7 @@ class Propal extends CommonObject } } else { $this->error = $this->line->error; + $this->errors = $this->line->errors; $this->db->rollback(); return -2; } @@ -771,13 +801,21 @@ class Propal extends CommonObject $qty = price2num($qty); $pu = price2num($pu); $pu_ht_devise = price2num($pu_ht_devise); - $txtva = price2num($txtva); + if (!preg_match('/\((.*)\)/', $txtva)) { + $txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5' + } $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"); @@ -785,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 @@ -799,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. } @@ -824,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; } @@ -841,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; } @@ -896,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); @@ -910,7 +945,7 @@ class Propal extends CommonObject return $result; } else { $this->error = $this->line->error; - + $this->errors = $this->line->errors; $this->db->rollback(); return -1; } @@ -931,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); @@ -940,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(); @@ -973,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; @@ -995,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(); @@ -1015,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; @@ -1032,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"; @@ -1048,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"; @@ -1080,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"); @@ -1093,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++; } @@ -1131,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++; } @@ -1141,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]; @@ -1163,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; @@ -1200,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); @@ -1218,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 { @@ -1260,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; @@ -1305,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. } @@ -1346,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 { @@ -1417,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"; @@ -1434,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"; @@ -1454,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=".$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; @@ -1472,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 @@ -1507,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; @@ -1527,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; @@ -1540,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; } @@ -1558,8 +1580,7 @@ class Propal extends CommonObject // Lines $result = $this->fetch_lines(); - if ($result < 0) - { + if ($result < 0) { return -3; } @@ -1588,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 @@ -1606,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").","; @@ -1622,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); } @@ -1693,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); @@ -1814,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; @@ -1837,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; @@ -1852,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; @@ -1932,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(); @@ -1950,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); } @@ -1999,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(); @@ -2010,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); } @@ -2073,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(); @@ -2085,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); } @@ -2134,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(); @@ -2146,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); } @@ -2201,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); } @@ -2270,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(); @@ -2281,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); } @@ -2333,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); } @@ -2396,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); } @@ -2455,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; @@ -2477,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); } @@ -2504,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(); @@ -2530,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(); @@ -2612,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); } @@ -2678,8 +2697,7 @@ class Propal extends CommonObject $error = 0; // Protection - if ($this->statut <= self::STATUS_DRAFT) - { + if ($this->statut <= self::STATUS_DRAFT) { return 0; } @@ -2692,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); } @@ -2754,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; @@ -2827,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; } } @@ -2854,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; } @@ -2876,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; @@ -2892,7 +2900,9 @@ class Propal extends CommonObject } else { return -1; } - } else return $ga; + } else { + return $ga; + } } /** @@ -2914,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++; @@ -2934,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 @@ -3022,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); } @@ -3090,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); } @@ -3154,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; @@ -3223,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"); @@ -3240,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); } @@ -3267,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(); @@ -3309,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++; } } @@ -3354,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]; @@ -3391,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; @@ -3401,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; @@ -3414,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'; @@ -3448,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"; @@ -3457,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); @@ -3488,8 +3497,7 @@ class Propal extends CommonObject $classname = $conf->global->PROPALE_ADDON; - if (!empty($classname)) - { + if (!empty($classname)) { $mybool = false; $file = $classname.".php"; @@ -3503,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 ''; } @@ -3513,8 +3520,7 @@ class Propal extends CommonObject $numref = ""; $numref = $obj->getNextValue($soc, $this); - if ($numref != "") - { + if ($numref != "") { return $numref; } else { $this->error = $obj->error; @@ -3543,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); @@ -3584,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).'"'; } @@ -3610,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) { @@ -3639,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); } } @@ -3885,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; @@ -3974,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; @@ -4007,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(); @@ -4060,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; } @@ -4111,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; } @@ -4161,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; @@ -4213,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).""; @@ -4223,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); @@ -4240,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; } @@ -4294,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 fbe7fdbec5c..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 .= ' : '; @@ -178,7 +189,7 @@ if ($object->id > 0) $permission = $user->rights->propal->creer; $permtoedit = $user->rights->propal->creer; $param = '&id='.$object->id; - include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { print $langs->trans("ErrorUnknown"); } 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 d8f523f16da..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,20 +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'; +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'; @@ -147,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; @@ -157,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), @@ -166,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)), @@ -187,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 = ''; @@ -215,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 = ''; @@ -243,20 +290,153 @@ 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'; - $permissiontoread = $user->rights->propal->lire; - $permissiontodelete = $user->rights->propal->supprimer; - $permissiontoclose = $user->rights->propal->cloturer; $uploaddir = $conf->propal->multidir_output[$conf->entity]; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } +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 == 0) { + if ($tmpproposal->valid($user)) { + setEventMessage($tmpproposal->ref." ".$langs->trans('PassedInOpenStatus'), 'mesgs'); + } else { + setEventMessage($langs->trans('CantBeValidated'), 'errors'); + $error++; + } + } else { + setEventMessage($tmpproposal->ref." ".$langs->trans('IsNotADraft'), 'errors'); + $error++; + } + } else { + dol_print_error($db); + $error++; + } + } + if ($error) { + $db->rollback(); + } else { + $db->commit(); + } + } +} + +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->closeProposal($user, $tmpproposal::STATUS_SIGNED)) { + setEventMessage($tmpproposal->ref." ".$langs->trans('Signed'), 'mesgs'); + } else { + dol_print_error($db); + $error++; + } + } else { + setEventMessage($tmpproposal->ref." ".$langs->trans('CantBeSign'), 'errors'); + $error++; + } + } else { + dol_print_error($db); + $error++; + } + } + if ($error) { + $db->rollback(); + } else { + $db->commit(); + } + } +} +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(); + } +} + /* @@ -277,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) $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(); @@ -303,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 @@ -382,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; } @@ -398,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'); } @@ -417,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; @@ -430,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 ''; @@ -497,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).'
'; } @@ -518,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 '
'; @@ -572,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 @@ -769,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 ''; @@ -816,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"; @@ -864,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; @@ -893,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; @@ -911,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 @@ -1212,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"; @@ -1288,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; @@ -1299,72 +1871,10 @@ if ($resql) $delallowed = $user->rights->propal->creer; print $formfile->showdocuments('massfilesarea_proposals', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); - - if ($action == 'validate') { - if (GETPOST('confirm') == 'yes') { - $tmpproposal = new Propal($db); - $db->begin(); - $error = 0; - foreach ($toselect as $checked) { - if ($tmpproposal->fetch($checked)) { - if ($tmpproposal->statut == 0) { - if ($tmpproposal->valid($user)) { - setEventMessage($tmpproposal->ref." ".$langs->trans('PassedInOpenStatus'), 'mesgs'); - } else { - setEventMessage($langs->trans('CantBeValidated'), 'errors'); - $error++; - } - } else { - setEventMessage($tmpproposal->ref." ".$langs->trans('IsNotADraft'), 'errors'); - $error++; - } - } - dol_print_error($db); - $error++; - } - if ($error) { - $db->rollback(); - } else { - $db->commit(); - } - } - } - - if ($action == "sign") { - if (GETPOST('confirm') == 'yes') { - $tmpproposal = new Propal($db); - $db->begin(); - $error = 0; - foreach ($toselect as $checked) { - if ($tmpproposal->fetch($checked)) { - if ($tmpproposal->statut == 1) { - $tmpproposal->statut = 2; - if ($tmpproposal->update($user)) { - setEventMessage($tmpproposal->ref." ".$langs->trans('Signed'), 'mesgs'); - } else { - dol_print_error($db); - $error++; - } - } else { - setEventMessage($tmpproposal->ref." ".$langs->trans('CantBeSign'), 'errors'); - $error++; - } - } else { - dol_print_error($db); - $error++; - } - } - if ($error) { - $db->rollback(); - } else { - $db->commit(); - } - } - } } else { - dol_print_error($db); + dol_print_error($db); } - // End of page - llxFooter(); - $db->close(); +// End of page +llxFooter(); +$db->close(); 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')); @@ -639,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')); @@ -651,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')); @@ -663,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 ''; @@ -922,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 ''; @@ -938,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']; @@ -1189,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..3aacd070ae4 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 '
'.$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 6e5e022c651..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 = ".$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 57c1cf40114..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 213819b0915..0665a567738 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,19 +217,13 @@ 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')); - $datelivraison = dol_mktime(12, 0, 0, GETPOST('liv_month'), GETPOST('liv_day'), GETPOST('liv_year')); + $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'); if ($datecommande == '') { @@ -276,8 +256,8 @@ if (empty($reshook)) $object->fk_account = GETPOST('fk_account', 'int'); $object->availability_id = GETPOST('availability_id'); $object->demand_reason_id = GETPOST('demand_reason_id'); - $object->date_livraison = $datelivraison; // deprecated - $object->delivery_date = $datelivraison; + $object->date_livraison = $date_delivery; // deprecated + $object->delivery_date = $date_delivery; $object->shipping_method_id = GETPOST('shipping_method_id', 'int'); $object->warehouse_id = GETPOST('warehouse_id', 'int'); $object->fk_delivery_address = GETPOST('fk_address'); @@ -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) { - $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx'))); + } 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,44 +572,35 @@ 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')); - } elseif ($action == 'addline' && GETPOST('submitforalllines', 'aZ09') && GETPOST('vatforalllines', 'alpha')) { + $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); $vat_rate = str_replace('*', '', $vat_rate); @@ -624,19 +609,17 @@ 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; // Set if we used free entry or predefined product $predef = ''; - $product_desc = (GETPOST('dp_desc') ?GETPOST('dp_desc') : ''); - $price_ht = GETPOST('price_ht'); - $price_ht_devise = GETPOST('multicurrency_price_ht'); + $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); $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 { @@ -644,8 +627,12 @@ if (empty($reshook)) $tva_tx = ''; } - $qty = price2num(GETPOST('qty'.$predef, 'alpha')); + $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; + } // Extrafields $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); @@ -666,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++; } @@ -713,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; @@ -721,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); @@ -743,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']; @@ -783,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']; @@ -815,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 { @@ -832,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))) { @@ -856,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); @@ -908,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)); @@ -926,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); @@ -973,27 +976,23 @@ 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 = ''; $date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), GETPOST('date_startsec'), GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); $date_end = dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); $description = dol_htmlcleanlastbr(GETPOST('product_desc', 'restricthtml')); - $pu_ht = GETPOST('price_ht'); + $pu_ht = price2num(GETPOST('price_ht'), '', 2); $vat_rate = (GETPOST('tva_tx') ?GETPOST('tva_tx') : 0); - $pu_ht_devise = GETPOST('multicurrency_subprice'); + $pu_ht_devise = price2num(GETPOST('multicurrency_subprice'), '', 2); // Define info_bits $info_bits = 0; - if (preg_match('/\*/', $vat_rate)) + if (preg_match('/\*/', $vat_rate)) { $info_bits |= 0x01; + } // Define vat_rate $vat_rate = str_replace('*', '', $vat_rate); @@ -1016,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'); @@ -1027,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++; } @@ -1048,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')) { $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); @@ -1113,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 = ''; @@ -1138,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); @@ -1160,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 = ''; @@ -1187,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); @@ -1212,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 = ''; @@ -1244,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; @@ -1339,8 +1326,7 @@ if (empty($reshook)) } } - if ($error) - { + if ($error) { setEventMessages($langs->trans('ErrorsOnXLines', $error), null, 'errors'); } } @@ -1362,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')); @@ -1383,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) { @@ -1415,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; @@ -1477,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 @@ -1501,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)); @@ -1527,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 ''; @@ -1540,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(''); @@ -1551,9 +1554,11 @@ if ($action == 'create' && $usercancreate) // Reference client print ''; - else print ''; + } else { + print ''; + } print ''; // Thirdparty @@ -1568,15 +1573,15 @@ if ($action == 'create' && $usercancreate) print ''; // Ligne info remises tiers @@ -1615,7 +1621,7 @@ if ($action == 'create' && $usercancreate) print ''; print '\n"; print ''; @@ -1626,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 ''; @@ -1747,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 @@ -1793,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 '"; @@ -1864,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') { @@ -1875,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 .= '
'; @@ -1884,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), @@ -1911,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), @@ -1951,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), @@ -1982,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); } @@ -2000,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; @@ -2017,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 .= ''; @@ -2062,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 ''; @@ -1590,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("DateDeliveryPlanned").''; $date_delivery = ($date_delivery ? $date_delivery : $object->date_delivery); - print $form->selectDate($date_delivery ? $date_delivery : -1, 'date_delivery', 1, 1, 1); + print $form->selectDate($date_delivery ? $date_delivery : -1, 'liv_', 1, 1, 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').''; @@ -1666,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").''; @@ -1679,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); } @@ -1716,14 +1722,15 @@ 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); - print $form->selectarray('model', $liste, $conf->global->COMMANDE_ADDON_PDF); + $preselected = $conf->global->COMMANDE_ADDON_PDF; + print $form->selectarray('model', $liste, $preselected, 0, 0, 0, '', 0, 0, 0, '', '', 1); print "
'.$form->editfieldkey("Currency", 'multicurrency_code', '', $object, 0).''; @@ -1736,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 ''; } @@ -2306,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); @@ -2088,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); @@ -2106,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 ''; @@ -2127,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 ''; @@ -2149,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 { @@ -2160,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 { @@ -2181,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 { @@ -2195,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 { @@ -2204,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 { @@ -2220,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); @@ -2248,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 { @@ -2260,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 { @@ -2287,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); @@ -2321,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 { @@ -2343,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 ''; } @@ -2367,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 ''; @@ -2435,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); @@ -2482,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 @@ -2505,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").''; } @@ -2580,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 ''; } @@ -2602,8 +2595,7 @@ if ($action == 'create' && $usercancreate) $action = 'presend'; } - if ($action != 'presend') - { + if ($action != 'presend') { print '
'; print ''; // ancre // Documents @@ -2621,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..1bf3b97a040 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)); @@ -323,33 +333,33 @@ class Orders extends DolibarrApi } $request_data = (object) $request_data; $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, + '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 ); if ($updateRes > 0) { @@ -407,9 +417,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 +623,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 +991,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 4ededdeacaf..635e561eaef 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,13 +747,11 @@ 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) - { - $this->db->begin(); - if ($this->statut == self::STATUS_CLOSED) - { + if ($usercanclose) { + if ($this->statut == self::STATUS_CLOSED) { return 0; } + $this->db->begin(); $now = dol_now(); @@ -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=".$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; @@ -1824,6 +1843,8 @@ class Commande extends CommonOrder $this->project = null; // Clear if another value was already set by fetch_projet $this->statut = $obj->fk_statut; + $this->status = $obj->fk_statut; + $this->user_author_id = $obj->fk_user_author; $this->user_valid = $obj->fk_user_valid; $this->total_ht = $obj->total_ht; @@ -1885,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 @@ -1895,8 +1918,7 @@ class Commande extends CommonOrder // Lines $result = $this->fetch_lines(); - if ($result < 0) - { + if ($result < 0) { return -3; } return 1; @@ -1931,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; @@ -1961,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 { @@ -1974,6 +1992,7 @@ class Commande extends CommonOrder } } else { $this->error = $line->error; + $this->errors = $line->errors; $this->db->rollback(); return -2; } @@ -2008,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); @@ -2123,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; } @@ -2138,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; } @@ -2164,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; @@ -2191,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++; @@ -2237,15 +2265,17 @@ class Commande extends CommonOrder $sql .= ' FROM '.MAIN_DB_PREFIX.'expedition as e'; $sql .= ', '.MAIN_DB_PREFIX.'element_element as el'; $sql .= ' WHERE el.fk_source = '.$this->id; + $sql .= " AND el.sourcetype = 'commande'"; $sql .= " AND el.fk_target = e.rowid"; $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 @@ -2267,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++; @@ -2299,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; @@ -2323,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 { @@ -2360,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 @@ -2368,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); + } + + /** + * Applique une remise relative + * + * @param User $user User qui positionne la remise + * @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); } @@ -2434,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); } @@ -2500,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(); @@ -2512,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); } @@ -2576,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(); @@ -2588,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); } @@ -2650,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 = ".$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; @@ -2709,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); } @@ -2777,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); } @@ -2843,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); } @@ -2896,46 +2912,43 @@ class Commande extends CommonOrder * Classify the order as invoiced * * @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 + * @param int $notrigger 1=Does not execute triggers, 0=execute triggers + * @return int <0 if KO, 0 if already billed, >0 if OK */ public function classifyBilled(User $user, $notrigger = 0) { $error = 0; - $this->db->begin(); - if ($this->billed) - { + if ($this->billed) { return 0; } + $this->db->begin(); + $sql = 'UPDATE '.MAIN_DB_PREFIX.'commande SET facture = 1'; $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); } @@ -2952,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(); @@ -2965,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); } @@ -3037,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"); @@ -3060,7 +3089,9 @@ class Commande extends CommonOrder $pu = price2num($pu); $pa_ht = price2num($pa_ht); $pu_ht_devise = price2num($pu_ht_devise); - $txtva = price2num($txtva); + if (!preg_match('/\((.*)\)/', $txtva)) { + $txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5' + } $txlocaltax1 = price2num($txlocaltax1); $txlocaltax2 = price2num($txlocaltax2); @@ -3076,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. } @@ -3101,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); } @@ -3119,14 +3147,12 @@ 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; @@ -3143,8 +3169,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; } @@ -3159,8 +3184,8 @@ class Commande extends CommonOrder $this->line->tva_tx = $txtva; $this->line->localtax1_tx = $txlocaltax1; $this->line->localtax2_tx = $txlocaltax2; - $this->line->localtax1_type = $localtaxes_type[0]; - $this->line->localtax2_type = $localtaxes_type[2]; + $this->line->localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0]; + $this->line->localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2]; $this->line->remise_percent = $remise_percent; $this->line->subprice = $subprice; $this->line->info_bits = $info_bits; @@ -3198,10 +3223,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); @@ -3235,12 +3261,25 @@ 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 // Put here code to add control on parameters values @@ -3254,7 +3293,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").","; @@ -3265,14 +3304,16 @@ class Commande extends CommonOrder $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->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(); @@ -3282,28 +3323,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); } @@ -3336,13 +3374,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++; } @@ -3363,13 +3402,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 @@ -3456,8 +3499,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"; @@ -3465,11 +3507,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"); @@ -3479,8 +3522,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; @@ -3513,7 +3555,9 @@ class Commande extends CommonOrder $label = $langs->trans('OrderSource'.$this->source); - if ($label == 'OrderSource') return ''; + if ($label == 'OrderSource') { + return ''; + } return $label; } @@ -3544,7 +3588,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 = ''; @@ -3604,25 +3650,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 = ''; @@ -3632,7 +3689,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); } @@ -3651,10 +3708,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).'"'; } @@ -3672,15 +3727,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 .= ''; @@ -3709,30 +3766,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; @@ -3773,12 +3825,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]; @@ -3806,8 +3856,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; @@ -3815,8 +3864,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; @@ -3827,8 +3875,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'; @@ -3862,8 +3909,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"; @@ -3871,10 +3917,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); @@ -3919,7 +3963,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; @@ -3976,8 +4020,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; @@ -4081,10 +4128,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; @@ -4193,25 +4239,23 @@ class OrderLine extends CommonOrderLine 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 } @@ -4220,8 +4264,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); } @@ -4251,27 +4294,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; @@ -4279,7 +4350,9 @@ class OrderLine extends CommonOrderLine } // Check parameters - if ($this->product_type < 0) return -1; + if ($this->product_type < 0) { + return -1; + } $this->db->begin(); @@ -4335,25 +4408,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 } @@ -4362,8 +4433,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); } @@ -4392,30 +4462,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; @@ -4440,8 +4544,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).""; @@ -4456,7 +4559,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 @@ -4469,23 +4574,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 } @@ -4494,8 +4597,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); } @@ -4521,8 +4623,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"; @@ -4536,8 +4642,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..4f75ca3d4c5 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,25 +77,34 @@ $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) -{ +if ($socid > 0) { $sql .= " AND s.rowid = ".$socid; } $sql .= " AND c.fk_statut in (1, 2) AND c.facture = 0"; @@ -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 f95f61b6025..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 .= ' : '; @@ -181,7 +184,7 @@ if ($id > 0 || !empty($ref)) $permission = $user->rights->commande->creer; $permtoedit = $user->rights->commande->creer; $param = '&id='.$object->id.'&entity='.(!empty($object->entity) ? $object->entity : $conf->entity); - include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { dol_print_error($db); } 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 5fa4a3adfaa..db6bba130b1 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -46,7 +46,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; // Load translation files required by the page -$langs->loadLangs(array("orders", 'sendings', 'deliveries', 'companies', 'compta', 'bills', 'stocks')); +$langs->loadLangs(array("orders", 'sendings', 'deliveries', 'companies', 'compta', 'bills', 'stocks', 'products')); $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); @@ -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) $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("Supplier").' '.lcfirst($langs->trans("Customer")); + $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 ''; @@ -637,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']; @@ -683,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']; @@ -707,9 +726,8 @@ if (!empty($date_start) && !empty($date_stop)) // File link print ''; // Bank - if (!empty($conf->banque->enabled)) - { + if (!empty($conf->banque->enabled)) { print ''; + print '\n"; + print ''; // Number - if (!empty($conf->banque->enabled)) - { - // Number + if (!empty($conf->banque->enabled)) { print ''; print ''."\n"; + + // Check transmitter + print ''; + print ''; + + // Bank name + print ''; + print ''; } // Accountancy account @@ -408,7 +460,7 @@ if ($action == 'create') // Subledger account if (!empty($conf->accounting->enabled)) { - print ''; + print ''; print ''; // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); // Associated project @@ -477,35 +528,36 @@ if ($action == 'create') /* */ /* ************************************************************************** */ -if ($id) -{ +if ($id) { $alreadyaccounted = $object->getVentilExportCompta(); $head = various_payment_prepare_head($object); // Clone confirmation - if ($action === 'clone') - { + if ($action === 'clone') { + $set_value_help = $form->textwithpicto('', $langs->trans($langs->trans("AccountingDirectionHelp"))); + $sensarray = array('0' => $langs->trans("Debit"), '1' => $langs->trans("Credit")); + $formquestion = array( array('type' => 'text', 'name' => 'clone_label', 'label' => $langs->trans("Label"), 'value' => $langs->trans("CopyOf").' '.$object->label), + array('type' => 'date', 'tdclass'=>'fieldrequired', 'name' => 'clone_date_payment', 'label' => $langs->trans("DatePayment"), 'value' => -1), + array('type' => 'date', 'name' => 'clone_date_value', 'label' => $langs->trans("DateValue"), 'value' => -1), + array('type' => 'other', 'tdclass'=>'fieldrequired', 'name' => 'clone_accountid', 'label' => $langs->trans("BankAccount"), 'value' => $form->select_comptes($object->fk_account, "accountid", 0, '', 1, '', 0, 'minwidth200', 1)), + array('type' => 'text', 'name' => 'clone_amount', 'label' => $langs->trans("Amount"), 'value' => price($object->amount)), + array('type' => 'select', 'name' => 'clone_sens', 'label' => $langs->trans("Sens") . ' ' . $set_value_help, 'values' => $sensarray, 'default' => $object->sens), ); - $formquestion[] = array('type' => 'date', 'tdclass'=>'fieldrequired', 'name' => 'clone_date_payment', 'label' => $langs->trans("DatePayment"), 'value' => -1); - $formquestion[] = array('type' => 'date', 'name' => 'clone_date_value', 'label' => $langs->trans("DateValue"), 'value' => -1); - $formquestion[] = array('type' => 'other', 'tdclass'=>'fieldrequired', 'name' => 'accountid', 'label' => $langs->trans("BankAccount"), 'value' => $form->select_comptes($accountid, "accountid", 0, '', 1)); - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneVariousPayment', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 300); + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneVariousPayment', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 350); } print dol_get_fiche_head($head, 'card', $langs->trans("VariousPayment"), -1, $object->picto); $morehtmlref = '
'; // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project').' '; - if ($user->rights->banque->modifier) - { + if ($user->rights->banque->modifier) { if ($action != 'classify') { $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; } @@ -555,7 +607,11 @@ if ($id) print ''; // Debit / Credit - if ($object->sens == '1') $sens = $langs->trans("Credit"); else $sens = $langs->trans("Debit"); + if ($object->sens == '1') { + $sens = $langs->trans("Credit"); + } else { + $sens = $langs->trans("Debit"); + } print '
'; print ''; @@ -564,8 +620,7 @@ if ($id) print ''; - if (!empty($conf->banque->enabled)) - { - if ($object->fk_account > 0) - { + if (!empty($conf->banque->enabled)) { + if ($object->fk_account > 0) { $bankline = new AccountLine($db); $bankline->fetch($object->fk_bank); @@ -612,7 +665,7 @@ if ($id) /* - * Action buttons + * Action bar */ print '
'."\n"; @@ -620,16 +673,13 @@ if ($id) // Add button modify // Clone - if ($user->rights->banque->modifier) - { + if ($user->rights->banque->modifier) { print '"; } // Delete - if (empty($object->rappro)) - { - if (!empty($user->rights->banque->modifier)) - { + if (empty($object->rappro)) { + if (!empty($user->rights->banque->modifier)) { if ($alreadyaccounted) { print ''; } else { diff --git a/htdocs/compta/bank/various_payment/document.php b/htdocs/compta/bank/various_payment/document.php index 14187bf51e3..ce793f7e6ee 100644 --- a/htdocs/compta/bank/various_payment/document.php +++ b/htdocs/compta/bank/various_payment/document.php @@ -39,7 +39,9 @@ $confirm = GETPOST('confirm', 'alpha'); // Security check $socid = GETPOST("socid", "int"); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'banque', '', '', ''); // Get parameters @@ -47,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 (!$sortorder) $sortorder = "ASC"; -if (!$sortfield) $sortfield = "name"; +if (!$sortorder) { + $sortorder = "ASC"; +} +if (!$sortfield) { + $sortfield = "name"; +} $object = new PaymentVarious($db); @@ -66,7 +74,7 @@ $modulepart = 'banque'; * Actions */ -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* @@ -79,20 +87,17 @@ $title = $langs->trans("VariousPayment").' - '.$langs->trans("Documents"); $help_url = ''; llxHeader("", $title, $help_url); -if ($object->id) -{ +if ($object->id) { $head = various_payment_prepare_head($object); print dol_get_fiche_head($head, 'documents', $langs->trans("VariousPayment"), -1, $object->picto); $morehtmlref = '
'; // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project').' : '; - if ($user->rights->banque->modifier && 0) - { + if ($user->rights->banque->modifier && 0) { if ($action != 'classify') { $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; } @@ -128,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']; } @@ -148,7 +152,7 @@ if ($object->id) $modulepart = 'banque'; $permission = $user->rights->banque->modifier; $param = '&id='.$object->id; - include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/compta/bank/various_payment/info.php b/htdocs/compta/bank/various_payment/info.php index 5d401ede3c1..b173426e179 100644 --- a/htdocs/compta/bank/various_payment/info.php +++ b/htdocs/compta/bank/various_payment/info.php @@ -35,7 +35,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, 'banque', '', '', ''); /* @@ -55,12 +57,10 @@ print dol_get_fiche_head($head, 'info', $langs->trans("VariousPayment"), -1, $ob $morehtmlref = '
'; // Project -if (!empty($conf->projet->enabled)) -{ +if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= $langs->trans('Project').' : '; - if ($user->rights->banque->modifier && 0) - { + if ($user->rights->banque->modifier && 0) { if ($action != 'classify') { $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; } diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php index 48da6483152..dcc1f4aef97 100644 --- a/htdocs/compta/bank/various_payment/list.php +++ b/htdocs/compta/bank/various_payment/list.php @@ -37,7 +37,9 @@ $langs->loadLangs(array("compta", "banks", "bills", "accountancy")); // Security check $socid = GETPOST("socid", "int"); -if ($user->socid) $socid = $user->socid; +if ($user->socid) { + $socid = $user->socid; +} $result = restrictedArea($user, 'banque', '', '', ''); $optioncss = GETPOST('optioncss', 'alpha'); @@ -55,37 +57,58 @@ $search_amount_cred = GETPOST('search_amount_cred', 'alpha'); $search_bank_account = GETPOST('search_account', 'int'); $search_bank_entry = GETPOST('search_bank_entry', 'int'); $search_accountancy_account = GETPOST("search_accountancy_account"); -if ($search_accountancy_account == - 1) $search_accountancy_account = ''; +if ($search_accountancy_account == - 1) { + $search_accountancy_account = ''; +} $search_accountancy_subledger = GETPOST("search_accountancy_subledger"); -if ($search_accountancy_subledger == - 1) $search_accountancy_subledger = ''; +if ($search_accountancy_subledger == - 1) { + $search_accountancy_subledger = ''; +} +if (empty($search_datep_start)) { + $search_datep_start = GETPOST("search_datep_start", 'int'); +} +if (empty($search_datep_end)) { + $search_datep_end = GETPOST("search_datep_end", 'int'); +} +if (empty($search_datev_start)) { + $search_datev_start = GETPOST("search_datev_start", 'int'); +} +if (empty($search_datev_end)) { + $search_datev_end = GETPOST("search_datev_end", 'int'); +} $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 = "v.datep,v.rowid"; -if (!$sortorder) $sortorder = "DESC,DESC"; +if (!$sortfield) { + $sortfield = "v.datep,v.rowid"; +} +if (!$sortorder) { + $sortorder = "DESC,DESC"; +} $filtre = GETPOST("filtre", 'alpha'); -if (!GETPOST('typeid')) -{ +if (!GETPOST('typeid')) { $newfiltre = str_replace('filtre=', '', $filtre); $filterarray = explode('-', $newfiltre); - foreach ($filterarray as $val) - { + foreach ($filterarray as $val) { $part = explode(':', $val); - if ($part[0] == 'v.fk_typepayment') $typeid = $part[1]; + if ($part[0] == 'v.fk_typepayment') { + $typeid = $part[1]; + } } } else { $typeid = GETPOST('typeid'); } -if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All test are required to be compatible with all browsers -{ +if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All test are required to be compatible with all browsers $search_ref = ''; $search_label = ''; $search_datep_start = ''; @@ -156,7 +179,9 @@ $arrayfields = dol_sort_array($arrayfields, 'position'); $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 @@ -168,13 +193,27 @@ if (empty($reshook)) { */ $form = new Form($db); -if ($arrayfields['account']['checked'] || $arrayfields['subledger']['checked']) $formaccounting = new FormAccounting($db); -if ($arrayfields['bank']['checked'] && !empty($conf->accounting->enabled)) $accountingjournal = new AccountingJournal($db); -if ($arrayfields['ref']['checked']) $variousstatic = new PaymentVarious($db); -if ($arrayfields['bank']['checked']) $accountstatic = new Account($db); -if ($arrayfields['project']['checked']) $proj = new Project($db); -if ($arrayfields['entry']['checked']) $bankline = new AccountLine($db); -if ($arrayfields['account']['checked']) $accountingaccount = new AccountingAccount($db); +if ($arrayfields['account']['checked'] || $arrayfields['subledger']['checked']) { + $formaccounting = new FormAccounting($db); +} +if ($arrayfields['bank']['checked'] && !empty($conf->accounting->enabled)) { + $accountingjournal = new AccountingJournal($db); +} +if ($arrayfields['ref']['checked']) { + $variousstatic = new PaymentVarious($db); +} +if ($arrayfields['bank']['checked']) { + $accountstatic = new Account($db); +} +if ($arrayfields['project']['checked']) { + $proj = new Project($db); +} +if ($arrayfields['entry']['checked']) { + $bankline = new AccountLine($db); +} +if ($arrayfields['account']['checked']) { + $accountingaccount = new AccountingAccount($db); +} $sql = "SELECT v.rowid, v.sens, v.amount, v.label, v.datep as datep, v.datev as datev, v.fk_typepayment as type, v.num_payment, v.fk_bank, v.accountancy_code, v.subledger_account, v.fk_projet as fk_project,"; $sql .= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number as bank_account_number, ba.fk_accountancy_journal as accountancy_journal, ba.label as blabel,"; @@ -186,43 +225,64 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.ro $sql .= " WHERE v.entity IN (".getEntity('payment_various').")"; // Search criteria -if ($search_ref) $sql .= " AND v.rowid=".$db->escape($search_ref); -if ($search_label) $sql .= natural_search(array('v.label'), $search_label); -if ($search_datep_start) $sql .= " AND v.datep >= '".$db->idate($search_datep_start)."'"; -if ($search_datep_end) $sql .= " AND v.datep <= '".$db->idate($search_datep_end)."'"; -if ($search_datev_start) $sql .= " AND v.datev >= '".$db->idate($search_datev_start)."'"; -if ($search_datev_end) $sql .= " AND v.datev <= '".$db->idate($search_datev_end)."'"; -if ($search_amount_deb) $sql .= natural_search("v.amount", $search_amount_deb, 1); -if ($search_amount_cred) $sql .= natural_search("v.amount", $search_amount_cred, 1); -if ($search_bank_account > 0) $sql .= " AND b.fk_account=".$db->escape($search_bank_account); -if ($search_bank_entry > 0) $sql .= " AND b.fk_account=".$db->escape($search_bank_account); -if ($search_accountancy_account > 0) $sql .= " AND v.accountancy_code=".$db->escape($search_accountancy_account); -if ($search_accountancy_subledger > 0) $sql .= " AND v.subledger_account=".$db->escape($search_accountancy_subledger); -if ($typeid > 0) $sql .= " AND v.fk_typepayment=".$typeid; -if ($filtre) { - $filtre = str_replace(":", "=", $filtre); - $sql .= " AND ".$filtre; +if ($search_ref) { + $sql .= " AND v.rowid=".$db->escape($search_ref); +} +if ($search_label) { + $sql .= natural_search(array('v.label'), $search_label); +} +if ($search_datep_start) { + $sql .= " AND v.datep >= '".$db->idate($search_datep_start)."'"; +} +if ($search_datep_end) { + $sql .= " AND v.datep <= '".$db->idate($search_datep_end)."'"; +} +if ($search_datev_start) { + $sql .= " AND v.datev >= '".$db->idate($search_datev_start)."'"; +} +if ($search_datev_end) { + $sql .= " AND v.datev <= '".$db->idate($search_datev_end)."'"; +} +if ($search_amount_deb) { + $sql .= natural_search("v.amount", $search_amount_deb, 1); +} +if ($search_amount_cred) { + $sql .= natural_search("v.amount", $search_amount_cred, 1); +} +if ($search_bank_account > 0) { + $sql .= " AND b.fk_account=".$db->escape($search_bank_account); +} +if ($search_bank_entry > 0) { + $sql .= " AND b.fk_account=".$db->escape($search_bank_account); +} +if ($search_accountancy_account > 0) { + $sql .= " AND v.accountancy_code=".$db->escape($search_accountancy_account); +} +if ($search_accountancy_subledger > 0) { + $sql .= " AND v.subledger_account=".$db->escape($search_accountancy_subledger); +} +if ($typeid > 0) { + $sql .= " AND v.fk_typepayment=".$typeid; +} +if ($search_all) { + $sql .= natural_search(array_keys($fieldstosearchall), $search_all); } -if ($search_all) $sql .= natural_search(array_keys($fieldstosearchall), $search_all); $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); $result = $db->query($sql); -if ($result) -{ +if ($result) { $num = $db->num_rows($result); // Direct jump if only one record found - if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) - { + if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) { $obj = $db->fetch_object($result); $id = $obj->rowid; header("Location: ".DOL_URL_ROOT.'/compta/bank/various_payment/card.php?id='.$id); @@ -236,30 +296,64 @@ if ($result) $total = 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_datep_start) $param .= '&search_datep_start='.urlencode($search_datep_start); - if ($search_datep_end) $param .= '&search_datep_end='.urlencode($search_datep_end); - if ($search_datev_start) $param .= '&search_datev_start='.urlencode($search_datev_start); - if ($search_datev_end) $param .= '&search_datev_end='.urlencode($search_datev_end); - if ($typeid > 0) $param .= '&typeid='.urlencode($typeid); - if ($search_amount_deb) $param .= '&search_amount_deb='.urlencode($search_amount_deb); - if ($search_amount_cred) $param .= '&search_amount_cred='.urlencode($search_amount_cred); - if ($search_bank_account > 0) $param .= '&search_amount='.urlencode($search_bank_account); - if ($search_accountancy_account > 0) $param .= '&search_accountancy_account='.urlencode($search_accountancy_account); - if ($search_accountancy_subledger > 0) $param .= '&search_accountancy_subledger='.urlencode($search_accountancy_subledger); + if (!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_datep_start) { + $param .= '&search_datep_start='.urlencode($search_datep_start); + } + if ($search_datep_end) { + $param .= '&search_datep_end='.urlencode($search_datep_end); + } + if ($search_datev_start) { + $param .= '&search_datev_start='.urlencode($search_datev_start); + } + if ($search_datev_end) { + $param .= '&search_datev_end='.urlencode($search_datev_end); + } + if ($typeid > 0) { + $param .= '&typeid='.urlencode($typeid); + } + if ($search_amount_deb) { + $param .= '&search_amount_deb='.urlencode($search_amount_deb); + } + if ($search_amount_cred) { + $param .= '&search_amount_cred='.urlencode($search_amount_cred); + } + if ($search_bank_account > 0) { + $param .= '&search_account='.urlencode($search_bank_account); + } + if ($search_accountancy_account > 0) { + $param .= '&search_accountancy_account='.urlencode($search_accountancy_account); + } + if ($search_accountancy_subledger > 0) { + $param .= '&search_accountancy_subledger='.urlencode($search_accountancy_subledger); + } - if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); + if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); + } $url = DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create'; - if (!empty($socid)) $url .= '&socid='.$socid; + if (!empty($socid)) { + $url .= '&socid='.$socid; + } $newcardbutton = dolGetButtonTitle($langs->trans('MenuNewVariousPayment'), '', 'fa fa-plus-circle', $url, '', $user->rights->banque->modifier); print ''; - if ($optioncss != '') print ''; + if ($optioncss != '') { + print ''; + } print ''; print ''; print ''; @@ -269,9 +363,10 @@ if ($result) print_barre_liste($langs->trans("MenuVariousPayment"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'object_payment', 0, $newcardbutton, '', $limit, 0, 0, 1); - if ($search_all) - { - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + if ($search_all) { + foreach ($fieldstosearchall as $key => $val) { + $fieldstosearchall[$key] = $langs->trans($val); + } print '
'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'
'; } @@ -395,20 +490,46 @@ if ($result) print '
'; - if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) print_liste_field_titre('#', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder); + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) { + print_liste_field_titre('#', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder); + } - if ($arrayfields['ref']['checked']) print_liste_field_titre($arrayfields['ref']['label'], $_SERVER["PHP_SELF"], 'v.rowid', '', $param, '', $sortfield, $sortorder); - if ($arrayfields['label']['checked']) print_liste_field_titre($arrayfields['label']['label'], $_SERVER["PHP_SELF"], 'v.label', '', $param, '', $sortfield, $sortorder, 'left '); - if ($arrayfields['datep']['checked']) print_liste_field_titre($arrayfields['datep']['label'], $_SERVER["PHP_SELF"], 'v.datep,v.rowid', '', $param, '', $sortfield, $sortorder, 'center '); - if ($arrayfields['datev']['checked']) print_liste_field_titre($arrayfields['datev']['label'], $_SERVER["PHP_SELF"], 'v.datev,v.rowid', '', $param, '', $sortfield, $sortorder, 'center '); - if ($arrayfields['type']['checked']) print_liste_field_titre($arrayfields['type']['label'], $_SERVER["PHP_SELF"], 'type', '', $param, '', $sortfield, $sortorder, 'left '); - if ($arrayfields['project']['checked']) print_liste_field_titre($arrayfields['project']['label'], $_SERVER["PHP_SELF"], 'fk_project', '', $param, '', $sortfield, $sortorder); - if ($arrayfields['bank']['checked']) print_liste_field_titre($arrayfields['bank']['label'], $_SERVER["PHP_SELF"], 'ba.label', '', $param, '', $sortfield, $sortorder); - if ($arrayfields['entry']['checked']) print_liste_field_titre($arrayfields['entry']['label'], $_SERVER["PHP_SELF"], 'ba.label', '', $param, '', $sortfield, $sortorder); - if ($arrayfields['account']['checked']) print_liste_field_titre($arrayfields['account']['label'], $_SERVER["PHP_SELF"], 'v.accountancy_code', '', $param, '', $sortfield, $sortorder, 'left '); - if ($arrayfields['subledger']['checked']) print_liste_field_titre($arrayfields['subledger']['label'], $_SERVER["PHP_SELF"], 'v.subledger_account', '', $param, '', $sortfield, $sortorder, 'left '); - if ($arrayfields['debit']['checked']) print_liste_field_titre($arrayfields['debit']['label'], $_SERVER["PHP_SELF"], 'v.amount', '', $param, '', $sortfield, $sortorder, 'right '); - if ($arrayfields['credit']['checked']) print_liste_field_titre($arrayfields['credit']['label'], $_SERVER["PHP_SELF"], 'v.amount', '', $param, '', $sortfield, $sortorder, 'right '); + if ($arrayfields['ref']['checked']) { + print_liste_field_titre($arrayfields['ref']['label'], $_SERVER["PHP_SELF"], 'v.rowid', '', $param, '', $sortfield, $sortorder); + } + if ($arrayfields['label']['checked']) { + print_liste_field_titre($arrayfields['label']['label'], $_SERVER["PHP_SELF"], 'v.label', '', $param, '', $sortfield, $sortorder, 'left '); + } + if ($arrayfields['datep']['checked']) { + print_liste_field_titre($arrayfields['datep']['label'], $_SERVER["PHP_SELF"], 'v.datep,v.rowid', '', $param, '', $sortfield, $sortorder, 'center '); + } + if ($arrayfields['datev']['checked']) { + print_liste_field_titre($arrayfields['datev']['label'], $_SERVER["PHP_SELF"], 'v.datev,v.rowid', '', $param, '', $sortfield, $sortorder, 'center '); + } + if ($arrayfields['type']['checked']) { + print_liste_field_titre($arrayfields['type']['label'], $_SERVER["PHP_SELF"], 'type', '', $param, '', $sortfield, $sortorder, 'left '); + } + if ($arrayfields['project']['checked']) { + print_liste_field_titre($arrayfields['project']['label'], $_SERVER["PHP_SELF"], 'fk_project', '', $param, '', $sortfield, $sortorder); + } + if ($arrayfields['bank']['checked']) { + print_liste_field_titre($arrayfields['bank']['label'], $_SERVER["PHP_SELF"], 'ba.label', '', $param, '', $sortfield, $sortorder); + } + if ($arrayfields['entry']['checked']) { + print_liste_field_titre($arrayfields['entry']['label'], $_SERVER["PHP_SELF"], 'ba.label', '', $param, '', $sortfield, $sortorder); + } + if ($arrayfields['account']['checked']) { + print_liste_field_titre($arrayfields['account']['label'], $_SERVER["PHP_SELF"], 'v.accountancy_code', '', $param, '', $sortfield, $sortorder, 'left '); + } + if ($arrayfields['subledger']['checked']) { + print_liste_field_titre($arrayfields['subledger']['label'], $_SERVER["PHP_SELF"], 'v.subledger_account', '', $param, '', $sortfield, $sortorder, 'left '); + } + if ($arrayfields['debit']['checked']) { + print_liste_field_titre($arrayfields['debit']['label'], $_SERVER["PHP_SELF"], 'v.amount', '', $param, '', $sortfield, $sortorder, 'right '); + } + if ($arrayfields['credit']['checked']) { + print_liste_field_titre($arrayfields['credit']['label'], $_SERVER["PHP_SELF"], 'v.amount', '', $param, '', $sortfield, $sortorder, 'right '); + } // Fields from hook $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); @@ -420,10 +541,13 @@ if ($result) $totalarray = array(); - while ($i < min($num, $limit)) - { + while ($i < min($num, $limit)) { $obj = $db->fetch_object($result); + $variousstatic->id = $obj->rowid; + $variousstatic->ref = $obj->rowid; + $variousstatic->label = $obj->label; + print ''; // No @@ -433,49 +557,68 @@ if ($result) // Ref if ($arrayfields['ref']['checked']) { - $variousstatic->id = $obj->rowid; - $variousstatic->ref = $obj->rowid; - print ""; - if (!$i) $totalarray['nbfield']++; + print '"; + if (!$i) { + $totalarray['nbfield']++; + } } // Label payment if ($arrayfields['label']['checked']) { - print ""; - if (!$i) $totalarray['nbfield']++; + print '"; + if (!$i) { + $totalarray['nbfield']++; + } } // Date payment if ($arrayfields['datep']['checked']) { print '"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Date value if ($arrayfields['datev']['checked']) { print '"; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Type if ($arrayfields['type']['checked']) { - print ''; - if (!$i) $totalarray['nbfield']++; + print ''; + if (!$i) { + $totalarray['nbfield']++; + } } // Project if ($arrayfields['project']['checked']) { - $proj->fetch($obj->fk_project); - print ''; - if (!$i) $totalarray['nbfield']++; + print ''; + if (!$i) { + $totalarray['nbfield']++; + } } // Bank account if ($arrayfields['bank']['checked']) { - print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Bank entry if ($arrayfields['entry']['checked']) { $bankline->fetch($obj->fk_bank); print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Accounting account @@ -507,44 +654,56 @@ if ($result) $accountingaccount->fetch('', $obj->accountancy_code, 1); print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Accounting subledger account if ($arrayfields['subledger']['checked']) { print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Debit if ($arrayfields['debit']['checked']) { print ''; } // Credit if ($arrayfields['credit']['checked']) { print ''; } print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print ""; diff --git a/htdocs/compta/cashcontrol/cashcontrol_card.php b/htdocs/compta/cashcontrol/cashcontrol_card.php index ad88e928b6b..26949590334 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_card.php +++ b/htdocs/compta/cashcontrol/cashcontrol_card.php @@ -49,30 +49,33 @@ $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 = 'rowid'; -if (!$sortorder) $sortorder = 'ASC'; +if (!$sortfield) { + $sortfield = 'rowid'; +} +if (!$sortorder) { + $sortorder = 'ASC'; +} $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'thirdpartylist'; -if ($contextpage == 'takepos') -{ +if ($contextpage == 'takepos') { $_GET['optioncss'] = 'print'; } -// Security check -if (!$user->rights->cashdesk->run && !$user->rights->takepos->run) -{ - accessforbidden(); -} - $arrayofpaymentmode = array('cash'=>'Cash', 'cheque'=>'Cheque', 'card'=>'CreditCard'); $arrayofposavailable = array(); -if (!empty($conf->cashdesk->enabled)) $arrayofposavailable['cashdesk'] = $langs->trans('CashDesk').' (cashdesk)'; -if (!empty($conf->takepos->enabled)) $arrayofposavailable['takepos'] = $langs->trans('TakePOS').' (takepos)'; +if (!empty($conf->cashdesk->enabled)) { + $arrayofposavailable['cashdesk'] = $langs->trans('CashDesk').' (cashdesk)'; +} +if (!empty($conf->takepos->enabled)) { + $arrayofposavailable['takepos'] = $langs->trans('TakePOS').' (takepos)'; +} // TODO Add hook here to allow other POS to add themself $object = new CashControl($db); @@ -87,6 +90,15 @@ $hookmanager->initHooks(array('cashcontrolcard', 'globalcard')); // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. +// Security check +if ($user->socid > 0) { // Protection if external user + //$socid = $user->socid; + accessforbidden(); +} +if (!$user->rights->cashdesk->run && !$user->rights->takepos->run) { + accessforbidden(); +} + /* * Actions @@ -94,18 +106,18 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ $permissiontoadd = ($user->rights->cashdesk->run || $user->rights->takepos->run); $permissiontodelete = ($user->rights->cashdesk->run || $user->rights->takepos->run) || ($permissiontoadd && $object->status == 0); -if (empty($backtopage)) $backtopage = dol_buildpath('/compta/cashcontrol/cashcontrol_card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); +if (empty($backtopage)) { + $backtopage = dol_buildpath('/compta/cashcontrol/cashcontrol_card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); +} $backurlforlist = dol_buildpath('/compta/cashcontrol/cashcontrol_list.php', 1); $triggermodname = 'CACHCONTROL_MODIFY'; // Name of trigger action code to execute when we modify record -if (empty($conf->global->CASHDESK_ID_BANKACCOUNT_CASH) && empty($conf->global->CASHDESK_ID_BANKACCOUNT_CASH1)) -{ +if (empty($conf->global->CASHDESK_ID_BANKACCOUNT_CASH) && empty($conf->global->CASHDESK_ID_BANKACCOUNT_CASH1)) { setEventMessages($langs->trans("CashDesk")." - ".$langs->trans("NotConfigured"), null, 'errors'); } -if (GETPOST('cancel', 'alpha')) -{ +if (GETPOST('cancel', 'alpha')) { if ($action == 'valid') { $action = 'view'; } else { @@ -113,8 +125,7 @@ if (GETPOST('cancel', 'alpha')) } } -if ($action == "reopen") -{ +if ($action == "reopen") { $result = $object->setStatut($object::STATUS_DRAFT, null, '', 'CASHFENCE_REOPEN'); if ($result < 0) { dol_print_error($db, $object->error, $object->error); @@ -123,43 +134,35 @@ if ($action == "reopen") $action = 'view'; } -if ($action == "start") -{ +if ($action == "start") { $error = 0; - if (!GETPOST('posmodule', 'alpha') || GETPOST('posmodule', 'alpha') == '-1') - { + if (!GETPOST('posmodule', 'alpha') || GETPOST('posmodule', 'alpha') == '-1') { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Module")), null, 'errors'); $action = 'create'; $error++; } - if (GETPOST('posnumber', 'alpha') == '') - { + if (GETPOST('posnumber', 'alpha') == '') { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CashDesk")), null, 'errors'); $action = 'create'; $error++; } - if (!GETPOST('closeyear', 'alpha') || GETPOST('closeyear', 'alpha') == '-1') - { + if (!GETPOST('closeyear', 'alpha') || GETPOST('closeyear', 'alpha') == '-1') { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Year")), null, 'errors'); $action = 'create'; $error++; } -} elseif ($action == "add") -{ - if (GETPOST('opening', 'alpha') == '') - { +} elseif ($action == "add") { + if (GETPOST('opening', 'alpha') == '') { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("InitialBankBalance")), null, 'errors'); $action = 'start'; $error++; } $error = 0; - foreach ($arrayofpaymentmode as $key=>$val) - { + foreach ($arrayofpaymentmode as $key => $val) { $object->$key = price2num(GETPOST($key.'_amount', 'alpha')); } - if (!$error) - { + if (!$error) { $object->day_close = GETPOST('closeday', 'int'); $object->month_close = GETPOST('closemonth', 'int'); $object->year_close = GETPOST('closeyear', 'int'); @@ -172,8 +175,7 @@ if ($action == "start") $id = $object->create($user); - if ($id > 0) - { + if ($id > 0) { $db->commit(); $action = "view"; } else { @@ -190,8 +192,7 @@ if ($action == "start") } } -if ($action == "valid") // validate = close -{ +if ($action == "valid") { // validate = close $object->fetch($id); $db->begin(); @@ -210,8 +211,7 @@ if ($action == "valid") // validate = close $result = $object->valid($user); - if ($result <= 0) - { + if ($result <= 0) { setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); } else { @@ -230,27 +230,27 @@ if ($action == "valid") // validate = close } // Action to delete -if ($action == 'confirm_delete' && !empty($permissiontodelete)) -{ +if ($action == 'confirm_delete' && !empty($permissiontodelete)) { $object->fetch($id); - if (!($object->id > 0)) - { + if (!($object->id > 0)) { dol_print_error('', 'Error, object must be fetched before being deleted'); exit; } $result = $object->delete($user); //var_dump($result); - 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'); + } } } @@ -265,8 +265,7 @@ $initialbalanceforterminal = array(); $theoricalamountforterminal = array(); $theoricalnbofinvoiceforterminal = array(); -if ($action == "create" || $action == "start" || $action == 'close') -{ +if ($action == "create" || $action == "start" || $action == 'close') { if ($action == 'close') { $posmodule = $object->posmodule; $terminalid = $object->posnumber; @@ -275,13 +274,14 @@ if ($action == "create" || $action == "start" || $action == 'close') $syear = $object->year_close; $smonth = $object->month_close; $sday = $object->day_close; - } elseif (GETPOST('posnumber', 'alpha') != '' && GETPOST('posnumber', 'alpha') != '' && GETPOST('posnumber', 'alpha') != '-1') - { + } elseif (GETPOST('posnumber', 'alpha') != '' && GETPOST('posnumber', 'alpha') != '' && GETPOST('posnumber', 'alpha') != '-1') { $posmodule = GETPOST('posmodule', 'alpha'); $terminalid = GETPOST('posnumber', 'alpha'); $terminaltouse = $terminalid; - if ($terminaltouse == '1' && $posmodule == 'cashdesk') $terminaltouse = ''; + if ($terminaltouse == '1' && $posmodule == 'cashdesk') { + $terminaltouse = ''; + } if ($posmodule == 'cashdesk' && $terminaltouse != '' && $terminaltouse != '1') { $terminaltouse = ''; @@ -290,13 +290,10 @@ if ($action == "create" || $action == "start" || $action == 'close') } } - if ($terminalid != '') - { + if ($terminalid != '') { // Calculate $initialbalanceforterminal for terminal 0 - foreach ($arrayofpaymentmode as $key => $val) - { - if ($key != 'cash') - { + foreach ($arrayofpaymentmode as $key => $val) { + if ($key != 'cash') { $initialbalanceforterminal[$terminalid][$key] = 0; continue; } @@ -305,21 +302,28 @@ if ($action == "create" || $action == "start" || $action == 'close') $vartouse = 'CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse; $bankid = $conf->global->$vartouse; - if ($bankid > 0) - { + if ($bankid > 0) { $sql = "SELECT SUM(amount) as total FROM ".MAIN_DB_PREFIX."bank"; - $sql .= " WHERE fk_account = ".$bankid; - if ($syear && !$smonth) $sql .= " AND dateo < '".$db->idate(dol_get_first_day($syear, 1))."'"; - elseif ($syear && $smonth && !$sday) $sql .= " AND dateo < '".$db->idate(dol_get_first_day($syear, $smonth))."'"; - elseif ($syear && $smonth && $sday) $sql .= " AND dateo < '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."'"; - else dol_print_error('', 'Year not defined'); + $sql .= " WHERE fk_account = ".((int) $bankid); + if ($syear && !$smonth) { + $sql .= " AND dateo < '".$db->idate(dol_get_first_day($syear, 1))."'"; + } elseif ($syear && $smonth && !$sday) { + $sql .= " AND dateo < '".$db->idate(dol_get_first_day($syear, $smonth))."'"; + } elseif ($syear && $smonth && $sday) { + $sql .= " AND dateo < '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."'"; + } else { + dol_print_error('', 'Year not defined'); + } $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj) $initialbalanceforterminal[$terminalid][$key] = $obj->total; - } else dol_print_error($db); + if ($obj) { + $initialbalanceforterminal[$terminalid][$key] = $obj->total; + } + } else { + dol_print_error($db); + } } else { setEventMessages($langs->trans("SetupOfTerminalNotComplete", $terminaltouse), null, 'errors'); $error++; @@ -327,8 +331,7 @@ if ($action == "create" || $action == "start" || $action == 'close') } // Calculate $theoricalamountforterminal - foreach ($arrayofpaymentmode as $key => $val) - { + foreach ($arrayofpaymentmode as $key => $val) { $sql = "SELECT SUM(pf.amount) as total, COUNT(*) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."paiement_facture as pf, ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."paiement as p, ".MAIN_DB_PREFIX."c_paiement as cp"; $sql .= " WHERE pf.fk_facture = f.rowid AND p.rowid = pf.fk_paiement AND cp.id = p.fk_paiement"; @@ -336,47 +339,55 @@ if ($action == "create" || $action == "start" || $action == 'close') $sql .= " AND f.pos_source = '".$db->escape($terminalid)."'"; $sql .= " AND f.paye = 1"; $sql .= " AND p.entity IN (".getEntity('facture').")"; - if ($key == 'cash') $sql .= " AND cp.code = 'LIQ'"; - elseif ($key == 'cheque') $sql .= " AND cp.code = 'CHQ'"; - elseif ($key == 'card') $sql .= " AND cp.code = 'CB'"; - else { + if ($key == 'cash') { + $sql .= " AND cp.code = 'LIQ'"; + } elseif ($key == 'cheque') { + $sql .= " AND cp.code = 'CHQ'"; + } elseif ($key == 'card') { + $sql .= " AND cp.code = 'CB'"; + } else { dol_print_error('Value for key = '.$key.' not supported'); exit; } - if ($syear && !$smonth) $sql .= " AND datef BETWEEN '".$db->idate(dol_get_first_day($syear, 1))."' AND '".$db->idate(dol_get_last_day($syear, 12))."'"; - elseif ($syear && $smonth && !$sday) $sql .= " AND datef BETWEEN '".$db->idate(dol_get_first_day($syear, $smonth))."' AND '".$db->idate(dol_get_last_day($syear, $smonth))."'"; - elseif ($syear && $smonth && $sday) $sql .= " AND datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $smonth, $sday, $syear))."'"; - else dol_print_error('', 'Year not defined'); + if ($syear && !$smonth) { + $sql .= " AND datef BETWEEN '".$db->idate(dol_get_first_day($syear, 1))."' AND '".$db->idate(dol_get_last_day($syear, 12))."'"; + } elseif ($syear && $smonth && !$sday) { + $sql .= " AND datef BETWEEN '".$db->idate(dol_get_first_day($syear, $smonth))."' AND '".$db->idate(dol_get_last_day($syear, $smonth))."'"; + } elseif ($syear && $smonth && $sday) { + $sql .= " AND datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $smonth, $sday, $syear))."'"; + } else { + dol_print_error('', 'Year not defined'); + } $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $theoricalamountforterminal[$terminalid][$key] = $initialbalanceforterminal[$terminalid][$key]; $obj = $db->fetch_object($resql); - if ($obj) - { + if ($obj) { $theoricalamountforterminal[$terminalid][$key] = price2num($theoricalamountforterminal[$terminalid][$key] + $obj->total); $theoricalnbofinvoiceforterminal[$terminalid][$key] = $obj->nb; } - } else dol_print_error($db); + } else { + dol_print_error($db); + } } } //var_dump($theoricalamountforterminal); var_dump($theoricalnbofinvoiceforterminal); if ($action != 'close') { - llxHeader(); + llxHeader('', $langs->trans("NewCashFence")); print load_fiche_titre($langs->trans("CashControl")." - ".$langs->trans("New"), '', 'cash-register'); print ''; print ''; - if ($contextpage == 'takepos') print ''; - if ($action == 'start' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '-1') - { + if ($contextpage == 'takepos') { + print ''; + } + if ($action == 'start' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '-1') { print ''; - } elseif ($action == 'close') - { + } elseif ($action == 'close') { print ''; print ''; } else { @@ -406,10 +417,11 @@ if ($action == "create" || $action == "start" || $action == 'close') for ($i = 1; $i <= $numterminals; $i++) { $array[$i] = $i; } - $selectedposnumber = 0; $showempty = 1; - if ($conf->global->TAKEPOS_NUM_TERMINALS == '1') - { - $selectedposnumber = 1; $showempty = 0; + $selectedposnumber = 0; + $showempty = 1; + if ($conf->global->TAKEPOS_NUM_TERMINALS == '1') { + $selectedposnumber = 1; + $showempty = 0; } print $form->selectarray('posnumber', $array, GETPOSTISSET('posnumber') ?GETPOST('posnumber', 'int') : $selectedposnumber, $showempty); //print ''; @@ -417,8 +429,7 @@ if ($action == "create" || $action == "start" || $action == 'close') // Year print ''; // Button Start print ''; - $i++; + print ''; + $i++; } // Save print ''; @@ -545,13 +552,16 @@ if ($action == "create" || $action == "start" || $action == 'close') // Initial amount print ''; // Amount per payment type @@ -568,8 +578,11 @@ if ($action == "create" || $action == "start" || $action == 'close') // Save print ''; print ''; @@ -581,8 +594,7 @@ if ($action == "create" || $action == "start" || $action == 'close') } } -if (empty($action) || $action == "view" || $action == "close") -{ +if (empty($action) || $action == "view" || $action == "close") { $result = $object->fetch($id); llxHeader('', $langs->trans("CashControl")); @@ -648,8 +660,7 @@ if (empty($action) || $action == "view" || $action == "close") print '"; - foreach ($arrayofpaymentmode as $key => $val) - { + foreach ($arrayofpaymentmode as $key => $val) { print '"; @@ -667,8 +678,7 @@ if (empty($action) || $action == "view" || $action == "close") print ''; - if ($object->status == CashControl::STATUS_DRAFT) - { + if ($object->status == CashControl::STATUS_DRAFT) { print ''; print ''; @@ -678,16 +688,18 @@ if (empty($action) || $action == "view" || $action == "close") print ''; - if ($contextpage != 'takepos') print '
'; + if ($contextpage != 'takepos') { + print '
'; + } } else { print ''; print ''; - if ($contextpage == 'takepos') print ''; - if ($action == 'start' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '-1') - { + if ($contextpage == 'takepos') { + print ''; + } + if ($action == 'start' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '-1') { print ''; - } elseif ($action == 'close') - { + } elseif ($action == 'close') { print ''; print ''; } else { @@ -695,59 +707,58 @@ if (empty($action) || $action == "view" || $action == "close") } /* - 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 734d21b1c87..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,19 +572,16 @@ if (!empty($conf->multicompany->enabled) && is_object($mc)) print '
'; -$listofchoices = array( - 'selectinvoices'=>array('label'=>'Invoices', 'lang'=>'bills'), - 'selectsupplierinvoices'=>array('label'=>'BillsSuppliers', 'lang'=>'bills'), - 'selectexpensereports'=>array('label'=>'ExpenseReports', 'lang'=>'trips'), - 'selectdonations'=>array('label'=>'Donations', 'lang'=>'donation'), - 'selectpaymentsofsalaries'=>array('label'=>'SalariesPayments', 'lang'=>'salaries'), - 'selectsocialcontributions'=>array('label'=>'SocialContributions'), - 'selectvariouspayment'=>array('label'=>'VariousPayment'), - 'selectloanspayment'=>array('label'=>'PaymentLoan'), -); foreach ($listofchoices as $choice => $val) { + 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 ''; @@ -569,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'); @@ -613,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 fd7c6b1d292..6103df38f66 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'; +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_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + 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 d57e2cf5591..f6b719515cc 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), @@ -155,14 +169,8 @@ $arrayfields = array( 'b.conciliated'=>array('label'=>$langs->trans("Conciliated"), 'enabled'=> $object->rappro, 'checked'=>($action == 'reconcile' ? 1 : 0), 'position'=>1020), ); // Extra fields -if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) -{ - 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], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key] < 0) ? 0 : 1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key])); - } -} +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'); @@ -172,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 = ''; @@ -194,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; @@ -215,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'); @@ -232,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'); @@ -252,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; @@ -275,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")); @@ -292,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'); @@ -310,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; @@ -339,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); @@ -363,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); @@ -374,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); @@ -387,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'; @@ -417,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); @@ -443,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.''; + } } } } @@ -466,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', @@ -511,23 +634,30 @@ 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=".$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 -$search_debit = price2num(str_replace('-', '', $search_debit)); -$search_credit = price2num(str_replace('-', '', $search_credit)); -if ($search_debit) $sql .= natural_search('- b.amount', $search_debit, 1); -if ($search_credit) $sql .= natural_search('b.amount', $search_credit, 1); +if ($search_debit) { + $sql .= natural_search('ABS(b.amount)', $search_debit, 1); + $sql .= ' AND b.amount <= 0'; +} +if ($search_credit) { + $sql .= natural_search('b.amount', $search_credit, 1); + $sql .= ' AND b.amount >= 0'; +} // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; @@ -540,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 ''; @@ -614,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); } @@ -646,13 +797,11 @@ if ($resql) 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; @@ -661,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(); @@ -576,8 +609,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"; @@ -592,17 +624,17 @@ if ($result) print ''; print '"; - if ($user->rights->banque->consolidate) - { + if ($user->rights->banque->consolidate) { print ''; } else { print ''; @@ -610,8 +642,7 @@ if ($result) print ''; print ""; - if ($user->rights->banque->consolidate) - { + if ($user->rights->banque->consolidate) { print ''; @@ -626,8 +657,7 @@ if ($result) print '
'; print ''; - if ($backtopage) - { + if ($backtopage) { print '   '; print ''; } @@ -638,7 +668,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 87c8380ebda..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); @@ -106,40 +124,49 @@ $arrayfields = array( 'balance'=>array('label'=>$langs->trans("Balance"), 'checked'=>1, 'position'=>1010), ); // 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])) - $arrayfields["ef.".$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($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key])); - } -} +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 @@ -155,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 @@ -192,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); } @@ -201,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); +} @@ -224,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"; @@ -265,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 '
'; @@ -293,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 ''; } @@ -355,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++; @@ -428,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 @@ -555,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 ''; @@ -608,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"), @@ -381,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); @@ -498,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); @@ -539,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, 0, -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 7e1b7fd0567..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,20 +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 */ -if ($action == 'add') -{ +$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') { $langs->load("errors"); $dateo = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); @@ -54,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); @@ -84,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; @@ -106,35 +117,48 @@ 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) - { - $mesgs = $langs->trans("TransferFromToDone", ''.$accountfrom->label."", ''.$accountto->label."", $amount, $langs->transnoentities("Currency".$conf->currency)); + 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); setEventMessages($mesgs, null, 'mesgs'); $db->commit(); } else { setEventMessages($accountfrom->error.' '.$accountto->error, null, 'errors'); $db->rollback(); } - } else { - $error++; - setEventMessages($langs->trans("ErrorFromToAccountsMustDiffers"), null, 'errors'); } } } @@ -145,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 ' '."\n"; + } + print '
'; print ''; print ''; @@ -369,8 +412,7 @@ if ($action == 'create') print '
'; print $form->editfieldkey('BankAccount', 'selectaccountid', '', $object, 0, 'string', '', 1).''; $form->select_comptes($accountid, "accountid", 0, '', 2); // Affiche liste des comptes courant @@ -378,19 +420,29 @@ if ($action == 'create') } // Type payment - print '
'; - print $form->editfieldkey('PaymentMode', 'selectpaymenttype', '', $object, 0, 'string', '', 1).''; - $form->select_types_paiements($paymenttype, "paymenttype"); - print '
'.$langs->trans('PaymentMode').''; + $form->select_types_paiements($paymenttype, 'paymenttype', '', 2); + print "
'.$langs->trans("SubledgerAccount").'aaaa
'.$langs->trans("SubledgerAccount").''; if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) { print $formaccounting->select_auxaccount($subledger_account, 'subledger_account', 1, ''); @@ -431,8 +483,7 @@ if ($action == 'create') print '
'.$langs->trans("Sens").''.$sens.'
'.$langs->trans("Amount").''.price($object->amount, 0, $outputlangs, 1, -1, -1, $conf->currency).'
'; print $langs->trans("AccountAccounting"); print ''; - if (!empty($conf->accounting->enabled)) - { + if (!empty($conf->accounting->enabled)) { $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch('', $object->accountancy_code, 1); @@ -582,10 +637,8 @@ if ($id) print $form->editfieldval('SubledgerAccount', 'subledger_account', $object->subledger_account, $object, (!$alreadyaccounted && $user->rights->banque->modifier), 'string', '', 0); print '
".$variousstatic->getNomUrl(1)."'.$variousstatic->getNomUrl(1)."".dol_trunc($obj->label, 40)."'.$variousstatic->label."'.dol_print_date($obj->datep, 'day')."'.dol_print_date($obj->datev, 'day')."'.$langs->trans("PaymentTypeShort".$obj->payment_code).' '.$obj->num_payment.''; + if ($obj->payment_code) { + print $langs->trans("PaymentTypeShort".$obj->payment_code); + print ' '; + } + print $obj->num_payment; + print ''.$proj->getNomUrl(1).''; + if ($obj->fk_project > 0) { + $proj->fetch($obj->fk_project); + print $proj->getNomUrl(1); + } + print ''; - if ($obj->bid > 0) - { + print ''; + if ($obj->bid > 0) { $accountstatic->id = $obj->bid; $accountstatic->ref = $obj->bref; $accountstatic->number = $obj->bnumber; @@ -492,14 +635,18 @@ if ($result) print ' '; } print ''.$bankline->getNomUrl(1).''.$accountingaccount->getNomUrl(0, 1, 1, '', 1).''.length_accounta($obj->subledger_account).''; - if ($obj->sens == 0) - { - print price($obj->amount); + if ($obj->sens == 0) { + print ''.price($obj->amount).''; $totalarray['val']['total_deb'] += $obj->amount; } - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'total_deb'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'total_deb'; + } print ''; - if ($obj->sens == 1) - { - print price($obj->amount); + if ($obj->sens == 1) { + print ''.price($obj->amount).''; $totalarray['val']['total_cred'] += $obj->amount; } - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'total_cred'; + if (!$i) { + $totalarray['nbfield']++; + } + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 'total_cred'; + } print '
'; $retstring = ''; - for ($year = $syear - 10; $year < $syear + 10; $year++) - { + for ($year = $syear - 10; $year < $syear + 10; $year++) { $retstring .= ''; } $retstring .= "\n"; @@ -428,8 +439,7 @@ if ($action == "create" || $action == "start" || $action == 'close') print ''; $retstring = ''; $retstring .= ''; - for ($month = 1; $month <= 12; $month++) - { + for ($month = 1; $month <= 12; $month++) { $retstring .= '"; @@ -441,8 +451,7 @@ if ($action == "create" || $action == "start" || $action == 'close') print ''; $retstring = ''; $retstring .= ''; - for ($day = 1; $day <= 31; $day++) - { + for ($day = 1; $day <= 31; $day++) { $retstring .= ''; } $retstring .= ""; @@ -450,8 +459,7 @@ if ($action == "create" || $action == "start" || $action == 'close') print ''; - if ($action == 'start' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '-1') - { + if ($action == 'start' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '-1') { print ''; } else { print ''; @@ -461,8 +469,7 @@ if ($action == "create" || $action == "start" || $action == 'close') print ''; // Table to see/enter balance - if (($action == 'start' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '-1') || $action == 'close') - { + if (($action == 'start' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '-1') || $action == 'close') { $posmodule = GETPOST('posmodule', 'alpha'); $terminalid = GETPOST('posnumber', 'alpha'); @@ -511,10 +518,10 @@ if ($action == "create" || $action == "start" || $action == 'close') $i = 0; foreach ($arrayofpaymentmode as $key => $val) { - print ''; - print $theoricalnbofinvoiceforterminal[$terminalid][$key]; - print ''; + print $theoricalnbofinvoiceforterminal[$terminalid][$key]; + print ''; print ''; print ''; print ''; - if ($action == 'start') print ''; - elseif ($action == 'close') print ''; + if ($action == 'start') { + print ''; + } elseif ($action == 'close') { + print ''; + } print '
'.$langs->trans("InitialBankBalance").' - '.$langs->trans("Cash").''; print price($object->opening, 0, $langs, 1, -1, -1, $conf->currency); print "
'.$langs->trans($val).''; print price($object->$key, 0, $langs, 1, -1, -1, $conf->currency); print "
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print "\n"; + print '
'; + print '
'.$langs->trans("Module").''.$langs->trans("Terminal").''.$langs->trans("Year").''.$langs->trans("Month").''.$langs->trans("Day").'
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; - $disabled = 1; - $prefix = 'close'; + $disabled = 1; + $prefix = 'close'; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; - // Year - print ''; - // Month - print ''; - // Day - print ''; + $array = array(); + $numterminals = max(1, $conf->global->TAKEPOS_NUM_TERMINALS); + for($i = 1; $i <= $numterminals; $i++) { + $array[$i] = $i; + } + $selectedposnumber = $object->posnumber; $showempty = 1; + //print $form->selectarray('posnumber', $array, GETPOSTISSET('posnumber') ?GETPOST('posnumber', 'int') : $selectedposnumber, $showempty, 0, 0, '', 0, 0, $disabled); + print ''; + print ''; + print ''; + // Year + print ''; + // Month + print ''; + // Day + print ''; print ''; - print '
'.$langs->trans("Module").''.$langs->trans("Terminal").''.$langs->trans("Year").''.$langs->trans("Month").''.$langs->trans("Day").'
'.$form->selectarray('posmodulebis', $arrayofposavailable, $object->posmodule, (count($arrayofposavailable) > 1 ? 1 : 0), 0, 0, '', 0, 0, $disabled).''; + print '
'.$form->selectarray('posmodulebis', $arrayofposavailable, $object->posmodule, (count($arrayofposavailable) > 1 ? 1 : 0), 0, 0, '', 0, 0, $disabled).''; - $array = array(); - $numterminals = max(1, $conf->global->TAKEPOS_NUM_TERMINALS); - for($i = 1; $i <= $numterminals; $i++) { - $array[$i] = $i; - } - $selectedposnumber = $object->posnumber; $showempty = 1; - //print $form->selectarray('posnumber', $array, GETPOSTISSET('posnumber') ?GETPOST('posnumber', 'int') : $selectedposnumber, $showempty, 0, 0, '', 0, 0, $disabled); - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; - print ''; - */ + print '
'; + print '
'; + */ // Table to see/enter balance - if (($action == 'start' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '-1') || $action == 'close') - { + if (($action == 'start' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '-1') || $action == 'close') { $posmodule = $object->posmodule; $terminalid = $object->posnumber; @@ -774,8 +785,7 @@ if (empty($action) || $action == "view" || $action == "close") //print '
'.$langs->trans("TheoricalAmount").'
'.$langs->trans("RealAmount"); print '
'.$langs->trans($val); //print '
'.$langs->trans("TheoricalAmount").'
'.$langs->trans("RealAmount"); print '
'; print $theoricalnbofinvoiceforterminal[$terminalid][$key]; print ''; if ($key == 'cash') { $deltaforcash = ($object->opening - $initialbalanceforterminal[$terminalid]['cash']); @@ -831,22 +839,26 @@ if (empty($action) || $action == "view" || $action == "close") // Initial amount print ''; print ''; print ''; print ''; print ''; print ''; - if ($action == 'start') print ''; - elseif ($action == 'close') print ''; + if ($action == 'start') { + print ''; + } elseif ($action == 'close') { + 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')), @@ -3074,18 +3213,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 = ' '; @@ -3099,13 +3238,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 .= ''; @@ -3115,8 +3256,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) { @@ -3125,11 +3265,11 @@ if ($action == 'create') } $options = ""; if (is_array($facids)) { - foreach ($facids as $facparam) - { + foreach ($facids as $facparam) { $options .= ''; @@ -3139,7 +3279,9 @@ if ($action == 'create') print ''; print '
'; $tmp = 'id > 0) $tmp .= ' disabled'; + if (!$options || $invoice_predefined->id > 0) { + $tmp .= ' disabled'; + } $tmp .= '> '; print ''; $text = ''; $text .= ' '; $text = ' '; @@ -3194,24 +3336,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']; @@ -3219,8 +3356,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 5d87303236a..20a11effdad 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,58 +103,64 @@ if (empty($reshook)) } // Seems to no be used and replaced with $action == 'infocredit' - if ($action == 'confirm_credite' && GETPOST('confirm', 'alpha') == 'yes') - { - $res = $object->set_credite(); - if ($res >= 0) - { + if ($action == 'confirm_credite' && GETPOST('confirm', 'alpha') == 'yes') { + if ($object->statut == 2) { + $res = -1; + setEventMessages('WithdrawalCantBeCreditedTwice', array(), 'errors'); + } else { + $res = $object->set_credite(); + } + + 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')); - $error = $object->set_infocredit($user, $dt); - if ($error) - { + if ($object->statut == 2) { + $error = 1; + setEventMessages('WithdrawalCantBeCreditedTwice', array(), 'errors'); + } else { + $error = $object->set_infocredit($user, $dt); + } + + if ($error) { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -163,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')).'
'; } @@ -198,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); @@ -210,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 '
'; @@ -229,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 '
'; @@ -256,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); } @@ -271,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 ''; @@ -291,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 ''; @@ -311,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").""; } @@ -341,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; } @@ -365,8 +376,7 @@ if ($id > 0 || $ref) $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; @@ -394,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 { @@ -445,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=".$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,15 +262,16 @@ 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; @@ -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..0818dbb61d1 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 = ".$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..fb03f2a6c6c 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 = ".$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 8a1655cdefb..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); @@ -229,9 +265,10 @@ if ($modecompta == 'BOOKKEEPING') 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 "; @@ -248,9 +285,10 @@ 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, name, socid"; + } + $sql .= " GROUP BY pcg_type DESC, name, socid"; $sql .= $db->order($sortfield, $sortorder); $oldpcgtype = ''; @@ -261,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; } @@ -276,16 +311,24 @@ if ($modecompta == 'BOOKKEEPING') print ''; print ''; print '\n"; - print '\n"; + print '\n"; print "\n"; $total_ht += (isset($objp->amount) ? $objp->amount : 0); $total_ttc += (isset($objp->amount) ? $objp->amount : 0); + if ($objp->pcg_type == 'INCOME') { + $total_ht_income += (isset($objp->amount) ? $objp->amount : 0); + $total_ttc_income += (isset($objp->amount) ? $objp->amount : 0); + } + if ($objp->pcg_type == 'EXPENSE') { + $total_ht_outcome -= (isset($objp->amount) ? $objp->amount : 0); + $total_ttc_outcome -= (isset($objp->amount) ? $objp->amount : 0); + } + // 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)."'"; @@ -293,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'); @@ -304,12 +346,11 @@ if ($modecompta == 'BOOKKEEPING') } - if ($showaccountdetail == 'all' || $resultN <> 0) - { + if ($showaccountdetail == 'all' || $resultN <> 0) { print ''; print ''; print ''; - print ''; + print ''; print "\n"; } } @@ -320,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"; @@ -353,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); @@ -366,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; @@ -388,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"; @@ -399,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"; @@ -410,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; @@ -435,37 +482,125 @@ if ($modecompta == 'BOOKKEEPING') } } - if ($total_ttc == 0) - { + if ($total_ttc == 0) { print ''; - print ''; + print ''; print ''; } + $total_ht_income += $total_ht; + $total_ttc_income += $total_ttc; + print ''; - if ($modecompta == 'CREANCES-DETTES') + if ($modecompta == 'CREANCES-DETTES') { print ''; + } print ''; print ''; + /* + * Donations + */ + + if (!empty($conf->don->enabled)) { + print ''; + + 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').")"; + $sql .= " AND fk_statut in (1,2)"; + } else { + $sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(p.datedon,'%Y-%m') as dm, sum(p.amount) as amount"; + $sql .= " FROM ".MAIN_DB_PREFIX."don as p"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."payment_donation as pe ON pe.fk_donation = p.rowid"; + $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"; + } + 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'; + } + $sql .= $db->order($newsortfield, $sortorder); + + dol_syslog("get dunning"); + $result = $db->query($sql); + $subtotal_ht = 0; + $subtotal_ttc = 0; + if ($result) { + $num = $db->num_rows($result); + $i = 0; + if ($num) { + while ($i < $num) { + $obj = $db->fetch_object($result); + + $total_ht += $obj->amount; + $total_ttc += $obj->amount; + $subtotal_ht += $obj->amount; + $subtotal_ttc += $obj->amount; + + print ''; + + print "\n"; + + if ($modecompta == 'CREANCES-DETTES') { + print ''; + } + print ''; + print ''; + $i++; + } + } else { + print ''; + print ''; + print ''; + } + } else { + dol_print_error($db); + } + + $total_ht_income += $subtotal_ht; + $total_ttc_income += $subtotal_ttc; + + print ''; + if ($modecompta == 'CREANCES-DETTES') { + print ''; + } + print ''; + print ''; + } /* * 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"; @@ -474,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); @@ -492,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; @@ -515,7 +652,7 @@ if ($modecompta == 'BOOKKEEPING') } } else { print ''; - print ''; + print ''; print ''; } @@ -523,31 +660,34 @@ if ($modecompta == 'BOOKKEEPING') } else { dol_print_error($db); } + + $total_ht_outcome += $subtotal_ht; + $total_ttc_outcome += $subtotal_ttc; + print ''; - if ($modecompta == 'CREANCES-DETTES') + if ($modecompta == 'CREANCES-DETTES') { print ''; + } print ''; print ''; - /* * Charges sociales non deductibles */ 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"; @@ -555,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); @@ -585,22 +732,29 @@ if ($modecompta == 'BOOKKEEPING') print ''; print ''; - if ($modecompta == 'CREANCES-DETTES') print ''; - print ''; + if ($modecompta == 'CREANCES-DETTES') { + print ''; + } + print ''; print ''; $i++; } } else { print ''; - print ''; + print ''; print ''; } } else { dol_print_error($db); } + + $total_ht_outcome += $subtotal_ht; + $total_ttc_outcome += $subtotal_ttc; + print ''; - if ($modecompta == 'CREANCES-DETTES') + if ($modecompta == 'CREANCES-DETTES') { print ''; + } print ''; print ''; @@ -611,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"; @@ -630,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); @@ -659,55 +819,41 @@ if ($modecompta == 'BOOKKEEPING') print ''; print ''; - if ($modecompta == 'CREANCES-DETTES') - print ''; - print ''; + if ($modecompta == 'CREANCES-DETTES') { + print ''; + } + print ''; print ''; $i++; } } else { print ''; - print ''; + print ''; print ''; } } else { dol_print_error($db); } + + $total_ht_outcome += $subtotal_ht; + $total_ttc_outcome += $subtotal_ttc; + print ''; - if ($modecompta == 'CREANCES-DETTES') + if ($modecompta == 'CREANCES-DETTES') { print ''; + } print ''; print ''; - if ($mysoc->tva_assuj == 'franchise') // Non assujetti - { - // Total - print ''; - print ''; - print ''; - - print ''; - if ($modecompta == 'CREANCES-DETTES') - print ''; - print ''; - print ''; - - print ''; - print ''; - print ''; - } - /* * 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 { @@ -718,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); } @@ -733,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; @@ -752,22 +902,29 @@ if ($modecompta == 'BOOKKEEPING') print "\n"; - if ($modecompta == 'CREANCES-DETTES') print ''; - print ''; + if ($modecompta == 'CREANCES-DETTES') { + print ''; + } + print ''; print ''; $i++; } } else { print ''; - print ''; + print ''; print ''; } } else { dol_print_error($db); } + + $total_ht_outcome += $subtotal_ht; + $total_ttc_outcome += $subtotal_ttc; + print ''; - if ($modecompta == 'CREANCES-DETTES') + if ($modecompta == 'CREANCES-DETTES') { print ''; + } print ''; print ''; } @@ -777,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"; @@ -802,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); } @@ -819,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; @@ -835,107 +988,39 @@ if ($modecompta == 'BOOKKEEPING') print "\n"; - if ($modecompta == 'CREANCES-DETTES') print ''; - print ''; + if ($modecompta == 'CREANCES-DETTES') { + print ''; + } + print ''; print ''; } } else { print ''; - print ''; + print ''; print ''; } } else { dol_print_error($db); } + + $total_ht_outcome += $subtotal_ht; + $total_ttc_outcome += $subtotal_ttc; + print ''; - if ($modecompta == 'CREANCES-DETTES') print ''; + if ($modecompta == 'CREANCES-DETTES') { + print ''; + } print ''; print ''; } + /* - * Donations + * Various Payments */ + //$conf->global->ACCOUNTING_REPORTS_INCLUDE_VARPAY = 1; - if (!empty($conf->don->enabled)) - { - print ''; - - 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').")"; - $sql .= " AND fk_statut in (1,2)"; - } else { - $sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(p.datedon,'%Y-%m') as dm, sum(p.amount) as amount"; - $sql .= " FROM ".MAIN_DB_PREFIX."don as p"; - $sql .= " INNER JOIN ".MAIN_DB_PREFIX."payment_donation as pe ON pe.fk_donation = p.rowid"; - $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"; - } - 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'; - $sql .= $db->order($newsortfield, $sortorder); - - dol_syslog("get dunning"); - $result = $db->query($sql); - $subtotal_ht = 0; - $subtotal_ttc = 0; - if ($result) - { - $num = $db->num_rows($result); - $i = 0; - if ($num) - { - while ($i < $num) - { - $obj = $db->fetch_object($result); - - $total_ht += $obj->amount; - $total_ttc += $obj->amount; - $subtotal_ht += $obj->amount; - $subtotal_ttc += $obj->amount; - - print ''; - - print "\n"; - - if ($modecompta == 'CREANCES-DETTES') print ''; - print ''; - print ''; - $i++; - } - } else { - print ''; - print ''; - print ''; - } - } else { - dol_print_error($db); - } - print ''; - if ($modecompta == 'CREANCES-DETTES') - print ''; - print ''; - print ''; - } - - /* - * 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")) { $subtotal_ht = 0; $subtotal_ttc = 0; @@ -944,58 +1029,68 @@ 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) - { - // Debit + 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; + + $total_ht_outcome += $obj->amount; + $total_ttc_outcome += $obj->amount; } print ''; print "\n"; - if ($modecompta == 'CREANCES-DETTES') print ''; - print '\n"; + if ($modecompta == 'CREANCES-DETTES') { + print ''; + } + print '\n"; print "\n"; - // Credit + // 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; + + $total_ht_income += $obj->amount; + $total_ttc_income += $obj->amount; } 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; @@ -1004,38 +1099,46 @@ 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; } $total_ht += $subtotal_ht; $total_ttc += $subtotal_ttc; + + $total_ht_income += $subtotal_ht; + $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); + } } /* @@ -1046,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') - { - // TVA a payer + 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; @@ -1091,40 +1198,50 @@ if ($modecompta == 'BOOKKEEPING') } else { dol_print_error($db); } + + $total_ht_outcome -= 0; + $total_ttc_outcome -= $amount; + print ''; print "\n"; print ''."\n"; - print '\n"; + print '\n"; print "\n"; - // TVA a recuperer + // VAT to retreive $amount = 0; $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; @@ -1139,10 +1256,14 @@ if ($modecompta == 'BOOKKEEPING') } else { dol_print_error($db); } + + $total_ht_income += 0; + $total_ttc_income += $amount; + print ''; print '\n"; print ''."\n"; - print '\n"; + print '\n"; print "\n"; } else { // VAT really already paid @@ -1150,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); @@ -1182,11 +1310,16 @@ if ($modecompta == 'BOOKKEEPING') } else { dol_print_error($db); } + + $total_ht_outcome -= 0; + $total_ttc_outcome -= $amount; + print ''; print "\n"; - if ($modecompta == 'CREANCES-DETTES') - print '\n"; - print '\n"; + if ($modecompta == 'CREANCES-DETTES') { + print ''."\n"; + } + print '\n"; print "\n"; // VAT really received @@ -1194,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); @@ -1226,20 +1366,25 @@ if ($modecompta == 'BOOKKEEPING') } else { dol_print_error($db); } + + $total_ht_income += 0; + $total_ttc_income += $amount; + print ''; print "\n"; - if ($modecompta == 'CREANCES-DETTES') - print '\n"; - print '\n"; + if ($modecompta == 'CREANCES-DETTES') { + print ''."\n"; + } + print '\n"; print "\n"; } } - if ($mysoc->tva_assuj != 'franchise') // Assujetti - { + if ($mysoc->tva_assuj != '0') { // Assujetti print ''; - if ($modecompta == 'CREANCES-DETTES') + if ($modecompta == 'CREANCES-DETTES') { print ''; + } print ''; print ''; } @@ -1250,25 +1395,34 @@ $object = array(&$total_ht, &$total_ttc); $parameters["mode"] = $modecompta; $parameters["date_start"] = $date_start; $parameters["date_end"] = $date_end; -$parameters["bc"] = $bc; // Initialize technical object to manage hooks of expenses. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('externalbalance')); $reshook = $hookmanager->executeHooks('addBalanceLine', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks print $hookmanager->resPrint; -if ($mysoc->tva_assuj != 'franchise') // Assujetti -{ - // Total - print ''; - print ''; - print ''; +// Total +print ''; +print ''; +print ''; - print ''; - if ($modecompta == 'CREANCES-DETTES') - print ''; - print ''; - print ''; +print ''; +if ($modecompta == 'CREANCES-DETTES') { + print ''; } +print ''; +print ''; +print ''; +if ($modecompta == 'CREANCES-DETTES') { + print ''; +} +print ''; +print ''; +print ''; +if ($modecompta == 'CREANCES-DETTES') { + print ''; +} +print ''; +print ''; 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").''.$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).'
 '.$langs->trans("None").'
'.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)."
 '.$langs->trans("None").''.$langs->trans("None").'
'.price(-$subtotal_ht).''.price(-$subtotal_ttc).'
'.$langs->trans("SocialContributionsNondeductibles").'
 '.$obj->label.''.price(-$obj->amount).''.price(-$obj->amount).''.price(-$obj->amount).''.price(-$obj->amount).'
 '.$langs->trans("None").''.$langs->trans("None").'
'.price(-$subtotal_ht).''.price(-$subtotal_ttc).'
'.$langs->trans("SocialContributionsDeductibles").'
 '.$obj->label.''.price(-$obj->amount).''.price(-$obj->amount).''.price(-$obj->amount).''.price(-$obj->amount).'
 '.$langs->trans("None").''.$langs->trans("None").'
'.price(-$subtotal_ht).''.price(-$subtotal_ttc).'
 
'.$langs->trans("Profit").''.price($total_ht).''.price($total_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).'
 '.$langs->trans("None").''.$langs->trans("None").'
'.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).'
 '.$langs->trans("None").''.$langs->trans("None").'
'.price(-$subtotal_ht).''.price(-$subtotal_ht).''.price(-$subtotal_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).'
 '.$langs->trans("None").'
'.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)."'.price($amount)."
 ".$langs->trans("VATCollected")."'.price($amount)."'.price($amount)."'.price($amount)."
 '.price(price2num($subtotal_ttc, 'MT')).'
 
 
'.$langs->trans("Profit").''.price(price2num($total_ht, 'MT')).''.price(price2num($total_ttc, 'MT')).'
'.$langs->trans("Income").''.price(price2num($total_ht_income, 'MT')).''.price(price2num($total_ttc_income, 'MT')).'
'.$langs->trans("Outcome").''.price(price2num(-$total_ht_outcome, 'MT')).''.price(price2num(-$total_ttc_outcome, 'MT')).'
'.$langs->trans("Profit").''.price(price2num($total_ht, 'MT')).''.price(price2num($total_ttc, 'MT')).'
"; print '
'; diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index ec2a8bb2623..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->credit; + $encaiss[$obj->dm] -= $obj->debit; } - if ($obj->pcg_type == 'INCOME') { - if (!isset($decaiss[$obj->dm])) $decaiss[$obj->dm] = 0; // To avoid warning of var not defined + if ($obj->pcg_type == 'EXPENSE') { + 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 ''."\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 bf28ceb0996..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,45 +43,48 @@ 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'); $confirm = GETPOST('confirm'); -$projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0); +$fk_project = (GETPOST('fk_project') ? GETPOST('fk_project', 'int') : 0); $dateech = dol_mktime(GETPOST('echhour'), GETPOST('echmin'), GETPOST('echsec'), GETPOST('echmonth'), GETPOST('echday'), GETPOST('echyear')); $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('projectid')); + $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,25 +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) - { - setEventMessages($langs->trans("ErrorFieldReqrequire_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; -uired", $langs->transnoentities("Date")), null, 'errors'); + 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 { @@ -203,6 +204,7 @@ uired", $langs->transnoentities("Date")), null, 'errors'); $object->date_ech = $dateech; $object->periode = $dateperiod; $object->amount = $amount; + $object->fk_user = $fk_user; $result = $object->update($user); if ($result <= 0) { @@ -212,18 +214,18 @@ uired", $langs->transnoentities("Date")), null, 'errors'); } // 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; @@ -233,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(); @@ -277,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)'; @@ -285,8 +300,7 @@ llxHeader("", $title, $help_url); // Mode creation -if ($action == 'create') -{ +if ($action == 'create') { print load_fiche_titre($langs->trans("NewSocialContribution")); print ''; @@ -321,7 +335,7 @@ if ($action == 'create') print $langs->trans("Date"); print ''; print ''; print "\n"; @@ -343,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 @@ -353,21 +372,20 @@ if ($action == 'create') print ''; } // Payment Mode - print ''; // Bank Account - if (!empty($conf->banque->enabled)) - { - print ''; } @@ -389,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); @@ -418,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 ''; } @@ -443,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')).' : '; } @@ -458,7 +499,7 @@ if ($id > 0) $morehtmlref .= ''; $morehtmlref .= ''; $morehtmlref .= ''; - $morehtmlref .= $formproject->select_projects(0, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref .= $formproject->select_projects(0, $object->fk_project, 'fk_project', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); $morehtmlref .= ''; $morehtmlref .= ''; } else { @@ -498,8 +539,7 @@ if ($id > 0) print ""; // Date - if ($action == 'edit') - { + if ($action == 'edit') { print '"; @@ -510,8 +550,7 @@ if ($id > 0) // Period end date print ""; print ""; // Amount - if ($action == 'edit') - { + if ($action == 'edit') { print '"; } else { - print ''; + print ''; } // 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 $form->selectDate(!empty($dateech) ? $dateech : '-1', 'ech', 0, 0, 0, 'charge', 1); + print $form->selectDate(!empty($dateech) ? $dateech : '-1', 'ech', 0, 0, 0, 'charge', 1, 1); print '
'; + 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, $projectid, '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').''; - $form->select_types_paiements($mode_reglement_id, 'mode_reglement_id'); + print '
'.$langs->trans('DefaultPaymentMode').''; + $form->select_types_paiements(GETPOST('mode_reglement_id', 'int'), 'mode_reglement_id'); print '
'.$langs->trans('BankAccount').''; - $form->select_comptes($fk_account, '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"); @@ -519,22 +558,22 @@ if ($id > 0) print "
'.$langs->trans("AmountTTC").""; - print ''; + print ''; print "
'.$langs->trans("AmountTTC").''.price($object->amount, 0, $outputlangs, 1, -1, -1, $conf->currency).'
'.$langs->trans("AmountTTC").''.price($object->amount, 0, $langs, 1, -1, -1, $conf->currency).'
'; 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') { @@ -545,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') { @@ -586,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 ''; @@ -614,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; @@ -631,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; @@ -648,11 +684,12 @@ if ($id > 0) } print ''; } - print '\n"; + print '\n"; print ""; $totalpaye += $objp->amount; $i++; @@ -688,8 +725,7 @@ if ($id > 0) print dol_get_fiche_end(); - if ($action == 'edit') - { + if ($action == 'edit') { print '
'; print ''; print '   '; @@ -697,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 ffb2d04e155..20cc2c82b0c 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.rowid = ".$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; @@ -421,45 +421,79 @@ class ChargeSociales extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Tag social contribution as payed completely + * 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 payed on social contribution + * 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; + } } /** * Retourne le libelle du statut d'une charge (impaye, payee) * * @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) + * @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount paid if you have it, 1 otherwise) * @return string Label */ public function getLibStatut($mode = 0, $alreadypaid = -1) @@ -473,7 +507,7 @@ class ChargeSociales extends CommonObject * * @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) + * @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount paid if you have it, 1 otherwise) * @return string Label */ public function LibStatut($status, $mode = 0, $alreadypaid = -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 2f4f772fca0..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 */ @@ -110,7 +115,7 @@ class PaymentSocialContribution extends CommonObject * 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 + * @param int $closepaidcontrib 1=Also close paid contributions to paid, 0=Do nothing more * @return int <0 if KO, id of payment if OK */ public function create($user, $closepaidcontrib = 0) @@ -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 payed invoices - if ($closepaidcontrib) - { + // If we want to closed paid invoices + 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 dbb01060a4d..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']; } @@ -160,9 +165,9 @@ if ($object->id) $modulepart = 'tax'; $permission = $user->rights->tax->charges->creer; - $permtoedit = $user->rights->fournisseur->facture->creer; + $permtoedit = $user->rights->tax->charges->creer; $param = '&id='.$object->id; - include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { print $langs->trans("ErrorUnknown"); } 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..ffebc7dcc73 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.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 (!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 0be6659f7b4..b93d3c507b3 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -42,64 +42,88 @@ $nbofyear = 4; // Date range $year = GETPOST('year', '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 - ($nbofyear - 1); } else { $year_current = $year; - $month_current = strftime("%m", dol_now()); + $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 -{ - $q = GETPOST("q") ?GETPOST("q") : 0; - if ($q == 0) - { +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 $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) - { + $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) { $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'); $socid = GETPOST('socid', 'int'); $tmps = dol_getdate($date_start); +$mothn_start = $tmps['mon']; $year_start = $tmps['year']; $tmpe = dol_getdate($date_end); +$month_end = $tmpe['mon']; $year_end = $tmpe['year']; $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,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 @@ -209,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); } @@ -231,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"; @@ -246,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); } @@ -273,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 ''; @@ -306,11 +360,12 @@ $now = dol_now(); $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++) -{ +$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++) { $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 @@ -328,78 +383,97 @@ 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 + // Value turnover of month w/o VAT print '"; } - // Valeur CA du mois + // Value turnover of month print '"; - // Pourcentage du mois - 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 ''; + // Percentage of month + print ''; + print '-'; + } + if (isset($cum[$caseprev]) && !$cum[$caseprev] && !$cum[$case]) { + print '+0%'; + } + if (!isset($cum[$caseprev]) && !$cum[$case]) { + print '-'; + } + } else { + if ($minyearmonth <= $case && $case <= $maxyearmonth) { + print '-'; + } else { + print ' '; + } } - if ($cum[$caseprev] && !$cum[$case]) - { - print ''; - } - if (!$cum[$caseprev] && $cum[$case]) - { - //print ''; - print ''; - } - if (isset($cum[$caseprev]) && !$cum[$caseprev] && !$cum[$case]) - { - print ''; - } - if (!isset($cum[$caseprev]) && !$cum[$case]) - { - 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 ''; + } } - $total_ht[$annee] += ((!empty($cum_ht[$case])) ? $cum_ht[$case] : 0); - $total[$annee] += $cum[$case]; + if ($annee < $year_end || ($annee == $year_end && $mois <= $month_end)) { + $total_ht[$annee] += ((!empty($cum_ht[$case])) ? $cum_ht[$case] : 0); + $total[$annee] += $cum[$case]; + } } print ''; @@ -470,54 +544,59 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) } */ -// Affiche total +// 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))) - { - print '"; + if ($total_ht[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear))) { + print '"; } else { print ''; } } - // Montant total - if ($total[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear))) - { - print '"; + // Total amount + 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 ''; + 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]) - { - $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 ($annee < $year_end || ($annee == $year_end && $mois <= $month_end)) { + 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 ' '; + } + } } print "'; - if ($cum[$case]) - { - $now_show_delta = 1; // On a trouve le premier mois de la premiere annee generant du chiffre. - if ($modecompta != 'BOOKKEEPING') print ''; - print price($cum[$case], 1); - if ($modecompta != 'BOOKKEEPING') print ''; - } else { - if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { print '0'; } else { print ' '; } + 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 ''; + } + print price($cum[$case], 1); + if ($modecompta != 'BOOKKEEPING') { + print ''; + } + } else { + if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { + print '0'; + } else { + print ' '; + } + } } print "'.($percent >= 0 ? "+$percent" : "$percent").'%'; + //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]) { + $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]) { + print '-100%'; + } + if (!$cum[$caseprev] && $cum[$case]) { + //print '+Inf%-100%+Inf%-+0%-'; - if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; } else { print ' '; } - print '  
'.$langs->trans("Total").''.($total_ht[$annee] ?price($total_ht[$annee]) : "0")."'; + print ($total_ht[$annee] ?price($total_ht[$annee]) : "0"); + print " '.($total[$annee] ?price($total[$annee]) : "0")."'; + print ($total[$annee] ?price($total[$annee]) : "0"); + print " '.($percent >= 0 ? "+$percent" : "$percent").'%'; + print ($percent >= 0 ? "+$percent" : "$percent").'%'; + print '-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 '  
"; @@ -589,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 e310e61fcb8..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']; } @@ -145,9 +151,9 @@ if ($object->id) print dol_get_fiche_end(); $permission = $user->rights->tax->charges->creer; - $permtoedit = $user->rights->fournisseur->facture->creer; + $permtoedit = $user->rights->tax->charges->creer; $param = '&id='.$object->id; - include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index 4a16d996ab8..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 51cac4c7394..25d622d825d 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,7 +450,7 @@ class Tva extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * VAT payed * @@ -420,20 +459,17 @@ class Tva extends CommonObject */ 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,7 +485,7 @@ class Tva extends CommonObject } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Total of the VAT payed * @@ -458,21 +494,18 @@ class Tva extends CommonObject */ 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"; @@ -553,8 +588,12 @@ class Tva extends CommonObject $sql .= ", ".$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 '
'; - -/* - * Payed - */ - -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 752bdc4d642..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 * @@ -54,6 +54,8 @@ $mesg = ''; $error = 0; $errors = array(); $action = (GETPOST('action', 'alpha') ? GETPOST('action', 'alpha') : 'view'); $confirm = GETPOST('confirm', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); +$cancel = GETPOST('cancel', 'alpha'); + $id = GETPOST('id', 'int'); $socid = GETPOST('socid', 'int'); @@ -69,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; @@ -98,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; @@ -144,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); @@ -157,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); @@ -170,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'); @@ -200,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'); @@ -219,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 { @@ -274,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; @@ -296,43 +307,49 @@ if (empty($reshook)) } } - if ($action == 'update' && !$_POST["cancel"] && $user->rights->societe->contact->creer) - { - if (empty($_POST["lastname"])) - { + 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); // 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']); @@ -345,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"; @@ -374,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'); @@ -396,14 +412,16 @@ if (empty($reshook)) $object->priv = (string) GETPOST("priv", 'int'); $object->note_public = (string) GETPOST("note_public", 'restricthtml'); $object->note_private = (string) GETPOST("note_private", 'restricthtml'); - $object->roles = GETPOST("roles", 'array'); + + $object->roles = GETPOST("roles", 'array'); // Note GETPOSTISSET("role") is null when combo is empty // 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) { @@ -411,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 = ''; @@ -448,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 @@ -489,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); @@ -498,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 { // ----------------------------------------- @@ -523,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); @@ -552,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']; @@ -579,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) { @@ -766,6 +784,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print ''; print ''; print ''; print ''; @@ -774,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 '"; } @@ -827,7 +815,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print ''; print ''; } @@ -835,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); } @@ -852,8 +839,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Date To Birth 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) { @@ -1079,7 +1073,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print ''; print ''; print ''; print ''; } elseif (!empty($object->socialnetworks[$key])) { @@ -1087,39 +1084,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } } } - // if (! empty($conf->socialnetworks->enabled)) - // { - // // Jabber ID - // if (! empty($conf->global->SOCIALNETWORKS_JABBER)) - // { - // print ''; - // print ''; - // } - // // Skype - // if (! empty($conf->global->SOCIALNETWORKS_SKYPE)) - // { - // print ''; - // print ''; - // } - // // Twitter - // if (! empty($conf->global->SOCIALNETWORKS_TWITTER)) - // { - // print ''; - // print ''; - // } - // // Facebook - // if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK)) - // { - // print ''; - // print ''; - // } - // // LinkedIn - // if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN)) - // { - // print ''; - // print ''; - // } - // } // Visibility print ''; // Note Private print ''; @@ -1155,7 +1119,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) foreach ($cats as $cat) { $arrayselected[] = $cat->id; } - print $form->multiselectarray('contcats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%'); + print img_picto('', 'category').$form->multiselectarray('contcats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%'); print ""; } @@ -1171,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 ''; @@ -1208,12 +1167,13 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Login Dolibarr print ''; // Photo @@ -1225,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).'">
'; @@ -818,7 +806,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { print '
'.$form->editfieldkey('Categories', 'contcats', '', $object, 0).''; $cate_arbo = $form->select_all_categories(Categorie::TYPE_CONTACT, null, 'parent', null, null, 1); - print $form->multiselectarray('contcats', $cate_arbo, GETPOST('contcats', 'array'), null, null, null, null, '90%'); + print img_picto('', 'category').$form->multiselectarray('contcats', $cate_arbo, GETPOST('contcats', 'array'), null, null, null, null, '90%'); print "
'.$langs->trans("ContactByDefaultFor").''; $contactType = $object->listeTypeContacts('external', '', 1); - print $form->multiselectarray('roles', $contactType); + print $form->multiselectarray('roles', $contactType, array(), 0, 0, 'minwidth500'); 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); @@ -861,8 +847,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print ': '; - if ($object->birthday_alert) - { + if ($object->birthday_alert) { print ''; } else { print ''; @@ -876,8 +861,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '
'; print ''; - if (!empty($backtopage)) - { + if (!empty($backtopage)) { print '     '; print ''; } else { @@ -889,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']; @@ -906,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 '
jabberid).'">
skype).'">
twitter).'">
facebook).'">
linkedin).'">
'; @@ -1129,13 +1093,13 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Note Public 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").'
'; @@ -1252,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 @@ -1263,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); } @@ -1284,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'); } @@ -1295,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 .= '
'; @@ -1323,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").''; @@ -1359,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 '
'; @@ -1371,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') { @@ -1389,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 '
'; @@ -1482,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 { @@ -1500,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').''; } } @@ -1535,8 +1490,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) $action = 'presend'; } - if ($action != 'presend') - { + if ($action != 'presend') { print '
'; print '
'; @@ -1556,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 367a2e7cd62..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 = array(); + /** + * @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 } @@ -856,7 +939,7 @@ class Contact extends CommonObject * @param User $user Load also alerts of this user (subscribing to alerts) that want alerts about this contact * @param string $ref_ext External reference, not given by Dolibarr * @param string $email Email - * @param int $loadalsoroles Load also roles + * @param int $loadalsoroles Load also roles. Try to always 0 here and load roles with a separate call of fetchRoles(). * @return int >0 if OK, <0 if KO or if two records found for same ref or idprof, 0 if not found. */ public function fetch($id, $user = null, $ref_ext = '', $email = '', $loadalsoroles = 0) @@ -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); } /** @@ -1631,10 +1708,11 @@ class Contact extends CommonObject } /** - * Fetch Roles for a contact + * Fetch roles (default contact of some companies) for the current contact. + * This load the array ->roles. * - * @return float|int - * @throws Exception + * @return int <0 if KO, Nb of roles found if OK + * @see updateRoles() */ public function fetchRoles() { @@ -1642,25 +1720,23 @@ class Contact extends CommonObject $error = 0; $num = 0; - $sql = "SELECT tc.rowid, tc.element, tc.source, tc.code, tc.libelle, sc.rowid as contactroleid"; - $sql .= " FROM ".MAIN_DB_PREFIX."societe_contacts as sc"; - $sql .= " INNER JOIN ".MAIN_DB_PREFIX."c_type_contact as tc"; - $sql .= " ON tc.rowid = sc.fk_c_type_contact"; - $sql .= " AND sc.fk_socpeople = ".$this->id; + $sql = "SELECT tc.rowid, tc.element, tc.source, tc.code, tc.libelle as label, sc.rowid as contactroleid, sc.fk_soc as socid"; + $sql .= " FROM ".MAIN_DB_PREFIX."societe_contacts as sc, ".MAIN_DB_PREFIX."c_type_contact as tc"; + $sql .= " WHERE tc.rowid = sc.fk_c_type_contact"; $sql .= " AND tc.source = 'external' AND tc.active=1"; + $sql .= " AND sc.fk_socpeople = ".$this->id; $sql .= " AND sc.entity IN (".getEntity('societe').')'; - dol_syslog(__METHOD__, LOG_DEBUG); - - $this->roles = array(); $resql = $this->db->query($sql); if ($resql) { + $this->roles = array(); + $num = $this->db->num_rows($resql); if ($num > 0) { while ($obj = $this->db->fetch_object($resql)) { $transkey = "TypeContact_".$obj->element."_".$obj->source."_".$obj->code; $libelle_element = $langs->trans('ContactDefault_'.$obj->element); - $this->roles[$obj->contactroleid] = array('id'=>$obj->rowid, 'element'=>$obj->element, 'source'=>$obj->source, 'code'=>$obj->code, 'label'=>$libelle_element.' - '.($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->libelle)); + $this->roles[$obj->contactroleid] = array('id'=>$obj->rowid, 'socid'=>$obj->socid, 'element'=>$obj->element, 'source'=>$obj->source, 'code'=>$obj->code, 'label'=>$libelle_element.' - '.($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->label)); } } } else { @@ -1701,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); @@ -1722,10 +1796,11 @@ class Contact extends CommonObject } /** - * Updates Roles + * Updates all roles (default contact for companies) according to values inside the ->roles array. + * This is called by update of contact. * * @return float|int - * @throws Exception + * @see fetchRoles() */ public function updateRoles() { @@ -1733,11 +1808,14 @@ class Contact extends CommonObject $error = 0; + if (!isset($this->roles)) { + return; // Avoid to loose roles when property not set + } + $this->db->begin(); - $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_contacts WHERE fk_soc=".$this->socid." AND fk_socpeople=".$this->id; ; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_contacts WHERE fk_socpeople=".((int) $this->id)." AND entity IN (".getEntity("societe_contact").")"; - dol_syslog(__METHOD__, LOG_DEBUG); $result = $this->db->query($sql); if (!$result) { $this->errors[] = $this->db->lasterror().' sql='.$sql; @@ -1745,25 +1823,39 @@ class Contact extends CommonObject } else { if (count($this->roles) > 0) { foreach ($this->roles as $keyRoles => $valRoles) { - $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_contacts"; - $sql .= " (entity,"; - $sql .= "date_creation,"; - $sql .= "fk_soc,"; - $sql .= "fk_c_type_contact,"; - $sql .= "fk_socpeople) "; - $sql .= " VALUES (".$conf->entity.","; - $sql .= "'".$this->db->idate(dol_now())."',"; - $sql .= $this->socid.", "; - $sql .= $valRoles." , "; - $sql .= $this->id; - $sql .= ")"; - dol_syslog(__METHOD__, LOG_DEBUG); + $idrole = 0; + if (is_array($valRoles)) { + $idrole = $valRoles['id']; + } else { + $idrole = $valRoles; + } - $result = $this->db->query($sql); - if (!$result) - { - $this->errors[] = $this->db->lasterror().' sql='.$sql; - $error++; + $socid = 0; + if (is_array($valRoles)) { + $socid = $valRoles['socid']; + } else { + $socid = $this->socid; + } + + if ($socid > 0) { + $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_contacts"; + $sql .= " (entity,"; + $sql .= "date_creation,"; + $sql .= "fk_soc,"; + $sql .= "fk_c_type_contact,"; + $sql .= "fk_socpeople) "; + $sql .= " VALUES (".$conf->entity.","; + $sql .= "'".$this->db->idate(dol_now())."',"; + $sql .= $socid.", "; + $sql .= $idrole." , "; + $sql .= $this->id; + $sql .= ")"; + + $result = $this->db->query($sql); + if (!$result) { + $this->errors[] = $this->db->lasterror().' sql='.$sql; + $error++; + } } } } @@ -1789,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++; @@ -1824,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; @@ -1874,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 2065ab772e6..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,22 +60,36 @@ $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'; +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('contactdocument')); /* * Actions @@ -90,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")); @@ -105,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 .= '
'; @@ -133,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..b02856ceb3b 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,31 +482,37 @@ 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)) -{ +if (!empty($socid)) { $sql .= " AND s.rowid = ".$socid; } // Add where from extra fields @@ -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 ae32ef5c95e..c301ef02276 100644 --- a/htdocs/contact/note.php +++ b/htdocs/contact/note.php @@ -36,14 +36,20 @@ $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 +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('contactcard')); /* * Actions @@ -65,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); @@ -79,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 2e692dc25c4..1ab26b73c75 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 @@ -89,6 +97,7 @@ $extralabelslines = $extrafields->fetch_name_optionals_label($object->table_elem $permissionnote = $user->rights->contrat->creer; // Used by the include of actions_setnotes.inc.php $permissiondellink = $user->rights->contrat->creer; // Used by the include of actions_dellink.inc.php +$error = 0; /* @@ -97,36 +106,31 @@ $permissiondellink = $user->rights->contrat->creer; // Used by the include of ac $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 { @@ -136,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')); } } @@ -155,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++; @@ -201,8 +194,7 @@ if (empty($reshook)) $action = 'create'; } - if (!$error) - { + if (!$error) { $object->socid = $socid; $object->date_contrat = $datecontrat; @@ -212,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']); } @@ -247,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); @@ -256,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; } @@ -269,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); } @@ -339,8 +329,7 @@ if (empty($reshook)) $lines[$i]->fk_unit ); - if ($result < 0) - { + if ($result < 0) { $error++; break; } @@ -355,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 { @@ -373,21 +362,16 @@ if (empty($reshook)) $action = 'create'; } } - } elseif ($action == 'classin' && $user->rights->contrat->creer) - { + } 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 = (GETPOST('dp_desc') ?GETPOST('dp_desc') : ''); - $price_ht = price2num(GETPOST('price_ht')); - $price_ht_devise = price2num(GETPOST('multicurrency_price_ht')); - if (GETPOST('prod_entry_mode', 'alpha') == 'free') - { + $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') { $idprod = 0; $tva_tx = (GETPOST('tva_tx', 'alpha') ? GETPOST('tva_tx', 'alpha') : 0); } else { @@ -395,24 +379,21 @@ if (empty($reshook)) $tva_tx = ''; } - $qty = price2num(GETPOST('qty'.$predef)); - $remise_percent = ((GETPOST('remise_percent'.$predef) != '') ? GETPOST('remise_percent'.$predef) : 0); + $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS'); + $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,16 +622,20 @@ 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 $info_bits = 0; - if (preg_match('/\*/', $vat_rate)) + if (preg_match('/\*/', $vat_rate)) { $info_bits |= 0x01; + } // Define vat_rate $vat_rate = str_replace('*', '', $vat_rate); @@ -651,26 +647,26 @@ 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 = $_POST['fournprice']; - if (!empty($_POST['buying_price'])) - $pa_ht = $_POST['buying_price']; - else $pa_ht = null; + if (GETPOST('buying_price')) { + $pa_ht = price2num(GETPOST('buying_price'), '', 2); + } else { + $pa_ht = null; + } $fk_unit = GETPOST('unit', 'alpha'); $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; @@ -703,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) - { + } elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->contrat->creer) { $result = $object->deleteline(GETPOST('lineid'), $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); @@ -752,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 { @@ -807,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++; } @@ -827,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); @@ -845,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'); @@ -865,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) { @@ -883,15 +857,15 @@ if (empty($reshook)) $action = 'editref'; } else { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - $old_filedir = $conf->contrat->dir_output.'/'.dol_sanitizeFileName($old_ref); - $new_filedir = $conf->contrat->dir_output.'/'.dol_sanitizeFileName($object->ref); + $old_filedir = $conf->contrat->multidir_output[$object->entity].'/'.dol_sanitizeFileName($old_ref); + $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']); } } @@ -903,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) { @@ -929,7 +902,7 @@ if (empty($reshook)) // Actions to build doc - $upload_dir = $conf->contrat->dir_output; + $upload_dir = $conf->contrat->multidir_output[$object->entity]; $permissiontoadd = $user->rights->contrat->creer; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; @@ -941,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 { @@ -986,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) { @@ -998,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 = ''; } } @@ -1011,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 @@ -1118,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 ''; } @@ -1161,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); @@ -1174,14 +1146,13 @@ if ($action == 'create') } print ''; - if (empty($user->socid)) - { + if (empty($user->socid)) { print ''; } @@ -1206,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"); } } @@ -1226,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 @@ -1299,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 ''; @@ -1331,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')).' : '; } @@ -1379,12 +1346,18 @@ if ($action == 'create') // Line info of thirdparty discounts print ''; @@ -1405,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'; @@ -1430,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 ''; @@ -1466,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 '
'; @@ -1478,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; @@ -1506,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) { @@ -1592,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)) { @@ -1601,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 ''; @@ -1625,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 ''; @@ -1693,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 ''; @@ -1732,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"; @@ -1748,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 ''; @@ -1132,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 } @@ -1539,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 ''; @@ -1577,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; @@ -1659,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(); @@ -1683,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 ''; @@ -1706,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); @@ -1772,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); @@ -1808,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 ''; @@ -1871,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 ''; @@ -1845,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) { @@ -1861,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); @@ -1920,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 */ @@ -1935,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 ''; 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 '
'; - 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); } @@ -1983,8 +1959,7 @@ 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"; @@ -1999,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); @@ -2020,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 ''; } @@ -2093,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 ''; @@ -2123,28 +2104,26 @@ if ($action == 'create') $action = 'presend'; } - if ($action != 'presend') - { + if ($action != 'presend') { print '
'; /* - * Documents generes - */ + * Generated documents + */ $filename = dol_sanitizeFileName($object->ref); - $filedir = $conf->contrat->dir_output."/".dol_sanitizeFileName($object->ref); + $filedir = $conf->contrat->multidir_output[$object->entity]."/".dol_sanitizeFileName($object->ref); $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; $genallowed = $user->rights->contrat->lire; $delallowed = $user->rights->contrat->creer; - print $formfile->showdocuments('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang); + print $formfile->showdocuments('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, ($object->model_pdf ? $object->model_pdf : $conf->global->CONTRACT_ADDON_PDF), 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang, '', $object); // Show links to link elements $linktoelem = $form->showLinkToObjectBlock($object, null, array('contrat')); $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - print '
'; $MAXEVENT = 10; @@ -2162,7 +2141,7 @@ if ($action == 'create') // Presend form $modelmail = 'contract'; $defaulttopic = 'SendContractRef'; - $diroutput = $conf->contrat->dir_output; + $diroutput = $conf->contrat->multidir_output[$object->entity]; $trackid = 'con'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; @@ -2176,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)); } @@ -491,7 +501,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 +679,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 9bdb1d5a846..33dd0e8e2f7 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) - { - $dir = $conf->contrat->dir_output."/".$ref; - if (file_exists($dir)) - { + if ($conf->contrat->dir_output) { + $dir = $conf->contrat->multidir_output[$this->entity]."/".$ref; + 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,35 +1438,48 @@ 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. } - $txtva = price2num($txtva); $txlocaltax1 = price2num($txlocaltax1); $txlocaltax2 = price2num($txlocaltax2); $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"); @@ -1519,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; @@ -1546,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)."',"; @@ -1564,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++; } @@ -1594,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 { @@ -1658,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 { @@ -1702,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; @@ -1739,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(); @@ -1765,8 +1777,7 @@ class Contrat extends CommonObject } $result = $contractline->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $this->error[] = $contractline->error; $error++; } @@ -1775,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; } @@ -1811,11 +1821,12 @@ 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(); @@ -1825,8 +1836,7 @@ class Contrat extends CommonObject dol_syslog(get_class($this)."::deleteline", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->error = "Error ".$this->db->lasterror(); $error++; } @@ -1836,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; } @@ -1872,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(); @@ -1911,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'); @@ -1924,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 = ''; @@ -1973,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 = ''; @@ -1986,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); @@ -2000,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).'"'; } @@ -2016,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; @@ -2048,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; @@ -2088,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++; @@ -2122,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); @@ -2162,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"; @@ -2191,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(); @@ -2226,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)) { @@ -2260,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"; @@ -2269,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); @@ -2329,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]; @@ -2360,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; @@ -2375,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]; } @@ -2479,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]); } @@ -2547,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++; + } } } @@ -2757,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); @@ -2781,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; } @@ -2805,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,"; @@ -2850,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; @@ -2967,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 @@ -2997,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; @@ -3052,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(); } @@ -3112,8 +3151,7 @@ class ContratLigne extends CommonObjectLine // End call triggers } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -3148,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 { @@ -3179,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)."',"; @@ -3194,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) { @@ -3261,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)."'"; @@ -3272,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; @@ -3330,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 b68da3170ed..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,22 +58,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) { $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(); } -$upload_dir = $conf->contrat->dir_output.'/'.dol_sanitizeFileName($object->ref); +$upload_dir = $conf->contrat->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref); $modulepart = 'contract'; // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -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 .= '
'; @@ -192,7 +195,7 @@ if ($object->id) $permission = $user->rights->contrat->creer; $permtoedit = $user->rights->contrat->creer; $param = '&id='.$object->id; - include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index 5ea558c9689..8ab94ca6793 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 '
'; -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 = ".$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; 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 = ".$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 = ".$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 = ".$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 ca8ccb9bd7d..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), @@ -131,14 +144,8 @@ $arrayfields = array( 'status'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), ); // 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])) - $arrayfields["ef.".$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($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key])); - } -} +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'); @@ -147,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 = ''; @@ -181,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; @@ -204,10 +216,11 @@ $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'; -$sql .= " c.rowid, c.ref, c.datec as date_creation, c.tms as date_update, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier, c.note_private, c.note_public,"; +$sql .= " c.rowid, c.ref, c.datec as date_creation, c.tms as date_update, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier, c.note_private, c.note_public, c.entity,"; $sql .= ' s.rowid as socid, s.nom as name, s.name_alias, s.email, s.town, s.zip, s.fk_pays as country_id, s.client, s.code_client, s.status as company_status, s.logo as company_logo,'; $sql .= " typent.code as typent_code,"; $sql .= " state.code_departement as state_code, state.nom as state_name,"; @@ -219,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(); @@ -229,74 +244,102 @@ $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 $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; -$sql .= " GROUP BY c.rowid, c.ref, c.datec, c.tms, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier, c.note_private, c.note_public,"; +$sql .= " GROUP BY c.rowid, c.ref, c.datec, c.tms, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier, c.note_private, c.note_public, c.entity,"; $sql .= ' s.rowid, s.nom, s.name_alias, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client, s.status, s.logo,'; $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; } @@ -305,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; } @@ -314,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); @@ -332,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 ''; @@ -390,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 '
'; @@ -440,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 @@ -600,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; @@ -620,25 +722,26 @@ while ($i < min($num, $limit)) $socstatic->logo = $obj->logo; $socstatic->country_id = $obj->country_id; $socstatic->country_code = ''; - $socstatic->country_label = '';*/ + $socstatic->country = '';*/ if ($obj->country_id > 0) { if (!isset($cacheCountryIDCode[$obj->country_id]['code'])) { $tmparray = getCountry($obj->country_id, 'all'); $cacheCountryIDCode[$obj->country_id] = array('code'=> empty($tmparray['code']) ? '' : $tmparray['code'], 'label' => empty($tmparray['label']) ? '' : $tmparray['label']); } $socstatic->country_code = $cacheCountryIDCode[$obj->country_id]['code']; - $socstatic->country_label = $cacheCountryIDCode[$obj->country_id]['label']; + $socstatic->country = $cacheCountryIDCode[$obj->country_id]['label']; } print ''; // Ref - if (!empty($arrayfields['c.ref']['checked'])) - { + if (!empty($arrayfields['c.ref']['checked'])) { print ''; @@ -654,84 +757,85 @@ while ($i < min($num, $limit)) 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'])) - { - 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 @@ -765,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 ''; @@ -798,14 +909,17 @@ while ($i < min($num, $limit)) } // Action column print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } print "\n"; $i++; @@ -822,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 67b605d657f..7247dc02c83 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,31 +129,25 @@ $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 -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], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key] < 0) ? 0 : 1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key])); - } -} +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'); @@ -148,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 = ""; @@ -203,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,"; @@ -217,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(); @@ -225,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 = ".$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); @@ -276,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; } @@ -292,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; } @@ -303,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 ''; @@ -351,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').': '; @@ -379,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 '
'; @@ -398,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; @@ -525,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'); @@ -549,8 +629,7 @@ if (!empty($arrayfields['lower_planned_end_date']['checked'])) print ''; @@ -560,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').''; @@ -646,7 +749,7 @@ while ($i < min($num, $limit)) } $filename = dol_sanitizeFileName($obj->ref); - $filedir = $conf->contrat->dir_output.'/'.dol_sanitizeFileName($obj->ref); + $filedir = $conf->contrat->multidir_output[$obj->entity].'/'.dol_sanitizeFileName($obj->ref); $urlsource = $_SERVER['PHP_SELF'].'?id='.$obj->rowid; print $formfile->getDocumentsLink($contracttmp->element, $filename, $filedir); print ''.$contracttmp->getFormatedCustomerRef($obj->ref_customer).''.$obj->ref_supplier.''; + if (!empty($arrayfields['s.nom']['checked'])) { + print ''; if ($obj->socid > 0) { // TODO Use a cache for this string print $socstatic->getNomUrl(1, ''); } print ''.$obj->email.''; print $obj->town; print ''; print $obj->zip; print '".$obj->state_name."'; - print $socstatic->country_label; + 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']; @@ -739,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 @@ -558,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; @@ -576,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 @@ -697,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 ''; @@ -432,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); @@ -483,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); @@ -493,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); @@ -503,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); @@ -520,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( @@ -543,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 1c874fd2418..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,28 +49,34 @@ 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 if (in_array($object->fields[$key]['type'], array('text', 'html'))) { $value = GETPOST($key, 'restricthtml'); } elseif ($object->fields[$key]['type'] == 'date') { - $value = dol_mktime(12, 0, 0, GETPOST($key.'month', 'int'), GETPOST($key.'day', 'int'), GETPOST($key.'year', 'int')); + $value = dol_mktime(12, 0, 0, GETPOST($key.'month', 'int'), GETPOST($key.'day', 'int'), GETPOST($key.'year', 'int')); // for date without hour, we use gmt } elseif ($object->fields[$key]['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')); + $value = dol_mktime(GETPOST($key.'hour', 'int'), GETPOST($key.'min', 'int'), GETPOST($key.'sec', 'int'), GETPOST($key.'month', 'int'), GETPOST($key.'day', 'int'), GETPOST($key.'year', 'int'), 'tzuserrel'); } elseif ($object->fields[$key]['type'] == 'duration') { $value = 60 * 60 * GETPOST($key.'hour', 'int') + 60 * GETPOST($key.'min', 'int'); } elseif (preg_match('/^(integer|price|real|double)/', $object->fields[$key]['type'])) { @@ -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 @@ -158,9 +174,9 @@ if ($action == 'update' && !empty($permissiontoadd)) $value = GETPOST($key, 'restricthtml'); } } elseif ($object->fields[$key]['type'] == 'date') { - $value = dol_mktime(12, 0, 0, GETPOST($key.'month'), GETPOST($key.'day'), GETPOST($key.'year')); + $value = dol_mktime(12, 0, 0, GETPOST($key.'month', 'int'), GETPOST($key.'day', 'int'), GETPOST($key.'year', 'int')); // for date without hour, we use gmt } elseif ($object->fields[$key]['type'] == 'datetime') { - $value = dol_mktime(GETPOST($key.'hour'), GETPOST($key.'min'), 0, GETPOST($key.'month'), GETPOST($key.'day'), GETPOST($key.'year')); + $value = dol_mktime(GETPOST($key.'hour', 'int'), GETPOST($key.'min', 'int'), GETPOST($key.'sec', 'int'), GETPOST($key.'month', 'int'), GETPOST($key.'day', 'int'), GETPOST($key.'year', 'int'), 'tzuserrel'); } elseif ($object->fields[$key]['type'] == 'duration') { if (GETPOST($key.'hour', 'int') != '' || GETPOST($key.'min', 'int') != '') { $value = 60 * 60 * GETPOST($key.'hour', 'int') + 60 * GETPOST($key.'min', 'int'); @@ -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 356eb36a04b..c7954384fae 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -3,7 +3,7 @@ * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2018 Juanjo Menent * Copyright (C) 2019 Ferran Marcet - * Copyright (C) 2019 Frédéric France + * Copyright (C) 2019-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 @@ -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,59 +1165,85 @@ 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) - { + if ($result == 0) { $langs->load("errors"); setEventMessages($langs->trans("ErrorObjectMustHaveStatusDraftToBeValidated", $objecttmp->ref), null, 'errors'); $error++; break; - } elseif ($result < 0) - { + } elseif ($result < 0) { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; break; - } else $nbok++; + } else { + // validate() rename pdf but do not regenerate + // Define output language + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + $outputlangs = $langs; + $newlang = ''; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { + $newlang = GETPOST('lang_id', 'aZ09'); + } + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) { + $newlang = $objecttmp->thirdparty->default_lang; + } + if (!empty($newlang)) { + $outputlangs = new Translate("", $conf); + $outputlangs->setDefaultLang($newlang); + $outputlangs->load('products'); + } + $model = $objecttmp->model_pdf; + $ret = $objecttmp->fetch($objecttmp->id); // Reload to get new records + // To be sure vars is defined + $hidedetails = !empty($hidedetails) ? $hidedetails : 0; + $hidedesc = !empty($hidedesc) ? $hidedesc : 0; + $hideref = !empty($hideref) ? $hideref : 0; + $moreparams = !empty($moreparams) ? $moreparams : null; + + $result = $objecttmp->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); + if ($result < 0) { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + } + } + $nbok++; + } } else { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; @@ -1129,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(); @@ -1141,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); @@ -1150,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++; @@ -1164,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(); @@ -1237,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++; @@ -1281,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 24220f79f8c..797bb8e4cb7 100644 --- a/htdocs/core/actions_setmoduleoptions.inc.php +++ b/htdocs/core/actions_setmoduleoptions.inc.php @@ -21,96 +21,107 @@ * \brief Code for actions on setting notes of object page */ - +// $error must have been initialized to 0 // $action must be defined // $arrayofparameters must be set for action 'update' // $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(); - $ok = true; - 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) - { - $ok = false; + 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)) $texttitle .= img_warning($langs->trans("ErrorDirNotFound", $tmpdir), 0); - else { + if (!is_dir($tmpdir)) { + if (empty($nomessageinsetmoduleoptions)) { + setEventMessages($langs->trans("ErrorDirNotFound", $tmpdir), null, 'warnings'); + } + } 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 d9c26620553..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,26 @@ 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 - 1; + 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'; $HEIGHT = '192'; @@ -128,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; @@ -171,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; @@ -212,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"; + $out .= $this->getJSListDependancies(); } $out .= ' '."\n"; @@ -7008,6 +7550,80 @@ abstract class CommonObject return $out; } + /** + * @param string $type Type for prefix + * @return string Javacript code to manage dependency + */ + public function getJSListDependancies($type = '_extra') + { + $out = ' + '."\n"; + return $out; + } /** * Returns the rights used for this class @@ -7018,7 +7634,9 @@ abstract class CommonObject global $user; $element = $this->element; - if ($element == 'facturerec') $element = 'facture'; + if ($element == 'facturerec') { + $element = 'facture'; + } return $user->rights->{$element}; } @@ -7037,13 +7655,13 @@ abstract class CommonObject */ public static function commonReplaceThirdparty(DoliDB $db, $origin_id, $dest_id, array $tables, $ignoreerrors = 0) { - foreach ($tables as $table) - { - $sql = 'UPDATE '.MAIN_DB_PREFIX.$table.' SET fk_soc = '.$dest_id.' WHERE fk_soc = '.$origin_id; + foreach ($tables as $table) { + $sql = 'UPDATE '.MAIN_DB_PREFIX.$table.' SET fk_soc = '.((int) $dest_id).' WHERE fk_soc = '.((int) $origin_id); - if (!$db->query($sql)) - { - if ($ignoreerrors) return true; // TODO Not enough. If there is A-B on kept thirdarty and B-C on old one, we must get A-B-C after merge. Not A-B. + if (!$db->query($sql)) { + if ($ignoreerrors) { + return true; // TODO Not enough. If there is A-B on kept thirdarty and B-C on old one, we must get A-B-C after merge. Not A-B. + } //$this->errors = $db->lasterror(); return false; } @@ -7070,55 +7688,44 @@ abstract class CommonObject $buyPrice = 0; - if (($unitPrice > 0) && (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)) // In most cases, test here is false - { + if (($unitPrice > 0) && (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull > 0)) { + // When ForceBuyingPriceIfNull is set $buyPrice = $unitPrice * (1 - $discountPercent / 100); } else { // Get cost price for margin calculation - if (!empty($fk_product)) - { - if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'costprice') - { + if (!empty($fk_product)) { + if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'costprice') { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $product = new Product($this->db); $result = $product->fetch($fk_product); - if ($result <= 0) - { + if ($result <= 0) { $this->errors[] = 'ErrorProductIdDoesNotExists'; return -1; } - if ($product->cost_price > 0) - { + if ($product->cost_price > 0) { $buyPrice = $product->cost_price; - } elseif ($product->pmp > 0) - { + } elseif ($product->pmp > 0) { $buyPrice = $product->pmp; } - } elseif (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'pmp') - { + } elseif (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'pmp') { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $product = new Product($this->db); $result = $product->fetch($fk_product); - if ($result <= 0) - { + if ($result <= 0) { $this->errors[] = 'ErrorProductIdDoesNotExists'; return -1; } - if ($product->pmp > 0) - { + if ($product->pmp > 0) { $buyPrice = $product->pmp; } } - if (empty($buyPrice) && isset($conf->global->MARGIN_TYPE) && in_array($conf->global->MARGIN_TYPE, array('1', 'pmp', 'costprice'))) - { + if (empty($buyPrice) && isset($conf->global->MARGIN_TYPE) && in_array($conf->global->MARGIN_TYPE, array('1', 'pmp', 'costprice'))) { require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; $productFournisseur = new ProductFournisseur($this->db); - if (($result = $productFournisseur->find_min_price_product_fournisseur($fk_product)) > 0) - { + if (($result = $productFournisseur->find_min_price_product_fournisseur($fk_product)) > 0) { $buyPrice = $productFournisseur->fourn_unitprice; - } elseif ($result < 0) - { + } elseif ($result < 0) { $this->errors[] = $productFournisseur->error; return -2; } @@ -7215,34 +7822,45 @@ abstract class CommonObject if ($size == 1 || $size == 'small') { // Format vignette // Find name of thumb file $photo_vignette = basename(getImageFileNameForSize($dir.$file, '_small')); - if (!dol_is_file($dirthumb.$photo_vignette)) $photo_vignette = ''; + if (!dol_is_file($dirthumb.$photo_vignette)) { + $photo_vignette = ''; + } // Get filesize of original file $imgarray = dol_getImageSize($dir.$photo); - if ($nbbyrow > 0) - { - if ($nbphoto == 1) $return .= ''; + if ($nbbyrow > 0) { + if ($nbphoto == 1) { + $return .= '
'; + } - if ($nbphoto % $nbbyrow == 1) $return .= ''; + if ($nbphoto % $nbbyrow == 1) { + $return .= ''; + } $return .= ''; - if (($nbphoto % $nbbyrow) == 0) $return .= ''; - } elseif ($nbbyrow < 0) $return .= ''; + if (($nbphoto % $nbbyrow) == 0) { + $return .= ''; + } + } elseif ($nbbyrow < 0) { + $return .= ''; + } } if (empty($size)) { // Format origine $return .= ''; - if ($showfilename) $return .= '
'.$viewfilename; - if ($showaction) - { + if ($showfilename) { + $return .= '
'.$viewfilename; + } + if ($showaction) { // Special case for product - if ($modulepart == 'product' && ($user->rights->produit->creer || $user->rights->service->creer)) - { + if ($modulepart == 'product' && ($user->rights->produit->creer || $user->rights->service->creer)) { // Link to resize $return .= ''.img_picto($langs->trans("Resize"), 'resize', '').'   '; @@ -7319,22 +7941,23 @@ abstract class CommonObject } // On continue ou on arrete de boucler ? - if ($nbmax && $nbphoto >= $nbmax) break; + if ($nbmax && $nbphoto >= $nbmax) { + break; + } } } - if ($size == 1 || $size == 'small') - { - if ($nbbyrow > 0) - { + if ($size == 1 || $size == 'small') { + if ($nbbyrow > 0) { // Ferme tableau - while ($nbphoto % $nbbyrow) - { + while ($nbphoto % $nbbyrow) { $return .= ''; $nbphoto++; } - if ($nbphoto) $return .= '
'; - } elseif ($nbbyrow < 0) $return .= '
'; + } elseif ($nbbyrow < 0) { + $return .= '
'; + } $return .= "\n"; $relativefile = preg_replace('/^\//', '', $pdir.$photo); - if (empty($nolink)) - { + if (empty($nolink)) { $urladvanced = getAdvancedPreviewUrl($modulepart, $relativefile, 0, 'entity='.$this->entity); - if ($urladvanced) $return .= ''; - else $return .= ''; + if ($urladvanced) { + $return .= ''; + } else { + $return .= ''; + } } // Show image (width height=$maxHeight) // Si fichier vignette disponible et image source trop grande, on utilise la vignette, sinon on utilise photo origine $alt = $langs->transnoentitiesnoconv('File').': '.$relativefile; $alt .= ' - '.$langs->transnoentitiesnoconv('Size').': '.$imgarray['width'].'x'.$imgarray['height']; - if ($notitle) $alt = ''; + if ($notitle) { + $alt = ''; + } if ($usesharelink) { if ($val['share']) { @@ -7267,21 +7885,22 @@ abstract class CommonObject } } - if (empty($nolink)) $return .= ''; + if (empty($nolink)) { + $return .= ''; + } $return .= "\n"; - if ($showfilename) $return .= '
'.$viewfilename; - if ($showaction) - { + if ($showfilename) { + $return .= '
'.$viewfilename; + } + if ($showaction) { $return .= '
'; // On propose la generation de la vignette si elle n'existe pas et si la taille est superieure aux limites - if ($photo_vignette && (image_format_supported($photo) > 0) && ($this->imgWidth > $maxWidth || $this->imgHeight > $maxHeight)) - { + if ($photo_vignette && (image_format_supported($photo) > 0) && ($this->imgWidth > $maxWidth || $this->imgHeight > $maxHeight)) { $return .= ''.img_picto($langs->trans('GenerateThumb'), 'refresh').'  '; } // Special cas for product - if ($modulepart == 'product' && ($user->rights->produit->creer || $user->rights->service->creer)) - { + if ($modulepart == 'product' && ($user->rights->produit->creer || $user->rights->service->creer)) { // Link to resize $return .= ''.img_picto($langs->trans("Resize"), 'resize', '').'   '; @@ -7292,22 +7911,25 @@ abstract class CommonObject } $return .= "\n"; - if ($nbbyrow > 0) - { + if ($nbbyrow > 0) { $return .= '
 
'; + if ($nbphoto) { + $return .= '
'; + } } } } @@ -7354,8 +7977,11 @@ abstract class CommonObject protected function isArray($info) { if (is_array($info)) { - if (isset($info['type']) && $info['type'] == 'array') return true; - else return false; + if (isset($info['type']) && $info['type'] == 'array') { + return true; + } else { + return false; + } } return false; } @@ -7368,7 +7994,9 @@ abstract class CommonObject */ public function isDate($info) { - if (isset($info['type']) && ($info['type'] == 'date' || $info['type'] == 'datetime' || $info['type'] == 'timestamp')) return true; + if (isset($info['type']) && ($info['type'] == 'date' || $info['type'] == 'datetime' || $info['type'] == 'timestamp')) { + return true; + } return false; } @@ -7381,9 +8009,14 @@ abstract class CommonObject public function isDuration($info) { if (is_array($info)) { - if (isset($info['type']) && ($info['type'] == 'duration')) return true; - else return false; - } else return false; + if (isset($info['type']) && ($info['type'] == 'duration')) { + return true; + } else { + return false; + } + } else { + return false; + } } /** @@ -7395,9 +8028,14 @@ abstract class CommonObject public function isInt($info) { if (is_array($info)) { - if (isset($info['type']) && ($info['type'] == 'int' || preg_match('/^integer/i', $info['type']))) return true; - else return false; - } else return false; + if (isset($info['type']) && ($info['type'] == 'int' || preg_match('/^integer/i', $info['type']))) { + return true; + } else { + return false; + } + } else { + return false; + } } /** @@ -7409,8 +8047,11 @@ abstract class CommonObject public function isFloat($info) { if (is_array($info)) { - if (isset($info['type']) && (preg_match('/^(double|real|price)/i', $info['type']))) return true; - else return false; + if (isset($info['type']) && (preg_match('/^(double|real|price)/i', $info['type']))) { + return true; + } else { + return false; + } } return false; } @@ -7424,8 +8065,11 @@ abstract class CommonObject public function isText($info) { if (is_array($info)) { - if (isset($info['type']) && $info['type'] == 'text') return true; - else return false; + if (isset($info['type']) && $info['type'] == 'text') { + return true; + } else { + return false; + } } return false; } @@ -7439,8 +8083,11 @@ abstract class CommonObject protected function canBeNull($info) { if (is_array($info)) { - if (isset($info['notnull']) && $info['notnull'] != '1') return true; - else return false; + if (isset($info['notnull']) && $info['notnull'] != '1') { + return true; + } else { + return false; + } } return true; } @@ -7454,8 +8101,11 @@ abstract class CommonObject protected function isForcedToNullIfZero($info) { if (is_array($info)) { - if (isset($info['notnull']) && $info['notnull'] == '-1') return true; - else return false; + if (isset($info['notnull']) && $info['notnull'] == '-1') { + return true; + } else { + return false; + } } return false; } @@ -7469,8 +8119,11 @@ abstract class CommonObject protected function isIndex($info) { if (is_array($info)) { - if (isset($info['index']) && $info['index'] == true) return true; - else return false; + if (isset($info['index']) && $info['index'] == true) { + return true; + } else { + return false; + } } return false; } @@ -7488,18 +8141,15 @@ abstract class CommonObject global $conf; $queryarray = array(); - foreach ($this->fields as $field => $info) // Loop on definition of fields - { + foreach ($this->fields as $field => $info) { // Loop on definition of fields // Depending on field type ('datetime', ...) - if ($this->isDate($info)) - { + if ($this->isDate($info)) { if (empty($this->{$field})) { $queryarray[$field] = null; } else { $queryarray[$field] = $this->db->idate($this->{$field}); } - } elseif ($this->isArray($info)) - { + } elseif ($this->isArray($info)) { if (!empty($this->{$field})) { if (!is_array($this->{$field})) { $this->{$field} = array($this->{$field}); @@ -7508,8 +8158,7 @@ abstract class CommonObject } else { $queryarray[$field] = null; } - } elseif ($this->isDuration($info)) - { + } elseif ($this->isDuration($info)) { // $this->{$field} may be null, '', 0, '0', 123, '123' if ((isset($this->{$field}) && $this->{$field} != '') || !empty($info['notnull'])) { if (!isset($this->{$field})) { @@ -7517,12 +8166,13 @@ abstract class CommonObject } else { $queryarray[$field] = (int) $this->{$field}; // If '0', it may be set to null later if $info['notnull'] == -1 } + } else { + $queryarray[$field] = null; } - else $queryarray[$field] = null; - } elseif ($this->isInt($info) || $this->isFloat($info)) - { - if ($field == 'entity' && is_null($this->{$field})) $queryarray[$field] = $conf->entity; - else { + } elseif ($this->isInt($info) || $this->isFloat($info)) { + if ($field == 'entity' && is_null($this->{$field})) { + $queryarray[$field] = $conf->entity; + } else { // $this->{$field} may be null, '', 0, '0', 123, '123' if ((isset($this->{$field}) && $this->{$field} != '') || !empty($info['notnull'])) { if (!isset($this->{$field})) { @@ -7532,14 +8182,20 @@ abstract class CommonObject } elseif ($this->isFloat($info)) { $queryarray[$field] = (double) $this->{$field}; // If '0', it may be set to null later if $info['notnull'] == -1 } - } else $queryarray[$field] = null; + } else { + $queryarray[$field] = null; + } } } else { $queryarray[$field] = $this->{$field}; } - if ($info['type'] == 'timestamp' && empty($queryarray[$field])) unset($queryarray[$field]); - if (!empty($info['notnull']) && $info['notnull'] == -1 && empty($queryarray[$field])) $queryarray[$field] = null; // May force 0 to null + if ($info['type'] == 'timestamp' && empty($queryarray[$field])) { + unset($queryarray[$field]); + } + if (!empty($info['notnull']) && $info['notnull'] == -1 && empty($queryarray[$field])) { + $queryarray[$field] = null; // May force 0 to null + } } return $queryarray; @@ -7553,26 +8209,35 @@ abstract class CommonObject */ public function setVarsFromFetchObj(&$obj) { - foreach ($this->fields as $field => $info) - { + global $db; + + foreach ($this->fields as $field => $info) { if ($this->isDate($info)) { - if (empty($obj->{$field}) || $obj->{$field} === '0000-00-00 00:00:00' || $obj->{$field} === '1000-01-01 00:00:00') $this->{$field} = 0; - else $this->{$field} = strtotime($obj->{$field}); - } elseif ($this->isArray($info)) - { + if (is_null($obj->{$field}) || $obj->{$field} === '' || $obj->{$field} === '0000-00-00 00:00:00' || $obj->{$field} === '1000-01-01 00:00:00') { + $this->{$field} = ''; + } else { + $this->{$field} = $db->jdate($obj->{$field}); + } + } elseif ($this->isArray($info)) { if (!empty($obj->{$field})) { $this->{$field} = @unserialize($obj->{$field}); // Hack for data not in UTF8 - if ($this->{$field } === false) @unserialize(utf8_decode($obj->{$field})); + if ($this->{$field } === false) { + @unserialize(utf8_decode($obj->{$field})); + } } else { $this->{$field} = array(); } } elseif ($this->isInt($info)) { - if ($field == 'rowid') $this->id = (int) $obj->{$field}; - else { + if ($field == 'rowid') { + $this->id = (int) $obj->{$field}; + } else { if ($this->isForcedToNullIfZero($info)) { - if (empty($obj->{$field})) $this->{$field} = null; - else $this->{$field} = (double) $obj->{$field}; + if (empty($obj->{$field})) { + $this->{$field} = null; + } else { + $this->{$field} = (double) $obj->{$field}; + } } else { if (!is_null($obj->{$field}) || (isset($info['notnull']) && $info['notnull'] == 1)) { $this->{$field} = (int) $obj->{$field}; @@ -7583,8 +8248,11 @@ abstract class CommonObject } } elseif ($this->isFloat($info)) { if ($this->isForcedToNullIfZero($info)) { - if (empty($obj->{$field})) $this->{$field} = null; - else $this->{$field} = (double) $obj->{$field}; + if (empty($obj->{$field})) { + $this->{$field} = null; + } else { + $this->{$field} = (double) $obj->{$field}; + } } else { if (!is_null($obj->{$field}) || (isset($info['notnull']) && $info['notnull'] == 1)) { $this->{$field} = (double) $obj->{$field}; @@ -7598,18 +8266,29 @@ abstract class CommonObject } // If there is no 'ref' field, we force property ->ref to ->id for a better compatibility with common functions. - if (!isset($this->fields['ref']) && isset($this->id)) $this->ref = $this->id; + if (!isset($this->fields['ref']) && isset($this->id)) { + $this->ref = $this->id; + } } /** * Function to concat keys of fields * - * @return string + * @param string $alias String of alias of table for fields. For example 't'. + * @return string list of alias fields */ - protected function getFieldList() + public function getFieldList($alias = '') { $keys = array_keys($this->fields); - return implode(',', $keys); + if (!empty($alias)) { + $keys_with_alias = array(); + foreach ($keys as $fieldname) { + $keys_with_alias[] = $alias . '.' . $fieldname; + } + return implode(',', $keys_with_alias); + } else { + return implode(',', $keys); + } } /** @@ -7621,13 +8300,19 @@ abstract class CommonObject */ protected function quote($value, $fieldsentry) { - if (is_null($value)) return 'NULL'; - elseif (preg_match('/^(int|double|real|price)/i', $fieldsentry['type'])) return $this->db->escape("$value"); - elseif ($fieldsentry['type'] == 'boolean') { - if ($value) return 'true'; - else return 'false'; + if (is_null($value)) { + return 'NULL'; + } elseif (preg_match('/^(int|double|real|price)/i', $fieldsentry['type'])) { + return $this->db->escape("$value"); + } elseif ($fieldsentry['type'] == 'boolean') { + if ($value) { + return 'true'; + } else { + return 'false'; + } + } else { + return "'".$this->db->escape($value)."'"; } - else return "'".$this->db->escape($value)."'"; } @@ -7649,10 +8334,16 @@ abstract class CommonObject $fieldvalues = $this->setSaveQuery(); - if (array_key_exists('date_creation', $fieldvalues) && empty($fieldvalues['date_creation'])) $fieldvalues['date_creation'] = $this->db->idate($now); - if (array_key_exists('fk_user_creat', $fieldvalues) && !($fieldvalues['fk_user_creat'] > 0)) $fieldvalues['fk_user_creat'] = $user->id; + if (array_key_exists('date_creation', $fieldvalues) && empty($fieldvalues['date_creation'])) { + $fieldvalues['date_creation'] = $this->db->idate($now); + } + if (array_key_exists('fk_user_creat', $fieldvalues) && !($fieldvalues['fk_user_creat'] > 0)) { + $fieldvalues['fk_user_creat'] = $user->id; + } unset($fieldvalues['rowid']); // The field 'rowid' is reserved field name for autoincrement field so we don't need it into insert. - if (array_key_exists('ref', $fieldvalues)) $fieldvalues['ref'] = dol_string_nospecial($fieldvalues['ref']); // If field is a ref, we sanitize data + if (array_key_exists('ref', $fieldvalues)) { + $fieldvalues['ref'] = dol_string_nospecial($fieldvalues['ref']); // If field is a ref, we sanitize data + } $keys = array(); $values = array(); // Array to store string forged for SQL syntax @@ -7663,38 +8354,45 @@ abstract class CommonObject } // Clean and check mandatory - foreach ($keys as $key) - { + foreach ($keys as $key) { // If field is an implicit foreign key field - if (preg_match('/^integer:/i', $this->fields[$key]['type']) && $values[$key] == '-1') $values[$key] = ''; - if (!empty($this->fields[$key]['foreignkey']) && $values[$key] == '-1') $values[$key] = ''; + if (preg_match('/^integer:/i', $this->fields[$key]['type']) && $values[$key] == '-1') { + $values[$key] = ''; + } + if (!empty($this->fields[$key]['foreignkey']) && $values[$key] == '-1') { + $values[$key] = ''; + } - if (isset($this->fields[$key]['notnull']) && $this->fields[$key]['notnull'] == 1 && (!isset($values[$key]) || $values[$key] === 'NULL') && is_null($this->fields[$key]['default'])) - { + if (isset($this->fields[$key]['notnull']) && $this->fields[$key]['notnull'] == 1 && (!isset($values[$key]) || $values[$key] === 'NULL') && is_null($this->fields[$key]['default'])) { $error++; $this->errors[] = $langs->trans("ErrorFieldRequired", $this->fields[$key]['label']); } // If value is null and there is a default value for field - if (isset($this->fields[$key]['notnull']) && $this->fields[$key]['notnull'] == 1 && (!isset($values[$key]) || $values[$key] === 'NULL') && !is_null($this->fields[$key]['default'])) - { + if (isset($this->fields[$key]['notnull']) && $this->fields[$key]['notnull'] == 1 && (!isset($values[$key]) || $values[$key] === 'NULL') && !is_null($this->fields[$key]['default'])) { $values[$key] = $this->fields[$key]['default']; } // If field is an implicit foreign key field if (preg_match('/^integer:/i', $this->fields[$key]['type']) && empty($values[$key])) { - if (isset($this->fields[$key]['default'])) $values[$key] = $this->fields[$key]['default']; - else $values[$key] = 'null'; + if (isset($this->fields[$key]['default'])) { + $values[$key] = $this->fields[$key]['default']; + } else { + $values[$key] = 'null'; + } + } + if (!empty($this->fields[$key]['foreignkey']) && empty($values[$key])) { + $values[$key] = 'null'; } - if (!empty($this->fields[$key]['foreignkey']) && empty($values[$key])) $values[$key] = 'null'; } - if ($error) return -1; + if ($error) { + return -1; + } $this->db->begin(); - if (!$error) - { + if (!$error) { $sql = 'INSERT INTO '.MAIN_DB_PREFIX.$this->table_element; $sql .= ' ('.implode(", ", $keys).')'; $sql .= ' VALUES ('.implode(", ", $values).')'; @@ -7706,21 +8404,17 @@ abstract class CommonObject } } - if (!$error) - { + if (!$error) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); } // If we have a field ref with a default value of (PROV) - if (!$error) - { - if (key_exists('ref', $this->fields) && $this->fields['ref']['notnull'] > 0 && !is_null($this->fields['ref']['default']) && $this->fields['ref']['default'] == '(PROV)') - { - $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET ref = '(PROV".$this->id.")' WHERE (ref = '(PROV)' OR ref = '') AND rowid = ".$this->id; + if (!$error) { + if (key_exists('ref', $this->fields) && $this->fields['ref']['notnull'] > 0 && !is_null($this->fields['ref']['default']) && $this->fields['ref']['default'] == '(PROV)') { + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET ref = '(PROV".$this->id.")' WHERE (ref = '(PROV)' OR ref = '') AND rowid = ".((int) $this->id); $resqlupdate = $this->db->query($sql); - if ($resqlupdate === false) - { + if ($resqlupdate === false) { $error++; $this->errors[] = $this->db->lasterror(); } else { @@ -7730,18 +8424,17 @@ abstract class CommonObject } // Create extrafields - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } // Create lines - if (!empty($this->table_element_line) && !empty($this->fk_element)) - { + if (!empty($this->table_element_line) && !empty($this->fk_element)) { $num = (is_array($this->lines) ? count($this->lines) : 0); - for ($i = 0; $i < $num; $i++) - { + for ($i = 0; $i < $num; $i++) { $line = $this->lines[$i]; $keyforparent = $this->fk_element; @@ -7749,11 +8442,12 @@ abstract class CommonObject // 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; + } $result = $line->create($user, 1); - if ($result < 0) - { + if ($result < 0) { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -7762,11 +8456,12 @@ abstract class CommonObject } // Triggers - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call triggers $result = $this->call_trigger(strtoupper(get_class($this)).'_CREATE', $user); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } // End call triggers } @@ -7791,27 +8486,37 @@ abstract class CommonObject */ public function fetchCommon($id, $ref = null, $morewhere = '') { - if (empty($id) && empty($ref) && empty($morewhere)) return -1; + if (empty($id) && empty($ref) && empty($morewhere)) { + return -1; + } - $fieldlist = $this->getFieldList(); - if (empty($fieldlist)) return 0; + $fieldlist = $this->getFieldList('t'); + if (empty($fieldlist)) { + return 0; + } $sql = 'SELECT '.$fieldlist; - $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element; + $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; - if (!empty($id)) $sql .= ' WHERE rowid = '.$id; - elseif (!empty($ref)) $sql .= " WHERE ref = ".$this->quote($ref, $this->fields['ref']); - else $sql .= ' WHERE 1 = 1'; // usage with empty id and empty ref is very rare - if (empty($id) && isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) $sql .= ' AND entity IN ('.getEntity($this->table_element).')'; - if ($morewhere) $sql .= $morewhere; + if (!empty($id)) { + $sql .= ' WHERE t.rowid = '.((int) $id); + } elseif (!empty($ref)) { + $sql .= " WHERE t.ref = ".$this->quote($ref, $this->fields['ref']); + } else { + $sql .= ' WHERE 1 = 1'; // usage with empty id and empty ref is very rare + } + if (empty($id) && isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) { + $sql .= ' AND t.entity IN ('.getEntity($this->table_element).')'; + } + if ($morewhere) { + $sql .= $morewhere; + } $sql .= ' LIMIT 1'; // This is a fetch, to be sure to get only one record $res = $this->db->query($sql); - if ($res) - { + if ($res) { $obj = $this->db->fetch_object($res); - if ($obj) - { + if ($obj) { $this->setVarsFromFetchObj($obj); // Retrieve all extrafield @@ -7838,32 +8543,30 @@ abstract class CommonObject public function fetchLinesCommon($morewhere = '') { $objectlineclassname = get_class($this).'Line'; - if (!class_exists($objectlineclassname)) - { + if (!class_exists($objectlineclassname)) { $this->error = 'Error, class '.$objectlineclassname.' not found during call of fetchLinesCommon'; return -1; } $objectline = new $objectlineclassname($this->db); - $sql = 'SELECT '.$objectline->getFieldList(); - $sql .= ' FROM '.MAIN_DB_PREFIX.$objectline->table_element; - $sql .= ' WHERE fk_'.$this->element.' = '.$this->id; - if ($morewhere) $sql .= $morewhere; + $sql = 'SELECT '.$objectline->getFieldList('l'); + $sql .= ' FROM '.MAIN_DB_PREFIX.$objectline->table_element.' as l'; + $sql .= ' WHERE l.fk_'.$this->element.' = '.$this->id; + if ($morewhere) { + $sql .= $morewhere; + } if (isset($objectline->fields['position'])) { $sql .= $this->db->order('position', 'ASC'); } $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $num_rows = $this->db->num_rows($resql); $i = 0; - while ($i < $num_rows) - { + while ($i < $num_rows) { $obj = $this->db->fetch_object($resql); - if ($obj) - { + if ($obj) { $newline = new $objectlineclassname($this->db); $newline->setVarsFromFetchObj($obj); @@ -7898,10 +8601,16 @@ abstract class CommonObject $fieldvalues = $this->setSaveQuery(); - if (array_key_exists('date_modification', $fieldvalues) && empty($fieldvalues['date_modification'])) $fieldvalues['date_modification'] = $this->db->idate($now); - if (array_key_exists('fk_user_modif', $fieldvalues) && !($fieldvalues['fk_user_modif'] > 0)) $fieldvalues['fk_user_modif'] = $user->id; + if (array_key_exists('date_modification', $fieldvalues) && empty($fieldvalues['date_modification'])) { + $fieldvalues['date_modification'] = $this->db->idate($now); + } + if (array_key_exists('fk_user_modif', $fieldvalues) && !($fieldvalues['fk_user_modif'] > 0)) { + $fieldvalues['fk_user_modif'] = $user->id; + } unset($fieldvalues['rowid']); // The field 'rowid' is reserved field name for autoincrement field so we don't need it into update. - if (array_key_exists('ref', $fieldvalues)) $fieldvalues['ref'] = dol_string_nospecial($fieldvalues['ref']); // If field is a ref, we sanitize data + if (array_key_exists('ref', $fieldvalues)) { + $fieldvalues['ref'] = dol_string_nospecial($fieldvalues['ref']); // If field is a ref, we sanitize data + } // Add quotes and escape on fields with type string $keys = array(); @@ -7915,10 +8624,13 @@ abstract class CommonObject } // Clean and check mandatory fields - foreach ($keys as $key) - { - if (preg_match('/^integer:/i', $this->fields[$key]['type']) && $values[$key] == '-1') $values[$key] = ''; // This is an implicit foreign key field - if (!empty($this->fields[$key]['foreignkey']) && $values[$key] == '-1') $values[$key] = ''; // This is an explicit foreign key field + foreach ($keys as $key) { + if (preg_match('/^integer:/i', $this->fields[$key]['type']) && $values[$key] == '-1') { + $values[$key] = ''; // This is an implicit foreign key field + } + if (!empty($this->fields[$key]['foreignkey']) && $values[$key] == '-1') { + $values[$key] = ''; // This is an explicit foreign key field + } //var_dump($key.'-'.$values[$key].'-'.($this->fields[$key]['notnull'] == 1)); /* @@ -7929,35 +8641,32 @@ abstract class CommonObject }*/ } - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET '.implode(', ', $tmp).' WHERE rowid='.$this->id; + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET '.implode(', ', $tmp).' WHERE rowid='.((int) $this->id); $this->db->begin(); - if (!$error) - { + if (!$error) { $res = $this->db->query($sql); - if ($res === false) - { + if ($res === false) { $error++; $this->errors[] = $this->db->lasterror(); } } // Update extrafield - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } // Triggers - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) { // Call triggers $result = $this->call_trigger(strtoupper(get_class($this)).'_MODIFY', $user); - if ($result < 0) { $error++; } //Do also here what you must do to rollback action if trigger fail + if ($result < 0) { + $error++; + } //Do also here what you must do to rollback action if trigger fail // End call triggers } @@ -7987,25 +8696,20 @@ abstract class CommonObject $this->db->begin(); - if ($forcechilddeletion) // Force also delete of childtables that should lock deletion in standard case when option force is off - { - foreach ($this->childtables as $table) - { + if ($forcechilddeletion) { // Force also delete of childtables that should lock deletion in standard case when option force is off + foreach ($this->childtables as $table) { $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$table.' WHERE '.$this->fk_element.' = '.$this->id; $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->error = $this->db->lasterror(); $this->errors[] = $this->error; $this->db->rollback(); return -1; } } - } elseif (!empty($this->fk_element) && !empty($this->childtables)) // If object has childs linked with a foreign key field, we check all child tables. - { + } elseif (!empty($this->fk_element) && !empty($this->childtables)) { // If object has childs linked with a foreign key field, we check all child tables. $objectisused = $this->isObjectUsed($this->id); - if (!empty($objectisused)) - { + if (!empty($objectisused)) { dol_syslog(get_class($this)."::deleteCommon Can't delete record as it has some child", LOG_WARNING); $this->error = 'ErrorRecordHasChildren'; $this->errors[] = $this->error; @@ -8016,8 +8720,7 @@ abstract class CommonObject // Delete cascade first if (is_array($this->childtablesoncascade) && !empty($this->childtablesoncascade)) { - foreach ($this->childtablesoncascade as $table) - { + foreach ($this->childtablesoncascade as $table) { $deleteFromObject = explode(':', $table); if (count($deleteFromObject) >= 2) { $className = str_replace('@', '', $deleteFromObject[0]); @@ -8061,7 +8764,9 @@ abstract class CommonObject if (!$notrigger) { // Call triggers $result = $this->call_trigger(strtoupper(get_class($this)).'_DELETE', $user); - if ($result < 0) { $error++; } // Do also here what you must do to rollback action if trigger fail + if ($result < 0) { + $error++; + } // Do also here what you must do to rollback action if trigger fail // End call triggers } } @@ -8074,15 +8779,15 @@ abstract class CommonObject } } - if (!$error && !empty($this->isextrafieldmanaged)) - { + if (!$error && !empty($this->isextrafieldmanaged)) { $result = $this->deleteExtraFields(); - if ($result < 0) { $error++; } + if ($result < 0) { + $error++; + } } - if (!$error) - { - $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element.' WHERE rowid='.$this->id; + if (!$error) { + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element.' WHERE rowid='.((int) $this->id); $res = $this->db->query($sql); if ($res === false) { @@ -8180,7 +8885,9 @@ abstract class CommonObject // Call trigger $result = $this->call_trigger('LINE'.strtoupper($tmpforobjectclass).'_DELETE', $user); - if ($result < 0) return -1; + if ($result < 0) { + return -1; + } // End call triggers $this->db->begin(); @@ -8190,8 +8897,7 @@ abstract class CommonObject dol_syslog(get_class($this)."::deleteLineCommon", LOG_DEBUG); $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->error = "Error ".$this->db->lasterror(); $error++; } @@ -8202,8 +8908,7 @@ abstract class CommonObject if (!isset($tmpobjectline->isextrafieldmanaged) || !empty($tmpobjectline->isextrafieldmanaged)) { $tmpobjectline->id = $idline; $result = $tmpobjectline->deleteExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; $this->error = "Error ".get_class($this)."::deleteLineCommon deleteExtraFields error -4 ".$tmpobjectline->error; } @@ -8237,23 +8942,25 @@ abstract class CommonObject $this->db->begin(); $statusfield = 'status'; - if ($this->element == 'don' || $this->element == 'donation') $statusfield = 'fk_statut'; + if ($this->element == 'don' || $this->element == 'donation') { + $statusfield = 'fk_statut'; + } $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element; $sql .= " SET ".$statusfield." = ".((int) $status); $sql .= " WHERE rowid = ".$this->id; - if ($this->db->query($sql)) - { - if (!$error) - { + if ($this->db->query($sql)) { + if (!$error) { $this->oldcopy = clone $this; } if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger($triggercode, $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } } if (!$error) { @@ -8298,7 +9005,9 @@ abstract class CommonObject 'date' => dol_now(), ); foreach ($fields as $key => $value) { - if (array_key_exists($key, $this->fields)) $this->{$key} = $value; + if (array_key_exists($key, $this->fields)) { + $this->{$key} = $value; + } } return 1; } @@ -8343,7 +9052,9 @@ abstract class CommonObject */ public function trimParameters($parameters) { - if (!is_array($parameters)) return; + if (!is_array($parameters)) { + return; + } foreach ($parameters as $parameter) { if (isset($this->$parameter)) { $this->$parameter = trim($this->$parameter); @@ -8377,18 +9088,26 @@ abstract class CommonObject /** * Sets object to given categories. * - * Deletes object from existing categories not supplied. * Adds it to non existing supplied categories. + * Deletes object from existing categories not supplied (if remove_existing==true). * Existing categories are left untouch. * - * @param int[]|int $categories Category ID or array of Categories IDs - * @param string $type_categ Category type ('customer', 'supplier', 'website_page', ...) + * @param int[]|int $categories Category ID or array of Categories IDs + * @param string $type_categ Category type ('customer', 'supplier', 'website_page', ...) definied into const class Categorie type + * @param boolean $remove_existing True: Remove existings categories from Object if not supplies by $categories, False: let them * @return int <0 if KO, >0 if OK */ - public function setCategoriesCommon($categories, $type_categ) + public function setCategoriesCommon($categories, $type_categ = '', $remove_existing = true) { + dol_syslog(get_class($this)."::setCategoriesCommon Oject Id:".$this->id.' type_categ:'.$type_categ.' nb tag add:'.count($categories), LOG_DEBUG); + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; + if (empty($type_categ)) { + dol_syslog(__METHOD__.': Type '.$type_categ.'is an unknown category type. Done nothing.', LOG_ERR); + return -1; + } + // Handle single category if (!is_array($categories)) { $categories = array($categories); @@ -8397,39 +9116,52 @@ abstract class CommonObject // 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); + if ($remove_existing) { + // 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; + } } else { $to_del = array(); // Nothing to delete - $to_add = $categories; + $to_add = array_diff($categories, $existing); } $error = 0; + $ok=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) - { + $result=$c->del_type($this, $type_categ); + if ($result < 0) { $error++; $this->error = $c->error; $this->errors = $c->errors; break; + } else { + $ok+=$result; + } + } + } + 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; + } else { + $ok+=$result; } } } - return $error ? -1 : 1; + return $error ? -1 * $error : $ok; } /** @@ -8444,7 +9176,9 @@ abstract class CommonObject { $this->db->begin(); - if (empty($type)) $type = $this->table_element; + if (empty($type)) { + $type = $this->table_element; + } require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $categorystatic = new Categorie($this->db); @@ -8453,8 +9187,7 @@ abstract class CommonObject $sql .= " SELECT fk_categorie, $toId FROM ".MAIN_DB_PREFIX."categorie_".(empty($categorystatic->MAP_CAT_TABLE[$type]) ? $type : $categorystatic->MAP_CAT_TABLE[$type]); $sql .= " WHERE fk_product = ".((int) $fromId); - if (!$this->db->query($sql)) - { + if (!$this->db->query($sql)) { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -8534,7 +9267,7 @@ abstract class CommonObject } $sql = 'DELETE FROM '.MAIN_DB_PREFIX."ecm_files"; - $sql .= " WHERE src_object_type = '".$this->db->escape($this->table_element.(empty($this->module) ? '' : '@'.$this->module))."' AND src_object_id = ".$this->id; + $sql .= " WHERE src_object_type = '".$this->db->escape($this->table_element.(empty($this->module) ? '' : '@'.$this->module))."' AND src_object_id = ".((int) $this->id); $resql = $this->db->query($sql); if (!$resql) { $this->error = $this->db->lasterror(); diff --git a/htdocs/core/class/commonobjectline.class.php b/htdocs/core/class/commonobjectline.class.php index 0d4cfbe4f34..f821e5050b1 100644 --- a/htdocs/core/class/commonobjectline.class.php +++ b/htdocs/core/class/commonobjectline.class.php @@ -80,15 +80,21 @@ abstract class CommonObjectLine extends CommonObject $label_type = 'label'; $label_type = 'label'; - if ($type == 'short') $label_type = 'short_label'; - elseif ($type == 'code') $label_type = 'code'; + if ($type == 'short') { + $label_type = 'short_label'; + } elseif ($type == 'code') { + $label_type = 'code'; + } $sql = 'select '.$label_type.', code from '.MAIN_DB_PREFIX.'c_units where rowid='.$this->fk_unit; $resql = $this->db->query($sql); if ($resql && $this->db->num_rows($resql) > 0) { $res = $this->db->fetch_array($resql); - if ($label_type == 'code') $label = 'unit'.$res['code']; - else $label = $res[$label_type]; + if ($label_type == 'code') { + $label = 'unit'.$res['code']; + } else { + $label = $res[$label_type]; + } $this->db->free($resql); return $label; } else { diff --git a/htdocs/core/class/commonstickergenerator.class.php b/htdocs/core/class/commonstickergenerator.class.php index 3a8712ad67d..284b41ee4ba 100644 --- a/htdocs/core/class/commonstickergenerator.class.php +++ b/htdocs/core/class/commonstickergenerator.class.php @@ -121,7 +121,7 @@ abstract class CommonStickerGenerator * @param string $outputdir Output directory for pdf file * @return int 1=OK, 0=KO */ - public abstract function write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir = ''); + abstract public function write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir = ''); // phpcs:enable /** @@ -132,7 +132,7 @@ abstract class CommonStickerGenerator * @param array $param Associative array containing label content and optional parameters * @return void */ - public abstract function addSticker(&$pdf, $outputlangs, $param); + abstract public function addSticker(&$pdf, $outputlangs, $param); // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 09f2b0a44ae..632cfc0311f 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -52,9 +52,11 @@ class Conf public $disable_compute; //! Used to store current currency (ISO code like 'USD', 'EUR', ...) public $currency; + //! Used to store current css (from theme) public $theme; // Contains current theme ("eldy", "auguria", ...) public $css; // Contains full path of css page ("/theme/eldy/style.css.php", ...) + //! Used to store current menu handler public $standard_menu; // List of activated modules @@ -78,6 +80,9 @@ class Conf 'syslog' => array(), ); + // An array to store cache results ->cache['nameofcache']=... + public $cache = array(); + public $logbuffer = array(); /** @@ -96,7 +101,11 @@ class Conf public $dol_hide_leftmenu; // Set if we force param dol_hide_leftmenu into login url public $dol_optimize_smallscreen; // Set if we force param dol_optimize_smallscreen into login url or if browser is smartphone public $dol_no_mouse_hover; // Set if we force param dol_no_mouse_hover into login url or if browser is smartphone - public $dol_use_jmobile; // Set if we force param dol_use_jmobile into login url + public $dol_use_jmobile; // Set if we force param dol_use_jmobile into login url. 0=default, 1=to say we use app from a webview app, 2=to say we use app from a webview app and keep ajax + + public $liste_limit; + + public $tzuserinputkey = 'tzserver'; // Use 'tzuserrel' to always store date in GMT and show date in time zone of user. /** @@ -162,17 +171,14 @@ class Conf $sql .= " ORDER BY entity"; // This is to have entity 0 first, then entity 1 that overwrite. $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $i = 0; $numr = $db->num_rows($resql); - while ($i < $numr) - { + while ($i < $numr) { $objp = $db->fetch_object($resql); $key = $objp->name; $value = $objp->value; - if ($key) - { + if ($key) { // Allow constants values to be overridden by environment variables if (isset($_SERVER['DOLIBARR_'.$key])) { $value = $_SERVER['DOLIBARR_'.$key]; @@ -183,42 +189,53 @@ class Conf //if (! defined("$key")) define("$key", $value); // In some cases, the constant might be already forced (Example: SYSLOG_HANDLERS during install) $this->global->$key = $value; - if ($value && strpos($key, 'MAIN_MODULE_') === 0) - { + if ($value && strpos($key, 'MAIN_MODULE_') === 0) { $reg = array(); // If this is constant for a new tab page activated by a module. It initializes modules_parts['tabs']. - if (preg_match('/^MAIN_MODULE_([0-9A-Z_]+)_TABS_/i', $key)) - { + if (preg_match('/^MAIN_MODULE_([0-9A-Z_]+)_TABS_/i', $key)) { $partname = 'tabs'; $params = explode(':', $value, 2); - if (!is_array($this->modules_parts[$partname])) { $this->modules_parts[$partname] = array(); } + if (!is_array($this->modules_parts[$partname])) { + $this->modules_parts[$partname] = array(); + } $this->modules_parts[$partname][$params[0]][] = $value; // $value may be a string or an array - } - // If this is constant for all generic part activated by a module. It initializes - // modules_parts['login'], modules_parts['menus'], modules_parts['substitutions'], modules_parts['triggers'], modules_parts['tpl'], - // modules_parts['models'], modules_parts['theme'] - // modules_parts['sms'], - // modules_parts['css'], ... - elseif (preg_match('/^MAIN_MODULE_([0-9A-Z_]+)_([A-Z]+)$/i', $key, $reg)) - { + } elseif (preg_match('/^MAIN_MODULE_([0-9A-Z_]+)_([A-Z]+)$/i', $key, $reg)) { + // If this is constant for all generic part activated by a module. It initializes + // modules_parts['login'], modules_parts['menus'], modules_parts['substitutions'], modules_parts['triggers'], modules_parts['tpl'], + // modules_parts['models'], modules_parts['theme'] + // modules_parts['sms'], + // modules_parts['css'], ... + $modulename = strtolower($reg[1]); $partname = strtolower($reg[2]); - if (!isset($this->modules_parts[$partname]) || !is_array($this->modules_parts[$partname])) { $this->modules_parts[$partname] = array(); } + if (!isset($this->modules_parts[$partname]) || !is_array($this->modules_parts[$partname])) { + $this->modules_parts[$partname] = array(); + } $arrValue = json_decode($value, true); - if (is_array($arrValue) && !empty($arrValue)) $value = $arrValue; - elseif (in_array($partname, array('login', 'menus', 'substitutions', 'triggers', 'tpl'))) $value = '/'.$modulename.'/core/'.$partname.'/'; - elseif (in_array($partname, array('models', 'theme'))) $value = '/'.$modulename.'/'; - elseif (in_array($partname, array('sms'))) $value = '/'.$modulename.'/'; - elseif ($value == 1) $value = '/'.$modulename.'/core/modules/'.$partname.'/'; // ex: partname = societe + if (is_array($arrValue) && !empty($arrValue)) { + $value = $arrValue; + } elseif (in_array($partname, array('login', 'menus', 'substitutions', 'triggers', 'tpl'))) { + $value = '/'.$modulename.'/core/'.$partname.'/'; + } elseif (in_array($partname, array('models', 'theme'))) { + $value = '/'.$modulename.'/'; + } elseif (in_array($partname, array('sms'))) { + $value = '/'.$modulename.'/'; + } elseif ($value == 1) { + $value = '/'.$modulename.'/core/modules/'.$partname.'/'; // ex: partname = societe + } $this->modules_parts[$partname] = array_merge($this->modules_parts[$partname], array($modulename => $value)); // $value may be a string or an array - } - // If this is a module constant (must be at end) - elseif (preg_match('/^MAIN_MODULE_([0-9A-Z_]+)$/i', $key, $reg)) - { + } elseif (preg_match('/^MAIN_MODULE_([0-9A-Z_]+)$/i', $key, $reg)) { + // If this is a module constant (must be at end) $modulename = strtolower($reg[1]); - if ($modulename == 'propale') $modulename = 'propal'; - if ($modulename == 'supplierproposal') $modulename = 'supplier_proposal'; - if (!isset($this->$modulename) || !is_object($this->$modulename)) $this->$modulename = new stdClass(); + if ($modulename == 'propale') { + $modulename = 'propal'; + } + if ($modulename == 'supplierproposal') { + $modulename = 'supplier_proposal'; + } + if (!isset($this->$modulename) || !is_object($this->$modulename)) { + $this->$modulename = new stdClass(); + } $this->$modulename->enabled = true; $this->modules[] = $modulename; // Add this module in list of enabled modules } @@ -245,12 +262,10 @@ class Conf // If you can't set timezone of your PHP, set this constant. Better is to set it to UTC. // In future, this constant will be forced to 'UTC' so PHP server timezone will not have effect anymore. //$this->global->MAIN_SERVER_TZ='Europe/Paris'; - if (!empty($this->global->MAIN_SERVER_TZ) && $this->global->MAIN_SERVER_TZ != 'auto') - { + if (!empty($this->global->MAIN_SERVER_TZ) && $this->global->MAIN_SERVER_TZ != 'auto') { try { date_default_timezone_set($this->global->MAIN_SERVER_TZ); - } catch (Exception $e) - { + } catch (Exception $e) { dol_syslog("Error: Bad value for parameter MAIN_SERVER_TZ=".$this->global->MAIN_SERVER_TZ, LOG_ERR); } } @@ -266,36 +281,58 @@ class Conf } // Clean some variables - if (empty($this->global->MAIN_MENU_STANDARD)) $this->global->MAIN_MENU_STANDARD = "eldy_menu.php"; - if (empty($this->global->MAIN_MENUFRONT_STANDARD)) $this->global->MAIN_MENUFRONT_STANDARD = "eldy_menu.php"; - if (empty($this->global->MAIN_MENU_SMARTPHONE)) $this->global->MAIN_MENU_SMARTPHONE = "eldy_menu.php"; // Use eldy by default because smartphone does not work on all phones - if (empty($this->global->MAIN_MENUFRONT_SMARTPHONE)) $this->global->MAIN_MENUFRONT_SMARTPHONE = "eldy_menu.php"; // Use eldy by default because smartphone does not work on all phones - if (!isset($this->global->FACTURE_TVAOPTION)) $this->global->FACTURE_TVAOPTION = 1; + if (empty($this->global->MAIN_MENU_STANDARD)) { + $this->global->MAIN_MENU_STANDARD = "eldy_menu.php"; + } + if (empty($this->global->MAIN_MENUFRONT_STANDARD)) { + $this->global->MAIN_MENUFRONT_STANDARD = "eldy_menu.php"; + } + if (empty($this->global->MAIN_MENU_SMARTPHONE)) { + $this->global->MAIN_MENU_SMARTPHONE = "eldy_menu.php"; // Use eldy by default because smartphone does not work on all phones + } + if (empty($this->global->MAIN_MENUFRONT_SMARTPHONE)) { + $this->global->MAIN_MENUFRONT_SMARTPHONE = "eldy_menu.php"; // Use eldy by default because smartphone does not work on all phones + } + if (!isset($this->global->FACTURE_TVAOPTION)) { + $this->global->FACTURE_TVAOPTION = 1; + } // Variable globales LDAP - if (empty($this->global->LDAP_FIELD_FULLNAME)) $this->global->LDAP_FIELD_FULLNAME = ''; - if (!isset($this->global->LDAP_KEY_USERS)) $this->global->LDAP_KEY_USERS = $this->global->LDAP_FIELD_FULLNAME; - if (!isset($this->global->LDAP_KEY_GROUPS)) $this->global->LDAP_KEY_GROUPS = $this->global->LDAP_FIELD_FULLNAME; - if (!isset($this->global->LDAP_KEY_CONTACTS)) $this->global->LDAP_KEY_CONTACTS = $this->global->LDAP_FIELD_FULLNAME; - if (!isset($this->global->LDAP_KEY_MEMBERS)) $this->global->LDAP_KEY_MEMBERS = $this->global->LDAP_FIELD_FULLNAME; - if (!isset($this->global->LDAP_KEY_MEMBERS_TYPES)) $this->global->LDAP_KEY_MEMBERS_TYPES = $this->global->LDAP_FIELD_FULLNAME; + if (empty($this->global->LDAP_FIELD_FULLNAME)) { + $this->global->LDAP_FIELD_FULLNAME = ''; + } + if (!isset($this->global->LDAP_KEY_USERS)) { + $this->global->LDAP_KEY_USERS = $this->global->LDAP_FIELD_FULLNAME; + } + if (!isset($this->global->LDAP_KEY_GROUPS)) { + $this->global->LDAP_KEY_GROUPS = $this->global->LDAP_FIELD_FULLNAME; + } + if (!isset($this->global->LDAP_KEY_CONTACTS)) { + $this->global->LDAP_KEY_CONTACTS = $this->global->LDAP_FIELD_FULLNAME; + } + if (!isset($this->global->LDAP_KEY_MEMBERS)) { + $this->global->LDAP_KEY_MEMBERS = $this->global->LDAP_FIELD_FULLNAME; + } + if (!isset($this->global->LDAP_KEY_MEMBERS_TYPES)) { + $this->global->LDAP_KEY_MEMBERS_TYPES = $this->global->LDAP_FIELD_FULLNAME; + } // Load translation object with current language - if (empty($this->global->MAIN_LANG_DEFAULT)) $this->global->MAIN_LANG_DEFAULT = "en_US"; + if (empty($this->global->MAIN_LANG_DEFAULT)) { + $this->global->MAIN_LANG_DEFAULT = "en_US"; + } $rootfordata = DOL_DATA_ROOT; $rootforuser = DOL_DATA_ROOT; // If multicompany module is enabled, we redefine the root of data - if (!empty($this->multicompany->enabled) && !empty($this->entity) && $this->entity > 1) - { + if (!empty($this->multicompany->enabled) && !empty($this->entity) && $this->entity > 1) { $rootfordata .= '/'.$this->entity; } // Set standard temporary folder name or global override $rootfortemp = empty($this->global->MAIN_TEMP_DIR) ? $rootfordata : $this->global->MAIN_TEMP_DIR; // Define default dir_output and dir_temp for directories of modules - foreach ($this->modules as $module) - { + foreach ($this->modules as $module) { //var_dump($module); // For multicompany sharings $this->$module->multidir_output = array($this->entity => $rootfordata."/".$module); @@ -306,19 +343,14 @@ class Conf } // External modules storage - if (!empty($this->modules_parts['dir'])) - { - foreach ($this->modules_parts['dir'] as $module => $dirs) - { - if (!empty($this->$module->enabled)) - { - foreach ($dirs as $type => $name) // $type is 'output' or 'temp' - { + if (!empty($this->modules_parts['dir'])) { + foreach ($this->modules_parts['dir'] as $module => $dirs) { + if (!empty($this->$module->enabled)) { + foreach ($dirs as $type => $name) { // $type is 'output' or 'temp' $multidirname = 'multidir_'.$type; $dirname = 'dir_'.$type; - if ($type != 'temp') - { + if ($type != 'temp') { // For multicompany sharings $this->$module->$multidirname = array($this->entity => $rootfordata."/".$name); @@ -374,8 +406,7 @@ class Conf $this->delivery_note->enabled = (!empty($this->global->MAIN_SUBMODULE_DELIVERY) ? $this->global->MAIN_SUBMODULE_DELIVERY : 0); // Module fournisseur - if (!empty($this->fournisseur)) - { + if (!empty($this->fournisseur)) { $this->fournisseur->commande = new stdClass(); $this->fournisseur->commande->multidir_output = array($this->entity => $rootfordata."/fournisseur/commande"); $this->fournisseur->commande->multidir_temp = array($this->entity => $rootfortemp."/fournisseur/commande/temp"); @@ -401,8 +432,7 @@ class Conf $this->fournisseur->payment->dir_temp = $rootfortemp."/fournisseur/payment/temp"; // For backward compatibility // To prepare split of module fournisseur into module 'fournisseur' + supplier_order + supplier_invoice - if (!empty($this->fournisseur->enabled) && empty($this->global->MAIN_USE_NEW_SUPPLIERMOD)) // By default, if module supplier is on, and we don't use yet the new modules, we set artificialy the module properties - { + if (!empty($this->fournisseur->enabled) && empty($this->global->MAIN_USE_NEW_SUPPLIERMOD)) { // By default, if module supplier is on, and we don't use yet the new modules, we set artificially the module properties $this->supplier_order = new stdClass(); $this->supplier_order->enabled = 1; $this->supplier_order->multidir_output = array($this->entity => $rootfordata."/fournisseur/commande"); @@ -431,8 +461,8 @@ class Conf $this->service->dir_temp = $rootfortemp."/produit/temp"; // Module productbatch - $this->productbatch->multidir_output = array($this->entity => $rootfordata."/produitlot"); - $this->productbatch->multidir_temp = array($this->entity => $rootfortemp."/produitlot/temp"); + $this->productbatch->multidir_output = array($this->entity => $rootfordata."/productlot"); + $this->productbatch->multidir_temp = array($this->entity => $rootfortemp."/productlot/temp"); // Module contrat $this->contrat->multidir_output = array($this->entity => $rootfordata."/contract"); @@ -453,30 +483,42 @@ class Conf $this->global->MAIN_MAIL_USE_MULTI_PART = 1; // societe - if (empty($this->global->SOCIETE_CODECLIENT_ADDON)) $this->global->SOCIETE_CODECLIENT_ADDON = "mod_codeclient_leopard"; - if (empty($this->global->SOCIETE_CODECOMPTA_ADDON)) $this->global->SOCIETE_CODECOMPTA_ADDON = "mod_codecompta_panicum"; + if (empty($this->global->SOCIETE_CODECLIENT_ADDON)) { + $this->global->SOCIETE_CODECLIENT_ADDON = "mod_codeclient_leopard"; + } + if (empty($this->global->SOCIETE_CODECOMPTA_ADDON)) { + $this->global->SOCIETE_CODECOMPTA_ADDON = "mod_codecompta_panicum"; + } - if (empty($this->global->CHEQUERECEIPTS_ADDON)) $this->global->CHEQUERECEIPTS_ADDON = 'mod_chequereceipt_mint'; - if (empty($this->global->TICKET_ADDON)) $this->global->TICKET_ADDON = 'mod_ticket_simple'; + if (empty($this->global->CHEQUERECEIPTS_ADDON)) { + $this->global->CHEQUERECEIPTS_ADDON = 'mod_chequereceipt_mint'; + } + if (empty($this->global->TICKET_ADDON)) { + $this->global->TICKET_ADDON = 'mod_ticket_simple'; + } // Security - if (empty($this->global->USER_PASSWORD_GENERATED)) $this->global->USER_PASSWORD_GENERATED = 'standard'; // Default password generator - if (empty($this->global->MAIN_UMASK)) $this->global->MAIN_UMASK = '0664'; // Default mask + if (empty($this->global->USER_PASSWORD_GENERATED)) { + $this->global->USER_PASSWORD_GENERATED = 'standard'; // Default password generator + } + if (empty($this->global->MAIN_UMASK)) { + $this->global->MAIN_UMASK = '0664'; // Default mask + } // conf->use_javascript_ajax $this->use_javascript_ajax = 1; - if (isset($this->global->MAIN_DISABLE_JAVASCRIPT)) $this->use_javascript_ajax = !$this->global->MAIN_DISABLE_JAVASCRIPT; + if (isset($this->global->MAIN_DISABLE_JAVASCRIPT)) { + $this->use_javascript_ajax = !$this->global->MAIN_DISABLE_JAVASCRIPT; + } // If no javascript_ajax, Ajax features are disabled. - if (empty($this->use_javascript_ajax)) - { + if (empty($this->use_javascript_ajax)) { unset($this->global->PRODUIT_USE_SEARCH_TO_SELECT); unset($this->global->COMPANY_USE_SEARCH_TO_SELECT); unset($this->global->CONTACT_USE_SEARCH_TO_SELECT); unset($this->global->PROJECT_USE_SEARCH_TO_SELECT); } - if (!empty($this->productbatch->enabled)) - { + if (!empty($this->productbatch->enabled)) { $this->global->STOCK_CALCULATE_ON_BILL = 0; $this->global->STOCK_CALCULATE_ON_VALIDATE_ORDER = 0; $this->global->STOCK_CALCULATE_ON_SHIPMENT = 1; @@ -485,59 +527,88 @@ class Conf $this->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER = 0; if (empty($this->reception->enabled)) { $this->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER = 1; - } - else { + } else { $this->global->STOCK_CALCULATE_ON_RECEPTION = 1; $this->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE = 0; } } // conf->currency - if (empty($this->global->MAIN_MONNAIE)) $this->global->MAIN_MONNAIE = 'EUR'; + if (empty($this->global->MAIN_MONNAIE)) { + $this->global->MAIN_MONNAIE = 'EUR'; + } $this->currency = $this->global->MAIN_MONNAIE; - if (empty($this->global->MAIN_BROWSER_NOTIFICATION_FREQUENCY)) $this->global->MAIN_BROWSER_NOTIFICATION_FREQUENCY = 30; // Less than 1 minutes to be sure + if (empty($this->global->MAIN_BROWSER_NOTIFICATION_FREQUENCY)) { + $this->global->MAIN_BROWSER_NOTIFICATION_FREQUENCY = 30; // Less than 1 minutes to be sure + } // conf->global->ACCOUNTING_MODE = Option des modules Comptabilites (simple ou expert). Defini le mode de calcul des etats comptables (CA,...) - if (empty($this->global->ACCOUNTING_MODE)) $this->global->ACCOUNTING_MODE = 'RECETTES-DEPENSES'; // By default. Can be 'RECETTES-DEPENSES' ou 'CREANCES-DETTES' + if (empty($this->global->ACCOUNTING_MODE)) { + $this->global->ACCOUNTING_MODE = 'RECETTES-DEPENSES'; // By default. Can be 'RECETTES-DEPENSES' ou 'CREANCES-DETTES' + } // By default, suppliers objects can be linked to all projects - if (!isset($this->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS)) $this->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS = 1; + if (!isset($this->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS)) { + $this->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS = 1; + } // By default we enable feature to bill time spent - if (!isset($this->global->PROJECT_BILL_TIME_SPENT)) $this->global->PROJECT_BILL_TIME_SPENT = 1; + if (!isset($this->global->PROJECT_BILL_TIME_SPENT)) { + $this->global->PROJECT_BILL_TIME_SPENT = 1; + } // MAIN_HTML_TITLE - if (!isset($this->global->MAIN_HTML_TITLE)) $this->global->MAIN_HTML_TITLE = 'noapp,thirdpartynameonly,contactnameonly,projectnameonly'; + if (!isset($this->global->MAIN_HTML_TITLE)) { + $this->global->MAIN_HTML_TITLE = 'noapp,thirdpartynameonly,contactnameonly,projectnameonly'; + } // conf->liste_limit = constante de taille maximale des listes - if (empty($this->global->MAIN_SIZE_LISTE_LIMIT)) $this->global->MAIN_SIZE_LISTE_LIMIT = 25; + if (empty($this->global->MAIN_SIZE_LISTE_LIMIT)) { + $this->global->MAIN_SIZE_LISTE_LIMIT = 25; + } $this->liste_limit = $this->global->MAIN_SIZE_LISTE_LIMIT; // conf->product->limit_size = constante de taille maximale des select de produit - if (!isset($this->global->PRODUIT_LIMIT_SIZE)) $this->global->PRODUIT_LIMIT_SIZE = 1000; + if (!isset($this->global->PRODUIT_LIMIT_SIZE)) { + $this->global->PRODUIT_LIMIT_SIZE = 1000; + } $this->product->limit_size = $this->global->PRODUIT_LIMIT_SIZE; // conf->theme et $this->css - if (empty($this->global->MAIN_THEME)) $this->global->MAIN_THEME = "eldy"; - if (!empty($this->global->MAIN_FORCETHEME)) $this->global->MAIN_THEME = $this->global->MAIN_FORCETHEME; + if (empty($this->global->MAIN_THEME)) { + $this->global->MAIN_THEME = "eldy"; + } + if (!empty($this->global->MAIN_FORCETHEME)) { + $this->global->MAIN_THEME = $this->global->MAIN_FORCETHEME; + } $this->theme = $this->global->MAIN_THEME; $this->css = "/theme/".$this->theme."/style.css.php"; // conf->email_from = email pour envoi par dolibarr des mails automatiques $this->email_from = "robot@example.com"; - if (!empty($this->global->MAIN_MAIL_EMAIL_FROM)) $this->email_from = $this->global->MAIN_MAIL_EMAIL_FROM; + if (!empty($this->global->MAIN_MAIL_EMAIL_FROM)) { + $this->email_from = $this->global->MAIN_MAIL_EMAIL_FROM; + } // conf->notification->email_from = email pour envoi par Dolibarr des notifications $this->notification->email_from = $this->email_from; - if (!empty($this->global->NOTIFICATION_EMAIL_FROM)) $this->notification->email_from = $this->global->NOTIFICATION_EMAIL_FROM; + if (!empty($this->global->NOTIFICATION_EMAIL_FROM)) { + $this->notification->email_from = $this->global->NOTIFICATION_EMAIL_FROM; + } // conf->mailing->email_from = email pour envoi par Dolibarr des mailings $this->mailing->email_from = $this->email_from; - if (!empty($this->global->MAILING_EMAIL_FROM)) $this->mailing->email_from = $this->global->MAILING_EMAIL_FROM; - if (!isset($this->global->MAIN_EMAIL_ADD_TRACK_ID)) $this->global->MAIN_EMAIL_ADD_TRACK_ID = 1; + if (!empty($this->global->MAILING_EMAIL_FROM)) { + $this->mailing->email_from = $this->global->MAILING_EMAIL_FROM; + } + if (!isset($this->global->MAIN_EMAIL_ADD_TRACK_ID)) { + $this->global->MAIN_EMAIL_ADD_TRACK_ID = 1; + } - if (!isset($this->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) $this->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP = 1; + if (!isset($this->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) { + $this->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP = 1; + } // Format for date (used by default when not found or not searched in lang) $this->format_date_short = "%d/%m/%Y"; // Format of day with PHP/C tags (strftime functions) @@ -552,54 +623,93 @@ class Conf $this->format_date_hour_text = "%d %B %Y %H:%M"; // Duration of workday - if (!isset($this->global->MAIN_DURATION_OF_WORKDAY)) $this->global->MAIN_DURATION_OF_WORKDAY = 86400; + if (!isset($this->global->MAIN_DURATION_OF_WORKDAY)) { + $this->global->MAIN_DURATION_OF_WORKDAY = 86400; + } // Limites decimales si non definie (peuvent etre egale a 0) - if (!isset($this->global->MAIN_MAX_DECIMALS_UNIT)) $this->global->MAIN_MAX_DECIMALS_UNIT = 5; - if (!isset($this->global->MAIN_MAX_DECIMALS_TOT)) $this->global->MAIN_MAX_DECIMALS_TOT = 2; - if (!isset($this->global->MAIN_MAX_DECIMALS_SHOWN)) $this->global->MAIN_MAX_DECIMALS_SHOWN = 8; + if (!isset($this->global->MAIN_MAX_DECIMALS_UNIT)) { + $this->global->MAIN_MAX_DECIMALS_UNIT = 5; + } + if (!isset($this->global->MAIN_MAX_DECIMALS_TOT)) { + $this->global->MAIN_MAX_DECIMALS_TOT = 2; + } + if (!isset($this->global->MAIN_MAX_DECIMALS_SHOWN)) { + $this->global->MAIN_MAX_DECIMALS_SHOWN = 8; + } // Default pdf option - if (!isset($this->global->MAIN_PDF_DASH_BETWEEN_LINES)) $this->global->MAIN_PDF_DASH_BETWEEN_LINES = 1; // use dash between lines - if (!isset($this->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) $this->global->PDF_ALLOW_HTML_FOR_FREE_TEXT = 1; // allow html content into free footer text + if (!isset($this->global->MAIN_PDF_DASH_BETWEEN_LINES)) { + $this->global->MAIN_PDF_DASH_BETWEEN_LINES = 1; // use dash between lines + } + if (!isset($this->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { + $this->global->PDF_ALLOW_HTML_FOR_FREE_TEXT = 1; // allow html content into free footer text + } // Default max file size for upload $this->maxfilesize = (empty($this->global->MAIN_UPLOAD_DOC) ? 0 : (int) $this->global->MAIN_UPLOAD_DOC * 1024); // By default, we propagate contacts - if (!isset($this->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN)) $this->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN = '*'; // Can be also '*' or '^(BILLING|SHIPPING|CUSTOMER|.*)$' (regex not yet implemented) + if (!isset($this->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN)) { + $this->global->MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN = '*'; // Can be also '*' or '^(BILLING|SHIPPING|CUSTOMER|.*)$' (regex not yet implemented) + } // By default, we do not use the zip town table but the table of third parties - if (!isset($this->global->MAIN_USE_ZIPTOWN_DICTIONNARY)) $this->global->MAIN_USE_ZIPTOWN_DICTIONNARY = 0; + if (!isset($this->global->MAIN_USE_ZIPTOWN_DICTIONNARY)) { + $this->global->MAIN_USE_ZIPTOWN_DICTIONNARY = 0; + } // By default, we open card if one found - if (!isset($this->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE)) $this->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE = 1; + if (!isset($this->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE)) { + $this->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE = 1; + } // By default, we show state code in combo list - if (!isset($this->global->MAIN_SHOW_STATE_CODE)) $this->global->MAIN_SHOW_STATE_CODE = 1; + if (!isset($this->global->MAIN_SHOW_STATE_CODE)) { + $this->global->MAIN_SHOW_STATE_CODE = 1; + } // Use a SCA ready workflow with Stripe module (STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION by default if nothing defined) - if (!isset($this->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION) && empty($this->global->STRIPE_USE_NEW_CHECKOUT)) $this->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION = 1; + if (!isset($this->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION) && empty($this->global->STRIPE_USE_NEW_CHECKOUT)) { + $this->global->STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION = 1; + } // Define list of limited modules (value must be key found for "name" property of module, so for example 'supplierproposal' for Module "Supplier Proposal" - if (!isset($this->global->MAIN_MODULES_FOR_EXTERNAL)) $this->global->MAIN_MODULES_FOR_EXTERNAL = 'user,societe,propal,commande,facture,categorie,supplierproposal,fournisseur,contact,projet,contrat,ficheinter,expedition,agenda,resource,adherent,blockedlog'; // '' means 'all'. Note that contact is added here as it should be a module later. - if (!empty($this->modules_parts['moduleforexternal'])) // Module part to include an external module into the MAIN_MODULES_FOR_EXTERNAL list - { - foreach ($this->modules_parts['moduleforexternal'] as $key=>$value) $this->global->MAIN_MODULES_FOR_EXTERNAL .= ",".$key; + if (!isset($this->global->MAIN_MODULES_FOR_EXTERNAL)) { + $this->global->MAIN_MODULES_FOR_EXTERNAL = 'user,societe,propal,commande,facture,categorie,supplierproposal,fournisseur,contact,projet,contrat,ficheinter,expedition,agenda,resource,adherent,blockedlog'; // '' means 'all'. Note that contact is added here as it should be a module later. + } + if (!empty($this->modules_parts['moduleforexternal'])) { // Module part to include an external module into the MAIN_MODULES_FOR_EXTERNAL list + foreach ($this->modules_parts['moduleforexternal'] as $key => $value) { + $this->global->MAIN_MODULES_FOR_EXTERNAL .= ",".$key; + } } // Enable select2 - if (empty($this->global->MAIN_USE_JQUERY_MULTISELECT) || $this->global->MAIN_USE_JQUERY_MULTISELECT == '1') $this->global->MAIN_USE_JQUERY_MULTISELECT = 'select2'; + if (empty($this->global->MAIN_USE_JQUERY_MULTISELECT) || $this->global->MAIN_USE_JQUERY_MULTISELECT == '1') { + $this->global->MAIN_USE_JQUERY_MULTISELECT = 'select2'; + } // Timeouts - if (empty($this->global->MAIN_USE_CONNECT_TIMEOUT)) $this->global->MAIN_USE_CONNECT_TIMEOUT = 10; - if (empty($this->global->MAIN_USE_RESPONSE_TIMEOUT)) $this->global->MAIN_USE_RESPONSE_TIMEOUT = 30; + if (empty($this->global->MAIN_USE_CONNECT_TIMEOUT)) { + $this->global->MAIN_USE_CONNECT_TIMEOUT = 10; + } + if (empty($this->global->MAIN_USE_RESPONSE_TIMEOUT)) { + $this->global->MAIN_USE_RESPONSE_TIMEOUT = 30; + } // Set default variable to calculate VAT as if option tax_mode was 0 (standard) - if (empty($this->global->TAX_MODE_SELL_PRODUCT)) $this->global->TAX_MODE_SELL_PRODUCT = 'invoice'; - if (empty($this->global->TAX_MODE_BUY_PRODUCT)) $this->global->TAX_MODE_BUY_PRODUCT = 'invoice'; - if (empty($this->global->TAX_MODE_SELL_SERVICE)) $this->global->TAX_MODE_SELL_SERVICE = 'payment'; - if (empty($this->global->TAX_MODE_BUY_SERVICE)) $this->global->TAX_MODE_BUY_SERVICE = 'payment'; + if (empty($this->global->TAX_MODE_SELL_PRODUCT)) { + $this->global->TAX_MODE_SELL_PRODUCT = 'invoice'; + } + if (empty($this->global->TAX_MODE_BUY_PRODUCT)) { + $this->global->TAX_MODE_BUY_PRODUCT = 'invoice'; + } + if (empty($this->global->TAX_MODE_SELL_SERVICE)) { + $this->global->TAX_MODE_SELL_SERVICE = 'payment'; + } + if (empty($this->global->TAX_MODE_BUY_SERVICE)) { + $this->global->TAX_MODE_BUY_SERVICE = 'payment'; + } // Delay before warnings // Avoid strict errors. TODO: Replace xxx->warning_delay with a property ->warning_delay_xxx @@ -610,8 +720,7 @@ class Conf if (isset($this->agenda)) { $this->agenda->warning_delay = (isset($this->global->MAIN_DELAY_ACTIONS_TODO) ? $this->global->MAIN_DELAY_ACTIONS_TODO : 7) * 86400; } - if (isset($this->projet)) - { + if (isset($this->projet)) { $this->projet->warning_delay = (isset($this->global->MAIN_DELAY_PROJECT_TO_CLOSE) ? $this->global->MAIN_DELAY_PROJECT_TO_CLOSE : 7) * 86400; $this->projet->task = new StdClass(); $this->projet->task->warning_delay = (isset($this->global->MAIN_DELAY_TASKS_TODO) ? $this->global->MAIN_DELAY_TASKS_TODO : 7) * 86400; @@ -638,9 +747,9 @@ class Conf if (isset($this->contrat)) { $this->contrat->services = new stdClass(); $this->contrat->services->inactifs = new stdClass(); - $this->contrat->services->expires = new stdClass(); - $this->contrat->services->inactifs->warning_delay = (isset($this->global->MAIN_DELAY_NOT_ACTIVATED_SERVICES) ? $this->global->MAIN_DELAY_NOT_ACTIVATED_SERVICES : 0) * 86400; - $this->contrat->services->expires->warning_delay = (isset($this->global->MAIN_DELAY_RUNNING_SERVICES) ? $this->global->MAIN_DELAY_RUNNING_SERVICES : 0) * 86400; + $this->contrat->services->expires = new stdClass(); + $this->contrat->services->inactifs->warning_delay = (isset($this->global->MAIN_DELAY_NOT_ACTIVATED_SERVICES) ? $this->global->MAIN_DELAY_NOT_ACTIVATED_SERVICES : 0) * 86400; + $this->contrat->services->expires->warning_delay = (isset($this->global->MAIN_DELAY_RUNNING_SERVICES) ? $this->global->MAIN_DELAY_RUNNING_SERVICES : 0) * 86400; } if (isset($this->commande)) { $this->bank->rappro = new stdClass(); @@ -659,48 +768,99 @@ class Conf $this->holiday->approve->warning_delay = (isset($this->global->MAIN_DELAY_HOLIDAYS) ? $this->global->MAIN_DELAY_HOLIDAYS : 0) * 86400; } - if (!empty($this->global->PRODUIT_MULTIPRICES) && empty($this->global->PRODUIT_MULTIPRICES_LIMIT)) - { + if (!empty($this->global->PRODUIT_MULTIPRICES) && empty($this->global->PRODUIT_MULTIPRICES_LIMIT)) { $this->global->PRODUIT_MULTIPRICES_LIMIT = 5; } // For modules that want to disable top or left menu - if (!empty($this->global->MAIN_HIDE_TOP_MENU)) $this->dol_hide_topmenu = $this->global->MAIN_HIDE_TOP_MENU; - if (!empty($this->global->MAIN_HIDE_LEFT_MENU)) $this->dol_hide_leftmenu = $this->global->MAIN_HIDE_LEFT_MENU; + if (!empty($this->global->MAIN_HIDE_TOP_MENU)) { + $this->dol_hide_topmenu = $this->global->MAIN_HIDE_TOP_MENU; + } + if (!empty($this->global->MAIN_HIDE_LEFT_MENU)) { + $this->dol_hide_leftmenu = $this->global->MAIN_HIDE_LEFT_MENU; + } - if (empty($this->global->MAIN_SIZE_SHORTLIST_LIMIT)) $this->global->MAIN_SIZE_SHORTLIST_LIMIT = 3; + if (empty($this->global->MAIN_SIZE_SHORTLIST_LIMIT)) { + $this->global->MAIN_SIZE_SHORTLIST_LIMIT = 3; + } - if (!isset($this->global->THEME_HIDE_BORDER_ON_INPUT)) $this->global->THEME_HIDE_BORDER_ON_INPUT = 0; + if (!isset($this->global->THEME_HIDE_BORDER_ON_INPUT)) { + $this->global->THEME_HIDE_BORDER_ON_INPUT = 0; + } // Save inconsistent option - if (empty($this->global->AGENDA_USE_EVENT_TYPE) && (!isset($this->global->AGENDA_DEFAULT_FILTER_TYPE) || $this->global->AGENDA_DEFAULT_FILTER_TYPE == 'AC_NON_AUTO')) - { + if (empty($this->global->AGENDA_USE_EVENT_TYPE) && (!isset($this->global->AGENDA_DEFAULT_FILTER_TYPE) || $this->global->AGENDA_DEFAULT_FILTER_TYPE == 'AC_NON_AUTO')) { $this->global->AGENDA_DEFAULT_FILTER_TYPE = '0'; // 'AC_NON_AUTO' does not exists when AGENDA_DEFAULT_FILTER_TYPE is not on. } - if (!isset($this->global->MAIN_JS_GRAPH)) $this->global->MAIN_JS_GRAPH = 'chart'; // Use chart.js library + if (!isset($this->global->MAIN_JS_GRAPH)) { + $this->global->MAIN_JS_GRAPH = 'chart'; // Use chart.js library + } - if (empty($this->global->MAIN_MODULE_DOLISTORE_API_SRV)) $this->global->MAIN_MODULE_DOLISTORE_API_SRV = 'https://www.dolistore.com'; - if (empty($this->global->MAIN_MODULE_DOLISTORE_API_KEY)) $this->global->MAIN_MODULE_DOLISTORE_API_KEY = 'dolistorecatalogpublickey1234567'; + if (empty($this->global->MAIN_MODULE_DOLISTORE_API_SRV)) { + $this->global->MAIN_MODULE_DOLISTORE_API_SRV = 'https://www.dolistore.com'; + } + if (empty($this->global->MAIN_MODULE_DOLISTORE_API_KEY)) { + $this->global->MAIN_MODULE_DOLISTORE_API_KEY = 'dolistorecatalogpublickey1234567'; + } // If we are in develop mode, we activate the option MAIN_SECURITY_CSRF_WITH_TOKEN to 1 if not already defined. - if (!isset($this->global->MAIN_SECURITY_CSRF_WITH_TOKEN) && $this->global->MAIN_FEATURES_LEVEL >= 2) $this->global->MAIN_SECURITY_CSRF_WITH_TOKEN = 1; + if (!isset($this->global->MAIN_SECURITY_CSRF_WITH_TOKEN) && $this->global->MAIN_FEATURES_LEVEL >= 2) { + $this->global->MAIN_SECURITY_CSRF_WITH_TOKEN = 1; + } - if (defined('MAIN_ANTIVIRUS_COMMAND')) $this->global->MAIN_ANTIVIRUS_COMMAND = constant('MAIN_ANTIVIRUS_COMMAND'); - if (defined('MAIN_ANTIVIRUS_PARAM')) $this->global->MAIN_ANTIVIRUS_PARAM = constant('MAIN_ANTIVIRUS_PARAM'); + if (defined('MAIN_ANTIVIRUS_COMMAND')) { + $this->global->MAIN_ANTIVIRUS_COMMAND = constant('MAIN_ANTIVIRUS_COMMAND'); + } + if (defined('MAIN_ANTIVIRUS_PARAM')) { + $this->global->MAIN_ANTIVIRUS_PARAM = constant('MAIN_ANTIVIRUS_PARAM'); + } - // For backward compatibility - if (isset($this->product)) $this->produit = $this->product; - if (isset($this->facture)) $this->invoice = $this->facture; - if (isset($this->commande)) $this->order = $this->commande; - if (isset($this->contrat)) $this->contract = $this->contrat; - if (isset($this->categorie)) $this->category = $this->categorie; - if (isset($this->project)) $this->project = $this->projet; + if (!empty($this->global->MAIN_TZUSERINPUTKEY)) { + $this->tzuserinputkey = $this->global->MAIN_TZUSERINPUTKEY; // 'tzserver' or 'tzuserrel' + } + + if (!empty($this->global->PRODUIT_AUTOFILL_DESC)) { + $this->global->MAIN_NO_CONCAT_DESCRIPTION = 1; + } else { + unset($this->global->MAIN_NO_CONCAT_DESCRIPTION); + } + + // product is new use + if (isset($this->product)) { + // For backward compatibility + $this->produit = $this->product; + } + // invoice is new use, facture is old use still initialised + if (isset($this->facture)) { + $this->invoice = $this->facture; + } + // order is new use, commande is old use still initialised + if (isset($this->commande)) { + $this->order = $this->commande; + } + // contract is new use, contrat is old use still initialised + if (isset($this->contrat)) { + $this->contract = $this->contrat; + } + // category is new use, categorie is old use still initialised + if (isset($this->categorie)) { + $this->category = $this->categorie; + } + // project is new use, projet is old use still initialised + if (isset($this->projet) && !isset($this->project)) { + $this->project = $this->projet; + } + // member is new use, adherent is old use still initialised + if (isset($this->adherent) && !isset($this->member)) { + $this->member = $this->adherent; + } // Object $mc - if (!defined('NOREQUIREMC') && !empty($this->multicompany->enabled)) - { - if (is_object($mc)) $mc->setValues($this); + if (!defined('NOREQUIREMC') && !empty($this->multicompany->enabled)) { + if (is_object($mc)) { + $mc->setValues($this); + } } if (!empty($this->syslog->enabled)) { diff --git a/htdocs/core/class/coreobject.class.php b/htdocs/core/class/coreobject.class.php index ad7d93506f4..45018cb1d8f 100644 --- a/htdocs/core/class/coreobject.class.php +++ b/htdocs/core/class/coreobject.class.php @@ -59,15 +59,19 @@ class CoreObject extends CommonObject $this->datec = 0; $this->tms = 0; - if (!empty($this->fields)) - { - foreach ($this->fields as $field=>$info) - { - if ($this->isDate($info)) $this->{$field} = time(); - elseif ($this->isArray($info)) $this->{$field} = array(); - elseif ($this->isInt($info)) $this->{$field} = (int) 0; - elseif ($this->isFloat($info)) $this->{$field} = (double) 0; - else $this->{$field} = ''; + if (!empty($this->fields)) { + foreach ($this->fields as $field => $info) { + if ($this->isDate($info)) { + $this->{$field} = time(); + } elseif ($this->isArray($info)) { + $this->{$field} = array(); + } elseif ($this->isInt($info)) { + $this->{$field} = (int) 0; + } elseif ($this->isFloat($info)) { + $this->{$field} = (double) 0; + } else { + $this->{$field} = ''; + } } $this->to_delete = false; @@ -88,8 +92,7 @@ class CoreObject extends CommonObject */ private function checkFieldType($field, $type) { - if (isset($this->fields[$field]) && method_exists($this, 'is_'.$type)) - { + if (isset($this->fields[$field]) && method_exists($this, 'is_'.$type)) { return $this->{'is_'.$type}($this->fields[$field]); } else { return false; @@ -107,7 +110,9 @@ class CoreObject extends CommonObject { $res = $this->fetchCommon($id); if ($res > 0) { - if ($loadChild) $this->fetchChild(); + if ($loadChild) { + $this->fetchChild(); + } } return $res; @@ -125,11 +130,11 @@ class CoreObject extends CommonObject */ public function addChild($tabName, $id = 0, $key = 'id', $try_to_load = false) { - if (!empty($id)) - { - foreach ($this->{$tabName} as $k=>&$object) - { - if ($object->{$key} === $id) return $k; + if (!empty($id)) { + foreach ($this->{$tabName} as $k => &$object) { + if ($object->{$key} === $id) { + return $k; + } } } @@ -137,8 +142,7 @@ class CoreObject extends CommonObject $className = ucfirst($tabName); $this->{$tabName}[$k] = new $className($this->db); - if ($id > 0 && $key === 'id' && $try_to_load) - { + if ($id > 0 && $key === 'id' && $try_to_load) { $this->{$tabName}[$k]->fetch($id); } @@ -156,10 +160,8 @@ class CoreObject extends CommonObject */ public function removeChild($tabName, $id, $key = 'id') { - foreach ($this->{$tabName} as &$object) - { - if ($object->{$key} == $id) - { + foreach ($this->{$tabName} as &$object) { + if ($object->{$key} == $id) { $object->to_delete = true; return true; } @@ -175,10 +177,8 @@ class CoreObject extends CommonObject */ public function fetchChild() { - if ($this->withChild && !empty($this->childtables) && !empty($this->fk_element)) - { - foreach ($this->childtables as &$childTable) - { + if ($this->withChild && !empty($this->childtables) && !empty($this->fk_element)) { + foreach ($this->childtables as &$childTable) { $className = ucfirst($childTable); $this->{$className} = array(); @@ -186,10 +186,8 @@ class CoreObject extends CommonObject $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.$childTable.' WHERE '.$this->fk_element.' = '.$this->id; $res = $this->db->query($sql); - if ($res) - { - while ($obj = $this->db->fetch_object($res)) - { + if ($res) { + while ($obj = $this->db->fetch_object($res)) { $o = new $className($this->db); $o->fetch($obj->rowid); @@ -210,19 +208,17 @@ class CoreObject extends CommonObject */ public function saveChild(User &$user) { - if ($this->withChild && !empty($this->childtables) && !empty($this->fk_element)) - { - foreach ($this->childtables as &$childTable) - { + if ($this->withChild && !empty($this->childtables) && !empty($this->fk_element)) { + foreach ($this->childtables as &$childTable) { $className = ucfirst($childTable); - if (!empty($this->{$className})) - { - foreach ($this->{$className} as $i => &$object) - { + if (!empty($this->{$className})) { + foreach ($this->{$className} as $i => &$object) { $object->{$this->fk_element} = $this->id; $object->update($user); - if ($this->unsetChildDeleted && isset($object->to_delete) && $object->to_delete == true) unset($this->{$className}[$i]); + if ($this->unsetChildDeleted && isset($object->to_delete) && $object->to_delete == true) { + unset($this->{$className}[$i]); + } } } } @@ -238,26 +234,30 @@ class CoreObject extends CommonObject */ public function update(User &$user) { - if (empty($this->id)) return $this->create($user); // To test, with that, no need to test on high level object, the core decide it, update just needed - elseif (isset($this->to_delete) && $this->to_delete == true) return $this->delete($user); + if (empty($this->id)) { + return $this->create($user); // To test, with that, no need to test on high level object, the core decide it, update just needed + } elseif (isset($this->to_delete) && $this->to_delete == true) { + return $this->delete($user); + } $error = 0; $this->db->begin(); $res = $this->updateCommon($user); - if ($res) - { + if ($res) { $result = $this->call_trigger(strtoupper($this->element).'_UPDATE', $user); - if ($result < 0) $error++; - else $this->saveChild($user); + if ($result < 0) { + $error++; + } else { + $this->saveChild($user); + } } else { $error++; $this->error = $this->db->lasterror(); $this->errors[] = $this->error; } - if (empty($error)) - { + if (empty($error)) { $this->db->commit(); return $this->id; } else { @@ -274,27 +274,30 @@ class CoreObject extends CommonObject */ public function create(User $user) { - if ($this->id > 0) return $this->update($user); + if ($this->id > 0) { + return $this->update($user); + } $error = 0; $this->db->begin(); $res = $this->createCommon($user); - if ($res) - { + if ($res) { $this->id = $this->db->last_insert_id($this->table_element); $result = $this->call_trigger(strtoupper($this->element).'_CREATE', $user); - if ($result < 0) $error++; - else $this->saveChild($user); + if ($result < 0) { + $error++; + } else { + $this->saveChild($user); + } } else { $error++; $this->error = $this->db->lasterror(); $this->errors[] = $this->error; } - if (empty($error)) - { + if (empty($error)) { $this->db->commit(); return $this->id; } else { @@ -311,26 +314,25 @@ class CoreObject extends CommonObject */ public function delete(User &$user) { - if ($this->id <= 0) return 0; + if ($this->id <= 0) { + return 0; + } $error = 0; $this->db->begin(); $result = $this->call_trigger(strtoupper($this->element).'_DELETE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } - if (!$error) - { + if (!$error) { $this->deleteCommon($user); - if ($this->withChild && !empty($this->childtables)) - { - foreach ($this->childtables as &$childTable) - { + if ($this->withChild && !empty($this->childtables)) { + foreach ($this->childtables as &$childTable) { $className = ucfirst($childTable); - if (!empty($this->{$className})) - { - foreach ($this->{$className} as &$object) - { + if (!empty($this->{$className})) { + foreach ($this->{$className} as &$object) { $object->delete($user); } } @@ -338,8 +340,7 @@ class CoreObject extends CommonObject } } - if (empty($error)) - { + if (empty($error)) { $this->db->commit(); return 1; } else { @@ -360,8 +361,9 @@ class CoreObject extends CommonObject */ public function getDate($field, $format = '') { - if (empty($this->{$field})) return ''; - else { + if (empty($this->{$field})) { + return ''; + } else { return dol_print_date($this->{$field}, $format); } } @@ -375,8 +377,7 @@ class CoreObject extends CommonObject */ public function setDate($field, $date) { - if (empty($date)) - { + if (empty($date)) { $this->{$field} = 0; } else { require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; @@ -395,13 +396,10 @@ class CoreObject extends CommonObject */ public function setValues(&$Tab) { - foreach ($Tab as $key => $value) - { - if ($this->checkFieldType($key, 'date')) - { + foreach ($Tab as $key => $value) { + if ($this->checkFieldType($key, 'date')) { $this->setDate($key, $value); - } elseif ($this->checkFieldType($key, 'float')) - { + } elseif ($this->checkFieldType($key, 'float')) { $this->{$key} = (double) price2num($value); } elseif ($this->checkFieldType($key, 'int')) { $this->{$key} = (int) price2num($value); diff --git a/htdocs/core/class/cproductnature.class.php b/htdocs/core/class/cproductnature.class.php index eb16cff53ea..6c3a1f7bb9d 100644 --- a/htdocs/core/class/cproductnature.class.php +++ b/htdocs/core/class/cproductnature.class.php @@ -116,7 +116,7 @@ class CProductNature // 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); // Commit or rollback if (!$resql) { @@ -150,17 +150,19 @@ class CProductNature // extends CommonObject $sql .= " t.active"; $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as t"; $sql_where = array(); - if ($id) $sql_where[] = " t.rowid = ".$id; - if ($code >= 0) $sql_where[] = " t.code = ".((int) $code); + if ($id) { + $sql_where[] = " t.rowid = ".((int) $id); + } + if ($code >= 0) { + $sql_where[] = " t.code = ".((int) $code); + } if (count($sql_where) > 0) { $sql .= ' WHERE '.implode(' AND ', $sql_where); } $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; @@ -172,7 +174,7 @@ class CProductNature // extends CommonObject return 1; } else { - $this->error = "Error ".$this->db->lasterror(); + $this->error = "Error ".$this->db->lasterror(); return -1; } } @@ -232,8 +234,7 @@ class CProductNature // extends CommonObject $this->records = array(); $num = $this->db->num_rows($resql); if ($num > 0) { - while ($obj = $this->db->fetch_object($resql)) - { + while ($obj = $this->db->fetch_object($resql)) { $record = new self($this->db); $record->id = $obj->rowid; @@ -289,13 +290,13 @@ class CProductNature // extends CommonObject } - /** - * 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 - */ + /** + * 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; diff --git a/htdocs/core/class/cstate.class.php b/htdocs/core/class/cstate.class.php index 75ef9cc7f77..2b9b1d6880e 100644 --- a/htdocs/core/class/cstate.class.php +++ b/htdocs/core/class/cstate.class.php @@ -92,9 +92,15 @@ class Cstate // extends CommonObject $error = 0; // Clean parameters - if (isset($this->code_departement)) $this->code_departement = trim($this->code_departement); - if (isset($this->nom)) $this->nom = trim($this->nom); - if (isset($this->active)) $this->active = trim($this->active); + if (isset($this->code_departement)) { + $this->code_departement = trim($this->code_departement); + } + if (isset($this->nom)) { + $this->nom = trim($this->nom); + } + if (isset($this->active)) { + $this->active = trim($this->active); + } // Check parameters // Put here code to add control on parameters values @@ -114,19 +120,20 @@ class Cstate // 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) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."c_departements"); } // 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); } @@ -155,15 +162,16 @@ class Cstate // extends CommonObject $sql .= " t.nom,"; $sql .= " t.active"; $sql .= " FROM ".MAIN_DB_PREFIX."c_departements as t"; - if ($id) $sql .= " WHERE t.rowid = ".$id; - elseif ($code) $sql .= " WHERE t.code_departement = '".$this->db->escape($code)."'"; + if ($id) { + $sql .= " WHERE t.rowid = ".((int) $id); + } elseif ($code) { + $sql .= " WHERE t.code_departement = '".$this->db->escape($code)."'"; + } 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; @@ -177,7 +185,7 @@ class Cstate // extends CommonObject return 1; } else { - $this->error = "Error ".$this->db->lasterror(); + $this->error = "Error ".$this->db->lasterror(); return -1; } } @@ -196,9 +204,15 @@ class Cstate // extends CommonObject $error = 0; // Clean parameters - if (isset($this->code_departement)) $this->code_departement = trim($this->code_departement); - if (isset($this->nom)) $this->nom = trim($this->nom); - if (isset($this->active)) $this->active = trim($this->active); + if (isset($this->code_departement)) { + $this->code_departement = trim($this->code_departement); + } + if (isset($this->nom)) { + $this->nom = trim($this->nom); + } + if (isset($this->active)) { + $this->active = trim($this->active); + } // Check parameters @@ -209,13 +223,16 @@ class Cstate // extends CommonObject $sql .= " code_departement=".(isset($this->code_departement) ? "'".$this->db->escape($this->code_departement)."'" : "null").","; $sql .= " nom=".(isset($this->nom) ? "'".$this->db->escape($this->nom)."'" : "null").","; $sql .= " active=".(isset($this->active) ? $this->active : "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) { @@ -231,32 +248,33 @@ class Cstate // extends CommonObject } } - /** - * 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 - */ + /** + * 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; $sql = "DELETE FROM ".MAIN_DB_PREFIX."c_departements"; - $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); } diff --git a/htdocs/core/class/ctypent.class.php b/htdocs/core/class/ctypent.class.php index fccdec72ab6..c8421c54b1f 100644 --- a/htdocs/core/class/ctypent.class.php +++ b/htdocs/core/class/ctypent.class.php @@ -83,11 +83,21 @@ class Ctypent // extends CommonObject // Clean parameters - if (isset($this->id)) $this->id = trim($this->id); - if (isset($this->code)) $this->code = trim($this->code); - if (isset($this->libelle)) $this->libelle = trim($this->libelle); - if (isset($this->active)) $this->active = trim($this->active); - if (isset($this->module)) $this->module = trim($this->module); + if (isset($this->id)) { + $this->id = trim($this->id); + } + if (isset($this->code)) { + $this->code = trim($this->code); + } + if (isset($this->libelle)) { + $this->libelle = trim($this->libelle); + } + if (isset($this->active)) { + $this->active = trim($this->active); + } + if (isset($this->module)) { + $this->module = trim($this->module); + } @@ -117,20 +127,20 @@ class Ctypent // 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."c_typent"); } // 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); } @@ -153,7 +163,6 @@ class Ctypent // extends CommonObject */ public function fetch($id, $code = '', $label = '') { - global $langs; $sql = "SELECT"; $sql .= " t.id,"; $sql .= " t.code,"; @@ -162,15 +171,17 @@ class Ctypent // extends CommonObject $sql .= " t.active,"; $sql .= " t.module"; $sql .= " FROM ".MAIN_DB_PREFIX."c_typent as t"; - if ($id) $sql .= " WHERE t.id = ".$id; - elseif ($code) $sql .= " WHERE t.code = '".$this->db->escape($code)."'"; - elseif ($label) $sql .= " WHERE t.libelle = '".$this->db->escape($label)."'"; + if ($id) { + $sql .= " WHERE t.id = ".((int) $id); + } elseif ($code) { + $sql .= " WHERE t.code = '".$this->db->escape($code)."'"; + } elseif ($label) { + $sql .= " WHERE t.libelle = '".$this->db->escape($label)."'"; + } $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->id; @@ -184,7 +195,7 @@ class Ctypent // extends CommonObject return 1; } else { - $this->error = "Error ".$this->db->lasterror(); + $this->error = "Error ".$this->db->lasterror(); return -1; } } @@ -203,10 +214,18 @@ class Ctypent // extends CommonObject $error = 0; // Clean parameters - if (isset($this->code)) $this->code = trim($this->code); - if (isset($this->libelle)) $this->libelle = trim($this->libelle); - if (isset($this->active)) $this->active = trim($this->active); - if (isset($this->module)) $this->module = trim($this->module); + if (isset($this->code)) { + $this->code = trim($this->code); + } + if (isset($this->libelle)) { + $this->libelle = trim($this->libelle); + } + if (isset($this->active)) { + $this->active = trim($this->active); + } + if (isset($this->module)) { + $this->module = trim($this->module); + } // Check parameters @@ -224,13 +243,14 @@ class Ctypent // extends CommonObject 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); } @@ -243,13 +263,13 @@ class Ctypent // extends CommonObject } - /** - * 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 - */ + /** + * 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; @@ -262,13 +282,14 @@ class Ctypent // 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); } diff --git a/htdocs/core/class/ctyperesource.class.php b/htdocs/core/class/ctyperesource.class.php index 9d1e5c53de1..b0a604e9e28 100644 --- a/htdocs/core/class/ctyperesource.class.php +++ b/htdocs/core/class/ctyperesource.class.php @@ -165,16 +165,17 @@ class Ctyperesource $sql = 'SELECT'; $sql .= ' t.rowid,'; - $sql .= " t.code,"; $sql .= " t.label,"; $sql .= " t.active"; - - $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; - if ($id) $sql .= " WHERE t.id = ".$id; - elseif ($code) $sql .= " WHERE t.code = '".$this->db->escape($code)."'"; - elseif ($label) $sql .= " WHERE t.label = '".$this->db->escape($label)."'"; + if ($id) { + $sql .= " WHERE t.id = ".((int) $id); + } elseif ($code) { + $sql .= " WHERE t.code = '".$this->db->escape($code)."'"; + } elseif ($label) { + $sql .= " WHERE t.label = '".$this->db->escape($label)."'"; + } $resql = $this->db->query($sql); @@ -316,7 +317,7 @@ class Ctyperesource $sql .= ' active = '.(isset($this->active) ? $this->active : "null"); - $sql .= ' WHERE rowid='.$this->id; + $sql .= ' WHERE rowid='.((int) $this->id); $this->db->begin(); @@ -379,7 +380,7 @@ class Ctyperesource 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) { diff --git a/htdocs/core/class/cunits.class.php b/htdocs/core/class/cunits.class.php index c94919eb1dc..ed3981d243d 100644 --- a/htdocs/core/class/cunits.class.php +++ b/htdocs/core/class/cunits.class.php @@ -86,13 +86,27 @@ class CUnits // extends CommonObject // Clean parameters - if (isset($this->id)) $this->id = (int) $this->id; - if (isset($this->code)) $this->code = trim($this->code); - if (isset($this->label)) $this->libelle = trim($this->label); - if (isset($this->short_label)) $this->libelle = trim($this->short_label); - if (isset($this->unit_type)) $this->active = trim($this->unit_type); - if (isset($this->active)) $this->active = trim($this->active); - if (isset($this->scale)) $this->scale = trim($this->scale); + if (isset($this->id)) { + $this->id = (int) $this->id; + } + if (isset($this->code)) { + $this->code = trim($this->code); + } + if (isset($this->label)) { + $this->libelle = trim($this->label); + } + if (isset($this->short_label)) { + $this->libelle = trim($this->short_label); + } + if (isset($this->unit_type)) { + $this->active = trim($this->unit_type); + } + if (isset($this->active)) { + $this->active = trim($this->active); + } + if (isset($this->scale)) { + $this->scale = trim($this->scale); + } // Check parameters // Put here code to add control on parameters values @@ -116,20 +130,20 @@ class CUnits // 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."c_units"); } // 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); } @@ -166,19 +180,25 @@ class CUnits // extends CommonObject $sql .= " t.active"; $sql .= " FROM ".MAIN_DB_PREFIX."c_units as t"; $sql_where = array(); - if ($id) $sql_where[] = " t.rowid = ".$id; - if ($unit_type) $sql_where[] = " t.unit_type = '".$this->db->escape($unit_type)."'"; - if ($code) $sql_where[] = " t.code = '".$this->db->escape($code)."'"; - if ($short_label) $sql_where[] = " t.short_label = '".$this->db->escape($short_label)."'"; + if ($id) { + $sql_where[] = " t.rowid = ".((int) $id); + } + if ($unit_type) { + $sql_where[] = " t.unit_type = '".$this->db->escape($unit_type)."'"; + } + if ($code) { + $sql_where[] = " t.code = '".$this->db->escape($code)."'"; + } + if ($short_label) { + $sql_where[] = " t.short_label = '".$this->db->escape($short_label)."'"; + } if (count($sql_where) > 0) { $sql .= ' WHERE '.implode(' AND ', $sql_where); } $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; @@ -194,7 +214,7 @@ class CUnits // extends CommonObject return 1; } else { - $this->error = "Error ".$this->db->lasterror(); + $this->error = "Error ".$this->db->lasterror(); return -1; } } @@ -295,12 +315,24 @@ class CUnits // extends CommonObject $error = 0; // Clean parameters - if (isset($this->code)) $this->code = trim($this->code); - if (isset($this->label)) $this->libelle = trim($this->label); - if (isset($this->short_label)) $this->libelle = trim($this->short_label); - if (isset($this->unit_type)) $this->libelle = trim($this->unit_type); - if (isset($this->scale)) $this->scale = trim($this->scale); - if (isset($this->active)) $this->active = trim($this->active); + if (isset($this->code)) { + $this->code = trim($this->code); + } + if (isset($this->label)) { + $this->libelle = trim($this->label); + } + if (isset($this->short_label)) { + $this->libelle = trim($this->short_label); + } + if (isset($this->unit_type)) { + $this->libelle = trim($this->unit_type); + } + if (isset($this->scale)) { + $this->scale = trim($this->scale); + } + if (isset($this->active)) { + $this->active = trim($this->active); + } // Check parameters // Put here code to add control on parameters values @@ -313,19 +345,20 @@ class CUnits // extends CommonObject $sql .= " unit_type=".(isset($this->unit_type) ? "'".$this->db->escape($this->unit_type)."'" : "null").","; $sql .= " scale=".(isset($this->scale) ? "'".$this->db->escape($this->scale)."'" : "null").","; $sql .= " active=".(isset($this->active) ? $this->active : "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); } @@ -338,32 +371,33 @@ class CUnits // extends CommonObject } - /** - * 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 - */ + /** + * 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; $sql = "DELETE FROM ".MAIN_DB_PREFIX."c_units"; - $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); } @@ -414,8 +448,7 @@ class CUnits // extends CommonObject if ($fk_new_unit != 0) { // Calcul en unité de base $scaleUnitPow = $this->scaleOfUnitPow($fk_new_unit); - if (!empty($scaleUnitPow)) - { + if (!empty($scaleUnitPow)) { // convert to new unit $value = $value / $scaleUnitPow; } diff --git a/htdocs/core/class/defaultvalues.class.php b/htdocs/core/class/defaultvalues.class.php new file mode 100644 index 00000000000..c6be235b89a --- /dev/null +++ b/htdocs/core/class/defaultvalues.class.php @@ -0,0 +1,351 @@ + + * Copyright (C) 2021 Florian HENRY + * 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 + * 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/class/defaultvalues.class.php + * \brief This file is a CRUD class file for DefaultValues (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 MyObject + */ +class DefaultValues extends CommonObject +{ + /** + * @var string ID to identify managed object. + */ + public $element = 'defaultvalues'; + + /** + * @var string Name of table without prefix where object is stored. This is also the key used for extrafields management. + */ + public $table_element = 'default_values'; + + /** + * @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 = 0; + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = ''; + + /** + * '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, 'visible'=>-1, 'notnull'=>1, 'position'=>10), + 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>15, 'index'=>1), + 'type' =>array('type'=>'varchar(10)', 'label'=>'Type', 'enabled'=>1, 'visible'=>-1, 'position'=>20), + 'user_id' =>array('type'=>'integer', 'label'=>'Userid', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>25), + 'page' =>array('type'=>'varchar(255)', 'label'=>'RelativeURL', 'enabled'=>1, 'visible'=>-1, 'position'=>30), + 'param' =>array('type'=>'varchar(255)', 'label'=>'Field', 'enabled'=>1, 'visible'=>-1, 'position'=>35), + 'value' =>array('type'=>'varchar(128)', 'label'=>'Value', 'enabled'=>1, 'visible'=>-1, 'position'=>40), + ); + + /** + * @var int ID + */ + public $rowid; + + /** + * @var int Entity + */ + public $entity; + + /** + * @var string Type + */ + public $type; + + /** + * @var int User Id + */ + public $user_id; + + /** + * @var string Page + */ + public $page; + + /** + * @var string Param + */ + public $param; + + /** + * @var string Value + */ + public $value; + // 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]); + } + } + + // 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); + + // Reset some properties + unset($object->id); + + // Create clone + $object->context['createfromclone'] = 'createfromclone'; + $result = $object->createCommon($user); + if ($result < 0) { + $error++; + $this->error = $object->error; + $this->errors = $object->errors; + } + + 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) + { + $result = $this->fetchCommon($id, null); + 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'; + $sql .= ' WHERE 1 = 1'; + // Manage filter + $sqlwhere = array(); + if (count($filter) > 0) { + foreach ($filter as $key => $value) { + if ($key == 't.rowid' || ($key == 't.entity' && !is_array($value)) || ($key == 't.user_id' && !is_array($value))) { + $sqlwhere[] = $key.'='.$value; + } elseif (isset($this->fields[$key]) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) { + $sqlwhere[] = $key.' = \''.$this->db->idate($value).'\''; + } elseif ($key == 't.page' || $key == 't.param' || $key == 't.type') { + $sqlwhere[] = $key.' = \''.$this->db->escape($value).'\''; + } elseif ($key == 'customsql') { + $sqlwhere[] = $value; + } elseif (is_array($value)) { + $sqlwhere[] = $key.' IN ('.$this->db->sanitize(implode(',', $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); + } + + /** + * Initialise object with example values + * Id must be 0 if object instance is a specimen + * + * @return void + */ + public function initAsSpecimen() + { + $this->initAsSpecimenCommon(); + } +} diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index 9f901ed3452..63ef3dc1153 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -126,8 +126,7 @@ class DiscountAbsolute global $conf; // Check parameters - if (!$rowid && !$fk_facture_source && !$fk_invoice_supplier_source) - { + if (!$rowid && !$fk_facture_source && !$fk_invoice_supplier_source) { $this->error = 'ErrorBadParameters'; return -1; } @@ -144,16 +143,20 @@ class DiscountAbsolute $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON sr.fk_facture_source = f.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as fsup ON sr.fk_invoice_supplier_source = fsup.rowid"; $sql .= " WHERE sr.entity IN (".getEntity('invoice').")"; - if ($rowid) $sql .= " AND sr.rowid=".$rowid; - if ($fk_facture_source) $sql .= " AND sr.fk_facture_source=".$fk_facture_source; - if ($fk_invoice_supplier_source) $sql .= " AND sr.fk_invoice_supplier_source=".$fk_invoice_supplier_source; + if ($rowid) { + $sql .= " AND sr.rowid=".((int) $rowid); + } + if ($fk_facture_source) { + $sql .= " AND sr.fk_facture_source = ".((int) $fk_facture_source); + } + if ($fk_invoice_supplier_source) { + $sql .= " AND sr.fk_invoice_supplier_source = ".((int) $fk_invoice_supplier_source); + } 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; @@ -219,21 +222,28 @@ class DiscountAbsolute $this->multicurrency_amount_tva = price2num($this->multicurrency_amount_tva); $this->multicurrency_amount_ttc = price2num($this->multicurrency_amount_ttc); - if (empty($this->multicurrency_amount_ht)) $this->multicurrency_amount_ht = 0; - if (empty($this->multicurrency_amount_tva)) $this->multicurrency_amount_tva = 0; - if (empty($this->multicurrency_amount_ttc)) $this->multicurrency_amount_ttc = 0; + if (empty($this->multicurrency_amount_ht)) { + $this->multicurrency_amount_ht = 0; + } + if (empty($this->multicurrency_amount_tva)) { + $this->multicurrency_amount_tva = 0; + } + if (empty($this->multicurrency_amount_ttc)) { + $this->multicurrency_amount_ttc = 0; + } + if (empty($this->tva_tx)) { + $this->tva_tx = 0; + } // Check parameters - if (empty($this->description)) - { + if (empty($this->description)) { $this->error = 'BadValueForPropertyDescription'; dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); return -1; } $userid = $user->id; - if (!($userid > 0)) // For example when record is saved into an anonymous context with a not loaded object $user. - { + if (!($userid > 0)) { // For example when record is saved into an anonymous context with a not loaded object $user. include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $tmpinvoice = new Facture($this->db); $tmpinvoice->fetch($this->fk_facture_source); @@ -256,8 +266,7 @@ class DiscountAbsolute 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."societe_remise_except"); return $this->id; } else { @@ -278,8 +287,7 @@ class DiscountAbsolute global $conf, $langs; // Check if we can remove the discount - if ($this->fk_facture_source) - { + if ($this->fk_facture_source) { $sql = "SELECT COUNT(rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."societe_remise_except"; $sql .= " WHERE (fk_facture_line IS NOT NULL"; // Not used as absolute simple discount @@ -289,11 +297,9 @@ class DiscountAbsolute dol_syslog(get_class($this)."::delete Check if we can remove discount", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); - if ($obj->nb > 0) - { + if ($obj->nb > 0) { $this->error = 'ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved'; return -2; } @@ -304,8 +310,7 @@ class DiscountAbsolute } // Check if we can remove the discount - if ($this->fk_invoice_supplier_source) - { + if ($this->fk_invoice_supplier_source) { $sql = "SELECT COUNT(rowid) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."societe_remise_except"; $sql .= " WHERE (fk_invoice_supplier_line IS NOT NULL"; // Not used as absolute simple discount @@ -315,11 +320,9 @@ class DiscountAbsolute dol_syslog(get_class($this)."::delete Check if we can remove discount", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); - if ($obj->nb > 0) - { + if ($obj->nb > 0) { $this->error = 'ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved'; return -2; } @@ -333,9 +336,13 @@ class DiscountAbsolute // Delete but only if not used $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_remise_except "; - if ($this->fk_facture_source) $sql .= " WHERE fk_facture_source = ".$this->fk_facture_source; // Delete all lines of same serie - elseif ($this->fk_invoice_supplier_source) $sql .= " WHERE fk_invoice_supplier_source = ".$this->fk_invoice_supplier_source; // Delete all lines of same serie - else $sql .= " WHERE rowid = ".$this->id; // Delete only line + if ($this->fk_facture_source) { + $sql .= " WHERE fk_facture_source = ".((int) $this->fk_facture_source); // Delete all lines of same serie + } elseif ($this->fk_invoice_supplier_source) { + $sql .= " WHERE fk_invoice_supplier_source = ".((int) $this->fk_invoice_supplier_source); // Delete all lines of same serie + } else { + $sql .= " WHERE rowid = ".((int) $this->id); // Delete only line + } $sql .= " AND (fk_facture_line IS NULL"; // Not used as absolute simple discount $sql .= " AND fk_facture IS NULL)"; // Not used as credit note and not used as deposit $sql .= " AND (fk_invoice_supplier_line IS NULL"; // Not used as absolute simple discount @@ -343,19 +350,16 @@ class DiscountAbsolute dol_syslog(get_class($this)."::delete Delete discount", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { // If source of discount was a credit note or deposit, we change source statut. - if ($this->fk_facture_source) - { + if ($this->fk_facture_source) { $sql = "UPDATE ".MAIN_DB_PREFIX."facture"; $sql .= " set paye=0, fk_statut=1"; $sql .= " WHERE (type = 2 or type = 3) AND rowid=".$this->fk_facture_source; dol_syslog(get_class($this)."::delete Update credit note or deposit invoice statut", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $this->db->commit(); return 1; } else { @@ -370,8 +374,7 @@ class DiscountAbsolute dol_syslog(get_class($this)."::delete Update credit note or deposit invoice statut", LOG_DEBUG); $result = $this->db->query($sql); - if ($result) - { + if ($result) { $this->db->commit(); return 1; } else { @@ -406,31 +409,36 @@ class DiscountAbsolute { // phpcs:enable // Check parameters - if (!$rowidline && !$rowidinvoice) - { + if (!$rowidline && !$rowidinvoice) { $this->error = 'ErrorBadParameters'; return -1; } - if ($rowidline && $rowidinvoice) - { + if ($rowidline && $rowidinvoice) { $this->error = 'ErrorBadParameters'; return -2; } $sql = "UPDATE ".MAIN_DB_PREFIX."societe_remise_except"; if (!empty($this->discount_type)) { - if ($rowidline) $sql .= " SET fk_invoice_supplier_line = ".$rowidline; - if ($rowidinvoice) $sql .= " SET fk_invoice_supplier = ".$rowidinvoice; + if ($rowidline) { + $sql .= " SET fk_invoice_supplier_line = ".((int) $rowidline); + } + if ($rowidinvoice) { + $sql .= " SET fk_invoice_supplier = ".((int) $rowidinvoice); + } } else { - if ($rowidline) $sql .= " SET fk_facture_line = ".$rowidline; - if ($rowidinvoice) $sql .= " SET fk_facture = ".$rowidinvoice; + if ($rowidline) { + $sql .= " SET fk_facture_line = ".((int) $rowidline); + } + if ($rowidinvoice) { + $sql .= " SET fk_facture = ".((int) $rowidinvoice); + } } $sql .= " WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::link_to_invoice", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { if (!empty($this->discount_type)) { $this->fk_invoice_supplier_line = $rowidline; $this->fk_invoice_supplier = $rowidinvoice; @@ -466,8 +474,7 @@ class DiscountAbsolute dol_syslog(get_class($this)."::unlink_invoice", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { return 1; } else { $this->error = $this->db->error(); @@ -502,22 +509,28 @@ class DiscountAbsolute } else { $sql .= " AND (rc.fk_facture IS NULL AND rc.fk_facture_line IS NULL)"; // Available to customer } - if (is_object($company)) $sql .= " AND rc.fk_soc = ".$company->id; - if (is_object($user)) $sql .= " AND rc.fk_user = ".$user->id; - if ($filter) $sql .= ' AND ('.$filter.')'; - if ($maxvalue) $sql .= ' AND rc.amount_ttc <= '.price2num($maxvalue); + if (is_object($company)) { + $sql .= " AND rc.fk_soc = ".$company->id; + } + if (is_object($user)) { + $sql .= " AND rc.fk_user = ".$user->id; + } + if ($filter) { + $sql .= ' AND ('.$filter.')'; + } + if ($maxvalue) { + $sql .= ' AND rc.amount_ttc <= '.price2num($maxvalue); + } $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); //while ($obj) //{ //print 'zz'.$obj->amount; //$obj = $this->db->fetch_object($resql); //} - if ($multicurrency) - { + if ($multicurrency) { return $obj->amount_multicurrency; } @@ -539,14 +552,12 @@ class DiscountAbsolute { dol_syslog(get_class($this)."::getSumDepositsUsed", LOG_DEBUG); - if ($invoice->element == 'facture' || $invoice->element == 'invoice') - { + if ($invoice->element == 'facture' || $invoice->element == 'invoice') { $sql = 'SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc, '.MAIN_DB_PREFIX.'facture as f'; $sql .= ' WHERE rc.fk_facture_source=f.rowid AND rc.fk_facture = '.$invoice->id; $sql .= ' AND f.type = 3'; - } elseif ($invoice->element == 'invoice_supplier') - { + } elseif ($invoice->element == 'invoice_supplier') { $sql = 'SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc, '.MAIN_DB_PREFIX.'facture_fourn as f'; $sql .= ' WHERE rc.fk_invoice_supplier_source=f.rowid AND rc.fk_invoice_supplier = '.$invoice->id; @@ -558,11 +569,13 @@ class DiscountAbsolute } $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); - if ($multicurrency == 1) return $obj->multicurrency_amount; - else return $obj->amount; + if ($multicurrency == 1) { + return $obj->multicurrency_amount; + } else { + return $obj->amount; + } } else { $this->error = $this->db->lasterror(); return -1; @@ -580,18 +593,16 @@ class DiscountAbsolute { dol_syslog(get_class($this)."::getSumCreditNotesUsed", LOG_DEBUG); - if ($invoice->element == 'facture' || $invoice->element == 'invoice') - { + if ($invoice->element == 'facture' || $invoice->element == 'invoice') { $sql = 'SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc, '.MAIN_DB_PREFIX.'facture as f'; $sql .= ' WHERE rc.fk_facture_source=f.rowid AND rc.fk_facture = '.$invoice->id; - $sql .= ' AND f.type IN ('.$invoice::TYPE_STANDARD.', '.$invoice::TYPE_CREDIT_NOTE.', '.$invoice::TYPE_SITUATION.')'; // Find discount coming from credit note or excess received - } elseif ($invoice->element == 'invoice_supplier') - { + $sql .= ' AND f.type IN ('.$this->db->sanitize($invoice::TYPE_STANDARD.', '.$invoice::TYPE_CREDIT_NOTE.', '.$invoice::TYPE_SITUATION).')'; // Find discount coming from credit note or excess received + } elseif ($invoice->element == 'invoice_supplier') { $sql = 'SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc, '.MAIN_DB_PREFIX.'facture_fourn as f'; $sql .= ' WHERE rc.fk_invoice_supplier_source=f.rowid AND rc.fk_invoice_supplier = '.$invoice->id; - $sql .= ' AND f.type IN ('.$invoice::TYPE_STANDARD.', '.$invoice::TYPE_CREDIT_NOTE.')'; // Find discount coming from credit note or excess paid + $sql .= ' AND f.type IN ('.$this->db->sanitize($invoice::TYPE_STANDARD.', '.$invoice::TYPE_CREDIT_NOTE).')'; // Find discount coming from credit note or excess paid } else { $this->error = get_class($this)."::getSumCreditNotesUsed was called with a bad object as a first parameter"; dol_print_error($this->error); @@ -599,11 +610,13 @@ class DiscountAbsolute } $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); - if ($multicurrency == 1) return $obj->multicurrency_amount; - else return $obj->amount; + if ($multicurrency == 1) { + return $obj->multicurrency_amount; + } else { + return $obj->amount; + } } else { $this->error = $this->db->lasterror(); return -1; @@ -620,13 +633,11 @@ class DiscountAbsolute { dol_syslog(get_class($this)."::getSumCreditNotesUsed", LOG_DEBUG); - if ($invoice->element == 'facture' || $invoice->element == 'invoice') - { + if ($invoice->element == 'facture' || $invoice->element == 'invoice') { $sql = 'SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc'; $sql .= ' WHERE rc.fk_facture IS NULL AND rc.fk_facture_source = '.$invoice->id; - } elseif ($invoice->element == 'invoice_supplier') - { + } elseif ($invoice->element == 'invoice_supplier') { $sql = 'SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc'; $sql .= ' WHERE rc.fk_invoice_supplier IS NULL AND rc.fk_invoice_supplier_source = '.$invoice->id; @@ -637,11 +648,13 @@ class DiscountAbsolute } $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); - if ($multicurrency) return $obj->multicurrency_amount; - else return $obj->amount; + if ($multicurrency) { + return $obj->multicurrency_amount; + } else { + return $obj->amount; + } } else { $this->error = $this->db->lasterror(); return -1; @@ -684,8 +697,12 @@ class DiscountAbsolute } - if ($withpicto) $result .= ($link.img_object($label, $picto, 'class="classfortooltip"').$linkend); - if ($withpicto && $withpicto != 2) $result .= ' '; + if ($withpicto) { + $result .= ($link.img_object($label, $picto, 'class="classfortooltip"').$linkend); + } + if ($withpicto && $withpicto != 2) { + $result .= ' '; + } $result .= $link.$ref.$linkend; return $result; } diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index a5405fd7158..25b1a43486a 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -70,8 +70,12 @@ class DolEditor dol_syslog(get_class($this)."::DolEditor htmlname=".$htmlname." width=".$width." height=".$height." toolbarname=".$toolbarname); - if (!$rows) $rows = round($height / 20); - if (!$cols) $cols = ($width ?round($width / 6) : 80); + if (!$rows) { + $rows = round($height / 20); + } + if (!$cols) { + $cols = ($width ?round($width / 6) : 80); + } $shorttoolbarname = preg_replace('/_encoded$/', '', $toolbarname); // Name of extended editor to use (FCKEDITOR_EDITORNAME can be 'ckeditor' or 'fckeditor') @@ -81,17 +85,19 @@ class DolEditor $this->readonly = $readonly; // Check if extended editor is ok. If not we force textarea - if ((empty($conf->fckeditor->enabled) && $okforextendededitor != 'ace') || empty($okforextendededitor)) $this->tool = 'textarea'; - if ($okforextendededitor === 'ace') $this->tool = 'ace'; + if ((empty($conf->fckeditor->enabled) && $okforextendededitor != 'ace') || empty($okforextendededitor)) { + $this->tool = 'textarea'; + } + if ($okforextendededitor === 'ace') { + $this->tool = 'ace'; + } //if ($conf->dol_use_jmobile) $this->tool = 'textarea'; // ckeditor and ace seems ok with mobile // Define some properties - if (in_array($this->tool, array('textarea', 'ckeditor', 'ace'))) - { + if (in_array($this->tool, array('textarea', 'ckeditor', 'ace'))) { if ($this->tool == 'ckeditor' && !dol_textishtml($content)) { // We force content to be into HTML if we are using an advanced editor if content is not HTML. $this->content = dol_nl2br($content); - } - else { + } else { $this->content = $content; } $this->htmlname = $htmlname; @@ -122,16 +128,14 @@ class DolEditor global $conf, $langs; $fullpage = false; - if (isset($conf->global->FCKEDITOR_ALLOW_ANY_CONTENT)) - { + if (isset($conf->global->FCKEDITOR_ALLOW_ANY_CONTENT)) { $disallowAnyContent = empty($conf->global->FCKEDITOR_ALLOW_ANY_CONTENT); // Only predefined list of html tags are allowed or all } $found = 0; $out = ''; - if (in_array($this->tool, array('textarea', 'ckeditor'))) - { + if (in_array($this->tool, array('textarea', 'ckeditor'))) { $found = 1; //$out.= ''; - if ($this->tool == 'ckeditor' && !empty($conf->use_javascript_ajax) && !empty($conf->fckeditor->enabled)) - { - if (!defined('REQUIRE_CKEDITOR')) define('REQUIRE_CKEDITOR', '1'); + if ($this->tool == 'ckeditor' && !empty($conf->use_javascript_ajax) && !empty($conf->fckeditor->enabled)) { + if (!defined('REQUIRE_CKEDITOR')) { + define('REQUIRE_CKEDITOR', '1'); + } if (!empty($conf->global->FCKEDITOR_SKIN)) { $skin = $conf->global->FCKEDITOR_SKIN; @@ -165,7 +170,8 @@ class DolEditor readOnly : '.($this->readonly ? 'true' : 'false').', htmlEncodeOutput :'.$htmlencode_force.', allowedContent :'.($disallowAnyContent ? 'false' : 'true').', - extraAllowedContent : \'\', + extraAllowedContent : \'a[target];div{float,display}\', /* Add the style float and display into div to default other allowed tags */ + disallowedContent : '.($disallowAnyContent ? '\'\'' : '\'\'').', fullPage : '.($fullpage ? 'true' : 'false').', toolbar: \''.$this->toolbarname.'\', toolbarStartupExpanded: '.($this->toolbarstartexpanded ? 'true' : 'false').', @@ -191,8 +197,7 @@ class DolEditor }, disableNativeSpellChecker: '.(empty($conf->global->CKEDITOR_NATIVE_SPELLCHECKER) ? 'true' : 'false'); - if ($this->uselocalbrowser) - { + if ($this->uselocalbrowser) { $out .= ','."\n"; // To use filemanager with old fckeditor (GPL) $out .= ' filebrowserBrowseUrl : ckeditorFilebrowserBrowseUrl,'; @@ -202,11 +207,11 @@ class DolEditor $out .= "\n"; // To use filemanager with ckfinder (Non free) and ckfinder directory is inside htdocs/includes /* $out.= ' filebrowserBrowseUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/ckfinder.html\', - filebrowserImageBrowseUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/ckfinder.html?Type=Images\', - filebrowserFlashBrowseUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/ckfinder.html?Type=Flash\', - filebrowserUploadUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files\', - filebrowserImageUploadUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images\', - filebrowserFlashUploadUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash\','."\n"; + filebrowserImageBrowseUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/ckfinder.html?Type=Images\', + filebrowserFlashBrowseUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/ckfinder.html?Type=Flash\', + filebrowserUploadUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files\', + filebrowserImageUploadUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images\', + filebrowserFlashUploadUrl : \''.DOL_URL_ROOT.'/includes/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash\','."\n"; */ $out .= ' filebrowserWindowWidth : \'900\', filebrowserWindowHeight : \'500\', @@ -221,15 +226,13 @@ class DolEditor // Output editor ACE // Warning: ace.js and ext-statusbar.js must be loaded by the parent page. - if (preg_match('/^ace/', $this->tool)) - { + if (preg_match('/^ace/', $this->tool)) { $found = 1; $format = $option; $out .= "\n".''."\n"; - if ($titlecontent) - { + if ($titlecontent) { $out .= '
'.$titlecontent; $out .= '   -   '.dol_escape_htmltag($langs->trans("ShowMoreLines")).'     '; $out .= '
'; @@ -304,12 +307,14 @@ class DolEditor $out .= ''."\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..921c102fd43 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"; } } } @@ -1980,39 +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 - { - // Check if empty without using GETPOST, value can be alpha, int, array, etc... + 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]) && empty($_POST["options_".$key]))) - { + || (!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); @@ -2021,12 +2088,10 @@ class ExtraFields if (in_array($key_type, array('date'))) { // Clean parameters - // TODO GMT date in memory must be GMT so we should add gm=true in parameters - $value_key = dol_mktime(0, 0, 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]); + $value_key = dol_mktime(12, 0, 0, GETPOST("options_".$key."month", 'int'), GETPOST("options_".$key."day", 'int'), GETPOST("options_".$key."year", 'int')); } elseif (in_array($key_type, array('datetime'))) { // Clean parameters - // TODO GMT date in memory must be GMT so we should add gm=true in parameters - $value_key = dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]); + $value_key = dol_mktime(GETPOST("options_".$key."hour", 'int'), GETPOST("options_".$key."min", 'int'), GETPOST("options_".$key."sec", 'int'), GETPOST("options_".$key."month", 'int'), GETPOST("options_".$key."day", 'int'), GETPOST("options_".$key."year", 'int'), 'tzuserrel'); } elseif (in_array($key_type, array('checkbox', 'chkbxlst'))) { $value_arr = GETPOST("options_".$key, 'array'); // check if an array if (!empty($value_arr)) { @@ -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,45 +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', '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'), 0, GETPOST($keysuffix."options_".$key.$keyprefix."month", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."day", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."year", 'int')); - } 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 (in_array($key_type, array('date'))) { + $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'))) { + $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. + } $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 89b5a79df4b..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']); @@ -156,10 +166,12 @@ class HookManager $method, array( 'addCalendarChoice', + 'addCalendarView', 'addMoreActionsButtons', 'addMoreMassActions', 'addSearchEntry', 'addStatisticLine', + 'addSectionECMAuto', 'createDictionaryFieldlist', 'editDictionaryFieldlist', 'getFormMail', @@ -216,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++; @@ -246,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 14bbf007542..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) 2018 Ferran Marcet - * Copyright (C) 2018-2019 Frédéric France + * Copyright (C) 2014-2020 Alexandre Spangaro + * Copyright (C) 2018-2021 Ferran Marcet + * 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 .= ''; + $ret .= ''; + if (preg_match('/ckeditor|textarea/', $typeofdata) && empty($notabletag)) { + $ret .= '
'."\n"; + } + $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"; - $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 .= ''; @@ -5692,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 .= '"; @@ -5726,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"; @@ -5746,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 .= ''; @@ -5791,12 +6296,10 @@ 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 - { + if ($addnowlink == 2) { // local computer time // pad add leading 0 on numbers $reset_scripts .= "Number.prototype.pad = function(size) { var s = String(this); @@ -5807,73 +6310,72 @@ class Form } // Generate the date part, depending on the use or not of the javascript calendar - if ($addnowlink == 1) // server time expressed in user time setup - { - $reset_scripts .= 'jQuery(\'#'.$prefix.'\').val(\''.dol_print_date(dol_now(), 'day', 'tzuser').'\');'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'day\').val(\''.dol_print_date(dol_now(), '%d', 'tzuser').'\');'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'month\').val(\''.dol_print_date(dol_now(), '%m', 'tzuser').'\');'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'year\').val(\''.dol_print_date(dol_now(), '%Y', 'tzuser').'\');'; - } elseif ($addnowlink == 2) - { + if ($addnowlink == 1) { // server time expressed in user time setup + $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').'\');'; + } elseif ($addnowlink == 2) { /* Disabled because the output does not use the string format defined by FormatDateShort key to forge the value into #prefix. - * This break application for foreign languages. - $reset_scripts .= 'jQuery(\'#'.$prefix.'\').val(d.toLocaleDateString(\''.str_replace('_', '-', $langs->defaultlang).'\'));'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'day\').val(d.getDate().pad());'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'month\').val(parseInt(d.getMonth().pad()) + 1);'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'year\').val(d.getFullYear());'; - */ - $reset_scripts .= 'jQuery(\'#'.$prefix.'\').val(\''.dol_print_date(dol_now(), 'day', 'tzuser').'\');'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'day\').val(\''.dol_print_date(dol_now(), '%d', 'tzuser').'\');'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'month\').val(\''.dol_print_date(dol_now(), '%m', 'tzuser').'\');'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'year\').val(\''.dol_print_date(dol_now(), '%Y', 'tzuser').'\');'; + * 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) - { - $reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').val(\''.dol_print_date(dol_now(), '%H', 'tzuser').'\');'; + 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) - { - $reset_scripts .= 'jQuery(\'#'.$prefix.'min\').val(\''.dol_print_date(dol_now(), '%M', 'tzuser').'\');'; + 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 .= ' '; @@ -5881,45 +6383,50 @@ 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 = ""; // Generate the date part, depending on the use or not of the javascript calendar - $reset_scripts .= 'jQuery(\'#'.$prefix.'\').val(\''.dol_print_date(dol_now(), 'day').'\');'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'day\').val(\''.dol_print_date(dol_now(), '%d').'\');'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'month\').val(\''.dol_print_date(dol_now(), '%m').'\');'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'year\').val(\''.dol_print_date(dol_now(), '%Y').'\');'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'\').val(\''.dol_print_date($nowgmt, 'dayinputnoreduce', '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').'\');'; // Update the hour part - if ($h) - { - if ($fullday) $reset_scripts .= " if (jQuery('#fullday:checked').val() == null) {"; - $reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').val(\''.dol_print_date(dol_now(), '%H').'\');'; - if ($fullday) $reset_scripts .= ' } '; + 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 .= ' } '; + } } // Update the minute part - if ($m) - { - if ($fullday) $reset_scripts .= " if (jQuery('#fullday:checked').val() == null) {"; - $reset_scripts .= 'jQuery(\'#'.$prefix.'min\').val(\''.dol_print_date(dol_now(), '%M').'\');'; - if ($fullday) $reset_scripts .= ' } '; + 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 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 .= ' '; } } - // Add a "Plus one hour" link - if ($conf->use_javascript_ajax && $adddateof) - { + // Add a link to set data + if ($conf->use_javascript_ajax && $adddateof) { $tmparray = dol_getdate($adddateof); - 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 c71029769f2..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 $formproject->select_projects(-1, GETPOST('projectid', 'int'), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500'); + print img_picto('', 'project').$formproject->select_projects(-1, GETPOST('projectid', 'int'), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); print '
'; - if ($withdolfichehead) print dol_get_fiche_end(); + if ($withdolfichehead) { + print dol_get_fiche_end(); + } - print '
'; - print ''; + print '
'; + print ''; if ($this->withcancel) { print "      "; print ''; @@ -503,7 +524,7 @@ class FormTicket print ' selected="selected"'; } elseif ($selected == $id) { print ' selected="selected"'; - } elseif ($arraytypes['use_default'] == "1" && !$empty) { + } elseif ($arraytypes['use_default'] == "1" && !$selected && !$empty) { print ' selected="selected"'; } @@ -536,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 @@ -552,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 ' '; @@ -1062,7 +1083,7 @@ class FormTicket if ($this->withfile == 2) { // Can add other files $out .= ''; $out .= ' '; - $out .= ''; + $out .= ''; } $out .= "\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 '
'; + 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 ff14ec56e18..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 (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 601dad3275d..494a92d33e3 100644 --- a/htdocs/core/lib/payments.lib.php +++ b/htdocs/core/lib/payments.lib.php @@ -28,7 +28,6 @@ */ function payment_prepare_head(Paiement $object) { - global $langs, $conf; $h = 0; @@ -137,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'; } @@ -174,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; } @@ -205,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') - { + } elseif ($type == 'member' || $type == 'membersubscription') { + $newtype = 'member'; $out = $urltouse.'/public/payment/newpayment.php?source=membersubscription&ref='.($mode ? '' : ''); - if ($mode == 1) $out .= 'member_ref'; - if ($mode == 0) $out .= urlencode($ref); + 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."' + '".$type."' + member_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."' + '".$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; } @@ -323,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 9ce8d84d7e3..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,14 +373,15 @@ 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').' '.$langs->trans("Proposals").''; + print ''.img_object('', 'propal', 'class="paddingright"').$langs->trans("Proposals").''; print ''; print $product->stats_propale['customers']; print ''; @@ -376,14 +392,15 @@ 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); - $langs->load("propal"); + if ($ret < 0) { + dol_print_error($db); + } + $langs->load("supplier_proposal"); print ''; - print ''.img_object('', 'supplier_proposal').' '.$langs->trans("SupplierProposals").''; + print ''.img_object('', 'supplier_proposal', 'class="paddingright"').$langs->trans("SupplierProposals").''; print ''; print $product->stats_proposal_supplier['suppliers']; print ''; @@ -394,14 +411,15 @@ 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').' '.$langs->trans("CustomersOrders").''; + print ''.img_object('', 'order', 'class="paddingright"').$langs->trans("CustomersOrders").''; print ''; print $product->stats_commande['customers']; print ''; @@ -412,14 +430,15 @@ 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').' '.$langs->trans("SuppliersOrders").''; + print ''.img_object('', 'supplier_order', 'class="paddingright"').$langs->trans("SuppliersOrders").''; print ''; print $product->stats_commande_fournisseur['suppliers']; print ''; @@ -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,14 +468,15 @@ 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').' '.$langs->trans("SuppliersInvoices").''; + print ''.img_object('', 'supplier_invoice', 'class="paddingright"').$langs->trans("SuppliersInvoices").''; print ''; print $product->stats_facture_fournisseur['suppliers']; print ''; @@ -467,14 +488,15 @@ 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').' '.$langs->trans("Contracts").''; + print ''.img_object('', 'contract', 'class="paddingright"').$langs->trans("Contracts").''; print ''; print $product->stats_contrat['customers']; print ''; @@ -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) { @@ -496,22 +517,21 @@ function show_stats_for_company($product, $socid) $langs->load("mrp"); print ''; - print ''.img_object('', 'mrp').' '.$langs->trans("BOM").''; + print ''.img_object('', 'bom', 'class="paddingright"').$langs->trans("BOM").''; print ''; print ''; - print $form->textwithpicto($product->stats_bom['nb_toproduce'], $langs->trans("QtyToProduce")); - print $form->textwithpicto($product->stats_bom['nb_toconsume'], $langs->trans("ToConsume")); + print $form->textwithpicto($product->stats_bom['nb_toconsume'], $langs->trans("RowMaterial")); + print $form->textwithpicto($product->stats_bom['nb_toproduce'], $langs->trans("Finished")); print ''; - print $form->textwithpicto($product->stats_bom['qty_toproduce'], $langs->trans("QtyToProduce")); - print $form->textwithpicto($product->stats_bom['qty_toconsume'], $langs->trans("ToConsume")); + print $form->textwithpicto($product->stats_bom['qty_toconsume'], $langs->trans("RowMaterial")); + print $form->textwithpicto($product->stats_bom['qty_toproduce'], $langs->trans("Finished")); print ''; print ''; } // 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) { @@ -519,7 +539,7 @@ function show_stats_for_company($product, $socid) } $langs->load("mrp"); print ''; - print ''.img_object('', 'mrp').' '.$langs->trans("MO").''; + print ''.img_object('', 'mrp', 'class="paddingright"').$langs->trans("MO").''; print ''; print $form->textwithpicto($product->stats_mo['customers_toconsume'], $langs->trans("ToConsume")); print $form->textwithpicto($product->stats_mo['customers_consumed'], $langs->trans("QtyAlreadyConsumed")); @@ -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 74e624ca7cb..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; } @@ -476,6 +634,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t $projectstatic->public = $lines[$i]->public; $projectstatic->title = $lines[$i]->projectlabel; $projectstatic->usage_bill_time = $lines[$i]->usage_bill_time; + $projectstatic->status = $lines[$i]->projectstatus; $taskstatic->id = $lines[$i]->id; $taskstatic->ref = $lines[$i]->ref; @@ -490,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 ""; @@ -521,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 '
'; @@ -531,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"; } @@ -554,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'])) { @@ -581,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 ''; } @@ -597,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 ''; } @@ -622,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 ''; @@ -649,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 @@ -684,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--; @@ -704,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'); @@ -719,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 ''; } @@ -752,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 ''; } @@ -777,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'); @@ -790,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 ''; @@ -833,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; } @@ -881,6 +1103,7 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec $projectstatic->ref = $lines[$i]->project_ref; $projectstatic->title = $lines[$i]->project_label; $projectstatic->public = $lines[$i]->public; + $projectstatic->status = $lines[$i]->project_status; $taskstatic->id = $lines[$i]->task_id; $taskstatic->ref = ($lines[$i]->task_ref ? $lines[$i]->task_ref : $lines[$i]->task_id); @@ -892,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; } @@ -906,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"; @@ -919,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; } @@ -928,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 "   "; @@ -950,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; } @@ -972,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 ''; @@ -983,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'); @@ -1061,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; } } @@ -1116,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); @@ -1127,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"; @@ -1223,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 @@ -1255,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; } @@ -1312,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 @@ -1322,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'; } @@ -1333,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; @@ -1363,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"; @@ -1378,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'); @@ -1434,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; } @@ -1489,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); @@ -1500,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.''; } @@ -1526,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"; @@ -1596,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 @@ -1628,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"; @@ -1741,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'); @@ -1795,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; } @@ -1843,6 +2109,7 @@ function projectLinesPerMonth(&$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); @@ -1854,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.''; } @@ -1869,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 @@ -1892,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 % @@ -1914,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.='+'; @@ -1983,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)); } @@ -1999,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'); @@ -2036,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; @@ -2052,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; + } } } @@ -2103,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(); @@ -2111,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"; @@ -2120,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)).")"; @@ -2154,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,"; @@ -2179,13 +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 .= " GROUP BY p.rowid, p.ref, p.title, p.fk_soc, s.nom, p.fk_user_creat, p.public, p.fk_statut, p.fk_opp_status, p.opp_percent, p.opp_amount, p.dateo, p.datee"; + $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; @@ -2194,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; @@ -2223,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; @@ -2235,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 ''; @@ -2363,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; @@ -2257,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 @@ -2292,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) : '').''; @@ -2334,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 ''; @@ -2393,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 ''; @@ -2433,8 +2720,7 @@ function getTaskProgressView($task, $label = true, $progressNumber = true, $hide $out .= '
'; - if ($label !== false) - { + if ($label !== false) { $out .= ' '; if ($label !== true) { @@ -2446,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 .= ''; @@ -2468,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 .= ' '; @@ -2512,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 @@ -2526,13 +2818,19 @@ function getTaskProgressBadge($task, $label = '', $tooltip = '') if (doubleval($progressCalculated) > doubleval($task->progress * $warningRatio)) { $badgeClass .= 'badge-danger'; - if (empty($tooltip)) $tooltip = $task->progress.'% < '.$langs->trans("Expected").' '.$progressCalculated.'%'; + if (empty($tooltip)) { + $tooltip = $task->progress.'% < '.$langs->trans("TimeConsumed").' '.$progressCalculated.'%'; + } } elseif (doubleval($progressCalculated) > doubleval($task->progress)) { // warning if close at 10% $badgeClass .= 'badge-warning'; - if (empty($tooltip)) $tooltip = $task->progress.'% < '.$langs->trans("Expected").' '.$progressCalculated.'%'; + if (empty($tooltip)) { + $tooltip = $task->progress.'% < '.$langs->trans("TimeConsumed").' '.$progressCalculated.'%'; + } } else { $badgeClass .= 'badge-success'; - if (empty($tooltip)) $tooltip = $task->progress.'% >= '.$langs->trans("Expected").' '.$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 9667a67d360..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; } @@ -165,6 +170,7 @@ function dol_verifyHash($chain, $hash, $type = '0') /** * Check permissions of a user to show a page and an object. Check read permission. * If GETPOST('action','aZ09') defined, we also check write and delete permission. + * This method check permission on module then call checkUserAccessToObject() for permission on object (according to entity and socid of user). * * @param User $user User to check * @param string $features Features to check (it must be module $object->element. Examples: 'societe', 'contact', 'produit&service', 'produit|service', ...) @@ -175,83 +181,147 @@ function dol_verifyHash($chain, $hash, $type = '0') * @param string $dbt_select Field name for select if not rowid. Not used if objectid is null (optional) * @param int $isdraft 1=The object with id=$objectid is a draft * @return int Always 1, die process if not allowed - * @see dol_check_secure_access_document() + * @see dol_check_secure_access_document(), checkUserAccessToObject() */ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $feature2 = '', $dbt_keyfield = 'fk_soc', $dbt_select = 'rowid', $isdraft = 0) { global $db, $conf; global $hookmanager; - //dol_syslog("functions.lib:restrictedArea $feature, $objectid, $dbtablename,$feature2,$dbt_socfield,$dbt_select"); + //dol_syslog("functions.lib:restrictedArea $feature, $objectid, $dbtablename, $feature2, $dbt_socfield, $dbt_select, $isdraft"); //print "user_id=".$user->id.", features=".$features.", feature2=".$feature2.", objectid=".$objectid; //print ", dbtablename=".$dbtablename.", dbt_socfield=".$dbt_keyfield.", dbt_select=".$dbt_select; //print ", perm: ".$features."->".$feature2."=".($user->rights->$features->$feature2->lire)."
"; $parentfortableentity = ''; - if ($features == 'facturerec') $features = 'facture'; - if ($features == 'mo') $features = 'mrp'; - if ($features == 'member') $features = 'adherent'; - if ($features == 'subscription') { $features = 'adherent'; $feature2 = 'cotisation'; }; - if ($features == 'websitepage') { $features = 'website'; $tableandshare = 'website_page'; $parentfortableentity = 'fk_website@website'; } - if ($features == 'project') $features = 'projet'; - if ($features == 'product') $features = 'produit'; + // 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'; + } // Get more permissions checks from hooks - $parameters = array('features'=>$features, 'objectid'=>$objectid, 'idtype'=>$dbt_select); + $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); - - // More parameters - $params = explode('&', $tableandshare); - $dbtablename = (!empty($params[0]) ? $params[0] : ''); - $sharedelement = (!empty($params[1]) ? $params[1] : $dbtablename); + 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++; + } + } elseif ($feature == 'payment_supplier') { + 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). @@ -260,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) @@ -323,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); @@ -409,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',...) @@ -426,122 +551,122 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand { global $db, $conf; + //dol_syslog("functions.lib:restrictedArea $feature, $objectid, $dbtablename, $feature2, $dbt_socfield, $dbt_select, $isdraft"); + //print "user_id=".$user->id.", features=".join(',', $featuresarray).", feature2=".$feature2.", objectid=".$objectid; + //print ", tableandshare=".$tableandshare.", dbt_socfield=".$dbt_keyfield.", dbt_select=".$dbt_select."
"; + // More parameters $params = explode('&', $tableandshare); $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', '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 and link to third party. Allowed if link is empty (Ex: contacts...). + $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 - $checktask = array('projet_task'); + $checktask = array('projet_task'); // Test for task object $nocheck = array('barcode', 'stock'); // No test - //$checkdefault = 'all other not already defined'; // Test on entity and link to third party. Not allowed if link is empty (Ex: invoice, orders...). + //$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 with entity - if (in_array($feature, $check)) - { + // Check permission for object on entity only + 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)) - { - if (!empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) - { - if ($conf->entity == 1 && $user->admin && !$user->entity) - { - $sql .= " WHERE dbt.".$dbt_select." IN (".$objectid.")"; + 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 (".$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 - { + } elseif (in_array($feature, $checksoc)) { // We check feature = checksoc // If external user: Check permission for external users - if ($user->socid > 0) - { - if ($user->socid <> $objectid) return false; - } // If internal user: Check permission for internal users that are restricted on their objects - elseif (!empty($conf->societe->enabled) && ($user->rights->societe->lire && !$user->rights->societe->client->voir)) - { + if ($user->socid > 0) { + 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).")"; - } // 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(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 and link to societe. 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); @@ -552,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); @@ -575,54 +700,66 @@ 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 - { + } 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 ($user->socid > 0) { + 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; - } // If internal user: Check permission for internal users that are restricted on their objects - elseif (!empty($conf->societe->enabled) && ($user->rights->societe->lire && !$user->rights->societe->client->voir)) - { - if (empty($dbt_keyfield)) dol_print_error('', 'Param dbt_keyfield is required but not defined'); - $sql = "SELECT COUNT(sc.fk_soc) as nb"; - $sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; - $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql .= " WHERE dbt.".$dbt_select." IN (".$objectid.")"; - $sql .= " AND sc.fk_soc = dbt.".$dbt_keyfield; - $sql .= " AND dbt.".$dbt_keyfield." = s.rowid"; - $sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; - $sql .= " AND sc.fk_user = ".$user->id; - } // If multicompany and internal users with all permissions, check user is in correct entity - elseif (!empty($conf->multicompany->enabled)) - { + } 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'); + } + $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 (".$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; + } else { + // On ticket, the thirdparty is not mandatory, so we need a special test to accept record with no thirdparties. + $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 (".$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)"; + } + } 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; } } @@ -645,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(); @@ -654,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')); @@ -676,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 { @@ -687,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 cf1d1793a88..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,39 +61,47 @@ 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++; } require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; - $upload_dir = $conf->commande->dir_output."/".dol_sanitizeFileName($object->ref); + $upload_dir = $conf->expedition->dir_output."/sending/".dol_sanitizeFileName($object->ref); $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); $nbLinks = Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/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 92fdfa21aff..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,14 +281,14 @@ 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'); + } - $out = ''; $histo = array(); $numaction = 0; - $now = dol_now('tzuser'); + $now = dol_now(); - // Open DSI -- Fix order by -- Begin $sortfield_list = explode(',', $sortfield); $sortfield_label_list = array('a.id' => 'id', 'a.datep' => 'dp', 'a.percent' => 'percent'); $sortfield_new_list = array(); @@ -294,9 +297,8 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no } $sortfield_new = implode(',', $sortfield_new_list); - if (!empty($conf->agenda->enabled)) - { - // Recherche histo sur actioncomm + if (!empty($conf->agenda->enabled)) { + // Search histo on actioncomm if (is_object($objcon) && $objcon->id > 0) { $sql = "SELECT DISTINCT a.id, a.label as label,"; } else { @@ -365,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; + } } } @@ -399,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"; @@ -443,85 +465,97 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no $sql = $sql2; } - //TODO Add limit in nb of results - $sql .= $db->order($sortfield_new, $sortorder); + // TODO Add limit in nb of results + if ($sql) { // May not be defined if module Agenda is not enabled and mailing module disabled too + $sql .= $db->order($sortfield_new, $sortorder); - dol_syslog("company.lib::show_actions_done", LOG_DEBUG); - $resql = $db->query($sql); - if ($resql) { - $i = 0; - $num = $db->num_rows($resql); + dol_syslog("company.lib::show_actions_done", LOG_DEBUG); + $resql = $db->query($sql); + if ($resql) { + $i = 0; + $num = $db->num_rows($resql); - while ($i < $num) { - $obj = $db->fetch_object($resql); + while ($i < $num) { + $obj = $db->fetch_object($resql); - if ($obj->type == 'action') { - $contactaction = new ActionComm($db); - $contactaction->id = $obj->id; - $result = $contactaction->fetchResources(); - if ($result < 0) { - dol_print_error($db); - setEventMessage("company.lib::show_actions_done Error fetch ressource", 'errors'); + if ($obj->type == 'action') { + $contactaction = new ActionComm($db); + $contactaction->id = $obj->id; + $result = $contactaction->fetchResources(); + if ($result < 0) { + dol_print_error($db); + setEventMessage("company.lib::show_actions_done Error fetch ressource", 'errors'); + } + + //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'; + } + + $histo[$numaction] = array( + 'type'=>$obj->type, + 'tododone'=>$tododone, + 'id'=>$obj->id, + 'datestart'=>$db->jdate($obj->dp), + 'dateend'=>$db->jdate($obj->dp2), + 'note'=>$obj->label, + 'message'=>$obj->message, + 'percent'=>$obj->percent, + + 'userid'=>$obj->user_id, + 'login'=>$obj->user_login, + 'userfirstname'=>$obj->user_firstname, + 'userlastname'=>$obj->user_lastname, + 'userphoto'=>$obj->user_photo, + + 'contact_id'=>$obj->fk_contact, + 'socpeopleassigned' => $contactaction->socpeopleassigned, + 'lastname'=>$obj->lastname, + 'firstname'=>$obj->firstname, + 'fk_element'=>$obj->fk_element, + 'elementtype'=>$obj->elementtype, + // Type of event + 'acode'=>$obj->acode, + 'alabel'=>$obj->alabel, + 'libelle'=>$obj->alabel, // deprecated + 'apicto'=>$obj->apicto + ); + } else { + $histo[$numaction] = array( + 'type'=>$obj->type, + 'tododone'=>'done', + 'id'=>$obj->id, + 'datestart'=>$db->jdate($obj->dp), + 'dateend'=>$db->jdate($obj->dp2), + 'note'=>$obj->label, + 'message'=>$obj->message, + 'percent'=>$obj->percent, + 'acode'=>$obj->acode, + + 'userid'=>$obj->user_id, + 'login'=>$obj->user_login, + 'userfirstname'=>$obj->user_firstname, + 'userlastname'=>$obj->user_lastname, + 'userphoto'=>$obj->user_photo + ); } - //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'; - - $histo[$numaction] = array( - 'type'=>$obj->type, - 'tododone'=>$tododone, - 'id'=>$obj->id, - 'datestart'=>$db->jdate($obj->dp), - 'dateend'=>$db->jdate($obj->dp2), - 'note'=>$obj->label, - 'message'=>$obj->message, - 'percent'=>$obj->percent, - - 'userid'=>$obj->user_id, - 'login'=>$obj->user_login, - 'userfirstname'=>$obj->user_firstname, - 'userlastname'=>$obj->user_lastname, - 'userphoto'=>$obj->user_photo, - - 'contact_id'=>$obj->fk_contact, - 'socpeopleassigned' => $contactaction->socpeopleassigned, - 'lastname'=>$obj->lastname, - 'firstname'=>$obj->firstname, - 'fk_element'=>$obj->fk_element, - 'elementtype'=>$obj->elementtype, - // Type of event - 'acode'=>$obj->acode, - 'alabel'=>$obj->alabel, - 'libelle'=>$obj->alabel, // deprecated - 'apicto'=>$obj->apicto - ); - } else { - $histo[$numaction] = array( - 'type'=>$obj->type, - 'tododone'=>'done', - 'id'=>$obj->id, - 'datestart'=>$db->jdate($obj->dp), - 'dateend'=>$db->jdate($obj->dp2), - 'note'=>$obj->label, - 'message'=>$obj->message, - 'percent'=>$obj->percent, - 'acode'=>$obj->acode, - - 'userid'=>$obj->user_id, - 'login'=>$obj->user_login, - 'userfirstname'=>$obj->user_firstname, - 'userlastname'=>$obj->user_lastname, - 'userphoto'=>$obj->user_photo - ); + $numaction++; + $i++; } - - $numaction++; - $i++; + } else { + dol_print_error($db); } - } else { - dol_print_error($db); + } + + // Set $out to sow events + $out = ''; + + if (empty($conf->agenda->enabled)) { + $langs->loadLangs(array("admin", "errors")); + $out = info_admin($langs->trans("WarningModuleXDisabledSoYouMayMissEventHere", $langs->transnoentitiesnoconv("Module2400Name")), 0, 0, 'warning'); } if (!empty($conf->agenda->enabled) || (!empty($conf->mailing->enabled) && !empty($objcon->email))) { @@ -549,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"; @@ -591,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); } @@ -607,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']; @@ -622,7 +661,7 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no $out .= ''; $out .= '
  • '; $out .= ''; - $out .= dol_print_date($histo[$key]['datestart'], 'daytext', 'tzserver', $langs); + $out .= dol_print_date($histo[$key]['datestart'], 'daytext', 'tzuserrel', $langs); $out .= ''; $out .= '
  • '; $out .= ''; @@ -652,30 +691,39 @@ 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 .= ''; } $out .= ''; // Date $out .= ' '; - $out .= dol_print_date($histo[$key]['datestart'], 'dayhour'); + $out .= dol_print_date($histo[$key]['datestart'], 'dayhour', 'tzuserrel'); if ($histo[$key]['dateend'] && $histo[$key]['dateend'] != $histo[$key]['datestart']) { $tmpa = dol_getdate($histo[$key]['datestart'], true); $tmpb = dol_getdate($histo[$key]['dateend'], true); if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) { - $out .= '-'.dol_print_date($histo[$key]['dateend'], 'hour'); + $out .= '-'.dol_print_date($histo[$key]['dateend'], 'hour', 'tzuserrel'); } else { - $out .= '-'.dol_print_date($histo[$key]['dateend'], 'dayhour'); + $out .= '-'.dol_print_date($histo[$key]['dateend'], 'dayhour', 'tzuserrel'); } } $late = 0; - if ($histo[$key]['percent'] == 0 && $histo[$key]['datestart'] && $histo[$key]['datestart'] < ($now - $delay_warning)) $late = 1; - if ($histo[$key]['percent'] == 0 && !$histo[$key]['datestart'] && $histo[$key]['dateend'] && $histo[$key]['datestart'] < ($now - $delay_warning)) $late = 1; - if ($histo[$key]['percent'] > 0 && $histo[$key]['percent'] < 100 && $histo[$key]['dateend'] && $histo[$key]['dateend'] < ($now - $delay_warning)) $late = 1; - if ($histo[$key]['percent'] > 0 && $histo[$key]['percent'] < 100 && !$histo[$key]['dateend'] && $histo[$key]['datestart'] && $histo[$key]['datestart'] < ($now - $delay_warning)) $late = 1; - if ($late) $out .= img_warning($langs->trans("Late")).' '; + 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 @@ -683,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', ''); @@ -723,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 .= '
    '; @@ -748,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).')'; + } } } } @@ -759,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.'"'; @@ -819,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"; @@ -230,10 +274,11 @@ function dolSavePageContent($filetpl, Website $object, WebsitePage $objectpage) //var_dump($filetpl);exit; $result = file_put_contents($filetpl, $tplcontent); - if (!empty($conf->global->MAIN_UMASK)) + if (!empty($conf->global->MAIN_UMASK)) { @chmod($filetpl, octdec($conf->global->MAIN_UMASK)); + } - return $result; + return $result; } @@ -308,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; } @@ -329,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; } @@ -350,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; } @@ -371,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; } @@ -392,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; } @@ -413,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; } @@ -434,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; } @@ -452,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')); } } @@ -484,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; @@ -519,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 faf1b5bc871..ad4688f9134 100644 --- a/htdocs/core/lib/ws.lib.php +++ b/htdocs/core/lib/ws.lib.php @@ -29,7 +29,7 @@ * @param array $authentication Array with authentication informations ('login'=>,'password'=>,'entity'=>,'dolibarrkey'=>) * @param int $error Number of errors * @param string $errorcode Error string code - * @param string $errorlabel Error string label + * @param string $errorlabel Error string label * @return User Return user object identified by login/pass/entity into authentication array */ function check_authentication($authentication, &$error, &$errorcode, &$errorlabel) @@ -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 f0191da53c0..3f77eca1326 100644 --- a/htdocs/core/login/functions_openid.php +++ b/htdocs/core/login/functions_openid.php @@ -43,8 +43,7 @@ function check_user_password_openid($usertotest, $passwordtotest, $entitytotest) $login = ''; // Get identity from user and redirect browser to OpenID Server - if (GETPOSISSET('username')) - { + if (GETPOSTISSET('username')) { $openid = new SimpleOpenID(); $openid->SetIdentity($_POST['username']); $protocol = ($conf->file->main_force_https ? 'https://' : 'http://'); @@ -52,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 { @@ -61,15 +59,12 @@ function check_user_password_openid($usertotest, $passwordtotest, $entitytotest) return false; } return false; - } - // Perform HTTP Request to OpenID server to validate key - elseif ($_GET['openid_mode'] == 'id_res') - { + } elseif ($_GET['openid_mode'] == 'id_res') { + // Perform HTTP Request to OpenID server to validate key $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"; @@ -79,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 @@ -101,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; @@ -111,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 27eed001188..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__); @@ -19,7 +19,7 @@ insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, left insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('comptabilite|accounting|asset', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->asset->enabled', 9__+MAX_llx_menu__, __HANDLER__, 'top', 'accountancy', '', 0, '/compta/index.php?mainmenu=accountancy&leftmenu=accountancy', 'MenuAccountancy', -1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->mouvements->lire || $user->rights->asset->read', '', 2, 54, __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 ('', '', 8__+MAX_llx_menu__, __HANDLER__, 'top', 'tools', '', 0, '/core/tools.php?mainmenu=tools&leftmenu=', 'Tools', -1, 'other', '', '', 2, 90, __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 ('adherent', '$conf->adherent->enabled', 13__+MAX_llx_menu__, __HANDLER__, 'top', 'members', '', 0, '/adherents/index.php?mainmenu=members&leftmenu=', 'Members', -1, 'members', '$user->rights->adherent->lire', '', 2, 19, __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 ('hrm|holiday|deplacement|expensereport', '$conf->hrm->enabled || $conf->holiday->enabled || $conf->deplacement->enabled || $conf->expensereport->enabled', 15__+MAX_llx_menu__, __HANDLER__, 'top', 'hrm', '', 0, '/hrm/index.php?mainmenu=hrm&leftmenu=', 'HRM', -1, 'holiday', '$user->rights->hrm->employee->read || $user->rights->holiday->write || $user->rights->deplacement->lire || $user->rights->expensereport->lire', '', 0, 80, __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 ('hrm|holiday|deplacement|expensereport', '$conf->hrm->enabled || $conf->holiday->enabled || $conf->deplacement->enabled || $conf->expensereport->enabled', 15__+MAX_llx_menu__, __HANDLER__, 'top', 'hrm', '', 0, '/hrm/index.php?mainmenu=hrm&leftmenu=', 'HRM', -1, 'holiday', '$user->rights->user->user->lire || $user->rights->holiday->read || $user->rights->deplacement->lire || $user->rights->expensereport->lire', '', 0, 80, __ENTITY__); -- Home - Dashboard insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', __HANDLER__, 'left', 90__+MAX_llx_menu__, 'home', '', 1__+MAX_llx_menu__, '/index.php', 'MyDashboard', 0, '', '', '', 2, 0, __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__); @@ -411,9 +413,9 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 5200__+MAX_llx_menu__, 'members', 'cat', 13__+MAX_llx_menu__, '/categories/index.php?mainmenu=members&leftmenu=cat&type=3', 'MembersCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 5201__+MAX_llx_menu__, 'members', '', 5200__+MAX_llx_menu__, '/categories/card.php?mainmenu=members&action=create&type=3', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); -- HRM - Employee -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4600__+MAX_llx_menu__, 'hrm', 'hrm', 15__+MAX_llx_menu__, '/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee', 'Employees', 0, 'hrm', '$user->rights->hrm->employee->read', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4601__+MAX_llx_menu__, 'hrm', '', 4600__+MAX_llx_menu__, '/user/card.php?mainmenu=hrm&action=create&employee=1', 'NewEmployee', 1, 'hrm', '$user->rights->hrm->employee->write', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4602__+MAX_llx_menu__, 'hrm', '', 4600__+MAX_llx_menu__, '/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee&contextpage=employeelist', 'List', 1, 'hrm', '$user->rights->hrm->employee->read', '', 0, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4600__+MAX_llx_menu__, 'hrm', 'hrm', 15__+MAX_llx_menu__, '/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee', 'Employees', 0, 'hrm', '$user->rights->user->user->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->hrm->enabled', __HANDLER__, 'left', 4601__+MAX_llx_menu__, 'hrm', '', 4600__+MAX_llx_menu__, '/user/card.php?mainmenu=hrm&action=create&employee=1', 'NewEmployee', 1, 'hrm', '$user->rights->user->user->creer', '', 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->hrm->enabled', __HANDLER__, 'left', 4602__+MAX_llx_menu__, 'hrm', '', 4600__+MAX_llx_menu__, '/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee&contextpage=employeelist', 'List', 1, 'hrm', '$user->rights->user->user->lire', '', 0, 2, __ENTITY__); -- HRM - Holiday insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5000__+MAX_llx_menu__, 'hrm', 'hrm', 15__+MAX_llx_menu__, '/holiday/list.php?mainmenu=hrm&leftmenu=hrm', 'CPTitreMenu', 0, 'holiday', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5001__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/card.php?mainmenu=hrm&action=create', 'MenuAddCP', 1, 'holiday', '$user->rights->holiday->write', '', 0, 1, __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 85b63a6f4e3..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(), ); @@ -361,7 +356,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = // HRM $tmpentry = array( 'enabled'=>(!empty($conf->hrm->enabled) || (!empty($conf->holiday->enabled)) || !empty($conf->deplacement->enabled) || !empty($conf->expensereport->enabled) || !empty($conf->recruitment->enabled)), - 'perms'=>(!empty($user->rights->hrm->employee->read) || !empty($user->rights->holiday->write) || !empty($user->rights->deplacement->lire) || !empty($user->rights->expensereport->lire) || !empty($user->rights->recruitment->recruitmentjobposition->read)), + 'perms'=>(!empty($user->rights->user->user->lire) || !empty($user->rights->holiday->read) || !empty($user->rights->deplacement->lire) || !empty($user->rights->expensereport->lire) || !empty($user->rights->recruitment->recruitmentjobposition->read)), 'module'=>'hrm|holiday|deplacement|expensereport|recruitment' ); @@ -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,13 +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'); - - if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_closure/', $leftmenu)) { - $newmenu->add("/accountancy/closure/validate.php?leftmenu=accountancy_closure", $langs->trans("MenuAccountancyValidationMovements"), 2, $user->rights->accounting->fiscalyear->write); - } - } + $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'); @@ -1379,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); @@ -1389,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); @@ -1450,12 +1443,12 @@ 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'); if ($usemenuhider || empty($leftmenu) || preg_match('/asset_type/', $leftmenu)) { - $newmenu->add("/asset/type.php?leftmenu=asset_type&action=create", $langs->trans("MenuNewTypeAssets"), 2, (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->asset->setup_advance)); + $newmenu->add("/asset/type.php?leftmenu=asset_type&action=create", $langs->trans("MenuNewTypeAssets"), 2, $user->rights->asset->setup_advance); $newmenu->add("/asset/type.php?leftmenu=asset_type", $langs->trans("MenuListTypeAssets"), 2, $user->rights->asset->read); } } @@ -1471,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'); @@ -1489,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); @@ -1503,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); @@ -1517,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); @@ -1527,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); } @@ -1539,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)) { @@ -1553,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); } @@ -1567,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 @@ -1584,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); @@ -1606,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); @@ -1624,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") { @@ -1638,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") { @@ -1662,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'); } @@ -1670,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'); } @@ -1704,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) { @@ -1727,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"')); } } } @@ -1745,9 +1738,9 @@ 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->hrm->employee->read, '', $mainmenu, 'hrm'); - $newmenu->add("/user/card.php?mainmenu=hrm&leftmenu=hrm&action=create&employee=1", $langs->trans("NewEmployee"), 1, $user->rights->hrm->employee->write); - $newmenu->add("/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee&contextpage=employeelist", $langs->trans("List"), 1, $user->rights->hrm->employee->read); + $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); } // Leave/Holiday/Vacation module @@ -1755,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") { @@ -1773,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); @@ -1782,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") { @@ -1802,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"')); } } } @@ -1814,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); } } @@ -1845,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); @@ -1866,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); @@ -1875,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); } @@ -1895,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++; @@ -1935,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; @@ -2059,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 1ab7778bb01..f51aacdd90e 100644 --- a/htdocs/core/menus/standard/empty.php +++ b/htdocs/core/menus/standard/empty.php @@ -198,8 +198,8 @@ class MenuManager $submenu->add("/admin/translation.php?mainmenu=home", $langs->trans("Translation"), 1); $submenu->add("/admin/defaultvalues.php?mainmenu=home", $langs->trans("DefaultValues"), 1); - $submenu->add("/admin/boxes.php", $langs->trans("Boxes"), 1); - $submenu->add("/admin/delais.php", $langs->trans("Alerts"), 1); + $submenu->add("/admin/boxes.php?mainmenu=home", $langs->trans("Boxes"), 1); + $submenu->add("/admin/delais.php?mainmenu=home", $langs->trans("Alerts"), 1); $submenu->add("/admin/proxy.php?mainmenu=home", $langs->trans("Security"), 1); $submenu->add("/admin/limits.php?mainmenu=home", $langs->trans("MenuLimits"), 1); $submenu->add("/admin/pdf.php?mainmenu=home", $langs->trans("PDF"), 1); @@ -340,8 +340,8 @@ class MenuManager $this->menu->add("/admin/translation.php?mainmenu=home", $langs->trans("Translation"), 1); $this->menu->add("/admin/defaultvalues.php?mainmenu=home", $langs->trans("DefaultValues"), 1); - $this->menu->add("/admin/boxes.php", $langs->trans("Boxes"), 1); - $this->menu->add("/admin/delais.php", $langs->trans("Alerts"), 1); + $this->menu->add("/admin/boxes.php?mainmenu=home", $langs->trans("Boxes"), 1); + $this->menu->add("/admin/delais.php?mainmenu=home", $langs->trans("Alerts"), 1); $this->menu->add("/admin/proxy.php?mainmenu=home", $langs->trans("Security"), 1); $this->menu->add("/admin/limits.php?mainmenu=home", $langs->trans("MenuLimits"), 1); $this->menu->add("/admin/pdf.php?mainmenu=home", $langs->trans("PDF"), 1); @@ -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..b92937cdada 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -316,7 +316,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 +353,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 +389,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 +416,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 +514,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 +553,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 +587,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 +618,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 +643,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 +720,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 +884,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 +914,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 +967,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 +1027,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 +1038,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 +1055,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 +1072,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 +1089,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 +1140,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 +1175,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 +1193,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 +1202,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 +1232,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 +1309,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 +1354,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 +1380,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 +1495,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 +1505,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 +1558,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 +1573,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 +1589,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 +1627,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 +1681,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 +1690,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 +1728,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 +1750,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 +1769,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 +1822,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 +1834,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 +1846,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 +1873,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 +1951,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 +1963,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 +1991,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 +2084,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 +2098,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 +2160,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 +2185,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 +2221,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,9 +2229,15 @@ 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 '
    @@ -2230,10 +2247,12 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $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"'); } 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 f3ea817fa73..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, 'cheque').$number; + $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 0b99583e08e..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,18 +289,22 @@ 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)) - { - $pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); + 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]; + } + $pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -305,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; @@ -331,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); @@ -344,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); @@ -366,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 @@ -383,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); @@ -409,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); @@ -427,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; @@ -436,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 { @@ -467,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'); @@ -491,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'); @@ -500,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'); @@ -513,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; @@ -523,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); @@ -561,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); @@ -574,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); @@ -587,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); + } } } @@ -617,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(); @@ -628,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); @@ -686,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); @@ -698,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").':'; @@ -707,7 +732,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetFont('', '', $default_font_size - 2); $pdf->SetXY($posxval, $posy); - $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc); + $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label); $lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement); $pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L'); @@ -717,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); @@ -774,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").':'; @@ -789,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); @@ -806,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); @@ -833,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); @@ -886,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); @@ -911,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").")"; } @@ -949,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").")"; } @@ -983,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").")"; } @@ -1011,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").")"; } @@ -1040,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").")"; } @@ -1097,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++; @@ -1147,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); @@ -1156,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)); @@ -1167,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); @@ -1176,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'); } @@ -1217,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'); } @@ -1263,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); } @@ -1279,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 { @@ -1323,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'); } } @@ -1360,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); @@ -1369,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; @@ -1389,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 @@ -1440,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]); } @@ -1455,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 d1492dbc5eb..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,16 +335,18 @@ 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)) - { - $pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); + 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]; + } + $pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -353,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++; } } @@ -369,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); @@ -382,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); @@ -404,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); + } } } @@ -423,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; @@ -443,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. @@ -468,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++; @@ -506,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 @@ -518,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; } @@ -552,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. @@ -571,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']; @@ -597,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; @@ -614,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 { @@ -649,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); @@ -672,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); @@ -681,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); @@ -715,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); @@ -737,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; @@ -747,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); @@ -784,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); @@ -797,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); @@ -810,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); @@ -841,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(); @@ -852,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); @@ -904,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); @@ -916,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").':'; @@ -925,7 +948,7 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->SetFont('', '', $default_font_size - 2); $pdf->SetXY($posxval, $posy); - $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc); + $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label); $lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement); $pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L'); @@ -935,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); @@ -973,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").':'; @@ -992,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").':'; @@ -1007,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); @@ -1024,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); @@ -1051,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); @@ -1102,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); @@ -1126,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").")"; } @@ -1163,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").")"; } @@ -1197,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").")"; } @@ -1225,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").")"; } @@ -1254,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").")"; } @@ -1311,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++; @@ -1361,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); @@ -1370,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)); @@ -1426,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); } @@ -1442,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; @@ -1486,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"); } @@ -1496,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'); } } @@ -1538,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); @@ -1547,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; @@ -1567,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; @@ -1621,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]); } @@ -1636,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); @@ -1718,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( @@ -1769,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; } @@ -1785,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; } @@ -1888,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 edad675857f..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->dir_output) - { + 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; } @@ -236,22 +237,21 @@ class doc_generic_contract_odt extends ModelePDFContract $object->fetch_thirdparty(); - $dir = $conf->contrat->dir_output; + $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 e28cd62efae..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,42 +185,40 @@ 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 { $objectref = dol_sanitizeFileName($object->ref); - $dir = $conf->contrat->dir_output."/".$objectref; + $dir = $conf->contrat->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 = $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,10 +347,8 @@ class pdf_strato extends ModelePDFContract $datere = $langs->trans("Unknown"); } - $txtpredefinedservice = ''; - $txtpredefinedservice = $objectligne->product_label; - if ($objectligne->product_label) - { + $txtpredefinedservice = $objectligne->product_ref; + if ($objectligne->product_label) { $txtpredefinedservice .= ' - '; $txtpredefinedservice .= $objectligne->product_label; } @@ -351,23 +356,22 @@ class pdf_strato extends ModelePDFContract $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; @@ -376,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 { @@ -407,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); @@ -428,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); @@ -439,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; @@ -458,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); } @@ -474,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); @@ -515,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); /* @@ -542,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 @@ -597,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); } @@ -613,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 { @@ -651,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"; } @@ -676,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 @@ -703,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]); } @@ -724,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 6698495f983..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,33 +373,31 @@ 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; $pdf->SetFont('', 'B', $default_font_size - 2); - $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(); //$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; } @@ -398,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); } @@ -422,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. @@ -441,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 @@ -471,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; @@ -482,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 { @@ -514,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'); @@ -564,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); @@ -577,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); @@ -590,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); @@ -603,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 { @@ -624,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(); @@ -635,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); @@ -683,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; @@ -704,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); @@ -740,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); @@ -784,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); @@ -798,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'); } @@ -838,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'); } @@ -874,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); } @@ -892,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 { @@ -910,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); @@ -951,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); @@ -976,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'); @@ -999,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; @@ -1048,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]); } @@ -1067,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_excel2007new.modules.php b/htdocs/core/modules/export/export_excel2007.modules.php similarity index 88% rename from htdocs/core/modules/export/export_excel2007new.modules.php rename to htdocs/core/modules/export/export_excel2007.modules.php index eb111ebb985..370fc49df7e 100644 --- a/htdocs/core/modules/export/export_excel2007new.modules.php +++ b/htdocs/core/modules/export/export_excel2007.modules.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/core/modules/export/export_excel2007new.modules.php + * \file htdocs/core/modules/export/export_excel2007.modules.php * \ingroup export * \brief File of class to generate export file with Excel format */ @@ -32,7 +32,7 @@ use PhpOffice\PhpSpreadsheet\Cell\Coordinate; /** * Class to build export files with Excel format */ -class ExportExcel2007new extends ModeleExports +class ExportExcel2007 extends ModeleExports { /** * @var string ID @@ -79,7 +79,7 @@ class ExportExcel2007new extends ModeleExports global $conf, $langs; $this->db = $db; - $this->id = 'excel2007new'; // Same value then xxx in file name export_xxx.modules.php + $this->id = 'excel2007'; // Same value then xxx in file name export_xxx.modules.php $this->label = 'Excel 2007'; // Label of driver $this->desc = $langs->trans('Excel2007FormatDesc'); $this->extension = 'xlsx'; // Extension for generated file by this driver @@ -89,8 +89,7 @@ class ExportExcel2007new 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 ExportExcel2007new 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 ExportExcel2007new 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 == 'excel2007new') - { - 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 ExportExcel2007new 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 ExportExcel2007new 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 ExportExcel2007new 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 ExportExcel2007new 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 ExportExcel2007new 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 ExportExcel2007new extends ModeleExports $startColumn++; } } - } - catch (Exception $e) { + } catch (Exception $e) { $this->error = $e->getMessage(); return -1; } @@ -570,16 +571,19 @@ class ExportExcel2007new 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 ExportExcel2007new 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 ExportExcel2007new 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 ce44aac0319..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,22 +325,28 @@ 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); } $pdf->SetFont(pdf_getPDFFont($outputlangs)); // Set path to the background PDF File - if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) - { - $pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); + 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]; + } + $pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -350,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; @@ -372,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; @@ -393,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; @@ -408,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); @@ -420,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); @@ -442,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 @@ -458,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); @@ -485,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. @@ -504,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 @@ -533,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; @@ -543,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 { @@ -574,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'); @@ -598,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'); @@ -628,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; @@ -647,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); @@ -687,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); @@ -700,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); @@ -713,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 { @@ -736,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(); @@ -754,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); @@ -795,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; } @@ -823,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); @@ -880,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); } @@ -941,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); @@ -983,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; } @@ -995,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").':'; @@ -1004,26 +1049,22 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetFont('', '', $default_font_size - 2); $pdf->SetXY($posxval, $posy); - $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc); + $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label); $lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement); $pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L'); $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); @@ -1039,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").':'; @@ -1070,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); @@ -1087,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); @@ -1114,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); @@ -1154,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); @@ -1163,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); @@ -1188,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 @@ -1200,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").")"; } @@ -1229,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++; @@ -1249,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").")"; } @@ -1267,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").")"; } @@ -1295,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").")"; } @@ -1321,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").")"; } @@ -1354,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); @@ -1375,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); @@ -1410,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); @@ -1422,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); @@ -1433,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); @@ -1482,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); @@ -1491,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); @@ -1507,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); @@ -1558,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'); } } @@ -1577,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'); } @@ -1606,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); } @@ -1622,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 { @@ -1654,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); @@ -1667,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"); } @@ -1677,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); @@ -1720,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); @@ -1730,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); @@ -1746,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); @@ -1771,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; @@ -1791,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); @@ -1805,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; @@ -1837,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]); } @@ -1852,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 423aa5b79d1..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,17 +343,19 @@ 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); } $pdf->SetFont(pdf_getPDFFont($outputlangs)); // Set path to the background PDF File - if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) - { - $pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); + 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]; + } + $pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -370,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; @@ -392,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); @@ -421,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); @@ -450,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); + } } } @@ -469,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; @@ -489,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. @@ -514,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++; @@ -552,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 @@ -564,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; } @@ -597,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. @@ -615,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']; @@ -641,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. @@ -659,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 { @@ -690,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); @@ -713,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); @@ -763,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); @@ -786,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; @@ -805,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] : ''; @@ -828,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); @@ -855,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) { @@ -867,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 { @@ -890,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(); @@ -908,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); @@ -945,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); @@ -991,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); @@ -1037,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) { @@ -1087,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); @@ -1099,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").':'; @@ -1108,26 +1134,22 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetFont('', '', $default_font_size - 2); $pdf->SetXY($posxval, $posy); - $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc); + $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label); $lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement); $pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L'); $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); @@ -1143,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").':'; @@ -1173,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); @@ -1190,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); @@ -1217,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); @@ -1254,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); @@ -1271,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); @@ -1291,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++; } @@ -1412,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)) { @@ -1451,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 @@ -1463,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").")"; } @@ -1493,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").")"; } @@ -1537,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; @@ -1551,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").")"; } @@ -1579,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").")"; } @@ -1608,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").")"; } @@ -1646,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); @@ -1668,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); @@ -1704,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); @@ -1716,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++; @@ -1793,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); @@ -1802,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)); @@ -1855,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); } @@ -1871,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; @@ -1902,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'); @@ -1925,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"); } @@ -1935,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); @@ -1978,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); @@ -1988,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); @@ -2009,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); @@ -2029,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); @@ -2038,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; @@ -2058,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); @@ -2072,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; @@ -2102,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]); } @@ -2117,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); @@ -2195,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( @@ -2246,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; } @@ -2263,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; } @@ -2312,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; } @@ -2382,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 36dc3ca8f13..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,36 +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:..." - if (preg_match('/^(.+)@([^:]+)(:.+)?$/', $objimport->array_import_regex[0][$val], $reg)) - { + $reg = array(); + 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 { @@ -653,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'; @@ -693,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]."'"; @@ -727,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; @@ -779,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) { @@ -811,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; @@ -844,14 +856,12 @@ class ImportCsv extends ModeleImports $sqlend .= ', '.$user->id; } $sql = $sqlstart.$sqlend.')'; - dol_syslog("import_csv.modules", LOG_DEBUG); + //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 { @@ -869,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 c427e01a758..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); + } } @@ -173,7 +174,7 @@ class ImportXlsx extends ModeleImports $this->workbook->getActiveSheet()->getStyle('1')->getFont()->setBold(true); $this->workbook->getActiveSheet()->getStyle('1')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_LEFT); - $col = 0; + $col = 1; foreach ($headerlinefields as $field) { $this->workbook->getActiveSheet()->SetCellValueByColumnAndRow($col, 1, $outputlangs->transnoentities($field)); // set autowidth @@ -195,7 +196,7 @@ class ImportXlsx extends ModeleImports public function write_record_example($outputlangs, $contentlinevalues) { // phpcs:enable - $col = 0; + $col = 1; $row = 2; foreach ($contentlinevalues as $cell) { $this->workbook->getActiveSheet()->SetCellValueByColumnAndRow($col, $row, $cell); @@ -289,7 +290,7 @@ class ImportXlsx extends ModeleImports $xlsx = new Xlsx(); $info = $xlsx->listWorksheetinfo($this->file); $countcolumns = $info[0]['totalColumns']; - for ($col = 0; $col < $countcolumns; $col++) { + for ($col = 1; $col <= $countcolumns; $col++) { $this->headers[$col] = $this->workbook->getActiveSheet()->getCellByColumnAndRow($col, 1)->getValue(); } return 0; @@ -308,13 +309,14 @@ 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); $countcolumns = $info[0]['totalColumns']; - for ($col = 0; $col < $countcolumns; $col++) { + for ($col = 1; $col <= $countcolumns; $col++) { $val = $this->workbook->getActiveSheet()->getCellByColumnAndRow($col, $this->record)->getValue(); $array[$col]['val'] = $val; $array[$col]['type'] = (dol_strlen($val) ? 1 : -1); // If empty we consider it null @@ -372,7 +374,7 @@ class ImportXlsx 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[1]['val']))) { //print 'W'; $this->warnings[$warning]['lib'] = $langs->trans('EmptyLine'); $this->warnings[$warning]['type'] = 'EMPTY'; @@ -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 - 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)]['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 - 1)]['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 - 1)]['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 - 1)]['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 - 1)]['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,13 +651,16 @@ 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++; } else { - $newval = $arrayrecord[($key - 1)]['val']; //We get new value computed. + $newval = $arrayrecord[($key)]['val']; //We get new value computed. } } elseif ($objimport->array_import_convertvalue[0][$val]['rule'] == 'numeric') { $newval = price2num($newval); @@ -636,17 +672,19 @@ class ImportXlsx extends ModeleImports // Test regexp 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)) { $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)) { $sql .= ' WHERE ' . $filter; @@ -658,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 { @@ -669,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'; @@ -694,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 - 1)]['type'] < 0) $listvalues[] = ($newval == '0' ? $newval : "null"); - elseif (empty($newval) && $arrayrecord[($key - 1)]['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++; } @@ -705,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; @@ -780,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) { @@ -812,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; @@ -845,7 +896,7 @@ class ImportXlsx extends ModeleImports $sqlend .= ', ' . $user->id; } $sql = $sqlstart . $sqlend . ')'; - dol_syslog("import_xlsx.modules", LOG_DEBUG); + //dol_syslog("import_xlsx.modules", LOG_DEBUG); // Run insert request if ($sql) { @@ -868,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 afc691f3e2e..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,14 +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"; - $id = $cpt; - if (isValidEMail($email)) - { - if ($old <> $email) - { + if (isValidEMail($email)) { + if ($old <> $email) { $cibles[$j] = array( 'email' => $email, 'lastname' => $name, @@ -183,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 { @@ -202,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 811dd57544e..b4645b51a87 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 { @@ -66,7 +66,7 @@ class modAccounting extends DolibarrModules $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"); @@ -285,14 +285,15 @@ class modAccounting extends DolibarrModules //'b.doc_type'=>'Doctype', 'b.doc_ref'=>'Piece', 'b.code_journal'=>'Codejournal', - //'b.journal_label'=>'JournalLabel', + 'b.journal_label'=>'JournalLabel', 'b.numero_compte'=>'AccountAccounting', - //'b.label_compte'=>'LabelAccount', + 'b.label_compte'=>'LabelAccount', 'b.subledger_account'=>'SubledgerAccount', 'b.subledger_label'=>'SubledgerAccountLabel', 'b.label_operation'=>'LabelOperation', 'b.debit'=>"Debit", - 'b.credit'=>"Credit" + 'b.credit'=>"Credit", + 'b.sens'=>'Direction' // This field is still used by accounting export. We can remove it once it has been replaced into accountancyexport.class.php by a detection using ->debit and ->credit ); $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.date_creation'=>'const-'.dol_print_date(dol_now(), 'standard')); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) $this->import_regex_array[$r] = array('b.doc_date'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$'); @@ -302,14 +303,85 @@ class modAccounting extends DolibarrModules //'b.doc_type'=>'import', 'b.doc_ref'=>'My document ABC', 'b.code_journal'=>"VTE", - //'b.journal_label'=>"Sale journal", + 'b.journal_label'=>"Sale journal", 'b.numero_compte'=>"707", - //'b.label_compte'=>'Product account 707', + 'b.label_compte'=>'Product account 707', 'b.subledger_account'=>'', 'b.subledger_label'=>'', 'b.label_operation'=>"Sale of ABC", 'b.debit'=>"0", - 'b.credit'=>"100" + 'b.credit'=>"100", + '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 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 559260a77c2..691828cd9d2 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', @@ -457,15 +459,23 @@ class modAgenda extends DolibarrModules $this->export_sql_start[$r] = 'SELECT DISTINCT '; $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'actioncomm as ac'; $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 50fe71ef390..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'; @@ -79,7 +79,7 @@ class modAsset extends DolibarrModules // Data directories to create when module is enabled. // Example: this->dirs = array("/asset/temp","/asset/subdir"); - $this->dirs = array(); + $this->dirs = array("/asset/temp"); // Config pages. Put here list of php page, stored into asset/admin directory, to use to setup module. $this->config_page_url = array("setup.php@asset"); @@ -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 7dae96253bb..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 '; @@ -332,7 +366,7 @@ class modCategorie extends DolibarrModules $this->export_sql_end[$r] .= ' INNER JOIN '.MAIN_DB_PREFIX.'categorie_contact as cc ON cc.fk_categorie = cat.rowid'; $this->export_sql_end[$r] .= ' INNER JOIN '.MAIN_DB_PREFIX.'socpeople as p ON p.rowid = cc.fk_socpeople'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople_extrafields as extra ON extra.fk_object = p.rowid'; - $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_civility as civ ON civ.rowid = p.civility'; + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_civility as civ ON civ.code = p.civility'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON c.rowid = p.fk_pays'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON s.rowid = p.fk_soc'; $this->export_sql_end[$r] .= ' WHERE cat.entity IN ('.getEntity('category').')'; @@ -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 84a46c49d63..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,10 @@ 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 //-------- $r = 0; @@ -270,7 +282,7 @@ class modCommande extends DolibarrModules $r++; $this->import_code[$r] = 'commande_'.$r; - $this->import_label[$r] = 'Sales Orders'; + $this->import_label[$r] = 'CustomersOrders'; $this->import_icon[$r] = $this->picto; $this->import_entities_array[$r] = []; $this->import_tables_array[$r] = ['c' => MAIN_DB_PREFIX.'commande', 'extra' => MAIN_DB_PREFIX.'commande_extrafields']; @@ -287,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', @@ -356,7 +368,7 @@ class modCommande extends DolibarrModules //Import CPV Lines $r++; $this->import_code[$r] = 'commande_lines_'.$r; - $this->import_label[$r] = 'Order Details'; + $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']; @@ -441,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 54fecd1a5af..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 = '.$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 8f4172112b5..9b576e292e2 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,0", 'comment'=>'Send an emails when the unpaid invoices reach a due date + n days', '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 (isset($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$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 (isset($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$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 ad36253fe22..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"); @@ -89,6 +89,7 @@ class modHRM extends DolibarrModules $this->rights = array(); // Permission array used by this module $r = 0; + /* $this->rights[$r][0] = 4001; $this->rights[$r][1] = 'See employees'; $this->rights[$r][3] = 0; @@ -116,7 +117,7 @@ class modHRM extends DolibarrModules $this->rights[$r][4] = 'employee'; $this->rights[$r][5] = 'export'; $r++; - + */ // Menus //------- 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 f92d9b30890..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,10 +642,19 @@ 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' => "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", @@ -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 ? '*' : ''); @@ -687,7 +810,7 @@ class modProduct extends DolibarrModules ); $this->import_examplevalues_array[$r] = array( - 'sp.fk_product' => "PRODUCT_REF or id:123456", + 'sp.fk_product' => "ref:PRODUCT_REF or id:123456", 'sp.fk_soc' => "My Supplier", 'sp.ref_fourn' => "XYZ-F123456", 'sp.quantity' => "5", @@ -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,23 +870,26 @@ 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') ); - $this->import_examplevalues_array[$r] = array('pr.fk_product'=>"PRODUCT_REF or id:123456", + $this->import_examplevalues_array[$r] = array('pr.fk_product'=>"ref:PRODUCT_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", 'pr.tva_tx'=>'20', 'pr.recuperableonly'=>'0', - 'pr.date_price'=>'2013-04-10'); + '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 f1de32bd1a9..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 = '.$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 f784d88a3da..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 = '.$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 da18f2faf11..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,16 +298,21 @@ 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 '; - $this->export_sql_end[$r] = ' FROM ('.MAIN_DB_PREFIX.'product as p, '.MAIN_DB_PREFIX.'product_stock as ps, '.MAIN_DB_PREFIX.'product_batch as pb)'; + $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product_batch as pb'; + $this->export_sql_end[$r] .= ' INNER JOIN '.MAIN_DB_PREFIX.'product_stock as ps ON ps.rowid = pb.fk_product_stock'; + $this->export_sql_end[$r] .= ' INNER JOIN '.MAIN_DB_PREFIX.'product as p ON p.rowid = ps.fk_product'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_lot as pl ON pl.fk_product = p.rowid AND pl.batch = pb.batch'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_lot_extrafields as extra ON extra.fk_object = pl.rowid,'; $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'entrepot as e'; - $this->export_sql_end[$r] .= ' WHERE p.rowid = ps.fk_product AND ps.fk_entrepot = e.rowid AND ps.rowid = pb.fk_product_stock'; - $this->export_sql_end[$r] .= ' AND e.entity IN ('.getEntity('stock').')'; } + $this->export_sql_end[$r] .= ' WHERE ps.fk_entrepot = e.rowid'; + $this->export_sql_end[$r] .= ' AND e.entity IN ('.getEntity('stock').')'; + } // Export of stock movements $r++; @@ -324,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'; @@ -380,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++; @@ -398,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. @@ -427,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 448d1eb694b..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 @@ -177,6 +186,7 @@ class modTicket extends DolibarrModules $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut $this->rights[$r][4] = 'manage'; + /* Seems not used and in conflict with societe->client->voir (see all thirdparties) $r++; $this->rights[$r][0] = 56005; // id de la permission $this->rights[$r][1] = 'See all tickets, even if not assigned to (not effective for external users, always restricted to the thirdpardy they depends on)'; // libelle de la permission @@ -184,6 +194,7 @@ class modTicket extends DolibarrModules $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut $this->rights[$r][4] = 'view'; $this->rights[$r][5] = 'all'; + */ // Main menu entries $this->menus = array(); // List of menus to add @@ -192,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', @@ -206,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', @@ -292,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..e84998635ff 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 @@ -255,10 +256,11 @@ class modUser extends DolibarrModules 'u.admin'=>"user", 'u.statut'=>'user', 'u.datelastlogin'=>'user', 'u.datepreviouslogin'=>'user', 'u.fk_socpeople'=>"contact", 'u.fk_soc'=>"company", 'u.fk_member'=>"member" ); - $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']); } @@ -293,10 +295,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..c8a0c50862b 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 = ".$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 90836ca4fd9..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,26 +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)); - - // Output to http stream - clearstatcache(); - - $attachment = true; - 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.'"'); - - // Ajout directives pour resoudre bug IE - header('Cache-Control: Public, must-revalidate'); - header('Pragma: public'); - - readfile($file); + } $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 1540fc29e8e..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,26 +360,10 @@ 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)); + } - // Output to http stream - clearstatcache(); - - $attachment = true; - 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.'"'); - - // Ajout directives pour resoudre bug IE - header('Cache-Control: Public, must-revalidate'); - header('Pragma: public'); - - readfile($file); $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 3320b4ff928..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,9 +150,36 @@ 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']; + + // Output to http stream + clearstatcache(); + + $attachment = true; + 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.'"'); + } + + // Ajout directives pour resoudre bug IE + header('Cache-Control: Public, must-revalidate'); + header('Pragma: public'); + + readfile($fullpath); + return 1; } else { $outputlangs->charset_output = $sav_charset_output; 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 3b09d639bf0..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,42 +235,35 @@ 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 { - $pdir[0] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; // default + $pdir[0] = get_exdir(0, 0, 0, 0, $objphoto, 'product'); // 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) { 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,16 +326,18 @@ 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)) - { - $pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); + 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]; + } + $pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -350,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; @@ -376,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); @@ -396,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); @@ -418,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 @@ -434,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); @@ -468,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. @@ -487,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 @@ -516,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; @@ -527,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 { @@ -559,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'); @@ -583,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'); @@ -592,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'); @@ -605,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; @@ -615,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); @@ -655,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); @@ -668,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); @@ -681,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 { @@ -712,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(); @@ -753,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)) { @@ -762,9 +786,9 @@ class pdf_azur extends ModelePDFPropales } } else { if (!empty($conf->product->enabled)) { - $filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product').dol_sanitizeFileName($product->ref); + $filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product'); } elseif (!empty($conf->service->enabled)) { - $filetomerge_dir = $conf->service->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product').dol_sanitizeFileName($product->ref); + $filetomerge_dir = $conf->service->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product'); } } @@ -800,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); @@ -858,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); @@ -870,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); @@ -883,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").':'; @@ -900,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").':'; @@ -909,15 +929,14 @@ class pdf_azur extends ModelePDFPropales $pdf->SetFont('', '', $default_font_size - 2); $pdf->SetXY($posxval, $posy); - $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc); + $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label); $lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement); $pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L'); $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) @@ -937,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").':'; @@ -952,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); @@ -969,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); @@ -996,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); @@ -1041,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); @@ -1066,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").")"; } @@ -1104,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++; @@ -1124,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").")"; } @@ -1140,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").")"; } @@ -1167,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").")"; } @@ -1195,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").")"; } @@ -1250,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); @@ -1313,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); @@ -1322,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); @@ -1338,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'); @@ -1368,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'); } @@ -1385,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'); } @@ -1432,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); } @@ -1446,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 { @@ -1490,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'); } } @@ -1532,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); @@ -1541,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; @@ -1561,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 @@ -1612,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]); } @@ -1627,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 80433eb2201..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,42 +233,36 @@ 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 { - $pdir[0] = get_exdir(0, 0, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; // default + $pdir[0] = get_exdir(0, 0, 0, 0, $objphoto, 'product'); // 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) { 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,16 +330,18 @@ 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)) - { - $pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); + 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]; + } + $pagecount = $pdf->setSourceFile($logodir.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); $tplidx = $pdf->importPage(1); } @@ -354,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++; } } @@ -370,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 @@ -391,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); @@ -413,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); + } } } @@ -431,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; @@ -463,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. @@ -488,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++; @@ -526,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 @@ -538,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; } @@ -570,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. @@ -588,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']; @@ -615,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. @@ -633,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 { @@ -664,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); @@ -687,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); @@ -696,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); @@ -730,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); @@ -752,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; @@ -762,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] : ''; @@ -785,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)) { @@ -814,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) { @@ -826,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 { @@ -857,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(); @@ -898,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)) { @@ -907,9 +931,9 @@ class pdf_cyan extends ModelePDFPropales } } else { if (!empty($conf->product->enabled)) { - $filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product').dol_sanitizeFileName($product->ref); + $filetomerge_dir = $conf->product->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product'); } elseif (!empty($conf->service->enabled)) { - $filetomerge_dir = $conf->service->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product').dol_sanitizeFileName($product->ref); + $filetomerge_dir = $conf->service->multidir_output[$entity_product_file].'/'.get_exdir(0, 0, 0, 0, $product, 'product'); } } @@ -945,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); @@ -997,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); @@ -1009,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); @@ -1022,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").':'; @@ -1039,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").':'; @@ -1048,15 +1068,14 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetFont('', '', $default_font_size - 2); $pdf->SetXY($posxval, $posy); - $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc); + $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label); $lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement); $pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L'); $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) @@ -1076,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").':'; @@ -1091,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); @@ -1108,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); @@ -1135,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); @@ -1187,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); @@ -1212,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").")"; } @@ -1251,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++; @@ -1271,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").")"; } @@ -1288,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").")"; } @@ -1316,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").")"; } @@ -1345,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").")"; } @@ -1402,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++; @@ -1467,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); @@ -1476,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)); @@ -1528,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); } @@ -1544,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; @@ -1583,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"); } @@ -1593,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'); } } @@ -1640,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); @@ -1649,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; @@ -1669,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; @@ -1723,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]); } @@ -1738,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); @@ -1852,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( @@ -1903,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; } @@ -1920,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; } @@ -2023,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 7b6ec019683..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,14 +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)) - { + 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; @@ -274,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; @@ -287,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; @@ -353,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); } @@ -373,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); } } @@ -417,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 9b870bd5dd2..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 = $conf->global->COMPANY_ELEPHANT_MASK_CUSTOMER; - if ($type == 1) $mask = $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,27 +292,32 @@ 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 { + $is_dispo = $this->verif_dispo($db, $code, $soc, $type); + if ($is_dispo <> 0) { + $result = -3; + } } } @@ -327,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 961fa1a4e73..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"; @@ -157,16 +173,16 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode $i = 0; $this->code = ''; - if (is_object($societe)) - { + $disponibility = 0; + + 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; @@ -176,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); } @@ -187,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) { @@ -216,8 +232,7 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode } } - if ($disponibility == 0) - { + if ($disponibility == 0) { return 0; // return ok } else { return -1; // return ko @@ -234,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'; @@ -249,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 7a3ecf88e19..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); } @@ -273,19 +279,22 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $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; + } $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); } @@ -299,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; @@ -325,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); @@ -336,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); @@ -359,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); @@ -385,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. @@ -408,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 { @@ -446,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 @@ -470,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'); @@ -491,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); @@ -526,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); @@ -539,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); @@ -552,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 { @@ -575,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(); @@ -593,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); @@ -633,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); @@ -642,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); @@ -667,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++; @@ -678,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").")"; } @@ -692,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); @@ -701,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); @@ -711,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); @@ -724,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").")"; } @@ -751,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").")"; } @@ -790,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); @@ -802,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); @@ -813,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); @@ -862,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); @@ -871,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); @@ -887,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'); } @@ -964,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; } @@ -1007,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) { @@ -1076,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 { @@ -1096,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); @@ -1111,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); @@ -1137,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); @@ -1152,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"; } @@ -1174,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 @@ -1203,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]); } @@ -1222,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 22bc80e161d..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").':'; @@ -859,16 +892,15 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->SetFont('', '', $default_font_size - 2); $pdf->SetXY($posxval, $posy); - $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement); + $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label); $lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement); $pdf->MultiCell(80, 4, $lib_condition_paiement, 0, 'L'); $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; } @@ -1534,13 +1561,17 @@ class pdf_cornas extends ModelePDFSuppliersOrders $this->cols['subprice'] = array( 'rank' => $rank, 'width' => 19, // in mm - 'status' => true, + 'status' => false, 'title' => array( 'textkey' => 'PriceUHT' ), 'border-left' => true, // add left line separator ); + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE)) { + $this->cols['subprice']['status'] = true; + } + $rank = $rank + 10; $this->cols['qty'] = array( 'rank' => $rank, @@ -1591,6 +1622,10 @@ class pdf_cornas extends ModelePDFSuppliersOrders 'border-left' => true, // add left line separator ); + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN)) { + $this->cols['totalexcltax']['status'] = true; + } + // Add extrafields cols if (!empty($object->lines)) { $line = reset($object->lines); @@ -1606,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 b48cb60df45..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); } @@ -329,24 +339,24 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetDrawColor(128, 128, 128); $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); - $pdf->SetSubject($outputlangs->transnoentities("Order")); + $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("Order")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + + $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); + } $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,23 +520,25 @@ 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)) - { + 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'); } // Unit price before discount - $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails); - $pdf->SetXY($this->posxup, $curY); - $pdf->MultiCell($this->posxqty - $this->posxup - 0.8, 3, $up_excl_tax, 0, 'R', 0); + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE)) { + $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails); + $pdf->SetXY($this->posxup, $curY); + $pdf->MultiCell($this->posxqty - $this->posxup - 0.8, 3, $up_excl_tax, 0, 'R', 0); + } // Quantity $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); @@ -528,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'); @@ -537,20 +554,24 @@ 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'); } // Total HT line - $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs); - $pdf->SetXY($this->postotalht, $curY); - $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->postotalht, 3, $total_excl_tax, 0, 'R', 0); + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN)) { + $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs); + $pdf->SetXY($this->postotalht, $curY); + $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; @@ -559,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); @@ -599,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); @@ -612,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); @@ -625,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 { @@ -648,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(); @@ -666,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); @@ -741,7 +776,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetFont('', '', $default_font_size - 2); $pdf->SetXY($posxval, $posy); - $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_id); + $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label); $lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement); $pdf->MultiCell(80, 4, $lib_condition_paiement, 0, 'L'); @@ -790,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); @@ -813,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++; @@ -824,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").")"; } @@ -838,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); @@ -848,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); @@ -858,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); @@ -870,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").")"; } @@ -902,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").")"; } @@ -951,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++; @@ -1000,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); @@ -1009,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); @@ -1025,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'); } @@ -1066,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'); } @@ -1111,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 @@ -1125,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 { @@ -1149,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); @@ -1161,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"); @@ -1174,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); @@ -1189,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); @@ -1206,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; @@ -1227,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"; } @@ -1249,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 @@ -1277,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]); } @@ -1296,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 19e78eb4ff9..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 @@ -748,7 +774,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $pdf->SetFont('', '', $default_font_size - 1); $pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L'); - // Payed + // Paid $thirdparty = $object->thirdparty; $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); @@ -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 d8307226e41..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 @@ -801,7 +808,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdf->SetFont('', '', $default_font_size - 2); $pdf->SetXY($posxval, $posy); - $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc); + $lib_condition_paiement = $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) != ('PaymentCondition'.$object->cond_reglement_code) ? $outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code) : $outputlangs->convToOutputCharset($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement_label); $lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement); $pdf->MultiCell(80, 4, $lib_condition_paiement, 0, 'L'); @@ -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 0dacab15f3f..b3079691cd5 100644 --- a/htdocs/core/photos_resize.php +++ b/htdocs/core/photos_resize.php @@ -42,226 +42,288 @@ $file = GETPOST('file', 'alpha'); $num = GETPOST('num', 'alpha'); // Used for document on bank statement $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; -} else // ticket, holiday, expensereport, societe... -{ +} elseif ($modulepart == 'facture_fourn' || $modulepart == 'facture_fournisseur') { + $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture'); + if (!$user->rights->fournisseur->facture->lire) { + accessforbidden(); + } + $accessallowed = 1; +} 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) { + $result = $object->fetch($id); + 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) { + $result = $object->fetch($id); + if ($result <= 0) { + dol_print_error($db, 'Failed to load object'); + } + $dir = $conf->fournisseur->dir_output.'/facture'; // By default + } } elseif ($modulepart == 'medias') { $dir = $dolibarr_main_data_root.'/'.$modulepart; } else { - print 'Action crop for modulepart = '.$modulepart.' is not supported yet by photos_resize.php.'; + 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('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); } @@ -269,10 +331,8 @@ if (empty($backtourl)) * Actions */ -if ($cancel) -{ - if ($backtourl) - { +if ($cancel) { + if ($backtourl) { header("Location: ".$backtourl); exit; } else { @@ -281,14 +341,16 @@ 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.'; + } + $fullpath = $dir."/".$original_file; $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); @@ -301,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); @@ -310,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); @@ -325,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 { @@ -348,15 +406,17 @@ 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.'; + } + $fullpath = $dir."/".$original_file; - //var_dump($_POST['w'].'x'.$_POST['h'].'-'.$_POST['x'].'x'.$_POST['y']);exit; + //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); } @@ -368,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); @@ -377,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); @@ -392,15 +450,13 @@ 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); } - if ($backtourl) - { + if ($backtourl) { header("Location: ".$backtourl); exit; } else { @@ -419,16 +475,20 @@ if ($action == 'confirm_crop') * View */ -llxHeader($head, $langs->trans("Image"), '', '', 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')); +$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, $morejs, $morecss); -print load_fiche_titre($langs->trans("ImageEditor")); +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"; @@ -467,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 8990f75951d..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 - + @@ -169,25 +166,22 @@ $totalizable = $extrafields->attributes[$elementtype]['totalizable'][$attrname]; $help = $extrafields->attributes[$elementtype]['help'][$attrname]; $entitycurrentorall = $extrafields->attributes[$elementtype]['entityid'][$attrname]; $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"); ?> @@ -214,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'); @@ -243,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')?> +
    @@ -265,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").')'; ?> @@ -295,10 +295,18 @@ if (in_array($type, array_keys($typewecanchangeinto))) textwithpicto($langs->trans("HelpOnTooltip"), $langs->trans("HelpOnTooltipDesc")); ?> -multicompany->enabled) { ?> +multicompany->enabled)) { ?> - trans("AllEntities"); ?>> + trans("AllEntities"); ?>> + + + + trans("EnabledCondition"); ?> + + + + diff --git a/htdocs/core/tpl/admin_extrafields_view.tpl.php b/htdocs/core/tpl/admin_extrafields_view.tpl.php index fb542f9037e..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,19 @@ 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; + }*/ + // Load language if required if (!empty($extrafields->attributes[$elementtype]['langfile'][$key])) { $langs->load($extrafields->attributes[$elementtype]['langfile'][$key]); @@ -97,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]); @@ -118,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..bf148c2124f 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,8 +79,7 @@ if (!empty($object->comments)) print '
    '; print '
    '; - if (!empty($user->photo)) - { + if (!empty($user->photo)) { print Form::showphoto('userphoto', $userstatic, 80, 0, 0, '', 'small', 0, 1).'
    '; } print $langs->trans('User').' : '.$userstatic->getNomUrl().'
    '; @@ -96,8 +89,7 @@ if (!empty($object->comments)) 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 92a767a23ea..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; } @@ -196,7 +188,7 @@ if ($action == 'presend') } $formmail->withto = $liste; - $formmail->withtofree = (GETPOSTISSET('sendto') ? (GETPOST('sendto') ? GETPOST('sendto') : '1') : '1'); + $formmail->withtofree = (GETPOSTISSET('sendto') ? (GETPOST('sendto', 'alphawithlgt') ? GETPOST('sendto', 'alphawithlgt') : '1') : '1'); $formmail->withtocc = $liste; $formmail->withtoccc = $conf->global->MAIN_EMAIL_USECCC; $formmail->withtopic = $topicmail; @@ -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 c7069b3d2aa..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,30 +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'); - else $value = GETPOST($key, 'alpha'); - 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 6e68dd94bea..ebab4e8608a 100644 --- a/htdocs/core/tpl/extrafields_list_array_fields.tpl.php +++ b/htdocs/core/tpl/extrafields_list_array_fields.tpl.php @@ -1,32 +1,35 @@ '."\n"; +// This tpl file is included into the init part of pages, so before action. +// 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), 'position' => $extrafields->attributes[$extrafieldsobjectkey]['pos'][$key], - 'enabled' => (abs($extrafields->attributes[$extrafieldsobjectkey]['list'][$key]) != 3 && $extrafields->attributes[$extrafieldsobjectkey]['perms'][$key]), + 'enabled' => (abs((int) $extrafields->attributes[$extrafieldsobjectkey]['list'][$key]) != 3 && $extrafields->attributes[$extrafieldsobjectkey]['perms'][$key]), '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 5ef86f3b79d..7268da76007 100644 --- a/htdocs/core/tpl/extrafields_list_search_sql.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_sql.tpl.php @@ -1,44 +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('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 9db0ae13824..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,34 @@ 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', 'datetime'))) - { + 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(GETPOST("options_".$tmpkeyextra."hour", 'int'), GETPOST("options_".$tmpkeyextra."min", 'int'), 0, GETPOST("options_".$tmpkeyextra."month", 'int'), GETPOST("options_".$tmpkeyextra."day", 'int'), GETPOST("options_".$tmpkeyextra."year", 'int')) : $datenotinstring; + $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'))) { + $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 + $datenotinstring = $db->jdate($datenotinstring); + } + //print 'x'.$object->array_options['options_' . $tmpkeyextra].'-'.$datenotinstring.' - '.dol_print_date($datenotinstring, 'dayhour'); + $value = GETPOSTISSET("options_".$tmpkeyextra) ? dol_mktime(GETPOST("options_".$tmpkeyextra."hour", 'int'), GETPOST("options_".$tmpkeyextra."min", 'int'), GETPOST("options_".$tmpkeyextra."sec", 'int'), GETPOST("options_".$tmpkeyextra."month", 'int'), GETPOST("options_".$tmpkeyextra."day", 'int'), GETPOST("options_".$tmpkeyextra."year", 'int'), 'tzuserrel') : $datenotinstring; } //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 ''; @@ -208,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..d7252f891ae 100644 --- a/htdocs/core/tpl/list_print_total.tpl.php +++ b/htdocs/core/tpl/list_print_total.tpl.php @@ -7,20 +7,29 @@ if (is_array($totalarray['totalizable'])) { } } // 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
    '; // Multicurrency -if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) print ''; +if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { + print ''; +} -if ($inputalsopricewithtax) print ''; +if ($inputalsopricewithtax) { + print ''; +} // Qty print ''; -if (!empty($conf->global->PRODUCT_USE_UNITS)) -{ +// Unit +if (!empty($conf->global->PRODUCT_USE_UNITS)) { print ''; } @@ -103,10 +110,9 @@ if ($this->situation_cycle_ref) { print ''; } -if ($usemargins && !empty($conf->margin->enabled) && empty($user->socid)) -{ - if (!empty($user->rights->margins->creer)) - { +// Purchase price +if ($usemargins && !empty($conf->margin->enabled) && empty($user->socid)) { + if (!empty($user->rights->margins->creer)) { if ($conf->global->MARGIN_TYPE == "1") { print ''; } else { @@ -126,9 +132,13 @@ if ($usemargins && !empty($conf->margin->enabled) && empty($user->socid)) print ''; // Multicurrency -if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) print ''; +if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { + print ''; +} -if ($outputalsopricetotalwithtax) print ''; +if ($outputalsopricetotalwithtax) { + print ''; +} print ''; // No width to allow autodim @@ -136,8 +146,7 @@ print ''; print ''; -if ($action == 'selectlines') -{ +if ($action == 'selectlines') { print ''; -if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines -{ +if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') { // We must have same test in printObjectLines print ''; @@ -194,10 +229,18 @@ if ($object->element == 'supplier_proposal' || $object->element == 'order_suppli print ' @@ -220,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 ''; @@ -255,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) { ?> @@ -273,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)) { @@ -298,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 ''; @@ -361,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 '
    '.$langs->trans('PriceUHT').''.$langs->trans('PriceUHTCurrency', $this->multicurrency_code).''.$langs->trans('PriceUHTCurrency', $this->multicurrency_code).''.$langs->trans('PriceUTTC').''.$langs->trans('PriceUTTC').''.$langs->trans('Qty').''.$langs->trans('Unit').''.$form->textwithpicto($langs->trans('TotalHT100Short'), $langs->trans('UnitPriceXQtyLessDiscount')).''.$langs->trans('BuyingPrice').''.$langs->trans('TotalHTShort').''.$langs->trans('TotalHTShortCurrency', $this->multicurrency_code).''.$langs->trans('TotalHTShortCurrency', $this->multicurrency_code).''.$langs->trans('TotalTTCShort').''.$langs->trans('TotalTTCShort').''; print ''; print ''; diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index cba0b0b3e53..8e9d72d40b4 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -39,8 +39,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; } @@ -49,13 +48,25 @@ global $mysoc; global $forceall, $senderissupplier, $inputalsopricewithtax, $outputalsopricetotalwithtax; $usemargins = 0; -if (!empty($conf->margin->enabled) && !empty($object->element) && in_array($object->element, array('facture', 'facturerec', 'propal', 'commande'))) $usemargins = 1; +if (!empty($conf->margin->enabled) && !empty($object->element) && in_array($object->element, array('facture', 'facturerec', 'propal', 'commande'))) { + $usemargins = 1; +} -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.'"'; @@ -81,34 +92,38 @@ if (($line->info_bits & 2) == 2) { print ''; $txt = ''; print img_object($langs->trans("ShowReduc"), 'reduc').' '; - if ($line->description == '(DEPOSIT)') $txt = $langs->trans("Deposit"); - elseif ($line->description == '(EXCESS RECEIVED)') $txt = $langs->trans("ExcessReceived"); - elseif ($line->description == '(EXCESS PAID)') $txt = $langs->trans("ExcessPaid"); + if ($line->description == '(DEPOSIT)') { + $txt = $langs->trans("Deposit"); + } elseif ($line->description == '(EXCESS RECEIVED)') { + $txt = $langs->trans("ExcessReceived"); + } elseif ($line->description == '(EXCESS PAID)') { + $txt = $langs->trans("ExcessPaid"); + } //else $txt=$langs->trans("Discount"); print $txt; print ''; - if ($line->description) - { - if ($line->description == '(CREDIT_NOTE)' && $line->fk_remise_except > 0) - { + if ($line->description) { + if ($line->description == '(CREDIT_NOTE)' && $line->fk_remise_except > 0) { + include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; $discount = new DiscountAbsolute($this->db); $discount->fetch($line->fk_remise_except); print ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromCreditNote", $discount->getNomUrl(0)); - } elseif ($line->description == '(DEPOSIT)' && $line->fk_remise_except > 0) - { + } elseif ($line->description == '(DEPOSIT)' && $line->fk_remise_except > 0) { + include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; $discount = new DiscountAbsolute($this->db); $discount->fetch($line->fk_remise_except); print ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromDeposit", $discount->getNomUrl(0)); // Add date of deposit - if (!empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) + if (!empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) { print ' ('.dol_print_date($discount->datec).')'; - } elseif ($line->description == '(EXCESS RECEIVED)' && $objp->fk_remise_except > 0) - { + } + } elseif ($line->description == '(EXCESS RECEIVED)' && $objp->fk_remise_except > 0) { + include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; $discount = new DiscountAbsolute($this->db); $discount->fetch($line->fk_remise_except); print ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromExcessReceived", $discount->getNomUrl(0)); - } elseif ($line->description == '(EXCESS PAID)' && $objp->fk_remise_except > 0) - { + } elseif ($line->description == '(EXCESS PAID)' && $objp->fk_remise_except > 0) { + include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; $discount = new DiscountAbsolute($this->db); $discount->fetch($line->fk_remise_except); print ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromExcessPaid", $discount->getNomUrl(0)); @@ -119,19 +134,23 @@ if (($line->info_bits & 2) == 2) { } else { $format = $conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE ? 'dayhour' : 'day'; - if ($line->fk_product > 0) - { + if ($line->fk_product > 0) { print $form->textwithtooltip($text, $description, 3, '', '', $i, 0, (!empty($line->fk_parent_line) ?img_picto('', 'rightarrow') : '')); } else { $type = (!empty($line->product_type) ? $line->product_type : $line->fk_product_type); - 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.''; print $form->textwithtooltip($text, dol_htmlentitiesbr($line->description), 3, '', '', $i, 0, (!empty($line->fk_parent_line) ?img_picto('', 'rightarrow') : '')); } else { - if (!empty($line->fk_parent_line)) print img_picto('', 'rightarrow'); + if (!empty($line->fk_parent_line)) { + print img_picto('', 'rightarrow'); + } if (preg_match('/^\(DEPOSIT\)/', $line->description)) { $newdesc = preg_replace('/^\(DEPOSIT\)/', $langs->trans("Deposit"), $line->description); print $text.' '.dol_htmlentitiesbr($newdesc); @@ -143,49 +162,65 @@ if (($line->info_bits & 2) == 2) { // Show date range if ($line->element == 'facturedetrec') { - if ($line->date_start_fill || $line->date_end_fill) print '
    '; - if ($line->date_start_fill) print $langs->trans('AutoFillDateFromShort').': '.yn($line->date_start_fill); - if ($line->date_start_fill && $line->date_end_fill) print ' - '; - if ($line->date_end_fill) print $langs->trans('AutoFillDateToShort').': '.yn($line->date_end_fill); - if ($line->date_start_fill || $line->date_end_fill) print '
    '; + if ($line->date_start_fill || $line->date_end_fill) { + print '
    '; + } + if ($line->date_start_fill) { + print $langs->trans('AutoFillDateFromShort').': '.yn($line->date_start_fill); + } + if ($line->date_start_fill && $line->date_end_fill) { + print ' - '; + } + if ($line->date_end_fill) { + print $langs->trans('AutoFillDateToShort').': '.yn($line->date_end_fill); + } + if ($line->date_start_fill || $line->date_end_fill) { + print '
    '; + } } else { - if ($line->date_start || $line->date_end) print '
    '.get_date_range($line->date_start, $line->date_end, $format).'
    '; + if ($line->date_start || $line->date_end) { + print '
    '.get_date_range($line->date_start, $line->date_end, $format).'
    '; + } //print get_date_range($line->date_start, $line->date_end, $format); } // Add description in form - if ($line->fk_product > 0 && !empty($conf->global->PRODUIT_DESC_IN_FORM)) - { + if ($line->fk_product > 0 && !empty($conf->global->PRODUIT_DESC_IN_FORM)) { print (!empty($line->description) && $line->description != $line->product_label) ? '
    '.dol_htmlentitiesbr($line->description) : ''; } + //Line extrafield + if (!empty($extrafields)) { + $temps = $line->showOptionals($extrafields, 'view', array(), '', '', 1, 'line'); + if (!empty($temps)) { + print '
    '; + print $temps; + print '
    '; + } + } } -if ($user->rights->fournisseur->lire && $line->fk_fournprice > 0) -{ +if ($user->rights->fournisseur->lire && $line->fk_fournprice > 0 && empty($conf->global->SUPPLIER_HIDE_SUPPLIER_OBJECTLINES)) { require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; $productfourn = new ProductFournisseur($this->db); $productfourn->fetch_product_fournisseur_price($line->fk_fournprice); print '
    '; print ''.$langs->trans('Supplier').' : '.$productfourn->getSocNomUrl(1, 'supplier').' - '.$langs->trans('Ref').' : '; // Supplier ref - if ($user->rights->produit->creer || $user->rights->service->creer) // change required right here - { + if ($user->rights->produit->creer || $user->rights->service->creer) { // change required right here print $productfourn->getNomUrl(); } else { print $productfourn->ref_supplier; } } -if (!empty($conf->accounting->enabled) && $line->fk_accounting_account > 0) -{ +if (!empty($conf->accounting->enabled) && $line->fk_accounting_account > 0) { $accountingaccount = new AccountingAccount($this->db); $accountingaccount->fetch($line->fk_accounting_account); print '

    '.$langs->trans('AccountingAffectation').' : '.$accountingaccount->getNomUrl(0, 1, 1); } 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 !== '') { @@ -244,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..0b926f6a802 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->trans('CronCannotLoadClass', $this->classesname, $this->objectname); + } else { + $this->error = $langs->trans('CronCannotLoadObject', $this->classesname, $this->objectname); + } dol_syslog(get_class($this)."::run_jobs ".$this->error, LOG_ERR); $this->lastoutput = $this->error; $this->lastresult = -1; @@ -1008,10 +1153,8 @@ class Cronjob extends CommonObject } // test if method exists - if (!$error) - { - if (!method_exists($this->objectname, $this->methodename)) - { + if (!$error) { + if (!method_exists($this->objectname, $this->methodename)) { $this->error = $langs->trans('CronMethodDoesNotExists', $this->objectname, $this->methodename); dol_syslog(get_class($this)."::run_jobs ".$this->error, LOG_ERR); $this->lastoutput = $this->error; @@ -1019,8 +1162,7 @@ class Cronjob extends CommonObject $retval = $this->lastresult; $error++; } - if (in_array(strtolower(trim($this->methodename)), array('executecli'))) - { + if (in_array(strtolower(trim($this->methodename)), array('executecli'))) { $this->error = $langs->trans('CronMethodNotAllowed', $this->methodename, $this->objectname); dol_syslog(get_class($this)."::run_jobs ".$this->error, LOG_ERR); $this->lastoutput = $this->error; @@ -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 587bd1b28d1..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; @@ -465,9 +514,8 @@ if ($num > 0) print $object->priority; print ''; - if ($obj->jobtype == 'method') - { + print ''; + 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'); } + 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'); } + 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'); } + 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..8dcfcdadb1c 100644 --- a/htdocs/datapolicy/class/actions_datapolicy.class.php +++ b/htdocs/datapolicy/class/actions_datapolicy.class.php @@ -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/class/TraceableDB.php b/htdocs/debugbar/class/TraceableDB.php index 0cb380f39a1..af11f4c1d67 100644 --- a/htdocs/debugbar/class/TraceableDB.php +++ b/htdocs/debugbar/class/TraceableDB.php @@ -80,12 +80,13 @@ class TraceableDB extends DoliDB * Convert (by PHP) a GM Timestamp date into a string date with PHP server TZ to insert into a date field. * Function to use to build INSERT, UPDATE or WHERE predica * - * @param int $param Date TMS to convert - * @return string Date in a string YYYYMMDDHHMMSS + * @param int $param Date TMS to convert + * @param mixed $gm 'gmt'=Input informations are GMT values, 'tzserver'=Local to server TZ + * @return string Date in a string YYYY-MM-DD HH:MM:SS */ - public function idate($param) + public function idate($param, $gm = 'tzserver') { - return $this->db->idate($param); + return $this->db->idate($param, $gm); } /** 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 ($object->socid) { + if (!empty($conf->societe->enabled) && !empty($conf->global->DONATION_USE_THIRDPARTIES)) { $company = new Societe($db); - $result = $company->fetch($object->socid); - print ''; + print ''; } else { print ''; print ''; @@ -749,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 '
    '.$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 ''; } print ''."\n"; @@ -408,8 +414,7 @@ if ($action == 'create') print $form->selectyesno("public", $public_donation, 1); 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 "".''; @@ -426,7 +431,9 @@ if ($action == 'create') // Country print ''; print "".''; @@ -443,7 +450,7 @@ if ($action == 'create') print ''; print ''; @@ -453,13 +460,12 @@ if ($action == 'create') print ''; print ''; } - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { print "\n"; @@ -469,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); } @@ -495,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; @@ -545,11 +549,15 @@ if (!empty($id) && $action == 'edit') print ""; print "\n"; - if ($object->socid && !empty($conf->societe->enabled) && !empty($conf->global->DONATION_USE_THIRDPARTIES)) { + if (!empty($conf->societe->enabled) && !empty($conf->global->DONATION_USE_THIRDPARTIES)) { $company = new Societe($db); - $result = $company->fetch($object->socid); - print ''; + print ''; } else { $langs->load("companies"); print ''; @@ -577,8 +585,11 @@ if (!empty($id) && $action == 'edit') } // Payment mode print "\n"; @@ -599,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 '; } - print ' '.$langs->trans("AddThirdParty").''; + print ' '; 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("LinkedToDolibarrThirdParty").''.$company->getNomUrl(1).'
    '.$langs->trans("ThirdParty").''; + if ($object->socid > 0) { + $result = $company->fetch($object->socid); + print $company->getNomUrl(1); + } + print '
    '.$langs->trans("Company").'
    ".$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"; @@ -620,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); } @@ -650,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')).' : '; } @@ -707,11 +713,15 @@ if (!empty($id) && $action != 'edit') print yn($object->public); print '
    '.$langs->trans("LinkedToDolibarrThirdParty").''.$company->getNomUrl(1).'
    '.$langs->trans("ThirdParty").''; + if ($object->socid > 0) { + $result = $company->fetch($object->socid); + print $company->getNomUrl(1); + } + print '
    '.$langs->trans("Company").''.$object->societe.'
    '.$langs->trans("Lastname").''.$object->lastname.'
    '; @@ -758,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"; @@ -807,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 ''; @@ -836,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 '"; @@ -860,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); @@ -877,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 be9426415fe..1ec3ebe1cc5 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)) - { + if (!empty($id)) { $sql .= " AND d.rowid=".$id; - } elseif (!empty($ref)) - { + } 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 @@ -1090,4 +1081,21 @@ class Don extends CommonObject return 0; } } + + /** + * Function used to replace a thirdparty id with another one. + * + * @param DoliDB $db Database handler + * @param int $origin_id Old third-party id + * @param int $dest_id New third-party id + * @return bool + */ + public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id) + { + $tables = array( + 'don' + ); + + return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables); + } } 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 9ff1fa98ea2..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 ""; @@ -182,10 +188,10 @@ if ($object->id) print dol_get_fiche_end(); $modulepart = 'don'; - $permission = $user->rights->don->lire; + $permission = $user->rights->don->creer; $permtoedit = $user->rights->don->creer; $param = '&id='.$object->id; - include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { print $langs->trans("ErrorUnknown"); } 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").'
    '; @@ -776,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 ''; - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { print ''; print ' '; 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 "".$donationstatic->getFullName($langs).""; print ''.dol_print_date($db->jdate($objp->datedon), 'day').''; - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { print ""; - 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 "\n"; } - print ''.price($objp->amount).''; + print ''.price($objp->amount).''; print ''.$donationstatic->LibStatut($objp->status, 5).''; 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 c7c16ee970b..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 ''.$langs->trans('Amount').''.price($object->amount, 0, $ print ''.$langs->trans('Note').''.nl2br($object->note_public).''; // 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 ''.$langs->trans('PayedByThisPayment').''; print "\n"; - if ($num > 0) - { - while ($i < $num) - { + if ($num > 0) { + while ($i < $num) { $objp = $db->fetch_object($resql); print ''; @@ -184,7 +181,7 @@ if ($resql) print ''.price($objp->d_amount).''; // Status print ''.$don->getLibStatut(4, $objp->amount).''; - // Amount payed + // Amount paid print ''.price($objp->amount).''; print "\n"; if ($objp->paid == 1) { @@ -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 ''; + + // 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 5beeb013dbf..675372273f0 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,22 +1010,15 @@ 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"; - $i++; - } - print '}); - jQuery("#autoreset").click(function() { console.log("Reset values to 0"); '; - $i = 0; - while ($i < $numAsked) - { - print 'jQuery("#qtyl'.$i.'").val(0);'."\n"; - if (!empty($conf->productbatch->enabled)) print 'jQuery("#qtyl'.$i.'_'.$i.'").val(0);'."\n"; + if (!empty($conf->productbatch->enabled)) { + print 'jQuery("#qtyl'.$i.'_'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n"; + } $i++; } print '}); + jQuery("#autoreset").click(function() { console.log("Reset values to 0"); jQuery(".qtyl").val(0); }); }); '; @@ -1063,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").')'; @@ -1092,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]); @@ -1141,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.''; @@ -1179,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; @@ -1188,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; @@ -1227,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 } } @@ -1245,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.""; } } @@ -1272,29 +1232,27 @@ 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); print ''; print ''; - print ''; + print ''; print ''; print ''; @@ -1317,8 +1275,7 @@ if ($action == 'create') print $detail; $quantityToBeDelivered -= $deliverableQty; - if ($quantityToBeDelivered < 0) - { + if ($quantityToBeDelivered < 0) { $quantityToBeDelivered = 0; } $subj++; @@ -1327,7 +1284,7 @@ if ($action == 'create') } else { print ''; print ''; - print ' '; + print ' '; print ''; print ''; @@ -1337,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 @@ -1346,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 ''; @@ -1388,8 +1339,7 @@ if ($action == 'create') print ''; } $quantityToBeDelivered -= $deliverableQty; - if ($quantityToBeDelivered < 0) - { + if ($quantityToBeDelivered < 0) { $quantityToBeDelivered = 0; } $subj++; @@ -1397,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 ""; } @@ -1431,27 +1377,25 @@ 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 ''; print ''; print ''; @@ -1464,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); @@ -1479,40 +1425,38 @@ 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. $disabled = 'disabled="disabled"'; } - print ' '; + print ' '; } else { print $langs->trans("NA"); } 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"); @@ -1523,8 +1467,7 @@ if ($action == 'create') } // Line extrafield - if (!empty($extrafields)) - { + if (!empty($extrafields)) { //var_dump($line); $colspan = 5; $expLine = new ExpeditionLigne($db); @@ -1558,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; @@ -1590,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( @@ -1615,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; @@ -1627,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 .= '
    '; @@ -1638,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; @@ -1659,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); } @@ -1725,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").''; @@ -1734,8 +1669,7 @@ if ($action == 'create') print "
    '; print $langs->trans("RefProposal").''; @@ -1755,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 ''; @@ -1777,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 ''; @@ -1794,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 ''; @@ -1810,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 ''; @@ -1841,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 ''; @@ -1883,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)); @@ -1913,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); @@ -1949,8 +1890,7 @@ if ($action == 'create') // Lines of products - if ($action == 'editline') - { + if ($action == 'editline') { print '
    @@ -1965,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); } @@ -2042,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"; @@ -2064,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, @@ -2089,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 ''; @@ -2145,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.''; @@ -2170,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); } @@ -2200,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 ''; + 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); } @@ -2225,33 +2153,28 @@ if ($action == 'create') // add a 0 qty lot row to be able to add a lot print ''; // Qty to ship or shipped - print ''; + print ''; // 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 - print ''; + print ''; // Warehouse source print ''; // 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 ''; + print ''; // Warehouse source print ''; // Batch number managment @@ -2266,7 +2189,7 @@ if ($action == 'create') print ''; print ''; // Qty to ship or shipped - print ''; + print ''; // Warehouse source print ''; // Batch number managment @@ -2281,21 +2204,16 @@ 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; @@ -2383,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); @@ -2418,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").''; @@ -2440,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").''; @@ -2452,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").''; @@ -2474,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'; } @@ -2495,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").''; } } @@ -2518,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..961790cc3bd 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,56 @@ 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); + } + $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 ($updateRes > 0) { - return $updateRes; + if ($updateRes > 0) { + return $updateRes; - } - return false; - }*/ + } + return false; + }*/ // /** // * Update a line to given shipment @@ -314,53 +324,53 @@ 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); + } + $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 ($updateRes > 0) { - $result = $this->get($id); - unset($result->line); - return $this->_cleanObjectDatas($result); - } - return false; - }*/ + if ($updateRes > 0) { + $result = $this->get($id); + unset($result->line); + return $this->_cleanObjectDatas($result); + } + return false; + }*/ /** * Delete a line to given shipment @@ -425,12 +435,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 +550,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 +587,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 +638,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 +665,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 e4722cabb4d..ed6f7a25eaf 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) - { - if (($line_id = $this->create_line($stockLocation, $line_ext->origin_line_id, $qty, $line_ext->rang, $array_options)) < 0) - { + 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=".$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($objectsrc->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 = trim($this->note_private); - if (isset($this->note_public)) $this->note = 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); + } @@ -1093,7 +1117,6 @@ class Expedition extends CommonObject // Update request $sql = "UPDATE ".MAIN_DB_PREFIX."expedition SET"; - $sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').","; $sql .= " ref=".(isset($this->ref) ? "'".$this->db->escape($this->ref)."'" : "null").","; $sql .= " ref_ext=".(isset($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "null").","; $sql .= " ref_customer=".(isset($this->ref_customer) ? "'".$this->db->escape($this->ref_customer)."'" : "null").","; @@ -1117,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); } @@ -1181,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"); @@ -1203,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); @@ -1216,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(); } } @@ -1229,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 { @@ -1255,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; } @@ -1374,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++; } @@ -1383,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"); @@ -1405,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); @@ -1418,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(); } } @@ -1431,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 { @@ -1457,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.")"; @@ -1474,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 @@ -1516,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; } @@ -1591,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); @@ -1608,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) { @@ -1700,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); @@ -1722,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 { @@ -1756,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); @@ -1765,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(); @@ -1804,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).'"'; } @@ -1831,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; @@ -1866,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); } @@ -1895,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]; @@ -1937,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 @@ -1977,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 { @@ -2016,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); } @@ -2043,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=".$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); @@ -2073,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); @@ -2087,7 +2075,9 @@ class Expedition extends CommonObject $sql .= " WHERE rowid=".$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 @@ -2132,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 { @@ -2169,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; } @@ -2180,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); } @@ -2214,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"); @@ -2233,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 @@ -2281,8 +2258,7 @@ class Expedition extends CommonObject } // Call trigger - if (!$error) - { + if (!$error) { $result = $this->call_trigger('SHIPPING_CLOSED', $user); if ($result < 0) { $error++; @@ -2293,8 +2269,7 @@ class Expedition extends CommonObject $error++; } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -2308,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; @@ -2322,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; @@ -2360,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; } @@ -2373,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"); @@ -2398,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 @@ -2458,8 +2440,7 @@ class Expedition extends CommonObject $this->errors[] = $this->db->lasterror(); } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -2701,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; @@ -2737,21 +2717,21 @@ 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) - { - $rangmax = $this->line_max($fk_expedition); + if ($ranktouse == -1) { + $rangmax = $this->line_max($this->fk_expedition); $ranktouse = $rangmax + 1; } @@ -2771,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 @@ -2800,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); } @@ -2829,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++; } @@ -2844,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++; } @@ -2876,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); } @@ -2904,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++; @@ -2921,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++; @@ -2944,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++; @@ -2954,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)) { @@ -2966,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; } } @@ -2986,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; - 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; @@ -3016,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++; } @@ -3025,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++; } @@ -3068,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..f97d6b87a1b 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); } @@ -159,8 +157,7 @@ class ExpeditionLineBatch extends CommonObject $sql .= " WHERE fk_expeditiondet in (SELECT rowid FROM ".MAIN_DB_PREFIX."expeditiondet WHERE fk_expedition=".$id_expedition.")"; dol_syslog(__METHOD__, LOG_DEBUG); - if ($db->query($sql)) - { + if ($db->query($sql)) { return 1; } else { return -1; @@ -185,27 +182,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 c6b10bd6967..cd9febc685d 100644 --- a/htdocs/expedition/contact.php +++ b/htdocs/expedition/contact.php @@ -41,55 +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) - { - $result = $objectsrc->add_contact(GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'), $_POST["type"], $_POST["source"]); +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 { @@ -98,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 { @@ -132,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); @@ -147,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); @@ -211,8 +202,7 @@ if ($id > 0 || !empty($ref)) print '
    '.$formproduct->selectLotStock('', 'batchl'.$line_id.'_0', '', 1, 0, $lines[$i]->fk_product).'
    '.$formproduct->selectWarehouses($lines[$i]->entrepot_id, 'entl'.$line_id, '', 1, 0, $lines[$i]->fk_product, '', 1).' - '.$langs->trans("NA").'
    '.$formproduct->selectWarehouses($detail_entrepot->entrepot_id, 'entl'.$detail_entrepot->line_id, '', 1, 0, $lines[$i]->fk_product, '', 1).'
    '.$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).'
    '; @@ -2307,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"); @@ -2341,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().''; @@ -2371,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); @@ -222,8 +212,7 @@ if ($id > 0 || !empty($ref)) print "
    '; $objectsrc = new Propal($db); $objectsrc->fetch($object->$typeobject->id); @@ -258,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 a9b19ede7c3..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'; /* @@ -175,7 +180,7 @@ if ($id > 0 || !empty($ref)) { $permission = $user->rights->expedition->creer; $permtoedit = $user->rights->expedition->creer; $param = '&id='.$object->id; - include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { dol_print_error($db); } 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 eaae2438b55..427efb02475 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("sendings", "deliveries", 'companies', 'bills')); +$langs->loadLangs(array("sendings", "deliveries", 'companies', 'bills', 'products')); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'shipmentlist'; // To manage different context of search @@ -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,79 +225,139 @@ $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) $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, l.date_delivery as date_reception, e.fk_statut, e.billed, e.tracking_number,"; +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, "; $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)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as ee ON e.rowid = ee.fk_source AND ee.sourcetype = 'shipping' AND ee.targettype = 'delivery'"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."delivery as l ON l.rowid = ee.fk_target"; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user as u ON e.fk_user_author = u.rowid'; - +if ($search_user > 0) { // Get link to order to get the order id in eesource.fk_source + $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_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 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_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_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"; +} // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; @@ -296,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; } @@ -311,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 .= '&viewstatut='.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..cba2e14cf74 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') - { + if ($action == 'cloture') { $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=".$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/ajaxprojet.php b/htdocs/expensereport/ajax/ajaxprojet.php deleted file mode 100644 index 62ceb504dac..00000000000 --- a/htdocs/expensereport/ajax/ajaxprojet.php +++ /dev/null @@ -1,84 +0,0 @@ - - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2007-2010 Laurent Destailleur - * Copyright (C) 2010 Cyrille de Lambert - * - * This 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/expensereport/ajax/ajaxprojet.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'); - -$res = 0; -require '../../main.inc.php'; - - -/* - * 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 ''."\n"; - -dol_syslog(join(',', $_GET)); - - -// Generation liste des projets -if (GETPOST('fk_projet') != '') -{ - $return_arr = array(); - - $sql = "SELECT p.rowid, p.ref, p.title, s.nom"; - $sql .= " FROM ".MAIN_DB_PREFIX."projet as p"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON p.fk_soc = s.rowid"; - if (!empty($_GET["fk_projet"])) $sql .= " WHERE p.ref LIKE '%".$db->escape($_GET["fk_projet"])."%' OR p.title LIKE '%".$db->escape($_GET["fk_projet"])."%' OR s.nom LIKE '%".$db->escape($_GET["fk_projet"])."%'"; // Add other filters - $sql .= " ORDER BY p.ref ASC"; - - $resql = $db->query($sql); - if ($resql) - { - while ($row = $db->fetch_array($resql)) - { - $label = $row['ref'].' - '.$row['title']; - $row_array['label'] = $label; - $row_array['value'] = $label; - $row_array['key'] = $row['rowid']; - - array_push($return_arr, $row_array); - } - - echo json_encode($return_arr); - } else { - echo json_encode(array('nom'=>'Error', 'label'=>'Error', 'key'=>'Error', 'value'=>'Error')); - } -} else { - echo json_encode(array('nom'=>'ErrorBadParameter', 'label'=>'ErrorBadParameter', 'key'=>'ErrorBadParameter', 'value'=>'ErrorBadParameter')); -} 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 83e1173fcb4..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,13 +216,17 @@ 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)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->writeall_advance))) { + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer) && empty($user->rights->expensereport->writeall_advance))) { $error++; setEventMessages($langs->trans("NotEnoughPermission"), null, 'errors'); - } else { + } + if (!$error) { if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance)) { if (!in_array($object->fk_user_author, $childids)) { $error++; @@ -246,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; @@ -282,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'); } @@ -301,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 { @@ -310,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(); @@ -344,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); @@ -367,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 @@ -381,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"); @@ -398,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; @@ -441,8 +431,7 @@ if (empty($reshook)) } } - if (!$error) - { + if (!$error) { $db->commit(); header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; @@ -451,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); @@ -477,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"); @@ -507,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"); } */ @@ -526,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; @@ -562,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); @@ -589,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); @@ -703,8 +691,7 @@ if (empty($reshook)) } } - if ($result > 0) - { + if ($result > 0) { // Send mail // TO @@ -717,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; @@ -787,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); @@ -821,8 +805,7 @@ if (empty($reshook)) } } - if ($result > 0) - { + if ($result > 0) { // Send mail // TO @@ -835,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"); @@ -852,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; @@ -908,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); @@ -936,8 +917,7 @@ if (empty($reshook)) } } - if ($result > 0) - { + if ($result > 0) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; } else { @@ -948,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); @@ -976,50 +957,23 @@ if (empty($reshook)) } } - if ($action == 'set_unpaid' && $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_unpaid($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 (!empty($newlang)) { - $outputlangs = new Translate("", $conf); - $outputlangs->setDefaultLang($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; } - $model = $object->model_pdf; - $ret = $object->fetch($id); // Reload to get new records - - $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); - } - } - } - - if ($action == 'set_paid' && $id > 0 && $user->rights->expensereport->to_paid) - { - $object = new ExpenseReport($db); - $object->fetch($id); - - $result = $object->set_paid($id, $user); - - if ($result > 0) - { - // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { - $outputlangs = $langs; - $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang; if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); @@ -1031,8 +985,7 @@ if (empty($reshook)) } } - if ($result > 0) - { + if ($result > 0) { // Send mail // TO @@ -1045,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"); @@ -1067,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; @@ -1103,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); @@ -1123,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); @@ -1212,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); @@ -1223,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); @@ -1246,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); @@ -1282,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); @@ -1368,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); @@ -1382,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 ''; @@ -1416,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 ''; @@ -1430,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")); } @@ -1442,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 ''; @@ -1457,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 ''; @@ -1467,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 ''; } @@ -1492,19 +1439,15 @@ if ($action == 'create') print ''; } else { - if ($id > 0 || $ref) - { + if ($id > 0 || $ref) { $result = $object->fetch($id, $ref); $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 '
    '; @@ -1521,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 ''; @@ -1544,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); } @@ -1569,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 ''; @@ -1579,8 +1518,7 @@ if ($action == 'create') print ''; } - if ($object->status < 3) - { + if ($object->status < 3) { print ''; print ''.$langs->trans("VALIDATOR").''; // Approbator print ''; @@ -1599,8 +1537,7 @@ if ($action == 'create') print ''; } - if ($object->status == 6) - { + if ($object->status == 6) { print ''; print ''.$langs->trans("AUTHORPAIEMENT").''; print ''; @@ -1631,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')) @@ -1640,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); } @@ -1703,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 .= '
    '; @@ -1746,23 +1676,25 @@ 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 ''; + // Period print ''; print ''.$langs->trans("Period").''; print ''; 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.''; @@ -1772,40 +1704,43 @@ if ($action == 'create') // Validation date print ''; print ''.$langs->trans("DATE_SAVE").''; - print ''.dol_print_date($object->date_valid, 'dayhour'); - if ($object->status == 2 && $object->hasDelay('toapprove')) print ' '.img_warning($langs->trans("Late")); - if ($object->status == 5 && $object->hasDelay('topay')) print ' '.img_warning($langs->trans("Late")); + 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")); + } 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 ''; @@ -1815,46 +1750,49 @@ if ($action == 'create') print ''; print ''; print ''.$langs->trans("DATE_CANCEL").''; - print ''.dol_print_date($object->date_cancel, 'dayhour').''; + print ''.dol_print_date($object->date_cancel, 'dayhour', 'tzuser').''; print ''; } else { 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 ''; print ''; print ''.$langs->trans("DateApprove").''; - print ''.dol_print_date($object->date_approve, 'dayhour').''; + print ''.dol_print_date($object->date_approve, 'dayhour', 'tzuser').''; 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'); - if ($object->detail_refuse) print ' - '.$object->detail_refuse; + print ''.dol_print_date($object->date_refuse, 'dayhour', 'tzuser'); + 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").''; @@ -1888,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 ''; @@ -1940,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; @@ -1961,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; @@ -1977,8 +1920,9 @@ if ($action == 'create') } print ''; - if ($bankaccountstatic->id) + if ($bankaccountstatic->id) { print $bankaccountstatic->getNomUrl(1, 'transactions'); + } print ''; } print ''.price($objp->amount).""; @@ -1987,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 } @@ -1997,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).''; @@ -2026,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 ''; @@ -2037,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 ''; } @@ -2062,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 @@ -2085,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 ''; @@ -2118,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 ''; @@ -2245,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 ''; @@ -2264,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 ' @@ -2275,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; } } @@ -2298,8 +2229,7 @@ if ($action == 'create') print ''; // Select project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { print ''; @@ -2310,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 @@ -2367,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'; @@ -2393,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 ''; @@ -2412,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 ' @@ -2457,8 +2388,7 @@ if ($action == 'create') print ''; // Select project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { print ''; @@ -2469,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 ''; @@ -2507,8 +2438,7 @@ if ($action == 'create') // Picture print ''; - if ($action != 'editline') - { + if ($action != 'editline') { print ''; print ''; } @@ -2525,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); @@ -2578,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 ''; } } @@ -2598,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 ''; @@ -2612,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 ''; } @@ -2626,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 @@ -2645,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 ''; } @@ -2656,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 ''; @@ -2674,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 ''; } @@ -2708,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 ''; } @@ -2730,8 +2636,7 @@ if (GETPOST('modelselected', 'alpha')) { $action = 'presend'; } -if ($action != 'presend') -{ +if ($action != 'presend') { /* * Generate documents */ @@ -2739,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; @@ -2758,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..7321cb40625 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,56 @@ 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); + } + $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 ($updateRes > 0) { - return $updateRes; + if ($updateRes > 0) { + return $updateRes; - } - return false; - } - */ + } + return false; + } + */ /** * Update a line to given Expense Report @@ -292,53 +296,53 @@ 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); + } + $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 ($updateRes > 0) { - $result = $this->get($id); - unset($result->line); - return $this->_cleanObjectDatas($result); - } - return false; - } - */ + 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 +355,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 +407,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 +432,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 +470,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 +562,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 8d5cbd3c2cc..8ec99aa1007 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -66,14 +66,14 @@ class ExpenseReport extends CommonObject public $date_fin; /** - * 0=draft, 2=validated (attente approb), 4=canceled, 5=approved, 6=payed, 99=denied + * 0=draft, 2=validated (attente approb), 4=canceled, 5=approved, 6=paid, 99=denied * * @var int Status */ public $status; /** - * 0=draft, 2=validated (attente approb), 4=canceled, 5=approved, 6=payed, 99=denied + * 0=draft, 2=validated (attente approb), 4=canceled, 5=approved, 6=paid, 99=denied * * @var int Status * @deprecated @@ -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(); @@ -256,6 +257,7 @@ class ExpenseReport extends CommonObject $sql .= ",date_debut"; $sql .= ",date_fin"; $sql .= ",date_create"; + $sql .= ",fk_user_creat"; $sql .= ",fk_user_author"; $sql .= ",fk_user_validator"; $sql .= ",fk_user_approve"; @@ -274,6 +276,7 @@ class ExpenseReport extends CommonObject $sql .= ", '".$this->db->idate($this->date_debut)."'"; $sql .= ", '".$this->db->idate($this->date_fin)."'"; $sql .= ", '".$this->db->idate($now)."'"; + $sql .= ", ".$user->id; $sql .= ", ".$fuserid; $sql .= ", ".($this->fk_user_validator > 0 ? $this->fk_user_validator : "null"); $sql .= ", ".($this->fk_user_approve > 0 ? $this->fk_user_approve : "null"); @@ -287,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)) { @@ -332,9 +330,9 @@ 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++; break; } @@ -342,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); @@ -364,8 +360,7 @@ class ExpenseReport extends CommonObject // End call triggers } - if (empty($error)) - { + if (empty($error)) { $this->db->commit(); return $this->id; } else { @@ -402,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(); @@ -419,6 +416,7 @@ class ExpenseReport extends CommonObject $this->fk_statut = 0; // deprecated // Clear fields + $this->fk_user_creat = $user->id; $this->fk_user_author = $fk_user_author; // Note fk_user_author is not the 'author' but the guy the expense report is for. $this->fk_user_valid = ''; $this->date_create = ''; @@ -426,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; } } @@ -437,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 { @@ -486,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"); @@ -503,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); @@ -516,8 +510,7 @@ class ExpenseReport extends CommonObject // End call triggers } - if (empty($error)) - { + if (empty($error)) { $this->db->commit(); return 1; } else { @@ -548,21 +541,22 @@ class ExpenseReport extends CommonObject $sql .= " d.date_refuse, d.date_cancel,"; // ACTIONS $sql .= " d.total_ht, d.total_ttc, d.total_tva,"; // TOTAUX (int) $sql .= " d.date_debut, d.date_fin, d.date_create, d.tms as date_modif, d.date_valid, d.date_approve,"; // DATES (datetime) - $sql .= " d.fk_user_author, d.fk_user_modif, d.fk_user_validator,"; + $sql .= " d.fk_user_creat, d.fk_user_author, d.fk_user_modif, d.fk_user_validator,"; $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; @@ -585,6 +579,7 @@ class ExpenseReport extends CommonObject $this->date_refuse = $this->db->jdate($obj->date_refuse); $this->date_cancel = $this->db->jdate($obj->date_cancel); + $this->fk_user_creat = $obj->fk_user_creat; $this->fk_user_author = $obj->fk_user_author; // Note fk_user_author is not the 'author' but the guy the expense report is for. $this->fk_user_modif = $obj->fk_user_modif; $this->fk_user_validator = $obj->fk_user_validator; @@ -594,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 @@ -608,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); } @@ -630,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 * @@ -638,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); @@ -665,8 +679,7 @@ class ExpenseReport extends CommonObject // End call triggers } - if (empty($error)) - { + if (empty($error)) { $this->db->commit(); return 1; } else { @@ -733,19 +746,17 @@ class ExpenseReport extends CommonObject $sql .= " f.tms as date_modification,"; $sql .= " f.date_valid as datev,"; $sql .= " f.date_approve as datea,"; - //$sql.= " f.fk_user_author as fk_user_creation,"; // This is not user of creation but user the expense is for. + $sql .= " f.fk_user_creat as fk_user_creation,"; $sql .= " f.fk_user_modif as fk_user_modification,"; $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; @@ -759,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; @@ -873,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"; @@ -932,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 '
    '; @@ -968,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; @@ -989,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 : @@ -1028,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); @@ -1107,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(); @@ -1127,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 @@ -1147,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++; @@ -1218,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; } @@ -1227,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); @@ -1248,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) { @@ -1260,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; @@ -1303,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 { @@ -1348,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(); @@ -1382,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); @@ -1403,8 +1398,7 @@ class ExpenseReport extends CommonObject // End call triggers } - if (empty($error)) - { + if (empty($error)) { $this->db->commit(); return 1; } else { @@ -1438,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); @@ -1465,8 +1456,7 @@ class ExpenseReport extends CommonObject // End call triggers } - if (empty($error)) - { + if (empty($error)) { $this->db->commit(); return 1; } else { @@ -1488,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 @@ -1495,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; @@ -1507,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); @@ -1520,8 +1522,7 @@ class ExpenseReport extends CommonObject // End call triggers } - if (empty($error)) - { + if (empty($error)) { $this->db->commit(); return 1; } else { @@ -1553,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); @@ -1578,8 +1576,7 @@ class ExpenseReport extends CommonObject // End call triggers } - if (empty($error)) - { + if (empty($error)) { $this->db->commit(); return 1; } else { @@ -1607,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"; @@ -1616,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) @@ -1632,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; @@ -1666,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).'"'; } @@ -1710,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; @@ -1739,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(); @@ -1769,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(); @@ -1798,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)) { @@ -1821,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. } @@ -1854,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 { @@ -1891,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); @@ -1902,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; @@ -1933,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]; @@ -1943,7 +1962,9 @@ class ExpenseReport extends CommonObject $this->line->total_tva = $tmp[1]; return false; - } else return true; + } else { + return true; + } } /** @@ -1955,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; @@ -1967,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); @@ -2006,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); } @@ -2041,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 ? @@ -2056,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. } @@ -2100,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; @@ -2113,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); @@ -2126,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 { @@ -2151,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(); @@ -2189,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; } @@ -2244,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++; @@ -2309,17 +2331,15 @@ 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->trans($obj->code) != $obj->code) ? $langs->trans($obj->code) : $obj->label); + $ret[$obj->code] = (($langs->transnoentitiesnoconv($obj->code) != $obj->code) ? $langs->transnoentitiesnoconv($obj->code) : $obj->label); $i++; } } else { @@ -2345,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); @@ -2379,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"); @@ -2415,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++; } @@ -2450,14 +2469,19 @@ 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') - { + if ($option == 'toapprove') { return ($this->datevalid ? $this->datevalid : $this->date_valid) < ($now - $conf->expensereport->approve->warning_delay); - } else return ($this->datevalid ? $this->datevalid : $this->date_valid) < ($now - $conf->expensereport->payment->warning_delay); + } else { + return ($this->datevalid ? $this->datevalid : $this->date_valid) < ($now - $conf->expensereport->payment->warning_delay); + } } /** @@ -2471,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 { @@ -2485,8 +2507,7 @@ class ExpenseReport extends CommonObject return -1; } - if ($alreadydispatched) - { + if ($alreadydispatched) { return 1; } return 0; @@ -2508,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); @@ -2608,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; @@ -2663,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(); @@ -2691,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; @@ -2711,8 +2731,7 @@ class ExpenseReportLine $error++; } - if (!$error) - { + if (!$error) { $this->db->commit(); return $this->id; } else { @@ -2738,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; } @@ -2779,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(); @@ -2797,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; @@ -2829,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 55799b10589..37206815cbf 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(); } } @@ -104,8 +113,7 @@ $title = $langs->trans("ExpenseReport")." - ".$langs->trans("Documents"); $helpurl = "EN:Module_Expense_Reports"; llxHeader("", $title, $helpurl); -if ($object->id) -{ +if ($object->id) { $object->fetch_thirdparty(); $head = expensereport_prepare_head($object); @@ -124,8 +132,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']; } @@ -149,7 +156,7 @@ if ($object->id) $permission = $user->rights->expensereport->creer; $permtoedit = $user->rights->expensereport->creer; $param = '&id='.$object->id; - include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/expensereport/index.php b/htdocs/expensereport/index.php index 046bde4efa1..f9792d5b68c 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; @@ -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; @@ -2105,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)); @@ -2132,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)) { @@ -2167,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); } } @@ -2211,8 +2144,7 @@ if ($action == 'create') print '
    '; print 'rowid.'">'; @@ -2228,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); @@ -2325,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); @@ -2485,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 440fc4524a6..ae4261990f4 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(); } } @@ -78,12 +84,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 = "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')); @@ -101,8 +113,12 @@ $month_end = GETPOST("month_end", "int"); $year_end = GETPOST("year_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 +139,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), @@ -140,14 +158,7 @@ $arrayfields = array( 'd.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), ); // 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])) - $arrayfields["ef.".$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($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key])); - } -} +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; $canedituser = (!empty($user->admin) || $user->rights->user->user->creer); @@ -158,21 +169,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 = ""; @@ -188,8 +203,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 } @@ -223,8 +237,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(); @@ -238,36 +251,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'; @@ -280,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; } @@ -295,48 +321,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); @@ -347,8 +397,7 @@ if ($resql) print dol_get_fiche_end(); - if ($action != 'edit') - { + if ($action != 'edit') { print '
    '; $childids = $user->getAllChildIds(1); @@ -373,7 +422,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); @@ -385,9 +436,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).'
    '; } @@ -395,11 +447,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 '
    '; @@ -414,17 +468,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 ''; @@ -433,8 +484,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 ''; @@ -445,8 +495,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 ''; @@ -456,33 +505,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 @@ -493,20 +537,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 ''; @@ -520,24 +561,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"; @@ -548,12 +613,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; @@ -579,10 +648,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 ''; @@ -596,7 +668,9 @@ if ($resql) print ''; print ''; print ''; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // User if (!empty($arrayfields['user']['checked'])) { @@ -610,50 +684,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; } @@ -665,37 +758,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"; @@ -707,7 +806,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").''; } @@ -725,10 +828,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 c9db970cd0b..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,51 +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') -{ - $max_execution_time_for_export = (empty($conf->global->EXPORT_MAX_EXECUTION_TIME) ? 300 : $conf->global->EXPORT_MAX_EXECUTION_TIME); // 5mn if not defined +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_export) - { - @ini_set("max_execution_time", $max_execution_time_for_export); // This work only if safe mode is off. also web servers has timeout of 300 + 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 { @@ -290,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; } } @@ -341,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'); @@ -356,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(); @@ -365,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++; } @@ -378,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++; @@ -389,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'); } @@ -418,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; @@ -442,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 ''; @@ -476,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; @@ -504,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(); @@ -463,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 '
    '; @@ -567,8 +555,7 @@ if ($step == 2 && $datatoexport) $i = 0; - foreach ($fieldsarray as $code=>$label) - { + foreach ($fieldsarray as $code => $label) { print ''; $i++; @@ -582,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]; } @@ -594,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"').''; @@ -641,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").''; @@ -661,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; @@ -712,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]) : ''); } @@ -754,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++; @@ -766,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]; } @@ -781,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]).'
    '; } @@ -806,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 { @@ -828,7 +796,7 @@ if ($step == 3 && $datatoexport) print '
    '; /* - * Barre d'action + * Action bar */ print '
    '; // il n'est pas obligatoire de filtrer les champs @@ -836,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; @@ -861,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++; @@ -887,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]); } @@ -908,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] : '')."'"; + } } } } @@ -948,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]); @@ -959,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]; } @@ -973,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]).'
    '; } @@ -1000,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 ' '; @@ -1016,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").''; } @@ -1030,8 +989,7 @@ if ($step == 4 && $datatoexport) // Area for profils export - if (count($array_selected)) - { + if (count($array_selected)) { print '
    '; print '
    '; @@ -1061,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; @@ -1091,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; @@ -1116,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++; @@ -1136,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); } @@ -1155,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] : '')."'"; + } } } } @@ -1210,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]); } @@ -1236,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 @@ -1272,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..b7280c2f4a4 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 = ".$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 07c0146c2a8..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,15 +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) - $element = $subelement = $_POST['origin']; - if (preg_match('/^([^_]+)_([^_]+)/i', $_POST['origin'], $regs)) - { + $regs = array(); + $element = $subelement = GETPOST('origin', 'alphanohtml'); + if (preg_match('/^([^_]+)_([^_]+)/i', GETPOST('origin', 'alphanohtml'), $regs)) { $element = $regs[1]; $subelement = $regs[2]; } @@ -240,21 +238,25 @@ 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']); } // Extrafields - $extrafields = new ExtraFields($db); + + // Fill array 'array_options' with data from add form + $ret = $extrafields->setOptionalsFromPost(null, $object); + if ($ret < 0) { + $error++; + $action = 'create'; + } $array_options = $extrafields->getOptionalsFromPost($object->table_element); $object->array_options = $array_options; $id = $object->create($user); - if ($id > 0) - { + if ($id > 0) { dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); $classname = ucfirst($subelement); @@ -262,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; } @@ -275,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; @@ -295,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); @@ -357,12 +363,11 @@ if (empty($reshook)) $id, $desc, $date_intervention, - $duration, - $array_options + $duration, + $array_options ); - if ($result < 0) - { + if ($result < 0) { $error++; break; } @@ -385,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"); @@ -419,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'); @@ -442,38 +442,31 @@ 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'); $date_intervention = dol_mktime(GETPOST('dihour', 'int'), GETPOST('dimin', 'int'), 0, GETPOST('dimonth', 'int'), GETPOST('diday', 'int'), GETPOST('diyear', 'int')); - $duration = empty($conf->global->FICHINTER_WITHOUT_DURATION) ?convertTime2Seconds(GETPOST('durationhour', 'int'), GETPOST('durationmin', 'int')) : 0; - + $duration = empty($conf->global->FICHINTER_WITHOUT_DURATION) ? convertTime2Seconds(GETPOST('durationhour', 'int'), GETPOST('durationmin', 'int')) : 0; // Extrafields $extrafields->fetch_name_optionals_label($object->table_element_line); @@ -491,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 { @@ -511,73 +508,51 @@ 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) - { + if ($objectline->fetch($lineid) <= 0) { dol_print_error($db); exit; } - if ($object->fetch($objectline->fk_fichinter) <= 0) - { + if ($object->fetch($objectline->fk_fichinter) <= 0) { dol_print_error($db); exit; } @@ -597,8 +572,7 @@ if (empty($reshook)) $objectline->array_options = $array_options; $result = $objectline->update($user); - if ($result < 0) - { + if ($result < 0) { dol_print_error($db); exit; } @@ -606,34 +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 (!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); 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; } @@ -641,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; @@ -706,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 { @@ -782,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); @@ -801,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 @@ -834,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; } @@ -855,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; } @@ -869,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); @@ -895,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>'; @@ -941,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>'; @@ -962,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)) { @@ -1017,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'); @@ -1030,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)) { @@ -1061,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(); @@ -1086,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'); } @@ -1113,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); } @@ -1144,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 @@ -1167,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> : '; } @@ -1210,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>'; @@ -1243,8 +1199,7 @@ if ($action == 'create') print '</tr>'; // Contract - if ($conf->contrat->enabled) - { + if ($conf->contrat->enabled) { $langs->load('contracts'); print '<tr>'; print '<td>'; @@ -1252,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>'; @@ -1292,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>'; @@ -1309,28 +1260,24 @@ 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.'">'; - if ($action == 'editline') - { + if ($action == 'editline') { print '<input type="hidden" name="action" value="updateline">'; print '<input type="hidden" name="line_id" value="'.GETPOST('line_id', 'int').'">'; } else { @@ -1342,18 +1289,17 @@ if ($action == 'create') $sql .= ' ft.date as date_intervention'; $sql .= ' FROM '.MAIN_DB_PREFIX.'fichinterdet as ft'; $sql .= ' WHERE ft.fk_fichinter = '.$object->id; - if (!empty($conf->global->FICHINTER_HIDE_EMPTY_DURATION)) + if (!empty($conf->global->FICHINTER_HIDE_EMPTY_DURATION)) { $sql .= ' AND ft.duree <> 0'; + } $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">'; @@ -1370,13 +1316,11 @@ if ($action == 'create') print '<td class="liste_titre">&nbsp;</td>'; print "</tr>\n"; } - while ($i < $num) - { + while ($i < $num) { $objp = $db->fetch_object($resql); // Ligne en mode visu - if ($action != 'editline' || GETPOST('line_id', 'int') != $objp->rowid) - { + if ($action != 'editline' || GETPOST('line_id', 'int') != $objp->rowid) { print '<tr class="oddeven">'; // No. @@ -1396,10 +1340,8 @@ if ($action == 'create') print "</td>\n"; - - // Econ to edit and delete - if ($object->statut == 0 && $user->rights->ficheinter->creer) - { + // Icon to edit and delete + 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(); @@ -1408,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>'; @@ -1441,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. @@ -1472,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>'; @@ -1498,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">'; @@ -1516,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"; } @@ -1574,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(); @@ -1599,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))) { @@ -1613,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>'; + } } } @@ -1649,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>'; @@ -1681,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>'; } @@ -1692,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>'; } @@ -1703,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..1fef1ed7c03 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=".$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 046d35b62ce..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,17 +487,25 @@ 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); - $txtva = price2num($txtva); + if (!preg_match('/\((.*)\)/', $txtva)) { + $txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5' + } if ($price_base_type == 'HT') { $pu = $pu_ht; @@ -499,7 +513,6 @@ class FichinterRec extends Fichinter $pu = $pu_ttc; } - // Calcul du total TTC et de la TVA pour la ligne a partir de // qty, pu, remise_percent et txtva // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker @@ -622,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'; @@ -708,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); @@ -731,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); @@ -758,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)) { @@ -788,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)) { @@ -817,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 1b9326468f4..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 .= ' : '; @@ -169,7 +173,7 @@ if ($object->id) $permission = $user->rights->ficheinter->creer; $permtoedit = $user->rights->ficheinter->creer; $param = '&id='.$object->id; - include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { print $langs->trans("ErrorUnknown"); } 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 bdf60e121e7..9c34fe4b39f 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( @@ -117,14 +134,8 @@ $arrayfields = array( 'fd.duree'=>array('label'=>'DurationOfLine', 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS) ? 1 : 0), ); // 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])) - $arrayfields["ef.".$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($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key])); - } -} +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'); @@ -133,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 = ""; @@ -193,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; } @@ -204,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"; @@ -214,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(); @@ -227,9 +244,15 @@ 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 (!$user->rights->societe->client->voir && empty($socid)) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; +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 (!$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"; @@ -246,16 +269,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) +} +if ($socid) { $sql .= " AND s.rowid = ".$socid; +} if ($sall) { $sql .= natural_search(array_keys($fieldstosearchall), $sall); } @@ -269,12 +297,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; } @@ -284,52 +310,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">'; @@ -345,9 +399,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>'; } @@ -355,48 +410,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>'; @@ -408,51 +462,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">'; @@ -463,33 +511,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; @@ -506,8 +579,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">'; @@ -518,15 +590,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>'; @@ -541,17 +611,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; @@ -560,10 +632,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; @@ -573,12 +646,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 @@ -588,71 +664,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"; @@ -675,7 +764,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 48c1d448097..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.0-beta'); // 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..b9b541f0229 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); } @@ -706,8 +718,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 254e577f2f2..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' ); @@ -72,7 +72,7 @@ class SupplierOrders extends DolibarrApi throw new RestException(404, 'Supplier order not found'); } - if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->order->id, '', 'commande')) { + if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->order->id, 'commande_fournisseur', 'commande')) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -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); } @@ -239,17 +269,20 @@ class SupplierOrders extends DolibarrApi throw new RestException(404, 'Supplier order not found'); } - if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->order->id, '', 'commande')) { + if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->order->id, 'commande_fournisseur', 'commande')) { 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->order->$field = $value; } - if ($this->order->update($id, DolibarrApiAccess::$user)) + if ($this->order->update(DolibarrApiAccess::$user)) { return $this->get($id); + } return false; } @@ -270,7 +303,7 @@ class SupplierOrders extends DolibarrApi throw new RestException(404, 'Supplier order not found'); } - if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->order->id, '', 'commande')) { + if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->order->id, 'commande_fournisseur', 'commande')) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -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); @@ -315,7 +348,7 @@ class SupplierOrders extends DolibarrApi throw new RestException(404, 'Order not found'); } - if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->order->id, '', 'commande')) { + if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->order->id, 'commande_fournisseur', 'commande')) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } @@ -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 4ca073a38c7..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 { @@ -204,4 +199,21 @@ class Fournisseur extends Societe } return $arr; } + + /** + * Function used to replace a thirdparty id with another one. + * + * @param DoliDB $db Database handler + * @param int $origin_id Old third-party id + * @param int $dest_id New third-party id + * @return bool + */ + public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id) + { + $tables = array( + 'facture_fourn' + ); + + return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables); + } } diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 557bc2a0456..c999f204749 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'; /** @@ -139,6 +141,8 @@ class CommandeFournisseur extends CommonOrder public $cond_reglement_id; public $cond_reglement_code; + public $cond_reglement_label; // Label + public $cond_reglement_doc; // Label on documents /** * @var int ID @@ -202,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), @@ -301,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,"; @@ -312,7 +318,7 @@ class CommandeFournisseur extends CommonOrder $sql .= " c.note_private, c.note_public, c.model_pdf, c.extraparams, c.billed,"; $sql .= " c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multicurrency_total_ht, c.multicurrency_total_tva, c.multicurrency_total_ttc,"; $sql .= " cm.libelle as methode_commande,"; - $sql .= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc,"; + $sql .= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_label, cr.libelle_facture as cond_reglement_doc,"; $sql .= " p.code as mode_reglement_code, p.libelle as mode_reglement_libelle"; $sql .= ', c.fk_incoterms, c.location_incoterms'; $sql .= ', i.libelle as label_incoterms'; @@ -322,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=".$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; @@ -354,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; @@ -373,8 +382,9 @@ class CommandeFournisseur extends CommonOrder $this->fk_project = $obj->fk_project; $this->cond_reglement_id = $obj->fk_cond_reglement; $this->cond_reglement_code = $obj->cond_reglement_code; - $this->cond_reglement = $obj->cond_reglement_libelle; - $this->cond_reglement_doc = $obj->cond_reglement_libelle_doc; + $this->cond_reglement = $obj->cond_reglement_label; // deprecated + $this->cond_reglement_label = $obj->cond_reglement_label; + $this->cond_reglement_doc = $obj->cond_reglement_doc; $this->fk_account = $obj->fk_account; $this->mode_reglement_id = $obj->fk_mode_reglement; $this->mode_reglement_code = $obj->mode_reglement_code; @@ -406,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; @@ -446,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); @@ -502,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; } @@ -559,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; @@ -640,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 { @@ -693,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 @@ -734,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); } @@ -789,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).'"'; } @@ -814,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).'">'; @@ -850,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'; @@ -875,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; @@ -891,28 +902,32 @@ class CommandeFournisseur extends CommonOrder * Class invoiced the supplier order * * @param User $user Object user making the change - * @return int <0 if KO, >0 if KO + * @return int <0 if KO, 0 if already billed, >0 if OK */ public function classifyBilled(User $user) { $error = 0; + + if ($this->billed) { + return 0; + } + $this->db->begin(); $sql = 'UPDATE '.MAIN_DB_PREFIX.'commande_fournisseur SET billed = 1'; $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > '.self::STATUS_DRAFT; - if ($this->db->query($sql)) - { - if (!$error) - { + 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(); @@ -946,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(); @@ -957,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; @@ -971,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)'; } @@ -987,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 @@ -1087,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 { @@ -1139,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 { @@ -1191,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; @@ -1213,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++; @@ -1221,8 +1235,7 @@ class CommandeFournisseur extends CommonOrder $this->errors[] = $this->db->lasterror(); } - if (!$error) - { + if (!$error) { $this->db->commit(); } else { $this->db->rollback(); @@ -1255,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; @@ -1297,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)."'"; @@ -1321,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 @@ -1354,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; @@ -1365,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++; } @@ -1399,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++; } @@ -1409,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; } @@ -1442,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; @@ -1458,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); @@ -1497,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 { @@ -1556,22 +1666,31 @@ class CommandeFournisseur extends CommonOrder { global $langs, $mysoc, $conf; - $error = 0; - dol_syslog(get_class($this)."::addline $desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $fk_prod_fourn_price, $ref_supplier, $remise_percent, $price_base_type, $pu_ttc, $type, $info_bits, $notrigger, $date_start, $date_end, $fk_unit, $pu_ht_devise, $origin, $origin_id"); include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; - 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); @@ -1583,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; @@ -1592,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'); @@ -1625,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(); @@ -1642,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); @@ -1688,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. } @@ -1714,8 +1830,8 @@ class CommandeFournisseur extends CommonOrder $multicurrency_total_ttc = $tabprice[18]; $pu_ht_devise = $tabprice[19]; - $localtax1_type = $localtaxes_type[0]; - $localtax2_type = $localtaxes_type[2]; + $localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0]; + $localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2]; $rangmax = $this->line_max(); $rang = $rangmax + 1; @@ -1734,8 +1850,8 @@ class CommandeFournisseur extends CommonOrder $this->line->tva_tx = $txtva; $this->line->localtax1_tx = ($total_localtax1 ? $localtaxes_type[1] : 0); $this->line->localtax2_tx = ($total_localtax2 ? $localtaxes_type[3] : 0); - $this->line->localtax1_type = $localtaxes_type[0]; - $this->line->localtax2_type = $localtaxes_type[2]; + $this->line->localtax1_type = $localtax1_type; + $this->line->localtax2_type = $localtax2_type; $this->line->fk_product = $fk_product; $this->line->product_type = $product_type; $this->line->remise_percent = $remise_percent; @@ -1776,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 { @@ -1826,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"; @@ -1854,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 @@ -1873,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); @@ -1891,8 +2000,7 @@ class CommandeFournisseur extends CommonOrder } } - if ($error == 0) - { + if ($error == 0) { $this->db->commit(); return 1; } else { @@ -1914,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 { @@ -1953,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(); @@ -1971,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++; @@ -1980,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++; @@ -1989,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++; @@ -2004,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++; @@ -2024,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++; @@ -2057,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; @@ -2083,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]; @@ -2123,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, @@ -2147,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; } @@ -2173,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'; @@ -2216,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; @@ -2236,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; @@ -2289,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(); @@ -2301,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); } @@ -2352,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(); @@ -2364,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); } @@ -2421,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; } @@ -2438,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(); } } @@ -2467,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'; @@ -2483,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++; @@ -2491,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; @@ -2533,27 +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; + } $pu = price2num($pu); $pu_ht_devise = price2num($pu_ht_devise); - $txtva = price2num($txtva); + 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'); @@ -2572,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. } @@ -2594,8 +2688,8 @@ class CommandeFournisseur extends CommonOrder $multicurrency_total_ttc = $tabprice[18]; $pu_ht_devise = $tabprice[19]; - $localtax1_type = $localtaxes_type[0]; - $localtax2_type = $localtaxes_type[2]; + $localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0]; + $localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2]; //Fetch current line from the database and then clone the object and set it in $oldline property $this->line = new CommandeFournisseurLigne($this->db); @@ -2611,14 +2705,11 @@ class CommandeFournisseur extends CommonOrder $this->line->desc = $desc; // redefine quantity according to packaging - if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) - { - if ($qty < $this->line->packaging) - { + if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) { + if ($qty < $this->line->packaging) { $qty = $this->line->packaging; } else { - if (($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'); @@ -2633,8 +2724,8 @@ class CommandeFournisseur extends CommonOrder $this->line->tva_tx = $txtva; $this->line->localtax1_tx = $txlocaltax1; $this->line->localtax2_tx = $txlocaltax2; - $this->line->localtax1_type = $localtaxes_type[0]; - $this->line->localtax2_type = $localtaxes_type[2]; + $this->line->localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0]; + $this->line->localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2]; $this->line->remise_percent = $remise_percent; $this->line->subprice = $pu_ht; $this->line->rang = $this->rang; @@ -2676,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; @@ -2720,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; } @@ -2748,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; @@ -2758,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; @@ -2793,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); @@ -2837,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"; @@ -2846,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); @@ -2878,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"; @@ -2890,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(); @@ -2910,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); @@ -2940,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 ''; @@ -3007,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'); + } } /** @@ -3060,23 +3153,41 @@ class CommandeFournisseur extends CommonOrder /** * Is the supplier order delayed? + * We suppose a purchase ordered as late if a the purchase order has been sent and the delivery date is set and before the delay. + * If order has not been sent, we use the order date. * - * @return bool + * @return bool True if object is delayed */ public function hasDelay() { 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 + } - $now = dol_now(); - $date_to_test = empty($this->delivery_date) ? $this->date_commande : $this->delivery_date; + if ($this->statut == self::STATUS_ORDERSENT || $this->statut == self::STATUS_RECEIVED_PARTIALLY) { + $now = dol_now(); + if (!empty($this->delivery_date)) { + $date_to_test = $this->delivery_date; + return $date_to_test && $date_to_test < ($now - $conf->commande->fournisseur->warning_delay); + } else { + //$date_to_test = $this->date_commande; + //return $date_to_test && $date_to_test < ($now - $conf->commande->fournisseur->warning_delay); + return false; + } + } else { + $now = dol_now(); + $date_to_test = $this->date_commande; - return ($this->statut > 0 && $this->statut < 5) && $date_to_test && $date_to_test < ($now - $conf->commande->fournisseur->warning_delay); + return ($this->statut > 0 && $this->statut < 5) && $date_to_test && $date_to_test < ($now - $conf->commande->fournisseur->warning_delay); + } } /** - * Show the customer delayed info + * Show the customer delayed info. + * We suppose a purchase ordered as late if a the purchase order has been sent and the delivery date is set and before the delay. + * If order has not been sent, we use the order date. * * @return string Show delayed information */ @@ -3084,14 +3195,24 @@ 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)) { - $text = $langs->trans("OrderDate").' '.dol_print_date($this->date_commande, 'day'); - } else { - $text = $langs->trans("DeliveryDate").' '.dol_print_date($this->delivery_date, 'day'); + if (empty($this->delivery_date) && !empty($this->date_livraison)) { + $this->delivery_date = $this->date_livraison; // For backward compatibility + } + + $text = ''; + + if ($this->statut == self::STATUS_ORDERSENT || $this->statut == self::STATUS_RECEIVED_PARTIALLY) { + if (!empty($this->delivery_date)) { + $text = $langs->trans("DeliveryDate").' '.dol_print_date($this->delivery_date, 'day'); + } else { + $text = $langs->trans("OrderDate").' '.dol_print_date($this->date_commande, 'day'); + } + } else { + $text = $langs->trans("OrderDate").' '.dol_print_date($this->date_commande, 'day'); + } + if ($text) { + $text .= ' '.($conf->commande->fournisseur->warning_delay > 0 ? '+' : '-').' '.round(abs($conf->commande->fournisseur->warning_delay) / 3600 / 24, 1).' '.$langs->trans("days").' < '.$langs->trans("Today"); } - $text .= ' '.($conf->commande->fournisseur->warning_delay > 0 ? '+' : '-').' '.round(abs($conf->commande->fournisseur->warning_delay) / 3600 / 24, 1).' '.$langs->trans("days").' < '.$langs->trans("Today"); return $text; } @@ -3109,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(); @@ -3123,13 +3243,12 @@ class CommandeFournisseur extends CommonOrder } $ret = $supplierorderdispatch->fetchAll('', '', 0, 0, $filter); - if ($ret < 0) - { + if ($ret < 0) { $this->error = $supplierorderdispatch->error; $this->errors = $supplierorderdispatch->errors; return $ret; } else { - if (is_array($supplierorderdispatch->lines) && count($supplierorderdispatch->lines) > 0) - { + if (is_array($supplierorderdispatch->lines) && count($supplierorderdispatch->lines) > 0) { + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $date_liv = dol_now(); // Build array with quantity deliverd by product @@ -3137,23 +3256,27 @@ class CommandeFournisseur extends CommonOrder $qtydelivered[$line->fk_product] += $line->qty; } 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; + } $qtywished[$line->fk_product] += $line->qty; } + //Compare array $diff_array = array_diff_assoc($qtydelivered, $qtywished); // Warning: $diff_array is done only on common keys. $keysinwishednotindelivered = array_diff(array_keys($qtywished), array_keys($qtydelivered)); // To check we also have same number of keys $keysindeliverednotinwished = array_diff(array_keys($qtydelivered), array_keys($qtywished)); // To check we also have same number of keys /*var_dump(array_keys($qtydelivered)); - var_dump(array_keys($qtywished)); - var_dump($diff_array); - var_dump($keysinwishednotindelivered); - var_dump($keysindeliverednotinwished); - exit;*/ - if (count($diff_array) == 0 && count($keysinwishednotindelivered) == 0 && count($keysindeliverednotinwished) == 0) //No diff => mean everythings is received - { - if ($closeopenorder) - { + var_dump(array_keys($qtywished)); + var_dump($diff_array); + var_dump($keysinwishednotindelivered); + var_dump($keysindeliverednotinwished); + exit;*/ + + if (count($diff_array) == 0 && count($keysinwishednotindelivered) == 0 && count($keysindeliverednotinwished) == 0) { //No diff => mean everythings is received + if ($closeopenorder) { //$ret=$this->setStatus($user,5); $ret = $this->Livraison($user, $date_liv, 'tot', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can' if ($ret < 0) { @@ -3174,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++; } } @@ -3243,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++; @@ -3362,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; @@ -3406,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; } @@ -3451,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(); @@ -3491,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)."',"; @@ -3519,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 } @@ -3546,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); } @@ -3610,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 { @@ -3665,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 40ffb9024c5..4a19e4bdc81 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 @@ -176,8 +195,11 @@ class FactureFournisseur extends CommonInvoice public $note_private; public $note_public; public $propalid; + public $cond_reglement_id; public $cond_reglement_code; + public $cond_reglement_label; + public $cond_reglement_doc; /** * @var int ID @@ -304,7 +326,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; @@ -312,7 +334,7 @@ class FactureFournisseur extends CommonInvoice /** * Classified abandoned and no payment done. * $this->close_code can be: - * - CLOSECODE_BADDEBT + * - CLOSECODE_BADCREDIT * - CLOSECODE_ABANDONED * - CLOSECODE_REPLACED */ @@ -347,9 +369,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; @@ -357,10 +385,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; @@ -368,7 +398,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"; @@ -420,35 +452,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++; } @@ -457,8 +484,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++; } @@ -466,17 +492,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( @@ -508,20 +531,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( @@ -536,7 +559,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(); @@ -547,28 +570,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 { @@ -581,8 +601,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; @@ -641,8 +660,8 @@ class FactureFournisseur extends CommonInvoice $sql .= " t.model_pdf,"; $sql .= " t.import_key,"; $sql .= " t.extraparams,"; - $sql .= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle,"; - $sql .= " p.code as mode_reglement_code, p.libelle as mode_reglement_libelle,"; + $sql .= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_label, cr.libelle_facture as cond_reglement_doc,"; + $sql .= " p.code as mode_reglement_code, p.libelle as mode_reglement_label,"; $sql .= ' s.nom as socnom, s.rowid as socid,'; $sql .= ' t.fk_incoterms, t.location_incoterms,'; $sql .= " i.libelle as label_incoterms,"; @@ -652,15 +671,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=".$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; @@ -697,12 +718,13 @@ class FactureFournisseur extends CommonInvoice $this->fk_project = $obj->fk_project; $this->cond_reglement_id = $obj->fk_cond_reglement; $this->cond_reglement_code = $obj->cond_reglement_code; - $this->cond_reglement = $obj->cond_reglement_libelle; - $this->cond_reglement_doc = $obj->cond_reglement_libelle; + $this->cond_reglement = $obj->cond_reglement_label; // deprecated + $this->cond_reglement_label = $obj->cond_reglement_label; + $this->cond_reglement_doc = $obj->cond_reglement_doc; $this->fk_account = $obj->fk_account; $this->mode_reglement_id = $obj->fk_mode_reglement; $this->mode_reglement_code = $obj->mode_reglement_code; - $this->mode_reglement = $obj->mode_reglement_libelle; + $this->mode_reglement = $obj->mode_reglement_label; $this->date_echeance = $this->db->jdate($obj->date_lim_reglement); $this->note = $obj->note_private; // deprecated $this->note_private = $obj->note_private; @@ -733,11 +755,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; } @@ -779,14 +802,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); @@ -873,37 +893,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 @@ -918,7 +996,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").","; @@ -942,7 +1022,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(); @@ -959,31 +1039,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); } @@ -1015,10 +1091,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; @@ -1039,8 +1113,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; @@ -1060,15 +1133,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; @@ -1113,12 +1183,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; } @@ -1128,7 +1196,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); @@ -1143,7 +1211,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)) { @@ -1152,18 +1220,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) { @@ -1174,47 +1240,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, 'invoive_supplier').$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++; } @@ -1223,18 +1285,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; @@ -1248,8 +1307,10 @@ class FactureFournisseur extends CommonInvoice // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Tag invoice as a payed invoice + * 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. @@ -1258,41 +1319,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, @@ -1301,34 +1409,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 { @@ -1337,6 +1446,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 * @@ -1362,19 +1529,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; @@ -1383,11 +1547,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; @@ -1395,76 +1557,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; @@ -1477,15 +1640,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 { @@ -1513,8 +1674,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; } @@ -1528,42 +1688,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 { @@ -1617,17 +1775,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); @@ -1646,15 +1819,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; @@ -1662,16 +1832,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(); @@ -1680,16 +1851,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); @@ -1714,8 +1883,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. } @@ -1740,10 +1908,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; } @@ -1765,8 +1934,8 @@ class FactureFournisseur extends CommonInvoice $this->line->tva_tx = $txtva; $this->line->localtax1_tx = ($total_localtax1 ? $localtaxes_type[1] : 0); $this->line->localtax2_tx = ($total_localtax2 ? $localtaxes_type[3] : 0); - $this->line->localtax1_type = $localtaxes_type[0]; - $this->line->localtax2_type = $localtaxes_type[2]; + $this->line->localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0]; + $this->line->localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2]; $this->line->total_ht = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_ht) : $total_ht); // For credit note and if qty is negative, total is negative $this->line->total_tva = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_tva) : $total_tva); @@ -1802,15 +1971,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 { @@ -1867,7 +2036,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"); @@ -1876,9 +2047,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); @@ -1894,8 +2071,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. } @@ -1916,10 +2092,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; @@ -1952,8 +2129,8 @@ class FactureFournisseur extends CommonInvoice $line->tva_tx = $vatrate; $line->localtax1_tx = $txlocaltax1; $line->localtax2_tx = $txlocaltax2; - $line->localtax1_type = $localtaxes_type[0]; - $line->localtax2_type = $localtaxes_type[2]; + $line->localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0]; + $line->localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2]; $line->total_ht = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_ht) : $total_ht); $line->total_tva = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_tva) : $total_tva); $line->total_localtax1 = $total_localtax1; @@ -2007,12 +2184,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; @@ -2033,8 +2209,7 @@ class FactureFournisseur extends CommonInvoice } else { $res = $this->update_price(); - if ($res > 0) - { + if ($res > 0) { $this->db->commit(); return 1; } else { @@ -2057,29 +2232,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; @@ -2120,15 +2290,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, @@ -2168,20 +2338,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); } @@ -2208,16 +2381,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(); @@ -2231,8 +2409,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); @@ -2272,56 +2449,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 (!empty($this->ref)) + 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)) { $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).'"'; } @@ -2334,15 +2543,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).'">'; @@ -2371,7 +2582,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; @@ -2397,8 +2610,7 @@ class FactureFournisseur extends CommonInvoice $numref = ""; $numref = $obj->getNumRef($soc, $this, $mode); - if ($numref != "") - { + if ($numref != "") { return $numref; } else { $this->error = $obj->error; @@ -2432,12 +2644,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]; @@ -2461,13 +2671,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; @@ -2477,8 +2685,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; @@ -2490,8 +2697,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]; } @@ -2531,8 +2737,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"; @@ -2540,10 +2745,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); @@ -2592,12 +2795,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]); } } @@ -2607,22 +2812,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 { @@ -2650,18 +2852,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/"; @@ -2729,7 +2928,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; @@ -2988,7 +3189,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); @@ -3061,7 +3262,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; @@ -3076,11 +3277,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); } @@ -3098,8 +3297,7 @@ class SupplierInvoiceLine extends CommonObjectLine } } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -3122,22 +3320,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; @@ -3194,17 +3401,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 @@ -3240,41 +3444,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; } @@ -3330,26 +3571,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; } @@ -3388,8 +3624,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 927e7e33b09..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,30 +264,43 @@ 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)); } // Multicurrency - $multicurrency_buyprice = null; $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 (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)); } @@ -312,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']; @@ -324,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) { @@ -362,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').","; @@ -384,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 { @@ -427,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').","; @@ -462,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; @@ -486,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)) { @@ -535,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; @@ -581,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 = ""; @@ -620,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; @@ -632,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); @@ -686,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)) { @@ -703,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 = ""; @@ -738,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; } @@ -774,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"]; @@ -812,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 @@ -871,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 { @@ -939,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; } @@ -985,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; @@ -1041,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']).')'; @@ -1071,15 +1089,93 @@ 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 = ''; - $label = '<u>'.$langs->trans("SupplierRef").'</u>'; - $label .= '<br>'; - $label .= '<b>'.$langs->trans('Product').':</b> '.$this->product_ref; + if (!empty($this->entity)) { + $tmpphoto = $this->show_photos('product', $conf->product->multidir_output[$this->entity], 1, 1, 0, 0, 0, 80); + if ($this->nbphoto > 0) { + $label .= '<div class="photointooltip">'; + $label .= $tmpphoto; + $label .= '</div><div style="clear: both;"></div>'; + } + } + + if ($this->type == Product::TYPE_PRODUCT) { + $label .= img_picto('', 'product').' <u class="paddingrightonly">'.$langs->trans("Product").'</u>'; + } elseif ($this->type == Product::TYPE_SERVICE) { + $label .= img_picto('', 'service').' <u class="paddingrightonly">'.$langs->trans("Service").'</u>'; + } + if (isset($this->status) && isset($this->status_buy)) { + $label .= ' '.$this->getLibStatut(5, 0); + $label .= ' '.$this->getLibStatut(5, 1); + } + + if (!empty($this->ref)) { + $label .= '<br><b>'.$langs->trans('ProductRef').':</b> '.($this->ref ? $this->ref : $this->product_ref); + } + if (!empty($this->label)) { + $label .= '<br><b>'.$langs->trans('ProductLabel').':</b> '.$this->label; + } $label .= '<br><b>'.$langs->trans('RefSupplier').':</b> '.$this->ref_supplier; + if ($this->type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { + if (!empty($conf->productbatch->enabled)) { + $langs->load("productbatch"); + $label .= "<br><b>".$langs->trans("ManageLotSerial").'</b>: '.$this->getLibStatut(0, 2); + } + } + if (!empty($conf->barcode->enabled)) { + $label .= '<br><b>'.$langs->trans('BarCode').':</b> '.$this->barcode; + } + + if ($this->type == Product::TYPE_PRODUCT) { + if ($this->weight) { + $label .= "<br><b>".$langs->trans("Weight").'</b>: '.$this->weight.' '.measuringUnitString(0, "weight", $this->weight_units); + } + $labelsize = ""; + if ($this->length) { + $labelsize .= ($labelsize ? " - " : "")."<b>".$langs->trans("Length").'</b>: '.$this->length.' '.measuringUnitString(0, 'size', $this->length_units); + } + if ($this->width) { + $labelsize .= ($labelsize ? " - " : "")."<b>".$langs->trans("Width").'</b>: '.$this->width.' '.measuringUnitString(0, 'size', $this->width_units); + } + if ($this->height) { + $labelsize .= ($labelsize ? " - " : "")."<b>".$langs->trans("Height").'</b>: '.$this->height.' '.measuringUnitString(0, 'size', $this->height_units); + } + if ($labelsize) { + $label .= "<br>".$labelsize; + } + + $labelsurfacevolume = ""; + if ($this->surface) { + $labelsurfacevolume .= ($labelsurfacevolume ? " - " : "")."<b>".$langs->trans("Surface").'</b>: '.$this->surface.' '.measuringUnitString(0, 'surface', $this->surface_units); + } + if ($this->volume) { + $labelsurfacevolume .= ($labelsurfacevolume ? " - " : "")."<b>".$langs->trans("Volume").'</b>: '.$this->volume.' '.measuringUnitString(0, 'volume', $this->volume_units); + } + if ($labelsurfacevolume) { + $label .= "<br>".$labelsurfacevolume; + } + } + + if (!empty($conf->accounting->enabled) && $this->status) { + include_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; + $label .= '<br><b>'.$langs->trans('ProductAccountancySellCode').':</b> '.length_accountg($this->accountancy_code_sell); + $label .= '<br><b>'.$langs->trans('ProductAccountancySellIntraCode').':</b> '.length_accountg($this->accountancy_code_sell_intra); + $label .= '<br><b>'.$langs->trans('ProductAccountancySellExportCode').':</b> '.length_accountg($this->accountancy_code_sell_export); + } + if (!empty($conf->accounting->enabled) && $this->status_buy) { + include_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; + $label .= '<br><b>'.$langs->trans('ProductAccountancyBuyCode').':</b> '.length_accountg($this->accountancy_code_buy); + $label .= '<br><b>'.$langs->trans('ProductAccountancyBuyIntraCode').':</b> '.length_accountg($this->accountancy_code_buy_intra); + $label .= '<br><b>'.$langs->trans('ProductAccountancyBuyExportCode').':</b> '.length_accountg($this->accountancy_code_buy_export); + } + $logPrices = $this->listProductFournisseurPriceLog($this->product_fourn_price_id, 'pfpl.datec', 'DESC'); // set sort order here if (is_array($logPrices) && count($logPrices) > 0) { $label .= '<br><br>'; @@ -1089,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 56d4af045f4..9f17f522bdd 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -83,7 +83,7 @@ class PaiementFourn extends Paiement * Load payment object * * @param int $id Id if payment to get - * @param string $ref Ref of payment to get (currently ref = id but this may change in future) + * @param string $ref Ref of payment to get * @param int $fk_bank Id of bank line associated to payment * @return int <0 if KO, -2 if not found, >0 if OK */ @@ -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.rowid = '.$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 payed invoices - if ($closepaidinvoices) - { + // If we want to closed paid invoices + 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 987b80aa3ea..8358b71f2c7 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) { - $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx'))); + } 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'); @@ -356,24 +373,23 @@ if (empty($reshook)) // Set if we used free entry or predefined product $predef = ''; - $product_desc = (GETPOST('dp_desc') ?GETPOST('dp_desc') : ''); + $product_desc = (GETPOSTISSET('dp_desc') ? GETPOST('dp_desc', 'restricthtml') : ''); $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 = GETPOST('price_ht'); + $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); } else { $idprod = GETPOST('idprod', 'int'); - $price_ht = GETPOST('price_ht'); + $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); $tva_tx = ''; } - $qty = GETPOST('qty'.$predef); - $remise_percent = GETPOST('remise_percent'.$predef); - $price_ht_devise = GETPOST('multicurrency_price_ht'); + $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS'); + $remise_percent = price2num(GETPOST('remise_percent'.$predef), 2); + $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); // Extrafields $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); @@ -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') : ''); @@ -564,14 +584,15 @@ if (empty($reshook)) $fk_unit = GETPOST('units', 'alpha'); - $tva_tx = price2num($tva_tx); // When vat is text input field + if (!preg_match('/\((.*)\)/', $tva_tx)) { + $tva_tx = price2num($tva_tx); // When vat is text input field + } // Local Taxes $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'); @@ -584,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); @@ -605,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']); @@ -650,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); @@ -684,24 +709,22 @@ 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')); + $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]; } - $ttc = price2num(GETPOST('price_ttc')); + $ttc = price2num(GETPOST('price_ttc'), '', 2); $ht = $ttc / (1 + ($vatratecleaned / 100)); $price_base_type = 'HT'; } - $pu_ht_devise = GETPOST('multicurrency_subprice'); + $pu_ht_devise = price2num(GETPOST('multicurrency_subprice'), '', 2); // Extrafields Lines $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); @@ -715,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') ); @@ -761,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); @@ -778,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(); @@ -791,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); @@ -831,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); @@ -865,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 } @@ -877,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); @@ -934,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 { @@ -956,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); @@ -992,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 { @@ -1005,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 { @@ -1030,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 { @@ -1064,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 { @@ -1091,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'); @@ -1149,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 { @@ -1188,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; } @@ -1212,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); @@ -1227,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; } @@ -1251,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); @@ -1301,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++; @@ -1312,17 +1311,15 @@ 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'; @@ -1335,8 +1332,7 @@ if (empty($reshook)) } } - 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'); @@ -1374,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, @@ -1411,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'); @@ -1423,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 { @@ -1480,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(); @@ -1496,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(); @@ -1512,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 { @@ -1530,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 @@ -1554,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)); @@ -1569,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().'">'; @@ -1586,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(''); @@ -1599,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 $form->select_company((empty($socid) ? '' : $socid), 'socid', 's.fournisseur=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300'); + 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() { @@ -1622,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>'; @@ -1657,34 +1643,34 @@ 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"'); $form->select_comptes($fk_account, 'fk_account', 0, '', 1); print '</td></tr>'; } // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); $langs->load('projects'); print '<tr><td>'.$langs->trans('Project').'</td><td>'; - $formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500'); + print img_picto('', 'project').$formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); 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='.$societe->id).'"><span class="fa fa-plus-circle valignmiddle" title="'.$langs->trans("AddProject").'"></span></a>'; print '</td></tr>'; } // 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>'; @@ -1695,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">'; @@ -1706,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>'; @@ -1714,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>'; @@ -1733,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>'; @@ -1758,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'); } @@ -1777,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); @@ -1794,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); @@ -1811,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)')) @@ -1828,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>'; @@ -1857,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), @@ -1883,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>'; @@ -1895,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; @@ -1952,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 @@ -1960,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.'">'; @@ -1998,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)) { @@ -2007,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>'; } } @@ -2047,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'); @@ -2065,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'); @@ -2077,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') { @@ -2097,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') { @@ -2127,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') { @@ -2146,27 +2124,38 @@ if ($action == 'create') print '</tr>'; } + // Delivery delay (in days) + print '<tr>'; + print '<td>'.$langs->trans('NbDaysToDelivery').'&nbsp;'.img_picto($langs->trans('DescNbDaysToDelivery'), 'info', 'style="cursor:help"').'</td>'; + print '<td>'.$object->getMaxDeliveryTimeDay($langs).'</td>'; + print '</tr>'; + // Delivery date planed print '<tr><td>'; 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"); @@ -2174,26 +2163,21 @@ if ($action == 'create') } print '</td></tr>'; - // Delivery delay (in days) - print '<tr>'; - print '<td>'.$langs->trans('NbDaysToDelivery').'&nbsp;'.img_picto($langs->trans('DescNbDaysToDelivery'), 'info', 'style="cursor:help"').'</td>'; - print '<td>'.$object->getMaxDeliveryTimeDay($langs).'</td>'; - print '</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); @@ -2213,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>'; @@ -2245,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>'; @@ -2266,7 +2247,7 @@ if ($action == 'create') // Margin Infos /*if (! empty($conf->margin->enabled)) { - $formmargin->displayMarginInfos($object); + $formmargin->displayMarginInfos($object); }*/ @@ -2276,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'; @@ -2315,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); @@ -2345,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; @@ -2376,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>'; @@ -2401,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>'; @@ -2420,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>'; @@ -2432,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>'; @@ -2487,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>'; @@ -2498,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>'; } } @@ -2509,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 { @@ -2538,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>'; } } @@ -2569,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">'; @@ -2582,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>'; @@ -2603,8 +2548,7 @@ if ($action == 'create') print "<br>"; } - if ($action != 'makeorder') - { + if ($action != 'makeorder') { print '<div class="fichecenter"><div class="fichehalfleft">'; // Generated documents @@ -2625,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">'; @@ -2673,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; @@ -2703,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">'; @@ -2712,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 { @@ -2736,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; @@ -2752,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 { @@ -2779,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; @@ -2788,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'); @@ -2810,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); @@ -2831,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 { @@ -2853,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 d739f70e76e..c27a33f522b 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com> * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2010-2019 Juanjo Menent <jmenent@2byte.es> + * Copyright (C) 2010-2021 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2014 Cedric Gross <c.gross@kreiz-it.fr> * Copyright (C) 2016 Florian Henry <florian.henry@atm-consulting.fr> * Copyright (C) 2017-2020 Ferran Marcet <fmarcet@2byte.es> @@ -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,11 +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 - if (preg_match('/^product_([0-9]+)_([0-9]+)$/i', $key, $reg)) - { + $reg = array(); + if (preg_match('/^product_([0-9]+)_([0-9]+)$/i', $key, $reg)) { $pos++; // $numline=$reg[2] + 1; // line of product @@ -237,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]; @@ -269,16 +261,20 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) if (!$error && !empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) { if (empty($conf->multicurrency->enabled) && empty($conf->dynamicprices->enabled)) { - $dto = GETPOST("dto_".$reg[1].'_'.$reg[2], 'int'); + $dto = price2num(GETPOST("dto_".$reg[1].'_'.$reg[2], 'int'), ''); + if (empty($dto)) { + $dto = 0; + } + //update supplier price if (GETPOSTISSET($saveprice)) { // TODO Use class $sql = "UPDATE ".MAIN_DB_PREFIX."product_fournisseur_price"; - $sql .= " SET unitprice='".GETPOST($pu)."'"; - $sql .= ", price=".GETPOST($pu)."*quantity"; - $sql .= ", remise_percent='".(!empty($dto) ? $dto : 0)."'"; - $sql .= " WHERE fk_soc=".$object->socid; - $sql .= " AND fk_product=".GETPOST($prod, 'int'); + $sql .= " SET unitprice='".price2num(GETPOST($pu), 'MU')."'"; + $sql .= ", price=".price2num(GETPOST($pu), 'MU')."*quantity"; + $sql .= ", remise_percent = ".((float) $dto); + $sql .= " WHERE fk_soc=".((int) $object->socid); + $sql .= " AND fk_product=".((int) GETPOST($prod, 'int')); $resql = $db->query($sql); } @@ -288,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 @@ -393,104 +388,86 @@ 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; $price = GETPOST('price'); $comment = $supplierorderdispatch->comment; - $eatby = $supplierorderdispatch->fk_product; + $eatby = $supplierorderdispatch->eatby; $sellby = $supplierorderdispatch->sellby; $batch = $supplierorderdispatch->batch; $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; - $price = GETPOST('price'); + $price = price2num(GETPOST('price'), '', 2); $comment = $supplierorderdispatch->comment; $eatby = $supplierorderdispatch->fk_product; $sellby = $supplierorderdispatch->sellby; $batch = $supplierorderdispatch->batch; - $supplierorderdispatch->qty = GETPOST('qty', 'int'); + $supplierorderdispatch->qty = price2num(GETPOST('qty', 'alpha'), 'MS', 2); $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++; } @@ -498,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(); } } @@ -520,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); @@ -537,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); } @@ -546,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; @@ -563,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 .= ' : '; @@ -636,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) { @@ -646,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(); @@ -655,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">'; @@ -699,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(); @@ -716,10 +702,12 @@ 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, l.rowid, l.fk_product, l.subprice, l.remise_percent, p.fk_default_warehouse"; // Calculation of amount dispatched is done per fk_product so we must group by fk_product + $sql .= " 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 $sql .= " ORDER BY p.ref, p.label"; $resql = $db->query($sql); @@ -778,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"; @@ -796,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++; @@ -851,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>'; @@ -863,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 @@ -885,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>'; @@ -896,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').'">'; @@ -920,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; @@ -946,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>'; @@ -957,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').'">'; @@ -973,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 { @@ -1023,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"; @@ -1039,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>'; @@ -1062,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>'; @@ -1072,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>'; @@ -1106,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"; @@ -1130,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>'; @@ -1162,8 +1165,7 @@ if ($id > 0 || !empty($ref)) { while ($i < $num) { $objp = $db->fetch_object($resql); - if ($action == 'editline' && $lineid == $objp->dispatchlineid) - { + if ($action == 'editline' && $lineid == $objp->dispatchlineid) { print '<form name="editdispatchedlines" id="editdispatchedlines" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'#line_'.GETPOST('lineid').'" method="POST"> <input type="hidden" name="token" value="'.newToken().'"> <input type="hidden" name="action" value="updateline"> @@ -1212,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.'" />'; @@ -1224,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) { @@ -1234,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); @@ -1255,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>'; @@ -1266,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>'; @@ -1290,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(); @@ -1303,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>'; @@ -1315,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 d5a4455db06..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,10 +176,10 @@ 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_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { header('Location: index.php'); exit; 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 12d3352205b..1515429199a 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -43,7 +43,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; -$langs->loadLangs(array("orders", "sendings", 'deliveries', 'companies', 'compta', 'bills', 'projects', 'suppliers')); +$langs->loadLangs(array("orders", "sendings", 'deliveries', 'companies', 'compta', 'bills', 'projects', 'suppliers', 'products')); $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); @@ -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,44 +148,40 @@ $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( - 'cf.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1), - 'cf.ref_supplier'=>array('label'=>$langs->trans("RefOrderSupplierShort"), 'checked'=>1, 'enabled'=>1), - 'p.project_ref'=>array('label'=>$langs->trans("ProjectRef"), 'checked'=>0, 'enabled'=>1), - 'u.login'=>array('label'=>$langs->trans("AuthorRequest"), 'checked'=>1), - 's.nom'=>array('label'=>$langs->trans("ThirdParty"), '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), - 'typent.code'=>array('label'=>$langs->trans("ThirdPartyType"), 'checked'=>$checkedtypetiers), - 'cf.date_commande'=>array('label'=>$langs->trans("OrderDateShort"), 'checked'=>1), - 'cf.date_delivery'=>array('label'=>$langs->trans("DateDeliveryPlanned"), 'checked'=>1, 'enabled'=>empty($conf->global->ORDER_DISABLE_DELIVERY_DATE)), - 'cf.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1), - 'cf.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0), - 'cf.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>0), + 'cf.ref'=>array('label'=>"Ref", 'checked'=>1), + 'cf.ref_supplier'=>array('label'=>"RefOrderSupplierShort", 'checked'=>1, 'enabled'=>1), + 'p.project_ref'=>array('label'=>"ProjectRef", 'checked'=>0, 'enabled'=>1), + 'u.login'=>array('label'=>"AuthorRequest", 'checked'=>1), + 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1), + 's.town'=>array('label'=>"Town", 'checked'=>1), + 's.zip'=>array('label'=>"Zip", 'checked'=>1), + 'state.nom'=>array('label'=>"StateShort", 'checked'=>0), + 'country.code_iso'=>array('label'=>"Country", 'checked'=>0), + 'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers), + '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_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'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), - 'cf.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), - 'cf.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), - 'cf.billed'=>array('label'=>$langs->trans("Billed"), 'checked'=>1, 'position'=>1000, 'enabled'=>1) + 'cf.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), + 'cf.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500), + 'cf.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), + 'cf.billed'=>array('label'=>"Billed", 'checked'=>1, 'position'=>1000, 'enabled'=>1) ); // 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])) - $arrayfields["ef.".$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($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key])); - } -} +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'); @@ -186,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 = ''; @@ -216,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; @@ -237,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 } @@ -250,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'); @@ -261,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(); } @@ -291,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"; @@ -308,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; } @@ -325,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; @@ -340,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 { @@ -354,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( @@ -392,8 +414,7 @@ if (empty($reshook)) $lines[$i]->special_code, $fk_parent_line ); - if ($result > 0) - { + if ($result > 0) { $lineid = $result; } else { $lineid = 0; @@ -401,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; } } @@ -412,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 @@ -423,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; @@ -438,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; @@ -505,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; @@ -520,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) $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_delivery,"; -$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(); @@ -550,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"; } @@ -567,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 @@ -611,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; } @@ -626,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); @@ -643,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'; @@ -681,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">'; @@ -713,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">'; @@ -753,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>'; @@ -819,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_delivery']['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).'">'; @@ -952,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>'; @@ -987,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_delivery']['checked'])) print_liste_field_titre($arrayfields['cf.date_delivery']['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"; @@ -1032,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; @@ -1049,7 +1288,7 @@ if ($resql) $objectstatic->total_tva = $obj->total_tva; $objectstatic->total_ttc = $obj->total_ttc; $objectstatic->date_commande = $db->jdate($obj->date_commande); - $objectstatic->date_delivery = $db->jdate($obj->date_delivery); + $objectstatic->delivery_date = $db->jdate($obj->date_livraison); $objectstatic->note_public = $obj->note_public; $objectstatic->note_private = $obj->note_private; $objectstatic->statut = $obj->fk_statut; @@ -1057,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 @@ -1069,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; @@ -1095,144 +1339,175 @@ 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->hasDelay() && !empty($objectstatic->date_delivery)) { - print ' '.img_picto($langs->trans("Late").' : '.$objectstatic->showDelay(), "warning"); + if ($objectstatic->statut != $objectstatic::STATUS_ORDERSENT && $objectstatic->statut != $objectstatic::STATUS_RECEIVED_PARTIALLY) { + if ($objectstatic->hasDelay()) { + print ' '.img_picto($langs->trans("Late").' : '.$objectstatic->showDelay(), "warning"); + } } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } // Plannned date of delivery - if (!empty($arrayfields['cf.date_delivery']['checked'])) - { + if (!empty($arrayfields['cf.date_livraison']['checked'])) { print '<td class="center">'; - print dol_print_date($db->jdate($obj->date_delivery), 'day'); - if ($objectstatic->hasDelay() && !empty($objectstatic->date_delivery)) { - print ' '.img_picto($langs->trans("Late").' : '.$objectstatic->showDelay(), "warning"); + print dol_print_date($db->jdate($obj->date_livraison), 'day'); + if ($objectstatic->statut == $objectstatic::STATUS_ORDERSENT || $objectstatic->statut == $objectstatic::STATUS_RECEIVED_PARTIALLY) { + if ($objectstatic->hasDelay()) { + print ' '.img_picto($langs->trans("Late").' : '.$objectstatic->showDelay(), "warning"); + } } 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 @@ -1242,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"; @@ -1303,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 b439e5cad45..578c9c7e062 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,41 @@ $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; /* @@ -122,14 +134,13 @@ $permissiontoadd = $usercancreate; // Used by the include of actions_addupdatede $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; } @@ -143,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 { @@ -168,46 +178,44 @@ 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); } // 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 = ''; } } - if (!$error) - { + if (!$error) { $result = $object->validate($user, '', $idwarehouse); - if ($result < 0) - { + if ($result < 0) { 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); @@ -216,36 +224,31 @@ 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') - { + } elseif ($action == 'confirm_delete' && $confirm == 'yes') { $object->fetch($id); $object->fetch_thirdparty(); $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 = ''; @@ -269,26 +272,47 @@ 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); - if ($result < 0) - { + $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 - if ($action == 'setref_supplier' && $usercancreate) - { + if ($action == 'setref_supplier' && $usercancreate) { $object->ref_supplier = GETPOST('ref_supplier', 'alpha'); if ($object->update($user) < 0) { @@ -315,8 +339,7 @@ if (empty($reshook)) } // payments conditions - if ($action == 'setconditions' && $usercancreate) - { + if ($action == 'setconditions' && $usercancreate) { $object->fetch($id); $object->cond_reglement_code = 0; // To clean property $object->cond_reglement_id = 0; // To clean property @@ -336,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++; @@ -350,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) { - $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx', 'alpha'))); - } - - // bank account - elseif ($action == 'setbankaccount' && $usercancreate) { + } elseif ($action == 'setmulticurrencyrate' && $usercancreate) { + // Multicurrency rate + $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx', 'alpha')), GETPOST('calculation_mode', 'int')); + } 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'); } @@ -442,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'); @@ -466,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); @@ -479,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 @@ -494,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 payed (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(); @@ -505,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++; } } @@ -525,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'); } } } @@ -532,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 @@ -547,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 @@ -560,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; @@ -576,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'); @@ -626,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) { @@ -645,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(); @@ -658,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')); - $datedue = dol_mktime(12, 0, 0, $_POST['echmonth'], $_POST['echday'], $_POST['echyear']); + $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 ($_POST['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'); @@ -687,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'); @@ -714,37 +747,37 @@ if (empty($reshook)) } // Credit note invoice - if ($_POST['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 @@ -753,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'); @@ -777,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; @@ -816,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(); @@ -832,62 +860,66 @@ if (empty($reshook)) } } - // Standard or deposit - if ($_POST['type'] == FactureFournisseur::TYPE_STANDARD || $_POST['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 = $_POST['ref']; - $object->ref_supplier = $_POST['ref_supplier']; - $object->socid = $_POST['socid']; - $object->libelle = $_POST['label']; - $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 && $_POST['origin'] && $_POST['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)) @@ -909,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'); @@ -919,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; } } @@ -946,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); @@ -977,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 { @@ -1022,8 +1173,7 @@ if (empty($reshook)) $lines[$i]->special_code ); - if ($result < 0) - { + if ($result < 0) { $error++; break; } @@ -1037,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(); @@ -1062,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; } @@ -1072,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); @@ -1084,22 +1227,18 @@ if (empty($reshook)) $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); - if (GETPOST('price_ht') != '') - { - $up = price2num(GETPOST('price_ht')); + if (GETPOST('price_ht') != '' || GETPOST('multicurrency_subprice') != '') { + $up = price2num(GETPOST('price_ht'), '', 2); $price_base_type = 'HT'; } else { - $up = price2num(GETPOST('price_ttc')); + $up = price2num(GETPOST('price_ttc'), '', 2); $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'); } } @@ -1107,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')); @@ -1120,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); @@ -1141,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']); @@ -1168,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; } @@ -1180,25 +1320,24 @@ if (empty($reshook)) // Set if we used free entry or predefined product $predef = ''; - $product_desc = (GETPOST('dp_desc') ?GETPOST('dp_desc') : ''); + $product_desc = (GETPOSTISSET('dp_desc') ? GETPOST('dp_desc', 'restricthtml') : ''); $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 = GETPOST('price_ht'); + $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); } else { $idprod = GETPOST('idprod', 'int'); - $price_ht = GETPOST('price_ht'); + $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); $tva_tx = ''; } - $qty = GETPOST('qty'.$predef); - $remise_percent = GETPOST('remise_percent'.$predef); - $price_ht_devise = GETPOST('multicurrency_price_ht'); + $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS'); + $remise_percent = price2num(GETPOST('remise_percent'.$predef), 2); + $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); // Extrafields $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); @@ -1211,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++; } @@ -1251,56 +1385,63 @@ 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 ($price_ht != '' || $price_ht_devise != '') { + if (GETPOST('price_ht') != '' || GETPOST('price_ht_devise') != '') { $price_base_type = 'HT'; $pu = price2num($price_ht, 'MU'); - $pu_ht_devise = price2num($price_ht_devise, 'MU'); + $pu_ht_devise = price2num($price_ht_devise, 'CU'); } else { $price_base_type = ($productsupplier->fourn_price_base_type ? $productsupplier->fourn_price_base_type : 'HT'); if (empty($object->multicurrency_code) || ($productsupplier->fourn_multicurrency_code != $object->multicurrency_code)) { // If object is in a different currency and price not in this currency @@ -1316,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, @@ -1347,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') : ''); @@ -1372,37 +1514,40 @@ if (empty($reshook)) $fk_unit = GETPOST('units', 'alpha'); - $tva_tx = price2num($tva_tx); // When vat is text input field + if (!preg_match('/\((.*)\)/', $tva_tx)) { + $tva_tx = price2num($tva_tx); // $txtva can have format '5,1' or '5.1' or '5.1(XXX)', we must clean only if '5,1' + } // Local Taxes $localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $object->thirdparty); $localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $object->thirdparty); - if ($price_ht !== '') - { + if (GETPOST('price_ht') != '' || GETPOST('price_ht_devise') != '') { $pu_ht = price2num($price_ht, 'MU'); // $pu_ht must be rounded according to settings } else { $pu_ttc = price2num(GETPOST('price_ttc'), 'MU'); $pu_ht = price2num($pu_ttc / (1 + ($tva_tx / 100)), 'MU'); // $pu_ht must be rounded according to settings } $price_base_type = 'HT'; - $pu_ht_devise = price2num($price_ht_devise, 'MU'); + $pu_ht_devise = price2num($price_ht_devise, 'CU'); $result = $object->addline($product_desc, $pu_ht, $tva_tx, $localtax1_tx, $localtax2_tx, $qty, 0, $remise_percent, $date_start, $date_end, 0, $tva_npr, $price_base_type, $type, -1, 0, $array_options, $fk_unit, 0, $pu_ht_devise, $ref_supplier); } //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); @@ -1411,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']); @@ -1455,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(); @@ -1469,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 = ''; @@ -1501,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); @@ -1515,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 { @@ -1557,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 { @@ -1660,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(); @@ -1669,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'); @@ -1680,20 +1803,19 @@ if ($action == 'create') $currency_code = $conf->currency; $societe = ''; - if (GETPOST('socid') > 0) - { + 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)) - { + if (!empty($origin) && !empty($originid)) { // Parse element/subelement (ex: project_task) $element = $subelement = $origin; - if ($element == 'project') - { + if ($element == 'project') { $projectid = $originid; $element = 'projet'; } @@ -1714,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(); @@ -1731,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')); @@ -1755,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 @@ -1774,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(); @@ -1790,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 $form->select_company($societe->id, 'socid', 's.fournisseur=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300'); + 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() { @@ -1816,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>'; @@ -1831,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) @@ -1930,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']; @@ -1955,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']).')'; @@ -1965,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"> @@ -1985,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>'; @@ -2011,7 +2167,7 @@ if ($action == 'create') print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">'; $tmp = '<input type="radio" name="type" id="radio_creditnote" value="0" disabled> '; $text = $tmp.$langs->trans("InvoiceAvoir").' '; - $text .= '('.$langs->trans("YouMustCreateInvoiceFromSupplierThird").') '; + $text .= '<span class="opacitymedium">('.$langs->trans("YouMustCreateInvoiceFromSupplierThird").')</span> '; $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3); print $desc; print '</div></div>'."\n"; @@ -2022,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>'; @@ -2059,37 +2214,24 @@ 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>'; - $form->select_comptes((GETPOSTISSET('fk_account') ?GETPOST('fk_account', 'alpha') : $fk_account), 'fk_account', 0, '', 1); - print '</td></tr>'; - } - - // Multicurrency - if (!empty($conf->multicurrency->enabled)) - { - print '<tr>'; - print '<td>'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>'; - print '<td class="maxwidthonsmartphone">'; - print $form->selectMultiCurrency((GETPOSTISSET('multicurrency_code') ?GETPOST('multicurrency_code', 'alpha') : $currency_code), 'multicurrency_code'); + 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'); print '<tr><td>'.$langs->trans('Project').'</td><td>'; - $formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500'); + print img_picto('', 'project').$formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); print '</td></tr>'; } // 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">'; @@ -2097,19 +2239,27 @@ if ($action == 'create') print '</td></tr>'; } + // Multicurrency + if (!empty($conf->multicurrency->enabled)) { + print '<tr>'; + print '<td>'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>'; + print '<td class="maxwidthonsmartphone">'; + print $form->selectMultiCurrency((GETPOSTISSET('multicurrency_code') ?GETPOST('multicurrency_code', 'alpha') : $currency_code), 'multicurrency_code'); + print '</td></tr>'; + } + // 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->selectModeTransport(isset($_POST['transport_mode_id']) ? $_POST['transport_mode_id'] : $transport_mode_id, 'transport_mode_id'); + $form->selectTransportMode(isset($_POST['transport_mode_id']) ? $_POST['transport_mode_id'] : $transport_mode_id, 'transport_mode_id'); print '</td></tr>'; } // 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>'; @@ -2118,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"; @@ -2151,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).')'; } @@ -2165,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>"; @@ -2204,8 +2347,7 @@ if ($action == 'create') // Show origin lines - if (is_object($objectsrc)) - { + if (is_object($objectsrc)) { print '<br>'; $title = $langs->trans('ProductsAndServices'); @@ -2218,13 +2360,10 @@ if ($action == 'create') print '</table>'; } } else { - if ($id > 0 || !empty($ref)) - { - /* *************************************************************************** */ - /* */ - /* Fiche en mode visu ou edition */ - /* */ - /* *************************************************************************** */ + if ($id > 0 || !empty($ref)) { + // + // View or edit mode + // $now = dol_now(); @@ -2232,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(); @@ -2250,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; @@ -2270,28 +2412,31 @@ if ($action == 'create') $absolute_creditnote = price2num($absolute_creditnote, 'MT'); /* - * View card - */ + * View card + */ $head = facturefourn_prepare_head($object); $titre = $langs->trans('SupplierInvoice'); - print dol_get_fiche_head($head, 'card', $titre, -1, 'bill'); + print dol_get_fiche_head($head, 'card', $titre, -1, 'supplier_invoice'); $formconfirm = ''; // 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), @@ -2302,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 @@ -2333,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); @@ -2357,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); @@ -2390,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 @@ -2433,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> : '; } @@ -2484,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)).')'; @@ -2522,7 +2716,12 @@ if ($action == 'create') $discount = new DiscountAbsolute($db); $result = $discount->fetch(0, 0, $object->id); if ($result > 0) { - print ' '.$langs->trans("CreditNoteConvertedIntoDiscount", $object->getLibType(1), $discount->getNomUrl(1, 'discount')).'<br>'; + print ' <span class="opacitymediumbycolor paddingleft">'; + $s = $langs->trans("CreditNoteConvertedIntoDiscount", '{s1}', '{s2}'); + $s = str_replace('{s1}', $object->getLibType(1), $s); + $s = str_replace('{s2}', $discount->getNomUrl(1, 'discount'), $s); + print $s; + print '</span><br>'; } } print '</td></tr>'; @@ -2563,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'); @@ -2591,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'); @@ -2600,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') { @@ -2620,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') { @@ -2649,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') { @@ -2669,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); @@ -2696,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>'; @@ -2726,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>'; @@ -2747,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").' '; @@ -2763,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>'; @@ -2780,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,'; @@ -2811,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; @@ -2822,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; @@ -2847,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; @@ -2863,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>'; @@ -2884,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); @@ -2901,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>'; @@ -2935,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>'; @@ -2946,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); @@ -2989,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>'; @@ -3009,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>'; @@ -3031,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>'; @@ -3054,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'); @@ -3071,8 +3291,8 @@ if ($action == 'create') /* - * Lines - */ + * Lines + */ print '<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#addline' : '#line_'.GETPOST('lineid')).'" method="POST">'; print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="action" value="'.(($action != 'editline') ? 'addline' : 'updateline').'">'; @@ -3091,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); @@ -3119,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>'; } } } @@ -3245,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 99010c977dc..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,19 +114,17 @@ $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(); $head = facturefourn_prepare_head($object); - print dol_get_fiche_head($head, 'contact', $langs->trans('SupplierInvoice'), -1, 'bill'); + print dol_get_fiche_head($head, 'contact', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice'); - $linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; + $linkback = '<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; $morehtmlref = '<div class="refidno">'; // Ref supplier @@ -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 d57abc67644..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,10 +94,9 @@ $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, 'bill'); + print dol_get_fiche_head($head, 'documents', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice'); $totalpaye = $object->getSommePaiement(); @@ -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 494f5d2aa03..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; @@ -51,31 +53,24 @@ $maxOpenCount = empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->globa llxHeader("", $langs->trans("SupplierInvoicesArea"), 'EN:Suppliers_Invoices|FR:FactureFournisseur|ES:Facturas_de_proveedores'); -print load_fiche_titre($langs->trans("SupplierInvoicesArea"), '', 'bill'); +print load_fiche_titre($langs->trans("SupplierInvoicesArea"), '', 'supplier_invoice'); 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 f8522722e64..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); @@ -65,9 +67,9 @@ $alreadypaid = $object->getSommePaiement(); $head = facturefourn_prepare_head($object); $titre = $langs->trans('SupplierInvoice'); -print dol_get_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), -1, 'bill'); +print dol_get_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice'); -$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; +$linkback = '<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; $morehtmlref = '<div class="refidno">'; // Ref supplier @@ -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 d0dce03c87f..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), @@ -189,14 +198,8 @@ $arrayfields = array( 'f.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), ); // 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])) - $arrayfields["ef.".$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($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key])); - } -} +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'); @@ -205,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 = ''; @@ -267,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 { @@ -287,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(); @@ -321,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); } @@ -339,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 { @@ -355,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'); } } @@ -365,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 */ @@ -380,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,"; @@ -393,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(); @@ -409,86 +497,168 @@ $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"; } +// 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; $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 @@ -498,37 +668,48 @@ $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,"; + $sql .= ' f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva, f.multicurrency_total_ttc,'; $sql .= " f.note_public, f.note_private,"; + $sql .= " f.fk_user_author,"; $sql .= ' s.rowid, s.nom, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,'; $sql .= " typent.code,"; $sql .= " state.code_departement, state.nom,"; $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 $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ",ef.".$key : ''); } } + // Add GroupBy from hooks + $parameters = array('all' => $all, 'fieldstosearchall' => $fieldstosearchall); + $reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook + $sql .= $hookmanager->resPrint; } else { $sql .= natural_search(array_keys($fieldstosearchall), $search_all); } +// Add HAVING from hooks +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListHaving', $parameters, $object); // Note that $action and $object may have been modified by hook +$sql .= !empty($hookmanager->resPrint) ? (' HAVING 1=1 ' . $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; } @@ -538,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; @@ -555,73 +734,157 @@ 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'; + // 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'=>$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">'; @@ -637,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">'; @@ -677,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"; @@ -742,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"), @@ -770,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>'; } @@ -955,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); @@ -983,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"; @@ -1030,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); @@ -1089,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">'; @@ -1105,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']++; + } } @@ -1361,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"; @@ -1418,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 c72e7b72710..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,15 +77,14 @@ $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(); $head = facturefourn_prepare_head($object); $titre = $langs->trans('SupplierInvoice'); - print dol_get_fiche_head($head, 'note', $titre, -1, 'bill'); + print dol_get_fiche_head($head, 'note', $titre, -1, 'supplier_invoice'); // Supplier invoice card @@ -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 8a7e0cc8054..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 unpayed 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 06cff4b5c9e..ccc29105e4f 100644 --- a/htdocs/fourn/paiement/card.php +++ b/htdocs/fourn/paiement/card.php @@ -39,24 +39,35 @@ $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. + +$result = restrictedArea($user, $object->element, $object->id, 'paiementfourn', ''); + +// Security check +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) { + accessforbidden(); +} -// PDF -$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0)); -$hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0)); -$hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0)); /* * 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 { @@ -65,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; @@ -83,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; @@ -101,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'); @@ -148,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'); } @@ -177,53 +177,54 @@ if ($result > 0) print '<table class="border centpercent">'; /*print '<tr>'; - print '<td width="20%" colspan="2">'.$langs->trans('Ref').'</td><td colspan="3">'; - print $form->showrefnav($object,'id','',1,'rowid','ref'); + print '<td width="20%">'.$langs->trans('Ref').'</td><td>'; + print $form->showrefnav($object,'id','',1,'rowid','ref'); print '</td></tr>';*/ // Date of payment - print '<tr><td class="titlefield" colspan="2">'.$form->editfieldkey("Date", 'datep', $object->date, $object, $object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td><td colspan="3">'; - print $form->editfieldval("Date", 'datep', $object->date, $object, $object->statut == 0 && $user->rights->fournisseur->facture->creer, 'datehourpicker', '', null, $langs->trans('PaymentDateUpdateSucceeded')); + 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 || $user->rights->supplier_invoice->creer), 'datehourpicker', '', null, $langs->trans('PaymentDateUpdateSucceeded')); print '</td></tr>'; // Payment mode $labeltype = $langs->trans("PaymentType".$object->type_code) != ("PaymentType".$object->type_code) ? $langs->trans("PaymentType".$object->type_code) : $object->type_label; - print '<tr><td colspan="2">'.$langs->trans('PaymentMode').'</td><td colspan="3">'.$labeltype; + print '<tr><td>'.$langs->trans('PaymentMode').'</td>'; + print '<td>'.$labeltype; print $object->num_payment ? ' - '.$object->num_payment : ''; print '</td></tr>'; // Payment numero /* TODO Add field num_payment into payment table and save it - print '<tr><td colspan="2">'.$form->editfieldkey("Numero",'num_paiement',$object->num_paiement,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td><td colspan="3">'; + print '<tr><td>'.$form->editfieldkey("Numero",'num_paiement',$object->num_paiement,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td>'; + 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 colspan="2">'.$langs->trans('Amount').'</td><td colspan="3">'.price($object->amount, '', $langs, 0, 0, -1, $conf->currency).'</td></tr>'; + 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)) - { - print '<tr><td colspan="2">'.$langs->trans('Status').'</td><td colspan="3">'.$object->getLibStatut(4).'</td></tr>'; + 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->bank_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")); } print '<tr>'; - print '<td colspan="2">'.$langs->trans('BankAccount').'</td>'; - print '<td colspan="3">'; + print '<td>'.$langs->trans('BankAccount').'</td>'; + print '<td>'; $accountstatic = new Account($db); $accountstatic->fetch($bankline->fk_account); print $accountstatic->getNomUrl(1); @@ -231,8 +232,8 @@ if ($result > 0) print '</tr>'; print '<tr>'; - print '<td colspan="2">'.$langs->trans('BankTransactionLine').'</td>'; - print '<td colspan="3">'; + print '<td>'.$langs->trans('BankTransactionLine').'</td>'; + print '<td>'; print $bankline->getNomUrl(1, 0, 'showconciliated'); print '</td>'; print '</tr>'; @@ -240,8 +241,9 @@ if ($result > 0) } // Note - print '<tr><td colspan="2">'.$form->editfieldkey("Note", 'note', $object->note, $object, $user->rights->fournisseur->facture->creer).'</td><td colspan="3">'; - print $form->editfieldval("Note", 'note', $object->note, $object, $user->rights->fournisseur->facture->creer, 'textarea'); + 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 || $user->rights->supplier_invoice->creer), 'textarea'); print '</td></tr>'; print '</table>'; @@ -259,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; @@ -276,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; @@ -305,14 +304,13 @@ if ($result > 0) print '<td><a href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$objp->socid.'">'.img_object($langs->trans('ShowCompany'), 'company').' '.$objp->name.'</a></td>'; // Expected to pay print '<td class="right">'.price($objp->total_ttc).'</td>'; - // Payed + // Paid print '<td class="right">'.price($objp->amount).'</td>'; // Status 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")); } @@ -336,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>'; @@ -364,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 97ac2343c23..8032b2b418f 100644 --- a/htdocs/fourn/paiement/info.php +++ b/htdocs/fourn/paiement/info.php @@ -33,8 +33,28 @@ $langs->loadLangs(array("bills", "suppliers", "companies")); $id = GETPOST('id', 'int'); $object = new PaiementFourn($db); -$object->fetch($id); -$object->info($id); + +// Load object +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. + +$result = restrictedArea($user, $object->element, $object->id, 'paiementfourn', ''); + +// Security check +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) { + accessforbidden(); +} + + +/* + * Actions + */ + +// None /* @@ -43,10 +63,14 @@ $object->info($id); llxHeader(); +$object->info($id); + $head = payment_supplier_prepare_head($object); print dol_get_fiche_head($head, 'info', $langs->trans("SupplierPayment"), 0, 'payment'); +$linkback = '<a href="'.DOL_URL_ROOT.'/fourn/paiement/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; + dol_banner_tab($object, 'id', $linkback, -1, 'rowid', 'ref'); print dol_get_fiche_end(); diff --git a/htdocs/fourn/paiement/list.php b/htdocs/fourn/paiement/list.php index 3fca286eff0..ecd572e1046 100644 --- a/htdocs/fourn/paiement/list.php +++ b/htdocs/fourn/paiement/list.php @@ -9,8 +9,9 @@ * 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> * * This 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,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'); @@ -78,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')); @@ -111,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'; @@ -150,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'; @@ -160,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='.$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.datep, p.amount, p.num_paiement, s.rowid, s.nom, c.code, c.libelle, ba.rowid, ba.label'; -if (!$user->rights->societe->client->voir) $sql .= ', sc.fk_soc, sc.fk_user'; +$sql .= ' 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'; +} $sql .= $db->order($sortfield, $sortorder); @@ -207,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">'; @@ -234,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>'; } @@ -244,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">'; @@ -255,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" : '').'">'; @@ -272,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>'; @@ -326,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); @@ -368,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 @@ -392,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..5094f178cea 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,13 +230,11 @@ 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); preg_match('/([0-9]+)$/i', $obj->name, $reg); 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 09165ee89d1..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,17 +151,24 @@ 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')); // Check that leave is for a user inside the hierarchy or advanced permission for all is set - if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->holiday->write)) || (!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->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->id == $fuserid && empty($user->rights->holiday->write)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->id != $fuserid && empty($user->rights->holiday->writeall_advance)) + ) { $error++; - setEventMessages($langs->trans("NotEnoughPermission"), null, 'errors'); + setEventMessages($langs->trans("NotEnoughPermissions"), null, 'errors'); } else { if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->holiday->writeall_advance)) { if (!in_array($fuserid, $childids)) { @@ -162,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'; @@ -193,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'; @@ -202,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; @@ -229,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); @@ -249,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 { @@ -274,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); @@ -283,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; @@ -298,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')); @@ -332,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; } @@ -347,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 { @@ -366,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(); @@ -375,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++; @@ -388,8 +388,7 @@ if (empty($reshook)) } } - if (!$error) - { + if (!$error) { $db->commit(); header('Location: list.php?restore_lastsearch_values=1'); exit; @@ -399,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; @@ -435,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"); @@ -450,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"; } @@ -481,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 { @@ -499,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(); @@ -539,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 @@ -589,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"); @@ -608,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 = ''; @@ -632,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; @@ -649,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 @@ -675,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"); @@ -695,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 = ''; } @@ -708,8 +687,7 @@ if (empty($reshook)) $action = ''; } - if (!$error) - { + if (!$error) { $db->commit(); header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); @@ -726,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); @@ -737,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); @@ -754,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; @@ -774,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; } @@ -824,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"; @@ -842,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 { @@ -885,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 @@ -900,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; } @@ -974,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; @@ -1002,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 { @@ -1018,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>'; @@ -1075,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")); } @@ -1117,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); @@ -1130,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; } @@ -1167,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"; @@ -1215,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")); @@ -1239,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")); @@ -1269,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>'; @@ -1278,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>'; @@ -1287,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>'; @@ -1318,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>'; @@ -1332,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>'; @@ -1348,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").'">'; } @@ -1369,24 +1338,24 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') print '<tr>'; print '<td>'.$langs->trans('DateCreation').'</td>'; - print '<td>'.dol_print_date($object->date_create, 'dayhour').'</td>'; + print '<td>'.dol_print_date($object->date_create, 'dayhour', 'tzuser').'</td>'; print '</tr>'; if ($object->statut == Holiday::STATUS_APPROVED || $object->statut == Holiday::STATUS_CANCELED) { print '<tr>'; print '<td>'.$langs->trans('DateValidCP').'</td>'; - print '<td>'.dol_print_date($object->date_valid, 'dayhour').'</td>'; // warning: date_valid is approval date on holiday module + print '<td>'.dol_print_date($object->date_valid, 'dayhour', 'tzuser').'</td>'; // warning: date_valid is approval date on holiday module print '</tr>'; } if ($object->statut == Holiday::STATUS_CANCELED) { print '<tr>'; print '<td>'.$langs->trans('DateCancelCP').'</td>'; - print '<td>'.dol_print_date($object->date_cancel, 'dayhour').'</td>'; + print '<td>'.dol_print_date($object->date_cancel, 'dayhour', 'tzuser').'</td>'; print '</tr>'; } if ($object->statut == Holiday::STATUS_REFUSED) { print '<tr>'; print '<td>'.$langs->trans('DateRefusCP').'</td>'; - print '<td>'.dol_print_date($object->date_refuse, 'dayhour').'</td>'; + print '<td>'.dol_print_date($object->date_refuse, 'dayhour', 'tzuser').'</td>'; print '</tr>'; } print '</tbody>'; @@ -1402,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>'; @@ -1456,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 { @@ -1481,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>'; } @@ -1516,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 @@ -1560,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 2030ab1d636..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,29 +2069,101 @@ 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(); } + /** + * Load information on object + * + * @param int $id Id of object + * @return void + */ + public function info($id) + { + global $conf; + + $sql = "SELECT f.rowid,"; + $sql .= " f.date_create as datec,"; + $sql .= " f.tms as date_modification,"; + $sql .= " f.date_valid as datev,"; + //$sql .= " f.date_approve as datea,"; + $sql .= " f.date_refuse as dater,"; + $sql .= " f.fk_user_create as fk_user_creation,"; + $sql .= " f.fk_user_modif as fk_user_modification,"; + $sql .= " f.fk_user_valid,"; + $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 = ".((int) $id); + $sql .= " AND f.entity = ".$conf->entity; + + $resql = $this->db->query($sql); + 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); + $this->date_modification = $this->db->jdate($obj->date_modification); + $this->date_validation = $this->db->jdate($obj->datev); + $this->date_approbation = $this->db->jdate($obj->datea); + + $cuser = new User($this->db); + $cuser->fetch($obj->fk_user_author); + $this->user_creation = $cuser; + + 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) { + $vuser = new User($this->db); + $vuser->fetch($obj->fk_user_valid); + $this->user_validation = $vuser; + } + 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) { + $auser = new User($this->db); + $auser->fetch($obj->fk_user_approve); + $this->user_approve = $auser; + } + } + $this->db->free($resql); + } else { + dol_print_error($this->db); + } + } + + /** * Initialise an instance with random values. * Used to build previews or test instances. @@ -2116,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); @@ -2149,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(); @@ -2157,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(); @@ -2176,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 f366bb50c85..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>'; @@ -300,7 +352,7 @@ if ($object->id) $permission = $user->rights->holiday->write; $permtoedit = $user->rights->holiday->write; $param = '&id='.$object->id; - include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { print $langs->trans("ErrorUnknown"); } 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 new file mode 100644 index 00000000000..3ec95e61a52 --- /dev/null +++ b/htdocs/holiday/info.php @@ -0,0 +1,118 @@ +<?php +/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> + * Copyright (C) 2004-2015 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/>. + * or see https://www.gnu.org/ + */ + +/** + * \file htdocs/holiday/info.php + * \ingroup holiday + * \brief Page to show a leave information + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/holiday.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; + +// Load translation files required by the page +$langs->load("holiday"); + +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); + + +$childids = $user->getAllChildIds(1); + +$morefilter = ''; +if (!empty($conf->global->HOLIDAY_HIDE_FOR_NON_SALARIES)) { + $morefilter = 'AND employee = 1'; +} + +$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->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 + */ + +$form = new Form($db); + +$title = $langs->trans("Holiday")." - ".$langs->trans("Info"); +$helpurl = ""; +llxHeader("", $title, $helpurl); + +if ($id > 0 || !empty($ref)) { + $object = new Holiday($db); + $object->fetch($id, $ref); + $object->info($object->id); + + $head = holiday_prepare_head($object); + + print dol_get_fiche_head($head, 'info', $langs->trans("Holiday"), -1, 'holiday'); + + $linkback = '<a href="'.DOL_URL_ROOT.'/holiday/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; + + $morehtmlref = '<div class="refidno">'; + $morehtmlref .= '</div>'; + + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + print '<div class="fichecenter">'; + print '<div class="underbanner clearboth"></div>'; + + print '<br>'; + + print '<table width="100%"><tr><td>'; + dol_print_object_info($object); + print '</td></tr></table>'; + + print '</div>'; + + print dol_get_fiche_end(); +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 41ae8a6956f..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'); @@ -106,7 +117,7 @@ $search_month_end = GETPOST('search_month_end', 'int'); $search_year_end = GETPOST('search_year_end', 'int'); $search_employee = GETPOST('search_employee', 'int'); $search_valideur = GETPOST('search_valideur', 'int'); -$search_status = GETPOST('search_status', 'int'); +$search_status = GETPOST('search_statut', 'int'); $search_type = GETPOST('search_type', 'int'); // Initialize technical objects @@ -143,17 +154,9 @@ $arrayfields = array( 'cp.statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), ); // 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])) - $arrayfields["ef.".$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($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key])); - } -} +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>'; @@ -167,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 = ""; @@ -197,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 } @@ -237,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(); @@ -289,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 @@ -327,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'; @@ -341,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; } @@ -357,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); @@ -415,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>'; @@ -432,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>'; } @@ -452,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>'; } @@ -462,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>'; @@ -478,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"; @@ -487,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; } @@ -514,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 { @@ -532,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; @@ -552,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); @@ -567,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); @@ -583,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); @@ -592,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); @@ -601,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>'; @@ -617,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"; @@ -644,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); @@ -654,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 @@ -691,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 @@ -749,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"; @@ -783,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>'; } @@ -822,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..2772137284b 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 @@ -52,8 +60,12 @@ llxHeader('', $langs->trans("Establishments")); $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 +80,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 +108,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 +144,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..d19b15e3499 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; @@ -88,9 +98,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.html b/htdocs/hrm/index.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php index f0bbb442acc..f169ce60b37 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(); } @@ -81,8 +89,7 @@ llxHeader('', $langs->trans('HRMArea')); 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 +101,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 +140,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 +151,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 +164,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 +175,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 +210,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 +248,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 +283,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 +320,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 +357,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 fbb17e15280..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,10 +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) { + 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/"; @@ -1273,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++; } @@ -1291,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'); @@ -1317,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>'; @@ -1333,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">'; @@ -1376,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 { @@ -1385,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) @@ -1401,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; -'; @@ -1412,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 { @@ -1429,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">'; @@ -1442,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; @@ -1471,7 +1517,9 @@ if ($step == 5 && $datatoimport) }*/ print $newval; } - } else print $langs->trans("Error"); + } else { + print $langs->trans("Error"); + } print '</td></tr>'; // Fields imported @@ -1483,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; @@ -1501,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>'; @@ -1510,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>'; @@ -1536,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(); @@ -1575,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++; } @@ -1595,27 +1646,27 @@ if ($step == 5 && $datatoimport) // Show OK if (!count($arrayoferrors) && !count($arrayofwarnings)) { print '<div class="center">'.img_picto($langs->trans("OK"), 'tick').' <b>'.$langs->trans("NoError").'</b></div><br><br>'; - print $langs->trans("NbInsert", $obj->nbinsert).'<br>'; - print $langs->trans("NbUpdate", $obj->nbupdate).'<br><br>'; - } else print $langs->trans("NbOfLinesOK", $nbok).'<br><br>'; + print '<div class="ok">'; + 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>'; + } // 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>'; } } @@ -1625,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>'; } } @@ -1652,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")).'">'; @@ -1682,11 +1729,17 @@ 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) { + 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); - $importid = $_REQUEST["importid"]; + $list = $objmodelimport->liste_modeles($db); + $importid = GETPOST("importid", 'alphanohtml'); // Create classe to use for import @@ -1703,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++; } @@ -1720,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'); @@ -1741,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>'; @@ -1757,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">'; @@ -1820,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; @@ -1856,7 +1917,9 @@ if ($step == 6 && $datatoimport) }*/ print $newval; } - } else print $langs->trans("Error"); + } else { + print $langs->trans("Error"); + } print '</td></tr>'; // Fields imported @@ -1867,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; @@ -1900,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(); @@ -1932,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(); @@ -1962,12 +2034,14 @@ if ($step == 6 && $datatoimport) // Show result print '<br>'; - print '<div class="center">'; + print '<div class="ok">'; print $langs->trans("NbOfLinesImported", $nbok).'</b><br>'; - print $langs->trans("NbInsert", $obj->nbinsert).'<br>'; - print $langs->trans("NbUpdate", $obj->nbupdate).'<br><br>'; + 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>'; + print '<div class="center">'; print $langs->trans("FileWasImported", $importid).'<br>'; - print $langs->trans("YouCanUseImportIdToFindRecord", $importid).'<br>'; + print '<span class="opacitymedium">'.$langs->trans("YouCanUseImportIdToFindRecord", $importid).'</span><br>'; print '</div>'; } @@ -2008,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;"'); @@ -2018,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;'; @@ -2038,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>'; @@ -2066,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/nusoap/lib/nusoap.php b/htdocs/includes/nusoap/lib/nusoap.php index a1fbd00051d..7e0ebd94da4 100644 --- a/htdocs/includes/nusoap/lib/nusoap.php +++ b/htdocs/includes/nusoap/lib/nusoap.php @@ -4219,8 +4219,10 @@ class nusoap_server extends nusoap_base { $payload .= $this->getDebugAsXMLComment(); } $this->outgoing_headers[] = "Server: $this->title Server v$this->version"; - preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev); - $this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".$rev[1].")"; + // @CHANGE Fix for php8 + $rev = array(); + preg_match('/\$Revision: ([^ ]+)/', $this->revision, $rev); + $this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".(isset($rev[1]) ? $rev[1] : '').")"; // Let the Web server decide about this //$this->outgoing_headers[] = "Connection: Close\r\n"; $payload = $this->getHTTPBody($payload); @@ -6123,7 +6125,7 @@ class wsdl extends nusoap_base { $rows = sizeof($value); $contents = ''; foreach($value as $k => $v) { - $this->debug("serializing array element: $k, $v of type: $typeDef[arrayType]"); + $this->debug("serializing array element: $k of type: ".$typeDef['arrayType']); //if (strpos($typeDef['arrayType'], ':') ) { if (!in_array($typeDef['arrayType'],$this->typemap['http://www.w3.org/2001/XMLSchema'])) { $contents .= $this->serializeType('item', $typeDef['arrayType'], $v, $use); diff --git a/htdocs/includes/odtphp/odf.php b/htdocs/includes/odtphp/odf.php index 5012337daf8..91fec8d998e 100644 --- a/htdocs/includes/odtphp/odf.php +++ b/htdocs/includes/odtphp/odf.php @@ -136,9 +136,9 @@ class Odf // instead of {aaa} so we should enhance this function. //print $key.'-'.$value.'-'.strpos($this->contentXml, $this->config['DELIMITER_LEFT'] . $key . $this->config['DELIMITER_RIGHT']).'<br>'; if (strpos($this->contentXml, $tag) === false && strpos($this->stylesXml, $tag) === false) { - //if (strpos($this->contentXml, '">'. $key . '</text;span>') === false) { - throw new OdfException("var $key not found in the document"); - //} + // Add the throw only for development. In most cases, it is normal to not having the key into the document (only few keys are presents). + //throw new OdfException("var $key not found in the document"); + return $this; } $this->vars[$tag] = $this->convertVarToOdf($value, $encode, $charset); @@ -820,10 +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)) { @@ -856,7 +863,7 @@ IMG; } else { - // deprecated old method + // deprecated old method using odt2pdf.sh (native, jodconverter, ...) $tmpname=preg_replace('/\.odt/i', '', $name); if (!empty($conf->global->MAIN_DOL_SCRIPTS_ROOT)) @@ -906,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); @@ -924,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/ApcCache.php b/htdocs/includes/restler/framework/Luracast/Restler/ApcCache.php index b8cdd95b373..a2ddc83c44f 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/ApcCache.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/ApcCache.php @@ -13,7 +13,7 @@ use Luracast\Restler\iCache; * @copyright 2013 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class ApcCache implements iCache { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php b/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php index d8445fdc70c..5ed160a070a 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php @@ -12,7 +12,7 @@ namespace Luracast\Restler { * @subpackage helper * @author Nick Lombard <github@jigsoft.co.za> * @copyright 2012 Luracast - * @version 3.0.0rc6 + * */ class AutoLoader { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php b/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php index 2815f1f6c70..6b8b9178f6b 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php @@ -1,4 +1,5 @@ <?php + namespace Luracast\Restler; use Exception; @@ -14,7 +15,7 @@ use Luracast\Restler\Data\Text; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class CommentParser { @@ -55,8 +56,8 @@ class CommentParser * @var array annotations that support array value */ public static $allowsArrayValue = array( - 'choice' => true, - 'select' => true, + 'choice' => true, + 'select' => true, 'properties' => true, ); @@ -220,7 +221,7 @@ class CommentParser */ private function parseParam($param, array $value, array $embedded) { - $data = & $this->_data; + $data = &$this->_data; $allowMultiple = false; switch ($param) { case 'param' : @@ -237,7 +238,7 @@ class CommentParser $value = $this->formatReturn($value); break; case 'class' : - $data = & $data[$param]; + $data = &$data[$param]; list ($param, $value) = $this->formatClass($value); break; case 'access' : @@ -294,7 +295,7 @@ class CommentParser += $data[$param][self::$embeddedDataName]; } if (!is_array($data[$param])) { - $data[$param] = array('description' => (string) $data[$param]); + $data[$param] = array('description' => (string)$data[$param]); } if (is_array($value)) { $data[$param] = $value + $data[$param]; @@ -320,19 +321,24 @@ class CommentParser $data['pattern'] = $matches[2]; } while (preg_match('/{@(\w+)\s?([^}]*)}/ms', $subject, $matches)) { + $name = $matches[1]; + $value = $matches[2]; $subject = str_replace($matches[0], '', $subject); - if ($matches[1] == 'pattern') { + if ($name == 'pattern') { throw new Exception('Inline pattern tag should follow {@pattern /REGEX_PATTERN_HERE/} format and can optionally include PCRE modifiers following the ending `/`'); - } elseif (isset(static::$allowsArrayValue[$matches[1]])) { - $matches[2] = explode(static::$arrayDelimiter, $matches[2]); - } elseif ($matches[2] == 'true' || $matches[2] == 'false') { - $matches[2] = $matches[2] == 'true'; - } elseif ($matches[2] == '') { - $matches[2] = true; - } elseif ($matches[1] == 'required') { - $matches[2] = explode(static::$arrayDelimiter, $matches[2]); + } elseif (isset(static::$allowsArrayValue[$name])) { + $value = explode(static::$arrayDelimiter, $value); + } elseif ($value == 'true' || $value == 'false') { + $value = $value == 'true'; + } elseif ($value == '') { + $value = true; + } elseif ($name == 'required') { + $value = explode(static::$arrayDelimiter, $value); } - $data[$matches[1]] = $matches[2]; + if (defined('Luracast\\Restler\\UI\\HtmlForm::'.$name)) { + $value = constant($value); + } + $data[$name] = $value; } while (preg_match(self::$embeddedDataPattern, $subject, $matches)) { @@ -340,9 +346,9 @@ class CommentParser $str = $matches[self::$embeddedDataIndex]; if (isset ($this->restler) && self::$embeddedDataIndex > 1 - && !empty ($matches[1]) + && !empty ($name) ) { - $extension = $matches[1]; + $extension = $name; $formatMap = $this->restler->getFormatMap(); if (isset ($formatMap[$extension])) { /** @@ -397,15 +403,15 @@ class CommentParser { $code = 500; $exception = 'Exception'; - if(count($value)>1){ + if (count($value) > 1) { $v1 = $value[0]; $v2 = $value[1]; - if(is_numeric($v1)){ + if (is_numeric($v1)) { $code = $v1; $exception = $v2; array_shift($value); array_shift($value); - } elseif(is_numeric($v2)){ + } elseif (is_numeric($v2)) { $code = $v2; $exception = $v1; array_shift($value); @@ -414,17 +420,17 @@ class CommentParser $exception = $v1; array_shift($value); } - } elseif(count($value) && is_numeric($value[0])) { + } elseif (count($value) && is_numeric($value[0])) { $code = $value[0]; array_shift($value); } $message = implode(' ', $value); - if(!isset(RestException::$codes[$code])){ + if (!isset(RestException::$codes[$code])) { $code = 500; - } elseif(empty($message)){ + } elseif (empty($message)) { $message = RestException::$codes[$code]; } - return compact('code','message','exception'); + return compact('code', 'message', 'exception'); } private function formatClass(array $value) diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Compose.php b/htdocs/includes/restler/framework/Luracast/Restler/Compose.php index 594e5902004..141aa8bcb2f 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Compose.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Compose.php @@ -11,7 +11,7 @@ namespace Luracast\Restler; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class Compose implements iCompose { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Data/ApiMethodInfo.php b/htdocs/includes/restler/framework/Luracast/Restler/Data/ApiMethodInfo.php index 4d0fa4bfd48..f4dea84df97 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Data/ApiMethodInfo.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Data/ApiMethodInfo.php @@ -11,7 +11,7 @@ namespace Luracast\Restler\Data; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class ApiMethodInfo extends ValueObject { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Data/Arr.php b/htdocs/includes/restler/framework/Luracast/Restler/Data/Arr.php index 6e98a4132ea..8ae18c7003d 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Data/Arr.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Data/Arr.php @@ -10,7 +10,7 @@ namespace Luracast\Restler\Data; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class Arr { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Data/Invalid.php b/htdocs/includes/restler/framework/Luracast/Restler/Data/Invalid.php index 6b06d266f13..832dd30850e 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Data/Invalid.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Data/Invalid.php @@ -12,7 +12,7 @@ use Exception; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class Invalid extends Exception { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Data/Obj.php b/htdocs/includes/restler/framework/Luracast/Restler/Data/Obj.php index 003f1df8794..8fe2a79ab63 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Data/Obj.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Data/Obj.php @@ -11,7 +11,7 @@ namespace Luracast\Restler\Data; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class Obj { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Data/Text.php b/htdocs/includes/restler/framework/Luracast/Restler/Data/Text.php index 506ea25fb20..d0b39896c8e 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Data/Text.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Data/Text.php @@ -10,87 +10,91 @@ namespace Luracast\Restler\Data; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class Text { - /** - * Given haystack contains the needle or not? - * - * @param string $haystack - * @param string $needle - * @param bool $caseSensitive - * - * @return bool - */ - public static function contains($haystack, $needle, $caseSensitive = true) - { - if (empty($needle)) - return true; - return $caseSensitive - ? strpos($haystack, $needle) !== false - : stripos($haystack, $needle) !== false; - } - - /** - * Given haystack begins with the needle or not? - * - * @param string $haystack - * @param string $needle - * - * @return bool - */ - public static function beginsWith($haystack, $needle) - { - $length = strlen($needle); - return (substr($haystack, 0, $length) === $needle); - } - - /** - * Given haystack ends with the needle or not? - * - * @param string $haystack - * @param string $needle - * - * @return bool - */ - public static function endsWith($haystack, $needle) - { - $length = strlen($needle); - if ($length == 0) { - return true; - } - return (substr($haystack, -$length) === $needle); - } - - - /** - * Convert camelCased or underscored string in to a title - * - * @param string $name - * - * @return string - */ - public static function title($name) - { - return - ucwords( - preg_replace( - array('/(?<=[^A-Z])([A-Z])/', '/(?<=[^0-9])([0-9])/', '/([_-])/', '/[^a-zA-Z0-9\s]|\s\s+/'), - array(' $0', ' $0', ' ', ' '), - $name - ) - ); - } - - /** - * Convert given string to be used as a slug or css class - * - * @param string $name - * @return string - */ - public static function slug($name) - { - return preg_replace('/[^a-zA-Z]+/', '-', strtolower(strip_tags($name))); - } + /** + * Given haystack contains the needle or not? + * + * @param string $haystack + * @param string $needle + * @param bool $caseSensitive + * + * @return bool + */ + public static function contains($haystack, $needle, $caseSensitive = true) + { + if (empty($needle)) + return true; + return $caseSensitive + ? strpos($haystack, $needle) !== false + : stripos($haystack, $needle) !== false; + } + + /** + * Given haystack begins with the needle or not? + * + * @param string $haystack + * @param string $needle + * + * @return bool + */ + public static function beginsWith($haystack, $needle) + { + $length = strlen($needle); + return (substr($haystack, 0, $length) === $needle); + } + + /** + * Given haystack ends with the needle or not? + * + * @param string $haystack + * @param string $needle + * + * @return bool + */ + public static function endsWith($haystack, $needle) + { + $length = strlen($needle); + if ($length == 0) { + return true; + } + + // @CHANGE LDR + if (!is_string($haystack)) return false; + + return (substr($haystack, -$length) === $needle); + } + + + /** + * Convert camelCased or underscored string in to a title + * + * @param string $name + * + * @return string + */ + public static function title($name) + { + return + ucwords( + preg_replace( + array('/(?<=[^A-Z])([A-Z])/', '/(?<=[^0-9])([0-9])/', '/([_-])/', '/[^a-zA-Z0-9\s]|\s\s+/'), + array(' $0', ' $0', ' ', ' '), + $name + ) + ); + } + + /** + * Convert given string to be used as a slug or css class + * + * @param string $name + * @return string + */ + public static function slug($name) + { + return preg_replace('/[^a-zA-Z]+/', '-', strtolower(strip_tags($name))); + } } \ No newline at end of file diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Data/ValidationInfo.php b/htdocs/includes/restler/framework/Luracast/Restler/Data/ValidationInfo.php index 298b72ec125..fc05c5386df 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Data/ValidationInfo.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Data/ValidationInfo.php @@ -15,7 +15,7 @@ use Luracast\Restler\Util; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class ValidationInfo implements iValueObject { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Data/Validator.php b/htdocs/includes/restler/framework/Luracast/Restler/Data/Validator.php index c98a17a62d6..023fc7c4d1e 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Data/Validator.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Data/Validator.php @@ -18,7 +18,7 @@ use Luracast\Restler\Util; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class Validator implements iValidate { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Data/ValueObject.php b/htdocs/includes/restler/framework/Luracast/Restler/Data/ValueObject.php index 46857b45329..5a2b001e841 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Data/ValueObject.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Data/ValueObject.php @@ -11,7 +11,7 @@ namespace Luracast\Restler\Data; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class ValueObject implements iValueObject { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Data/iValidate.php b/htdocs/includes/restler/framework/Luracast/Restler/Data/iValidate.php index 66688b066ba..923fc79b1ce 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Data/iValidate.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Data/iValidate.php @@ -10,7 +10,7 @@ namespace Luracast\Restler\Data; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ interface iValidate { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Data/iValueObject.php b/htdocs/includes/restler/framework/Luracast/Restler/Data/iValueObject.php index dbf36cb744c..dcce824a655 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Data/iValueObject.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Data/iValueObject.php @@ -11,7 +11,7 @@ namespace Luracast\Restler\Data; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ interface iValueObject { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Defaults.php b/htdocs/includes/restler/framework/Luracast/Restler/Defaults.php index 8913db316b5..803c8b3177a 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Defaults.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Defaults.php @@ -15,7 +15,7 @@ use Luracast\Restler\Data\Validator; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class Defaults { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/EventDispatcher.php b/htdocs/includes/restler/framework/Luracast/Restler/EventDispatcher.php index f8cd883af46..0c5d0fa676c 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/EventDispatcher.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/EventDispatcher.php @@ -9,7 +9,7 @@ namespace Luracast\Restler; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ use Closure; diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Filter/RateLimit.php b/htdocs/includes/restler/framework/Luracast/Restler/Filter/RateLimit.php index 5dce8591bba..e5705136fce 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Filter/RateLimit.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Filter/RateLimit.php @@ -15,7 +15,7 @@ use Luracast\Restler\RestException; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class RateLimit implements iFilter, iUseAuthentication { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Flash.php b/htdocs/includes/restler/framework/Luracast/Restler/Flash.php index 3ab04aa745e..41d097f312d 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Flash.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Flash.php @@ -15,7 +15,7 @@ use ArrayAccess; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class Flash implements ArrayAccess { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Format/AmfFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/AmfFormat.php index 3d146fbcfac..181d95bea46 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Format/AmfFormat.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Format/AmfFormat.php @@ -17,7 +17,7 @@ use ZendAmf\Parser\OutputStream; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class AmfFormat extends DependentFormat { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Format/CsvFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/CsvFormat.php index 4bed88251c8..c33557f8463 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Format/CsvFormat.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Format/CsvFormat.php @@ -15,7 +15,7 @@ use Luracast\Restler\RestException; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class CsvFormat extends Format implements iDecodeStream { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Format/Format.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/Format.php index 10b2c5834e6..edc2cbde719 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Format/Format.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Format/Format.php @@ -10,7 +10,7 @@ namespace Luracast\Restler\Format; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ abstract class Format implements iFormat { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Format/HtmlFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/HtmlFormat.php index e871186c446..493e3e44061 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Format/HtmlFormat.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Format/HtmlFormat.php @@ -1,4 +1,5 @@ <?php + namespace Luracast\Restler\Format; use Exception; @@ -6,8 +7,8 @@ use Illuminate\Events\Dispatcher; use Illuminate\Filesystem\Filesystem; use Illuminate\View\Compilers\BladeCompiler; use Illuminate\View\Engines\CompilerEngine; -use Illuminate\View\Engines\PhpEngine; use Illuminate\View\Engines\EngineResolver; +use Illuminate\View\Engines\PhpEngine; use Illuminate\View\Factory; use Illuminate\View\FileViewFinder; use Illuminate\View\View; @@ -18,6 +19,10 @@ use Luracast\Restler\Restler; use Luracast\Restler\Scope; use Luracast\Restler\UI\Nav; use Luracast\Restler\Util; +use Twig\Environment; +use Twig\Extension\DebugExtension; +use Twig\Loader\FilesystemLoader; +use Twig\TwigFunction; /** * Html template format @@ -29,10 +34,14 @@ use Luracast\Restler\Util; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class HtmlFormat extends DependentFormat { + const BLADE = 'Illuminate\View\View'; + const TWIG = 'Twig\Environment'; + const MUSTACHE = 'Mustache_Engine'; + public static $mime = 'text/html'; public static $extension = 'html'; public static $view; @@ -84,11 +93,12 @@ class HtmlFormat extends DependentFormat } } - public function getDependencyMap(){ + public function getDependencyMap() + { return array( - 'Illuminate\View\View' => 'illuminate/view:4.2.*', - 'Twig_Environment' => 'twig/twig:v1.13.*', - 'Mustache_Engine' => 'mustache/mustache:dev-master', + self::BLADE => 'illuminate/view:^8', + self::TWIG => 'twig/twig:^3', + self::MUSTACHE => 'mustache/mustache:dev-master', ); } @@ -101,7 +111,7 @@ class HtmlFormat extends DependentFormat $resolver->register('blade', function () use ($engine) { return $engine; }); - $phpEngine = new PhpEngine(); + $phpEngine = new PhpEngine($files); $resolver->register('php', function () use ($phpEngine) { return $phpEngine; }); @@ -128,32 +138,43 @@ class HtmlFormat extends DependentFormat return $view->render(); } - public static function twig(array $data, $debug = true) + /** + * @param array|object $data + * @param bool $debug + * + * @return string + * @throws \Twig\Error\LoaderError + * @throws \Twig\Error\RuntimeError + * @throws \Twig\Error\SyntaxError + */ + public static function twig($data, $debug = true) { - $loader = new \Twig_Loader_Filesystem(static::$viewPath); - $twig = new \Twig_Environment($loader, array( - 'cache' => static::$cacheDirectory, - 'debug' => $debug, + $loader = new FilesystemLoader(static::$viewPath); + $twig = new Environment($loader, array( + 'cache' => is_string(static::$cacheDirectory) + ? static::$cacheDirectory : false, + 'debug' => $debug, 'use_strict_variables' => $debug, )); - if ($debug) - $twig->addExtension(new \Twig_Extension_Debug()); + if ($debug) { + $twig->addExtension(new DebugExtension()); + } $twig->addFunction( - new \Twig_SimpleFunction( + new TwigFunction( 'form', 'Luracast\Restler\UI\Forms::get', array('is_safe' => array('html')) ) ); $twig->addFunction( - new \Twig_SimpleFunction( + new TwigFunction( 'form_key', 'Luracast\Restler\UI\Forms::key' ) ); $twig->addFunction( - new \Twig_SimpleFunction( + new TwigFunction( 'nav', 'Luracast\Restler\UI\Nav::get' ) @@ -164,7 +185,7 @@ class HtmlFormat extends DependentFormat isset(HtmlFormat::$data[$name]) && is_callable(HtmlFormat::$data[$name]) ) { - return new \Twig_SimpleFunction( + return new TwigFunction( $name, HtmlFormat::$data[$name] ); @@ -172,21 +193,35 @@ class HtmlFormat extends DependentFormat return false; }); - $template = $twig->loadTemplate(static::getViewFile()); - return $template->render($data); + $template = $twig->load(static::getViewFile()); + return $template->render((array)$data); } - public static function handlebar(array $data, $debug = true) + /** + * @param array|object $data + * @param bool $debug + * + * @return string + */ + public static function handlebar($data, $debug = true) { return static::mustache($data, $debug); } - public static function mustache(array $data, $debug = true) + /** + * @param array|object $data + * @param bool $debug + * + * @return string + */ + public static function mustache($data, $debug = true) { - if (!isset($data['nav'])) + $data = (array)$data; + if (!isset($data['nav'])) { $data['nav'] = array_values(Nav::get()); + } $options = array( - 'loader' => new \Mustache_Loader_FilesystemLoader( + 'loader' => new \Mustache_Loader_FilesystemLoader( static::$viewPath, array('extension' => static::getViewExtension()) ), @@ -200,16 +235,25 @@ class HtmlFormat extends DependentFormat }, ) ); - if (!$debug) + if (!$debug) { $options['cache'] = static::$cacheDirectory; + } $m = new \Mustache_Engine($options); return $m->render(static::getViewFile(), $data); } - public static function php(array $data, $debug = true) + /** + * @param array|object $data + * @param bool $debug + * + * @return string + * @throws RestException + */ + public static function php($data, $debug = true) { - if (static::$view == 'debug') + if (static::$view == 'debug') { static::$viewPath = dirname(__DIR__) . '/views'; + } $view = static::getViewFile(true); if (!is_readable($view)) { @@ -222,22 +266,26 @@ class HtmlFormat extends DependentFormat $path = static::$viewPath . DIRECTORY_SEPARATOR; $template = function ($view) use ($data, $path) { + $data = (array)$data; $form = function () { return call_user_func_array( 'Luracast\Restler\UI\Forms::get', func_get_args() ); }; - if (!isset($data['form'])) + if (!isset($data['form'])) { $data['form'] = $form; + } $nav = function () { return call_user_func_array( 'Luracast\Restler\UI\Nav::get', func_get_args() ); }; - if (!isset($data['nav'])) + if (!isset($data['nav'])) { $data['nav'] = $nav; + } + $_ = function () use ($data, $path) { extract($data); @@ -254,7 +302,7 @@ class HtmlFormat extends DependentFormat ) { $str = ''; foreach ($arrays as $arr) { - extract($arr); + extract((array)$arr); $str .= include $file; } return $str; @@ -264,15 +312,18 @@ class HtmlFormat extends DependentFormat } break; case 'if': - if (count($args) < 2) + if (count($args) < 2) { $args[1] = ''; - if (count($args) < 3) + } + if (count($args) < 3) { $args[2] = ''; + } return $args[0] ? $args[1] : $args[2]; break; default: - if (isset($data[$task]) && is_callable($data[$task])) + if (isset($data[$task]) && is_callable($data[$task])) { return call_user_func_array($data[$task], $args); + } } return ''; }; @@ -280,8 +331,9 @@ class HtmlFormat extends DependentFormat return @include $view; }; $value = $template($view); - if (is_string($value)) + if (is_string($value)) { return $value; + } } /** @@ -294,8 +346,8 @@ class HtmlFormat extends DependentFormat * Formatter has to make the encoded * output more human readable * - * @throws \Exception * @return string encoded string + * @throws \Exception */ public function encode($data, $humanReadable = false) { @@ -317,9 +369,9 @@ class HtmlFormat extends DependentFormat 'response' => static::$convertResponseToArray ? Obj::toArray($data) : $data, - 'stages' => $this->restler->getEvents(), - 'success' => $success, - 'error' => $error + 'stages' => $this->restler->getEvents(), + 'success' => $success, + 'error' => $error ); $info = $data['api'] = $this->restler->apiMethodInfo; $metadata = Util::nestedValue( @@ -358,7 +410,9 @@ class HtmlFormat extends DependentFormat if ($value) { $data = Util::nestedValue($data, explode('.', $value)); } - $data += static::$data; + if (is_array($data)) { + $data += static::$data; + } if (false === ($i = strrpos(self::$view, '.'))) { $template = self::$template; } else { @@ -369,17 +423,18 @@ class HtmlFormat extends DependentFormat static::$cacheDirectory = Defaults::$cacheDirectory . DIRECTORY_SEPARATOR . $template; if (!file_exists(static::$cacheDirectory)) { if (!mkdir(static::$cacheDirectory, 0770, true)) { - throw new RestException(500, 'Unable to create cache directory `' . static::$cacheDirectory . '`'); + throw new RestException(500, + 'Unable to create cache directory `' . static::$cacheDirectory . '`'); } } } if (method_exists($class = get_called_class(), $template)) { if ($template == 'blade') { - $this->checkDependency('Illuminate\View\View'); + $this->checkDependency(self::BLADE); } elseif ($template == 'twig') { - $this->checkDependency('Twig_Environment'); + $this->checkDependency(self::TWIG); } elseif ($template == 'mustache' || $template == 'handlebar') { - $this->checkDependency('Mustache_Engine'); + $this->checkDependency(self::MUSTACHE); } return call_user_func("$class::$template", $data, $humanReadable); } @@ -416,8 +471,9 @@ class HtmlFormat extends DependentFormat { $v = $fullPath ? static::$viewPath . '/' : ''; $v .= static::$view; - if ($includeExtension) + if ($includeExtension) { $v .= '.' . static::getViewExtension(); + } return $v; } diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Format/JsFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/JsFormat.php index 0f04b7f0ee5..913dc272e19 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Format/JsFormat.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Format/JsFormat.php @@ -11,7 +11,7 @@ namespace Luracast\Restler\Format; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class JsFormat extends JsonFormat { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Format/JsonFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/JsonFormat.php index 00c763e8ff5..170676c071b 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Format/JsonFormat.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Format/JsonFormat.php @@ -15,7 +15,7 @@ use Luracast\Restler\RestException; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class JsonFormat extends Format { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Format/MultiFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/MultiFormat.php index 18fdd54b842..64afa3b3ea4 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Format/MultiFormat.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Format/MultiFormat.php @@ -9,7 +9,7 @@ namespace Luracast\Restler\Format; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ abstract class MultiFormat implements iFormat { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Format/PlistFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/PlistFormat.php index cc07066a33c..f1eca01933d 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Format/PlistFormat.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Format/PlistFormat.php @@ -18,7 +18,7 @@ use CFPropertyList\CFPropertyList; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class PlistFormat extends DependentMultiFormat { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Format/TsvFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/TsvFormat.php index 502b02d2758..4eb3006f363 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Format/TsvFormat.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Format/TsvFormat.php @@ -11,7 +11,7 @@ namespace Luracast\Restler\Format; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class TsvFormat extends CsvFormat { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Format/UploadFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/UploadFormat.php index de41bf98c71..b58b0f02b49 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Format/UploadFormat.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Format/UploadFormat.php @@ -13,7 +13,7 @@ use Luracast\Restler\RestException; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class UploadFormat extends Format { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Format/UrlEncodedFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/UrlEncodedFormat.php index 12d5a410333..6d141230d82 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Format/UrlEncodedFormat.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Format/UrlEncodedFormat.php @@ -11,7 +11,7 @@ namespace Luracast\Restler\Format; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class UrlEncodedFormat extends Format { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Format/XmlFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/XmlFormat.php index ceec32e4cb5..6f8606eb111 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Format/XmlFormat.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Format/XmlFormat.php @@ -16,7 +16,7 @@ use XMLWriter; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class XmlFormat extends Format { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Format/YamlFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/YamlFormat.php index 07baae88b6f..4ff643de65f 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Format/YamlFormat.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Format/YamlFormat.php @@ -14,7 +14,7 @@ use Luracast\Restler\Data\Obj; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class YamlFormat extends DependentFormat { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Format/iDecodeStream.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/iDecodeStream.php index 080e3da506c..ec29330ed1f 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Format/iDecodeStream.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Format/iDecodeStream.php @@ -11,7 +11,7 @@ namespace Luracast\Restler\Format; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ interface iDecodeStream { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Format/iFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/iFormat.php index d70d2019a94..0f4173d5b74 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Format/iFormat.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Format/iFormat.php @@ -11,7 +11,7 @@ namespace Luracast\Restler\Format; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ interface iFormat { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/HumanReadableCache.php b/htdocs/includes/restler/framework/Luracast/Restler/HumanReadableCache.php index 6e1c22b432c..2546e30a4ee 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/HumanReadableCache.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/HumanReadableCache.php @@ -10,7 +10,7 @@ namespace Luracast\Restler; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class HumanReadableCache implements iCache { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/InvalidAuthCredentials.php b/htdocs/includes/restler/framework/Luracast/Restler/InvalidAuthCredentials.php index 233e543e0aa..1b402238bf3 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/InvalidAuthCredentials.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/InvalidAuthCredentials.php @@ -12,7 +12,7 @@ namespace Luracast\Restler; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ diff --git a/htdocs/includes/restler/framework/Luracast/Restler/PassThrough.php b/htdocs/includes/restler/framework/Luracast/Restler/PassThrough.php index a77e533b722..2d265fb0fba 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/PassThrough.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/PassThrough.php @@ -10,7 +10,7 @@ namespace Luracast\Restler; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class PassThrough { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Redirect.php b/htdocs/includes/restler/framework/Luracast/Restler/Redirect.php index 63319106759..8203b8eb18d 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Redirect.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Redirect.php @@ -12,7 +12,7 @@ use Luracast\Restler\Format\JsonFormat; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class Redirect { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Resources.php b/htdocs/includes/restler/framework/Luracast/Restler/Resources.php index 2986968a990..dfb547d287b 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Resources.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Resources.php @@ -15,7 +15,7 @@ use stdClass; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class Resources implements iUseAuthentication, iProvideMultiVersionApi { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/RestException.php b/htdocs/includes/restler/framework/Luracast/Restler/RestException.php index b2e51f8b122..4291381661c 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/RestException.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/RestException.php @@ -14,7 +14,7 @@ use Exception; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class RestException extends Exception diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Restler.php b/htdocs/includes/restler/framework/Luracast/Restler/Restler.php index fcb5388726c..0c8f44a3864 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Restler.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Restler.php @@ -15,13 +15,14 @@ use Luracast\Restler\Format\UrlEncodedFormat; * inspired by the RestServer code from * <http://jacwright.com/blog/resources/RestServer.txt> * + * * @category Framework * @package Restler * @author R.Arul Kumaran <arul@luracast.com> * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * * * @method static void onGet() onGet(Callable $function) fired before reading the request details * @method static void onRoute() onRoute(Callable $function) fired before finding the api method @@ -48,10 +49,13 @@ use Luracast\Restler\Format\UrlEncodedFormat; * @method void onRespond() onRespond(Callable $function) fired before sending response * @method void onComplete() onComplete(Callable $function) fired after sending response * @method void onMessage() onMessage(Callable $function) fired before composing error response + * + * @property bool|null _authenticated + * @property bool _authVerified */ class Restler extends EventDispatcher { - const VERSION = '3.0.0rc6'; + const VERSION = '3.1.0'; // ================================================================== // @@ -693,6 +697,8 @@ class Restler extends EventDispatcher * - media type * - charset * - language + * + * @throws RestException */ protected function negotiate() { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Routes.php b/htdocs/includes/restler/framework/Luracast/Restler/Routes.php index 999094dec4c..d59b27d4418 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Routes.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Routes.php @@ -17,7 +17,7 @@ use Exception; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class Routes { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Scope.php b/htdocs/includes/restler/framework/Luracast/Restler/Scope.php index 16ccdd33561..6f7b49daf40 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Scope.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Scope.php @@ -1,4 +1,6 @@ <?php + + namespace Luracast\Restler; /** @@ -11,7 +13,7 @@ namespace Luracast\Restler; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class Scope { @@ -45,8 +47,8 @@ class Scope //API classes 'Resources' => 'Luracast\Restler\Resources', 'Explorer' => 'Luracast\Restler\Explorer\v2\Explorer', - 'Explorer1' => 'Luracast\Restler\Explorer\v1\Explorer', - 'Explorer2' => 'Luracast\Restler\Explorer\v2\Explorer', + 'Explorer1' => 'Luracast\Restler\Explorer\v1\Explorer', + 'Explorer2' => 'Luracast\Restler\Explorer\v2\Explorer', //Cache classes 'HumanReadableCache' => 'Luracast\Restler\HumanReadableCache', @@ -120,6 +122,7 @@ class Scope $r = new $fullName(); static::$instances[$name] = (object)array('instance' => $r); if ($name != 'Restler') { + /** @var Restler restler */ $r->restler = static::get('Restler'); $m = Util::nestedValue($r->restler, 'apiMethodInfo', 'metadata'); if ($m) { @@ -138,15 +141,14 @@ class Scope } if ( $r instanceof iUseAuthentication && - static::get('Restler')->_authVerified && + $r->restler && $r->restler->_authVerified && !isset(static::$instances[$name]->authVerified) ) { static::$instances[$name]->authVerified = true; - $r->__setAuthenticationStatus - (static::get('Restler')->_authenticated); + $r->__setAuthenticationStatus($r->restler->_authenticated); } if (isset(static::$instances[$name]->initPending)) { - $m = Util::nestedValue(static::get('Restler'), 'apiMethodInfo', 'metadata'); + $m = Util::nestedValue($r->restler, 'apiMethodInfo', 'metadata'); $fullName = $name; if (class_exists($name)) { $shortName = Util::getShortName($name); @@ -194,15 +196,15 @@ class Scope */ public static function resolve($className, array $scope) { - if (empty($className) || !is_string($className)) + if (empty($className) || !is_string($className)) { return false; + } if (self::isPrimitiveDataType($className)) { return false; } $divider = '\\'; - $qualified = false; if ($className[0] == $divider) { $qualified = trim($className, $divider); } elseif (array_key_exists($className, $scope)) { @@ -210,18 +212,21 @@ class Scope } else { $qualified = $scope['*'] . $className; } - if (class_exists($qualified)) + if (class_exists($qualified)) { return $qualified; + } if (isset(static::$classAliases[$className])) { $qualified = static::$classAliases[$className]; - if (class_exists($qualified)) + if (class_exists($qualified)) { return $qualified; + } } return false; } /** * @param string $stringName + * * @return boolean */ private static function isPrimitiveDataType($stringName) diff --git a/htdocs/includes/restler/framework/Luracast/Restler/UI/Emmet.php b/htdocs/includes/restler/framework/Luracast/Restler/UI/Emmet.php index 435804b4469..66090568a47 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/UI/Emmet.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/UI/Emmet.php @@ -8,7 +8,7 @@ use Luracast\Restler\Util; * Class Emmet * @package Luracast\Restler\UI * - * @version 3.0.0rc6 + * @version 3.1.0 */ class Emmet { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/UI/Forms.php b/htdocs/includes/restler/framework/Luracast/Restler/UI/Forms.php index 7073bfcf837..20749a2e691 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/UI/Forms.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/UI/Forms.php @@ -1,4 +1,5 @@ <?php + namespace Luracast\Restler\UI; use Luracast\Restler\CommentParser; @@ -29,7 +30,7 @@ use Luracast\Restler\Util; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class Forms implements iFilter { @@ -38,7 +39,7 @@ class Forms implements iFilter public static $excludedPaths = array(); - public static $style; + private static $style; /** * @var bool should we fill up the form using given data? */ @@ -81,6 +82,11 @@ class Forms implements iFilter */ private static $info; + public static function setStyles(HtmlForm $style) + { + static::$style = get_class($style); + } + /** * Get the form * @@ -95,18 +101,20 @@ class Forms implements iFilter * * @return array|T * - * @throws \Luracast\Restler\RestException + * @throws RestException */ public static function get($method = 'POST', $action = null, $dataOnly = false, $prefix = '', $indent = ' ') { - if (!static::$style) - static::$style = FormStyles::$html; + if (!static::$style) { + static::$style = 'Luracast\\Restler\\UI\HtmlForm'; + } try { /** @var Restler $restler */ $restler = Scope::get('Restler'); - if (is_null($action)) + if (is_null($action)) { $action = $restler->url; + } $info = $restler->url == $action && Util::getRequestMethod() == $method @@ -126,23 +134,25 @@ class Forms implements iFilter //echo $e->getErrorMessage(); $info = false; } - if (!$info) + if (!$info) { throw new RestException(500, 'invalid action path for form `' . $method . ' ' . $action . '`'); + } static::$info = $info; $m = $info->metadata; $r = static::fields($dataOnly); if ($method != 'GET' && $method != 'POST') { - if (empty(Defaults::$httpMethodOverrideProperty)) + if (empty(Defaults::$httpMethodOverrideProperty)) { throw new RestException( 500, 'Forms require `Defaults::\$httpMethodOverrideProperty`' . "for supporting HTTP $method" ); + } if ($dataOnly) { $r[] = array( - 'tag' => 'input', - 'name' => Defaults::$httpMethodOverrideProperty, - 'type' => 'hidden', + 'tag' => 'input', + 'name' => Defaults::$httpMethodOverrideProperty, + 'type' => 'hidden', 'value' => 'method', ); } else { @@ -158,9 +168,9 @@ class Forms implements iFilter $form_key = static::key($method, $action); if ($dataOnly) { $r[] = array( - 'tag' => 'input', - 'name' => static::FORM_KEY, - 'type' => 'hidden', + 'tag' => 'input', + 'name' => static::FORM_KEY, + 'type' => 'hidden', 'value' => 'hidden', ); } else { @@ -173,15 +183,16 @@ class Forms implements iFilter } $s = array( - 'tag' => 'button', - 'type' => 'submit', + 'tag' => 'button', + 'type' => 'submit', 'label' => Util::nestedValue($m, 'return', CommentParser::$embeddedDataName, 'label') - ? : 'Submit' + ?: 'Submit' ); - if (!$dataOnly) + if (!$dataOnly) { $s = Emmet::make(static::style('submit', $m), $s); + } $r[] = $s; $t = array( 'action' => $restler->getBaseUrl() . '/' . rtrim($action, '/'), @@ -207,15 +218,18 @@ class Forms implements iFilter public static function style($name, array $metadata, $type = '') { - return isset($metadata[CommentParser::$embeddedDataName][$name]) - ? $metadata[CommentParser::$embeddedDataName][$name] - : (!empty($type) && isset(static::$style["$name-$type"]) - ? static::$style["$name-$type"] - : (isset(static::$style[$name]) - ? static::$style[$name] - : null - ) - ); + if (isset($metadata[CommentParser::$embeddedDataName][$name])) { + return $metadata[CommentParser::$embeddedDataName][$name]; + } + $style = static::$style . '::' . $name; + $typedStyle = $style . '_' . $type; + if (defined($typedStyle)) { + return constant($typedStyle); + } + if (defined($style)) { + return constant($style); + } + return null; } public static function fields($dataOnly = false) @@ -230,11 +244,13 @@ class Forms implements iFilter is_scalar($value) || ($p['type'] == 'array' && is_array($value) && $value == array_values($value)) || is_object($value) && $p['type'] == get_class($value) - ) + ) { $p['value'] = $value; + } static::$validationInfo = $v = new ValidationInfo($p); - if ($v->from == 'path') + if ($v->from == 'path') { continue; + } if (!empty($v->children)) { $t = Emmet::make(static::style('fieldset', $m), array('label' => $v->label)); foreach ($v->children as $n => $c) { @@ -243,11 +259,13 @@ class Forms implements iFilter is_scalar($value) || ($c['type'] == 'array' && is_array($value) && $value == array_values($value)) || is_object($value) && $c['type'] == get_class($value) - ) + ) { $c['value'] = $value; + } static::$validationInfo = $vc = new ValidationInfo($c); - if ($vc->from == 'path') + if ($vc->from == 'path') { continue; + } $vc->name = $v->name . '[' . $vc->name . ']'; $t [] = static::field($vc, $dataOnly); } @@ -275,7 +293,7 @@ class Forms implements iFilter //prevent XSS attacks $p->value = htmlspecialchars($p->value, ENT_QUOTES | ENT_HTML401, 'UTF-8'); } - $type = $p->field ? : static::guessFieldType($p); + $type = $p->field ?: static::guessFieldType($p); $tag = in_array($type, static::$inputTypes) ? 'input' : $type; $options = array(); @@ -291,25 +309,33 @@ class Forms implements iFilter $option['text'] = isset($p->rules['select'][$i]) ? $p->rules['select'][$i] : $choice; - if ($choice == $p->value) + if ($choice == $p->value) { $option['selected'] = true; + } $options[] = $option; } } elseif ($p->type == 'boolean' || $p->type == 'bool') { if (Text::beginsWith($type, 'radio') || Text::beginsWith($type, 'select')) { - $options[] = array('name' => $p->name, 'text' => ' Yes ', - 'value' => 'true'); - $options[] = array('name' => $p->name, 'text' => ' No ', - 'value' => 'false'); - if ($p->value || $p->default) + $options[] = array( + 'name' => $p->name, + 'text' => ' Yes ', + 'value' => 'true' + ); + $options[] = array( + 'name' => $p->name, + 'text' => ' No ', + 'value' => 'false' + ); + if ($p->value || $p->default) { $options[0]['selected'] = true; + } } else { //checkbox $r = array( - 'tag' => $tag, - 'name' => $name, - 'type' => $type, - 'label' => $p->label, - 'value' => 'true', + 'tag' => $tag, + 'name' => $name, + 'type' => $type, + 'label' => $p->label, + 'value' => 'true', 'default' => $p->default, ); $r['text'] = 'Yes'; @@ -323,13 +349,13 @@ class Forms implements iFilter } if (empty($r)) { $r = array( - 'tag' => $tag, - 'name' => $name, - 'type' => $type, - 'label' => $p->label, - 'value' => $p->value, - 'default' => $p->default, - 'options' => & $options, + 'tag' => $tag, + 'name' => $name, + 'type' => $type, + 'label' => $p->label, + 'value' => $p->value, + 'default' => $p->default, + 'options' => & $options, 'multiple' => $multiple, ); if (isset($p->rules)) { @@ -347,30 +373,36 @@ class Forms implements iFilter $r['message'] = Validator::$exceptions[$p->name]->getMessage(); } - if (true === $p->required) + if (true === $p->required) { $r['required'] = 'required'; - if (isset($p->rules['autofocus'])) + } + if (isset($p->rules['autofocus'])) { $r['autofocus'] = 'autofocus'; + } /* echo "<pre>"; print_r($r); echo "</pre>"; */ - if ($dataOnly) + if ($dataOnly) { return $r; - if (isset($p->rules['form'])) + } + if (isset($p->rules['form'])) { return Emmet::make($p->rules['form'], $r); + } $m = static::$info->metadata; - $t = Emmet::make(static::style($type, $m, $p->type) ? : static::style($tag, $m, $p->type), $r); + $t = Emmet::make(static::style($type, $m, $p->type) ?: static::style($tag, $m, $p->type), $r); return $t; } protected static function guessFieldType(ValidationInfo $p, $type = 'type') { - if (in_array($p->$type, static::$inputTypes)) + if (in_array($p->$type, static::$inputTypes)) { return $p->$type; - if ($p->choice) + } + if ($p->choice) { return $p->type == 'array' ? 'checkbox' : 'select'; + } switch ($p->$type) { case 'boolean': return 'radio'; @@ -381,8 +413,9 @@ class Forms implements iFilter case 'array': return static::guessFieldType($p, 'contentType'); } - if ($p->name == 'password') + if ($p->name == 'password') { return 'password'; + } return 'text'; } @@ -397,11 +430,13 @@ class Forms implements iFilter */ public static function key($method = 'POST', $action = null) { - if (is_null($action)) + if (is_null($action)) { $action = Scope::get('Restler')->url; + } $target = "$method $action"; - if (empty(static::$key[$target])) + if (empty(static::$key[$target])) { static::$key[$target] = md5($target . User::getIpAddress() . uniqid(mt_rand())); + } $_SESSION[static::FORM_KEY] = static::$key; return static::$key[$target]; } @@ -425,8 +460,9 @@ class Forms implements iFilter $url = $restler->url; foreach (static::$excludedPaths as $exclude) { if (empty($exclude)) { - if ($url == $exclude) + if ($url == $exclude) { return true; + } } elseif (Text::beginsWith($url, $exclude)) { return true; } @@ -447,4 +483,4 @@ class Forms implements iFilter } return true; } -} \ No newline at end of file +} diff --git a/htdocs/includes/restler/framework/Luracast/Restler/UI/Nav.php b/htdocs/includes/restler/framework/Luracast/Restler/UI/Nav.php index b74054a99c5..4a7445ccbe6 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/UI/Nav.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/UI/Nav.php @@ -19,7 +19,7 @@ use Luracast\Restler\Util; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class Nav { @@ -130,7 +130,8 @@ class Nav } else { return $tree; } - return null; + $value = null; + return $value; } public static function addUrls(array $urls) diff --git a/htdocs/includes/restler/framework/Luracast/Restler/UI/Tags.php b/htdocs/includes/restler/framework/Luracast/Restler/UI/Tags.php index 2c194cdbd1b..27e90bc89b5 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/UI/Tags.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/UI/Tags.php @@ -14,7 +14,7 @@ use Luracast\Restler\Util; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * * * ============================ magic properties ============================== * @property Tags parent parent tag diff --git a/htdocs/includes/restler/framework/Luracast/Restler/User.php b/htdocs/includes/restler/framework/Luracast/Restler/User.php index 57465e26e46..463fd46867c 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/User.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/User.php @@ -11,7 +11,7 @@ namespace Luracast\Restler; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class User implements iIdentifyUser { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Util.php b/htdocs/includes/restler/framework/Luracast/Restler/Util.php index 9674550814f..a181a0e0da9 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Util.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Util.php @@ -1,5 +1,7 @@ <?php + namespace Luracast\Restler; + /** * Describe the purpose of this class/interface/trait * @@ -9,7 +11,7 @@ namespace Luracast\Restler; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ class Util { @@ -50,8 +52,8 @@ class Util * When the deeply nested property is found its value is returned, otherwise * false is returned. * - * @param array $from array to extract the value from - * @param string|array $key ... pass more to go deeply inside the array + * @param array|object $from array to extract the value from + * @param string|array $key ... pass more to go deeply inside the array * alternatively you can pass a single array * * @return null|mixed null when not found, value otherwise @@ -77,24 +79,29 @@ class Util return $from; } - public static function getResourcePath($className, - $resourcePath = null, - $prefix = '') - { + public static function getResourcePath( + $className, + $resourcePath = null, + $prefix = '' + ) { if (is_null($resourcePath)) { if (Defaults::$autoRoutingEnabled) { $resourcePath = strtolower($className); - if (false !== ($index = strrpos($className, '\\'))) + if (false !== ($index = strrpos($className, '\\'))) { $resourcePath = substr($resourcePath, $index + 1); - if (false !== ($index = strrpos($resourcePath, '_'))) + } + if (false !== ($index = strrpos($resourcePath, '_'))) { $resourcePath = substr($resourcePath, $index + 1); + } } else { $resourcePath = ''; } - } else + } else { $resourcePath = trim($resourcePath, '/'); - if (strlen($resourcePath) > 0) + } + if (strlen($resourcePath) > 0) { $resourcePath .= '/'; + } return $prefix . $resourcePath; } @@ -114,8 +121,9 @@ class Util */ public static function removeCommonPath($fromPath, $usingPath, $char = '/') { - if (empty($fromPath)) + if (empty($fromPath)) { return ''; + } $fromPath = explode($char, $fromPath); $usingPath = explode($char, $usingPath); while (count($usingPath)) { @@ -145,8 +153,9 @@ class Util */ public static function splitCommonPath($fromPath, $usingPath, $char = '/') { - if (empty($fromPath)) + if (empty($fromPath)) { return array('', ''); + } $fromPath = explode($char, $fromPath); $usingPath = explode($char, $usingPath); $commonPath = array(); @@ -213,11 +222,18 @@ class Util $accepts = array($accepts); } foreach ($accepts as $pos => $accept) { - $parts = explode(';q=', trim($accept)); - $type = array_shift($parts); - $quality = count($parts) ? - floatval(array_shift($parts)) : - (1000 - $pos) / 1000; + $parts = explode(';', $accept); + $type = trim(array_shift($parts)); + $parameters = []; + foreach ($parts as $part) { + $part = explode('=', $part); + if (2 !== count($part)) { + continue; + } + $key = strtolower(trim($part[0])); + $parameters[$key] = trim($part[1], ' "'); + } + $quality = isset($parameters['q']) ? (float)$parameters['q'] : (1000 - $pos) / 1000; $acceptList[$type] = $quality; } arsort($acceptList); @@ -227,8 +243,7 @@ class Util public static function getShortName($className) { // @CHANGE LDR - if (! is_string($className)) return ''; - //var_dump($className); + if (!is_string($className)) return; $className = explode('\\', $className); return end($className); diff --git a/htdocs/includes/restler/framework/Luracast/Restler/iAuthenticate.php b/htdocs/includes/restler/framework/Luracast/Restler/iAuthenticate.php index 6bacb8cec09..954055343e4 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/iAuthenticate.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/iAuthenticate.php @@ -11,7 +11,7 @@ namespace Luracast\Restler; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ interface iAuthenticate extends iFilter { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/iCache.php b/htdocs/includes/restler/framework/Luracast/Restler/iCache.php index 37d6aaea261..3b6504340b6 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/iCache.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/iCache.php @@ -9,7 +9,7 @@ namespace Luracast\Restler; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ interface iCache { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/iCompose.php b/htdocs/includes/restler/framework/Luracast/Restler/iCompose.php index b06b2c3bc6c..2bc0579befe 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/iCompose.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/iCompose.php @@ -13,7 +13,7 @@ use Exception; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ interface iCompose { /** diff --git a/htdocs/includes/restler/framework/Luracast/Restler/iFilter.php b/htdocs/includes/restler/framework/Luracast/Restler/iFilter.php index 89b50ce9812..dc1b355db0f 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/iFilter.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/iFilter.php @@ -12,7 +12,7 @@ namespace Luracast\Restler; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ interface iFilter { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/iIdentifyUser.php b/htdocs/includes/restler/framework/Luracast/Restler/iIdentifyUser.php index d3dd4a5d8c5..834897668db 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/iIdentifyUser.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/iIdentifyUser.php @@ -12,7 +12,7 @@ namespace Luracast\Restler; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ interface iIdentifyUser { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/iProvideMultiVersionApi.php b/htdocs/includes/restler/framework/Luracast/Restler/iProvideMultiVersionApi.php index c7afe11fcb7..b57fc876f41 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/iProvideMultiVersionApi.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/iProvideMultiVersionApi.php @@ -5,7 +5,7 @@ namespace Luracast\Restler; * Interface iProvideMultiVersionApi * @package Luracast\Restler * - * @version 3.0.0rc6 + * */ interface iProvideMultiVersionApi { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/iUseAuthentication.php b/htdocs/includes/restler/framework/Luracast/Restler/iUseAuthentication.php index 611d909b305..ee3a9e0bcca 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/iUseAuthentication.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/iUseAuthentication.php @@ -11,7 +11,7 @@ namespace Luracast\Restler; * @copyright 2010 Luracast * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://luracast.com/products/restler/ - * @version 3.0.0rc6 + * */ interface iUseAuthentication { 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:VCARD -VERSION:3.0 -N:Benutzer;Test;;; -FN:Test Benutzer -PHOTO;BASE64: - /9j/4AAQSkZJRgABAQAAAQABAAD/4QBYRXhpZgAATU0AKgAAAAgAAgESAAMAAAABAAEAAIdpAAQA - AAABAAAAJgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABQKADAAQAAAABAAABQAAAAAD/2wBD - AAIBAQIBAQICAQICAgICAwUDAwMDAwYEBAMFBwYHBwcGBgYHCAsJBwgKCAYGCQ0JCgsLDAwMBwkN - Dg0MDgsMDAv/2wBDAQICAgMCAwUDAwULCAYICwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsL - CwsLCwsLCwsLCwsLCwsLCwsLCwv/wAARCAFAAUADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAA - AAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKB - kaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZn - aGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT - 1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcI - CQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAV - YnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6 - goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk - 5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD8J7JbO8tYo1tIFCDLOVG5qfdaVZRwmSOFWzyA - F4H1rLt5WViMhdp6HgmtKK8O3B+4Rhx6fSgBI9FtjaNN5aErwRjilSys7lFAt41xyTtqc2yJCVlY - 7eqgGqv2jyLcebjZnGPWncdzT0+w0u5eQXtrGiBcIyoPmNMXwpb/AGMTSRRbH6YAyPwqK21GKdfL - BAVfu+1SQX4jnjKFsp03dPypCKN9oEaKSkC7R0bGKpnSlSPdHErZOORXV3Ouy337sCLB6kpx+FY0 - t+VfyrgcbuCB1oAfoMemrcImq2sZX+I7ATXS618PdK1DRlvvDEaMq5LoV2nisx4LVrUfu5BOePau - m8EQS6PY3HmFXjljKhTzjOf1oA4mz8OxvMrLbW5RD8wbByKg1LRrRriRYY408w/KAMba1pRaWt/H - a6a7CVm2u7N8lUPEujzaRekzSK6tgqVNAGNBZJauY5Yon92GTRJp0ROY0Un0A4q3c2odkaYOMjii - KL7NIDGcj1NDAZBplmmWv1xnoFHStfS/DFpewqYoYm3DutZ8lv8AapdyOqk8EVteEbSe3KBSrDrQ - BT8S+HbawiiWGCAPjsuMnPesqHS4JSFlSMP7DitbXbvfrkkM2eGw3p+FMfTh5X+hr8w7t3oAhOhW - u8MkMZUY3fL0Heo9UsrN5FFrbxKmMBgoG41fWFra0Acjpzg9aoXjtgRoo29vagCoun27kbY059qn - bwykskYjRArdTT7GEl2UqMr2q/JtVU27iR15NADdK8DC/wBPle2iicxNg5ALH6Umm6FZ/a3ttQt4 - g2Cqnb0PbJ+tamn3j6ZCW0nILfeBORWVfO4dhLw7fMW7560AZuqeHf7MuTFcRpv6qVGVx70q2Eci - QwyW0SsPvOqjJrUtb6S9tHQKGeMZYuM8VUs7gRxbrncy9mWgB1x4QtTHvsQWkHJVhhax3tkhugHh - UkfeAXIFdPZ3v2uxkQ9G4jI6/j+tYun3r2Fy6yxeb2Py5IoAqXenJ5xaGNNvXH/1qcLSGeBdkSg9 - CcdaswC3be0pfexOMnpn2qaS1KQkQASKoydvLCgDNi09RKTNCuO2BxVjSobc6gqXMERQHkleDUsc - u9VADbG6qOWAp11bLbptkjlCkZRsde9AFi5sbO3kKfZYTnkHaOlVbuO2F5thtYcADjaKXUpHj8ku - Co2VDFL5wLeg696YFwQ2z7Qtlb8HJO0c1Zsr7T7a9kL6XazZ4CmMFRWfHdkEgjGRjPpU9raP5LSP - j5h2pAWdQ0+z1KdG+y21qvcRqBn8qXSvC+iTu63ssqyE/IAuR+NQwSrGm1g+c8E9qiSQW9wPNYYP - OR2oAW68GNa28k3lwGNHwvzDJGfSqM9nHBgm3j59QMVdmma4zIjsUBHy5OKp6o8s2BJjZjjAoAro - /nysbgYY9zWmLPCR+WQQwyaz4k2F/Pbft/GtKxvUeFN+B2x+NAEptsWpZSdo9etZe8su2X7pPFdU - LeOazKqVwevNYt7pw5EA5HIxQBQA8tAIeGz1NWIJvJlhW5OQBzjrUMR/eN9pwoXjB4qQ3ERJeYcy - 9P8AZoA0jf8AmybVxsHAFS6jp63ixmwjIwOfrWfaou12GcDpmt/w5qJhXc6hh2GM0AZkHiRpblVl - G0RjGMdxXQ+H/E0Rm+bjdw1crqEHm3EksY4Y9PTmq0cskc42qUOfpmgDovHOhLBOZ9O+aEnIUdRW - QZft1sgum/1Ywua3fDfiFDL5WoEPEwxzzirPizwTFPZC60kYUjcAp4NAHPSq91EoRS3061DHD9nb - 94Mkfw020v57GbcCRt4IIqzNcedIH2jc3JyOaAIYrRZmJxtNdB4fkGn2hluBgBR+NZ2n2X9ozAQD - 5qvaxGbKIRXkuFU4C96AMDxBKZdQkuEUkStuUegpNM1eWScAkqpHTHNPlwbjMzExZ4Pal1PS/s6+ - dY/6vuwPSgC9G8c0A+1xEknrnpUVxaeXNm2dVUfjVazvEZAEkMrccZzV1YYyBIhJP8SZ6fhQBSmV - 4JfMVT+96UJdSQdcMO4A6fjVmTUoJiqTOMJ/q+elRyQs0TtaxF0PVhzmgCzpd55r7YI2HHPTmrV0 - sDTF7gnJXGO4OKyNKgn80NbFhjoBzWjqdg6SISPmIBOaAKVnI1leyhsMJOD7CqOqRtZqotjiFulW - rhsSMshKH1ogsZbmF475TKifdf0oApabevHIAhCYOdxp0t59luS0I+995uxqpdRyWsrqmXGeCR/K - rVlZfaogqv8AvD/CaAIY42kV3K5zzn1p9jNLp6u/A80YPNWWsJNPAVpC4JAZT2HfFWJoVmVVjhVk - HTPrQBPoi2wsoo4APtBHL+tP1mS5uVEFxgJGNqH15plp5WmyBriMRsowM8UybXTNdbrpd6A/KKAD - xbJAGs44FIPlnd9c/wD16ynt/LiDW2SR2qa5vP7RnMs6BNuQMd6jhkAUb2K8+tADYp0fhj8w6itC - yQ3CFYeAOoqi8Uew+UMuf4u9T2NwIW+UgMetO4FmS6RJ1ik6HqxHAqC+gimUiA8DvjrU0kcE8ieY - itu+8c0+bShaWxksSZoM4b0SkBTgha0cq33Cuc1SvrrLFV6jpWqbuGe1HnnDdAKy7i3WSY7OT2NN - AMulWSV8ZDNzxV7SlbaFjClx69Kpww7W3ct7jpUtnNJHd5UjZnt1NIDdt7h7NQ7qGfpt7VR1XVEh - dhEpP94/4VpafexTy7ZlbBGDVHxFbQh1j04HaOTkdKAM5ZVlYso3E+tVp4w8gx0Bqd7QxNu+6D6V - DIoVySxAx2NAFyNmli2pjYBz61paW3lWrFS3BwP8/hWJbTBFJy2D6HgfWtiTWPsqxraBHyOeBg0A - RSoLSTdIepzz0606exTWyQGMXljORTNT1B7+ECZR5fHzDqapfbHjbFkTsIwSTQA43ptyyS44Paun - 8N64Z7Bre4YlZBtU5+7XLTQbjwN4Pb+IfWn2lw9uyrIw2Z5HpQBv3GirHc7LxWVZOVI71FNp7WDg - QYlIIGD6VvaPdi+tljb5yeAzcn8DT9YtbPSpVhDM87jJ3Htjnn6UAUIrJreD7Si7MDoKhv8AUxqt - pGt5GqIOr9zRfLM8ZFgZGtex2nGe4zWKN8rsDhYx2JpJ3Atx+HxcRSzWcpcL/CRwaj0zW1sQy3cS - nsFPSoYJpbIl7dm8tT8wzV7+0hqEO1Y4lQ9cqMn9KoCp9kW7kaaxU+Yx+5j5etWrb/RGxfr5bkdu - lW7KFILpfspDbVyc1fjNnrLtHqOYWP8AFjGfxpAc/e6Ql/GzW4AfqBWfpupS6Xer5vPlHmMjg10V - 5pp0u4JhYNGvAYHrUn2WLWrVo41AvSMRZAC/8CPr1oAvafdWOuNG+lqDekY+zg8MPXPX/wDXWZrF - tcWNw0erKElB4Rf4R6c1BpqyaBdbrnEcwyAc4x06H0rQS9a9jUTgOXPzMwycexoAw7u1jYb3zkU3 - Srtgdk54PFamv2C2pDQbWjcfKCeSa56aJld23YA6ZOKFqBrXGjjULuOKxKuZOTn+H/OKwr/ztOvs - uCrg7RgVLYapPbXAEW4EkHJNdBNBH4gtgyhFmXuw60AVpbT7VpiPJ94jLetQWsDRSIYz8mec1c0+ - 1nexdrw7GjJXk/epsFtDPG0bOdw+b5SaAKWsXA+14Y71FQi5S4RvlAC8A0y5hHmHarhvQ9BVGSQx - sUXPHX3oAmDCJ8rzgHg96gQ+ZGWbg9vahNRG7EnalkkF6hEXyD270MCWF3aEhdue1OsmNnMAih/r - VaBgAUY8561PaubdnMxJXseuKANhIY5Assp2v12itZtAgubEi2nb5xuKYHWubstQaO6SVzujTqpP - X8K2rXWLRF8xZJPMfjAzgUAcxcNiaRSpUocc96sW+yNgZCMVF4lvJdRvTOYkj52jbgZ98D6VWmlY - 2qCUnJOKaVwCzviibANwYc8Utkdl7tbKhjxmpUspvm8tgn16ipigSEG4G4pxu9TSA27GeFbRlGGm - P3cdhUN8GEP2hV3JjafrWfpU/wBmuAcZLA4/Sr1trkarJHcRmSEZO3uTQBmrcbZCLoDZ2x1qOHSi - yebJIAPQipp4kmbzI1EQJ6GtCxsoHP8Ap91GB2yDQBlSWO+M/ZsBHHzZ71XkfMIWNgGU9vSt3U9N - t9m21uonz0Iz/hVCfRkjg82FhtHDGgCuZ8EMjDZjBzSZ8pAwU7XbGT0pWtEjjAZgV4PFOml2QKqk - OoOcU1qBNYRSrdkrhw3BIrah8KwXoV/m3PyVzyDWNp999kccgZq/ea7PFAGgZlJ6EUgN23thpdi4 - V1Eucr7ev9K53V/ER1a/MkuWdBtG04zioLrXJ5wDK2XAxmqVqmZ2YPtHJ/GgDsvC3i0ppr2d2ish - yFAHIz706bRLNdOPnErKw4y3NcvZ3pjA8o4kB61o3OpSX9nbx3QIkU/MwoAj/sGaPzFjlWSJjk46 - ioYYwqssjIHHAHpWm4ESN9nYDIFZV+I7uVI1wrY5b1oAtafcvb3W4MM9Nx6U/VZpNRys54ToU4zW - KXaDKrJuC8cVdtpi1gzs43HNAD9N195bdYtRIUR4wD1NX2KuA9uThuSQelcsZwzq9xyzfezV/SdX - e3m8pXJhkPKkUAdYZk8RywjVVJES7U2cE/WtA+HDHohuY3Uxg7RF/GeaPBlxaawMW6rHKnAU9SOO - lX/FFv8A2bpzTQk+cpAAz93nrQBx+r4c5CODEOA3Y+wrKu5V1C1GFKznkk9K6Wzv49fs8Xf7y7DY - MhGNgrmtX0s2t66WknnKvUp0/WgCnbrJFdot0NwJxkDFdDYp86oMjjIArJivxbR7LuMyEjKitS21 - MW8auuW44H93/PFAG15aXdr5Uv7uULkA/wCFc+Yvstw0at8+eoq/p+rm6vRJMNwIx9KranYySXSy - WEZZHOCw7UARXFyj5STAk7ntWVf2gALLyfUVoataLbfLO2SO/Ws2c+VwhLK3QDpQBmz2xAyCG56d - 6uWPlnCkFcjoTzUBkMc/3cZpwn8oZkDFs8HsKALN1apDIHOeaiLkRkMOtSXE6yxAsRUcdxldswIJ - HANMCuJW8xQgOP51oacWPPGAeRUUOIZQzDhecd6mbIcbPusM0gLmq6bHPohlhDeZuH4c1zzF1+Rs - HByDXTae0s0IhjjZg3GPWqOs+HpLCTbNGyb+cHrQBZitjPEzW/LL97vinw2v2m2aORec9AKXQbsw - ygBBiX72TWxfaS8kiGFQAwz8vWkncDlbqNraT5cjb/n+lMGckx8kjOa1tU2TxkPkMpxyKyrhJ4Wa - KIDbTAkgvIp7URzgBwe/BpZYrd4vmZWNZ81x5cgBXDdzVlIvtUOGIBHpQA2aEROpR8DsB2q3bvG9 - iySzEsTkLnrVMqViCZzt7nrT7GBVuQRnODQA6Q+Sx80A4HApEJB3BAR9K19EmhkvCJ0ZsKe3tUc8 - Mc1yy7cpn6YoAzoUiclnYYY8AHpUl8zRxqpPy9qtC2tULgSMAvQ460lzIl9b7YiDt4GaAKMMQlJ5 - z9Kj8gIW5yKnS3Crlzhh6d6k0mbyZT565Q5z60ANtrRpPmhzWhbwy7DJcDhhwMdKlt7aK+gb+z33 - yKdxVuMCqaz5cqGYfWgB6yu8rBB8o6Gs/UpjGQXBGPTvVmSfyImyepqrqjbIw3WgCDz1ib9yOTg4 - NbVlNBJYvlVBHt1rBaPzQWU4IHSn2FwRJslJxQA6e3M0O4oAzdB6VXR2iKGQENGOK0ms1eAkFjF/ - BjrVGaAo371smgC7pety2kwl06Vo5AOWXmuwm+Itv4g8Ota30aWlySAJQfmkP/1zXIeG4Y5SVBB3 - evamXGly2tydwG0nKkHpQBZ86fRbpBLI252y4PGRWhO8Ml1IbJhHn+BTnNU9O1oRwvDqqhB2lHJP - 4U6awb+z4JdKbzdh5ZurDHtQBat5LaRHiaOP7QejEZKD/Oauy+FI7W3Bsroyhxkq3QH8q5a7ujM8 - nWOQnBqTR9burCT98xdR60AbbaHc6ZG3ymJsZC/3hVnw/fNIXt7hygHzZp2oeIBqCxzqfmCgEe3+ - RVdrmLVAEtf3bxfOW/ve36UAV7+7DXMu5Q4/Os2e3eRWkiAGOijtWrPodxfQmeNVAPOPWsppJIpi - JxsKcY9aAMwRyTSbpflx68VOYvOXb97OKtXAiZdzkqT0AGc037BIIRLHjsR60AVprZrZwGj4qTY0 - xyRj3PUVMJDduFfqvFRzxJCzrCzEr60ALEu+YI53c4qeGB7lGCnBU4FUopTBLvfk1at9R2sAMjNA - GtaXsnhy2FzPHvC46jgnNQ33imTXrkz3oVFAwo9Kfrtq03hAzEfJ5gyc81hWM5hhKrhgT0NPcByS - P5g2uVI98Vp6X4uuNGlyzCQIQR0bI7/1rNQxqW+05J7Y4qK5ZYUP2ZCW9TSA7SR9M8V30X9nMFZw - WfcNi5qPWPDtjo0pE7O03U/Mf055rmtFmN9E0DEox+atPWbiW7lSO8Ja4jQbcDC4A9PXFADYtM0+ - 6nc3u7aOm3IP6Vnak9tYt/xL/M445zTIbieOdmWNsE46cip42EkyC4hYx469KAFsrT7XEJgFPOT6 - 1s+H9PD3XlzxnL/MDtqn9pghgb7GjL/eJORWqfEnmrA9oFRoxjJ5BoAp6NqDW2pzRXtuyIAw3FMf - rVS4iF08pydmeCDxWvqeuC+Ro9qglcMw71mwReXD5aAlFJPPU0AZ0cEsbkSZKH15FD2xJJiJVj6c - VfnzLGEXAA71PFpDPaebE6/KOh60AYVws8TBgrFe57CmHUG25RVJA7AVozzSLbNvX5T1AHNY/m/Z - nPlqwDetAEtvqzJNu3FZBwQBjI96vPqkd3mRtokH31UYx+VZqWruxaFl+frkZxT1tvs1ujJgEH5m - PR/pQAXl2S371XAHI+Wkaf7VD8hGR2arKySylRccQ98DmiS0jifdsdgeODQBQd9x3IBx1xTYlBm3 - En86sXUAwPswKg9QeaBErIEj6nrQC0NHRtUjt0K3AHzDABGcVW1fTzJL51jyOpz0NVooispebBI4 - wK2YFEthk8qR07igDAgJil+TKtnnHFaP2h5yI3ZsgdSfaqd2P3im3BGM9aktsjmRgCOaAJZrMwR7 - 3A5PT0pdMvZtOning+byzuVDyh/A8VHczSzDPy7RwOKgiuHEewjKeoFAzp7TUNM8XXEw8RhYNQmP - 7ny18uNeOM7cCtMfDiS8uY0tDEYghyynjPbn864htP8ANhLIehzWzovxDvtFsDB9+PI4I/rQI0r3 - wNc6DO0N2VaQqW2q24YxmqFhYRgE/vkkDfMGBBP4GrSeJ7tZd6SxvIfmK4yQP84p0XiyC71gS65G - 00zAKGX5Qv4UAbFpd28WnIsBLsDzmub1+AXt1LJEoQqfu4xu+lbWsWgs4/NsCXjPIbqK5+5kklmE - rDD54BFAGb5cjybCrAnnB6ipEvXil2sM4GMVpFY7m4UNmNyOWJ4qteaM0BISVZe+RQBFHC2/zISg - B69KlIVhIHA3HuR70lqotlBulY5P4Vcls44k3u6N5oyoHb60wM6O1SRir5LemOKv2vhuW4iLg7VA - 6k4FTR2ax4aaVIwR3HWqGua5PcQm1WRBH6jqaQFzWbE2nhzynuIi+8HaHyKweJSEQEN6jpVcKyOw - cMVznOeKmtZvOPDKuOKAJbi0JYFf4eue9IW8sncfvdqnlvVFyFyu09abI0bysMZx0oArC4eCTcgb - juK2dNvE1N1M0ohljGQzc5A7cfSs6aweWAk7kTuapQysIT9mOSvG49aAOkvzLMxk06QNuG1l7j3r - PlnnJAuGJij+nNQ6XqT7wEYqyn5v9utLULaW7j321uiEjLqMkKKAIotbghb/AI8hKGPIBHNXLG6t - 7uzk3RLbKG/iP+Fc+8f2d1eFztzyD2q5p2oCFWRoxOX52nPFAGgLyC2lyZFKdB70r69buxRJBHjr - nvWVdeXLE7xE8fwnoPpVKZUnQPkBhwRmgDq7a9tLyARWiiWYngL1qG4gurJ28+NowO2a5a3v3smD - aa5WUd1HNbC6zI0KSX13JO7D5lbHFAE4V7pi0b5x1GazdUtXSM7v4iPw5rQ0/XrcXX75FgUdxzuq - /qFrp+sWRe3uDkc4BFAHLRDY42ycd6uPOXiiV+RGPlWnXOg3IQvEmIB/Ft6/jUUEZmMcgydvzECg - C1G2+Ly3YAvyM9qY88kaFcmmp807uwPJ4FS3do+Fzn5ulAFVrjbgS8Z4yah2C03SMffNWZdPknVA - iluQOnHWmX9pILvyY13HHK46UAVre7LSyOCTmtjSiy7VijLeZ0IqO08OzPIUiTI74Ga6bRP7O01F - h1KYJOv3V4BoA4zU1lExMrkbOAvpVcSifhjgrzmtjxPp7pO7SggOcqfUViy25hG5fSgC8rrLAojb - d7d6SexlEgwpRfTNV7e5LFBbKAwPNWHeX7TguxI7GmBPBExhaNVIJ6egqOVknO1fkx1J61aj1gLC - UEKlk4LVWvozC67kCFxkD1pAQ24e3uDLC3z9CR3H/wCqrczJdOGiOxvYc5/CocMYhtUBj3xU8Qjk - XbKPIZOjqclvzoAu2HiO60xPKvd7wY/1fGBWnJo8WuW6y6XIPMYZEAzuH9KxISonAuzuRzgk9qtR - 79KmMuhTt5cRyxznFADLzS2tMw6pAY5OoDEZ/Sm20TQQ74YwVQckGtMatB4kUpqreVIRw5+8aqXF - jc6bAsbD9yThWz94UAOmmjvrRCMJjOQRVS0sD9pLyABM5Of6Vdtrdn+RUGcZqO6uRBG0MuFI79KA - MfV7r7ZqDI7kohAVT6U2eJNimJQOuTnpSXFussrMvBz1pJov3YUsR9O9ABblRncQ3bAqY2EUwIiA - Vqr20ojfYqZx3q9bSKAGcYJPIoAoq7OCEQBffrRDGEcleM8nNPjuGkhHmbB74ApvmxltsuTnuDQA - +SFEjDwu5buD0qpLL5vMg2kEdOlXECMAyZGOMMePyprQRI5N0rt3BXO326UAV4b0Wt0pC5HrXS2W - qq9zE7jcO+OhFc81kbg7iMqeAFHSpLa8eymaNOUIwD6UAavjPQYYybq1bBmXcF9O39Kw4iXdDKcE - DAxW3q7NdWELISdiYIz71kz6ZNZNHI0cjqQfujIFAEtzAtu/7vODzmqlyzNyAo9vWp7uWSWJd+AM - jjGGqOWCSWRVVW2+uKAKskpWU5TP0p8c+ExsPPNTmCVD+5U/QrzRJHJGymeOQc45HFAFczh497KR - jirWlEsAudvII9znitEeBp7yAPZvEVPJUsP5ZqCO3j0yYDUNwliI6dOPpQBt/wDCR3Wj6eHFujvI - do3DIX9KoHXoL6J11CJYZAONlaWueIYtY8Nwx6ZHu2MdxVeTXKG0eaXKRuCeuBQB0mn+HRe2Yeze - MqRkFmwfyra0rwsIrRmvZICcgDLVw7xXFuFd2uEQfeAJAxUkkjSxh4J7gjPAErf40Abvjq1i0y4S - KByCdrfL+FUI7SR4Wc+WzMOCW5qhf3Mt9cCV2ZiihRk5qpdTSBgRI+R2DnFAFw2k6AqJZMjuD1qn - cxzyyAkPuiP3ieT/AJzV+01R7a2RpMZPVmGQ1WVuTqLDCptcfMBwRQBEkst/YMCSTH8vJqtJaoYQ - JPv1o+ZDZKAo+UnBpmrCBpRNp4/0crgZ9f8A9dAzCdGgkOynxSus2xjkj+L1qW5/fxYj+8D+NRWz - R4fzCd2O9Ai0lzI6mPaMOcZqW4uI7rbtJ3IMc1XScKqncQT0olPlKWfBz6UATKjSDcmdoFWtPCyR - kzckHiqUV0623lKVIPzHHWp7Ic/vSRz0zQBcCqdyT4J7YqC3uZdKv1a2UupO7B6H2NMglMUsmcnd - 0Lc4q3BmaMBiDjr60AWJRBfyb9P2RueWJ6KfQVLHqMdtcEysxJXayN0x0yKyWihWQBdwTOSdxHNb - zWEF5ErXhX7QQAMNge2f0oAnhs4rq2kksHwirkg9SfauXnJnmL3AbL9jXSRWh0N28x1cEfMqtnA/ - Cs+70+O9/fWRIb+76fhSTuBimbyyyKDgnipLk7AML1pZbCWO7Hnjn26U6ZykRL+veqAryuvm/Jwf - Sk3mo2AyHyCT6Ux5pLU5Gwg88gGkBPNAILUO3KmooyjL8ueegzTvPMsRjG4qBwKrW1sxJZzsIPGa - AJbmfp5q7MZx71NZawEi8qZSyHg4NRGLzCPtB3eme1R3Nutocodyd8UAaVtqEUDlI8/N3PaqV2Ht - X2x4lIOSwHFSWkEFyo+cD1BpbmNbNdkh20AMh1UiJ1c9RzWj/wAJa1vYiK1RmRvvetY5gDENxgnp - UlhN5TiI4O4845oAmu51lXzFDGQ8jnpTra4uJkBAOQavXvhG8tIhPawvJAfmY9gKE1COwgIiAZiO - 3rQBV866T52Qsw6YrXguZNTs0WSJ8IPnHr9KwZNamNumZSpPU4pbPxBeRy/uJjtXqfWgDodMtnXK - QjYeo3VnalpiXjMzXMKS9O9VV1ydCXkmLY/SorWwTVJTmQEt81AHTeCY49Mik+0SJKmOg71W1bxH - HLdgaXaSRNnjdzWapGlBBG2ec4GKtQ6yZD5hjLMvbIzQBfutWC2ajV4ywwN2OM/Sql/JY2kKGzU/ - McnBBqlf3Lam5e8lKMv3Yz2FU4VjgzsGQ3WgDa0ya0u7kxzgqCCcn1q43hizkEjRkOoXcAOua5Ka - 6Mc3ygEVb0nW57ac/ZC4Xuo5zQBBeZjcwuMxRn5fUUmnySx6kv2cgg98deK1LjT31pTLpymSVuWi - Xqv17U2GzFgFBUCVOo7igCTT7cnTp/ty5ZnyCvGOKz2uwimOY7geQB0FWY7tzu8xiqk8A96qOvmy - MSowOc0AVpkkgk3uAiP39KkjtonYtnO4cKOP1q1Z3K+X5V2N6OeM8gfWiewaxiKhDsAyJB2oAk0u - 1juAwniYshwoB61FLZfaJDv/AHWexpulXRNwpjkP7s8nu1Wd4uC7zfezxQBTjxZTHzlMigbdy8Up - YXEv7nPvk1aNqbhDhgARnFZMCvbzuWZgc/nQBo2l6qs63AJA6VIsiG4DI4jXP8XeqcbrK5JH3xkH - 0pWhWVR52CF6UAa8kUd7H8rD5f1p5txHAfNPasWRCjgh8D0BrV0a+DgCdfM3DaB9RigCml/JFPyB - 159xV+C/wfNHAbtUN9orxO3k5dhycfw1XmT7JarIjb1k6U2BcuNSVGDSAPu6be1QTXcO0CVSwbPA - 7VRtpftEmxW2Mx6HvUv2V1J2jkdaQBFJB5jBVYemetRyW6SqTKCfTFNllCHBX5vWkLBPvk4NADTG - 0ePKB5qdLN5NjycqvNQIpZAFVj71LsaJQBuGaAH3aCVwycKODUMsZgJjxv8AXIzUs0DpHhmBycjm - gOd37wdRjNAFETeTcARAbSeTViApfrhjufHXNJNCsUu18Z61Xit3Q5JxQBdW0MYKyn5hSf2BPIjS - 24I29T6f5xUMMrs5HOF71ooVmtMyu3ynAAzQBqeCfG7aaPsmuYkiYFG3HseKq67YQW2rSNpLCS0l - GQ5GSh74xWZc2SyxK4OZl5x7d/0rV0K+j+xPFOu4Pwpx0oAo3OnFreM7AR9Kp/2eYpxtyCx6VoXd - g2nSlQzMh6UxJdjqSpKgfN6mgCOLSZGkKyYw/wCn+c1YltRodoWA+Y8Z+taPhWz866DQqxLdmq34 - x0ZbS23yY3NgkUAcZcSyrjcc7zw3YU62meOeTazdOhrZ07TYLkYvSFVfmqveQWkDj7CW9zg0AZs9 - 8wbO3L8ZpvmGRsyZQDsO9WLu0EwZojwMc1DJCrsA5we1AFmGVZLc7Y1bA6nvU1gIyNzgxtnoKr7I - NgHO8dx0pJ3AYG3UnHegDRS+NpL5lsxh3dQverj38OtL/pKCKSPhWU/f+tYEt98xMnC9qgludrrJ - GzFl7DvQBq6pYNGdzHGO3aqS33kEBhlSME0+01z7OcXGXRupJ5H0q5fafFqNuJLLnofmGDRsBmJe - DzMEZGevpW7o8sN/bzLqTBML8oB71k/2YYh83FQRqbdtr7sDv60AX7jSo4ZsiVo067hj9anuNHey - jVizMj8gkdaqQyi+UxjO7O0A96tXDz6rEFucp5HygUANGEQKjDJGaqzWbzgyn5QOPY1p2xZtOaGN - VMo5BPoKqxa1NHHtmij+Q4xkUAUraZFiYScMOgNMf76CIZHf2q5KRq8arEjK4OTsGaki0oKwAEhP - uDmgCohEsqq/O6rrMNMj3AEdgfQmn3tqUgEcaYz1JFMtLdn0wpFGxYHhjQBa026M0XM2WQ/NnHzU - 6Yw6tCPt6rbpH0CdvzrPtrZ45ceU4cHk9qtzW6XLOjqwY9+1AEa+HWun8zR28xU5LAZx+VLaGSV9 - jrkr145amvEY4hGkjKMg5XoPY/571vaHFDr95HHqDMkoU4C9G+uKAOevoo5iSBjBxVYwLdRkL1Xt - XSeK/CdzpkjRMqyJ95SjbsD3rmJbUwoeuGOCfSgC9eWc9rcbbdA0KHPmhcq39Ka8e9DkBS5zk1X0 - /wAR3dvEtuTm3AwVzW/D4w0xIEivbOaSTAVWBAH40AYMu6CZDkFcHcTz6UrtkYlwVHIwOtb91olr - qtuRZSL5h5EX8VY97pc1jKAqZ2jB/wA/nQBRJhubjE4YOOnNMC+S+DzmrMkIA819wPTbjmqwfzcM - 4w3vQA9mbYwgIz/ENvSm2t+6jZsYKeTkVYjn/eqwGAOp9aeW+2sdkgVf5UAQLKY5MHGferNv+6IM - XT07CmyaeZIS1vtmkUdQKbZ+akOZoyqMe45oAvRzjUJPLLgSds8/zqyPDzwETagy4U8YwARWMbcw - NuDDePenPrbXEfkTn5hwrdqAO709LPSbbzlZdvqD0Ncnr/iufX793uWQrGdmFGBjpmstdQeFRHKx - 2Nn5f73+f61E7iLCxDnrjvQBaubtNypAxyRzg0q263DMsJIzzyc1mwyDeSD82e9XIGUIrSyBNw+X - 2+tAD3tSpcFvufrVZbdL2XbnDdjnGKnhs2nkYtcIEJ6461HMiJIApBVe5HWgB8mmtpzDzSrrkZYU - 65mRGYoBgirEkCStiJlC7c5IqjLNsYhtu0d6AKkshbAZcAdc81Gdwb5SD6cVZjYy5WXBVu/pWppn - h63urfdLdxR47MDk0AYjnhehxntVq11OVANuTj8q2/8AhBZ7mwkm00CYKQBtHXrWe+kTWS7J4zE+ - OQ1ACQX/ANrkC3DD0wODV280KQwM0jxheueKdZWcCrvkjYYHUHvRe6jFLapHtLKeDjg0AVrDQ5xd - xuhIUEMHx8pH1roZtH+2W+dPIbHDMOcms+81YNoqWltlFKhQD1HNP0e5udHsHFkcyMRkDoaALUPh - aa1n8yUgqRgjPOO/eq+reDkvHzoQYIB85JzzW5HBLqWmCSWQJM3UEdB3/Sk0S3uNPmIkBlgJyXAw - o/Ci4EHh3QYfDsfm3mHklGGLdFqS91HSYpvMw0jjkhTx/KqXjLUg8hihYiMn746H6Vg+QYxuV9vH - 1oA3xrem38TNe28rqp+VUyD+gpbTU7O6ylvEYoEBPzjDAjp2HeuUk1aeyfNqMH+8BTrvVhqEAMuP - O7n1oA3X1Q3U0klp5S7OGHFZt7rj4DwxlTJ6riqMTiDZsHTn6/WpbfU5EP8AxMVMqdFIOMfWgCZb - lpEO/GDgn9K6bwZpktjcC7lUsAMYPvj/AArBi0lrpc2sqbZsHbjkV20SvDp8UUZBcDp60AY+ueIZ - dIu3Frh0lbD+YNxAPXBPSqLrpuunyNPBSSM7mZyQpJ/KtWQ2uqvNDcjypQjAFjnJx0rhNYhntbvy - 7jcucgIe9AEUMOy5ImYgg4xViVVa4UFSoToc9a6DxZoEdqv2rTsHzDlx/dFcujFpG27vlPGe9AEi - anPpV359o7b143jqo/yP0rWs/FSavF9l1JltlB3tOerd+axl3XGfMXC9896iu7UbtyYIxg0AdTc2 - Vrqe3+zZxIF4Uj+I1S1Hwpexu0kts8aL7Vg2t9JZ8REjJ+UD+Guh0TxjeaW3/EwAuFAxh260AY8y - ujfLkBOCOuabHcqgCxYAbrz0rsbSysfHdzks1rO33Y0AwTWd4h+D2r6M5mmt0ER5D85P1oAxLfWZ - LSYrbnAb5eKnudVnyELFkHOcCqUmjzRzBWyD9K6W38JtLo6TtkLzmgDHtryGZiZUDZqDU1Vl3wp8 - g+9jsf8AOKmGnw2cpE8jFR1I7VdGjRXMQa0kdoSPmHrQBn6bYnWz5NydjgZVgORWeztBK8ZBJQld - x6nFdZ4ZtoNI1QPI7O+OB7VX8faO9rdC7ESrC4BJHqaAOcgUTtuORiraW0M9yiXLAIeoPc+1RWar - u6Haxq7e6ekEZkBGzGVz1ptgVprUw3ku3iJDgDPUYFEzAwZRN2CDgUw3JEkezD7+xolvytwn2pVV - RkADv060gLVlMk4aLIDHp7+1Vbu1+yzgThiHOOelElyIZl8v5CDkVtxWkGtaYs0bMblCcr/KgDCe - 3LzsN20L2HepUQJnHI9KsX+gT29pHKCd79qWw0u4aPcwU4796AL+meIr2G1aDSbiWHOMhR1qxZXz - xXBl1n/iYBBlg/FR6VZW1nciS9mdJADgYGO1Q3pIOOu5hz60AO1vxLDqluP7Pt47eJSQ2KzvtiSg - eWuPpU89gsfzH5cc+1ZaSpbXRZT8tAGjjz237gNuPwrc0O48uUPOM4GBXORXC3HmJD1bB/QVZivZ - fLwp+71oA6fVfEiwXC+UBGjfKTj14qZbi7gtJWjkY2zx5C9s4rnbCRdZiaOUkFQTke3P9KbYa1c6 - XcBARLEWxhzwBU2AotqzH5Ls5YdFPOKmiu1KgxfvCOqHrXTL4EXxLbl9MO6bGRkYzXPal4TuNLu2 - ju/3csfUD9KoDO19yChhO3OcqO1VoZEUbHVckZL9x3q09s8a5uDkZxUDWX2i4OzgHvQBLCwkwyEF - c4z6VNDZm7utkROCfwqCzAhuGRhhV/WtR5okjjkQ7ST2oAlSRtMdUjHzR1p2OuOI2Ly4kHQViS3K - iYBMsW5zSNF9klEjPnPSgC1dzm4uVKSMZd4JP41oeJPD8+r6ZHLbwmW5H3yCMqvr/Os6xu/tDfvU - CqSOfWuj0yf7OxLO2CAG9x6UAZs6vcIqSiVw3GQMisR7RVvpFkGFU46e1dN4c1hYmCXm0quDIO9c - 54quVl16drdDHGzZX6UAV5bTzWIi4Ws6/DQEoQSpI5q9BfywxkS7WU9OOlMa3F8hG7bj5sn86AKc - ErggKVA96lFwLcYHX3NQPAHnYD5e26pAnluA/JoAu6JevFqsEqs4YN0HQV39p8aL+CJVnWKWOP5c - OAf6VwCzrbxAIMMefpT48zEFD9RQB6hZ+PNE8YqsfiJFt5GOC0abcH6ioPF+i2/hiGK50xmuLOQ4 - AjO9s/T8a8wlzLIdxKkHIwcc1s6R43vdJi2xurxsdriQbto9RnpQBal1C1urtzcIVjfqu3FRMNM8 - zbpplViehyAKnuU0/X4N+ixtFdR/67e2fN+g4xzWPcWzWFyDL8gP3Qw+9+NAGhqulSWzpJHt/wBn - Bzj2NejeHLG28f8Ahox6/HsmA2DHBGO9eTrrksUTKSOD0Par+n/EnVdMRVsZYgpHIK9u9KwEvjn4 - eTeF9UY2Jie3HI+bJFc6b6eMkt909j2rsrTxpYa7bGHWYpXlc8Ord/yrOu/B8gEjQul3Ao6RjLL9 - cGhaAcu0skr7mK8HtTjEAcMMk881Zm0l7JXxg7uQBywqqzysygDBPr1qgHSWqzANL6UunXjWBOxW - KsaZcggbu4HSlindrf5ANxNIDqblPteiWrESNC2fujJ7Vd0bRY7KLfZswWYZYSdT2/pWJ4Q8ST21 - 1b2krIYj8pBFdd4k024ht0nsdpjA4AHNAHO6npkSs2SwPase6ieJcSYdenB+atGbWykgF9G2cHvi - qGqMxiWW0GFyCSRnFAFeSN4yGiLE9we1QXYEhzMo+bnAqaC9YzbpSGY8CoL/ACwDQ80AV1mxdJwQ - q9h1qd71WHU/QdqgDO0gJAyevFE4WI8dW60AafhzUHt5v3ZAzxVzXNFku/38Odg9KwbK4ELA4z+N - ddourgQKJsMv92gCr4Y8Qy6VGUmkdLcDjn5/8a6vS5tM8SWTG3kkaZeP3xIyfxrmPEuk/ZXF9akG - CY/LHj7tZy38tvcxSwnYw7DpQB0viLwrIigwhcHqAeKxDpbmcgJtKjOfStXRPHgjlEeuAzZ6bf4e - lajX+navE4gZIyQcFmxQBxd5ZPG+9iuDxmqitHGR5oO09M+tdDqmjNsDl90YPBHSsJ4N7uH7dOOt - MByxj+EkE/d5qwYGkUNu+VetUgxVz6gVNAryx7Y84J5PpSAeZWjG8A/Lg1sabqn2hF8wnniqPkK6 - qk/z/TilaEWo/cgqKANPSbRba8zM6MXGDzVPxHYPPOzOOVPy471R03XmSRXlQEHv6VstqaakgJKh - h0X1oA5jBjYrP8uTkA9TQ0qoxLHqPyrQ1+z6TMu104x65/8A1ViSsVc5GdwoAseWbkDyQWC01QVv - S+5WGcbe9OguTFZqIjhxnPHWnWTCO6LyKjPnpQBDfs4n3sMc8Y7VPBKWT922498U7X0RCjRnJmAL - KP4aq2rtA/ycBu5HXFAGkYg0GT8rY5J5qIw5jyMORxU28zwAou5jxj1pnktAzCUlT1xQBHFP/Z8w - dpNsg6ccj8a6jQPFNjqdqbfxJbvPM/yxTE/LF9c1zsNsJ1U3EYIP8VPe1iicCORsnnHTBoAtat4Z - mS92Wn79WBK7aw0ia3uXW4jdChxkjvW/Z+KLjTZFd4hKwyAc44qy+nwazpxEOPNdvMdx1UdTQBzb - AbSNyqGPf+lWvDPiW58IXDtZzOIpRiVVON4qS/0ePcG04/aYV4Z8YwaoPGJrgq2AqnAPY0AdVdww - eJLX7XoxSKfbnyRwzn61zGooyMzsreYpwQTyn+P/ANap9NvX0S4DQtzu7dhW/rel2viWzWfRiPtC - L88a/wAfuaAOQEvyDepIOOamtbFJZWKzrH7Gpk02QRBLgYYHkDtSTaf5LBgM7u1AEVxbS2aiSNfm - xw3St7RfiTLFZi2vUe4VRt44xWJDczTzoLoFgvO096bMomlkaJfI5ztFAG7Jqdlrcm2WNYHA+82C - KidbiCAoVLWzfKoHOawo1dyGO4bQcc9frWppOvSwQLDcDzQSOvbmgCjcWBQsqDYwOTmo44BdAZfG - OeuK1NYdZLjzCdu8dAKzpLYQt+6OKAK88ciXREQ3AY5/Ckmt3dlMoznPSrMU2zJxgD2zSSRmX5kY - gdiO9AFWO3KSDgqMjrXQ6fYuUAjG3HO7rWRawNeSDLYKnHPeunVG0bR4ruTnc20g96AHxn7ZbNA7 - qzgcVzup2s2mzOl0CAT8jYzvrb1TxpZ3tgr6fBFFL/EUqpp+pJqpxeqJAPulucfSgDDfcjgxAqSP - mB60xXXlZFBPXpV2+tms5W2oTnpk1nht0uZCAfTFAG9oOvCJBb6jueJj8qj+Grer6XFCqvHMvHTA - zmuajlMUmWHznoKvQ6tLDEPtKeZnsT0oAkaBVLGX7x54qOG6NvkEEA/rV2dYLi08y3fMhH3e4rMR - mkDLOMkHg9KALcN7vXI4Iq9ZyG5jw7An1rFuWMWMAopxTzqMkIxZAuOpINAD7ZAcg9F6VqaXdRFg - pX5h92sPzRbfKQdvr61c0+4MjDyxsYHkkUAdA2lvdQ+ZcDIPGOuawNY0wWNywjwVbocdK2E1ubTF - +T5gw5yM1Lc2kOqaX5kXMxG4nPT8KAOSUSKu5VGM03aZmRo22k9Tird26Fgp+6hwcVAZfNmCnBVu - mKAJp7N71FDcuOI8d6pJlLlt+d44PoK0dTZLKCI2HmCZQCd33c+1R6iqXKpJBu34+bPQGmBNpzND - bgH7zHjPapLiXMhEvzMRwarQXG+ILcfMP7w7VZjdHj+QgMOmaQCRF7AsVBZO2am2G5t2kIAJ9O1V - 2vzM21l+UU9Cjj5M8eh4NAAIXjUeRl8/pUa6k1hGFtWyG6n+lWYX25Y8dsUs9t5tkVkK7Tz7+tAE - 9l4hAj8q/RUf+Db0P1qZ/DUWrTO0paK9cfLGg+Qn61zc0SeYc53DgVr+HNfk0u623LgwSDaxHLY9 - QaYFa80a60G58vU1VmbqF5AFWdC1k6PqaTW6qyEbSD+FdRJd2s8IikZJbO46MTmRB7nr2/WsrxD4 - QjtohLo+9kHXPb0pAd6uh6Lrekm6hkkQSRgNtQfK/p+dc1f/AAsuGUnSWSVScgynbisHQfGFxpki - RKw8tRyD0z/nNWPFHji/1lFihkCxKMAocUAaNt8NNSt3bzYrYsnT5xTLvwZYQTIuqzlLh/vqigqP - xrk/7QuIwRHcXG4jnMpP9ary3kzhvtUkrSH7p3E0AdXqPgvT1vI47K4kfcCcYAx0/wAar2ngu2uW - ZIJX3pnjHFc3DqUikfPIGHU5PFb2ka3PDe7dPZGGzGW7/wCc0AX7LRLSzcxb3eXrhhxVG78JeVcA - bvvcVfEgudqaoyrOrbiV9Pwpmo311pMnmWmySH3w1AGRrXh6TRfLMq8yfcHGPxqxZ6fpmnmNddml - jlk5+RQRx/8ArqO51ptT3vMwWU9iOF/CsOZHnkIkYu3YnmgDo7qPTtPszcWTu5LcAr1ycVl6p4hk - 1BRbsCEXkCqEGqz20wEWGEZGAeRxVy+vRqV2JpUVJiACQMAUAZ0+mvaNuuz88hwAOmaktbt7C4Ub - c8jvW5rGkp/YUEsRM0nLSf7PFYogSWEF/lJ6CgDWcjXyuMhwOAO9Y09hLbSyKy9+pqzpM9xo90Jr - co2OMMM5ropr2PxBYGK7VVXBbIXG4jnrQByUI8xSADs6HPWpPLIjGxssvr3pxQmcqx+VGwFHenJI - gOF5oAW0jZB5nQnnH6Usnzjrg0rW2/8AeISD1x2pWR5VySNo60AQBX2EzHIXpSQJ5kjOOFpLgrtI - iLFvWi2Y3CFYuoNAEt4myTBBQ46Gq6OyHKjGTzSyyyXUm+/cnHc0+PY42RtuDcDigDS03UzdQlHG - WHFSw3/2CX99lo+hA64NUorOeyG9FJA68VJFaLqNu0hkIlXkgelAF3VtEjvNMF1pKOctyPTFc/bw - tGVeMfMRzW54f119M8yJ2IjlGzk9B/k1p6f4fsmi2xXsUmeP88U7gYV5Et3aQlWCsox+NR2eUnWG - 7bdvrZ1TRY7FXjuQsatzHJ7VkyeXbxnz38xl6NmkBFfiXR3MDKQjHI9xUMV0ijMnNdBZWbeJbUcC - SZU+U454rFu/DF7byNJcW0qxqeeOtAE0EcbI+4nax49qnKNY7CCG46Vjw3DRHO1gtaNrqPnBRKu1 - R0Y80AXYDHPAzlPmzzTWG2Evn8KafMMWIsFfamKxcAyjAHbNAFSeRJpOBg0xrXykVjyp6VLqFv5b - AqwTI6dal02ZZ5VjuMNGentQBJZxXFtFuUZDcitDSPFrwOYrkFkfj6Vl30l7p87RpKRDn92eoIqG - 31gRxk3qMzqRnmgC/wCJtIa2uzLYfMjgEj2rNs70woyIMjPLHtW7Y3y38gkUnGBke1R6p4dS/mNx - obeZgfvIVH3Pf3oAz7W3EmGzgrSSRqszF13+4/hqOOLdGSrk5HO0d6WCUxYaUMYhw4HegCM6TLcy - Ztkd0wckd6jtZZbPiI+aqnlem2tTStXNvcbYZyiSA4QcdMf41Y8Taf8A2dZieGMR7sAkc7s8H+dA - GVJqTT3AKtjIxtrStNVy/kyLuUj1rAlhG4NtKqOc/wB+l+2SpP8AcKMn3s07gdJdeHPtLRS2zpCr - csD171laro72bGSFWZRwzHpQdUe8hTDEMg5xU0N7Pcx7GVpIf4lzSAwlk2yAoevUDpWpa2hvYeTg - 0mo2UM8w8lPs4HUDvRpsFz9oYW6NKB07U0BbjvptGhkgJDRMu01VLRyyIYQSgA3HstVdVMiSlZyx - bPKiksbyS1hdWUmKQ5K0gJpt8UgAw69iKn0/UyJdrdOmKIPIvW/cyLEqj7p4zUEUIEr+blHXJBx1 - oAk1O28q6VoSFVhk1GbZQ25TzUlvcfakIucKAcAnqaWK1cyFkQlB70AJvJdNq5I4+tBcbCnCjv71 - LIVcAowVhxj0qO2t9zkXHKt0bsKAIpbPIHlKWUjk06wgaNiqIBzViF/kKKwBHA9aguI5oX3REk9j - TQErWypGPOGc/pTLTy47gMFyob5fetB7EmcG3G6N8hSTjNWRpgsws/y7ouWB70gKd5dGSRcfKnIP - HFXrHSYL61e4kfyVVcYA61lC7OrxurAKxbIHtUtxfC2sTDA/A49KAEazRmkEw+TqG9as+H7YSTeX - bvu7ccYrIt7qRdobPLc59K6jw9pf2KUXcJBVjuI/z9aALF88MsJh1AiRoPl54Iqt5GmXUG3ABx1x - 0/WneMbGfTryO8VB5d2N6qfTJHP5VBoNtFqUb/b28uU/d2d6AJLPV4dGtP8AQyokHGKgu/Fwu9wl - PXgj0pmpaSmnOxmYEdu5rOht2knZ4FX3oAimiju3AtlAznrVWSAW7OC2HQ/d7VdNjLaMjurbSeMC - s+4WS41BjyEB5zQBcgnk2ARnJbqKZcydmZt3fFVxB+9DRkjHfNWLh/KKGTp/6FQBGLg3C5PzFeBT - LeT5yEzlB0p1zb7wGtzt9RTNhWVQOHPWgDc0iUajbPbTgM5GE9aydTtPKk8sKcDrk9adZX5+0FLc - FZM/K1dPpmgReJLR2nOyZDhQT1z60AYWgXYtrvy5cFXBXA9+OtGpLceH9YIsZ3BwGI4+YHsaNR09 - 9C1ERTFTMjBgE6YyO9S+IoDqHlag5++RGPfGKALelpb+IbtA+Ldk+ZkXofxqHxFpn2Vpv7OXdGOW - 56Vk3GpCBQB8pB429a0bHXN8kX2gKY1ILju1AGakfmFfJXLN0/z+VdZYQG503yda5xyPp/8AqqXw - 2LKJJvsqbjIdwDL936Viarq8u9nhA8sNg88/TFAGrdeFbeWBHscSL/AM9DWRqnhObyS7KUYdfetH - wkx1Gdnm3rECAB6Vu674psYbIRxeZuHBJHWgDzZw2nybQMluDVnT9T2PsJK56Ve1OS1vJ/OhOfXj - pWVdWctu/mJhgTxQBeYrOS0xAxTojJHKHspCQ3GPSqaXCTuqpnf+lTQIJ5XRXwy0AaN7YxzWzT3I - /fSHp6VnS2LI8Yt13kj5ucAU17me4hYbvkHXJ5qvJfDMYDNlevqeaAJTAVJGBuHPFSWuoMN32iNW - UgjOelVo5vNUvg8HGKVollOIG4HNAGhb6dHewhrVy8gPK4qaFTZZRssT1GKzLWd7C5zDlS1a9rq5 - vU2uFAIznuaAK93po2GSIEjqefu1C8QZApc+uBxWnbQpeyCG1OB1cnjmi5sUuTlxgpTQFBAYCWEQ - bjrmmsHvDypH0qYqYGPlk56DPSnWFuz3BN2MCkB0niGK10bw/ExCyMxwhVskH8K5O98SPfWixqPm - AxkjBNEkkz2iQSzgqn3U54rPm4RkY4YEfhQBd0gPBMGnwc8fSpvElpFBIGU5Y4Ix0qjcanIkKBG5 - 7VGzPdIHvF3P9aAHpGtymc4Ira0fU5YYUG7KA5P0rAEgjOFjfHtVqzndD8ilFkGKAPTri4h1fRrW - DVAojmjwjdwPY/XNcJK6aTfubdjhDgc9a19PnbUYLW2upsRJ8o61S8WeH1sryKJ2AeRSUb1oApTX - TXpaQMWJGcdal8PSf6UTcj5WOKz5YW0zgTKZG44Bq4THLpSqj7LhWJdsdfSgDo9e16OGFba0ji3p - wZCBzXOoYZp2N2u0Mecd6Zp12cIbkfIBzTbwRG53W4wp5oAbeWVmgY2ZYeuTVC4SWFAzjdGO5qws - HmK28jaTVi1vhaR+XfRGeJhtVR69jz6dfwpgZEcrPcAp92pl2IzMxLuRwamfSJZCXtnRhnLgcFR6 - VWc7J9mNpbtikAW9w0MheQj5ea3NG1Y2sPmWhCvjuf5Vk7UadY48RseW960rDS11C3b7EMzL3oAt - 6hpn9pZu4GzGq7djH5g2PzpPDsMV/Y3Fveg/uVZl+vNJYRy2KhXfcB972q5aRw310/2eZLbcuCWH - X8qaA4yTeT845B4qaEqjZlVtzflV+80qY31z/Z8T3ENqMs8ZAAGcd6zoZMncEwH6H0pAdDpusLZQ - 7Rjc3ApkFoZJHmY4iAPXpms8R7oh/Gc5HtXQaALbUtGMN6ApPHrzQA/TvEdsdOWD92rRk8gcmud8 - QXkl1cZzlfapr3QP7NujGjfKTlSKzr2Jmdgx/wBX096AIkn8ucBQQjdat/bWMLZKOOnOOKzdjL0P - BoiXe2Cu7vQBpxC0KAyK2488Hiql3LskbaDtbpjrV+3tlubYC2TExGBVe+tJNOAF4PmHNAFO0meG - R1bI9jU0iK23zcbsdagWYO+xOH7mrkMWYcNgkUAQwKGA4JC5pzyFmPlEADt61asYIgSJWA3dOKv6 - zosFpdxPaBGVlG445BwKAMwuWADAbqs6eI/3hl++Pu1cj8NFyrRncAdxb0psElpY37NMhljD4YKe - poAsWmm/aIjKknlsvUnoalhtHLcbiueucA1Uu9UMs8wt4SsOfkUnkCrOmXcotj9rkV0HSLnmgDoD - 4JSXSzPNNFJhdwCkZX9a5+K9gD+XPgDdjNTpez6ZZywwPskcZbk/KK5qZ2llPmvvYnrQATr8zE5D - N1zxRbou7951anhZNYuUVFw7dvSp59IltXdZ1IZKAGvpLNGfLAfufaqDCSKUEkgdMkVd07VWs7oG - XLL0x60+7ePUjyCpByMUAV3bBGxsk1ZikV4gAMkHOKpzW5SUmN849qjjnlil3KODxj0oA6KykW7t - yJW8pk4BFdxrGhwax4TS5JWWaEBEY9QDn/CvNrPUfJmBcZDHLV0s2vsfDMwt2ZYy4z7cGgDHv9NK - yjfD+8bgYFUNRtTps4S6HlkjIBPU/wCcVeN86xKZmJlyMc5p/ifU5L/RYVmto9wJUyZ5oAy01Dfb - qZV2xnoKbfX6NEv2ZcHHWmPLFJYQx2ZLTL1U1EIJA+2bAJ6Y5oAIboyDb0PU1c8xLkBJLna4Hy44 - 5x06VAbZbdcyZ3elNBXeCRjnOaAG2808N5syYmJ7fx+5q7tW5QCZQso/iqsULT7rXLr6k4xVi0dX - +9kmgBlxpbI7SxqZAoGWz0p+i3txZ3AezJAHXjrWlZ26mFyzEnPC+vStzTLO3vZ1M8Yjwp6Hr0oA - 5/xFqyrIggQKrLlsdc96xpQZ5wySbu2DVnVYQ9/MJCSitxVOQFW4G1aAOm+H3iGPSbie1upBDBqC - CKRugwOfwrI8VWsenazNHZtvs0fEb/3h6j171Elg02N65x6Gt200i18VwwwXcjQ3Fou2NQMiTvye - 3WgDn4riKEhkfKf3h6+9aFlGLeyS8eT5DIMoDnv3FXZ9I0iwhJFxJLMpwY2ACg1TvvISzMs77S5w - EUcUAW9dH9qW6y6ZKBgcgdawoNOu7iWMmNiWOMDtT4Jxb5e1bKuMEHsfWpNM1ZrG4WWFmct0BHSg - CprWivp0u193mMeR6VHa2jmQbVH0zV3WNRkv5mkn5YnjFRJGBMjRMScdKANvR7OO1u4pS+SGGV68 - d61/GnhSHUYReQyqsZXiPI64rK0S5hRNzfePXvWr5w1KIwwucAccUAefW1q8kqiT+WK0RpdzFFuE - bFT0bHBqxrFj/Z87LjDZ/Km2ctw7Kgk3KO3SgDPQPuHmqNynv2rRs7hrhjDIcDqD6VPeafDfWbbC - UnUjav8AeHfn8qsaL4bl2pLcYWJT85PYdzQBq6dfjRtKX7QnmC4JQH07f1rIl0SztbsSrcoQnJQH - qaseJ7mBVT7PIXtDwrYwQ3esOO4RrxvLZmjI+90P5UAXrm881T9lHOeAOareXPH+8BKOB19Kb9rF - pcq0ILDPc8mp7m+S6k3fdKj7vWgB8Gtj7Oq3AZ3fCs7DmorqxQTbl+oAqJJlu4gJMKwIxT3kNq+H - G5/7o7D1zTA7Pwpd6NBrk5vQwMv3Pl+7UnjAwwXX7tFe3l5UjBbHvXP3GnCOxhuo2IL1G+qPcFYX - cknoT/n2pbgVZtGFxZvNbH5VOBk+vt+FZ8lrPakrcqyHGcEYzWidWS3lCxAlVPUdDWxf6pa6nLH/ - AGlH99QoI4wTwKbA45pHEirjk1asbxYZCsoDYH1rV17wyumSKVbeGG4Y6gVk/wBn7UdgCpPc0gLw - aEwtLKMDtWhoNykVwHdd8JGCjDIrDkSW1g2zOhVhkVLo+puSVlKlccYoA6Dxf4PbSLRb21wto7DG - W7ntj61mpKdXtxaOQvlfMCSBuJrqLfWIfEvhg2muKzQoN4CnBJHT9cVyU5hEjNbB0CHABPNAGTPa - 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/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/issue64.vcf +++ /dev/null @@ -1,351 +0,0 @@ -BEGIN:VCARD -VERSION:2.1 -PHOTO;ENCODING=BASE64;JPEG: - /9j/4AAQSkZJRgABAQAAAQABAAD/4QBYRXhpZgAATU0AKgAAAAgAAgESAAMAAAABAAEAAIdpAAQA - AAABAAAAJgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABQKADAAQAAAABAAABQAAAAAD/2wBD - AAIBAQIBAQICAQICAgICAwUDAwMDAwYEBAMFBwYHBwcGBgYHCAsJBwgKCAYGCQ0JCgsLDAwMBwkN - Dg0MDgsMDAv/2wBDAQICAgMCAwUDAwULCAYICwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsL - CwsLCwsLCwsLCwsLCwsLCwsLCwv/wAARCAFAAUADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAA - AAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKB - kaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZn - aGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT - 1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcI - CQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAV - YnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6 - goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk - 5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD8J7JbO8tYo1tIFCDLOVG5qfdaVZRwmSOFWzyA - F4H1rLt5WViMhdp6HgmtKK8O3B+4Rhx6fSgBI9FtjaNN5aErwRjilSys7lFAt41xyTtqc2yJCVlY - 7eqgGqv2jyLcebjZnGPWncdzT0+w0u5eQXtrGiBcIyoPmNMXwpb/AGMTSRRbH6YAyPwqK21GKdfL - BAVfu+1SQX4jnjKFsp03dPypCKN9oEaKSkC7R0bGKpnSlSPdHErZOORXV3Ouy337sCLB6kpx+FY0 - t+VfyrgcbuCB1oAfoMemrcImq2sZX+I7ATXS618PdK1DRlvvDEaMq5LoV2nisx4LVrUfu5BOePau - m8EQS6PY3HmFXjljKhTzjOf1oA4mz8OxvMrLbW5RD8wbByKg1LRrRriRYY408w/KAMba1pRaWt/H - a6a7CVm2u7N8lUPEujzaRekzSK6tgqVNAGNBZJauY5Yon92GTRJp0ROY0Un0A4q3c2odkaYOMjii - KL7NIDGcj1NDAZBplmmWv1xnoFHStfS/DFpewqYoYm3DutZ8lv8AapdyOqk8EVteEbSe3KBSrDrQ - BT8S+HbawiiWGCAPjsuMnPesqHS4JSFlSMP7DitbXbvfrkkM2eGw3p+FMfTh5X+hr8w7t3oAhOhW - u8MkMZUY3fL0Heo9UsrN5FFrbxKmMBgoG41fWFra0Acjpzg9aoXjtgRoo29vagCoun27kbY059qn - bwykskYjRArdTT7GEl2UqMr2q/JtVU27iR15NADdK8DC/wBPle2iicxNg5ALH6Umm6FZ/a3ttQt4 - g2Cqnb0PbJ+tamn3j6ZCW0nILfeBORWVfO4dhLw7fMW7560AZuqeHf7MuTFcRpv6qVGVx70q2Eci - QwyW0SsPvOqjJrUtb6S9tHQKGeMZYuM8VUs7gRxbrncy9mWgB1x4QtTHvsQWkHJVhhax3tkhugHh - UkfeAXIFdPZ3v2uxkQ9G4jI6/j+tYun3r2Fy6yxeb2Py5IoAqXenJ5xaGNNvXH/1qcLSGeBdkSg9 - CcdaswC3be0pfexOMnpn2qaS1KQkQASKoydvLCgDNi09RKTNCuO2BxVjSobc6gqXMERQHkleDUsc - u9VADbG6qOWAp11bLbptkjlCkZRsde9AFi5sbO3kKfZYTnkHaOlVbuO2F5thtYcADjaKXUpHj8ku - Co2VDFL5wLeg696YFwQ2z7Qtlb8HJO0c1Zsr7T7a9kL6XazZ4CmMFRWfHdkEgjGRjPpU9raP5LSP - j5h2pAWdQ0+z1KdG+y21qvcRqBn8qXSvC+iTu63ssqyE/IAuR+NQwSrGm1g+c8E9qiSQW9wPNYYP - OR2oAW68GNa28k3lwGNHwvzDJGfSqM9nHBgm3j59QMVdmma4zIjsUBHy5OKp6o8s2BJjZjjAoAro - /nysbgYY9zWmLPCR+WQQwyaz4k2F/Pbft/GtKxvUeFN+B2x+NAEptsWpZSdo9etZe8su2X7pPFdU - LeOazKqVwevNYt7pw5EA5HIxQBQA8tAIeGz1NWIJvJlhW5OQBzjrUMR/eN9pwoXjB4qQ3ERJeYcy - 9P8AZoA0jf8AmybVxsHAFS6jp63ixmwjIwOfrWfaou12GcDpmt/w5qJhXc6hh2GM0AZkHiRpblVl - G0RjGMdxXQ+H/E0Rm+bjdw1crqEHm3EksY4Y9PTmq0cskc42qUOfpmgDovHOhLBOZ9O+aEnIUdRW - QZft1sgum/1Ywua3fDfiFDL5WoEPEwxzzirPizwTFPZC60kYUjcAp4NAHPSq91EoRS3061DHD9nb - 94Mkfw020v57GbcCRt4IIqzNcedIH2jc3JyOaAIYrRZmJxtNdB4fkGn2hluBgBR+NZ2n2X9ozAQD - 5qvaxGbKIRXkuFU4C96AMDxBKZdQkuEUkStuUegpNM1eWScAkqpHTHNPlwbjMzExZ4Pal1PS/s6+ - dY/6vuwPSgC9G8c0A+1xEknrnpUVxaeXNm2dVUfjVazvEZAEkMrccZzV1YYyBIhJP8SZ6fhQBSmV - 4JfMVT+96UJdSQdcMO4A6fjVmTUoJiqTOMJ/q+elRyQs0TtaxF0PVhzmgCzpd55r7YI2HHPTmrV0 - sDTF7gnJXGO4OKyNKgn80NbFhjoBzWjqdg6SISPmIBOaAKVnI1leyhsMJOD7CqOqRtZqotjiFulW - rhsSMshKH1ogsZbmF475TKifdf0oApabevHIAhCYOdxp0t59luS0I+995uxqpdRyWsrqmXGeCR/K - rVlZfaogqv8AvD/CaAIY42kV3K5zzn1p9jNLp6u/A80YPNWWsJNPAVpC4JAZT2HfFWJoVmVVjhVk - HTPrQBPoi2wsoo4APtBHL+tP1mS5uVEFxgJGNqH15plp5WmyBriMRsowM8UybXTNdbrpd6A/KKAD - xbJAGs44FIPlnd9c/wD16ynt/LiDW2SR2qa5vP7RnMs6BNuQMd6jhkAUb2K8+tADYp0fhj8w6itC - yQ3CFYeAOoqi8Uew+UMuf4u9T2NwIW+UgMetO4FmS6RJ1ik6HqxHAqC+gimUiA8DvjrU0kcE8ieY - itu+8c0+bShaWxksSZoM4b0SkBTgha0cq33Cuc1SvrrLFV6jpWqbuGe1HnnDdAKy7i3WSY7OT2NN - AMulWSV8ZDNzxV7SlbaFjClx69Kpww7W3ct7jpUtnNJHd5UjZnt1NIDdt7h7NQ7qGfpt7VR1XVEh - dhEpP94/4VpafexTy7ZlbBGDVHxFbQh1j04HaOTkdKAM5ZVlYso3E+tVp4w8gx0Bqd7QxNu+6D6V - DIoVySxAx2NAFyNmli2pjYBz61paW3lWrFS3BwP8/hWJbTBFJy2D6HgfWtiTWPsqxraBHyOeBg0A - RSoLSTdIepzz0606exTWyQGMXljORTNT1B7+ECZR5fHzDqapfbHjbFkTsIwSTQA43ptyyS44Paun - 8N64Z7Bre4YlZBtU5+7XLTQbjwN4Pb+IfWn2lw9uyrIw2Z5HpQBv3GirHc7LxWVZOVI71FNp7WDg - QYlIIGD6VvaPdi+tljb5yeAzcn8DT9YtbPSpVhDM87jJ3Htjnn6UAUIrJreD7Si7MDoKhv8AUxqt - pGt5GqIOr9zRfLM8ZFgZGtex2nGe4zWKN8rsDhYx2JpJ3Atx+HxcRSzWcpcL/CRwaj0zW1sQy3cS - nsFPSoYJpbIl7dm8tT8wzV7+0hqEO1Y4lQ9cqMn9KoCp9kW7kaaxU+Yx+5j5etWrb/RGxfr5bkdu - lW7KFILpfspDbVyc1fjNnrLtHqOYWP8AFjGfxpAc/e6Ql/GzW4AfqBWfpupS6Xer5vPlHmMjg10V - 5pp0u4JhYNGvAYHrUn2WLWrVo41AvSMRZAC/8CPr1oAvafdWOuNG+lqDekY+zg8MPXPX/wDXWZrF - tcWNw0erKElB4Rf4R6c1BpqyaBdbrnEcwyAc4x06H0rQS9a9jUTgOXPzMwycexoAw7u1jYb3zkU3 - Srtgdk54PFamv2C2pDQbWjcfKCeSa56aJld23YA6ZOKFqBrXGjjULuOKxKuZOTn+H/OKwr/ztOvs - uCrg7RgVLYapPbXAEW4EkHJNdBNBH4gtgyhFmXuw60AVpbT7VpiPJ94jLetQWsDRSIYz8mec1c0+ - 1nexdrw7GjJXk/epsFtDPG0bOdw+b5SaAKWsXA+14Y71FQi5S4RvlAC8A0y5hHmHarhvQ9BVGSQx - sUXPHX3oAmDCJ8rzgHg96gQ+ZGWbg9vahNRG7EnalkkF6hEXyD270MCWF3aEhdue1OsmNnMAih/r - VaBgAUY8561PaubdnMxJXseuKANhIY5Assp2v12itZtAgubEi2nb5xuKYHWubstQaO6SVzujTqpP - X8K2rXWLRF8xZJPMfjAzgUAcxcNiaRSpUocc96sW+yNgZCMVF4lvJdRvTOYkj52jbgZ98D6VWmlY - 2qCUnJOKaVwCzviibANwYc8Utkdl7tbKhjxmpUspvm8tgn16ipigSEG4G4pxu9TSA27GeFbRlGGm - P3cdhUN8GEP2hV3JjafrWfpU/wBmuAcZLA4/Sr1trkarJHcRmSEZO3uTQBmrcbZCLoDZ2x1qOHSi - yebJIAPQipp4kmbzI1EQJ6GtCxsoHP8Ap91GB2yDQBlSWO+M/ZsBHHzZ71XkfMIWNgGU9vSt3U9N - t9m21uonz0Iz/hVCfRkjg82FhtHDGgCuZ8EMjDZjBzSZ8pAwU7XbGT0pWtEjjAZgV4PFOml2QKqk - OoOcU1qBNYRSrdkrhw3BIrah8KwXoV/m3PyVzyDWNp999kccgZq/ea7PFAGgZlJ6EUgN23thpdi4 - V1Eucr7ev9K53V/ER1a/MkuWdBtG04zioLrXJ5wDK2XAxmqVqmZ2YPtHJ/GgDsvC3i0ppr2d2ish - yFAHIz706bRLNdOPnErKw4y3NcvZ3pjA8o4kB61o3OpSX9nbx3QIkU/MwoAj/sGaPzFjlWSJjk46 - ioYYwqssjIHHAHpWm4ESN9nYDIFZV+I7uVI1wrY5b1oAtafcvb3W4MM9Nx6U/VZpNRys54ToU4zW - KXaDKrJuC8cVdtpi1gzs43HNAD9N195bdYtRIUR4wD1NX2KuA9uThuSQelcsZwzq9xyzfezV/SdX - e3m8pXJhkPKkUAdYZk8RywjVVJES7U2cE/WtA+HDHohuY3Uxg7RF/GeaPBlxaawMW6rHKnAU9SOO - lX/FFv8A2bpzTQk+cpAAz93nrQBx+r4c5CODEOA3Y+wrKu5V1C1GFKznkk9K6Wzv49fs8Xf7y7DY - MhGNgrmtX0s2t66WknnKvUp0/WgCnbrJFdot0NwJxkDFdDYp86oMjjIArJivxbR7LuMyEjKitS21 - MW8auuW44H93/PFAG15aXdr5Uv7uULkA/wCFc+Yvstw0at8+eoq/p+rm6vRJMNwIx9KranYySXSy - WEZZHOCw7UARXFyj5STAk7ntWVf2gALLyfUVoataLbfLO2SO/Ws2c+VwhLK3QDpQBmz2xAyCG56d - 6uWPlnCkFcjoTzUBkMc/3cZpwn8oZkDFs8HsKALN1apDIHOeaiLkRkMOtSXE6yxAsRUcdxldswIJ - HANMCuJW8xQgOP51oacWPPGAeRUUOIZQzDhecd6mbIcbPusM0gLmq6bHPohlhDeZuH4c1zzF1+Rs - HByDXTae0s0IhjjZg3GPWqOs+HpLCTbNGyb+cHrQBZitjPEzW/LL97vinw2v2m2aORec9AKXQbsw - ygBBiX72TWxfaS8kiGFQAwz8vWkncDlbqNraT5cjb/n+lMGckx8kjOa1tU2TxkPkMpxyKyrhJ4Wa - KIDbTAkgvIp7URzgBwe/BpZYrd4vmZWNZ81x5cgBXDdzVlIvtUOGIBHpQA2aEROpR8DsB2q3bvG9 - iySzEsTkLnrVMqViCZzt7nrT7GBVuQRnODQA6Q+Sx80A4HApEJB3BAR9K19EmhkvCJ0ZsKe3tUc8 - Mc1yy7cpn6YoAzoUiclnYYY8AHpUl8zRxqpPy9qtC2tULgSMAvQ460lzIl9b7YiDt4GaAKMMQlJ5 - z9Kj8gIW5yKnS3Crlzhh6d6k0mbyZT565Q5z60ANtrRpPmhzWhbwy7DJcDhhwMdKlt7aK+gb+z33 - yKdxVuMCqaz5cqGYfWgB6yu8rBB8o6Gs/UpjGQXBGPTvVmSfyImyepqrqjbIw3WgCDz1ib9yOTg4 - NbVlNBJYvlVBHt1rBaPzQWU4IHSn2FwRJslJxQA6e3M0O4oAzdB6VXR2iKGQENGOK0ms1eAkFjF/ - BjrVGaAo371smgC7pety2kwl06Vo5AOWXmuwm+Itv4g8Ota30aWlySAJQfmkP/1zXIeG4Y5SVBB3 - evamXGly2tydwG0nKkHpQBZ86fRbpBLI252y4PGRWhO8Ml1IbJhHn+BTnNU9O1oRwvDqqhB2lHJP - 4U6awb+z4JdKbzdh5ZurDHtQBat5LaRHiaOP7QejEZKD/Oauy+FI7W3Bsroyhxkq3QH8q5a7ujM8 - nWOQnBqTR9burCT98xdR60AbbaHc6ZG3ymJsZC/3hVnw/fNIXt7hygHzZp2oeIBqCxzqfmCgEe3+ - RVdrmLVAEtf3bxfOW/ve36UAV7+7DXMu5Q4/Os2e3eRWkiAGOijtWrPodxfQmeNVAPOPWsppJIpi - JxsKcY9aAMwRyTSbpflx68VOYvOXb97OKtXAiZdzkqT0AGc037BIIRLHjsR60AVprZrZwGj4qTY0 - xyRj3PUVMJDduFfqvFRzxJCzrCzEr60ALEu+YI53c4qeGB7lGCnBU4FUopTBLvfk1at9R2sAMjNA - GtaXsnhy2FzPHvC46jgnNQ33imTXrkz3oVFAwo9Kfrtq03hAzEfJ5gyc81hWM5hhKrhgT0NPcByS - P5g2uVI98Vp6X4uuNGlyzCQIQR0bI7/1rNQxqW+05J7Y4qK5ZYUP2ZCW9TSA7SR9M8V30X9nMFZw - WfcNi5qPWPDtjo0pE7O03U/Mf055rmtFmN9E0DEox+atPWbiW7lSO8Ja4jQbcDC4A9PXFADYtM0+ - 6nc3u7aOm3IP6Vnak9tYt/xL/M445zTIbieOdmWNsE46cip42EkyC4hYx469KAFsrT7XEJgFPOT6 - 1s+H9PD3XlzxnL/MDtqn9pghgb7GjL/eJORWqfEnmrA9oFRoxjJ5BoAp6NqDW2pzRXtuyIAw3FMf - rVS4iF08pydmeCDxWvqeuC+Ro9qglcMw71mwReXD5aAlFJPPU0AZ0cEsbkSZKH15FD2xJJiJVj6c - VfnzLGEXAA71PFpDPaebE6/KOh60AYVws8TBgrFe57CmHUG25RVJA7AVozzSLbNvX5T1AHNY/m/Z - nPlqwDetAEtvqzJNu3FZBwQBjI96vPqkd3mRtokH31UYx+VZqWruxaFl+frkZxT1tvs1ujJgEH5m - PR/pQAXl2S371XAHI+Wkaf7VD8hGR2arKySylRccQ98DmiS0jifdsdgeODQBQd9x3IBx1xTYlBm3 - En86sXUAwPswKg9QeaBErIEj6nrQC0NHRtUjt0K3AHzDABGcVW1fTzJL51jyOpz0NVooispebBI4 - wK2YFEthk8qR07igDAgJil+TKtnnHFaP2h5yI3ZsgdSfaqd2P3im3BGM9aktsjmRgCOaAJZrMwR7 - 3A5PT0pdMvZtOning+byzuVDyh/A8VHczSzDPy7RwOKgiuHEewjKeoFAzp7TUNM8XXEw8RhYNQmP - 7ny18uNeOM7cCtMfDiS8uY0tDEYghyynjPbn864htP8ANhLIehzWzovxDvtFsDB9+PI4I/rQI0r3 - wNc6DO0N2VaQqW2q24YxmqFhYRgE/vkkDfMGBBP4GrSeJ7tZd6SxvIfmK4yQP84p0XiyC71gS65G - 00zAKGX5Qv4UAbFpd28WnIsBLsDzmub1+AXt1LJEoQqfu4xu+lbWsWgs4/NsCXjPIbqK5+5kklmE - rDD54BFAGb5cjybCrAnnB6ipEvXil2sM4GMVpFY7m4UNmNyOWJ4qteaM0BISVZe+RQBFHC2/zISg - B69KlIVhIHA3HuR70lqotlBulY5P4Vcls44k3u6N5oyoHb60wM6O1SRir5LemOKv2vhuW4iLg7VA - 6k4FTR2ax4aaVIwR3HWqGua5PcQm1WRBH6jqaQFzWbE2nhzynuIi+8HaHyKweJSEQEN6jpVcKyOw - cMVznOeKmtZvOPDKuOKAJbi0JYFf4eue9IW8sncfvdqnlvVFyFyu09abI0bysMZx0oArC4eCTcgb - juK2dNvE1N1M0ohljGQzc5A7cfSs6aweWAk7kTuapQysIT9mOSvG49aAOkvzLMxk06QNuG1l7j3r - PlnnJAuGJij+nNQ6XqT7wEYqyn5v9utLULaW7j321uiEjLqMkKKAIotbghb/AI8hKGPIBHNXLG6t - 7uzk3RLbKG/iP+Fc+8f2d1eFztzyD2q5p2oCFWRoxOX52nPFAGgLyC2lyZFKdB70r69buxRJBHjr - nvWVdeXLE7xE8fwnoPpVKZUnQPkBhwRmgDq7a9tLyARWiiWYngL1qG4gurJ28+NowO2a5a3v3smD - aa5WUd1HNbC6zI0KSX13JO7D5lbHFAE4V7pi0b5x1GazdUtXSM7v4iPw5rQ0/XrcXX75FgUdxzuq - /qFrp+sWRe3uDkc4BFAHLRDY42ycd6uPOXiiV+RGPlWnXOg3IQvEmIB/Ft6/jUUEZmMcgydvzECg - C1G2+Ly3YAvyM9qY88kaFcmmp807uwPJ4FS3do+Fzn5ulAFVrjbgS8Z4yah2C03SMffNWZdPknVA - iluQOnHWmX9pILvyY13HHK46UAVre7LSyOCTmtjSiy7VijLeZ0IqO08OzPIUiTI74Ga6bRP7O01F - h1KYJOv3V4BoA4zU1lExMrkbOAvpVcSifhjgrzmtjxPp7pO7SggOcqfUViy25hG5fSgC8rrLAojb - d7d6SexlEgwpRfTNV7e5LFBbKAwPNWHeX7TguxI7GmBPBExhaNVIJ6egqOVknO1fkx1J61aj1gLC - UEKlk4LVWvozC67kCFxkD1pAQ24e3uDLC3z9CR3H/wCqrczJdOGiOxvYc5/CocMYhtUBj3xU8Qjk - XbKPIZOjqclvzoAu2HiO60xPKvd7wY/1fGBWnJo8WuW6y6XIPMYZEAzuH9KxISonAuzuRzgk9qtR - 79KmMuhTt5cRyxznFADLzS2tMw6pAY5OoDEZ/Sm20TQQ74YwVQckGtMatB4kUpqreVIRw5+8aqXF - jc6bAsbD9yThWz94UAOmmjvrRCMJjOQRVS0sD9pLyABM5Of6Vdtrdn+RUGcZqO6uRBG0MuFI79KA - MfV7r7ZqDI7kohAVT6U2eJNimJQOuTnpSXFussrMvBz1pJov3YUsR9O9ABblRncQ3bAqY2EUwIiA - Vqr20ojfYqZx3q9bSKAGcYJPIoAoq7OCEQBffrRDGEcleM8nNPjuGkhHmbB74ApvmxltsuTnuDQA - +SFEjDwu5buD0qpLL5vMg2kEdOlXECMAyZGOMMePyprQRI5N0rt3BXO326UAV4b0Wt0pC5HrXS2W - qq9zE7jcO+OhFc81kbg7iMqeAFHSpLa8eymaNOUIwD6UAavjPQYYybq1bBmXcF9O39Kw4iXdDKcE - DAxW3q7NdWELISdiYIz71kz6ZNZNHI0cjqQfujIFAEtzAtu/7vODzmqlyzNyAo9vWp7uWSWJd+AM - jjGGqOWCSWRVVW2+uKAKskpWU5TP0p8c+ExsPPNTmCVD+5U/QrzRJHJGymeOQc45HFAFczh497KR - jirWlEsAudvII9znitEeBp7yAPZvEVPJUsP5ZqCO3j0yYDUNwliI6dOPpQBt/wDCR3Wj6eHFujvI - do3DIX9KoHXoL6J11CJYZAONlaWueIYtY8Nwx6ZHu2MdxVeTXKG0eaXKRuCeuBQB0mn+HRe2Yeze - MqRkFmwfyra0rwsIrRmvZICcgDLVw7xXFuFd2uEQfeAJAxUkkjSxh4J7gjPAErf40Abvjq1i0y4S - KByCdrfL+FUI7SR4Wc+WzMOCW5qhf3Mt9cCV2ZiihRk5qpdTSBgRI+R2DnFAFw2k6AqJZMjuD1qn - cxzyyAkPuiP3ieT/AJzV+01R7a2RpMZPVmGQ1WVuTqLDCptcfMBwRQBEkst/YMCSTH8vJqtJaoYQ - JPv1o+ZDZKAo+UnBpmrCBpRNp4/0crgZ9f8A9dAzCdGgkOynxSus2xjkj+L1qW5/fxYj+8D+NRWz - R4fzCd2O9Ai0lzI6mPaMOcZqW4uI7rbtJ3IMc1XScKqncQT0olPlKWfBz6UATKjSDcmdoFWtPCyR - kzckHiqUV0623lKVIPzHHWp7Ic/vSRz0zQBcCqdyT4J7YqC3uZdKv1a2UupO7B6H2NMglMUsmcnd - 0Lc4q3BmaMBiDjr60AWJRBfyb9P2RueWJ6KfQVLHqMdtcEysxJXayN0x0yKyWihWQBdwTOSdxHNb - zWEF5ErXhX7QQAMNge2f0oAnhs4rq2kksHwirkg9SfauXnJnmL3AbL9jXSRWh0N28x1cEfMqtnA/ - Cs+70+O9/fWRIb+76fhSTuBimbyyyKDgnipLk7AML1pZbCWO7Hnjn26U6ZykRL+veqAryuvm/Jwf - Sk3mo2AyHyCT6Ux5pLU5Gwg88gGkBPNAILUO3KmooyjL8ueegzTvPMsRjG4qBwKrW1sxJZzsIPGa - AJbmfp5q7MZx71NZawEi8qZSyHg4NRGLzCPtB3eme1R3Nutocodyd8UAaVtqEUDlI8/N3PaqV2Ht - X2x4lIOSwHFSWkEFyo+cD1BpbmNbNdkh20AMh1UiJ1c9RzWj/wAJa1vYiK1RmRvvetY5gDENxgnp - UlhN5TiI4O4845oAmu51lXzFDGQ8jnpTra4uJkBAOQavXvhG8tIhPawvJAfmY9gKE1COwgIiAZiO - 3rQBV866T52Qsw6YrXguZNTs0WSJ8IPnHr9KwZNamNumZSpPU4pbPxBeRy/uJjtXqfWgDodMtnXK - QjYeo3VnalpiXjMzXMKS9O9VV1ydCXkmLY/SorWwTVJTmQEt81AHTeCY49Mik+0SJKmOg71W1bxH - HLdgaXaSRNnjdzWapGlBBG2ec4GKtQ6yZD5hjLMvbIzQBfutWC2ajV4ywwN2OM/Sql/JY2kKGzU/ - McnBBqlf3Lam5e8lKMv3Yz2FU4VjgzsGQ3WgDa0ya0u7kxzgqCCcn1q43hizkEjRkOoXcAOua5Ka - 6Mc3ygEVb0nW57ac/ZC4Xuo5zQBBeZjcwuMxRn5fUUmnySx6kv2cgg98deK1LjT31pTLpymSVuWi - Xqv17U2GzFgFBUCVOo7igCTT7cnTp/ty5ZnyCvGOKz2uwimOY7geQB0FWY7tzu8xiqk8A96qOvmy - MSowOc0AVpkkgk3uAiP39KkjtonYtnO4cKOP1q1Z3K+X5V2N6OeM8gfWiewaxiKhDsAyJB2oAk0u - 1juAwniYshwoB61FLZfaJDv/AHWexpulXRNwpjkP7s8nu1Wd4uC7zfezxQBTjxZTHzlMigbdy8Up - YXEv7nPvk1aNqbhDhgARnFZMCvbzuWZgc/nQBo2l6qs63AJA6VIsiG4DI4jXP8XeqcbrK5JH3xkH - 0pWhWVR52CF6UAa8kUd7H8rD5f1p5txHAfNPasWRCjgh8D0BrV0a+DgCdfM3DaB9RigCml/JFPyB - 159xV+C/wfNHAbtUN9orxO3k5dhycfw1XmT7JarIjb1k6U2BcuNSVGDSAPu6be1QTXcO0CVSwbPA - 7VRtpftEmxW2Mx6HvUv2V1J2jkdaQBFJB5jBVYemetRyW6SqTKCfTFNllCHBX5vWkLBPvk4NADTG - 0ePKB5qdLN5NjycqvNQIpZAFVj71LsaJQBuGaAH3aCVwycKODUMsZgJjxv8AXIzUs0DpHhmBycjm - gOd37wdRjNAFETeTcARAbSeTViApfrhjufHXNJNCsUu18Z61Xit3Q5JxQBdW0MYKyn5hSf2BPIjS - 24I29T6f5xUMMrs5HOF71ooVmtMyu3ynAAzQBqeCfG7aaPsmuYkiYFG3HseKq67YQW2rSNpLCS0l - GQ5GSh74xWZc2SyxK4OZl5x7d/0rV0K+j+xPFOu4Pwpx0oAo3OnFreM7AR9Kp/2eYpxtyCx6VoXd - g2nSlQzMh6UxJdjqSpKgfN6mgCOLSZGkKyYw/wCn+c1YltRodoWA+Y8Z+taPhWz866DQqxLdmq34 - x0ZbS23yY3NgkUAcZcSyrjcc7zw3YU62meOeTazdOhrZ07TYLkYvSFVfmqveQWkDj7CW9zg0AZs9 - 8wbO3L8ZpvmGRsyZQDsO9WLu0EwZojwMc1DJCrsA5we1AFmGVZLc7Y1bA6nvU1gIyNzgxtnoKr7I - NgHO8dx0pJ3AYG3UnHegDRS+NpL5lsxh3dQverj38OtL/pKCKSPhWU/f+tYEt98xMnC9qgludrrJ - GzFl7DvQBq6pYNGdzHGO3aqS33kEBhlSME0+01z7OcXGXRupJ5H0q5fafFqNuJLLnofmGDRsBmJe - DzMEZGevpW7o8sN/bzLqTBML8oB71k/2YYh83FQRqbdtr7sDv60AX7jSo4ZsiVo067hj9anuNHey - jVizMj8gkdaqQyi+UxjO7O0A96tXDz6rEFucp5HygUANGEQKjDJGaqzWbzgyn5QOPY1p2xZtOaGN - VMo5BPoKqxa1NHHtmij+Q4xkUAUraZFiYScMOgNMf76CIZHf2q5KRq8arEjK4OTsGaki0oKwAEhP - uDmgCohEsqq/O6rrMNMj3AEdgfQmn3tqUgEcaYz1JFMtLdn0wpFGxYHhjQBa026M0XM2WQ/NnHzU - 6Yw6tCPt6rbpH0CdvzrPtrZ45ceU4cHk9qtzW6XLOjqwY9+1AEa+HWun8zR28xU5LAZx+VLaGSV9 - jrkr145amvEY4hGkjKMg5XoPY/571vaHFDr95HHqDMkoU4C9G+uKAOevoo5iSBjBxVYwLdRkL1Xt - XSeK/CdzpkjRMqyJ95SjbsD3rmJbUwoeuGOCfSgC9eWc9rcbbdA0KHPmhcq39Ka8e9DkBS5zk1X0 - /wAR3dvEtuTm3AwVzW/D4w0xIEivbOaSTAVWBAH40AYMu6CZDkFcHcTz6UrtkYlwVHIwOtb91olr - qtuRZSL5h5EX8VY97pc1jKAqZ2jB/wA/nQBRJhubjE4YOOnNMC+S+DzmrMkIA819wPTbjmqwfzcM - 4w3vQA9mbYwgIz/ENvSm2t+6jZsYKeTkVYjn/eqwGAOp9aeW+2sdkgVf5UAQLKY5MHGferNv+6IM - XT07CmyaeZIS1vtmkUdQKbZ+akOZoyqMe45oAvRzjUJPLLgSds8/zqyPDzwETagy4U8YwARWMbcw - NuDDePenPrbXEfkTn5hwrdqAO709LPSbbzlZdvqD0Ncnr/iufX793uWQrGdmFGBjpmstdQeFRHKx - 2Nn5f73+f61E7iLCxDnrjvQBaubtNypAxyRzg0q263DMsJIzzyc1mwyDeSD82e9XIGUIrSyBNw+X - 2+tAD3tSpcFvufrVZbdL2XbnDdjnGKnhs2nkYtcIEJ6461HMiJIApBVe5HWgB8mmtpzDzSrrkZYU - 65mRGYoBgirEkCStiJlC7c5IqjLNsYhtu0d6AKkshbAZcAdc81Gdwb5SD6cVZjYy5WXBVu/pWppn - h63urfdLdxR47MDk0AYjnhehxntVq11OVANuTj8q2/8AhBZ7mwkm00CYKQBtHXrWe+kTWS7J4zE+ - OQ1ACQX/ANrkC3DD0wODV280KQwM0jxheueKdZWcCrvkjYYHUHvRe6jFLapHtLKeDjg0AVrDQ5xd - xuhIUEMHx8pH1roZtH+2W+dPIbHDMOcms+81YNoqWltlFKhQD1HNP0e5udHsHFkcyMRkDoaALUPh - aa1n8yUgqRgjPOO/eq+reDkvHzoQYIB85JzzW5HBLqWmCSWQJM3UEdB3/Sk0S3uNPmIkBlgJyXAw - o/Ci4EHh3QYfDsfm3mHklGGLdFqS91HSYpvMw0jjkhTx/KqXjLUg8hihYiMn746H6Vg+QYxuV9vH - 1oA3xrem38TNe28rqp+VUyD+gpbTU7O6ylvEYoEBPzjDAjp2HeuUk1aeyfNqMH+8BTrvVhqEAMuP - O7n1oA3X1Q3U0klp5S7OGHFZt7rj4DwxlTJ6riqMTiDZsHTn6/WpbfU5EP8AxMVMqdFIOMfWgCZb - lpEO/GDgn9K6bwZpktjcC7lUsAMYPvj/AArBi0lrpc2sqbZsHbjkV20SvDp8UUZBcDp60AY+ueIZ - dIu3Frh0lbD+YNxAPXBPSqLrpuunyNPBSSM7mZyQpJ/KtWQ2uqvNDcjypQjAFjnJx0rhNYhntbvy - 7jcucgIe9AEUMOy5ImYgg4xViVVa4UFSoToc9a6DxZoEdqv2rTsHzDlx/dFcujFpG27vlPGe9AEi - anPpV359o7b143jqo/yP0rWs/FSavF9l1JltlB3tOerd+axl3XGfMXC9896iu7UbtyYIxg0AdTc2 - Vrqe3+zZxIF4Uj+I1S1Hwpexu0kts8aL7Vg2t9JZ8REjJ+UD+Guh0TxjeaW3/EwAuFAxh260AY8y - ujfLkBOCOuabHcqgCxYAbrz0rsbSysfHdzks1rO33Y0AwTWd4h+D2r6M5mmt0ER5D85P1oAxLfWZ - LSYrbnAb5eKnudVnyELFkHOcCqUmjzRzBWyD9K6W38JtLo6TtkLzmgDHtryGZiZUDZqDU1Vl3wp8 - g+9jsf8AOKmGnw2cpE8jFR1I7VdGjRXMQa0kdoSPmHrQBn6bYnWz5NydjgZVgORWeztBK8ZBJQld - x6nFdZ4ZtoNI1QPI7O+OB7VX8faO9rdC7ESrC4BJHqaAOcgUTtuORiraW0M9yiXLAIeoPc+1RWar - u6Haxq7e6ekEZkBGzGVz1ptgVprUw3ku3iJDgDPUYFEzAwZRN2CDgUw3JEkezD7+xolvytwn2pVV - RkADv060gLVlMk4aLIDHp7+1Vbu1+yzgThiHOOelElyIZl8v5CDkVtxWkGtaYs0bMblCcr/KgDCe - 3LzsN20L2HepUQJnHI9KsX+gT29pHKCd79qWw0u4aPcwU4796AL+meIr2G1aDSbiWHOMhR1qxZXz - xXBl1n/iYBBlg/FR6VZW1nciS9mdJADgYGO1Q3pIOOu5hz60AO1vxLDqluP7Pt47eJSQ2KzvtiSg - eWuPpU89gsfzH5cc+1ZaSpbXRZT8tAGjjz237gNuPwrc0O48uUPOM4GBXORXC3HmJD1bB/QVZivZ - fLwp+71oA6fVfEiwXC+UBGjfKTj14qZbi7gtJWjkY2zx5C9s4rnbCRdZiaOUkFQTke3P9KbYa1c6 - XcBARLEWxhzwBU2AotqzH5Ls5YdFPOKmiu1KgxfvCOqHrXTL4EXxLbl9MO6bGRkYzXPal4TuNLu2 - ju/3csfUD9KoDO19yChhO3OcqO1VoZEUbHVckZL9x3q09s8a5uDkZxUDWX2i4OzgHvQBLCwkwyEF - c4z6VNDZm7utkROCfwqCzAhuGRhhV/WtR5okjjkQ7ST2oAlSRtMdUjHzR1p2OuOI2Ly4kHQViS3K - iYBMsW5zSNF9klEjPnPSgC1dzm4uVKSMZd4JP41oeJPD8+r6ZHLbwmW5H3yCMqvr/Os6xu/tDfvU - CqSOfWuj0yf7OxLO2CAG9x6UAZs6vcIqSiVw3GQMisR7RVvpFkGFU46e1dN4c1hYmCXm0quDIO9c - 54quVl16drdDHGzZX6UAV5bTzWIi4Ws6/DQEoQSpI5q9BfywxkS7WU9OOlMa3F8hG7bj5sn86AKc - ErggKVA96lFwLcYHX3NQPAHnYD5e26pAnluA/JoAu6JevFqsEqs4YN0HQV39p8aL+CJVnWKWOP5c - OAf6VwCzrbxAIMMefpT48zEFD9RQB6hZ+PNE8YqsfiJFt5GOC0abcH6ioPF+i2/hiGK50xmuLOQ4 - AjO9s/T8a8wlzLIdxKkHIwcc1s6R43vdJi2xurxsdriQbto9RnpQBal1C1urtzcIVjfqu3FRMNM8 - zbpplViehyAKnuU0/X4N+ixtFdR/67e2fN+g4xzWPcWzWFyDL8gP3Qw+9+NAGhqulSWzpJHt/wBn - Bzj2NejeHLG28f8Ahox6/HsmA2DHBGO9eTrrksUTKSOD0Par+n/EnVdMRVsZYgpHIK9u9KwEvjn4 - eTeF9UY2Jie3HI+bJFc6b6eMkt909j2rsrTxpYa7bGHWYpXlc8Ord/yrOu/B8gEjQul3Ao6RjLL9 - cGhaAcu0skr7mK8HtTjEAcMMk881Zm0l7JXxg7uQBywqqzysygDBPr1qgHSWqzANL6UunXjWBOxW - KsaZcggbu4HSlindrf5ANxNIDqblPteiWrESNC2fujJ7Vd0bRY7KLfZswWYZYSdT2/pWJ4Q8ST21 - 1b2krIYj8pBFdd4k024ht0nsdpjA4AHNAHO6npkSs2SwPase6ieJcSYdenB+atGbWykgF9G2cHvi - qGqMxiWW0GFyCSRnFAFeSN4yGiLE9we1QXYEhzMo+bnAqaC9YzbpSGY8CoL/ACwDQ80AV1mxdJwQ - q9h1qd71WHU/QdqgDO0gJAyevFE4WI8dW60AafhzUHt5v3ZAzxVzXNFku/38Odg9KwbK4ELA4z+N - ddourgQKJsMv92gCr4Y8Qy6VGUmkdLcDjn5/8a6vS5tM8SWTG3kkaZeP3xIyfxrmPEuk/ZXF9akG - CY/LHj7tZy38tvcxSwnYw7DpQB0viLwrIigwhcHqAeKxDpbmcgJtKjOfStXRPHgjlEeuAzZ6bf4e - lajX+navE4gZIyQcFmxQBxd5ZPG+9iuDxmqitHGR5oO09M+tdDqmjNsDl90YPBHSsJ4N7uH7dOOt - MByxj+EkE/d5qwYGkUNu+VetUgxVz6gVNAryx7Y84J5PpSAeZWjG8A/Lg1sabqn2hF8wnniqPkK6 - qk/z/TilaEWo/cgqKANPSbRba8zM6MXGDzVPxHYPPOzOOVPy471R03XmSRXlQEHv6VstqaakgJKh - h0X1oA5jBjYrP8uTkA9TQ0qoxLHqPyrQ1+z6TMu104x65/8A1ViSsVc5GdwoAseWbkDyQWC01QVv - S+5WGcbe9OguTFZqIjhxnPHWnWTCO6LyKjPnpQBDfs4n3sMc8Y7VPBKWT922498U7X0RCjRnJmAL - KP4aq2rtA/ycBu5HXFAGkYg0GT8rY5J5qIw5jyMORxU28zwAou5jxj1pnktAzCUlT1xQBHFP/Z8w - dpNsg6ccj8a6jQPFNjqdqbfxJbvPM/yxTE/LF9c1zsNsJ1U3EYIP8VPe1iicCORsnnHTBoAtat4Z - mS92Wn79WBK7aw0ia3uXW4jdChxkjvW/Z+KLjTZFd4hKwyAc44qy+nwazpxEOPNdvMdx1UdTQBzb - AbSNyqGPf+lWvDPiW58IXDtZzOIpRiVVON4qS/0ePcG04/aYV4Z8YwaoPGJrgq2AqnAPY0AdVdww - eJLX7XoxSKfbnyRwzn61zGooyMzsreYpwQTyn+P/ANap9NvX0S4DQtzu7dhW/rel2viWzWfRiPtC - L88a/wAfuaAOQEvyDepIOOamtbFJZWKzrH7Gpk02QRBLgYYHkDtSTaf5LBgM7u1AEVxbS2aiSNfm - xw3St7RfiTLFZi2vUe4VRt44xWJDczTzoLoFgvO096bMomlkaJfI5ztFAG7Jqdlrcm2WNYHA+82C - KidbiCAoVLWzfKoHOawo1dyGO4bQcc9frWppOvSwQLDcDzQSOvbmgCjcWBQsqDYwOTmo44BdAZfG - OeuK1NYdZLjzCdu8dAKzpLYQt+6OKAK88ciXREQ3AY5/Ckmt3dlMoznPSrMU2zJxgD2zSSRmX5kY - gdiO9AFWO3KSDgqMjrXQ6fYuUAjG3HO7rWRawNeSDLYKnHPeunVG0bR4ruTnc20g96AHxn7ZbNA7 - qzgcVzup2s2mzOl0CAT8jYzvrb1TxpZ3tgr6fBFFL/EUqpp+pJqpxeqJAPulucfSgDDfcjgxAqSP - mB60xXXlZFBPXpV2+tms5W2oTnpk1nht0uZCAfTFAG9oOvCJBb6jueJj8qj+Grer6XFCqvHMvHTA - zmuajlMUmWHznoKvQ6tLDEPtKeZnsT0oAkaBVLGX7x54qOG6NvkEEA/rV2dYLi08y3fMhH3e4rMR - mkDLOMkHg9KALcN7vXI4Iq9ZyG5jw7An1rFuWMWMAopxTzqMkIxZAuOpINAD7ZAcg9F6VqaXdRFg - pX5h92sPzRbfKQdvr61c0+4MjDyxsYHkkUAdA2lvdQ+ZcDIPGOuawNY0wWNywjwVbocdK2E1ubTF - +T5gw5yM1Lc2kOqaX5kXMxG4nPT8KAOSUSKu5VGM03aZmRo22k9Tird26Fgp+6hwcVAZfNmCnBVu - mKAJp7N71FDcuOI8d6pJlLlt+d44PoK0dTZLKCI2HmCZQCd33c+1R6iqXKpJBu34+bPQGmBNpzND - bgH7zHjPapLiXMhEvzMRwarQXG+ILcfMP7w7VZjdHj+QgMOmaQCRF7AsVBZO2am2G5t2kIAJ9O1V - 2vzM21l+UU9Cjj5M8eh4NAAIXjUeRl8/pUa6k1hGFtWyG6n+lWYX25Y8dsUs9t5tkVkK7Tz7+tAE - 9l4hAj8q/RUf+Db0P1qZ/DUWrTO0paK9cfLGg+Qn61zc0SeYc53DgVr+HNfk0u623LgwSDaxHLY9 - QaYFa80a60G58vU1VmbqF5AFWdC1k6PqaTW6qyEbSD+FdRJd2s8IikZJbO46MTmRB7nr2/WsrxD4 - QjtohLo+9kHXPb0pAd6uh6Lrekm6hkkQSRgNtQfK/p+dc1f/AAsuGUnSWSVScgynbisHQfGFxpki - RKw8tRyD0z/nNWPFHji/1lFihkCxKMAocUAaNt8NNSt3bzYrYsnT5xTLvwZYQTIuqzlLh/vqigqP - xrk/7QuIwRHcXG4jnMpP9ary3kzhvtUkrSH7p3E0AdXqPgvT1vI47K4kfcCcYAx0/wAar2ngu2uW - ZIJX3pnjHFc3DqUikfPIGHU5PFb2ka3PDe7dPZGGzGW7/wCc0AX7LRLSzcxb3eXrhhxVG78JeVcA - bvvcVfEgudqaoyrOrbiV9Pwpmo311pMnmWmySH3w1AGRrXh6TRfLMq8yfcHGPxqxZ6fpmnmNddml - jlk5+RQRx/8ArqO51ptT3vMwWU9iOF/CsOZHnkIkYu3YnmgDo7qPTtPszcWTu5LcAr1ycVl6p4hk - 1BRbsCEXkCqEGqz20wEWGEZGAeRxVy+vRqV2JpUVJiACQMAUAZ0+mvaNuuz88hwAOmaktbt7C4Ub - c8jvW5rGkp/YUEsRM0nLSf7PFYogSWEF/lJ6CgDWcjXyuMhwOAO9Y09hLbSyKy9+pqzpM9xo90Jr - co2OMMM5ropr2PxBYGK7VVXBbIXG4jnrQByUI8xSADs6HPWpPLIjGxssvr3pxQmcqx+VGwFHenJI - gOF5oAW0jZB5nQnnH6Usnzjrg0rW2/8AeISD1x2pWR5VySNo60AQBX2EzHIXpSQJ5kjOOFpLgrtI - iLFvWi2Y3CFYuoNAEt4myTBBQ46Gq6OyHKjGTzSyyyXUm+/cnHc0+PY42RtuDcDigDS03UzdQlHG - WHFSw3/2CX99lo+hA64NUorOeyG9FJA68VJFaLqNu0hkIlXkgelAF3VtEjvNMF1pKOctyPTFc/bw - tGVeMfMRzW54f119M8yJ2IjlGzk9B/k1p6f4fsmi2xXsUmeP88U7gYV5Et3aQlWCsox+NR2eUnWG - 7bdvrZ1TRY7FXjuQsatzHJ7VkyeXbxnz38xl6NmkBFfiXR3MDKQjHI9xUMV0ijMnNdBZWbeJbUcC - SZU+U454rFu/DF7byNJcW0qxqeeOtAE0EcbI+4nax49qnKNY7CCG46Vjw3DRHO1gtaNrqPnBRKu1 - R0Y80AXYDHPAzlPmzzTWG2Evn8KafMMWIsFfamKxcAyjAHbNAFSeRJpOBg0xrXykVjyp6VLqFv5b - AqwTI6dal02ZZ5VjuMNGentQBJZxXFtFuUZDcitDSPFrwOYrkFkfj6Vl30l7p87RpKRDn92eoIqG - 31gRxk3qMzqRnmgC/wCJtIa2uzLYfMjgEj2rNs70woyIMjPLHtW7Y3y38gkUnGBke1R6p4dS/mNx - obeZgfvIVH3Pf3oAz7W3EmGzgrSSRqszF13+4/hqOOLdGSrk5HO0d6WCUxYaUMYhw4HegCM6TLcy - Ztkd0wckd6jtZZbPiI+aqnlem2tTStXNvcbYZyiSA4QcdMf41Y8Taf8A2dZieGMR7sAkc7s8H+dA - GVJqTT3AKtjIxtrStNVy/kyLuUj1rAlhG4NtKqOc/wB+l+2SpP8AcKMn3s07gdJdeHPtLRS2zpCr - csD171laro72bGSFWZRwzHpQdUe8hTDEMg5xU0N7Pcx7GVpIf4lzSAwlk2yAoevUDpWpa2hvYeTg - 0mo2UM8w8lPs4HUDvRpsFz9oYW6NKB07U0BbjvptGhkgJDRMu01VLRyyIYQSgA3HstVdVMiSlZyx - bPKiksbyS1hdWUmKQ5K0gJpt8UgAw69iKn0/UyJdrdOmKIPIvW/cyLEqj7p4zUEUIEr+blHXJBx1 - oAk1O28q6VoSFVhk1GbZQ25TzUlvcfakIucKAcAnqaWK1cyFkQlB70AJvJdNq5I4+tBcbCnCjv71 - LIVcAowVhxj0qO2t9zkXHKt0bsKAIpbPIHlKWUjk06wgaNiqIBzViF/kKKwBHA9aguI5oX3REk9j - TQErWypGPOGc/pTLTy47gMFyob5fetB7EmcG3G6N8hSTjNWRpgsws/y7ouWB70gKd5dGSRcfKnIP - HFXrHSYL61e4kfyVVcYA61lC7OrxurAKxbIHtUtxfC2sTDA/A49KAEazRmkEw+TqG9as+H7YSTeX - bvu7ccYrIt7qRdobPLc59K6jw9pf2KUXcJBVjuI/z9aALF88MsJh1AiRoPl54Iqt5GmXUG3ABx1x - 0/WneMbGfTryO8VB5d2N6qfTJHP5VBoNtFqUb/b28uU/d2d6AJLPV4dGtP8AQyokHGKgu/Fwu9wl - PXgj0pmpaSmnOxmYEdu5rOht2knZ4FX3oAimiju3AtlAznrVWSAW7OC2HQ/d7VdNjLaMjurbSeMC - s+4WS41BjyEB5zQBcgnk2ARnJbqKZcydmZt3fFVxB+9DRkjHfNWLh/KKGTp/6FQBGLg3C5PzFeBT - LeT5yEzlB0p1zb7wGtzt9RTNhWVQOHPWgDc0iUajbPbTgM5GE9aydTtPKk8sKcDrk9adZX5+0FLc - FZM/K1dPpmgReJLR2nOyZDhQT1z60AYWgXYtrvy5cFXBXA9+OtGpLceH9YIsZ3BwGI4+YHsaNR09 - 9C1ERTFTMjBgE6YyO9S+IoDqHlag5++RGPfGKALelpb+IbtA+Ldk+ZkXofxqHxFpn2Vpv7OXdGOW - 56Vk3GpCBQB8pB429a0bHXN8kX2gKY1ILju1AGakfmFfJXLN0/z+VdZYQG503yda5xyPp/8AqqXw - 2LKJJvsqbjIdwDL936Viarq8u9nhA8sNg88/TFAGrdeFbeWBHscSL/AM9DWRqnhObyS7KUYdfetH - wkx1Gdnm3rECAB6Vu674psYbIRxeZuHBJHWgDzZw2nybQMluDVnT9T2PsJK56Ve1OS1vJ/OhOfXj - pWVdWctu/mJhgTxQBeYrOS0xAxTojJHKHspCQ3GPSqaXCTuqpnf+lTQIJ5XRXwy0AaN7YxzWzT3I - /fSHp6VnS2LI8Yt13kj5ucAU17me4hYbvkHXJ5qvJfDMYDNlevqeaAJTAVJGBuHPFSWuoMN32iNW - UgjOelVo5vNUvg8HGKVollOIG4HNAGhb6dHewhrVy8gPK4qaFTZZRssT1GKzLWd7C5zDlS1a9rq5 - vU2uFAIznuaAK93po2GSIEjqefu1C8QZApc+uBxWnbQpeyCG1OB1cnjmi5sUuTlxgpTQFBAYCWEQ - bjrmmsHvDypH0qYqYGPlk56DPSnWFuz3BN2MCkB0niGK10bw/ExCyMxwhVskH8K5O98SPfWixqPm - AxkjBNEkkz2iQSzgqn3U54rPm4RkY4YEfhQBd0gPBMGnwc8fSpvElpFBIGU5Y4Ix0qjcanIkKBG5 - 7VGzPdIHvF3P9aAHpGtymc4Ira0fU5YYUG7KA5P0rAEgjOFjfHtVqzndD8ilFkGKAPTri4h1fRrW - DVAojmjwjdwPY/XNcJK6aTfubdjhDgc9a19PnbUYLW2upsRJ8o61S8WeH1sryKJ2AeRSUb1oApTX - TXpaQMWJGcdal8PSf6UTcj5WOKz5YW0zgTKZG44Bq4THLpSqj7LhWJdsdfSgDo9e16OGFba0ji3p - wZCBzXOoYZp2N2u0Mecd6Zp12cIbkfIBzTbwRG53W4wp5oAbeWVmgY2ZYeuTVC4SWFAzjdGO5qws - HmK28jaTVi1vhaR+XfRGeJhtVR69jz6dfwpgZEcrPcAp92pl2IzMxLuRwamfSJZCXtnRhnLgcFR6 - VWc7J9mNpbtikAW9w0MheQj5ea3NG1Y2sPmWhCvjuf5Vk7UadY48RseW960rDS11C3b7EMzL3oAt - 6hpn9pZu4GzGq7djH5g2PzpPDsMV/Y3Fveg/uVZl+vNJYRy2KhXfcB972q5aRw310/2eZLbcuCWH - X8qaA4yTeT845B4qaEqjZlVtzflV+80qY31z/Z8T3ENqMs8ZAAGcd6zoZMncEwH6H0pAdDpusLZQ - 7Rjc3ApkFoZJHmY4iAPXpms8R7oh/Gc5HtXQaALbUtGMN6ApPHrzQA/TvEdsdOWD92rRk8gcmud8 - QXkl1cZzlfapr3QP7NujGjfKTlSKzr2Jmdgx/wBX096AIkn8ucBQQjdat/bWMLZKOOnOOKzdjL0P - BoiXe2Cu7vQBpxC0KAyK2488Hiql3LskbaDtbpjrV+3tlubYC2TExGBVe+tJNOAF4PmHNAFO0meG - R1bI9jU0iK23zcbsdagWYO+xOH7mrkMWYcNgkUAQwKGA4JC5pzyFmPlEADt61asYIgSJWA3dOKv6 - zosFpdxPaBGVlG445BwKAMwuWADAbqs6eI/3hl++Pu1cj8NFyrRncAdxb0psElpY37NMhljD4YKe - poAsWmm/aIjKknlsvUnoalhtHLcbiueucA1Uu9UMs8wt4SsOfkUnkCrOmXcotj9rkV0HSLnmgDoD - 4JSXSzPNNFJhdwCkZX9a5+K9gD+XPgDdjNTpez6ZZywwPskcZbk/KK5qZ2llPmvvYnrQATr8zE5D - N1zxRbou7951anhZNYuUVFw7dvSp59IltXdZ1IZKAGvpLNGfLAfufaqDCSKUEkgdMkVd07VWs7oG - XLL0x60+7ePUjyCpByMUAV3bBGxsk1ZikV4gAMkHOKpzW5SUmN849qjjnlil3KODxj0oA6KykW7t - yJW8pk4BFdxrGhwax4TS5JWWaEBEY9QDn/CvNrPUfJmBcZDHLV0s2vsfDMwt2ZYy4z7cGgDHv9NK - yjfD+8bgYFUNRtTps4S6HlkjIBPU/wCcVeN86xKZmJlyMc5p/ifU5L/RYVmto9wJUyZ5oAy01Dfb - qZV2xnoKbfX6NEv2ZcHHWmPLFJYQx2ZLTL1U1EIJA+2bAJ6Y5oAIboyDb0PU1c8xLkBJLna4Hy44 - 5x06VAbZbdcyZ3elNBXeCRjnOaAG2808N5syYmJ7fx+5q7tW5QCZQso/iqsULT7rXLr6k4xVi0dX - +9kmgBlxpbI7SxqZAoGWz0p+i3txZ3AezJAHXjrWlZ26mFyzEnPC+vStzTLO3vZ1M8Yjwp6Hr0oA - 5/xFqyrIggQKrLlsdc96xpQZ5wySbu2DVnVYQ9/MJCSitxVOQFW4G1aAOm+H3iGPSbie1upBDBqC - CKRugwOfwrI8VWsenazNHZtvs0fEb/3h6j171Elg02N65x6Gt200i18VwwwXcjQ3Fou2NQMiTvye - 3WgDn4riKEhkfKf3h6+9aFlGLeyS8eT5DIMoDnv3FXZ9I0iwhJFxJLMpwY2ACg1TvvISzMs77S5w - EUcUAW9dH9qW6y6ZKBgcgdawoNOu7iWMmNiWOMDtT4Jxb5e1bKuMEHsfWpNM1ZrG4WWFmct0BHSg - CprWivp0u193mMeR6VHa2jmQbVH0zV3WNRkv5mkn5YnjFRJGBMjRMScdKANvR7OO1u4pS+SGGV68 - d61/GnhSHUYReQyqsZXiPI64rK0S5hRNzfePXvWr5w1KIwwucAccUAefW1q8kqiT+WK0RpdzFFuE - bFT0bHBqxrFj/Z87LjDZ/Km2ctw7Kgk3KO3SgDPQPuHmqNynv2rRs7hrhjDIcDqD6VPeafDfWbbC - UnUjav8AeHfn8qsaL4bl2pLcYWJT85PYdzQBq6dfjRtKX7QnmC4JQH07f1rIl0SztbsSrcoQnJQH - qaseJ7mBVT7PIXtDwrYwQ3esOO4RrxvLZmjI+90P5UAXrm881T9lHOeAOareXPH+8BKOB19Kb9rF - pcq0ILDPc8mp7m+S6k3fdKj7vWgB8Gtj7Oq3AZ3fCs7DmorqxQTbl+oAqJJlu4gJMKwIxT3kNq+H - G5/7o7D1zTA7Pwpd6NBrk5vQwMv3Pl+7UnjAwwXX7tFe3l5UjBbHvXP3GnCOxhuo2IL1G+qPcFYX - cknoT/n2pbgVZtGFxZvNbH5VOBk+vt+FZ8lrPakrcqyHGcEYzWidWS3lCxAlVPUdDWxf6pa6nLH/ - AGlH99QoI4wTwKbA45pHEirjk1asbxYZCsoDYH1rV17wyumSKVbeGG4Y6gVk/wBn7UdgCpPc0gLw - aEwtLKMDtWhoNykVwHdd8JGCjDIrDkSW1g2zOhVhkVLo+puSVlKlccYoA6Dxf4PbSLRb21wto7DG - W7ntj61mpKdXtxaOQvlfMCSBuJrqLfWIfEvhg2muKzQoN4CnBJHT9cVyU5hEjNbB0CHABPNAGTPa - 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 -EwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2Ug -QXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNvbW1lcmNlIFJvb3QwHhcNMDIwNjI2MDIxODM2 -WhcNMjIwNjI0MDAxNjEyWjBrMQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMm -VmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNv -bW1lcmNlIFJvb3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvV95WHm6h2mCxlCfL -F9sHP4CFT8icttD0b0/Pmdjh28JIXDqsOTPHH2qLJj0rNfVIsZHBAk4ElpF7sDPwsRROEW+1QK8b -RaVK7362rPKgH1g/EkZgPI2h4H3PVz4zHvtH8aoVlwdVZqW1LS7YgFmypw23RuwhY/81q6UCzyr0 -TP579ZRdhE2o8mCP2w4lPJ9zcc+U30rq299yOIzzlr3xF7zSujtFWsan9sYXiwGd/BmoKoMWuDpI -/k4+oKsGGelT84ATB+0tvz8KPFUgOSwsAGl0lUq8ILKpeeUYiZGo3BxN77t+Nwtd/jmliFKMAGzs -GHxBvfaLdXe6YJ2E5/4tAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEG -MB0GA1UdDgQWBBQVOIMPPyw/cDMezUb+B4wg4NfDtzANBgkqhkiG9w0BAQUFAAOCAQEAX/FBfXxc -CLkr4NWSR/pnXKUTwwMhmytMiUbPWU3J/qVAtmPN3XEolWcRzCSs00Rsca4BIGsDoo8Ytyk6feUW -YFN4PMCvFYP3j1IzJL1kk5fui/fbGKhtcbP3LBfQdCVp9/5rPJS+TUtBjE7ic9DjkCJzQ83z7+pz -zkWKsKZJ/0x9nXGIxHYdkFsd7v3M9+79YKWxehZx0RbQfBI8bGmX265fOZpwLwU8GUYEmSA20GBu -YQa7FkKMcPcw++DbZqMAAb3mLNqRX6BGi01qnD093QVG/na/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 -QUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1i -ZXJzaWduLm9yZzEgMB4GA1UEAxMXR2xvYmFsIENoYW1iZXJzaWduIFJvb3QwHhcNMDMwOTMwMTYx -NDE4WhcNMzcwOTMwMTYxNDE4WjB9MQswCQYDVQQGEwJFVTEnMCUGA1UEChMeQUMgQ2FtZXJmaXJt -YSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1iZXJzaWduLm9yZzEg -MB4GA1UEAxMXR2xvYmFsIENoYW1iZXJzaWduIFJvb3QwggEgMA0GCSqGSIb3DQEBAQUAA4IBDQAw -ggEIAoIBAQCicKLQn0KuWxfH2H3PFIP8T8mhtxOviteePgQKkotgVvq0Mi+ITaFgCPS3CU6gSS9J -1tPfnZdan5QEcOw/Wdm3zGaLmFIoCQLfxS+EjXqXd7/sQJ0lcqu1PzKY+7e3/HKE5TWH+VX6ox8O -by4o3Wmg2UIQxvi1RMLQQ3/bvOSiPGpVeAp3qdjqGTK3L/5cPxvusZjsyq16aUXjlg9V9ubtdepl -6DJWk0aJqCWKZQbua795B9Dxt6/tLE2Su8CoX6dnfQTyFQhwrJLWfQTSM/tMtgsL+xrJxI0DqX5c -8lCrEqWhz0hQpe/SyBoT+rB/sYIcd2oPX9wLlY/vQ37mRQklAgEDo4IBUDCCAUwwEgYDVR0TAQH/ -BAgwBgEB/wIBDDA/BgNVHR8EODA2MDSgMqAwhi5odHRwOi8vY3JsLmNoYW1iZXJzaWduLm9yZy9j -aGFtYmVyc2lnbnJvb3QuY3JsMB0GA1UdDgQWBBRDnDafsJ4wTcbOX60Qq+UDpfqpFDAOBgNVHQ8B -Af8EBAMCAQYwEQYJYIZIAYb4QgEBBAQDAgAHMCoGA1UdEQQjMCGBH2NoYW1iZXJzaWducm9vdEBj -aGFtYmVyc2lnbi5vcmcwKgYDVR0SBCMwIYEfY2hhbWJlcnNpZ25yb290QGNoYW1iZXJzaWduLm9y -ZzBbBgNVHSAEVDBSMFAGCysGAQQBgYcuCgEBMEEwPwYIKwYBBQUHAgEWM2h0dHA6Ly9jcHMuY2hh -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 -LjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMg -U3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw -ggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZkpMyONvg45iPwbm2xPN1y -o4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rfOQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/ -Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/CJi/6tRYccjV3yjxd5srhJosaNnZcAdt0FCX+7bWgiA/d -eMotHweXMAEtcnn6RtYTKqi5pquDSR3l8u/d5AGOGAqPY1MWhWKpDhk6zLVmpsJrdAfkK+F2PrRt -2PZE4XNiHzvEvqBTViVsUQn3qqvKv3b9bZvzndu/PWa8DFaqr5hIlTpL36dYUNk4dalb6kMMAv+Z -6+hsTXBbKWWc3apdzK8BMewM69KN6Oqce+Zu9ydmDBpI125C4z/eIT574Q1w+2OqqGwaVLRcJXrJ -osmLFqa7LH4XXgVNWG4SHQHuEhANxjJ/GP/89PrNbpHoNkm+Gkhpi8KWTRoSsmkXwQqQ1vp5Iki/ -untp+HDH+no32NgN0nZPV/+Qt+OR0t3vwmC3Zzrd/qqc8NSLf3Iizsafl7b4r4qgEKjZ+xjGtrVc -UjyJthkqcwEKDwOzEmDyei+B26Nu/yYwl/WL3YlXtq09s68rxbd2AvCl1iuahhQqcvbjM4xdCUsT -37uMdBNSSwIDAQABo4ICUjCCAk4wDAYDVR0TBAUwAwEB/zALBgNVHQ8EBAMCAa4wHQYDVR0OBBYE -FE4L7xqkQFulF2mHMMo0aEPQQa7yMGQGA1UdHwRdMFswLKAqoCiGJmh0dHA6Ly9jZXJ0LnN0YXJ0 -Y29tLm9yZy9zZnNjYS1jcmwuY3JsMCugKaAnhiVodHRwOi8vY3JsLnN0YXJ0Y29tLm9yZy9zZnNj -YS1jcmwuY3JsMIIBXQYDVR0gBIIBVDCCAVAwggFMBgsrBgEEAYG1NwEBATCCATswLwYIKwYBBQUH -AgEWI2h0dHA6Ly9jZXJ0LnN0YXJ0Y29tLm9yZy9wb2xpY3kucGRmMDUGCCsGAQUFBwIBFilodHRw -Oi8vY2VydC5zdGFydGNvbS5vcmcvaW50ZXJtZWRpYXRlLnBkZjCB0AYIKwYBBQUHAgIwgcMwJxYg -U3RhcnQgQ29tbWVyY2lhbCAoU3RhcnRDb20pIEx0ZC4wAwIBARqBl0xpbWl0ZWQgTGlhYmlsaXR5 -LCByZWFkIHRoZSBzZWN0aW9uICpMZWdhbCBMaW1pdGF0aW9ucyogb2YgdGhlIFN0YXJ0Q29tIENl -cnRpZmljYXRpb24gQXV0aG9yaXR5IFBvbGljeSBhdmFpbGFibGUgYXQgaHR0cDovL2NlcnQuc3Rh -cnRjb20ub3JnL3BvbGljeS5wZGYwEQYJYIZIAYb4QgEBBAQDAgAHMDgGCWCGSAGG+EIBDQQrFilT -dGFydENvbSBGcmVlIFNTTCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTANBgkqhkiG9w0BAQUFAAOC -AgEAFmyZ9GYMNPXQhV59CuzaEE44HF7fpiUFS5Eyweg78T3dRAlbB0mKKctmArexmvclmAk8jhvh -3TaHK0u7aNM5Zj2gJsfyOZEdUauCe37Vzlrk4gNXcGmXCPleWKYK34wGmkUWFjgKXlf2Ysd6AgXm -vB618p70qSmD+LIU424oh0TDkBreOKk8rENNZEXO3SipXPJzewT4F+irsfMuXGRuczE6Eri8sxHk -fY+BUZo7jYn0TZNmezwD7dOaHZrzZVD1oNB1ny+v8OqCQ5j4aZyJecRDjkZy42Q2Eq/3JR44iZB3 -fsNrarnDy0RLrHiQi+fHLB5LEUTINFInzQpdn4XBidUaePKVEFMy3YCEZnXZtWgo+2EuvoSoOMCZ -EoalHmdkrQYuL6lwhceWD3yJZfWOQ1QOq92lgDmUYMA0yZZwLKMS9R9Ie70cfmu3nZD0Ijuu+Pwq -yvqCUqDvr0tVk+vBtfAii6w0TiYiBKGHLHVKt+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----- -MIIDfTCCAmWgAwIBAgIBADANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJKUDElMCMGA1UEChMc -U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEqMCgGA1UECxMhU2VjdXJpdHkgQ29tbXVuaWNh -dGlvbiBFViBSb290Q0ExMB4XDTA3MDYwNjAyMTIzMloXDTM3MDYwNjAyMTIzMlowYDELMAkGA1UE -BhMCSlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xKjAoBgNVBAsTIVNl -Y3VyaXR5IENvbW11bmljYXRpb24gRVYgUm9vdENBMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC -AQoCggEBALx/7FebJOD+nLpCeamIivqA4PUHKUPqjgo0No0c+qe1OXj/l3X3L+SqawSERMqm4miO -/VVQYg+kcQ7OBzgtQoVQrTyWb4vVog7P3kmJPdZkLjjlHmy1V4qe70gOzXppFodEtZDkBp2uoQSX -WHnvIEqCa4wiv+wfD+mEce3xDuS4GBPMVjZd0ZoeUWs5bmB2iDQL87PRsJ3KYeJkHcFGB7hj3R4z -ZbOOCVVSPbW9/wfrrWFVGCypaZhKqkDFMxRldAD5kd6vA0jFQFTcD4SQaCDFkpbcLuUCRarAX1T4 -bepJz11sS6/vmsJWXMY1VkJqMF/Cq/biPT+zyRGPMUzXn0kCAwEAAaNCMEAwHQYDVR0OBBYEFDVK -9U2vP9eCOKyrcWUXdYydVZPmMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqG -SIb3DQEBBQUAA4IBAQCoh+ns+EBnXcPBZsdAS5f8hxOQWsTvoMpfi7ent/HWtWS3irO4G8za+6xm -iEHO6Pzk2x6Ipu0nUBsCMCRGef4Eh3CXQHPRwMFXGZpppSeZq51ihPZRwSzJIxXYKLerJRO1RuGG -Av8mjMSIkh1W/hln8lXkgKNrnKt34VFxDSDbEJrbvXZ5B3eZKK2aXtqxT0QsNY6llsf9g/BYxnnW -mHyojf6GPgcWkuF75x3sM3Z+Qi5KhfmRiWiEA4Glm5q+4zfFVKtWOxgtQaQM+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 -n3TEsXJtYSBLdXJ1bXUgLSBUw5xCxLBUQUsxSDBGBgNVBAsMP1VsdXNhbCBFbGVrdHJvbmlrIHZl -IEtyaXB0b2xvamkgQXJhxZ90xLFybWEgRW5zdGl0w7xzw7wgLSBVRUtBRTEjMCEGA1UECwwaS2Ft -dSBTZXJ0aWZpa2FzeW9uIE1lcmtlemkxSjBIBgNVBAMMQVTDnELEsFRBSyBVRUtBRSBLw7ZrIFNl -cnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIC0gU8O8csO8bSAzMIIBIjANBgkqhkiG9w0B -AQEFAAOCAQ8AMIIBCgKCAQEAim1L/xCIOsP2fpTo6iBkcK4hgb46ezzb8R1Sf1n68yJMlaCQvEhO -Eav7t7WNeoMojCZG2E6VQIdhn8WebYGHV2yKO7Rm6sxA/OOqbLLLAdsyv9Lrhc+hDVXDWzhXcLh1 -xnnRFDDtG1hba+818qEhTsXOfJlfbLm4IpNQp81McGq+agV/E5wrHur+R84EpW+sky58K5+eeROR -6Oqeyjh1jmKwlZMq5d/pXpduIF9fhHpEORlAHLpVK/swsoHvhOPc7Jg4OQOFCKlUAwUp8MmPi+oL -hmUZEdPpCSPeaJMDyTYcIW7OjGbxmTDY17PDHfiBLqi9ggtm/oLL4eAagsNAgQIDAQABo0IwQDAd -BgNVHQ4EFgQUvYiHyY/2pAoLquvF/pEjnatKijIwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF -MAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAB18+kmPNOm3JpIWmgV050vQbTlswyb2zrgxvMTfvCr4 -N5EY3ATIZJkrGG2AA1nJrvhY0D7twyOfaTyGOBye79oneNGEN3GKPEs5z35FBtYt2IpNeBLWrcLT -y9LQQfMmNkqblWwM7uXRQydmwYj3erMgbOqwaSvHIOgMA8RBBZniP+Rr+KCGgceExh/VS4ESshYh -LBOhgLJeDEoTniDYYkCrkOpkSi+sDQESeUWoL4cZaMjihccwsnX5OD+ywJO0a+IDRM5noN+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/PQAtwBbhTIWdjPp2KOZnQUAqhbm84F9b32qhm2tFXTT -xKJxqvQUfecyuB+81fFOvW8XAjnXDpVCOscAPukmYxHqC9FK/xidstd7LzrZlvvoHpKuE1XI2Sf2 -3EgbsCTBheN3nZqk8wwRHQ3ItBTutYJXCb8gWH8vIiPYcMt5bMlL8qkqyPyHK9caUPgn6C9D4zq9 -2Fdx/c6mUlv53U3t5fZvie27k5x2IXXwkkwp9y+cAS7+UEaeZAwUswdbxcJzbPEHXEUkFDWug/Fq -TYl6+rPYLWbwNof1K1MCAwEAAaOBqjCBpzAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKaz -4SsrSbbXc6GqlPUB53NlTKxQMA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUprPhKytJttdzoaqU -9QHnc2VMrFAwRAYDVR0gBD0wOzA5BgRVHSAAMDEwLwYIKwYBBQUHAgEWI2h0dHA6Ly9hY2VkaWNv -bS5lZGljb21ncm91cC5jb20vZG9jMA0GCSqGSIb3DQEBBQUAA4ICAQDOLAtSUWImfQwng4/F9tqg -aHtPkl7qpHMyEVNEskTLnewPeUKzEKbHDZ3Ltvo/Onzqv4hTGzz3gvoFNTPhNahXwOf9jU8/kzJP -eGYDdwdY6ZXIfj7QeQCM8htRM5u8lOk6e25SLTKeI6RF+7YuE7CLGLHdztUdp0J/Vb77W7tH1Pwk -zQSulgUV1qzOMPPKC8W64iLgpq0i5ALudBF/TP94HTXa5gI06xgSYXcGCRZj6hitoocf8seACQl1 -ThCojz2GuHURwCRiipZ7SkXp7FnFvmuD5uHorLUwHv4FB4D54SMNUI8FmP8sX+g7tq3PgbUhh8oI -KiMnMCArz+2UW6yyetLHKKGKC5tNSixthT8Jcjxn4tncB7rrZXtaAWPWkFtPF2Y9fwsZo5NjEFIq -nxQWWOLcpfShFosOkYuByptZ+thrkQdlVV9SH686+5DdaaVbnG0OLLb6zqylfDJKZ0DcMDQj3dcE -I2bw/FWAp/tmGYI1Z2JwOV5vx+qQQEQIHriy1tvuWacNGHk0vFQYXlPKNFHtRQrmjseCNj6nOGOp -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+6K/OybDnT0K0kCe5B1jPyZOQE51kqJ5Z52qz6WKDgmi92N -jMD2AR5vpTESOH2VwnHu7XSu5DaiQ3XV8QCb4uTXzEIDS3h65X27uK4uIJPT5GHfceF2Z5c/tt9q -c1pkIuVC28+BA5PY9OMQ4HL2AHCs8MF6DwV/zzRpRbWT5BnbUhYjBYkOjUjkJW+zeL9i9Qf6lSTC -lrLooyPCXQP8w9PlfMl1I9f09bze5N/NgL+RiH2nE7Q5uiy6vdFrzPOlKO1Enn1So2+WLhl+HPNb -xxaOu2B9d2ZHVIIAEWBsMsGoOBvrbpgT1u449fCfDu/+MYHB0iSVL1N6aaLwD4ZFjliCK0wi1F6g -530mJ0jfJUaNSih8hp75mxpZuWW/Bd22Ql095gBIgl4g9xGC3srYn+Y3RyYe63j3YcNBZFgCQfna -4NH4+ej9Uji29YnfAgMBAAGjWzBZMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0G -A1UdDgQWBBQNjLZh2kS40RR9w759XkjwzspqsDAXBgNVHSAEEDAOMAwGCiqBegFWAgIAAQEwDQYJ -KoZIhvcNAQEFBQADggIBACQ+YAZ+He86PtvqrxyaLAEL9MW12Ukx9F1BjYkMTv9sov3/4gbIOZ/x -WqndIlgVqIrTseYyCYIDbNc/CMf4uboAbbnW/FIyXaR/pDGUu7ZMOH8oMDX/nyNTt7buFHAAQCva -R6s0fl6nVjBhK4tDrP22iCj1a7Y+YEq6QpA0Z43q619FVDsXrIvkxmUP7tCMXWY5zjKn2BCXwH40 -nJ+U8/aGH88bc62UeYdocMMzpXDn2NU4lG9jeeu/Cg4I58UvD0KgKxRA/yHgBcUn4YQRE7rWhh1B -CxMjidPJC+iKunqjo3M3NYB9Ergzd0A4wPpeMNLytqOx1qKVl4GbUu1pTP+A5FPbVFsDbVRfsbjv -JL1vnxHDx2TCDyhihWZeGnuyt++uNckZM6i4J9szVb9o4XVIRFb7zdNIu0eJOqxp9YDG5ERQL1TE -qkPFMTFYvZbF6nVsmnWxTfj3l/+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/uqwQVlntsQGfQqedIXWeUyAN3rfOQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/ -Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/CJi/6tRYccjV3yjxd5srhJosaNnZcAdt0FCX+7bWgiA/d -eMotHweXMAEtcnn6RtYTKqi5pquDSR3l8u/d5AGOGAqPY1MWhWKpDhk6zLVmpsJrdAfkK+F2PrRt -2PZE4XNiHzvEvqBTViVsUQn3qqvKv3b9bZvzndu/PWa8DFaqr5hIlTpL36dYUNk4dalb6kMMAv+Z -6+hsTXBbKWWc3apdzK8BMewM69KN6Oqce+Zu9ydmDBpI125C4z/eIT574Q1w+2OqqGwaVLRcJXrJ -osmLFqa7LH4XXgVNWG4SHQHuEhANxjJ/GP/89PrNbpHoNkm+Gkhpi8KWTRoSsmkXwQqQ1vp5Iki/ -untp+HDH+no32NgN0nZPV/+Qt+OR0t3vwmC3Zzrd/qqc8NSLf3Iizsafl7b4r4qgEKjZ+xjGtrVc -UjyJthkqcwEKDwOzEmDyei+B26Nu/yYwl/WL3YlXtq09s68rxbd2AvCl1iuahhQqcvbjM4xdCUsT -37uMdBNSSwIDAQABo4ICEDCCAgwwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYD -VR0OBBYEFE4L7xqkQFulF2mHMMo0aEPQQa7yMB8GA1UdIwQYMBaAFE4L7xqkQFulF2mHMMo0aEPQ -Qa7yMIIBWgYDVR0gBIIBUTCCAU0wggFJBgsrBgEEAYG1NwEBATCCATgwLgYIKwYBBQUHAgEWImh0 -dHA6Ly93d3cuc3RhcnRzc2wuY29tL3BvbGljeS5wZGYwNAYIKwYBBQUHAgEWKGh0dHA6Ly93d3cu -c3RhcnRzc2wuY29tL2ludGVybWVkaWF0ZS5wZGYwgc8GCCsGAQUFBwICMIHCMCcWIFN0YXJ0IENv -bW1lcmNpYWwgKFN0YXJ0Q29tKSBMdGQuMAMCAQEagZZMaW1pdGVkIExpYWJpbGl0eSwgcmVhZCB0 -aGUgc2VjdGlvbiAqTGVnYWwgTGltaXRhdGlvbnMqIG9mIHRoZSBTdGFydENvbSBDZXJ0aWZpY2F0 -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----- -MIIFYzCCA0ugAwIBAgIBOzANBgkqhkiG9w0BAQsFADBTMQswCQYDVQQGEwJJTDEWMBQGA1UEChMN -U3RhcnRDb20gTHRkLjEsMCoGA1UEAxMjU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg -RzIwHhcNMTAwMTAxMDEwMDAxWhcNMzkxMjMxMjM1OTAxWjBTMQswCQYDVQQGEwJJTDEWMBQGA1UE -ChMNU3RhcnRDb20gTHRkLjEsMCoGA1UEAxMjU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3Jp -dHkgRzIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2iTZbB7cgNr2Cu+EWIAOVeq8O -o1XJJZlKxdBWQYeQTSFgpBSHO839sj60ZwNq7eEPS8CRhXBF4EKe3ikj1AENoBB5uNsDvfOpL9HG -4A/LnooUCri99lZi8cVytjIl2bLzvWXFDSxu1ZJvGIsAQRSCb0AgJnooD/Uefyf3lLE3PbfHkffi -Aez9lInhzG7TNtYKGXmu1zSCZf98Qru23QumNK9LYP5/Q0kGi4xDuFby2X8hQxfqp0iVAXV16iul -Q5XqFYSdCI0mblWbq9zSOdIxHWDirMxWRST1HFSr7obdljKF+ExP6JV2tgXdNiNnvP8V4so75qbs -O+wmETRIjfaAKxojAuuKHDp2KntWFhxyKrOq42ClAJ8Em+JvHhRYW6Vsi1g8w7pOOlz34ZYrPu8H -vKTlXcxNnw3h3Kq74W4a7I/htkxNeXJdFzULHdfBR9qWJODQcqhaX2YtENwvKhOuJv4KHBnM0D4L -nMgJLvlblnpHnOl68wVQdJVznjAJ85eCXuaPOQgeWeU1FEIT/wCc976qUM/iUUjXuG+v+E5+M5iS -FGI6dWPPe/regjupuznixL0sAA7IF6wT700ljtizkC+p2il9Ha90OrInwMEePnWjFqmveiJdnxMa -z6eg6+OGCtP95paV1yPIN93EfKo2rJgaErHgTuixO/XWb/Ew1wIDAQABo0IwQDAPBgNVHRMBAf8E -BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUS8W0QGutHLOlHGVuRjaJhwUMDrYwDQYJ -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 -bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGEwJUUjEP -MA0GA1UEBwwGQW5rYXJhMV4wXAYDVQQKDFVUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUg -QmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLiAoYykgQXJhbMSxayAyMDA3MB4X -DTA3MTIyNTE4MzcxOVoXDTE3MTIyMjE4MzcxOVowgb8xPzA9BgNVBAMMNlTDnFJLVFJVU1QgRWxl -a3Ryb25payBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsTELMAkGA1UEBhMCVFIxDzAN -BgNVBAcMBkFua2FyYTFeMFwGA1UECgxVVMOcUktUUlVTVCBCaWxnaSDEsGxldGnFn2ltIHZlIEJp -bGnFn2ltIEfDvHZlbmxpxJ9pIEhpem1ldGxlcmkgQS7Fni4gKGMpIEFyYWzEsWsgMjAwNzCCASIw -DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKu3PgqMyKVYFeaK7yc9SrToJdPNM8Ig3BnuiD9N -YvDdE3ePYakqtdTyuTFYKTsvP2qcb3N2Je40IIDu6rfwxArNK4aUyeNgsURSsloptJGXg9i3phQv -KUmi8wUG+7RP2qFsmmaf8EMJyupyj+sA1zU511YXRxcw9L6/P8JorzZAwan0qafoEGsIiveGHtya -KhUG9qPw9ODHFNRRf8+0222vR5YXm3dx2KdxnSQM9pQ/hTEST7ruToK4uT6PIzdezKKqdfcYbwnT -rqdUKDT74eA7YH2gvnmJhsifLfkKS8RQouf9eRbHegsYz85M733WB2+Y8a+xwXrXgTW4qhe04MsC -AwEAAaNCMEAwHQYDVR0OBBYEFCnFkKslrxHkYb+j/4hhkeYO/pyBMA4GA1UdDwEB/wQEAwIBBjAP -BgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAQDdr4Ouwo0RSVgrESLFF6QSU2TJ/s -Px+EnWVUXKgWAkD6bho3hO9ynYYKVZ1WKKxmLNA6VpM0ByWtCLCPyA8JWcqdmBzlVPi5RX9ql2+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 -DQYDVQQHEwZDaGFjYW8xEDAOBgNVBAgTB01pcmFuZGExKjAoBgNVBAsTIVByb3ZlZWRvciBkZSBD -ZXJ0aWZpY2Fkb3MgUFJPQ0VSVDE2MDQGA1UEChMtU2lzdGVtYSBOYWNpb25hbCBkZSBDZXJ0aWZp -Y2FjaW9uIEVsZWN0cm9uaWNhMQswCQYDVQQGEwJWRTETMBEGA1UEAxMKUFNDUHJvY2VydDCCAiIw -DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANW39KOUM6FGqVVhSQ2oh3NekS1wwQYalNo97BVC -wfWMrmoX8Yqt/ICV6oNEolt6Vc5Pp6XVurgfoCfAUFM+jbnADrgV3NZs+J74BCXfgI8Qhd19L3uA -3VcAZCP4bsm+lU/hdezgfl6VzbHvvnpC2Mks0+saGiKLt38GieU89RLAu9MLmV+QfI4tL3czkkoh -RqipCKzx9hEC2ZUWno0vluYC3XXCFCpa1sl9JcLB/KpnheLsvtF8PPqv1W7/U0HU9TI4seJfxPmO -EO8GqQKJ/+MMbpfg353bIdD0PghpbNjU5Db4g7ayNo+c7zo3Fn2/omnXO1ty0K+qP1xmk6wKImG2 -0qCZyFSTXai20b1dCl53lKItwIKOvMoDKjSuc/HUtQy9vmebVOvh+qBa7Dh+PsHMosdEMXXqP+UH -0quhJZb25uSgXTcYOWEAM11G1ADEtMo88aKjPvM6/2kwLkDd9p+cJsmWN63nOaK/6mnbVSKVUyqU -td+tFjiBdWbjxywbk5yqjKPK2Ww8F22c3HxT4CAnQzb5EuE8XL1mv6JpIzi4mWCZDlZTOpx+FIyw -Bm/xhnaQr/2v/pDGj59/i5IjnOcVdo/Vi5QTcmn7K2FjiO/mpF7moxdqWEfLcU8UC17IAggmosvp -r2uKGcfLFFb14dq12fy/czja+eevbqQ34gcnAgMBAAGjggMXMIIDEzASBgNVHRMBAf8ECDAGAQH/ -AgEBMDcGA1UdEgQwMC6CD3N1c2NlcnRlLmdvYi52ZaAbBgVghl4CAqASDBBSSUYtRy0yMDAwNDAz -Ni0wMB0GA1UdDgQWBBRBDxk4qpl/Qguk1yeYVKIXTC1RVDCCAVAGA1UdIwSCAUcwggFDgBStuyId -xuDSAaj9dlBSk+2YwU2u06GCASakggEiMIIBHjE+MDwGA1UEAxM1QXV0b3JpZGFkIGRlIENlcnRp -ZmljYWNpb24gUmFpeiBkZWwgRXN0YWRvIFZlbmV6b2xhbm8xCzAJBgNVBAYTAlZFMRAwDgYDVQQH -EwdDYXJhY2FzMRkwFwYDVQQIExBEaXN0cml0byBDYXBpdGFsMTYwNAYDVQQKEy1TaXN0ZW1hIE5h -Y2lvbmFsIGRlIENlcnRpZmljYWNpb24gRWxlY3Ryb25pY2ExQzBBBgNVBAsTOlN1cGVyaW50ZW5k -ZW5jaWEgZGUgU2VydmljaW9zIGRlIENlcnRpZmljYWNpb24gRWxlY3Ryb25pY2ExJTAjBgkqhkiG -9w0BCQEWFmFjcmFpekBzdXNjZXJ0ZS5nb2IudmWCAQowDgYDVR0PAQH/BAQDAgEGME0GA1UdEQRG -MESCDnByb2NlcnQubmV0LnZloBUGBWCGXgIBoAwMClBTQy0wMDAwMDKgGwYFYIZeAgKgEgwQUklG -LUotMzE2MzUzNzMtNzB2BgNVHR8EbzBtMEagRKBChkBodHRwOi8vd3d3LnN1c2NlcnRlLmdvYi52 -ZS9sY3IvQ0VSVElGSUNBRE8tUkFJWi1TSEEzODRDUkxERVIuY3JsMCOgIaAfhh1sZGFwOi8vYWNy -YWl6LnN1c2NlcnRlLmdvYi52ZTA3BggrBgEFBQcBAQQrMCkwJwYIKwYBBQUHMAGGG2h0dHA6Ly9v -Y3NwLnN1c2NlcnRlLmdvYi52ZTBBBgNVHSAEOjA4MDYGBmCGXgMBAjAsMCoGCCsGAQUFBwIBFh5o -dHRwOi8vd3d3LnN1c2NlcnRlLmdvYi52ZS9kcGMwDQYJKoZIhvcNAQELBQADggIBACtZ6yKZu4Sq -T96QxtGGcSOeSwORR3C7wJJg7ODU523G0+1ng3dS1fLld6c2suNUvtm7CpsR72H0xpkzmfWvADmN -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 -3QRkD2P9m5YJgNXoqqXinCaUOuiZc4yd39ffg/N4T0Dhf9Kn0uXKE5Pn7cZ3Xza1lK/oOI7bm+V8 -u8yN63Vz4STN5qctGS7Y1oprFOsIYgrY3LMATcMjfF9DCCMyEtztDK3AfQ+lekLZWnDZv6fXARz2 -m6uOt0qGeKAeVjGu74IKgEH3G8muqzIm1Cxr7X1r5OJeIgpFy4QxTaz+29FHuvlglzmxZcfe+5nk -CiKxLU3lSCZpq+Kq8/v8kiky6bM+TR8noc2OuRf7JT7JbvN32g0S9l3HuzYQ1VTW8+DiR0jm3hTa -YVKvJrT1cU/J19IG32PK/yHoWQbgCNWEFVP3Q+V8xaCJmGtzxmjOZd69fwX3se72V6FglcXM6pM6 -vpmumwKjrckWtc7dXpl4fho5frLABaTAgqWjR56M6ly2vGfb5ipN0gTco65F97yLnByn1tUD3AjL -LhbKXEAz6GfDLuemROoRRRw1ZS0eRWEkG4IupZ0zXWX4Qfkuy5Q/H6MMMSRE7cderVC6xkGbrPAX -ZcD4XW9boAo0PO7X6oifmPmvTiT6l7Jkdtqr9O3jw2Dv1fkCyC2fg69naQanMVXVz0tv/wQFx1is -XxYb5dKj6zHbHzMVTdDypVP1y+E9Tmgt2BLdqvLmTZtJ5cUoobqwWsagtQIDAQABo0IwQDAPBgNV -HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUiQq0OJMa5qvum5EY+fU8PjXQ -04IwDQYJKoZIhvcNAQEFBQADggIBADKL9p1Kyb4U5YysOMo6CdQbzoaz3evUuii+Eq5FLAR0rBNR -xVgYZk2C2tXck8An4b58n1KeElb21Zyp9HWc+jcSjxyT7Ff+Bw+r1RL3D65hXlaASfX8MPWbTx9B -LxyE04nH4toCdu0Jz2zBuByDHBb6lM19oMgY0sidbvW9adRtPTXoHqJPYNcHKfyyo6SdbhWSVhlM -CrDpfNIZTUJG7L399ldb3Zh+pE3McgODWF3vkzpBemOqfDqo9ayk0d2iLbYq/J8BjuIQscTK5Gfb -VSUZP/3oNn6z4eGBrxEWi1CXYBmCAMBrTXO40RMHPuq2MU/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 -CbiohdfMlZdLdNiefvAA5A6JrkkoRBoQmTIPJYhTpA2zDxIIFgsDcSccf+Hb0v1naMQFXQoOXXDX -2JegvFNBmpGN9J42Znp+VsGQX+axaCA2pIwkLCxHC1l2ZjC1vt7tj/id07sBMOby8w7gLJKA84X5 -KIq0VC6a7fd2/BVoFutKbOsuEo/Uz/4Mx1wdC34FMr5esAkqQtXJTpCzWQ27en7N1QhatH/YHGkR -+ScPewavVIMYe+HdVHpRaG53/Ma/UkpmRqGyZxq7o093oL5d//xWC0Nyd5DKnvnyOfUNqfTq1+ez -EC8wQjchzDBwyYaYD8xYTYO7feUapTeNtqwylwA6Y3EkHp43xP901DfA4v6IRmAR3Qg/UDaruHqk -lWJqbrDKaiFaafPz+x1wOZXzp26mgYmhiMU7ccqjUu6Du/2gd/Tkb+dC221KmYo0SLwX3OSACCK2 -8jHAPwQ+658geda4BmRkAjHXqc1S+4RFaQkAKtxVi8QGRkvASh0JWzko/amrzgD5LkhLJuYwTKVY -yrREgk/nkR4zw7CT/xH8gdLKH3Ep3XZPkiWvHYG3Dy+MwwbMLyejSuQOmbp8HkUff6oZRZb9/D0C -AwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFOFmzw7R -8bNLtwYgFP6HEtX2/vs+MA0GCSqGSIb3DQEBBQUAA4ICAQCoy3JAsnbBfnv8rWTjMnvMPLZdRtP1 -LOJwXcgu2AZ9mNELIaCJWSQBnfmvCX0KI4I01fx8cpm5o9dU9OpScA7F9dY74ToJMuYhOZO9sxXq -T2r09Ys/L3yNWC7F4TmgPsc9SnOeQHrAK2GpZ8nzJLmzbVUsWh2eJXLOC62qx1ViC777Y7NhRCOj -y+EaDveaBk3e1CNOIZZbOVtXHS9dCF4Jef98l7VNg64N1uajeeAz0JmWAjCnPv/So0M/BVoG6kQC -2nz4SNAzqfkHx5Xh9T71XXG68pWpdIhhWeO/yloTunK0jF02h+mmxTwTv97QRCbut+wucPrXnbes -5cVAWubXbHssw1abR80LzvobtCHXt2a49CUwi1wNuepnsvRtrtWhnk/Yn+knArAdBtaP4/tIEp9/ -EaEQPkxROpaw0RPxx9gmrjrKkcRpnd8BKWRRb2jaFOwIQZeQjdCygPLPwj2/kWjFgGcexGATVdVh -mVd8upUPYUk6ynW8yQqTP2cOEvIo4jEbwFcW3wh8GcF+Dx+FHgo2fFt+J7x6v+Db9NpSvd4MVHAx -kUOVyLzwPt0JfjBkUO1/AaQzZ01oT74V77D2AhGiGxMlOtzCWfHjXEa7ZywCRuoeSKbmW9m1vFGi -kpbbqsY3Iqb+zCB0oy2pLmvLwIIRIbWTee5Ehr7XHuQe+w== ------END CERTIFICATE----- - -WoSign China -============ ------BEGIN CERTIFICATE----- -MIIFWDCCA0CgAwIBAgIQUHBrzdgT/BtOOzNy0hFIjTANBgkqhkiG9w0BAQsFADBGMQswCQYDVQQG -EwJDTjEaMBgGA1UEChMRV29TaWduIENBIExpbWl0ZWQxGzAZBgNVBAMMEkNBIOayg+mAmuagueiv -geS5pjAeFw0wOTA4MDgwMTAwMDFaFw0zOTA4MDgwMTAwMDFaMEYxCzAJBgNVBAYTAkNOMRowGAYD -VQQKExFXb1NpZ24gQ0EgTGltaXRlZDEbMBkGA1UEAwwSQ0Eg5rKD6YCa5qC56K+B5LmmMIICIjAN -BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0EkhHiX8h8EqwqzbdoYGTufQdDTc7WU1/FDWiD+k -8H/rD195L4mx/bxjWDeTmzj4t1up+thxx7S8gJeNbEvxUNUqKaqoGXqW5pWOdO2XCld19AXbbQs5 -uQF/qvbW2mzmBeCkTVL829B0txGMe41P/4eDrv8FAxNXUDf+jJZSEExfv5RxadmWPgxDT74wwJ85 -dE8GRV2j1lY5aAfMh09Qd5Nx2UQIsYo06Yms25tO4dnkUkWMLhQfkWsZHWgpLFbE4h4TV2TwYeO5 -Ed+w4VegG63XX9Gv2ystP9Bojg/qnw+LNVgbExz03jWhCl3W6t8Sb8D7aQdGctyB9gQjF+BNdeFy -b7Ao65vh4YOhn0pdr8yb+gIgthhid5E7o9Vlrdx8kHccREGkSovrlXLp9glk3Kgtn3R46MGiCWOc -76DbT52VqyBPt7D3h1ymoOQ3OMdc4zUPLK2jgKLsLl3Az+2LBcLmc272idX10kaO6m1jGx6KyX2m -+Jzr5dVjhU1zZmkR/sgO9MHHZklTfuQZa/HpelmjbX7FF+Ynxu8b22/8DU0GAbQOXDBGVWCvOGU6 -yke6rCzMRh+yRpY/8+0mBe53oWprfi1tWFxK1I5nuPHa1UaKJ/kR8slC/k7e3x9cxKSGhxYzoacX -GKUN5AXlK8IrC6KVkLn9YDxOiT7nnO4fuwECAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1Ud -EwEB/wQFMAMBAf8wHQYDVR0OBBYEFOBNv9ybQV0T6GTwp+kVpOGBwboxMA0GCSqGSIb3DQEBCwUA -A4ICAQBqinA4WbbaixjIvirTthnVZil6Xc1bL3McJk6jfW+rtylNpumlEYOnOXOvEESS5iVdT2H6 -yAa+Tkvv/vMx/sZ8cApBWNromUuWyXi8mHwCKe0JgOYKOoICKuLJL8hWGSbueBwj/feTZU7n85iY -r83d2Z5AiDEoOqsuC7CsDCT6eiaY8xJhEPRdF/d+4niXVOKM6Cm6jBAyvd0zaziGfjk9DgNyp115 -j0WKWa5bIW4xRtVZjc8VX90xJc/bYNaBRHIpAlf2ltTW/+op2znFuCyKGo3Oy+dCMYYFaA6eFN0A -kLppRQjbbpCBhqcqBT/mhDn4t/lXX0ykeVoQDF7Va/81XwVRHmyjdanPUIPTfPRm94KNPQx96N97 -qA4bLJyuQHCH2u2nFoJavjVsIE4iYdm8UXrNemHcSxH5/mc0zy4EZmFcV5cjjPOGG0jfKq+nwf/Y -jj4Du9gqsPoUJbJRa4ZDhS4HIxaAjUz7tGM7zMN07RujHv41D198HRaG9Q7DlfEvr10lO1Hm13ZB -ONFLAzkopR6RctR9q5czxNM+4Gm2KHmgCY0c0f9BckgG/Jou5yD5m6Leie2uPAmvylezkolwQOQv -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 -EzARBgNVBAoTCkNlcnRpbm9taXMxFzAVBgNVBAsTDjAwMDIgNDMzOTk4OTAzMR0wGwYDVQQDExRD -ZXJ0aW5vbWlzIC0gUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANTMCQos -P5L2fxSeC5yaah1AMGT9qt8OHgZbn1CF6s2Nq0Nn3rD6foCWnoR4kkjW4znuzuRZWJflLieY6pOo -d5tK8O90gC3rMB+12ceAnGInkYjwSond3IjmFPnVAy//ldu9n+ws+hQVWZUKxkd8aRi5pwP5ynap -z8dvtF4F/u7BUrJ1Mofs7SlmO/NKFoL21prbcpjp3vDFTKWrteoB4owuZH9kb/2jJZOLyKIOSY00 -8B/sWEUuNKqEUL3nskoTuLAPrjhdsKkb5nPJWqHZZkCqqU2mNAKthH6yI8H7KsZn9DS2sJVqM09x -RLWtwHkziOC/7aOgFLScCbAK42C++PhmiM1b8XcF4LVzbsF9Ri6OSyemzTUK/eVNfaoqoynHWmgE -6OXWk6RiwsXm9E/G+Z8ajYJJGYrKWUM66A0ywfRMEwNvbqY/kXPLynNvEiCL7sCCeN5LLsJJwx3t -FvYk9CcbXFcx3FXuqB5vbKziRcxXV4p1VxngtViZSTYxPDMBbRZKzbgqg4SGm/lg0h9tkQPTYKbV -PZrdd5A9NaSfD171UkRpucC63M9933zZxKyGIjK8e2uR73r4F2iw4lNVYC2vPsKD2NkJK/DAZNuH -i5HMkesE/Xa0lZrmFAYb1TQdvtj/dBxThZngWVJKYe2InmtJiUZ+IFrZ50rlau7SZRFDAgMBAAGj -YzBhMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTvkUz1pcMw6C8I -6tNxIqSSaHh02TAfBgNVHSMEGDAWgBTvkUz1pcMw6C8I6tNxIqSSaHh02TANBgkqhkiG9w0BAQsF -AAOCAgEAfj1U2iJdGlg+O1QnurrMyOMaauo++RLrVl89UM7g6kgmJs95Vn6RHJk/0KGRHCwPT5iV -WVO90CLYiF2cN/z7ZMF4jIuaYAnq1fohX9B0ZedQxb8uuQsLrbWwF6YSjNRieOpWauwK0kDDPAUw -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 -BAYTAkZSMREwDwYDVQQKDAhDZXJ0cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMTAe -Fw0xNDA1MjYwMDAwMDBaFw0zODAxMTUwMDAwMDBaMD4xCzAJBgNVBAYTAkZSMREwDwYDVQQKDAhD -ZXJ0cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMTCCAiIwDQYJKoZIhvcNAQEBBQAD -ggIPADCCAgoCggIBANpQh7bauKk+nWT6VjOaVj0W5QOVsjQcmm1iBdTYj+eJZJ+622SLZOZ5KmHN -r49aiZFluVj8tANfkT8tEBXgfs+8/H9DZ6itXjYj2JizTfNDnjl8KvzsiNWI7nC9hRYt6kuJPKNx -Qv4c/dMcLRC4hlTqQ7jbxofaqK6AJc96Jh2qkbBIb6613p7Y1/oA/caP0FG7Yn2ksYyy/yARujVj -BYZHYEMzkPZHogNPlk2dT8Hq6pyi/jQu3rfKG3akt62f6ajUeD94/vI4CTYd0hYCyOwqaK/1jpTv -LRN6HkJKHRUxrgwEV/xhc/MxVoYxgKDEEW4wduOU8F8ExKyHcomYxZ3MVwia9Az8fXoFOvpHgDm2 -z4QTd28n6v+WZxcIbekN1iNQMLAVdBM+5S//Ds3EC0pd8NgAM0lm66EYfFkuPSi5YXHLtaW6uOrc -4nBvCGrch2c0798wct3zyT8j/zXhviEpIDCB5BmlIOklynMxdCm+4kLV87ImZsdo/Rmz5yCTmehd -4F6H50boJZwKKSTUzViGUkAksnsPmBIgJPaQbEfIDbsYIC7Z/fyL8inqh3SV4EJQeIQEQWGw9CEj -jy3LKCHyamz0GqbFFLQ3ZU+V/YDI+HLlJWvEYLF7bY5KinPOWftwenMGE9nTdDckQQoRb5fc5+R+ -ob0V8rqHDz1oihYHAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0G -A1UdDgQWBBSowcCbkahDFXxdBie0KlHYlwuBsTAfBgNVHSMEGDAWgBSowcCbkahDFXxdBie0KlHY -lwuBsTANBgkqhkiG9w0BAQ0FAAOCAgEAnFZvAX7RvUz1isbwJh/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 -xNRbxQA0MMHZmf4yzgeEtE7NCv82TWLxp2NX5Ntqp66/K7nJ5rInieV+mhxNaMbBGN4zK1FGSxyO -9z0M+Yo0FMT7MzUj8czxKselu7Cizv5Ta01BG2Yospb6p64KTrk5M0ScdMGTHPjgniQlQ/GbI4Kq -3ywgsNw2TgOzfALU5nsaqocTvz6hdLubDuHAk5/XpGbKuxs74zD0M1mKB3IDVedzagMxbm+WG+Oi -n6+Sx+31QrclTDsTBM8clq8cIqPQqwWyTBIjUtz9GVsnnB47ev1CI9sjgBPwvFEVVJSmdz7QdFG9 -URQIOTfLHzSpMJ1ShC5VkLG631UAC9hWLbFJSXKAqWLXwPYYEQRVzXR7z2FwefR7LFxckvzluFqr -TJOVoSfupb7PcSNCupt2LQIDAQABo2MwYTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB -/zAdBgNVHQ4EFgQUl0YhVyE12jZVx/PxN3DlCPaTKbYwHwYDVR0jBBgwFoAUl0YhVyE12jZVx/Px -N3DlCPaTKbYwDQYJKoZIhvcNAQELBQADggIBAB3dAmB84DWn5ph76kTOZ0BP8pNuZtQ5iSas000E -PLuHIT839HEl2ku6q5aCgZG27dmxpGWX4m9kWaSW7mDKHyP7Rbr/jyTwyqkxf3kfgLMtMrpkZ2Cv -uVnN35pJ06iCsfmYlIrM4LvgBBuZYLFGZdwIorJGnkSI6pN+VxbSFXJfLkur1J1juONI5f6ELlgK -n0Md/rcYkoZDSw6cMoYsYPXpSOqV7XAp8dUv/TW0V8/bhUiZucJvbI/NeJWsZCj9VrDDb8O+WVLh -X4SPgPL0DTatdrOjteFkdjpY3H1PXlZs5VVZV6Xf8YpmMIzUUmI4d7S+KNfKNsSbBfD4Fdvb8e80 -nR14SohWZ25g/4/Ii+GOvUKpMwpZQhISKvqxnUOOBZuZ2mKtVzazHbYNeS2WuOvyDEsMpZTGMKcm -GS3tTAZQMPH9WD25SxdfGbRqhFS0OE85og2WaMMolP3tLR9Ka0OWLpABEPs4poEL0L9109S5zvE/ -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 -3CzMpSZyYhK05pyDRPZRpOLAeiRXyg6lPzq1O4vldu5w5pLeFlwoW5cZJ5L+epJUzpM5ChaHvGOz -9bGTXOBut9Dq+WIyiET7vycotjCVXRIouZW+j1MY5aIYFuJWpLIsEPUdN6b4t/bQWVyJ98LVtZR0 -0dX+G7bw5tYee9I8y6jj9RjzIR9u701oBnstXW5DiabA+aC/gh7PU3+06yzbXfZqfUAkBXKJOAGT -y3HCOV0GEfZvePg3DTmEJwIDAQABo2MwYTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB -/zAdBgNVHQ4EFgQUajn6QiL35okATV59M4PLuG53hq8wHwYDVR0jBBgwFoAUajn6QiL35okATV59 -M4PLuG53hq8wDQYJKoZIhvcNAQENBQADggIBAJjLq0A85TMCl38th6aP1F5Kr7ge57tx+4BkJamz -Gj5oXScmp7oq4fBXgwpkTx4idBvpkF/wrM//T2h6OKQQbA2xx6R3gBi2oihEdqc0nXGEL8pZ0keI -mUEiyTCYYW49qKgFbdEfwFFEVn8nNQLdXpgKQuswv42hm1GqO+qTRmTFAHneIWv2V6CG1wZy7HBG -S4tz3aAhdT7cHcCP009zHIXZ/n9iyJVvttN7jLpTwm+bREx50B1ws9efAvSyB7DH5fitIw6mVskp -EndI2S9G/Tvw/HRwkqWOOAgfZDC2t0v7NqwQjqBSM2OdAzVWxWm9xiNaJ5T2pBL4LTM8oValX9YZ -6e18CL13zSdkzJTaTkZQh+D5wVOAHrut+0dSixv9ovneDiK3PTNZbNTe9ZUGMg1RGUFcPk8G97kr -gCf2o6p6fAbhQ8MTOWIaNr3gKC6UAuQpLmBVrkA9sHSSXvAgZJY/X0VdiLWK2gKgW0VU3jg9CcCo -SmVGFvyqv1ROTVu+OEO3KMqLM6oaJbolXCkvW0pujOotnCr2BXbgd5eAiN1nE28daCSLT7d0geX0 -YJ96Vdc+N9oWaz53rK4YcJUIeSkDiv7BO7M/Gg+kO14fWKGVyasvc0rQLW6aWQ9VGHgtPFGml4vm -u7JwqkwR3v98KzfUetF3NI/n+UL3PIEMS1IK ------END CERTIFICATE----- - -OpenTrust 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----- + +GDCA TrustAUTH R5 ROOT +====================== +-----BEGIN CERTIFICATE----- +MIIFiDCCA3CgAwIBAgIIfQmX/vBH6nowDQYJKoZIhvcNAQELBQAwYjELMAkGA1UEBhMCQ04xMjAw +BgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZIENPLixMVEQuMR8wHQYDVQQD +DBZHRENBIFRydXN0QVVUSCBSNSBST09UMB4XDTE0MTEyNjA1MTMxNVoXDTQwMTIzMTE1NTk1OVow +YjELMAkGA1UEBhMCQ04xMjAwBgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZ +IENPLixMVEQuMR8wHQYDVQQDDBZHRENBIFRydXN0QVVUSCBSNSBST09UMIICIjANBgkqhkiG9w0B +AQEFAAOCAg8AMIICCgKCAgEA2aMW8Mh0dHeb7zMNOwZ+Vfy1YI92hhJCfVZmPoiC7XJjDp6L3TQs +AlFRwxn9WVSEyfFrs0yw6ehGXTjGoqcuEVe6ghWinI9tsJlKCvLriXBjTnnEt1u9ol2x8kECK62p +OqPseQrsXzrj/e+APK00mxqriCZ7VqKChh/rNYmDf1+uKU49tm7srsHwJ5uu4/Ts765/94Y9cnrr +pftZTqfrlYwiOXnhLQiPzLyRuEH3FMEjqcOtmkVEs7LXLM3GKeJQEK5cy4KOFxg2fZfmiJqwTTQJ +9Cy5WmYqsBebnh52nUpmMUHfP/vFBu8btn4aRjb3ZGM74zkYI+dndRTVdVeSN72+ahsmUPI2JgaQ +xXABZG12ZuGR224HwGGALrIuL4xwp9E7PLOR5G62xDtw8mySlwnNR30YwPO7ng/Wi64HtloPzgsM +R6flPri9fcebNaBhlzpBdRfMK5Z3KpIhHtmVdiBnaM8Nvd/WHwlqmuLMc3GkL30SgLdTMEZeS1SZ +D2fJpcjyIMGC7J0R38IC+xo70e0gmu9lZJIQDSri3nDxGGeCjGHeuLzRL5z7D9Ar7Rt2ueQ5Vfj4 +oR24qoAATILnsn8JuLwwoC8N9VKejveSswoAHQBUlwbgsQfZxw9cZX08bVlX5O2ljelAU58VS6Bx +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 +MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig +U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp +dHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0IENBLTEwHhcNMTYwMjA0MTIzMjE2WhcNMjkx +MjMxMTcyMzE2WjCBpDELMAkGA1UEBhMCUEExDzANBgNVBAgMBlBhbmFtYTEUMBIGA1UEBwwLUGFu +YW1hIENpdHkxJDAiBgNVBAoMG1RydXN0Q29yIFN5c3RlbXMgUy4gZGUgUi5MLjEnMCUGA1UECwwe +VHJ1c3RDb3IgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MR8wHQYDVQQDDBZUcnVzdENvciBSb290Q2Vy +dCBDQS0xMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv463leLCJhJrMxnHQFgKq1mq +jQCj/IDHUHuO1CAmujIS2CNUSSUQIpidRtLByZ5OGy4sDjjzGiVoHKZaBeYei0i/mJZ0PmnK6bV4 +pQa81QBeCQryJ3pS/C3Vseq0iWEk8xoT26nPUu0MJLq5nux+AHT6k61sKZKuUbS701e/s/OojZz0 +JEsq1pme9J7+wH5COucLlVPat2gOkEz7cD+PSiyU8ybdY2mplNgQTsVHCJCZGxdNuWxu72CVEY4h +gLW9oHPY0LJ3xEXqWib7ZnZ2+AYfYW0PVcWDtxBWcgYHpfOxGgMFZA6dWorWhnAbJN7+KIor0Gqw +/Hqi3LJ5DotlDwIDAQABo2MwYTAdBgNVHQ4EFgQU7mtJPHo/DeOxCbeKyKsZn3MzUOcwHwYDVR0j +BBgwFoAU7mtJPHo/DeOxCbeKyKsZn3MzUOcwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AYYwDQYJKoZIhvcNAQELBQADggEBACUY1JGPE+6PHh0RU9otRCkZoB5rMZ5NDp6tPVxBb5UrJKF5 +mDo4Nvu7Zp5I/5CQ7z3UuJu0h3U/IJvOcs+hVcFNZKIZBqEHMwwLKeXx6quj7LUKdJDHfXLy11yf +ke+Ri7fc7Waiz45mO7yfOgLgJ90WmMCV1Aqk5IGadZQ1nJBfiDcGrVmVCrDRZ9MZyonnMlo2HD6C +qFqTvsbQZJG2z9m2GM/bftJlo6bEjhcxwft+dtvTheNYsnd6djtsL1Ac59v2Z3kf9YKVmgenFK+P +3CghZwnS1k1aHBkcjndcw5QkPTJrS37UeJSDvjdNzl/HHk484IkzlQsPpTLWPFp5LBk= +-----END CERTIFICATE----- + +TrustCor RootCert CA-2 +====================== +-----BEGIN CERTIFICATE----- +MIIGLzCCBBegAwIBAgIIJaHfyjPLWQIwDQYJKoZIhvcNAQELBQAwgaQxCzAJBgNVBAYTAlBBMQ8w +DQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5MSQwIgYDVQQKDBtUcnVzdENvciBT +eXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29yIENlcnRpZmljYXRlIEF1dGhvcml0 +eTEfMB0GA1UEAwwWVHJ1c3RDb3IgUm9vdENlcnQgQ0EtMjAeFw0xNjAyMDQxMjMyMjNaFw0zNDEy +MzExNzI2MzlaMIGkMQswCQYDVQQGEwJQQTEPMA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5h +bWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3IgU3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5U +cnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0 +IENBLTIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnIG7CKqJiJJWQdsg4foDSq8Gb +ZQWU9MEKENUCrO2fk8eHyLAnK0IMPQo+QVqedd2NyuCb7GgypGmSaIwLgQ5WoD4a3SwlFIIvl9Nk +RvRUqdw6VC0xK5mC8tkq1+9xALgxpL56JAfDQiDyitSSBBtlVkxs1Pu2YVpHI7TYabS3OtB0PAx1 +oYxOdqHp2yqlO/rOsP9+aij9JxzIsekp8VduZLTQwRVtDr4uDkbIXvRR/u8OYzo7cbrPb1nKDOOb +XUm4TOJXsZiKQlecdu/vvdFoqNL0Cbt3Nb4lggjEFixEIFapRBF37120Hapeaz6LMvYHL1cEksr1 +/p3C6eizjkxLAjHZ5DxIgif3GIJ2SDpxsROhOdUuxTTCHWKF3wP+TfSvPd9cW436cOGlfifHhi5q +jxLGhF5DUVCcGZt45vz27Ud+ez1m7xMTiF88oWP7+ayHNZ/zgp6kPwqcMWmLmaSISo5uZk3vFsQP +eSghYA2FFn3XVDjxklb9tTNMg9zXEJ9L/cb4Qr26fHMC4P99zVvh1Kxhe1fVSntb1IVYJ12/+Ctg +rKAmrhQhJ8Z3mjOAPF5GP/fDsaOGM8boXg25NSyqRsGFAnWAoOsk+xWq5Gd/bnc/9ASKL3x74xdh +8N0JqSDIvgmk0H5Ew7IwSjiqqewYmgeCK9u4nBit2uBGF6zPXQIDAQABo2MwYTAdBgNVHQ4EFgQU +2f4hQG6UnrybPZx9mCAZ5YwwYrIwHwYDVR0jBBgwFoAU2f4hQG6UnrybPZx9mCAZ5YwwYrIwDwYD +VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQADggIBAJ5Fngw7tu/h +Osh80QA9z+LqBrWyOrsGS2h60COXdKcs8AjYeVrXWoSK2BKaG9l9XE1wxaX5q+WjiYndAfrs3fnp +kpfbsEZC89NiqpX+MWcUaViQCqoL7jcjx1BRtPV+nuN79+TMQjItSQzL/0kMmx40/W5ulop5A7Zv +2wnL/V9lFDfhOPXzYRZY5LVtDQsEGz9QLX+zx3oaFoBg+Iof6Rsqxvm6ARppv9JYx1RXCI/hOWB3 +S6xZhBqI8d3LT3jX5+EzLfzuQfogsL7L9ziUwOHQhQ+77Sxzq+3+knYaZH9bDTMJBzN7Bj8RpFxw +PIXAz+OQqIN3+tvmxYxoZxBnpVIt8MSZj3+/0WvitUfW2dCFmU2Umw9Lje4AWkcdEQOsQRivh7dv +DDqPys/cA8GiCcjl/YBeyGBCARsaU1q7N6a3vLqE6R5sGtRk2tRD/pOLS/IseRYQ1JMLiI+h2IYU +RpFHmygk71dSTlxCnKr3Sewn6EAes6aJInKc9Q0ztFijMDvd1GpUk74aTfOTlPf8hAs/hCBcNANE +xdqtvArBAs8e5ZTZ845b2EzwnexhF7sUMlQMAimTHpKG9n/v55IFDlndmQguLvqcAFLTxWYp5KeX +RKQOKIETNcX2b2TmQcTVL8w0RSXPQQCWPUouwpaYT05KnJe32x+SMsj/D1Fu1uwJ +-----END CERTIFICATE----- + +TrustCor ECA-1 +============== +-----BEGIN CERTIFICATE----- +MIIEIDCCAwigAwIBAgIJAISCLF8cYtBAMA0GCSqGSIb3DQEBCwUAMIGcMQswCQYDVQQGEwJQQTEP +MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig +U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp +dHkxFzAVBgNVBAMMDlRydXN0Q29yIEVDQS0xMB4XDTE2MDIwNDEyMzIzM1oXDTI5MTIzMTE3Mjgw +N1owgZwxCzAJBgNVBAYTAlBBMQ8wDQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5 +MSQwIgYDVQQKDBtUcnVzdENvciBTeXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29y +IENlcnRpZmljYXRlIEF1dGhvcml0eTEXMBUGA1UEAwwOVHJ1c3RDb3IgRUNBLTEwggEiMA0GCSqG +SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPj+ARtZ+odnbb3w9U73NjKYKtR8aja+3+XzP4Q1HpGjOR +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 +MTAvBgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBSU0EwHhcNMTYw +MjEyMTczOTM5WhcNNDEwMjEyMTczOTM5WjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx +EDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NM +LmNvbSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IFJTQTCCAiIwDQYJKoZIhvcNAQEBBQAD +ggIPADCCAgoCggIBAPkP3aMrfcvQKv7sZ4Wm5y4bunfh4/WvpOz6Sl2RxFdHaxh3a3by/ZPkPQ/C +Fp4LZsNWlJ4Xg4XOVu/yFv0AYvUiCVToZRdOQbngT0aXqhvIuG5iXmmxX9sqAn78bMrzQdjt0Oj8 +P2FI7bADFB0QDksZ4LtO7IZl/zbzXmcCC52GVWH9ejjt/uIZALdvoVBidXQ8oPrIJZK0bnoix/ge +oeOy3ZExqysdBP+lSgQ36YWkMyv94tZVNHwZpEpox7Ko07fKoZOI68GXvIz5HdkihCR0xwQ9aqkp +k8zruFvh/l8lqjRYyMEjVJ0bmBHDOJx+PYZspQ9AhnwC9FwCTyjLrnGfDzrIM/4RJTXq/LrFYD3Z +fBjVsqnTdXgDciLKOsMf7yzlLqn6niy2UUb9rwPW6mBo6oUWNmuF6R7As93EJNyAKoFBbZQ+yODJ +gUEAnl6/f8UImKIYLEJAs/lvOCdLToD0PYFH4Ih86hzOtXVcUS4cK38acijnALXRdMbX5J+tB5O2 +UzU1/Dfkw/ZdFr4hc96SCvigY2q8lpJqPvi8ZVWb3vUNiSYE/CUapiVpy8JtynziWV+XrOvvLsi8 +1xtZPCvM8hnIk2snYxnP/Okm+Mpxm3+T/jRnhE6Z6/yzeAkzcLpmpnbtG3PrGqUNxCITIJRWCk4s +bE6x/c+cCbqiM+2HAgMBAAGjYzBhMB0GA1UdDgQWBBTdBAkHovV6fVJTEpKV7jiAJQ2mWTAPBgNV +HRMBAf8EBTADAQH/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 +DAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMTcwNQYD +VQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIyMIICIjAN +BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAjzZlQOHWTcDXtOlG2mvqM0fNTPl9fb69LT3w23jh +hqXZuglXaO1XPqDQCEGD5yhBJB/jchXQARr7XnAjssufOePPxU7Gkm0mxnu7s9onnQqG6YE3Bf7w +cXHswxzpY6IXFJ3vG2fThVUCAtZJycxa4bH3bzKfydQ7iEGonL3Lq9ttewkfokxykNorCPzPPFTO +Zw+oz12WGQvE43LrrdF9HSfvkusQv1vrO6/PgN3B0pYEW3p+pKk8OHakYo6gOV7qd89dAFmPZiw+ +B6KjBSYRaZfqhbcPlgtLyEDhULouisv3D5oi53+aNxPN8k0TayHRwMwi8qFG9kRpnMphNQcAb9Zh +CBHqurj26bNg5U257J8UZslXWNvNh2n4ioYSA0e/ZhN2rHd9NCSFg83XqpyQGp8hLH94t2S42Oim +9HizVcuE0jLEeK6jj2HdzghTreyI/BXkmg3mnxp3zkyPuBQVPWKchjgGAGYS5Fl2WlPAApiiECto +RHuOec4zSnaqW4EWG7WK2NAAe15itAnWhmMOpgWVSbooi4iTsjQc2KRVbrcc0N6ZVTsj9CLg+Slm +JuwgUHfbSguPvuUCYHBBXtSuUDkiFCbLsjtzdFVHB3mBOagwE0TlBIqulhMlQg+5U8Sb/M3kHN48 ++qvWBkofZ6aYMBzdLNvcGJVXZsb/XItW9XcCAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAfBgNV +HSMEGDAWgBT5YLvU49U09rj1BoAlp3PbRmmonjAdBgNVHQ4EFgQU+WC71OPVNPa49QaAJadz20Zp +qJ4wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQBWs47LCp1Jjr+kxJG7ZhcFUZh1 +++VQLHqe8RT6q9OKPv+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 +3nOUTvOniX9PeGMIyBJQbUJmL025eShNUhqKGoC3GYEOfsSKvGRMIRxDaNc9PIrFsmbVkJq3MQbF +vuJtMgamHvm566qjuL++gmNQ0PAYid/kD3n16qIfKtJwLnvnvJO7bVPiSHyMEAc4/2ayd2F+4OqM +PKq0pPbzlUoSB239jLKJz9CgYXfIWHSw1CM69106yqLbnQneXUQtkPGBzVeS+n68UARjNN9rkxi+ +azayOeSsJDa38O+2HBNXk7besvjihbdzorg1qkXy4J02oW9UivFyVm4uiMVRQkQVlO6jxTiWm05O +WgtH8wY2SXcwvHE35absIQh1/OZhFj931dmRl4QKbNQCTXTAFO39OfuD8l4UoQSwC+n+7o/hbguy +CLNhZglqsQY6ZZZZwPA1/cnaKI0aEYdwgQqomnUdnjqGBQCe24DWJfncBZ4nWUx2OVvq+aWh2IMP +0f/fMBH5hc8zSPXKbWQULHpYT9NLCEnFlWQaYw55PfWzjMpYrZxCRXluDocZXFSxZba/jJvcE+kN +b7gu3GduyYsRtYQUigAZcIN5kZeR1BonvzceMgfYFGM8KEyvAgMBAAGjYzBhMA4GA1UdDwEB/wQE +AwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSubAWjkxPioufi1xzWx/B/yGdToDAfBgNV +HSMEGDAWgBSubAWjkxPioufi1xzWx/B/yGdToDANBgkqhkiG9w0BAQwFAAOCAgEAgyXt6NH9lVLN +nsAEoJFp5lzQhN7craJP6Ed41mWYqVuoPId8AorRbrcWc+ZfwFSY1XS+wc3iEZGtIxg93eFyRJa0 +lV7Ae46ZeBZDE1ZXs6KzO7V33EByrKPrmzU+sQghoefEQzd5Mr6155wsTLxDKZmOMNOsIeDjHfrY +BzN2VAAiKrlNIC5waNrlU/yDXNOd8v9EDERm8tLjvUYAGm0CuiVdjaExUd1URhxN25mW7xocBFym +Fe944Hn+Xds+qkxV/ZoVqW/hpvvfcDDpw+5CRu3CkwWJ+n1jez/QcYF8AOiYrg54NMMl+68KnyBr +3TsTjxKM4kEaSHpzoHdpx7Zcf4LIHv5YGygrqGytXm3ABdJ7t+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 +BgNVHQ4EFgQUSIcUrOPDnpBgOtfKie7TrYy0UGYwEAYJKwYBBAGCNxUBBAMCAQAwCgYIKoZIzj0E +AwMDaAAwZQIwJsdpW9zV57LnyAyMjMPdeYwbY9XJUpROTYJKcx6ygISpJcBMWm1JKWB4E+J+SOtk +AjEA2zQgMgj/mkkCtojeFK9dbJlxjRo/i9fgojaGHAeCOnZT/cKi7e97sIBPWA9LUzm9 +-----END CERTIFICATE----- + +GTS Root R1 +=========== +-----BEGIN CERTIFICATE----- +MIIFWjCCA0KgAwIBAgIQbkepxUtHDA3sM9CJuRz04TANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQG +EwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJv +b3QgUjEwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAG +A1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjEwggIi +MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2EQKLHuOhd5s73L+UPreVp0A8of2C+X0yBoJx +9vaMf/vo27xqLpeXo4xL+Sv2sfnOhB2x+cWX3u+58qPpvBKJXqeqUqv4IyfLpLGcY9vXmX7wCl7r +aKb0xlpHDU0QM+NOsROjyBhsS+z8CZDfnWQpJSMHobTSPS5g4M/SCYe7zUjwTcLCeoiKu7rPWRnW +r4+wB7CeMfGCwcDfLqZtbBkOtdh+JhpFAz2weaSUKK0PfyblqAj+lug8aJRT7oM6iCsVlgmy4HqM +LnXWnOunVmSPlk9orj2XwoSPwLxAwAtcvfaHszVsrBhQf4TgTM2S0yDpM7xSma8ytSmzJSq0SPly +4cpk9+aCEI3oncKKiPo4Zor8Y/kB+Xj9e1x3+naH+uzfsQ55lVe0vSbv1gHR6xYKu44LtcXFilWr +06zqkUspzBmkMiVOKvFlRNACzqrOSbTqn3yDsEB750Orp2yjj32JgfpMpf/VjsPOS+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----- +MIIFWjCCA0KgAwIBAgIQbkepxlqz5yDFMJo/aFLybzANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQG +EwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJv +b3QgUjIwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAG +A1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjIwggIi +MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDO3v2m++zsFDQ8BwZabFn3GTXd98GdVarTzTuk +k3LvCvptnfbwhYBboUhSnznFt+4orO/LdmgUud+tAWyZH8QiHZ/+cnfgLFuv5AS/T3KgGjSY6Dlo +7JUle3ah5mm5hRm9iYz+re026nO8/4Piy33B0s5Ks40FnotJk9/BW9BuXvAuMC6C/Pq8tBcKSOWI +m8Wba96wyrQD8Nr0kLhlZPdcTK3ofmZemde4wj7I0BOdre7kRXuJVfeKH2JShBKzwkCX44ofR5Gm +dFrS+LFjKBC4swm4VndAoiaYecb+3yXuPuWgf9RhD1FLPD+M2uFwdNjCaKH5wQzpoeJ/u1U8dgbu +ak7MkogwTZq9TwtImoS1mKPV+3PBV2HdKFZ1E66HjucMUQkQdYhMvI35ezzUIkgfKtzra7tEscsz +cTJGr61K8YzodDqs5xoic4DSMPclQsciOzsSrZYuxsN2B6ogtzVJV+mSSeh2FnIxZyuWfoqjx5RW +Ir9qS34BIbIjMt/kmkRtWVtd9QCgHJvGeJeNkP+byKq0rxFROV7Z+2et1VsRnTKaG73Vululycsl +aVNVJ1zgyjbLiGH7HrfQy+4W+9OmTN6SpdTi3/UGVN4unUu0kzCqgc7dGtxRcw1PcOnlthYhGXmy +5okLdWTK1au8CcEYof/UVKGFPP0UJAOyh9OktwIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYD +VR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUu//KjiOfT5nK2+JopqUVJxce2Q4wDQYJKoZIhvcNAQEM +BQADggIBALZp8KZ3/p7uC4Gt4cCpx/k1HUCCq+YEtN/L9x0Pg/B+E02NjO7jMyLDOfxA325BS0JT +vhaI8dI4XsRomRyYUpOM52jtG2pzegVATX9lO9ZY8c6DR2Dj/5epnGB3GFW1fgiTz9D2PGcDFWEJ ++YF59exTpJ/JjwGLc8R3dtyDovUMSRqodt6Sm2T4syzFJ9MHwAiApJiS4wGWAqoC7o87xdFtCjMw +c3i5T1QWvwsHoaRc5svJXISPD+AVdyx+Jn7axEvbpxZ3B7DNdehyQtaVhJ2Gg/LkkM0JR9SLA3Da +WsYDQvTtN6LwG1BUSw7YhN4ZKJmBR64JGz9I0cNv4rBgF/XuIwKl2gBbbZCr7qLpGzvpx0QnRY5r +n/WkhLx3+WuXrD5RRaIRpsyF7gpo8j5QOHokYh4XIDdtak23CZvJ/KRY9bb7nE4Yu5UC56Gtmwfu +Nmsk0jmGwZODUNKBRqhfYlcsu2xkiAhu7xNUX90txGdj08+JN7+dIPT7eoOboB6BAFDC5AwiWVIQ +7UNWhwD4FFKnHYuTjKJNRn8nxnGbJN7k2oaLDX5rIMHAnuFl2GqjpuiFizoHCBy69Y9Vmhh1fuXs +gWbRIXOhNUQLgD1bnF5vKheW0YMjiGZt5obicDIvUiLnyOd/xCxgXS/Dr55FBcOEArf9LAhST4Ld +o/DUhgkC +-----END CERTIFICATE----- + +GTS Root R3 +=========== +-----BEGIN CERTIFICATE----- +MIICDDCCAZGgAwIBAgIQbkepx2ypcyRAiQ8DVd2NHTAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJV +UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg +UjMwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE +ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjMwdjAQBgcq +hkjOPQIBBgUrgQQAIgNiAAQfTzOHMymKoYTey8chWEGJ6ladK0uFxh1MJ7x/JlFyb+Kf1qPKzEUU +Rout736GjOyxfi//qXGdGIRFBEFVbivqJn+7kAHjSxm65FSWRQmx1WyRRK2EE46ajA2ADDL24Cej +QjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTB8Sa6oC2uhYHP +0/EqEr24Cmf9vDAKBggqhkjOPQQDAwNpADBmAjEAgFukfCPAlaUs3L6JbyO5o91lAFJekazInXJ0 +glMLfalAvWhgxeG4VDvBNhcl2MG9AjEAnjWSdIUlUfUk7GRSJFClH9voy8l27OyCbvWFGFPouOOa +KaqW04MjyaR7YbPMAuhd +-----END CERTIFICATE----- + +GTS Root R4 +=========== +-----BEGIN CERTIFICATE----- +MIICCjCCAZGgAwIBAgIQbkepyIuUtui7OyrYorLBmTAKBggqhkjOPQQDAzBHMQswCQYDVQQGEwJV +UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg +UjQwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE +ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjQwdjAQBgcq +hkjOPQIBBgUrgQQAIgNiAATzdHOnaItgrkO4NcWBMHtLSZ37wWHO5t5GvWvVYRg1rkDdc/eJkTBa +6zzuhXyiQHY7qca4R9gq55KRanPpsXI5nymfopjTX15YhmUPoYRlBtHci8nHc8iMai/lxKvRHYqj +QjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSATNbrdP9JNqPV +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/VkyDOeTzRYZiNwYDANBgkqhkiG9w0BAQsFADBHMQswCQYDVQQG +EwJDTjERMA8GA1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9u +IFJvb3QwHhcNMTUwMzEzMDAwMDAwWhcNMzgxMjMxMDAwMDAwWjBHMQswCQYDVQQGEwJDTjERMA8G +A1UECgwIVW5pVHJ1c3QxJTAjBgNVBAMMHFVDQSBFeHRlbmRlZCBWYWxpZGF0aW9uIFJvb3QwggIi +MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCpCQcoEwKwmeBkqh5DFnpzsZGgdT6o+uM4AHrs +iWogD4vFsJszA1qGxliG1cGFu0/GnEBNyr7uaZa4rYEwmnySBesFK5pI0Lh2PpbIILvSsPGP2KxF +Rv+qZ2C0d35qHzwaUnoEPQc8hQ2E0B92CvdqFN9y4zR8V05WAT558aopO2z6+I9tTcg1367r3CTu +eUWnhbYFiN6IXSV8l2RnCdm/WhUFhvMJHuxYMjMR83dksHYf5BA1FxvyDrFspCqjc/wJHx4yGVMR +59mzLC52LqGj3n5qiAno8geK+LLNEOfic0CTuwjRP+H8C5SzJe98ptfRr5//lpr1kXuYC3fUfugH +0mK1lTnj8/FtDw5lhIpjVMWAtuCeS31HJqcBCF3RiJ7XwzJE+oJKCmhUfzhTA8ykADNkUVkLo4KR +el7sFsLzKuZi2irbWWIQJUoqgQtHB0MGcIfS+pMRKXpITeuUx3BNr2fVUbGAIAEBtHoIppB/TuDv +B0GHr2qlXov7z1CymlSvw4m6WC31MJixNnI5fkkE/SmnTHnkBVfblLkWU41Gsx2VYVdWf6/wFlth +WG82UBEL2KwrlRYaDh8IzTY0ZRBiZtWAXxQgXy0MoHgKaNYs1+lvK9JKBZP8nm9rZ/+I8U6laUpS +NwXqxhaN0sSZ0YIrO7o1dfdRUVjzyAfd5LQDfwIDAQABo0IwQDAdBgNVHQ4EFgQU2XQ65DA9DfcS +3H5aBZ8eNJr34RQwDwYDVR0TAQH/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 +MFoxCzAJBgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxHDAaBgNVBAsMEzAwMDIgNDgxNDYz +MDgxMDAwMzYxGTAXBgNVBAMMEENlcnRpZ25hIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4IC +DwAwggIKAoICAQDNGDllGlmx6mQWDoyUJJV8g9PFOSbcDO8WV43X2KyjQn+Cyu3NW9sOty3tRQgX +stmzy9YXUnIo245Onoq2C/mehJpNdt4iKVzSs9IGPjA5qXSjklYcoW9MCiBtnyN6tMbaLOQdLNyz +KNAT8kxOAkmhVECe5uUFoC2EyP+YbNDrihqECB63aCPuI9Vwzm1RaRDuoXrC0SIxwoKF0vJVdlB8 +JXrJhFwLrN1CTivngqIkicuQstDuI7pmTLtipPlTWmR7fJj6o0ieD5Wupxj0auwuA0Wv8HT4Ks16 +XdG+RCYyKfHx9WzMfgIhC59vpD++nVPiz32pLHxYGpfhPTc3GGYo0kDFUYqMwy3OU4gkWGQwFsWq +4NYKpkDfePb1BHxpE4S80dGnBs8B92jAqFe7OmGtBIyT46388NtEbVncSVmurJqZNjBBe3YzIoej +wpKGbvlw7q6Hh5UbxHq9MfPU0uWZ/75I7HX1eBYdpnDBfzwboZL7z8g81sWTCo/1VTp2lc5ZmIoJ +lXcymoO6LAQ6l73UL77XbJuiyn1tJslV1c/DeVIICZkHJC1kJWumIWmbat10TWuXekG9qxf5kBdI +jzb5LdXF2+6qhUVB+s06RbFo5jZMm5BX7CO5hwjCxAnxl4YqKE3idMDaxIzb3+KhF1nOJFl0Mdp/ +/TBt2dzhauH8XwIDAQABo4IBGjCCARYwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYw +HQYDVR0OBBYEFBiHVuBud+4kNTxOc5of1uHieX4rMB8GA1UdIwQYMBaAFBiHVuBud+4kNTxOc5of +1uHieX4rMEQGA1UdIAQ9MDswOQYEVR0gADAxMC8GCCsGAQUFBwIBFiNodHRwczovL3d3d3cuY2Vy +dGlnbmEuZnIvYXV0b3JpdGVzLzBtBgNVHR8EZjBkMC+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 +ZDEcMBoGA1UEAxMTZW1TaWduIFJvb3QgQ0EgLSBHMTAeFw0xODAyMTgxODMwMDBaFw00MzAyMTgx +ODMwMDBaMGcxCzAJBgNVBAYTAklOMRMwEQYDVQQLEwplbVNpZ24gUEtJMSUwIwYDVQQKExxlTXVk +aHJhIFRlY2hub2xvZ2llcyBMaW1pdGVkMRwwGgYDVQQDExNlbVNpZ24gUm9vdCBDQSAtIEcxMIIB +IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAk0u76WaK7p1b1TST0Bsew+eeuGQzf2N4aLTN +LnF115sgxk0pvLZoYIr3IZpWNVrzdr3YzZr/k1ZLpVkGoZM0Kd0WNHVO8oG0x5ZOrRkVUkr+PHB1 +cM2vK6sVmjM8qrOLqs1D/fXqcP/tzxE7lM5OMhbTI0Aqd7OvPAEsbO2ZLIvZTmmYsvePQbAyeGHW +DV/D+qJAkh1cF+ZwPjXnorfCYuKrpDhMtTk1b+oDafo6VGiFbdbyL0NVHpENDtjVaqSW0RM8LHhQ +6DqS0hdW5TUaQBw+jSztOd9C4INBdN+jzcKGYEho42kLVACL5HZpIQ15TjQIXhTCzLG3rdd8cIrH +hQIDAQABo0IwQDAdBgNVHQ4EFgQU++8Nhp6w492pufEhF38+/PB3KxowDgYDVR0PAQH/BAQDAgEG +MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFn/8oz1h31xPaOfG1vR2vjTnGs2 +vZupYeveFix0PZ7mddrXuqe8QhfnPZHr5X3dPpzxz5KsbEjMwiI/aTvFthUvozXGaCocV685743Q +NcMYDHsAVhzNixl03r4PEuDQqqE/AjSxcM6dGNYIAwlG7mDgfrbESQRRfXBgvKqy/3lyeqYdPV8q ++Mri/Tm3R7nrft8EI6/6nAYH6ftjk4BAtcZsCjEozgyfz7MjNYBBjWzEN3uBL4ChQEKF6dk4jeih +U80Bv2noWgbyRQuQ+q7hv53yrlc8pa6yVvSLZUDp/TGBLPQ5Cdjua6e0ph0VpZj3AYHYhX3zUVxx +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 +EzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDVQQDExNlbVNp +Z24gUm9vdCBDQSAtIEMxMB4XDTE4MDIxODE4MzAwMFoXDTQzMDIxODE4MzAwMFowVjELMAkGA1UE +BhMCVVMxEzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDVQQD +ExNlbVNpZ24gUm9vdCBDQSAtIEMxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz+up +ufGZBczYKCFK83M0UYRWEPWgTywS4/oTmifQz/l5GnRfHXk5/Fv4cI7gklL35CX5VIPZHdPIWoU/ +Xse2B+4+wM6ar6xWQio5JXDWv7V7Nq2s9nPczdcdioOl+yuQFTdrHCZH3DspVpNqs8FqOp099cGX +OFgFixwR4+S0uF2FHYP+eF8LRWgYSKVGczQ7/g/IdrvHGPMF0Ybzhe3nudkyrVWIzqa2kbBPrH4V +I5b2P/AgNBbeCsbEBEV5f6f9vtKppa+cxSMq9zwhbL2vj07FOrLzNBL834AaSaTUqZX3noleooms +lMuoaJuvimUnzYnu3Yy1aylwQ6BpC+S5DwIDAQABo0IwQDAdBgNVHQ4EFgQU/qHgcB4qAzlSWkK+ +XJGFehiqTbUwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQAD +ggEBAMJKVvoVIXsoounlHfv4LcQ5lkFMOycsxGwYFYDGrK9HWS8mC+M2sO87/kOXSTKZEhVb3xEp +/6tT+LvBeA+snFOvV71ojD1pM/CjoCNjO2RnIkSt1XHLVip4kqNPEjE2NuLe/gDEo2APJ62gsIq1 +NnpSob0n9CAnYuhNlCQT5AoE6TyrLshDCUrGYQTlSTR+08TI9Q/Aqum6VF7zYytPT1DU/rl7mYw9 +wC68AivTxEDkigcxHpvOJpkT+xHqmiIMERnHXhuBUDDIlhJu58tBf5E7oke3VIAb3ADMmpDqw8NQ +BmIMMMAVSKeoWXzhriKi4gp6D/piq1JM4fHfyr6DDUI= +-----END CERTIFICATE----- + +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 +Ew1Ib25na29uZyBQb3N0MSAwHgYDVQQDExdIb25na29uZyBQb3N0IFJvb3QgQ0EgMzAeFw0xNzA2 +MDMwMjI5NDZaFw00MjA2MDMwMjI5NDZaMG8xCzAJBgNVBAYTAkhLMRIwEAYDVQQIEwlIb25nIEtv +bmcxEjAQBgNVBAcTCUhvbmcgS29uZzEWMBQGA1UEChMNSG9uZ2tvbmcgUG9zdDEgMB4GA1UEAxMX +SG9uZ2tvbmcgUG9zdCBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCz +iNfqzg8gTr7m1gNt7ln8wlffKWihgw4+aMdoWJwcYEuJQwy51BWy7sFOdem1p+/l6TWZ5Mwc50tf +jTMwIDNT2aa71T4Tjukfh0mtUC1Qyhi+AViiE3CWu4mIVoBc+L0sPOFMV4i707mV78vH9toxdCim +5lSJ9UExyuUmGs2C4HDaOym71QP1mbpV9WTRYA6ziUm4ii8F0oRFKHyPaFASePwLtVPLwpgchKOe +sL4jpNrcyCse2m5FHomY2vkALgbpDDtw1VAliJnLzXNg99X/NWfFobxeq81KuEXryGgeDQ0URhLj +0mRiikKYvLTGCAj4/ahMZJx2Ab0vqWwzD9g/KLg8aQFChn5pwckGyuV6RmXpwtZQQS4/t+TtbNe/ +JgERohYpSms0BpDsE9K2+2p20jzt8NYt3eEV7KObLyzJPivkaTv/ciWxNoZbx39ri1UbSsUgYT2u +y1DhCDq+sI9jQVMwCFk8mB13umOResoQUGC/8Ne8lYePl8X+l2oBlKN8W4UdKjk60FSh0Tlxnf0h ++bV78OLgAo9uliQlLKAeLKjEiafv7ZkGL7YKTE/bosw3Gq9HhS2KX8Q0NEwA/RiTZxPRN+ZItIsG +xVd7GYYKecsAyVKvQv83j+GjHno9UKtjBucVtT+2RTeUN7F+8kjDf8V1/peNRY8apxpyKBpADwID +AQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBQXnc0e +i9Y5K3DTXNSguB+wAPzFYTAdBgNVHQ4EFgQUF53NHovWOStw01zUoLgfsAD8xWEwDQYJKoZIhvcN +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 93b99680b92..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, 5, 0); -if (versioncompare(versionphparray(), $arrayphpminversionerror) < 0) // Minimum to use (error if lower) -{ +$arrayphpminversionwarning = array(5, 6, 0); +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"; @@ -105,9 +108,8 @@ if (!isset($_GET["testget"]) && !isset($_POST["testpost"])) // We must keep $_GE } -// Check if sessions enabled -if (!function_exists("session_id")) -{ +// Check if session_id is enabled +if (!function_exists("session_id")) { print '<img src="../theme/eldy/img/error.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportSessions")."<br>\n"; $checksok = 0; } else { @@ -115,62 +117,55 @@ if (!function_exists("session_id")) } -// Check if GD supported (we need GD for image conversion) -if (!function_exists("imagecreate")) -{ +// Check if GD is supported (we need GD for image conversion) +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) } else { - print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupportGD")."<br>\n"; + print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupport", "GD")."<br>\n"; } -// Check if Curl supported -if (!function_exists("curl_init")) -{ +// Check if Curl is supported +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) } else { - print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupportCurl")."<br>\n"; + print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupport", "Curl")."<br>\n"; } // 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("PHPSupportCalendar")."<br>\n"; + print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupport", "Calendar")."<br>\n"; } -// Check if UTF8 supported -if (!function_exists("utf8_encode")) -{ +// Check if UTF8 is supported +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) } else { - print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupportUTF8")."<br>\n"; + print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupport", "UTF8")."<br>\n"; } // 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) } else { - print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupportIntl")."<br>\n"; + print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupport", "Intl")."<br>\n"; } } -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"; @@ -201,17 +199,15 @@ if ($memmaxorig != '') } -// If config file present and filled +// 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/doctemplates/websites/website_template-corporate.zip b/htdocs/install/doctemplates/websites/website_template-corporate.zip index 473d7377fc2..dc0065bc12c 100644 Binary files a/htdocs/install/doctemplates/websites/website_template-corporate.zip and b/htdocs/install/doctemplates/websites/website_template-corporate.zip differ diff --git a/htdocs/install/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..242fbff25d4 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) - { + if ($label != $newlabel) { $sqlupdate = "UPDATE ".MAIN_DB_PREFIX."ecm_directories set label='".$db->escape($newlabel)."' WHERE rowid=".$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..f2f1048cf19 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,240 +26,348 @@ -- 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 +-- Morocco +-- Mexique -> for Departmements +-- Netherlands -> for Departmements +-- Panama -> for Departmements +-- Romania -> for Departmements +-- San Salvador +-- Spain +-- Switzerland/Suisse -> for Departmements/Cantons +-- Tunesia +-- United Kingdom +-- USA -> for Departmements + + + +-- 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'); + + +-- 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'); + + +-- Mexique Regions (id country=154) +insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 154, 15401, '', 0, 'Mexique'); + + +-- 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'); + + +-- 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'); + + +-- 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'); + + +-- 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'); + --- 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); -- 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); @@ -274,11 +383,6 @@ 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 ( 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); @@ -319,14 +423,11 @@ 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'); @@ -346,41 +447,42 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES ('2 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..c00b0e009f3 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,348 @@ -- 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 --- 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 +465,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 +642,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,6 +757,52 @@ 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); + +-- 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'); + + -- 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); @@ -435,6 +829,7 @@ 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('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); + -- 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); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('002', 5201, '', 0, '', 'Hernando Siles', 1); @@ -549,27 +944,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 +999,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 +1069,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 +1273,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 +1290,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 +1400,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 +1427,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 +1646,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 +1684,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 9118b7a4651..3c178f7c70d 100644 --- a/htdocs/install/mysql/data/llx_accounting_abc.sql +++ b/htdocs/install/mysql/data/llx_accounting_abc.sql @@ -173,3 +173,11 @@ INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUE -- Description of chart of account TG SYSCOHADA INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 15,'SYSCOHADA-TG', 'Plan comptable Ouest-Africain', 1); +-- Description of chart of account USA US-BASE +INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 11, 'US-BASE', 'USA basic chart of accounts', 1); + +-- 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_be.sql b/htdocs/install/mysql/data/llx_accounting_account_be.sql index b1e3dadff90..e99fa1e54fe 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_be.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_be.sql @@ -655,11 +655,11 @@ 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, active) VALUES (__ENTITY__, 1062, 'PCMN-BASE', 'FINAN', '578', '1060', 'Caisses - timbres ( 0 - fiscaux ; 1 - postaux)', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1063, 'PCMN-BASE', 'FINAN', '58', '1355', 'Virements internes', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1064, 'PCMN-BASE', 'EXPENSE', '60', '1356', 'Approvisionnements et marchandises', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1065, 'PCMN-BASE', 'EXPENSE', 'PRODUCT', '600', '1064', 'Achats de matières premières', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1066, 'PCMN-BASE', 'EXPENSE', 'PRODUCT', '601', '1064', 'Achats de fournitures', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1067, 'PCMN-BASE', 'EXPENSE', 'SERVICE', '602', '1064', 'Achats de services, travaux et études', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1065, 'PCMN-BASE', 'EXPENSE', '600', '1064', 'Achats de matières premières', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1066, 'PCMN-BASE', 'EXPENSE', '601', '1064', 'Achats de fournitures', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1067, 'PCMN-BASE', 'EXPENSE', '602', '1064', 'Achats de services, travaux et études', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1068, 'PCMN-BASE', 'EXPENSE', '603', '1064', 'Sous-traitances générales', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1069, 'PCMN-BASE', 'EXPENSE', 'PRODUCT', '604', '1064', 'Achats de marchandises', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1069, 'PCMN-BASE', 'EXPENSE', '604', '1064', 'Achats de marchandises', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1070, 'PCMN-BASE', 'EXPENSE', '605', '1064', 'Achats d''immeubles destinés à la revente', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1071, 'PCMN-BASE', 'EXPENSE', '608', '1064', 'Remises , ristournes et rabais obtenus sur achats', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1072, 'PCMN-BASE', 'EXPENSE', '609', '1064', 'Variations de stocks', 1); @@ -849,24 +849,24 @@ 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, active) VALUES (__ENTITY__, 1256, 'PCMN-BASE', 'EXPENSE', '695', '1250', 'Administrateurs ou gérants', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1257, 'PCMN-BASE', 'EXPENSE', '696', '1250', 'Autres allocataires', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1258, 'PCMN-BASE', 'INCOME', '70', '1357', 'Chiffre d''affaires', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1260, 'PCMN-BASE', 'INCOME', 'PRODUCT', '700', '1258', 'Ventes de marchandises', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1261, 'PCMN-BASE', 'INCOME', 'PRODUCT', '7000', '1260', 'Ventes en Belgique', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1262, 'PCMN-BASE', 'INCOME', 'PRODUCT', '7001', '1260', 'Ventes dans les pays membres de la C.E.E.', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1263, 'PCMN-BASE', 'INCOME', 'PRODUCT', '7002', '1260', 'Ventes à l''exportation', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1264, 'PCMN-BASE', 'INCOME', 'PRODUCT', '701', '1258', 'Ventes de produits finis', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1265, 'PCMN-BASE', 'INCOME', 'PRODUCT', '7010', '1264', 'Ventes en Belgique', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1266, 'PCMN-BASE', 'INCOME', 'PRODUCT', '7011', '1264', 'Ventes dans les pays membres de la C.E.E.', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1267, 'PCMN-BASE', 'INCOME', 'PRODUCT', '7012', '1264', 'Ventes à l''exportation', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1260, 'PCMN-BASE', 'INCOME', '700', '1258', 'Ventes de marchandises', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1261, 'PCMN-BASE', 'INCOME', '7000', '1260', 'Ventes en Belgique', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1262, 'PCMN-BASE', 'INCOME', '7001', '1260', 'Ventes dans les pays membres de la C.E.E.', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1263, 'PCMN-BASE', 'INCOME', '7002', '1260', 'Ventes à l''exportation', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1264, 'PCMN-BASE', 'INCOME', '701', '1258', 'Ventes de produits finis', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1265, 'PCMN-BASE', 'INCOME', '7010', '1264', 'Ventes en Belgique', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1266, 'PCMN-BASE', 'INCOME', '7011', '1264', 'Ventes dans les pays membres de la C.E.E.', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1267, 'PCMN-BASE', 'INCOME', '7012', '1264', 'Ventes à l''exportation', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1268, 'PCMN-BASE', 'INCOME', '702', '1258', 'Ventes de déchets et rebuts', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1269, 'PCMN-BASE', 'INCOME', '7020', '1268', 'Ventes en Belgique', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1270, 'PCMN-BASE', 'INCOME', '7021', '1268', 'Ventes dans les pays membres de la C.E.E.', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1271, 'PCMN-BASE', 'INCOME', '7022', '1268', 'Ventes à l''exportation', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1272, 'PCMN-BASE', 'INCOME', '703', '1258', 'Ventes d''emballages récupérables', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1273, 'PCMN-BASE', 'INCOME', '704', '1258', 'Facturations des travaux en cours (associations momentanées)', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1274, 'PCMN-BASE', 'INCOME', 'SERVICE', '705', '1258', 'Prestations de services', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1275, 'PCMN-BASE', 'INCOME', 'SERVICE', '7050', '1274', 'Prestations de services en Belgique', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1276, 'PCMN-BASE', 'INCOME', 'SERVICE', '7051', '1274', 'Prestations de services dans les pays membres de la C.E.E.', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1277, 'PCMN-BASE', 'INCOME', 'SERVICE', '7052', '1274', 'Prestations de services en vue de l''exportation', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1274, 'PCMN-BASE', 'INCOME', '705', '1258', 'Prestations de services', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1275, 'PCMN-BASE', 'INCOME', '7050', '1274', 'Prestations de services en Belgique', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1276, 'PCMN-BASE', 'INCOME', '7051', '1274', 'Prestations de services dans les pays membres de la C.E.E.', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1277, 'PCMN-BASE', 'INCOME', '7052', '1274', 'Prestations de services en vue de l''exportation', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1278, 'PCMN-BASE', 'INCOME', '706', '1258', 'Pénalités et dédits obtenus par l''entreprise', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1279, 'PCMN-BASE', 'INCOME', '708', '1258', 'Remises, ristournes et rabais accordés', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1280, 'PCMN-BASE', 'INCOME', '7080', '1279', 'Sur ventes de marchandises', 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_accounting_account_us.sql b/htdocs/install/mysql/data/llx_accounting_account_us.sql index a051453b42c..f0ca038ca08 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_us.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_us.sql @@ -33,141 +33,141 @@ -- ID 1000 - 9999 -- ADD 1100000 to rowid # Do no remove this comment -- -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1000,'US-BASE','ASSETS', 'XXXXXX', '1', '0', 'Assets', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 2000,'US-BASE','LIABILITIES', 'XXXXXX', '2', '0', 'Liabilities', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 3000,'US-BASE','EQUITY', 'XXXXXX', '3', '0', 'Equity', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 4000,'US-BASE','INCOME', 'XXXXXX', '4', '0', 'Revenue', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 5000,'US-BASE','COGS', 'XXXXXX', '5', '0', 'Cost of Goods Sold', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 6000,'US-BASE','EXPENSE', 'XXXXXX', '6', '0', 'Expenses', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7000,'US-BASE','OTHER_REVENUE', 'XXXXXX', '7', '0', 'Other Revenue', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8000,'US-BASE','OTHER_EXPENSES', 'XXXXXX', '8', '0', 'Other Expenses', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1000, 'US-BASE', 'ASSETS', '1', '0', 'Assets', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 2000, 'US-BASE', 'LIABILITIES', '2', '0', 'Liabilities', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 3000, 'US-BASE', 'EQUITY', '3', '0', 'Equity', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4000, 'US-BASE', 'INCOME', '4', '0', 'Revenue', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5000, 'US-BASE', 'COGS', '5', '0', 'Cost of Goods Sold', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 6000, 'US-BASE', 'EXPENSE', '6', '0', 'Expenses', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 7000, 'US-BASE', 'OTHER_REVENUE', '7', '0', 'Other Revenue', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 8000, 'US-BASE', 'OTHER_EXPENSES', '8', '0', 'Other Expenses', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1010, 'US-BASE', 'ASSETS', 'CASH', '1010', '1000', 'Cash on Hand', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1011, 'US-BASE', 'ASSETS', 'CASH', '1020', '1000', 'Checking Account', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1012, 'US-BASE', 'ASSETS', 'CASH', '1030', '1000', 'Savings Account', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1013, 'US-BASE', 'ASSETS', 'XXXXXX', '1040', '1000', 'Investments and Securities', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1014, 'US-BASE', 'ASSETS', 'XXXXXX', '1100', '1000', 'Accounts Receivable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1015, 'US-BASE', 'ASSETS', 'XXXXXX', '1140', '1000', 'Other Receivables', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1016, 'US-BASE', 'ASSETS', 'XXXXXX', '1150', '1000', 'Allowance for Doubtful Accounts', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1017, 'US-BASE', 'ASSETS', 'XXXXXX', '1200', '1000', 'Raw Materials Inventory', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1018, 'US-BASE', 'ASSETS', 'XXXXXX', '1205', '1000', 'Supplies Inventory', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1019, 'US-BASE', 'ASSETS', 'XXXXXX', '1210', '1000', 'Work in Progress Inventory', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1020, 'US-BASE', 'ASSETS', 'XXXXXX', '1215', '1000', 'Finished Goods Inventory', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1021, 'US-BASE', 'ASSETS', 'XXXXXX', '1400', '1000', 'Prepaid Expenses', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1022, 'US-BASE', 'ASSETS', 'XXXXXX', '1410', '1000', 'Employee Advances', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1023, 'US-BASE', 'ASSETS', 'XXXXXX', '1420', '1000', 'Notes Receivable - Current', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1024, 'US-BASE', 'ASSETS', 'XXXXXX', '1430', '1000', 'Prepaid Interest', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1025, 'US-BASE', 'ASSETS', 'XXXXXX', '1470', '1000', 'Other Current Assets', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1026, 'US-BASE', 'ASSETS', 'XXXXXX', '1500', '1000', 'Furniture and Fixtures', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1027, 'US-BASE', 'ASSETS', 'XXXXXX', '1510', '1000', 'Equipment', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1028, 'US-BASE', 'ASSETS', 'XXXXXX', '1520', '1000', 'Vehicles', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1029, 'US-BASE', 'ASSETS', 'XXXXXX', '1530', '1000', 'Other Depreciable Property', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1030, 'US-BASE', 'ASSETS', 'XXXXXX', '1550', '1000', 'Buildings', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1031, 'US-BASE', 'ASSETS', 'XXXXXX', '1560', '1000', 'Building Improvements', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1032, 'US-BASE', 'ASSETS', 'XXXXXX', '1690', '1000', 'Land', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1033, 'US-BASE', 'ASSETS', 'XXXXXX', '1700', '1000', 'Accumulated Depreciation, Furniture and Fixtures', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1034, 'US-BASE', 'ASSETS', 'XXXXXX', '1710', '1000', 'Accumulated Depreciation, Equipment', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1035, 'US-BASE', 'ASSETS', 'XXXXXX', '1720', '1000', 'Accumulated Depreciation, Vehicles', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1036, 'US-BASE', 'ASSETS', 'XXXXXX', '1730', '1000', 'Accumulated Depreciation, Buildings', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1037, 'US-BASE', 'ASSETS', 'XXXXXX', '1740', '1000', 'Accumulated Depreciation, Building Improvements', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1038, 'US-BASE', 'ASSETS', 'XXXXXX', '1750', '1000', 'Accumulated Depreciation, Other', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1039, 'US-BASE', 'ASSETS', 'XXXXXX', '1900', '1000', 'Deposits', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1040, 'US-BASE', 'ASSETS', 'XXXXXX', '1910', '1000', 'Accumulated Amortization', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1041, 'US-BASE', 'ASSETS', 'XXXXXX', '1920', '1000', 'Notes Receivable - Non-current', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1042, 'US-BASE', 'ASSETS', 'XXXXXX', '1990', '1000', 'Other Non-current Assets', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1043, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2100', '2000', 'Accounts Payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1044, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2300', '2000', 'Accrued Expenses', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1045, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2310', '2000', 'Sales Tax Payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1046, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2320', '2000', 'Wages Payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1047, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2330', '2000', '401-K Deductions Payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1048, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2335', '2000', 'Health Insurance Payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1049, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2340', '2000', 'Federal Payroll Taxes Payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1050, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2350', '2000', 'Federal Unemployment Tax Act - Tax Payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1051, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2360', '2000', 'State Payroll Taxes Payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1052, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2370', '2000', 'State Unemployment Tax Act - Tax Payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1053, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2380', '2000', 'Local Payroll Taxes Payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1054, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2390', '2000', 'Income Taxes Payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1055, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2400', '2000', 'Other Taxes Payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1056, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2410', '2000', 'Employee Benefits Payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1057, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2420', '2000', 'Current Portion of Long-term Debt', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1058, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2440', '2000', 'Deposits from Customers', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1059, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2480', '2000', 'Other Current Liabilities', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1060, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2700', '2000', 'Notes Payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1061, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2702', '2000', 'Land Payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1062, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2704', '2000', 'Equipment Payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1063, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2706', '2000', 'Vehicles Payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1064, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2708', '2000', 'Bank Loans Payable', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1065, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2710', '2000', 'Deferred Revenue', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1066, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2740', '2000', 'Other Long-term Liabilities', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1067, 'US-BASE', 'CAPITAL', 'XXXXXX', '3010', '3000', 'Stated Capital', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1068, 'US-BASE', 'CAPITAL', 'XXXXXX', '3020', '3000', 'Capital Surplus', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1069, 'US-BASE', 'CAPITAL', 'XXXXXX', '3030', '3000', 'Retained Earnings', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1070, 'US-BASE', 'INCOME', 'XXXXXX', '4010', '4000', 'Product Sales', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1071, 'US-BASE', 'INCOME', 'XXXXXX', '4060', '4000', 'Reimbursible Expenses', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1072, 'US-BASE', 'INCOME', 'XXXXXX', '4061', '4000', 'Reimbursible Expenses - Meals and Entertainment ', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1073, 'US-BASE', 'INCOME', 'XXXXXX', '4540', '4000', 'Finance Charge Income', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1074, 'US-BASE', 'INCOME', 'XXXXXX', '4550', '4000', 'Shipping Charges Reimbursed', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1075, 'US-BASE', 'INCOME', 'XXXXXX', '4800', '4000', 'Sales Returns and Allowances', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1076, 'US-BASE', 'INCOME', 'XXXXXX', '4900', '4000', 'Sales Discounts', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1077, 'US-BASE', 'COGS', 'XXXXXX', '5010', '5000', 'Product Cost', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1078, 'US-BASE', 'COGS', 'XXXXXX', '5050', '5000', 'Raw Material Purchases', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1079, 'US-BASE', 'COGS', 'XXXXXX', '5100', '5000', 'Direct Labor Costs', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1080, 'US-BASE', 'COGS', 'XXXXXX', '5150', '5000', 'Indirect Labor Costs', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1081, 'US-BASE', 'COGS', 'XXXXXX', '5200', '5000', 'Heat and Power', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1082, 'US-BASE', 'COGS', 'XXXXXX', '5250', '5000', 'Commissions', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1083, 'US-BASE', 'COGS', 'XXXXXX', '5300', '5000', 'Miscellaneous Factory Costs', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1084, 'US-BASE', 'COGS', 'XXXXXX', '5700', '5000', 'Cost of Goods Sold, Salaries and Wages', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1085, 'US-BASE', 'COGS', 'XXXXXX', '5730', '5000', 'Cost of Goods Sold, Contract Labor', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1086, 'US-BASE', 'COGS', 'XXXXXX', '5750', '5000', 'Cost of Goods Sold, Freight', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1087, 'US-BASE', 'COGS', 'XXXXXX', '5800', '5000', 'Cost of Goods Sold, Other', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1088, 'US-BASE', 'COGS', 'XXXXXX', '5850', '5000', 'Inventory Adjustments', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1089, 'US-BASE', 'COGS', 'XXXXXX', '5900', '5000', 'Purchase Returns and Allowances', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1090, 'US-BASE', 'COGS', 'XXXXXX', '5950', '5000', 'Purchase Discounts', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1091, 'US-BASE', 'EXPENSE', 'XXXXXX', '6010', '6000', 'Default Purchase Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1092, 'US-BASE', 'EXPENSE', 'XXXXXX', '6020', '6000', 'Advertising Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1093, 'US-BASE', 'EXPENSE', 'XXXXXX', '6050', '6000', 'Amortization Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1094, 'US-BASE', 'EXPENSE', 'XXXXXX', '6100', '6000', 'Auto EXPENSE', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1095, 'US-BASE', 'EXPENSE', 'XXXXXX', '6150', '6000', 'Bad Debt Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1096, 'US-BASE', 'EXPENSE', 'XXXXXX', '6200', '6000', 'Bank Fees', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1097, 'US-BASE', 'EXPENSE', 'XXXXXX', '6250', '6000', 'Cash Over and Short', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1098, 'US-BASE', 'EXPENSE', 'XXXXXX', '6300', '6000', 'Charitable Contributions Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1099, 'US-BASE', 'EXPENSE', 'XXXXXX', '6350', '6000', 'Commissions and Fees Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1100, 'US-BASE', 'EXPENSE', 'XXXXXX', '6450', '6000', 'Dues and Subscriptions Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1101, 'US-BASE', 'EXPENSE', 'XXXXXX', '6500', '6000', 'Employee Benefit Expense, Health Insurance', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1102, 'US-BASE', 'EXPENSE', 'XXXXXX', '6510', '6000', 'Employee Benefit Expense, Pension Plans', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1103, 'US-BASE', 'EXPENSE', 'XXXXXX', '6520', '6000', 'Employee Benefit Expense, Profit Sharing Plan', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1104, 'US-BASE', 'EXPENSE', 'XXXXXX', '6530', '6000', 'Employee Benefit Expense, Other', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1105, 'US-BASE', 'EXPENSE', 'XXXXXX', '6550', '6000', 'Freight Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1106, 'US-BASE', 'EXPENSE', 'XXXXXX', '6600', '6000', 'Gifts Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1107, 'US-BASE', 'EXPENSE', 'XXXXXX', '6650', '6000', 'Income Tax Expense, Federal', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1108, 'US-BASE', 'EXPENSE', 'XXXXXX', '6660', '6000', 'Income Tax Expense, State', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1109, 'US-BASE', 'EXPENSE', 'XXXXXX', '6670', '6000', 'Income Tax Expense, Local', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1110, 'US-BASE', 'EXPENSE', 'XXXXXX', '6700', '6000', 'Insurance Expense, Product Liability', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1111, 'US-BASE', 'EXPENSE', 'XXXXXX', '6710', '6000', 'Insurance Expense, Vehicle', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1112, 'US-BASE', 'EXPENSE', 'XXXXXX', '6800', '6000', 'Laundry and Dry Cleaning Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1113, 'US-BASE', 'EXPENSE', 'XXXXXX', '6850', '6000', 'Legal and Professional Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1114, 'US-BASE', 'EXPENSE', 'XXXXXX', '6900', '6000', 'Licenses Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1115, 'US-BASE', 'EXPENSE', 'XXXXXX', '6950', '6000', 'Loss on Non-sufficient Funds Checks', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1116, 'US-BASE', 'OTHER_REVENUE', 'XXXXXX', '7010', '7000', 'Interest Income', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1117, 'US-BASE', 'OTHER_REVENUE', 'XXXXXX', '7030', '7000', 'Other Income', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1118, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8010', '8000', 'Depreciation Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1119, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8020', '8000', 'Interest Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1120, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8030', '8000', 'Maintenance Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1121, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8050', '8000', 'Meals and Entertainment Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1122, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8100', '8000', 'Office Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1123, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8200', '8000', 'Payroll Tax Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1124, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8250', '8000', 'Penalties and Fines Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1125, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8300', '8000', 'Other Taxes', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1126, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8350', '8000', 'Postage Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1127, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8400', '8000', 'Rent or Lease Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1128, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8450', '8000', 'Repair and Maintenance Expense, Office', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1129, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8460', '8000', 'Repair and Maintenance Expense, Vehicle', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1130, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8550', '8000', 'Supplies Expense, Office', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1131, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8600', '8000', 'Telephone Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1132, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8620', '8000', 'Training Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1133, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8650', '8000', 'Travel Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1134, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8700', '8000', 'Salaries Expense, Officers', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1135, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8750', '8000', 'Wages Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1136, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8800', '8000', 'Utilities Expense', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1137, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8900', '8000', 'Gain/Loss on Sale of Assets', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1138, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8950', '8000', 'Other Expense', 1); \ No newline at end of file +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1010, 'US-BASE', 'ASSETS', '1010', '1000', 'Cash on Hand', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1011, 'US-BASE', 'ASSETS', '1020', '1000', 'Checking Account', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1012, 'US-BASE', 'ASSETS', '1030', '1000', 'Savings Account', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1013, 'US-BASE', 'ASSETS', '1040', '1000', 'Investments and Securities', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1014, 'US-BASE', 'ASSETS', '1100', '1000', 'Accounts Receivable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1015, 'US-BASE', 'ASSETS', '1140', '1000', 'Other Receivables', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1016, 'US-BASE', 'ASSETS', '1150', '1000', 'Allowance for Doubtful Accounts', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1017, 'US-BASE', 'ASSETS', '1200', '1000', 'Raw Materials Inventory', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1018, 'US-BASE', 'ASSETS', '1205', '1000', 'Supplies Inventory', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1019, 'US-BASE', 'ASSETS', '1210', '1000', 'Work in Progress Inventory', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1020, 'US-BASE', 'ASSETS', '1215', '1000', 'Finished Goods Inventory', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1021, 'US-BASE', 'ASSETS', '1400', '1000', 'Prepaid Expenses', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1022, 'US-BASE', 'ASSETS', '1410', '1000', 'Employee Advances', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1023, 'US-BASE', 'ASSETS', '1420', '1000', 'Notes Receivable - Current', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1024, 'US-BASE', 'ASSETS', '1430', '1000', 'Prepaid Interest', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1025, 'US-BASE', 'ASSETS', '1470', '1000', 'Other Current Assets', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1026, 'US-BASE', 'ASSETS', '1500', '1000', 'Furniture and Fixtures', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1027, 'US-BASE', 'ASSETS', '1510', '1000', 'Equipment', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1028, 'US-BASE', 'ASSETS', '1520', '1000', 'Vehicles', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1029, 'US-BASE', 'ASSETS', '1530', '1000', 'Other Depreciable Property', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1030, 'US-BASE', 'ASSETS', '1550', '1000', 'Buildings', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1031, 'US-BASE', 'ASSETS', '1560', '1000', 'Building Improvements', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1032, 'US-BASE', 'ASSETS', '1690', '1000', 'Land', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1033, 'US-BASE', 'ASSETS', '1700', '1000', 'Accumulated Depreciation, Furniture and Fixtures', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1034, 'US-BASE', 'ASSETS', '1710', '1000', 'Accumulated Depreciation, Equipment', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1035, 'US-BASE', 'ASSETS', '1720', '1000', 'Accumulated Depreciation, Vehicles', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1036, 'US-BASE', 'ASSETS', '1730', '1000', 'Accumulated Depreciation, Buildings', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1037, 'US-BASE', 'ASSETS', '1740', '1000', 'Accumulated Depreciation, Building Improvements', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1038, 'US-BASE', 'ASSETS', '1750', '1000', 'Accumulated Depreciation, Other', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1039, 'US-BASE', 'ASSETS', '1900', '1000', 'Deposits', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1040, 'US-BASE', 'ASSETS', '1910', '1000', 'Accumulated Amortization', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1041, 'US-BASE', 'ASSETS', '1920', '1000', 'Notes Receivable - Non-current', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1042, 'US-BASE', 'ASSETS', '1990', '1000', 'Other Non-current Assets', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1043, 'US-BASE', 'LIABILITIES', '2100', '2000', 'Accounts Payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1044, 'US-BASE', 'LIABILITIES', '2300', '2000', 'Accrued Expenses', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1045, 'US-BASE', 'LIABILITIES', '2310', '2000', 'Sales Tax Payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1046, 'US-BASE', 'LIABILITIES', '2320', '2000', 'Wages Payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1047, 'US-BASE', 'LIABILITIES', '2330', '2000', '401-K Deductions Payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1048, 'US-BASE', 'LIABILITIES', '2335', '2000', 'Health Insurance Payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1049, 'US-BASE', 'LIABILITIES', '2340', '2000', 'Federal Payroll Taxes Payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1050, 'US-BASE', 'LIABILITIES', '2350', '2000', 'Federal Unemployment Tax Act - Tax Payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1051, 'US-BASE', 'LIABILITIES', '2360', '2000', 'State Payroll Taxes Payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1052, 'US-BASE', 'LIABILITIES', '2370', '2000', 'State Unemployment Tax Act - Tax Payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1053, 'US-BASE', 'LIABILITIES', '2380', '2000', 'Local Payroll Taxes Payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1054, 'US-BASE', 'LIABILITIES', '2390', '2000', 'Income Taxes Payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1055, 'US-BASE', 'LIABILITIES', '2400', '2000', 'Other Taxes Payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1056, 'US-BASE', 'LIABILITIES', '2410', '2000', 'Employee Benefits Payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1057, 'US-BASE', 'LIABILITIES', '2420', '2000', 'Current Portion of Long-term Debt', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1058, 'US-BASE', 'LIABILITIES', '2440', '2000', 'Deposits from Customers', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1059, 'US-BASE', 'LIABILITIES', '2480', '2000', 'Other Current Liabilities', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1060, 'US-BASE', 'LIABILITIES', '2700', '2000', 'Notes Payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1061, 'US-BASE', 'LIABILITIES', '2702', '2000', 'Land Payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1062, 'US-BASE', 'LIABILITIES', '2704', '2000', 'Equipment Payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1063, 'US-BASE', 'LIABILITIES', '2706', '2000', 'Vehicles Payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1064, 'US-BASE', 'LIABILITIES', '2708', '2000', 'Bank Loans Payable', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1065, 'US-BASE', 'LIABILITIES', '2710', '2000', 'Deferred Revenue', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1066, 'US-BASE', 'LIABILITIES', '2740', '2000', 'Other Long-term Liabilities', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1067, 'US-BASE', 'CAPITAL', '3010', '3000', 'Stated Capital', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1068, 'US-BASE', 'CAPITAL', '3020', '3000', 'Capital Surplus', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1069, 'US-BASE', 'CAPITAL', '3030', '3000', 'Retained Earnings', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1070, 'US-BASE', 'INCOME', '4010', '4000', 'Product Sales', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1071, 'US-BASE', 'INCOME', '4060', '4000', 'Reimbursible Expenses', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1072, 'US-BASE', 'INCOME', '4061', '4000', 'Reimbursible Expenses - Meals and Entertainment ', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1073, 'US-BASE', 'INCOME', '4540', '4000', 'Finance Charge Income', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1074, 'US-BASE', 'INCOME', '4550', '4000', 'Shipping Charges Reimbursed', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1075, 'US-BASE', 'INCOME', '4800', '4000', 'Sales Returns and Allowances', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1076, 'US-BASE', 'INCOME', '4900', '4000', 'Sales Discounts', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1077, 'US-BASE', 'COGS', '5010', '5000', 'Product Cost', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1078, 'US-BASE', 'COGS', '5050', '5000', 'Raw Material Purchases', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1079, 'US-BASE', 'COGS', '5100', '5000', 'Direct Labor Costs', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1080, 'US-BASE', 'COGS', '5150', '5000', 'Indirect Labor Costs', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1081, 'US-BASE', 'COGS', '5200', '5000', 'Heat and Power', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1082, 'US-BASE', 'COGS', '5250', '5000', 'Commissions', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1083, 'US-BASE', 'COGS', '5300', '5000', 'Miscellaneous Factory Costs', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1084, 'US-BASE', 'COGS', '5700', '5000', 'Cost of Goods Sold, Salaries and Wages', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1085, 'US-BASE', 'COGS', '5730', '5000', 'Cost of Goods Sold, Contract Labor', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1086, 'US-BASE', 'COGS', '5750', '5000', 'Cost of Goods Sold, Freight', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1087, 'US-BASE', 'COGS', '5800', '5000', 'Cost of Goods Sold, Other', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1088, 'US-BASE', 'COGS', '5850', '5000', 'Inventory Adjustments', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1089, 'US-BASE', 'COGS', '5900', '5000', 'Purchase Returns and Allowances', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1090, 'US-BASE', 'COGS', '5950', '5000', 'Purchase Discounts', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1091, 'US-BASE', 'EXPENSE', '6010', '6000', 'Default Purchase Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1092, 'US-BASE', 'EXPENSE', '6020', '6000', 'Advertising Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1093, 'US-BASE', 'EXPENSE', '6050', '6000', 'Amortization Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1094, 'US-BASE', 'EXPENSE', '6100', '6000', 'Auto EXPENSE', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1095, 'US-BASE', 'EXPENSE', '6150', '6000', 'Bad Debt Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1096, 'US-BASE', 'EXPENSE', '6200', '6000', 'Bank Fees', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1097, 'US-BASE', 'EXPENSE', '6250', '6000', 'Cash Over and Short', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1098, 'US-BASE', 'EXPENSE', '6300', '6000', 'Charitable Contributions Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1099, 'US-BASE', 'EXPENSE', '6350', '6000', 'Commissions and Fees Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1100, 'US-BASE', 'EXPENSE', '6450', '6000', 'Dues and Subscriptions Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1101, 'US-BASE', 'EXPENSE', '6500', '6000', 'Employee Benefit Expense, Health Insurance', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1102, 'US-BASE', 'EXPENSE', '6510', '6000', 'Employee Benefit Expense, Pension Plans', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1103, 'US-BASE', 'EXPENSE', '6520', '6000', 'Employee Benefit Expense, Profit Sharing Plan', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1104, 'US-BASE', 'EXPENSE', '6530', '6000', 'Employee Benefit Expense, Other', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1105, 'US-BASE', 'EXPENSE', '6550', '6000', 'Freight Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1106, 'US-BASE', 'EXPENSE', '6600', '6000', 'Gifts Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1107, 'US-BASE', 'EXPENSE', '6650', '6000', 'Income Tax Expense, Federal', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1108, 'US-BASE', 'EXPENSE', '6660', '6000', 'Income Tax Expense, State', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1109, 'US-BASE', 'EXPENSE', '6670', '6000', 'Income Tax Expense, Local', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1110, 'US-BASE', 'EXPENSE', '6700', '6000', 'Insurance Expense, Product Liability', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1111, 'US-BASE', 'EXPENSE', '6710', '6000', 'Insurance Expense, Vehicle', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1112, 'US-BASE', 'EXPENSE', '6800', '6000', 'Laundry and Dry Cleaning Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1113, 'US-BASE', 'EXPENSE', '6850', '6000', 'Legal and Professional Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1114, 'US-BASE', 'EXPENSE', '6900', '6000', 'Licenses Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1115, 'US-BASE', 'EXPENSE', '6950', '6000', 'Loss on Non-sufficient Funds Checks', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1116, 'US-BASE', 'OTHER_REVENUE', '7010', '7000', 'Interest Income', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1117, 'US-BASE', 'OTHER_REVENUE', '7030', '7000', 'Other Income', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1118, 'US-BASE', 'OTHER_EXPENSES', '8010', '8000', 'Depreciation Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1119, 'US-BASE', 'OTHER_EXPENSES', '8020', '8000', 'Interest Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1120, 'US-BASE', 'OTHER_EXPENSES', '8030', '8000', 'Maintenance Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1121, 'US-BASE', 'OTHER_EXPENSES', '8050', '8000', 'Meals and Entertainment Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1122, 'US-BASE', 'OTHER_EXPENSES', '8100', '8000', 'Office Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1123, 'US-BASE', 'OTHER_EXPENSES', '8200', '8000', 'Payroll Tax Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1124, 'US-BASE', 'OTHER_EXPENSES', '8250', '8000', 'Penalties and Fines Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1125, 'US-BASE', 'OTHER_EXPENSES', '8300', '8000', 'Other Taxes', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1126, 'US-BASE', 'OTHER_EXPENSES', '8350', '8000', 'Postage Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1127, 'US-BASE', 'OTHER_EXPENSES', '8400', '8000', 'Rent or Lease Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1128, 'US-BASE', 'OTHER_EXPENSES', '8450', '8000', 'Repair and Maintenance Expense, Office', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1129, 'US-BASE', 'OTHER_EXPENSES', '8460', '8000', 'Repair and Maintenance Expense, Vehicle', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1130, 'US-BASE', 'OTHER_EXPENSES', '8550', '8000', 'Supplies Expense, Office', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1131, 'US-BASE', 'OTHER_EXPENSES', '8600', '8000', 'Telephone Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1132, 'US-BASE', 'OTHER_EXPENSES', '8620', '8000', 'Training Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1133, 'US-BASE', 'OTHER_EXPENSES', '8650', '8000', 'Travel Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1134, 'US-BASE', 'OTHER_EXPENSES', '8700', '8000', 'Salaries Expense, Officers', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1135, 'US-BASE', 'OTHER_EXPENSES', '8750', '8000', 'Wages Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1136, 'US-BASE', 'OTHER_EXPENSES', '8800', '8000', 'Utilities Expense', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1137, 'US-BASE', 'OTHER_EXPENSES', '8900', '8000', 'Gain/Loss on Sale of Assets', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1138, 'US-BASE', 'OTHER_EXPENSES', '8950', '8000', 'Other Expense', 1); diff --git a/htdocs/install/mysql/data/llx_c_action_trigger.sql b/htdocs/install/mysql/data/llx_c_action_trigger.sql index eeca137dbc0..34cef4c94d4 100644 --- a/htdocs/install/mysql/data/llx_c_action_trigger.sql +++ b/htdocs/install/mysql/data/llx_c_action_trigger.sql @@ -101,8 +101,8 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_CREATE','Expense report created','Executed when an expense report is created','expensereport',201); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_VALIDATE','Expense report validated','Executed when an expense report is validated','expensereport',202); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_APPROVE','Expense report approved','Executed when an expense report is approved','expensereport',203); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_PAYED','Expense report billed','Executed when an expense report is set as billed','expensereport',204); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_DELETE','Expense report deleted','Executed when an expense report is deleted','expensereport',205); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_PAID','Expense report billed','Executed when an expense report is set as billed','expensereport',204); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_DELETE','Expense report deleted','Executed when an expense report is deleted','expensereport',205); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_VALIDATE','Expense report validated','Executed when an expense report is validated','expensereport',211); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_APPROVE','Expense report approved','Executed when an expense report is approved','expensereport',212); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROJECT_VALIDATE','Project validation','Executed when a project is validated','project',141); @@ -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 9a0d8c223b6..47197af644d 100644 --- a/htdocs/install/mysql/data/llx_c_actioncomm.sql +++ b/htdocs/install/mysql/data/llx_c_actioncomm.sql @@ -30,7 +30,7 @@ -- Types action comm -- -delete from llx_c_actioncomm where id in (1,2,3,4,5,8,9,10,30,31,40,50); +delete from llx_c_actioncomm where id in (1,2,3,4,5,6,8,9,10,11,30,31,40,50); -- Code used from 3.3+ when type of event is used insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 1,'AC_TEL','system','Phone call',NULL, 1, 2); insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 2,'AC_FAX','system','Send Fax',NULL, 1, 3); @@ -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_currencies.sql b/htdocs/install/mysql/data/llx_c_currencies.sql index d05015721c8..478c263af4c 100644 --- a/htdocs/install/mysql/data/llx_c_currencies.sql +++ b/htdocs/install/mysql/data/llx_c_currencies.sql @@ -73,6 +73,7 @@ INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'XCD' INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'EGP', '[163]', 1, 'Egypt Pound'); INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'SVC', '[36]', 1, 'El Salvador Colon'); INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'EEK', '[107,114]', 1, 'Estonia Kroon'); +INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'ETB', NULL, 1, 'Ethiopian Birr'); INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'EUR', '[8364]', 1, 'Euro Member Countries'); INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'FKP', '[163]', 1, 'Falkland Islands (Malvinas) Pound'); INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'FJD', '[36]', 1, 'Fiji Dollar'); 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 793b29ab640..72746ac99ea 100644 --- a/htdocs/install/mysql/data/llx_c_tva.sql +++ b/htdocs/install/mysql/data/llx_c_tva.sql @@ -23,18 +23,34 @@ -- 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; +-- ALGERIA (id country=13) +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 131, 13, '0','0','TVA 0%', 1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 132, 13, '9','0','TVA 9%',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 133, 13, '19','0','TVA 19%', 1); + +-- ANGOLA (id country=35) +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 351, 35, '0','0','VAT Rate 0', 1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 352, 35, '7','0','VAT reduced rate',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 353, 35, '14','0','VAT standard rate',1); + -- ARGENTINA (id country=23) insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (231, 23, '0','0','IVA Rate 0', 1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (232, 23,'10.5','0','IVA reduced rate',1); @@ -202,6 +218,13 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 1 insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 173, 17, '19','0','Algemeen BTW tarief',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 174, 17, '21','0','Algemeen BTW tarief (vanaf 1 oktober 2012)',0); +-- NEW CALEDONIA (id country=165) +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1651, 165, '0','0','VAT Rate 0', 1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1652, 165, '3','0','VAT standard 3', 1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1653, 165, '6','0','VAT standard 6', 1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1654, 165, '11','0','VAT standard rate', 1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1655, 165, '22','0','VAT standard high', 1); + -- NEW ZEALAND (id country=166) insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1661, 166, '0','0','VAT Rate 0', 1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1662, 166, '15','0','VAT standard rate', 1); @@ -361,16 +384,6 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (23 insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2322,232, '12','0','VAT 12%',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2323,232, '8','0','VAT 8%',1); --- ALGERIA(id country=13) -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 131, 13, '0','0','TVA 0%', 1); -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 132, 13, '9','0','TVA 9%',1); -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 133, 13, '19','0','TVA 19%', 1); - --- ANGOLA (id country=35) -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 351, 35, '0','0','VAT Rate 0', 1); -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 352, 35, '7','0','VAT reduced rate',1); -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 353, 35, '14','0','VAT standard rate',1); - -- Example of code to insert a vat rate 0 for each country --delete from llx_c_tva where rowid = 1181; -- to delete a record that does not follow rules for rowid (fk_pays+'1') --insert into llx_c_tva(rowid, fk_pays, taux, recuperableonly, note, active) SELECT CONCAT(c.rowid, '1'), c.rowid, 0, 0, 'No VAT', 1 from llx_c_country as c where c.rowid not in (select fk_pays 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/11.0.0-12.0.0.sql b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql index 3e2a9b37278..f11fa826fac 100644 --- a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql +++ b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql @@ -343,6 +343,7 @@ ALTER TABLE llx_commande_fournisseurdet ADD INDEX idx_commande_fournisseurdet_fk -- VMYSQL4.3 ALTER TABLE llx_c_shipment_mode MODIFY COLUMN tracking varchar(255) NULL; +-- VPGSQL8.2 ALTER TABLE llx_c_shipment_mode ALTER COLUMN tracking DROP NOT NULL; INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (9,'INPERSON', 'In person at your site', NULL, NULL, 0); INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (10,'FEDEX', 'Fedex', NULL, 'https://www.fedex.com/apps/fedextrack/index.html?tracknumbers={TRACKID}', 0); 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 309d4d4b170..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); @@ -123,6 +122,7 @@ CREATE TABLE llx_c_transport_mode ( label varchar(255) NOT NULL, active tinyint DEFAULT 1 NOT NULL ) ENGINE=innodb; +ALTER TABLE llx_c_transport_mode ADD UNIQUE INDEX uk_c_transport_mode (code, entity); INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('MAR', 'Transport maritime (y compris camions ou wagons sur bateau)', 1); INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('TRA', 'Transport par chemin de fer (y compris camions sur wagon)', 1); @@ -328,7 +328,7 @@ ALTER TABLE llx_product MODIFY COLUMN desiredstock float; ALTER TABLE llx_product_warehouse_properties MODIFY COLUMN seuil_stock_alerte float; ALTER TABLE llx_product_warehouse_properties MODIFY COLUMN desiredstock float; -ALTER TABLE llx_product ADD COLUMN fk_state integer DEFAULT NULL; +ALTER TABLE llx_product ADD COLUMN fk_state integer DEFAULT NULL AFTER fk_country; ALTER TABLE llx_projet ADD COLUMN email_msgid varchar(255); ALTER TABLE llx_ticket ADD COLUMN email_msgid varchar(255); @@ -399,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 ( @@ -409,14 +411,19 @@ 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); DELETE FROM llx_const WHERE name in ('MAIN_INCLUDE_ZERO_VAT_IN_REPORTS'); -UPDATE llx_projet_task_time SET tms = null WHERE tms = 0; -ALTER TABLE llx_projet_task_time MODIFY COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; + +-- VMYSQL4.1 UPDATE llx_projet_task_time SET tms = null WHERE tms = 0; + +ALTER TABLE llx_projet_task_time CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_projet_task_time MODIFY COLUMN datec datetime; @@ -432,12 +439,19 @@ CREATE TABLE llx_c_product_nature ( active tinyint DEFAULT 1 NOT NULL ) ENGINE=innodb; -ALTER TABLE llx_c_product_nature ADD UNIQUE INDEX uk_c_product_nature(code, active); + +ALTER TABLE llx_product DROP FOREIGN KEY fk_product_finished; + +-- VMYSQL4.1 DROP INDEX uk_c_product_nature on llx_c_product_nature; +-- VPGSQL8.2 DROP INDEX uk_c_product_nature; + +ALTER TABLE llx_c_product_nature ADD UNIQUE INDEX uk_c_product_nature(code); INSERT INTO llx_c_product_nature (code, label, active) VALUES (0, 'RowMaterial', 1); INSERT INTO llx_c_product_nature (code, label, active) VALUES (1, 'Finished', 1); ALTER TABLE llx_product MODIFY COLUMN finished tinyint DEFAULT NULL; + ALTER TABLE llx_product ADD CONSTRAINT fk_product_finished FOREIGN KEY (finished) REFERENCES llx_c_product_nature (code); -- MIGRATION TO DO AFTER RENAMING AN OBJECT @@ -543,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); @@ -555,3 +569,22 @@ ALTER TABLE llx_product_fournisseur_price ADD COLUMN packaging varchar(64); ALTER TABLE llx_projet ADD COLUMN fk_opp_status_end integer DEFAULT NULL; +UPDATE llx_c_action_trigger SET elementtype = 'expensereport' where elementtype = 'expense_report' AND code like 'EXPENSE_%'; +UPDATE llx_c_action_trigger SET code = 'EXPENSE_REPORT_PAID' where code = 'EXPENSE_REPORT_PAYED'; +UPDATE llx_c_action_trigger SET code = 'EXPENSE_REPORT_DELETE' where code = 'EXPENSE_DELETE'; +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_CREATE','Expense report created','Executed when an expense report is created','expensereport',201); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_VALIDATE','Expense report validated','Executed when an expense report is validated','expensereport',202); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_APPROVE','Expense report approved','Executed when an expense report is approved','expensereport',203); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_PAID','Expense report billed','Executed when an expense report is set as billed','expensereport',204); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_DELETE','Expense report deleted','Executed when an expense report is deleted','expensereport',205); + +-- Removed no more used function +-- VPGSQL8.2 DROP FUNCTION IF EXISTS update_modified_column_date_m() CASCADE; + +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; + + 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..11886976fa3 --- /dev/null +++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql @@ -0,0 +1,428 @@ +-- +-- 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. + + +-- 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 + +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; + +ALTER TABLE llx_payment_salary CHANGE COLUMN fk_user fk_user integer 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 CHANGE paye paye smallint default 0 NOT NULL; + + +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 \ No newline at end of file diff --git a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql index 00bf30f6672..c6325454b86 100644 --- a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql +++ b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql @@ -248,7 +248,7 @@ CREATE TABLE llx_expensereport ( fk_user_approve integer DEFAULT NULL, fk_user_refuse integer DEFAULT NULL, fk_user_cancel integer DEFAULT NULL, - fk_statut integer NOT NULL, -- 1=brouillon, 2=validé (attente approb), 4=annulé, 5=approuvé, 6=payed, 99=refusé + fk_statut integer NOT NULL, -- 1=draft, 2=validate (waiting approbation), 4=cancel, 5=approved, 6=paid, 99=refused fk_c_paiement integer DEFAULT NULL, paid smallint DEFAULT 0 NOT NULL, note_public text, @@ -524,13 +524,13 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTRACT_VALIDATE','Contract validated','Executed when a contract is validated','contrat',18); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPAL_SENTBYMAIL','Commercial proposal sent by mail','Executed when a commercial proposal is sent by mail','propal',3); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SENTBYMAIL','Customer order sent by mail','Executed when a customer order is sent by mail ','commande',5); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_PAYED','Customer invoice payed','Executed when a customer invoice is payed','facture',7); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_PAYED','Customer invoice paid','Executed when a customer invoice is paid','facture',7); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_CANCEL','Customer invoice canceled','Executed when a customer invoice is conceled','facture',8); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SENTBYMAIL','Customer invoice sent by mail','Executed when a customer invoice is sent by mail','facture',9); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_VALIDATE','Supplier order validated','Executed when a supplier order is validated','order_supplier',11); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_SENTBYMAIL','Supplier order sent by mail','Executed when a supplier order is sent by mail','order_supplier',14); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_VALIDATE','Supplier invoice validated','Executed when a supplier invoice is validated','invoice_supplier',15); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_PAYED','Supplier invoice payed','Executed when a supplier invoice is payed','invoice_supplier',16); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_PAYED','Supplier invoice paid','Executed when a supplier invoice is paid','invoice_supplier',16); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_SENTBYMAIL','Supplier invoice sent by mail','Executed when a supplier invoice is sent by mail','invoice_supplier',17); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_CANCELED','Supplier invoice cancelled','Executed when a supplier invoice is cancelled','invoice_supplier',17); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('SHIPPING_VALIDATE','Shipping validated','Executed when a shipping is validated','shipping',20); 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/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index 033db4620d1..6e9ea4601f8 100644 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -475,7 +475,7 @@ UPDATE llx_chargesociales SET date_creation = tms WHERE date_creation IS NULL; -- VMYSQL4.1 SET sql_mode = 'NO_ZERO_DATE'; -- VMYSQL4.1 update llx_inventory set date_cre = null where DATE(STR_TO_DATE(date_cre, '%Y-%m-%d')) IS NULL; --- Note that you can manually set the default value of a date to CURRENT_TIMESTAMP with: +-- Note that you can manually set the default value of a date or datetime to CURRENT_TIMESTAMP with: --ALTER TABLE llx_table modify column columnname datetime DEFAULT CURRENT_TIMESTAMP; @@ -509,7 +509,7 @@ UPDATE llx_facturedet SET situation_percent = 100 WHERE situation_percent IS NUL -- from llx_facturedet as fd, llx_facture as f where fd.fk_facture = f.rowid AND (total_ht - situation_percent / 100 * subprice * qty * (1 - (fd.remise_percent / 100))) > 0.01 and f.type = 5; --- Note to make all deposit as payed when there is already a discount generated from it. +-- Note to make all deposit as paid when there is already a discount generated from it. --drop table tmp_invoice_deposit_mark_as_available; --create table tmp_invoice_deposit_mark_as_available as select * from llx_facture as f where f.type = 3 and f.paye = 0 and f.rowid in (select fk_facture_source from llx_societe_remise_except); --update llx_facture set paye = 1, fk_statut = 2 where rowid in (select rowid from tmp_invoice_deposit_mark_as_available); 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 23e7d489e09..cd147979790 100644 --- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql +++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql @@ -35,13 +35,13 @@ CREATE TABLE llx_accounting_bookkeeping label_operation varchar(255), -- FEC:EcritureLib | label of the operation debit double(24,8) NOT NULL, -- FEC:Debit credit double(24,8) NOT NULL, -- FEC:Credit - montant double(24,8) NOT NULL, -- FEC:Montant (Not necessary) + montant double(24,8) NULL, -- FEC:Montant (Not necessary) sens varchar(1) DEFAULT NULL, -- FEC:Sens (Not necessary) multicurrency_amount double(24,8), -- FEC:Montantdevise 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 @@ -51,6 +51,6 @@ CREATE TABLE llx_accounting_bookkeeping journal_label varchar(255), -- FEC:JournalLib date_validated datetime, -- FEC:ValidDate | if empty: movement not validated / if not empty: movement validated (No deleting / No modification) date_export datetime DEFAULT NULL, -- - import_key varchar(14), + import_key varchar(14), -- ID of import when data was inserted by a mass import extraparams varchar(255) -- for other parameters with json format ) ENGINE=innodb; 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_product_nature.key.sql b/htdocs/install/mysql/tables/llx_c_product_nature.key.sql index b6a3d2130bf..e1190e5ab19 100644 --- a/htdocs/install/mysql/tables/llx_c_product_nature.key.sql +++ b/htdocs/install/mysql/tables/llx_c_product_nature.key.sql @@ -1 +1,19 @@ -ALTER TABLE llx_c_product_nature ADD UNIQUE INDEX uk_c_product_nature(code, active); +-- ======================================================================== +-- Copyright (C) 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/>. +-- +-- ======================================================================== + +ALTER TABLE llx_c_product_nature ADD UNIQUE INDEX uk_c_product_nature(code); 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 772888620fb..36bd5efb50c 100644 --- a/htdocs/install/mysql/tables/llx_expensereport.sql +++ b/htdocs/install/mysql/tables/llx_expensereport.sql @@ -43,7 +43,7 @@ CREATE TABLE llx_expensereport ( fk_user_approve integer DEFAULT NULL, fk_user_refuse integer DEFAULT NULL, fk_user_cancel integer DEFAULT NULL, - fk_statut integer NOT NULL, -- 1=brouillon, 2=validated (waiting approval), 4=canceled, 5=approved, 6=payed, 99=refused + fk_statut integer NOT NULL, -- 1=brouillon, 2=validated (waiting approval), 4=canceled, 5=approved, 6=paid, 99=refused fk_c_paiement integer DEFAULT NULL, -- deprecated paid smallint default 0 NOT NULL, -- deprecated (status is used instead) note_public text, @@ -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_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 bd0cd722f1a..a76e1f655ae 100644 --- a/htdocs/install/mysql/tables/llx_mrp_production.sql +++ b/htdocs/install/mysql/tables/llx_mrp_production.sql @@ -16,7 +16,9 @@ CREATE TABLE llx_mrp_production( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, - fk_mo integer 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_recruitment_recruitmentcandidature.sql b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.sql index ded61d49e8b..5749acd93d8 100644 --- a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.sql +++ b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.sql @@ -37,7 +37,7 @@ CREATE TABLE llx_recruitment_recruitmentcandidature( date_birth date, remuneration_requested integer, remuneration_proposed integer, - email_msgid varchar(255), + email_msgid varchar(175), -- Do not use a too large value, it generates trouble with unique index fk_recruitment_origin INTEGER NULL -- END MODULEBUILDER FIELDS ) 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 14138dc5664..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,17 +227,15 @@ 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', 'commande'=>'commande', 'facture'=>'facture', + 'socpeople'=>'socpeople', 'propal'=>'propal', 'commande'=>'commande', 'facture'=>'facture', 'supplier_proposal'=>'supplier_proposal', 'commande_fournisseur'=>'commande_fournisseur', 'facture_fourn'=>'facture_fourn', '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 ba24cf3a496..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,20 @@ 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) 'MAIN_MODULE_VARIANTS'=>'newboxdefonly', @@ -499,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'; } @@ -518,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>'; } @@ -553,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); @@ -577,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); +} @@ -614,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"; @@ -623,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; @@ -641,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); @@ -663,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 { @@ -700,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"; @@ -716,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; @@ -740,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"; @@ -759,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; @@ -780,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"; @@ -817,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"; @@ -832,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; @@ -859,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"; @@ -877,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; @@ -898,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"; @@ -916,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'; @@ -959,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 ("; @@ -990,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); @@ -1001,8 +1006,7 @@ function migrate_contracts_det($db, $langs, $conf) $i++; } - if (!$nberr) - { + if (!$nberr) { // $db->rollback(); $db->commit(); print $langs->trans('MigrationSuccessfullUpdate')."<br>"; @@ -1047,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 ("; @@ -1072,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++; } @@ -1081,8 +1081,7 @@ function migrate_links_transfert($db, $langs, $conf) $i++; } - if (!$nberr) - { + if (!$nberr) { // $db->rollback(); $db->commit(); print $langs->trans('MigrationSuccessfullUpdate')."<br>"; @@ -1118,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>'; } @@ -1159,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"; @@ -1182,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++; } @@ -1191,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); @@ -1220,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>'; } @@ -1247,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"; @@ -1267,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++; @@ -1276,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>'; } @@ -1304,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; @@ -1315,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>'; } @@ -1354,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 { @@ -1373,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(); @@ -1424,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; @@ -1462,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; @@ -1513,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(); @@ -1532,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; @@ -1569,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 { @@ -1619,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">'; @@ -1637,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; @@ -1721,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; @@ -1757,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 { @@ -1784,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 { @@ -1834,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; @@ -1870,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 { @@ -1897,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 { @@ -1933,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); + } } } @@ -1995,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); } @@ -2028,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"; @@ -2066,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(); @@ -2077,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"; @@ -2101,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); } @@ -2115,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"; @@ -2155,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(); @@ -2166,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"; @@ -2185,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; @@ -2201,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); } @@ -2219,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"; @@ -2235,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); } @@ -2270,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"; @@ -2286,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); @@ -2297,8 +2263,7 @@ function migrate_stocks($db, $langs, $conf) } } - if ($error == 0) - { + if ($error == 0) { $db->commit(); } else { $db->rollback(); @@ -2331,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"; @@ -2340,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"; @@ -2356,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); @@ -2367,8 +2327,7 @@ function migrate_menus($db, $langs, $conf) } } - if ($error == 0) - { + if ($error == 0) { $db->commit(); } else { $db->rollback(); @@ -2404,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"; @@ -2415,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"; @@ -2431,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); } @@ -2443,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(); @@ -2473,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; } @@ -2503,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>'; @@ -2520,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(); @@ -2563,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>'; @@ -2580,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); } @@ -2592,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(); @@ -2625,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 ("; @@ -2658,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); } @@ -2673,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(); @@ -2712,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 ("; @@ -2747,8 +2678,7 @@ function migrate_project_task_actors($db, $langs, $conf) $resql2 = $db->query($sql2); - if (!$resql2) - { + if (!$resql2) { $error++; dol_print_error($db); } @@ -2757,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(); @@ -2801,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(); @@ -2811,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 ("; @@ -2835,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); } @@ -2847,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(); @@ -2894,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); @@ -2922,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); } @@ -2969,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(); @@ -3000,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(); @@ -3009,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"; @@ -3019,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"; @@ -3036,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); } @@ -3048,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); @@ -3089,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(); @@ -3100,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 ("; @@ -3124,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); } @@ -3146,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); @@ -3206,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"; @@ -3223,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); } @@ -3235,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); @@ -3274,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(); @@ -3291,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 @@ -3335,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); @@ -3400,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>'; @@ -3418,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); } @@ -3447,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(); @@ -3457,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(); @@ -3507,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(); @@ -3517,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 "; @@ -3533,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); } @@ -3545,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"; @@ -3604,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); } @@ -3631,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(); @@ -3675,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); } @@ -3702,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(); @@ -3749,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 { @@ -3809,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(); @@ -3852,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"; @@ -3868,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); } @@ -3881,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(); @@ -3921,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"; @@ -3963,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); } @@ -3981,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(); @@ -4022,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"; @@ -4038,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); } @@ -4051,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(); @@ -4092,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"; @@ -4108,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); } @@ -4121,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(); @@ -4150,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); } @@ -4204,6 +4038,8 @@ function migrate_delete_old_files($db, $langs, $conf) '/core/modules/mailings/kiwi.modules.php', '/core/modules/facture/pdf_crabe.modules.php', '/core/modules/facture/pdf_oursin.modules.php', + '/core/modules/export/export_excel.modules.php', + '/core/modules/export/export_excel2007new.modules.php', '/api/class/api_generic.class.php', '/categories/class/api_category.class.php', @@ -4262,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)) { @@ -4285,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; @@ -4324,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'; @@ -4332,6 +4186,14 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo $mod->remove('noboxes'); $mod->init($reloadmode); } + } elseif ($moduletoreload == 'MAIN_MODULE_EXTERNALSITE') { + dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate ExternalSite module"); + $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modExternalSite.class.php'; + if ($res) { + $mod = new modExternalSite($db); + $mod->remove('noboxes'); + $mod->init($reloadmode); + } } elseif ($moduletoreload == 'MAIN_MODULE_SOCIETE') { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Societe module"); $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modSociete.class.php'; @@ -4460,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'); @@ -4486,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); @@ -4501,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.") -->"; @@ -4518,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 @@ -4533,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>'; @@ -4549,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); } @@ -4574,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); @@ -4591,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; @@ -4602,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 '.'; @@ -4633,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 077f793d649..0226848bd48 100644 --- a/htdocs/intracommreport/card.php +++ b/htdocs/intracommreport/card.php @@ -27,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; require_once DOL_DOCUMENT_ROOT.'/intracommreport/class/intracommreport.class.php'; $langs->loadLangs(array("intracommreport")); -var_dump($_POST); + $action = GETPOST('action'); $exporttype = GETPOSTISSET('exporttype') ? GETPOST('exporttype', 'alphanohtml') : 'deb'; // DEB ou DES $year = GETPOSTINT('year'); 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 d3346e344f4..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"); @@ -132,13 +130,21 @@ if (is_array($extrafields->attributes[$object->table_element]['label']) && count 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], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key]<0)?0:1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key])!=3 && $extrafields->attributes[$object->table_element]['perms'][$key])); + $arrayfields["ef.".$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])); } } */ $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 3211a0b62df..9e084932477 100644 --- a/htdocs/langs/am_ET/accountancy.lang +++ b/htdocs/langs/am_ET/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Date Docref=Reference LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/am_ET/admin.lang b/htdocs/langs/am_ET/admin.lang index f1c41a3b62b..f9a6468d94a 100644 --- a/htdocs/langs/am_ET/admin.lang +++ b/htdocs/langs/am_ET/admin.lang @@ -56,6 +56,8 @@ 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. @@ -85,7 +87,6 @@ ShowPreview=Show preview ShowHideDetails=Show-Hide details PreviewNotAvailable=Preview not available ThemeCurrentlyActive=Theme currently active -CurrentTimeZone=TimeZone PHP (server) MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Dates are stored and returned by database server as if they were kept as submitted string. The timezone has effect only when using the UNIX_TIMESTAMP function (that should not be used by Dolibarr, so database TZ should have no effect, even if changed after data was entered). Space=Space @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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. @@ -256,6 +257,7 @@ 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. @@ -375,7 +377,7 @@ 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:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +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 @@ -406,7 +408,7 @@ UrlGenerationParameters=Parameters to secure URLs SecurityTokenIsUnique=Use a unique securekey parameter for each URL EnterRefToBuildUrl=Enter reference for object %s GetSecuredUrl=Get calculated URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +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 @@ -668,7 +670,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 @@ -1306,7 +1308,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,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 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=New menu MenuHandler=Menu handler MenuModule=Source module -HideUnauthorizedMenu= Hide unauthorized menus (gray) +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 @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/am_ET/banks.lang b/htdocs/langs/am_ET/banks.lang index 9500a5b8b2e..81a23238550 100644 --- a/htdocs/langs/am_ET/banks.lang +++ b/htdocs/langs/am_ET/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/am_ET/blockedlog.lang b/htdocs/langs/am_ET/blockedlog.lang index 5afae6e9e53..0bba5605d0f 100644 --- a/htdocs/langs/am_ET/blockedlog.lang +++ b/htdocs/langs/am_ET/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/am_ET/boxes.lang b/htdocs/langs/am_ET/boxes.lang index d6fd298a3a7..9a751483fb1 100644 --- a/htdocs/langs/am_ET/boxes.lang +++ b/htdocs/langs/am_ET/boxes.lang @@ -46,9 +46,12 @@ 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. @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Accountancy +ValidatedProjects=Validated projects diff --git a/htdocs/langs/am_ET/cashdesk.lang b/htdocs/langs/am_ET/cashdesk.lang index 498baa82200..3fef645d99d 100644 --- a/htdocs/langs/am_ET/cashdesk.lang +++ b/htdocs/langs/am_ET/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +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 @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/am_ET/categories.lang b/htdocs/langs/am_ET/categories.lang index ba37a43b4ec..4ddf0d6093f 100644 --- a/htdocs/langs/am_ET/categories.lang +++ b/htdocs/langs/am_ET/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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 diff --git a/htdocs/langs/am_ET/companies.lang b/htdocs/langs/am_ET/companies.lang index dadff6a7894..8dc815b522e 100644 --- a/htdocs/langs/am_ET/companies.lang +++ b/htdocs/langs/am_ET/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi 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=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=Potential diff --git a/htdocs/langs/am_ET/compta.lang b/htdocs/langs/am_ET/compta.lang index 8f4f058bb87..1afeb6e3727 100644 --- a/htdocs/langs/am_ET/compta.lang +++ b/htdocs/langs/am_ET/compta.lang @@ -111,7 +111,7 @@ 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 ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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 diff --git a/htdocs/langs/am_ET/cron.lang b/htdocs/langs/am_ET/cron.lang index 1de1251831a..2ebdda1e685 100644 --- a/htdocs/langs/am_ET/cron.lang +++ b/htdocs/langs/am_ET/cron.lang @@ -7,13 +7,14 @@ Permission23103 = Delete Scheduled job Permission23104 = Execute Scheduled job # Admin CronSetup=Scheduled job management setup -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=Or to check and launch a specific job +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 @@ -46,6 +47,7 @@ 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 @@ -56,7 +58,7 @@ CronNote=Comment CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Enable +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Disable CronTaskInactive=This job is disabled CronId=Id @@ -82,3 +84,8 @@ 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/am_ET/errors.lang b/htdocs/langs/am_ET/errors.lang index 893f4a35b65..5b26be724d9 100644 --- a/htdocs/langs/am_ET/errors.lang +++ b/htdocs/langs/am_ET/errors.lang @@ -5,8 +5,10 @@ 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. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ 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=Ref used for creation already exists. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/am_ET/exports.lang b/htdocs/langs/am_ET/exports.lang index 3549e3f8b23..a0eb7161ef2 100644 --- a/htdocs/langs/am_ET/exports.lang +++ b/htdocs/langs/am_ET/exports.lang @@ -133,3 +133,4 @@ 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/am_ET/mails.lang b/htdocs/langs/am_ET/mails.lang index 1235eef3b27..2d02c5ddcf9 100644 --- a/htdocs/langs/am_ET/mails.lang +++ b/htdocs/langs/am_ET/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Notifications -NoNotificationsWillBeSent=No email notifications are planned for this event and company -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent +NotificationsAuto=Notifications Auto. +NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company +ANotificationsWillBeSent=1 automatic notification will be sent by email +SomeNotificationsWillBeSent=%s automatic notifications will be sent by email +AddNewNotification=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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +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/am_ET/main.lang b/htdocs/langs/am_ET/main.lang index 96c68cdcfa3..f8ba6f4073c 100644 --- a/htdocs/langs/am_ET/main.lang +++ b/htdocs/langs/am_ET/main.lang @@ -28,7 +28,9 @@ 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 @@ -85,6 +87,8 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C 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 @@ -220,6 +224,7 @@ Value=Value PersonalValue=Personal value NewObject=New %s NewValue=New value +OldValue=Old value %s CurrentValue=Current value Code=Code Type=Type @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Option +Filters=Filters List=List FullList=Full list FullConversation=Full conversation @@ -650,6 +656,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 @@ -671,7 +678,7 @@ SendMail=Send email Email=Email NoEMail=No email AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=No mobile phone Owner=Owner FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/am_ET/modulebuilder.lang b/htdocs/langs/am_ET/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/am_ET/modulebuilder.lang +++ b/htdocs/langs/am_ET/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/am_ET/mrp.lang b/htdocs/langs/am_ET/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/am_ET/mrp.lang +++ b/htdocs/langs/am_ET/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/am_ET/other.lang b/htdocs/langs/am_ET/other.lang index 54c0572d453..7a895bb1ca5 100644 --- a/htdocs/langs/am_ET/other.lang +++ b/htdocs/langs/am_ET/other.lang @@ -5,8 +5,6 @@ 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 -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Right CalculatedWeight=Calculated weight CalculatedVolume=Calculated volume Weight=Weight -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/am_ET/products.lang b/htdocs/langs/am_ET/products.lang index 18af7f2f252..9ecc11ed93d 100644 --- a/htdocs/langs/am_ET/products.lang +++ b/htdocs/langs/am_ET/products.lang @@ -108,7 +108,8 @@ 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +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 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/am_ET/projects.lang b/htdocs/langs/am_ET/projects.lang index baf0ecde17f..05aa1f5a560 100644 --- a/htdocs/langs/am_ET/projects.lang +++ b/htdocs/langs/am_ET/projects.lang @@ -76,15 +76,16 @@ MyActivities=My tasks/activities MyProjects=My projects MyProjectsArea=My projects Area DurationEffective=Effective duration -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Time +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/am_ET/recruitment.lang b/htdocs/langs/am_ET/recruitment.lang index b775e78552e..437445f25dc 100644 --- a/htdocs/langs/am_ET/recruitment.lang +++ b/htdocs/langs/am_ET/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/am_ET/sendings.lang b/htdocs/langs/am_ET/sendings.lang index 5ce3b7f67e9..73bd9aebd42 100644 --- a/htdocs/langs/am_ET/sendings.lang +++ b/htdocs/langs/am_ET/sendings.lang @@ -30,6 +30,7 @@ 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 @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=More complete document model for delivery receipts (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/am_ET/stocks.lang b/htdocs/langs/am_ET/stocks.lang index 660443bcded..a1f55010139 100644 --- a/htdocs/langs/am_ET/stocks.lang +++ b/htdocs/langs/am_ET/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/am_ET/ticket.lang b/htdocs/langs/am_ET/ticket.lang index 59519282c80..982fff90ffa 100644 --- a/htdocs/langs/am_ET/ticket.lang +++ b/htdocs/langs/am_ET/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Other TicketSeverityShortLOW=Low TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=High -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Read Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/am_ET/website.lang b/htdocs/langs/am_ET/website.lang index 03e042e4be6..f17def114b8 100644 --- a/htdocs/langs/am_ET/website.lang +++ b/htdocs/langs/am_ET/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/am_ET/withdrawals.lang b/htdocs/langs/am_ET/withdrawals.lang index 114a8d9dd6c..059b3451c11 100644 --- a/htdocs/langs/am_ET/withdrawals.lang +++ b/htdocs/langs/am_ET/withdrawals.lang @@ -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>. ClassCredited=Classify credited @@ -131,7 +132,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,3 +148,5 @@ 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/am_ET/workflow.lang b/htdocs/langs/am_ET/workflow.lang index 299be277e1d..494a0424a75 100644 --- a/htdocs/langs/am_ET/workflow.lang +++ b/htdocs/langs/am_ET/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 diff --git a/htdocs/langs/ar_SA/accountancy.lang b/htdocs/langs/ar_SA/accountancy.lang index 0809eff3c9f..e0817d618cb 100644 --- a/htdocs/langs/ar_SA/accountancy.lang +++ b/htdocs/langs/ar_SA/accountancy.lang @@ -16,6 +16,8 @@ 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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=التاريخ Docref=مرجع LabelAccount=حساب التسمية LabelOperation=Label operation -Sens=السيناتور +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=دفتر اليومية @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 +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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ Accounted=Accounted in ledger NotYetAccounted=Not yet accounted in ledger ShowTutorial=Show Tutorial NotReconciled=لم يتم تسويتة +WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view ## Admin BindingOptions=Binding options @@ -337,6 +345,7 @@ Modelcsv_LDCompta10=Export for LD Compta (v10 & higher) Modelcsv_openconcerto=Export for OpenConcerto (Test) Modelcsv_configurable=Export 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) diff --git a/htdocs/langs/ar_SA/admin.lang b/htdocs/langs/ar_SA/admin.lang index 6b8e53c6c3b..65d484ec842 100644 --- a/htdocs/langs/ar_SA/admin.lang +++ b/htdocs/langs/ar_SA/admin.lang @@ -56,6 +56,8 @@ GUISetup=العرض SetupArea=التثبيت UploadNewTemplate=Upload new template(s) FormToTestFileUploadForm=نموذج لاختبار تحميل ملف (وفقا لبرنامج الإعداد) +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled 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. @@ -85,7 +87,6 @@ ShowPreview=آظهر المعاينة ShowHideDetails=Show-Hide details PreviewNotAvailable=المعاينة غير متاحة ThemeCurrentlyActive=الثيم النشط حالياً -CurrentTimeZone=حسب توقيت خادم البي إتش بي MySQLTimeZone=والوقت مسقل (قاعدة بيانات) 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=فراغ @@ -153,8 +154,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=Delete log files, including <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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=No directory or files to delete. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=الشركاء المفضلين OtherResources=Other resources ExternalResources=External Resources SocialNetworks=Social Networks +SocialNetworkId=Social Network 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> HelpCenterDesc1=Here are some resources for getting help and support with Dolibarr. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Examples with current configuration ListOfDirectories=قائمة الدلائل المفتوحة قوالب ListOfDirectoriesForModelGenODT=قائمة الدلائل التي تحتوي على قوالب ملفات مع شكل المفتوحة. <br><br> ضع هنا المسار الكامل من الدلائل. <br> إضافة إرجاع بين الدليل ايه. <br> لإضافة دليل وحدة GED، أضيف هنا <b>DOL_DATA_ROOT / ECM / yourdirectoryname.</b> <br><br> الملفات في هذه الدلائل يجب أن ينتهي <b>.odt</b> أو <b>.ods.</b> NumberOfModelFilesFound=Number of ODT/ODS template files found in these directories -ExampleOfDirectoriesForModelGen=أمثلة على بناء الجملة : <br> ج : mydir \\ <br> / الوطن / mydir <br> DOL_DATA_ROOT / إدارة المحتوى في المؤسسة / ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br> لمعرفة كيفية إنشاء قوالب المستند ODT، قبل تخزينها في تلك الدلائل، وقراءة وثائق ويكي: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=موقف الإسم / اسم @@ -406,7 +408,7 @@ UrlGenerationParameters=المعلمات لتأمين عناوين المواق SecurityTokenIsUnique=استخدام معلمة securekey فريدة لكل URL EnterRefToBuildUrl=أدخل مرجع لكائن %s GetSecuredUrl=الحصول على عنوان محسوب -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) OldVATRates=معدل ضريبة القيمة المضافة القديم NewVATRates=معدل ضريبة القيمة المضافة الجديد PriceBaseTypeToChange=تعديل على الأسعار مع القيمة المرجعية قاعدة المعرفة على @@ -668,7 +670,7 @@ Module54000Desc=Direct print (without opening the documents) using Cups IPP inte Module55000Name=استطلاع للرأي، أو مسح التصويت Module55000Desc=Create online polls, surveys or votes (like Doodle, Studs, RDVz etc...) Module59000Name=هوامش -Module59000Desc=وحدة لإدارة الهوامش +Module59000Desc=Module to follow margins Module60000Name=العمولات Module60000Desc=وحدة لإدارة اللجان Module62000Name=شروط التجارة الدولية @@ -1306,7 +1308,7 @@ 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=البحث الأمثل -YouHaveXObjectUseSearchOptim=You have %s %s in the database. You should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,13 @@ ServiceSetup=خدمات وحدة الإعداد ProductServiceSetup=منتجات وخدمات إعداد وحدات 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=في تنشيط المنتج / الخدمة المرفقة التبويب ملفات خيار دمج المستند المنتج PDF إلى اقتراح PDF دازور إذا كان المنتج / الخدمة في الاقتراح -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=النوع الافتراضي لاستخدام الباركود للمنتجات @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=قائمة جديدة MenuHandler=قائمة مناول MenuModule=مصدر في وحدة -HideUnauthorizedMenu= إخفاء القوائم غير المصرح به (الرمادي) +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=معرف القائمة DetailMenuHandler=قائمة المعالج حيث تظهر قائمة جديدة DetailMenuModule=اسم وحدة قائمة في حال الدخول من وحدة @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=الرمز البريدي MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/ar_SA/banks.lang b/htdocs/langs/ar_SA/banks.lang index 5b82860bea7..93d286a4a27 100644 --- a/htdocs/langs/ar_SA/banks.lang +++ b/htdocs/langs/ar_SA/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/ar_SA/blockedlog.lang b/htdocs/langs/ar_SA/blockedlog.lang index 5f6dd79f6f5..2f01fbe9817 100644 --- a/htdocs/langs/ar_SA/blockedlog.lang +++ b/htdocs/langs/ar_SA/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/ar_SA/boxes.lang b/htdocs/langs/ar_SA/boxes.lang index 58b9e904429..9d993910c15 100644 --- a/htdocs/langs/ar_SA/boxes.lang +++ b/htdocs/langs/ar_SA/boxes.lang @@ -46,9 +46,12 @@ 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 +BoxScheduledJobs=المهام المجدولة +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Failed to refresh RSS flux. Latest successful refresh date: %s LastRefreshDate=Latest refresh date NoRecordedBookmarks=أية إشارات محددة. @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=المحاسبة +ValidatedProjects=Validated projects diff --git a/htdocs/langs/ar_SA/cashdesk.lang b/htdocs/langs/ar_SA/cashdesk.lang index bdad092c1c5..0fdc5513233 100644 --- a/htdocs/langs/ar_SA/cashdesk.lang +++ b/htdocs/langs/ar_SA/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=ملاحظة : من الفواتير Paymentnumpad=Type of Pad to enter payment Numberspad=Numbers Pad @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/ar_SA/categories.lang b/htdocs/langs/ar_SA/categories.lang index fa97cbaba63..ffc098c9333 100644 --- a/htdocs/langs/ar_SA/categories.lang +++ b/htdocs/langs/ar_SA/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=منطقة علامات / فئات المشاريع UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories CatList=قائمة العلامات / الفئات +CatListAll=List of tags/categories (all types) NewCategory=علامة / فئة جديدة ModifCat=تعديل العلامة / الفئة CatCreated=تم إنشاء العلامة / الفئة @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=معرف العلامة / الفئة -CatSupList=List of vendor tags/categories -CatCusList=قائمة علامات / فئات العملاء / احتمال +ParentCategory=Parent tag/category +ParentCategoryLabel=Label of parent tag/category +CatSupList=List of vendors tags/categories +CatCusList=List of customers/prospects tags/categories CatProdList=قائمة علامات / فئات المنتجات  CatMemberList=قائمة علامات / فئات الأعضاء  -CatContactList=قائمة اتصال العلامات / الفئات -CatSupLinks=الروابط بين الموردين والعلامات / الفئات +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=الروابط بين العملاء / احتمال والعلامات / فئات CatContactsLinks=Links between contacts/addresses and tags/categories CatProdLinks=الروابط بين المنتجات / الخدمات والعلامات / الفئات -CatProJectLinks=الروابط بين المشاريع والعلامات / الفئات +CatMembersLinks=الروابط بين أفراد والعلامات / فئات +CatProjectsLinks=الروابط بين المشاريع والعلامات / الفئات +CatUsersLinks=Links between users and tags/categories DeleteFromCat=إزالة من العلامة / الفئة ExtraFieldsCategories=سمات تكميلية CategoriesSetup=إعداد العلامات / الفئات diff --git a/htdocs/langs/ar_SA/companies.lang b/htdocs/langs/ar_SA/companies.lang index a17eed9cf32..4c65642bdba 100644 --- a/htdocs/langs/ar_SA/companies.lang +++ b/htdocs/langs/ar_SA/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi 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=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=الموظفين ProspectLevelShort=المحتملة diff --git a/htdocs/langs/ar_SA/compta.lang b/htdocs/langs/ar_SA/compta.lang index b83bfef9a8a..7b8dd642c33 100644 --- a/htdocs/langs/ar_SA/compta.lang +++ b/htdocs/langs/ar_SA/compta.lang @@ -111,7 +111,7 @@ Refund=رد SocialContributionsPayments=الاجتماعية المدفوعات / الضرائب المالية ShowVatPayment=وتظهر دفع ضريبة القيمة المضافة TotalToPay=على دفع ما مجموعه -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account +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=الزبون. حساب. رمز @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=هل أنت متأكد أنك تريد حذف / ExportDataset_tax_1=الضرائب والمدفوعات الاجتماعية والمالية CalcModeVATDebt=<b>الوضع٪ SVAT بشأن المحاسبة الالتزام٪ الصورة.</b> CalcModeVATEngagement=وضع <b>SVAT٪ على مداخيل مصاريف٪ الصورة.</b> -CalcModeDebt=Analysis of known recorded invoices even if they are not yet accounted in ledger. +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= <b>الوضع٪ زارة العلاقات الخارجية على فواتير العملاء - فواتير الموردين٪ الصورة</b> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=ميزان الإيرادات والمصروفات 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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=- المبالغ المبينة لمع جميع الضرائب المدرجة 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=- ويشمل المدفوعات الحقيقية المحرز في الفواتير والمصاريف والضريبة على القيمة المضافة والرواتب. <br> - لأنه يقوم على مواعيد دفع الفواتير والمصاريف والضريبة على القيمة المضافة والرواتب. تاريخ التبرع للتبرع. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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=تقرير RE طرف ثالث LT2ReportByCustomersES=تقرير من قبل طرف ثالث IRPF VATReport=Sale tax report VATReportByPeriods=Sale tax report by period +VATReportByMonth=Sale tax report by month VATReportByRates=Sale tax report by rates VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer diff --git a/htdocs/langs/ar_SA/cron.lang b/htdocs/langs/ar_SA/cron.lang index 36980f15406..338d3adb957 100644 --- a/htdocs/langs/ar_SA/cron.lang +++ b/htdocs/langs/ar_SA/cron.lang @@ -6,14 +6,15 @@ Permission23102 = إنشاء / تحديث المجدولة وظيفة Permission23103 = حذف مهمة مجدولة Permission23104 = تنفيذ مهمة مجدولة # Admin -CronSetup= من المقرر إعداد إدارة العمل -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=أو لفحص وإطلاق وظيفة محددة +CronSetup=من المقرر إعداد إدارة العمل +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=مفتاح أمان للURL لإطلاق كرون الوظائف FileToLaunchCronJobs=Command line to check and launch qualified cron jobs CronExplainHowToRunUnix=على بيئة يونكس يجب عليك استخدام دخول كرونتاب التالي لتشغيل سطر الأوامر كل 5 دقائق -CronExplainHowToRunWin=على مايكروسوفت (TM) ويندوز environement يمكنك استخدام أدوات مهمة مجدولة لتشغيل سطر الأوامر كل 5 دقائق +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 @@ -42,10 +43,11 @@ CronModule=وحدة CronNoJobs=أي وظيفة سجلت CronPriority=الأولوية CronLabel=ملصق -CronNbRun=ملحوظة. إطلاق -CronMaxRun=Max number launch +CronNbRun=Number of launches +CronMaxRun=Maximum number of launches CronEach=كل JobFinished=العمل بدأ وانتهى +Scheduled=Scheduled #Page card CronAdd= إضافة وظائف CronEvery=العمل كل تنفيذ @@ -56,16 +58,16 @@ CronNote=التعليق CronFieldMandatory=الحقول%s إلزامي CronErrEndDateStartDt=تاريخ نهاية لا يمكن أن يكون قبل تاريخ البدء StatusAtInstall=Status at module installation -CronStatusActiveBtn=تمكين +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=يعطل CronTaskInactive=تم تعطيل هذه الوظائف CronId=هوية شخصية CronClassFile=Filename with class -CronModuleHelp=Name of Dolibarr module directory (also work with external Dolibarr module). <BR> For exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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=سطر الأوامر لتنفيذ النظام. CronCreateJob=إنشاء مهمة مجدولة جديدة CronFrom=من عند @@ -76,8 +78,14 @@ CronType_method=Call method of a PHP Class CronType_command=الأمر Shell CronCannotLoadClass=Cannot load class file %s (to use class %s) CronCannotLoadObject=Class file %s was loaded, but object %s was not found into it -UseMenuModuleToolsToAddCronJobs=Go into menu "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +UseMenuModuleToolsToAddCronJobs=Go into menu "<a href="%s">Home - Admin tools - Scheduled jobs</a>" to see and edit scheduled jobs. JobDisabled=تعطيل وظيفة MakeLocalDatabaseDumpShort=Local database backup -MakeLocalDatabaseDump=Create a local database dump. Parameters are: compression ('gz' or 'bz' or 'none'), backup type ('mysql' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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_SA/errors.lang b/htdocs/langs/ar_SA/errors.lang index 8348252dd0b..bf46cf3364d 100644 --- a/htdocs/langs/ar_SA/errors.lang +++ b/htdocs/langs/ar_SA/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=أي خطأ، ونحن نلزم # Errors ErrorButCommitIsDone=تم العثور على أخطاء لكننا تحقق على الرغم من هذا ErrorBadEMail=Email %s is wrong +ErrorBadMXDomain=Email %s seems wrong (domain has no valid MX record) ErrorBadUrl=عنوان الموقع هو الخطأ %s ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=ادخل ٪ ق موجود بالفعل. ErrorGroupAlreadyExists=المجموعة ٪ ق موجود بالفعل. ErrorRecordNotFound=لم يتم العثور على السجل. @@ -48,6 +50,7 @@ ErrorFieldsRequired=تتطلب بعض المجالات لم تملأ. ErrorSubjectIsRequired=The email topic is required ErrorFailedToCreateDir=فشل إنشاء دليل. تأكد من أن خادم الويب المستخدم أذونات لكتابة وثائق Dolibarr في الدليل. إذا تم تمكين المعلم <b>safe_mode</b> على هذا PHP ، تحقق من أن ملفات Dolibarr php تملك لخدمة الويب المستخدم (أو مجموعة). ErrorNoMailDefinedForThisUser=البريد لا يعرف لهذا المستخدم +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=هذه الميزة تحتاج إلى تفعيل جافا سكريبت في العمل. هذا التغيير في البنية -- عرض. ErrorTopMenuMustHaveAParentWithId0=وهناك قائمة من نوع 'توب' لا يمكن أن يكون أحد الوالدين القائمة. 0 وضعت في القائمة أو الأم في اختيار قائمة من نوع 'اليسار'. ErrorLeftMenuMustHaveAParentId=وهناك قائمة من نوع 'اليسار' يجب أن يكون لها هوية الوالد. @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=هذا الاسم الشخصي موجود مسبقا ErrorLDAPSetupNotComplete=Dolibarr - LDAP المطابقة وليس كاملا. ErrorLDAPMakeManualTest=ألف. ldif الملف قد ولدت في الدليل ٪ s. انها محاولة لتحميل يدويا من سطر في الحصول على مزيد من المعلومات عن الأخطاء. ErrorCantSaveADoneUserWithZeroPercentage=Can't save an action with "status not started" if field "done by" is also filled. -ErrorRefAlreadyExists=المرجع المستخدمة لإنشاء موجود بالفعل. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=تم تعيين كلمة مرور لهذا العضو. ومع ذلك، تم إنشاء أي حساب المستخدم. لذلك يتم تخزين كلمة المرور هذه ولكن لا يمكن استخدامها للدخول إلى Dolibarr. ويمكن استخدامه من قبل وحدة / واجهة خارجية ولكن إذا كنت لا تحتاج إلى تعريف أي تسجيل دخول أو كلمة المرور لأحد أفراد، يمكنك تعطيل خيار "إدارة تسجيل دخول لكل عضو" من إعداد وحدة الأعضاء. إذا كنت بحاجة إلى إدارة تسجيل الدخول ولكن لا تحتاج إلى أي كلمة المرور، يمكنك الحفاظ على هذا الحقل فارغا لتجنب هذا التحذير. ملاحظة: يمكن أيضا أن تستخدم البريد الإلكتروني لتسجيل الدخول إذا تم ربط عضو إلى المستخدم. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/ar_SA/exports.lang b/htdocs/langs/ar_SA/exports.lang index d839282e9de..53ce1753324 100644 --- a/htdocs/langs/ar_SA/exports.lang +++ b/htdocs/langs/ar_SA/exports.lang @@ -26,6 +26,8 @@ FieldTitle=حقل العنوان NowClickToGenerateToBuildExportFile=Now, select the file format in the combo box and click on "Generate" to build the export file... AvailableFormats=Available Formats LibraryShort=المكتبة +ExportCsvSeparator=Csv caracter separator +ImportCsvSeparator=Csv caracter separator 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. @@ -131,3 +133,4 @@ 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_SA/mails.lang b/htdocs/langs/ar_SA/mails.lang index 8e4e3308318..384cda2c563 100644 --- a/htdocs/langs/ar_SA/mails.lang +++ b/htdocs/langs/ar_SA/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=خط المستندات في ملف ٪ @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=لا ترسل البريد الإلكتروني. مرسل سيئة أو البريد الإلكتروني المستلم. تحقق ملف تعريف المستخدم. # Module Notifications Notifications=الإخطارات -NoNotificationsWillBeSent=إشعارات البريد الإلكتروني لا يجري التخطيط لهذا الحدث ، وشركة -ANotificationsWillBeSent=1 سيتم إرسال الإشعار عن طريق البريد الإلكتروني -SomeNotificationsWillBeSent=ق ٪ سوف يتم إرسال الإخطارات عبر البريد الإلكتروني -AddNewNotification=تفعيل هدفا إشعار البريد الإلكتروني الجديد -ListOfActiveNotifications=List all active targets for email notification -ListOfNotificationsDone=أرسلت قائمة جميع اشعارات بالبريد الالكتروني +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=وقد تم تكوين إرسال البريد الإلكتروني الإعداد ل'٪ ق'. هذا الوضع لا يمكن أن تستخدم لإرسال إرساله عبر البريد الإلكتروني الشامل. MailSendSetupIs2=يجب عليك أولا الذهاب، مع حساب مشرف، في القائمة٪ sHome - إعداد - رسائل البريد الإلكتروني٪ s إلى تغيير المعلمة <strong>'٪ ق'</strong> لاستخدام وضع '٪ ق'. مع هذا الوضع، يمكنك إدخال الإعداد خادم SMTP المقدمة من قبل موفر خدمة الإنترنت واستخدام قداس ميزة البريد الإلكتروني. MailSendSetupIs3=إذا كان لديك أي أسئلة حول كيفية إعداد ملقم SMTP الخاص بك، يمكنك أن تطلب إلى٪ s. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=معلومات ContactsWithThirdpartyFilter=Contacts with third-party filter Unanswered=Unanswered Answered=Answered IsNotAnAnswer=Is not answer (initial email) IsAnAnswer=Is an answer of an initial email +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_SA/main.lang b/htdocs/langs/ar_SA/main.lang index 7e4057e374a..22d691bfb23 100644 --- a/htdocs/langs/ar_SA/main.lang +++ b/htdocs/langs/ar_SA/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=No template available for this email type AvailableVariables=Available substitution variables NoTranslation=لا يوجد ترجمة Translation=الترجمة +CurrentTimeZone=حسب توقيت خادم البي إتش بي EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria NoRecordFound=لا يوجد سجلات NoRecordDeleted=No record deleted NotEnoughDataYet=Not enough data @@ -85,6 +87,8 @@ FileWasNotUploaded=يتم اختيار ملف لمرفق ولكن لم تحمي NbOfEntries=No. of entries GoToWikiHelpPage=Read online help (Internet access needed) GoToHelpPage=قراءة المساعدة +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Home Page RecordSaved=سجل حفظ RecordDeleted=سجل محذوف RecordGenerated=Record generated @@ -220,6 +224,7 @@ Value=القيمة PersonalValue=قيمة الشخصية NewObject=New %s NewValue=القيمة الجديدة +OldValue=Old value %s CurrentValue=القيمة الحالية Code=رمز Type=اكتب @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=خيار +Filters=Filters List=قائمة FullList=القائمة الكاملة FullConversation=Full conversation @@ -650,6 +656,7 @@ SupplierPreview=Vendor preview ShowCustomerPreview=وتبين للعملاء معاينة ShowSupplierPreview=Show vendor preview RefCustomer=المرجع. العميل +InternalRef=Internal ref. Currency=العملة InfoAdmin=معلومات للإداريين Undo=تراجع @@ -671,7 +678,7 @@ SendMail=إرسال بريد إلكتروني Email=Email NoEMail=أي بريد إلكتروني AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=لا هاتف المحمول Owner=مالك FollowingConstantsWillBeSubstituted=الثوابت التالية ستكون بديلا المقابلة القيمة. @@ -1107,3 +1114,9 @@ UpToDate=Up-to-date OutOfDate=Out-of-date EventReminder=Event Reminder UpdateForAllLines=Update for all lines +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 diff --git a/htdocs/langs/ar_SA/modulebuilder.lang b/htdocs/langs/ar_SA/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/ar_SA/modulebuilder.lang +++ b/htdocs/langs/ar_SA/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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_SA/mrp.lang b/htdocs/langs/ar_SA/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/ar_SA/mrp.lang +++ b/htdocs/langs/ar_SA/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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_SA/other.lang b/htdocs/langs/ar_SA/other.lang index cd09294d71d..95f31ac01c8 100644 --- a/htdocs/langs/ar_SA/other.lang +++ b/htdocs/langs/ar_SA/other.lang @@ -5,8 +5,6 @@ Tools=أدوات TMenuTools=أدوات ToolsDesc=All tools not included in other menu entries are grouped here.<br>All the tools can be accessed via the left menu. Birthday=عيد ميلاد -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=عيد ميلاد النشطة في حالة تأهب BirthdayAlertOff=عيد الميلاد فى حالة تأهب الخاملة TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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=انظر إعداد وحدة٪ الصورة NbOfAttachedFiles=عدد الملفات المرفقة / وثائق TotalSizeOfAttachedFiles=اجمالى حجم الملفات المرفقة / وثائق @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=حق CalculatedWeight=يحسب الوزن CalculatedVolume=يحسب حجم Weight=وزن -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=كجم WeightUnitg=ز WeightUnitmg=مغلم @@ -214,6 +216,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=استيراد مجموعة البيانات DolibarrNotification=إشعار تلقائي ResizeDesc=أدخل عرض جديدة <b>أو</b> ارتفاع جديد. وستبقى نسبة خلال تغيير حجم... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=صادرات المنطقة diff --git a/htdocs/langs/ar_SA/products.lang b/htdocs/langs/ar_SA/products.lang index 0db9c6d5673..37d70e8534c 100644 --- a/htdocs/langs/ar_SA/products.lang +++ b/htdocs/langs/ar_SA/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=عدد من السعر DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=عدد منتج التعبئة الاب @@ -167,8 +168,10 @@ BuyingPrices=شراء أسعار CustomerPrices=أسعار العميل SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +CustomCode=Customs|Commodity|HS code CountryOrigin=بلد المنشأ +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Nature of product (material/finished) NatureOfProductShort=Nature of product NatureOfProductDesc=Raw material or finished product @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=استخدم السعر الثابت PriceByQuantity=أسعار مختلفة حسب الكمية DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=مدى الكمية -MultipriceRules=Price segment rules +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=٪٪ الاختلاف على الصورة٪ PercentDiscountOver=٪٪ خصم أكثر من٪ الصورة diff --git a/htdocs/langs/ar_SA/projects.lang b/htdocs/langs/ar_SA/projects.lang index 044268aa210..466976a6edb 100644 --- a/htdocs/langs/ar_SA/projects.lang +++ b/htdocs/langs/ar_SA/projects.lang @@ -76,15 +76,16 @@ MyActivities=بلدي المهام والأنشطة MyProjects=بلدي المشاريع MyProjectsArea=My projects Area DurationEffective=فعالة لمدة -ProgressDeclared=أعلن التقدم +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=تقدم تحسب +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=وقت +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/ar_SA/recruitment.lang b/htdocs/langs/ar_SA/recruitment.lang index 9c348486cdb..43d1e0fbc55 100644 --- a/htdocs/langs/ar_SA/recruitment.lang +++ b/htdocs/langs/ar_SA/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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_SA/sendings.lang b/htdocs/langs/ar_SA/sendings.lang index 64db057f549..b18d5eb4842 100644 --- a/htdocs/langs/ar_SA/sendings.lang +++ b/htdocs/langs/ar_SA/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=الإرسال الأخرى لهذا النظام SendingsAndReceivingForSameOrder=Shipments and receipts for this order SendingsToValidate=للمصادقة على إرسال StatusSendingCanceled=ألغيت +StatusSendingCanceledShort=ألغيت StatusSendingDraft=مسودة StatusSendingValidated=صادق (لشحن المنتجات أو شحنها بالفعل) StatusSendingProcessed=معالجة @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=أكمل نموذج لتسليم وثيقة من وثائق الإيصالات (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=EXPEDITION_ADDON_NUMBER ثابت لم تحدد SumOfProductVolumes=مجموع أحجام المنتج SumOfProductWeights=مجموع الأوزان المنتج diff --git a/htdocs/langs/ar_SA/stocks.lang b/htdocs/langs/ar_SA/stocks.lang index 09cf9dbae0b..d5a935cf50a 100644 --- a/htdocs/langs/ar_SA/stocks.lang +++ b/htdocs/langs/ar_SA/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/ar_SA/ticket.lang b/htdocs/langs/ar_SA/ticket.lang index bbaece1060f..307fdeb1792 100644 --- a/htdocs/langs/ar_SA/ticket.lang +++ b/htdocs/langs/ar_SA/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=الآخر TicketSeverityShortLOW=منخفض TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=عال -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=قرأ Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/ar_SA/website.lang b/htdocs/langs/ar_SA/website.lang index f271ef38fe8..7bf9189512a 100644 --- a/htdocs/langs/ar_SA/website.lang +++ b/htdocs/langs/ar_SA/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page PageContainer=صفحة 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/ar_SA/withdrawals.lang b/htdocs/langs/ar_SA/withdrawals.lang index bbf352bb2b2..de0c72a1e64 100644 --- a/htdocs/langs/ar_SA/withdrawals.lang +++ b/htdocs/langs/ar_SA/withdrawals.lang @@ -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>. ClassCredited=تصنيف حساب @@ -131,7 +132,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,3 +148,5 @@ 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=لم يتم تعيين خيار الوضع الحقيقي، ونحن بعد توقف هذه المحاكاة 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_SA/workflow.lang b/htdocs/langs/ar_SA/workflow.lang index 30d0fdd1c87..a01d11731e2 100644 --- a/htdocs/langs/ar_SA/workflow.lang +++ b/htdocs/langs/ar_SA/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=إنشاء تلقائي AutomaticClassification=التصنيف التلقائي +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/az_AZ/accountancy.lang b/htdocs/langs/az_AZ/accountancy.lang index 3211a0b62df..9e084932477 100644 --- a/htdocs/langs/az_AZ/accountancy.lang +++ b/htdocs/langs/az_AZ/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Date Docref=Reference LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/az_AZ/admin.lang b/htdocs/langs/az_AZ/admin.lang index f1c41a3b62b..f9a6468d94a 100644 --- a/htdocs/langs/az_AZ/admin.lang +++ b/htdocs/langs/az_AZ/admin.lang @@ -56,6 +56,8 @@ 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. @@ -85,7 +87,6 @@ ShowPreview=Show preview ShowHideDetails=Show-Hide details PreviewNotAvailable=Preview not available ThemeCurrentlyActive=Theme currently active -CurrentTimeZone=TimeZone PHP (server) MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Dates are stored and returned by database server as if they were kept as submitted string. The timezone has effect only when using the UNIX_TIMESTAMP function (that should not be used by Dolibarr, so database TZ should have no effect, even if changed after data was entered). Space=Space @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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. @@ -256,6 +257,7 @@ 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. @@ -375,7 +377,7 @@ 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:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +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 @@ -406,7 +408,7 @@ UrlGenerationParameters=Parameters to secure URLs SecurityTokenIsUnique=Use a unique securekey parameter for each URL EnterRefToBuildUrl=Enter reference for object %s GetSecuredUrl=Get calculated URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +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 @@ -668,7 +670,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 @@ -1306,7 +1308,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,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 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=New menu MenuHandler=Menu handler MenuModule=Source module -HideUnauthorizedMenu= Hide unauthorized menus (gray) +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 @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/az_AZ/banks.lang b/htdocs/langs/az_AZ/banks.lang index 9500a5b8b2e..81a23238550 100644 --- a/htdocs/langs/az_AZ/banks.lang +++ b/htdocs/langs/az_AZ/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/az_AZ/blockedlog.lang b/htdocs/langs/az_AZ/blockedlog.lang index 5afae6e9e53..0bba5605d0f 100644 --- a/htdocs/langs/az_AZ/blockedlog.lang +++ b/htdocs/langs/az_AZ/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/az_AZ/boxes.lang b/htdocs/langs/az_AZ/boxes.lang index d6fd298a3a7..9a751483fb1 100644 --- a/htdocs/langs/az_AZ/boxes.lang +++ b/htdocs/langs/az_AZ/boxes.lang @@ -46,9 +46,12 @@ 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. @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Accountancy +ValidatedProjects=Validated projects diff --git a/htdocs/langs/az_AZ/cashdesk.lang b/htdocs/langs/az_AZ/cashdesk.lang index 498baa82200..3fef645d99d 100644 --- a/htdocs/langs/az_AZ/cashdesk.lang +++ b/htdocs/langs/az_AZ/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +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 @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/az_AZ/categories.lang b/htdocs/langs/az_AZ/categories.lang index ba37a43b4ec..4ddf0d6093f 100644 --- a/htdocs/langs/az_AZ/categories.lang +++ b/htdocs/langs/az_AZ/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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 diff --git a/htdocs/langs/az_AZ/companies.lang b/htdocs/langs/az_AZ/companies.lang index dadff6a7894..8dc815b522e 100644 --- a/htdocs/langs/az_AZ/companies.lang +++ b/htdocs/langs/az_AZ/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi 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=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=Potential diff --git a/htdocs/langs/az_AZ/compta.lang b/htdocs/langs/az_AZ/compta.lang index 8f4f058bb87..1afeb6e3727 100644 --- a/htdocs/langs/az_AZ/compta.lang +++ b/htdocs/langs/az_AZ/compta.lang @@ -111,7 +111,7 @@ 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 ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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 diff --git a/htdocs/langs/az_AZ/cron.lang b/htdocs/langs/az_AZ/cron.lang index 1de1251831a..2ebdda1e685 100644 --- a/htdocs/langs/az_AZ/cron.lang +++ b/htdocs/langs/az_AZ/cron.lang @@ -7,13 +7,14 @@ Permission23103 = Delete Scheduled job Permission23104 = Execute Scheduled job # Admin CronSetup=Scheduled job management setup -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=Or to check and launch a specific job +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 @@ -46,6 +47,7 @@ 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 @@ -56,7 +58,7 @@ CronNote=Comment CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Enable +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Disable CronTaskInactive=This job is disabled CronId=Id @@ -82,3 +84,8 @@ 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/az_AZ/errors.lang b/htdocs/langs/az_AZ/errors.lang index 893f4a35b65..5b26be724d9 100644 --- a/htdocs/langs/az_AZ/errors.lang +++ b/htdocs/langs/az_AZ/errors.lang @@ -5,8 +5,10 @@ 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. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ 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=Ref used for creation already exists. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/az_AZ/exports.lang b/htdocs/langs/az_AZ/exports.lang index 3549e3f8b23..a0eb7161ef2 100644 --- a/htdocs/langs/az_AZ/exports.lang +++ b/htdocs/langs/az_AZ/exports.lang @@ -133,3 +133,4 @@ 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/az_AZ/mails.lang b/htdocs/langs/az_AZ/mails.lang index 1235eef3b27..2d02c5ddcf9 100644 --- a/htdocs/langs/az_AZ/mails.lang +++ b/htdocs/langs/az_AZ/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Notifications -NoNotificationsWillBeSent=No email notifications are planned for this event and company -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent +NotificationsAuto=Notifications Auto. +NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company +ANotificationsWillBeSent=1 automatic notification will be sent by email +SomeNotificationsWillBeSent=%s automatic notifications will be sent by email +AddNewNotification=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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +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/az_AZ/main.lang b/htdocs/langs/az_AZ/main.lang index 96c68cdcfa3..f8ba6f4073c 100644 --- a/htdocs/langs/az_AZ/main.lang +++ b/htdocs/langs/az_AZ/main.lang @@ -28,7 +28,9 @@ 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 @@ -85,6 +87,8 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C 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 @@ -220,6 +224,7 @@ Value=Value PersonalValue=Personal value NewObject=New %s NewValue=New value +OldValue=Old value %s CurrentValue=Current value Code=Code Type=Type @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Option +Filters=Filters List=List FullList=Full list FullConversation=Full conversation @@ -650,6 +656,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 @@ -671,7 +678,7 @@ SendMail=Send email Email=Email NoEMail=No email AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=No mobile phone Owner=Owner FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/az_AZ/modulebuilder.lang b/htdocs/langs/az_AZ/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/az_AZ/modulebuilder.lang +++ b/htdocs/langs/az_AZ/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/az_AZ/mrp.lang b/htdocs/langs/az_AZ/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/az_AZ/mrp.lang +++ b/htdocs/langs/az_AZ/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/az_AZ/other.lang b/htdocs/langs/az_AZ/other.lang index 54c0572d453..7a895bb1ca5 100644 --- a/htdocs/langs/az_AZ/other.lang +++ b/htdocs/langs/az_AZ/other.lang @@ -5,8 +5,6 @@ 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 -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Right CalculatedWeight=Calculated weight CalculatedVolume=Calculated volume Weight=Weight -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/az_AZ/products.lang b/htdocs/langs/az_AZ/products.lang index 97db059594f..9ecc11ed93d 100644 --- a/htdocs/langs/az_AZ/products.lang +++ b/htdocs/langs/az_AZ/products.lang @@ -108,7 +108,8 @@ 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=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +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 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/az_AZ/projects.lang b/htdocs/langs/az_AZ/projects.lang index baf0ecde17f..05aa1f5a560 100644 --- a/htdocs/langs/az_AZ/projects.lang +++ b/htdocs/langs/az_AZ/projects.lang @@ -76,15 +76,16 @@ MyActivities=My tasks/activities MyProjects=My projects MyProjectsArea=My projects Area DurationEffective=Effective duration -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Time +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/az_AZ/recruitment.lang b/htdocs/langs/az_AZ/recruitment.lang index b775e78552e..437445f25dc 100644 --- a/htdocs/langs/az_AZ/recruitment.lang +++ b/htdocs/langs/az_AZ/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/az_AZ/sendings.lang b/htdocs/langs/az_AZ/sendings.lang index 5ce3b7f67e9..73bd9aebd42 100644 --- a/htdocs/langs/az_AZ/sendings.lang +++ b/htdocs/langs/az_AZ/sendings.lang @@ -30,6 +30,7 @@ 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 @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=More complete document model for delivery receipts (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/az_AZ/stocks.lang b/htdocs/langs/az_AZ/stocks.lang index 660443bcded..a1f55010139 100644 --- a/htdocs/langs/az_AZ/stocks.lang +++ b/htdocs/langs/az_AZ/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/az_AZ/ticket.lang b/htdocs/langs/az_AZ/ticket.lang index 59519282c80..982fff90ffa 100644 --- a/htdocs/langs/az_AZ/ticket.lang +++ b/htdocs/langs/az_AZ/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Other TicketSeverityShortLOW=Low TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=High -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Read Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/az_AZ/website.lang b/htdocs/langs/az_AZ/website.lang index 03e042e4be6..f17def114b8 100644 --- a/htdocs/langs/az_AZ/website.lang +++ b/htdocs/langs/az_AZ/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/az_AZ/withdrawals.lang b/htdocs/langs/az_AZ/withdrawals.lang index 114a8d9dd6c..059b3451c11 100644 --- a/htdocs/langs/az_AZ/withdrawals.lang +++ b/htdocs/langs/az_AZ/withdrawals.lang @@ -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>. ClassCredited=Classify credited @@ -131,7 +132,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,3 +148,5 @@ 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/az_AZ/workflow.lang b/htdocs/langs/az_AZ/workflow.lang index 299be277e1d..494a0424a75 100644 --- a/htdocs/langs/az_AZ/workflow.lang +++ b/htdocs/langs/az_AZ/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 diff --git a/htdocs/langs/bg_BG/accountancy.lang b/htdocs/langs/bg_BG/accountancy.lang index 89ff86ac06d..61935e71771 100644 --- a/htdocs/langs/bg_BG/accountancy.lang +++ b/htdocs/langs/bg_BG/accountancy.lang @@ -16,6 +16,8 @@ ThisService=Тази услуга ThisProduct=Този продукт DefaultForService=По подразбиране за услуга DefaultForProduct=По подразбиране за продукт +ProductForThisThirdparty=Product for this thirdparty +ServiceForThisThirdparty=Service for this thirdparty CantSuggest=Не може да се предложи AccountancySetupDoneFromAccountancyMenu=Повечето настройки на счетоводството се извършват от менюто %s ConfigAccountingExpert=Configuration of the module accounting (double entry) @@ -48,6 +50,7 @@ CountriesExceptMe=Всички държави с изключение на %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=Основна счетоводна сметка за клиенти, която не е дефинирана в настройката MainAccountForSuppliersNotDefined=Основна счетоводна сметка за доставчици, която не е дефинирана в настройката @@ -144,7 +147,7 @@ NotVentilatedinAccount=Не е свързан със счетоводната с XLineSuccessfullyBinded=%s продукти / услуги успешно са свързани към счетоводна сметка XLineFailedToBeBinded=%s продукти / услуги, които не са свързани с нито една счетоводна сметка -ACCOUNTING_LIMIT_LIST_VENTILATION=Брой елементи за свързване, показани на страница (препоръчително: 50) +ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Започнете сортирането на страницата „За свързване“, използвайки най-новите елементи ACCOUNTING_LIST_SORT_VENTILATION_DONE=Започнете сортирането на страницата „Извършено свързване“, използвайки най-новите елементи @@ -198,7 +201,8 @@ Docdate=Дата Docref=Референция LabelAccount=Име на сметка LabelOperation=Име на операция -Sens=Значение +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=Означение Codejournal=Журнал @@ -206,7 +210,8 @@ JournalLabel=Име на журнал NumPiece=Пореден номер TransactionNumShort=Транзакция № AccountingCategory=Персонализирани групи -GroupByAccountAccounting=Групиране по счетоводна сметка +GroupByAccountAccounting=Group by general ledger account +GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=Тук може да определите някои групи счетоводни сметки. Те ще бъдат използвани за персонализирани счетоводни отчети. ByAccounts=По сметки ByPredefinedAccountGroups=По предварително определени групи @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Плащането не е свързано с нит OpeningBalance=Начално салдо ShowOpeningBalance=Показване на баланс при откриване HideOpeningBalance=Скриване на баланс при откриване -ShowSubtotalByGroup=Показване на междинна сума по групи +ShowSubtotalByGroup=Show subtotal by level Pcgtype=Група от сметки PcgtypeDesc=Групата от сметки се използва като предварително зададен критерий за филтриране и групиране за някои счетоводни отчети. Например 'Приход' или 'Разход' се използват като групи за счетоводни сметки на продукти за съставяне на отчет за разходи / приходи. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Преглед на списъка с редове на DescVentilExpenseReportMore=Ако настроите счетоводна сметка за видовете разходен отчет, то системата ще може да извърши всички свързвания между редовете на разходния отчет и счетоводната сметка във вашия сметкоплан, просто с едно щракване с бутона <strong>"%s"</strong>. Ако сметката не е зададена в речника с таксите или ако все още имате някои редове, които не са свързани с нито една сметка ще трябва да направите ръчно свързване от менюто "<strong>%s</strong>". DescVentilDoneExpenseReport=Преглед на списъка с редове на разходни отчети и тяхната счетоводна сметка за такса +Closure=Annual closure DescClosure=Преглед на броя движения за месец, които не са валидирани за активните фискални години OverviewOfMovementsNotValidated=Стъпка 1 / Преглед на движенията, които не са валидирани (необходимо за приключване на фискална година) +AllMovementsWereRecordedAsValidated=All movements were recorded as validated +NotAllMovementsCouldBeRecordedAsValidated=Not all movements could be recorded as validated ValidateMovements=Валидиране на движения DescValidateMovements=Всякакви промени или изтриване на написаното ще бъдат забранени. Всички записи за изпълнение трябва да бъдат валидирани, в противен случай приключването няма да е възможно. -SelectMonthAndValidate=Изберете месец и валидирайте движенията ValidateHistory=Автоматично свързване AutomaticBindingDone=Автоматичното свързване завърши @@ -293,6 +300,7 @@ Accounted=Осчетоводено в книгата NotYetAccounted=Все още не е осчетоводено в книгата ShowTutorial=Показване на урок NotReconciled=Не е съгласувано +WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view ## Admin BindingOptions=Binding options @@ -337,6 +345,7 @@ Modelcsv_LDCompta10=Експортиране за LD Compta (v10 и по-нов Modelcsv_openconcerto=Експортиране за OpenConcerto (Тест) Modelcsv_configurable=Експортиране в конфигурируем CSV Modelcsv_FEC=Експортиране за FEC +Modelcsv_FEC2=Export FEC (With dates generation writing / document reversed) Modelcsv_Sage50_Swiss=Експортиране за Sage 50 Швейцария Modelcsv_winfic=Експортиране за Winfic - eWinfic - WinSis Compta Modelcsv_Gestinumv3=Export for Gestinum (v3) diff --git a/htdocs/langs/bg_BG/admin.lang b/htdocs/langs/bg_BG/admin.lang index d40a4f22556..6e7129f0a22 100644 --- a/htdocs/langs/bg_BG/admin.lang +++ b/htdocs/langs/bg_BG/admin.lang @@ -56,6 +56,8 @@ GUISetup=Интерфейс SetupArea=Настройки UploadNewTemplate=Качване на нов(и) шаблон(и) FormToTestFileUploadForm=Формуляр за тестване на качването на файлове (според настройката) +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled IfModuleEnabled=Забележка: Ефективно е само ако модула <b>%s</b> е активиран RemoveLock=Премахнете / преименувайте файла <b>%s</b>, ако съществува, за да разрешите използването на инструмента за инсталиране / актуализиране. RestoreLock=Възстановете файла <b>%s</b> с права само за четене, за да забраните по-нататъшното използване на инструмента за инсталиране / актуализиране. @@ -85,7 +87,6 @@ ShowPreview=Показване на преглед ShowHideDetails=Show-Hide details PreviewNotAvailable=Прегледът не е налице ThemeCurrentlyActive=Темата е активна в момента -CurrentTimeZone=Времева зона на PHP (сървър) MySQLTimeZone=Времева зона на MySql (база данни) TZHasNoEffect=Датите се съхраняват и връщат от сървъра на базата данни така, сякаш се съхраняват като подаден низ. Часовата зона има ефект само когато се използва функцията UNIX_TIMESTAMP (която не трябва да се използва от Dolibarr, така че базата данни TZ не трябва да има ефект, дори ако бъде променена след въвеждането на данните). Space=Пространство @@ -153,8 +154,8 @@ SystemToolsAreaDesc=Тази секция осигурява администр Purge=Разчистване PurgeAreaDesc=Тази страница ви позволява да изтриете всички файлове, генерирани или съхранени от Dolibarr (временни файлове или всички файлове в директорията <b>%s</b>). Използването на тази функция обикновено не е необходимо. Той се предоставя като решение за потребители, чиито Dolibarr се хоства от доставчик, който не предлага разрешения за изтриване на файлове, генерирани от уеб сървъра. PurgeDeleteLogFile=Изтриване на лог файлове, включително <b>%s</b> генериран от Debug Logs модула (няма риск от загуба на данни) -PurgeDeleteTemporaryFiles=Изтриване на всички временни файлове (няма риск от загуба на данни). Забележка: Изтриването се извършва, само ако директорията temp е създадена преди 24 часа. -PurgeDeleteTemporaryFilesShort=Изтриване на временни файлове +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 PurgeDeleteAllFilesInDocumentsDir=Изтриване на всички файлове в директорията: <b>%s</b>.<br>Това ще изтрие всички генерирани документи, свързани с елементи (контрагенти, фактури и т.н.), файлове, качени чрез ECM модула, архиви на базата данни и временни файлове. PurgeRunNow=Разчисти сега PurgeNothingToDelete=Няма директория или файлове за изтриване. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Предпочитани партньори OtherResources=Други ресурси ExternalResources=Външни ресурси SocialNetworks=Социални мрежи +SocialNetworkId=Social Network ID ForDocumentationSeeWiki=За потребителска документация и такава за разработчици (документи, често задавани въпроси,...), <br> погледнете в Dolibarr Wiki: <br> <b><a href="%s" target="_blank">%s</a></b> ForAnswersSeeForum=За всякакви други въпроси / помощ може да използвате Dolibarr форума: <br> <b><a href="%s" target="_blank">%s</a></b> HelpCenterDesc1=Ресурси за получаване на помощ и поддръжка относно Dolibarr @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Примери с текуща конфигурация ListOfDirectories=Списък на директории с OpenDocument шаблони ListOfDirectoriesForModelGenODT=Списък на директории, съдържащи файлове с шаблони във формат OpenDocument. <br><br> Попълнете тук пълния път на директориите. <br> Добавете нов ред за всяка директория. <br> За да включите директория на GED модула, добавете тук <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b>.<br><br> Файловете в тези директории трябва да завършват на <b>.odt</b> или <b>.ods</b>. NumberOfModelFilesFound=Брой файлове с шаблони за ODT/ODS, намерени в тези директории -ExampleOfDirectoriesForModelGen=Примери за синтаксис: <br> C:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br>За да узнаете как да създадете вашите ODT шаблони за документи преди да ги съхраните в тези директории прочетете Wiki документацията: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Позиция на име / фамилия @@ -406,7 +408,7 @@ UrlGenerationParameters=Параметри за защитени URL адрес SecurityTokenIsUnique=Използвайте уникален параметър за защитен ключ за всеки URL адрес EnterRefToBuildUrl=Въведете референция за обект %s GetSecuredUrl=Получете изчисления URL адрес -ButtonHideUnauthorized=Скриване на бутоните за потребители, които не са администратори, вместо показване на сиви бутони. +ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) OldVATRates=Първоначална ставка на ДДС NewVATRates=Нова ставка на ДДС PriceBaseTypeToChange=Променяне на цените с базова референтна стойност, определена на @@ -668,7 +670,7 @@ Module54000Desc=Директен печат (без отваряне на док Module55000Name=Анкети, проучвания и гласоподаване Module55000Desc=Създаване на онлайн анкети, проучвания или гласувания (като Doodle, Studs, RDVz и др.) Module59000Name=Маржове -Module59000Desc=Управление на маржове +Module59000Desc=Module to follow margins Module60000Name=Комисионни Module60000Desc=Управление на комисионни Module62000Name=Условия на доставка @@ -1306,7 +1308,7 @@ YouUseBestDriver=Използвате драйвер %s, който е най-д YouDoNotUseBestDriver=Използвате драйвер %s, но драйвер %s е препоръчителен. NbOfObjectIsLowerThanNoPb=Имате само %s %s в базата данни. Това не изисква особена оптимизация. SearchOptim=Оптимизация на търсене -YouHaveXObjectUseSearchOptim=Имате %s %s в базата данни. Трябва да добавите константата %s със стойност 1 в Начало -> Настройка -> Други настройки. Ограничете търсенето до началото на низове, което прави възможно базата данни да използва индекси и ще получите незабавен отговор. +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=Имате %s %s в базата данни и константата %s е със стойност 1 в Начало -> Настройка -> Други настройки. BrowserIsOK=Използвате уеб браузъра %s. Този браузър е добър от гледна точка на сигурност и производителност. BrowserIsKO=Използвате уеб браузъра %s. Известно е, че този браузър е лош избор от гледна точка на сигурност, производителност и надеждност. Препоръчително е да използвате Firefox, Chrome, Opera или Safari. @@ -1596,8 +1598,13 @@ ServiceSetup=Настройка на модулa за услуги ProductServiceSetup=Настройка на модула за продукти и услуги NumberOfProductShowInSelect=Максимален брой продукти за показване в комбинирани списъци за избор (0 = без ограничение) ViewProductDescInFormAbility=Показване на описанията на продуктите във формуляри (в противен случай се показват в изскачащи подсказки) +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=Активиране на опция за обединяване на продуктови PDF документи налични в секцията "Прикачени файлове и документи" в раздела "Свързани файлове" на търговско предложение, ако се продукт / услуга в предложението и модел за документи Azur -ViewProductDescInThirdpartyLanguageAbility=Показване на описанията на продуктите в езика на контрагента +ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) UseSearchToSelectProductTooltip=Също така, ако имате голям брой продукти (> 100 000) може да увеличите скоростта като зададете константата PRODUCT_DONOTSEARCH_ANYWHERE да бъде със стойност "1" в Настройки - Други настройки. След това търсенето ще бъде ограничено до началото на низ. UseSearchToSelectProduct=Изчакване, докато бъде натиснат клавиш преди да се зареди съдържанието на комбинирания списък с продукти (това може да увеличи производителността, ако имате голям брой продукти, но е по-малко удобно) SetDefaultBarcodeTypeProducts=Тип баркод по подразбиране, който да се използва за продукти @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Персонализирани менюта, коит NewMenu=Ново меню MenuHandler=Манипулатор на меню MenuModule=Модул източник -HideUnauthorizedMenu= Скриване на неоторизирани (сиви) менюта +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=Идентификатор на меню DetailMenuHandler=Манипулатор на меню, в който да се покаже новото меню DetailMenuModule=Име на модула, ако входните данни на менюто идват от модул @@ -1983,11 +1990,12 @@ EMailHost=Адрес на IMAP сървър MailboxSourceDirectory=Директория / Източник в пощенската кутия MailboxTargetDirectory=Директория / Цел в пощенската кутия EmailcollectorOperations=Операции за извършване от колекционера +EmailcollectorOperationsDesc=Operations are executed from top to bottom order MaxEmailCollectPerCollect=Максимален брой събрани имейли при колекциониране CollectNow=Колекциониране ConfirmCloneEmailCollector=Сигурни ли сте, че искате да клонирате имейл колектора %s? -DateLastCollectResult=Дата на последен опит за колекциониране -DateLastcollectResultOk=Дата на последно успешно колекциониране +DateLastCollectResult=Date of latest collect try +DateLastcollectResultOk=Date of latest collect success LastResult=Последен резултат EmailCollectorConfirmCollectTitle=Потвърждение за колекциониране на имейли EmailCollectorConfirmCollect=Искате ли да стартирате колекционирането на този колекционер? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Код на меню (главно меню) ECMAutoTree=Показване на автоматично ECM дърво @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/bg_BG/banks.lang b/htdocs/langs/bg_BG/banks.lang index 234d788aaa4..fe4cf4b6b83 100644 --- a/htdocs/langs/bg_BG/banks.lang +++ b/htdocs/langs/bg_BG/banks.lang @@ -173,10 +173,11 @@ SEPAMandate=SEPA нареждане YourSEPAMandate=Вашите SEPA нареждания FindYourSEPAMandate=Това е вашето SEPA нареждане, с което да упълномощите нашата фирма да направи поръчка за директен дебит към вашата банка. Върнете го подписано (сканиран подписан документ) или го изпратете по пощата на AutoReportLastAccountStatement=Автоматично попълване на полето „номер на банково извлечение“ с последния номер на извлечение, когато правите съгласуване. -CashControl=Лимит за плащане в брой на ПОС -NewCashFence=Нов лимит за плащане в брой +CashControl=POS cash desk control +NewCashFence=New cash desk 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 diff --git a/htdocs/langs/bg_BG/blockedlog.lang b/htdocs/langs/bg_BG/blockedlog.lang index 60c5d813935..892210b3ebb 100644 --- a/htdocs/langs/bg_BG/blockedlog.lang +++ b/htdocs/langs/bg_BG/blockedlog.lang @@ -35,7 +35,7 @@ logDON_DELETE=Дарението е логически изтрито logMEMBER_SUBSCRIPTION_CREATE=Членският внос е създаден logMEMBER_SUBSCRIPTION_MODIFY=Членският внос е променен logMEMBER_SUBSCRIPTION_DELETE=Членският внос е логически изтрит -logCASHCONTROL_VALIDATE=Регистриране на финансово престъпление +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Изтегляне на фактура за продажба BlockedLogBillPreview=Преглед на фактура за продажба BlockedlogInfoDialog=Подробности в регистъра diff --git a/htdocs/langs/bg_BG/boxes.lang b/htdocs/langs/bg_BG/boxes.lang index f360c2f0d01..c59a1d12298 100644 --- a/htdocs/langs/bg_BG/boxes.lang +++ b/htdocs/langs/bg_BG/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=Дарения: %s последно промене BoxTitleLastModifiedExpenses=Разходни отчети: %s последно променени BoxTitleLatestModifiedBoms=Спецификации: %s последно променени BoxTitleLatestModifiedMos=Поръчки за производство: %s последно променени +BoxTitleLastOutstandingBillReached=Customers with maximum outstanding exceeded BoxGlobalActivity=Глобална дейност (фактури, предложения, поръчки) BoxGoodCustomers=Добри клиенти BoxTitleGoodCustomers=%s Добри клиенти +BoxScheduledJobs=Планирани задачи +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Неуспешно опресняване на RSS поток. Последното успешно опресняване е на дата: %s LastRefreshDate=Последна дата на опресняване NoRecordedBookmarks=Не са дефинирани отметки. @@ -92,8 +95,8 @@ LastXMonthRolling=Подвижни месеци: %s последно изтек ChooseBoxToAdd=Добавяне на джаджа към таблото BoxAdded=Джаджата е добавена към таблото BoxTitleUserBirthdaysOfMonth=Рождени дни в този месец (потребители) -BoxLastManualEntries=Последни ръчни записи в счетоводството -BoxTitleLastManualEntries=Ръчни записи: %s последни +BoxLastManualEntries=Latest record in accountancy entered manually or without source document +BoxTitleLastManualEntries=%s latest record entered manually or without source document NoRecordedManualEntries=Няма ръчни записи в счетоводството BoxSuspenseAccount=Брой счетоводни операции във временна сметка BoxTitleSuspenseAccount=Брой неразпределени редове @@ -102,5 +105,7 @@ SuspenseAccountNotDefined=Не е дефинирана временна смет BoxLastCustomerShipments=Последни пратки към клиенти BoxTitleLastCustomerShipments=Пратки: %s последни към клиенти NoRecordedShipments=Няма регистрирани пратки към клиенти +BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages AccountancyHome=Счетоводство +ValidatedProjects=Validated projects diff --git a/htdocs/langs/bg_BG/cashdesk.lang b/htdocs/langs/bg_BG/cashdesk.lang index a30ed1b0a22..a7d3530d1e3 100644 --- a/htdocs/langs/bg_BG/cashdesk.lang +++ b/htdocs/langs/bg_BG/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Футър AmountAtEndOfPeriod=Сума в края на периода (ден, месец или година) TheoricalAmount=Теоретична сума RealAmount=Реална сума -CashFence=Cash fence -CashFenceDone=Парична граница за периода +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=Брой фактури Paymentnumpad=Тип Pad за въвеждане на плащане Numberspad=Числов Pad @@ -99,8 +99,9 @@ CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 = <br><b>{TN}</b> тагът се използва за добавяне на номера на терминала TakeposGroupSameProduct=Групиране на едни и същи продукти StartAParallelSale=Стартиране на нова паралелна продажба -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +SaleStartedAt=Sale started at %s +ControlCashOpening=Control cash popup at opening POS +CloseCashFence=Close cash desk control CashReport=Паричен отчет MainPrinterToUse=Main printer to use OrderPrinterToUse=Order printer to use @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/bg_BG/categories.lang b/htdocs/langs/bg_BG/categories.lang index 717f1a5fadd..54c706a7b42 100644 --- a/htdocs/langs/bg_BG/categories.lang +++ b/htdocs/langs/bg_BG/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=Секция с тагове / категории за п UsersCategoriesArea=Секция с тагове / категории за потребители SubCats=Подкатегории CatList=Списък с тагове / категории +CatListAll=List of tags/categories (all types) NewCategory=Нов таг / категория ModifCat=Променяне на таг / категория CatCreated=Създаден е таг / категория @@ -65,16 +66,22 @@ UsersCategoriesShort=Категории потребители StockCategoriesShort=Тагове / Категории ThisCategoryHasNoItems=Тази категория не съдържа никакви елементи CategId=Идентификатор на таг / категория -CatSupList=Списък на тагове / категории за доставчици -CatCusList=Списък на тагове / категории за клиенти / потенциални клиенти +ParentCategory=Parent tag/category +ParentCategoryLabel=Label of parent tag/category +CatSupList=List of vendors tags/categories +CatCusList=List of customers/prospects tags/categories CatProdList=Списък на тагове / категории за продукти CatMemberList=Списък на тагове / категории за членове -CatContactList=Списък на тагове / категории за контакти -CatSupLinks=Връзки между доставчици и тагове / категории +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=Връзки между клиенти / потенциални клиенти и тагове / категории CatContactsLinks=Връзки между контакти / адреси и тагове / категории CatProdLinks=Връзки между продукти / услуги и тагове / категории -CatProJectLinks=Връзки между проекти и тагове / категории +CatMembersLinks=Връзки между членове и етикети/категории +CatProjectsLinks=Връзки между проекти и тагове / категории +CatUsersLinks=Links between users and tags/categories DeleteFromCat=Изтриване от таг / категория ExtraFieldsCategories=Допълнителни атрибути CategoriesSetup=Настройка на тагове / категории diff --git a/htdocs/langs/bg_BG/companies.lang b/htdocs/langs/bg_BG/companies.lang index 267abddeb98..5acad41ae81 100644 --- a/htdocs/langs/bg_BG/companies.lang +++ b/htdocs/langs/bg_BG/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Проверяване на вътрешно-общн VATIntraManualCheck=Може да проверите също така ръчно в интернет страницата на Европейската Комисия: <a href="%s" target="_blank"> %s </a> ErrorVATCheckMS_UNAVAILABLE=Проверка не е възможна. Услугата за проверка не се предоставя от държавата-членка (%s). NorProspectNorCustomer=Нито потенциален клиент, нито клиент -JuridicalStatus=Правна форма +JuridicalStatus=Business entity type Workforce=Workforce Staff=Служители ProspectLevelShort=Потенциал diff --git a/htdocs/langs/bg_BG/compta.lang b/htdocs/langs/bg_BG/compta.lang index c9dd8bc51e4..177dc32434a 100644 --- a/htdocs/langs/bg_BG/compta.lang +++ b/htdocs/langs/bg_BG/compta.lang @@ -111,7 +111,7 @@ Refund=Възстановяване SocialContributionsPayments=Плащания на социални / фискални данъци ShowVatPayment=Показване на плащане на ДДС TotalToPay=Общо за плащане -BalanceVisibilityDependsOnSortAndFilters=Балансът е видим в този списък само ако таблицата е сортирана възходящо на %s и филтрирана за 1 банкова сметка +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=Счетоводен код на клиент SupplierAccountancyCode=Счетоводен код на доставчик CustomerAccountancyCodeShort=Счет. код на клиент @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Сигурни ли сте, че искате д ExportDataset_tax_1=Социални / фискални данъци и плащания CalcModeVATDebt=Режим <b>%sДДС върху осчетоводени задължения%s</b> CalcModeVATEngagement=Режим <b>%sДДС върху приходи - разходи%s</b> -CalcModeDebt=Анализ на регистрирани фактури, включително на неосчетоводени в книгата +CalcModeDebt=Analysis of known recorded documents even if they are not yet accounted in ledger. CalcModeEngagement=Анализ на регистрирани плащания, включително на неосчетоводени в книгата CalcModeBookkeeping=Анализ на данни, регистрирани в таблицата на счетоводната книга. CalcModeLT1= Режим <b>%sRE върху фактури за продажба - фактури за доставка%s</b> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Баланс на приходи и разходи, AnnualByCompanies=Баланс на приходи и разходи, по предварително определени групи сметки AnnualByCompaniesDueDebtMode=Баланс на приходи и разходи, по предварително определени групи, режим <b>%sВземания - Дългове%s</b> или казано още <b>Осчетоводяване на вземания</b>. AnnualByCompaniesInputOutputMode=Баланс на приходи и разходи, по предварително определени групи, режим <b>%sПриходи - Разходи%s</b> или казано още <b>Касова отчетност</b>. -SeeReportInInputOutputMode=Вижте %sанализа на плащанията%s за изчисляване на действителните плащания, дори и ако те все още не са осчетоводени в книгата. -SeeReportInDueDebtMode=Вижте %sанализа на фактурите%s за изчисляване, който е базиран на регистираните фактури, дори и ако те все още не са осчетоводени в книгата. -SeeReportInBookkeepingMode=Вижте <b>%sСчетоводния доклад%s</b> за изчисляване на <b>таблицата в счетоводната книга</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=- Посочените суми са с включени всички данъци 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=- Включва реални плащания по фактури, разходи, ДДС и заплати<br>- Основава се на дата на плащане на фактури, разходи, ДДС и заплати. Дата на дарение за дарения. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=Показва запис във вашата SeePageForSetup=Вижте менюто <a href="%s">%s</a> за настройка DepositsAreNotIncluded=- Не включва фактури за авансови плащания DepositsAreIncluded=- Включва фактури за авансови плащания +LT1ReportByMonth=Tax 2 report by month +LT2ReportByMonth=Tax 3 report by month LT1ReportByCustomers=Справка за данък 2 по контрагент LT2ReportByCustomers=Справка за данък 3 по контрагент LT1ReportByCustomersES=Справка за RE по контрагент LT2ReportByCustomersES=Справка за IRPF по контрагент VATReport=Справка за данък върху продажби VATReportByPeriods=Справка за данък върху продажби по периоди +VATReportByMonth=Sale tax report by month VATReportByRates=Справка за данък върху продажби по ставки VATReportByThirdParties=Справка за данък върху продажби по контрагенти VATReportByCustomers=Справка за данък върху продажби по клиенти diff --git a/htdocs/langs/bg_BG/cron.lang b/htdocs/langs/bg_BG/cron.lang index d762cb8a0ed..91af655214e 100644 --- a/htdocs/langs/bg_BG/cron.lang +++ b/htdocs/langs/bg_BG/cron.lang @@ -7,13 +7,14 @@ Permission23103 = Изтриване на планирани задачи Permission23104 = Стартиране на планирани задачи # Admin CronSetup=Настройки за управление на планирани задачи -URLToLaunchCronJobs=URL адрес за проверка и стартиране на определени cron задачи -OrToLaunchASpecificJob=Или за проверка и зареждане на специфична задача +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=Защитен ключ на URL за зареждане на cron задачи FileToLaunchCronJobs=Команден ред за проверка и стартиране на определени cron задачи CronExplainHowToRunUnix=В Unix среда би трябвало да използвате следния crontab ред за изпълнение на командния ред на всеки 5 минути CronExplainHowToRunWin=В среда на Microsoft (tm) Windows можете да използвате инструментите за планирани задачи, за да стартирате командния ред на всеки 5 минути CronMethodDoesNotExists=Класът %s не съдържа метод %s +CronMethodNotAllowed=Method %s of class %s is in blacklist of forbidden methods CronJobDefDesc=Профилите на Cron задачите се дефинират в дескрипторния файл на модула. Когато модулът е активиран, те са заредени и достъпни, така че можете да администрирате задачите от менюто за администриране %s. CronJobProfiles=Списък на предварително определени профили на cron задачи # Menu @@ -46,6 +47,7 @@ CronNbRun=Брой стартирания CronMaxRun=Максимален брой стартирания CronEach=Всеки JobFinished=Задачи заредени и приключили +Scheduled=Scheduled #Page card CronAdd= Добавяне на задачи CronEvery=Изпълни задачата всеки @@ -56,7 +58,7 @@ CronNote=Коментар CronFieldMandatory=Полета %s са задължителни CronErrEndDateStartDt=Крайната дата не може да бъде преди началната дата StatusAtInstall=Състояние при инсталиране на модула -CronStatusActiveBtn=Активиране +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Деактивиране CronTaskInactive=Тази задача е деактивирана CronId=Идентификатор @@ -82,3 +84,8 @@ MakeLocalDatabaseDumpShort=Архивиране на локална база д MakeLocalDatabaseDump=Създаване на локална база данни. Параметрите са: компресия ('gz' or 'bz' or 'none'), вид архивиране ('mysql', 'pgsql', 'auto'), 1, 'auto' или име на файла за съхранение, брой резервни файлове, които да се запазят WarningCronDelayed=Внимание, за целите на изпълнението, каквато и да е следващата дата на изпълнение на активирани задачи, вашите задачи могат да бъдат забавени до максимум %s часа, преди да бъдат стартирани. DATAPOLICYJob=Почистване на данни и анонимност +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/bg_BG/errors.lang b/htdocs/langs/bg_BG/errors.lang index 622d5c15041..aea2d732d1c 100644 --- a/htdocs/langs/bg_BG/errors.lang +++ b/htdocs/langs/bg_BG/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=Няма грешка, но се ангажираме. # Errors ErrorButCommitIsDone=Намерени са грешки, но ние валидираме въпреки това. ErrorBadEMail=Имейл %s е грешен +ErrorBadMXDomain=Email %s seems wrong (domain has no valid MX record) ErrorBadUrl=URL адрес %s е грешен ErrorBadValueForParamNotAString=Неправилна стойност за вашия параметър. Обикновено се добавя, когато преводът липсва. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=Потребител %s вече съществува. ErrorGroupAlreadyExists=Група %s вече съществува. ErrorRecordNotFound=Записът не е намерен. @@ -48,6 +50,7 @@ ErrorFieldsRequired=Някои задължителни полета не са ErrorSubjectIsRequired=Необходима е тема на имейл ErrorFailedToCreateDir=Неуспешно създаване на директория. Уверете се, че уеб сървър потребител има разрешение да пишат в Dolibarr документи. Ако параметър <b>safe_mode</b> е разрешен в тази PHP, проверете дали Dolibarr PHP файлове притежава за потребителя на уеб сървъра (или група). ErrorNoMailDefinedForThisUser=Няма дефиниран имейл за този потребител +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=Тази функция трябва ДжаваСкрипт да се активира, за да работят. Променете тази настройка - дисплей. ErrorTopMenuMustHaveAParentWithId0=Меню от тип 'Горно' не може да има главно меню. Поставете 0 за главно меню или изберете меню от тип 'Ляво'. ErrorLeftMenuMustHaveAParentId=Менюто на &quot;левицата&quot; тип трябва да имат родителски идентификатор. @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=Това име на профил вече същес ErrorLDAPSetupNotComplete=Dolibarr LDAP съвпадение не е пълна. ErrorLDAPMakeManualTest=. LDIF файл е генериран в директорията %s. Опитайте се да го заредите ръчно от командния ред, за да има повече информация за грешките,. ErrorCantSaveADoneUserWithZeroPercentage=Не може да се съхрани действие със „състояние не е стартирано“, ако е попълнено и поле „извършено от“. -ErrorRefAlreadyExists=Ref използван за създаване вече съществува. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorPleaseTypeBankTransactionReportName=Моля, въведете името на банковото извлечение, където трябва да се докладва вписването (формат YYYYMM или YYYYMMDD) ErrorRecordHasChildren=Изтриването на записа не бе успешно, тъй като има някои наследени записи. ErrorRecordHasAtLeastOneChildOfType=Обектът има поне един наследен обект от тип %s @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=Трябва да изберет ErrorDiscountLargerThanRemainToPaySplitItBefore=Отстъпката, която се опитвате да приложите, е по-голяма, отколкото оставащото за плащане. Разделете отстъпката преди това в 2 по-малки отстъпки. ErrorFileNotFoundWithSharedLink=Файлът не бе намерен. Може да е променен ключът за споделяне или файлът е премахнат наскоро. ErrorProductBarCodeAlreadyExists=Продуктовият баркод %s вече съществува за друга продуктова референция. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Обърнете внимание също така, че използването на виртуален продукт за автоматично увеличаване/намаляване на подпродукти не е възможно, когато поне един подпродукт (или подпродукт на подпродукти) се нуждае от партиден/сериен номер. +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=Описанието е задължително за редове със свободни продукти ErrorAPageWithThisNameOrAliasAlreadyExists=Страницата/контейнера <strong>%s</strong> има същото име или алтернативен псевдоним, който се опитвате да използвате ErrorDuringChartLoad=Грешка при зареждане на диаграмата на сметките. Ако някои сметки не са заредени, може да ги въведете ръчно. @@ -243,6 +246,16 @@ 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=Публичният интерфейс не е активиран +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 + # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Вашата стойност на PHP параметър upload_max_filesize (%s) е по-голяма от стойността на PHP параметър post_max_size (%s). Това не е последователна настройка. WarningPasswordSetWithNoAccount=За този член бе зададена парола. Въпреки това, не е създаден потребителски акаунт. Така че тази парола е съхранена, но не може да се използва за влизане в Dolibarr. Може да се използва от външен модул/интерфейс, но ако не е необходимо да дефинирате потребителско име или парола за член може да деактивирате опцията "Управление на вход за всеки член" от настройката на модула Членове. Ако трябва да управлявате вход, но не се нуждаете от парола, можете да запазите това поле празно, за да избегнете това предупреждение. Забележка: Имейлът може да се използва и като вход, ако членът е свързан с потребител. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Входните ви данни са п WarningAnEntryAlreadyExistForTransKey=Вече съществува запис за ключа за превод за този език WarningNumberOfRecipientIsRestrictedInMassAction=Внимание, броят на различните получатели е ограничен до <b>%s</b>, когато се използват масови действия в списъците WarningDateOfLineMustBeInExpenseReportRange=Внимание, датата на реда не е в обхвата на разходния отчет +WarningProjectDraft=Project is still in draft mode. Don't forget to validate it if you plan to use tasks. WarningProjectClosed=Проектът е приключен. Трябва първо да го активирате отново. WarningSomeBankTransactionByChequeWereRemovedAfter=Някои банкови транзакции бяха премахнати, след което бе генерирана разписка, в която са включени. Броят на чековете и общата сума на разписката може да се различават от броя и общата сума в списъка. -WarningFailedToAddFileIntoDatabaseIndex=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/bg_BG/exports.lang b/htdocs/langs/bg_BG/exports.lang index f54b6ab17aa..f371671587f 100644 --- a/htdocs/langs/bg_BG/exports.lang +++ b/htdocs/langs/bg_BG/exports.lang @@ -133,3 +133,4 @@ KeysToUseForUpdates=Ключ (колона), който да се използв NbInsert=Брой вмъкнати редове: %s NbUpdate=Брой актуализирани редове: %s MultipleRecordFoundWithTheseFilters=Намерени са няколко записа с тези филтри: %s +StocksWithBatch=Stocks and location (warehouse) of products with batch/serial number diff --git a/htdocs/langs/bg_BG/mails.lang b/htdocs/langs/bg_BG/mails.lang index 998b2de9d97..87d5e252581 100644 --- a/htdocs/langs/bg_BG/mails.lang +++ b/htdocs/langs/bg_BG/mails.lang @@ -92,6 +92,7 @@ MailingModuleDescEmailsFromUser=Имейли, въведени от потреб MailingModuleDescDolibarrUsers=Потребители с имейли MailingModuleDescThirdPartiesByCategories=Контрагенти (с категории) SendingFromWebInterfaceIsNotAllowed=Изпращането от уеб интерфейса не е позволено. +EmailCollectorFilterDesc=All filters must match to have an email being collected # Libelle des modules de liste de destinataires mailing LineInFile=Ред %s във файл @@ -125,12 +126,13 @@ TagMailtoEmail=Емейл на получателя (включително HTML NoEmailSentBadSenderOrRecipientEmail=Няма изпратени имейли. Неправилен имейл на подателя или получателя. Проверете потребителския профил. # Module Notifications Notifications=Известия -NoNotificationsWillBeSent=За това събитие и този контрагент не са планирани известия по имейл -ANotificationsWillBeSent=1 известие ще бъде изпратено по имейл -SomeNotificationsWillBeSent=%s известия ще бъдат изпратени по имейл -AddNewNotification=Активиране на ново имейл известяване за цел / събитие -ListOfActiveNotifications=Списък на всички активни имейл известия за цели/събития -ListOfNotificationsDone=Списък на всички изпратени имейл известия +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=Конфигурацията за изпращане на имейл е настроена на '%s'. Този режим не може да се използва за изпращане на масови имейли. MailSendSetupIs2=Трябва първо да отидете с администраторски акаунт в меню %sНачало - Настройка - Имейли%s и да промените параметър <strong>'%s'</strong>, за да използвате режим '%s'. С този режим може да въведете настройки за SMTP сървъра, предоставен от вашия доставчик на интернет услуги и да използвате функцията за изпращане на масови имейли. MailSendSetupIs3=Ако имате някакви въпроси как да настроите вашия SMTP сървър, може да се обърнете към %s. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Импортираният файл трябва да UseFormatInputEmailToTarget=Въведете низ с формат <strong>имейл;фамилия;име;друго</strong> MailAdvTargetRecipients=Получатели (разширен избор) AdvTgtTitle=Попълнете полетата за въвеждане, за да посочите предварително избраните контрагенти или контакти/адреси -AdvTgtSearchTextHelp=Използвайте %% като заместващи символи. Например, за да намерите всички елементи като <b>jean, joe, jim</b>, може да въведете <b>j%%</b> или да използвате ; като разделител за стойност, а ! за изключване на стойност. Например <b>jean;joe;jim%%;!jimo;!jima%</b> ще се цели всички jean, joe, започващи с jim, но не с jimo и всичко останало, което започва с jima +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=Използвайте интервал, за да изберете целочислена или десетична стойност AdvTgtMinVal=Минимална стойност AdvTgtMaxVal=Максимална стойност @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Създаване на филтър AdvTgtOrCreateNewFilter=Име на новия филтър NoContactWithCategoryFound=Няма намерен контакт/адрес с тази категория NoContactLinkedToThirdpartieWithCategoryFound=Няма намерен контакт/адрес с тази категория -OutGoingEmailSetup=Настройка на изходяща електронна поща -InGoingEmailSetup=Настройка на входящата поща -OutGoingEmailSetupForEmailing=Настройка на изходяща електронна поща (за модул %s) -DefaultOutgoingEmailSetup=Настройка на изходящата поща по подразбиране +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=Информация ContactsWithThirdpartyFilter=Контакти с филтър за контрагент Unanswered=Unanswered 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/bg_BG/main.lang b/htdocs/langs/bg_BG/main.lang index 335801537fa..b84fe0a8561 100644 --- a/htdocs/langs/bg_BG/main.lang +++ b/htdocs/langs/bg_BG/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=Няма наличен шаблон за този тип им AvailableVariables=Налични променливи за заместване NoTranslation=Няма превод Translation=Превод +CurrentTimeZone=Времева зона на PHP (сървър) EmptySearchString=Въведете критерии за търсене +EnterADateCriteria=Enter a date criteria NoRecordFound=Няма намерен запис NoRecordDeleted=Няма изтрит запис NotEnoughDataYet=Няма достатъчно данни @@ -85,6 +87,8 @@ FileWasNotUploaded=Избран е файл за прикачване, но вс NbOfEntries=Брой вписвания GoToWikiHelpPage=Прочетете онлайн помощта (необходим е достъп до интернет) GoToHelpPage=Прочетете помощната информация +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Начална страница RecordSaved=Записът е съхранен RecordDeleted=Записът е изтрит RecordGenerated=Записът е генериран @@ -220,6 +224,7 @@ Value=Стойност PersonalValue=Лична стойност NewObject=Нов %s NewValue=Нова стойност +OldValue=Old value %s CurrentValue=Текуща стойност Code=Код Type=Тип @@ -433,6 +438,7 @@ RemainToPay=Оставащо за плащане Module=Модул / Приложение Modules=Модули / Приложения Option=Опция +Filters=Filters List=Списък FullList=Пълен списък FullConversation=Пълен списък със съобщения @@ -650,6 +656,7 @@ SupplierPreview=Преглед на доставчик ShowCustomerPreview=Преглеждане на клиент ShowSupplierPreview=Преглеждане на доставчик RefCustomer=Изх. № на клиент +InternalRef=Internal ref. Currency=Валута InfoAdmin=Информация за администратори Undo=Отменяне @@ -671,7 +678,7 @@ SendMail=Изпращане на имейл Email=Имейл NoEMail=Няма имейл AlreadyRead=Вече е прочетено -NotRead=Непрочетено +NotRead=Непрочетен NoMobilePhone=Няма мобилен телефон Owner=Собственик FollowingConstantsWillBeSubstituted=Следните константи ще бъдат заменени със съответната стойност: @@ -1107,3 +1114,9 @@ UpToDate=Up-to-date OutOfDate=Out-of-date EventReminder=Event Reminder UpdateForAllLines=Update for all lines +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 diff --git a/htdocs/langs/bg_BG/modulebuilder.lang b/htdocs/langs/bg_BG/modulebuilder.lang index 214ce4293d0..eb76c35f976 100644 --- a/htdocs/langs/bg_BG/modulebuilder.lang +++ b/htdocs/langs/bg_BG/modulebuilder.lang @@ -40,6 +40,7 @@ PageForCreateEditView=PHP страница за създаване / проме PageForAgendaTab=PHP страница за раздел със събития PageForDocumentTab=PHP страница за раздел с документация PageForNoteTab=PHP страница за раздел с бележки +PageForContactTab=PHP page for contact tab PathToModulePackage=Път до zip пакет на модул / приложение PathToModuleDocumentation=Път до файл с документация на модул / приложение (%s) SpaceOrSpecialCharAreNotAllowed=Интервали или специални символи не са разрешени. @@ -77,7 +78,7 @@ IsAMeasure=Измерва се DirScanned=Сканирани директории NoTrigger=Няма тригер NoWidget=Няма джаджа -GoToApiExplorer=Отидете в API Explorer +GoToApiExplorer=API explorer ListOfMenusEntries=Списък на записи в меню ListOfDictionariesEntries=Списък на записи в речници ListOfPermissionsDefined=Списък на дефинирани права @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=Ако имате познания за SQL и PHP мо SeeTopRightMenu=Вижте <span class="fa fa-bug"></span> в десния край на горното меню AddLanguageFile=Добавяне на езиков файл YouCanUseTranslationKey=Може да използвате тук ключ, който е ключ за превод от езиков файл (вижте раздел 'Езици'). -DropTableIfEmpty=(Изтриване на таблица, ако е празна) +DropTableIfEmpty=(Destroy table if empty) TableDoesNotExists=Таблицата %s не съществува TableDropped=Таблица %s е изтрита InitStructureFromExistingTable=Създаване на низова структура в масив на съществуваща таблица @@ -126,7 +127,6 @@ UseSpecificEditorURL = Използване на конкретен URL адре UseSpecificFamily = Използване на конкретна фамилия UseSpecificAuthor = Използване на конкретен автор UseSpecificVersion = Използване на конкретна първоначална версия -ModuleMustBeEnabled=Първо трябва да бъде активиран модулът / приложението IncludeRefGeneration=Референцията на обекта трябва да се генерира автоматично IncludeRefGenerationHelp=Маркирайте това, ако искате да включите код за управление на автоматичното генериране на референция. IncludeDocGeneration=Искам да генерирам някои документи от обекта @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Тип на полета:<br>varchar(99), double(24,8), real, t AsciiToHtmlConverter=Ascii към HTML конвертор AsciiToPdfConverter=Ascii към PDF конвертор 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/bg_BG/mrp.lang b/htdocs/langs/bg_BG/mrp.lang index f35119307bb..a8aea279320 100644 --- a/htdocs/langs/bg_BG/mrp.lang +++ b/htdocs/langs/bg_BG/mrp.lang @@ -78,3 +78,27 @@ TotalCost=Обща цена BOMTotalCost=Разходите за производство на този списък с материали въз основа на разходите за всяко количество и продукт, които ще се използват (използвайте себестойност, ако е дефинирана, иначе средно претеглена цена, ако е определена, или най-добра покупна цена). 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/bg_BG/other.lang b/htdocs/langs/bg_BG/other.lang index b256d336fd7..5d9542b424e 100644 --- a/htdocs/langs/bg_BG/other.lang +++ b/htdocs/langs/bg_BG/other.lang @@ -5,8 +5,6 @@ Tools=Инструменти TMenuTools=Инструменти ToolsDesc=Всички инструменти, които не са включени в другите менюта, са групирани тук.<br>Всички инструменти са достъпни, чрез лявото меню. Birthday=Рожден ден -BirthdayDate=Рождена дата -DateToBirth=Рождена дата BirthdayAlertOn=сигнал за рожден ден активен BirthdayAlertOff=сигнал за рожден ден неактивен TransKey=Превод на ключа TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Предишен месец (число 1-12) от дат TextPreviousMonthOfInvoice=Предишен месец (текст) от дата на фактурата NextMonthOfInvoice=Следващ месец (число 1-12) от дата на фактурата TextNextMonthOfInvoice=Следващ месец (текст) от дата на фактурата +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Архивния файл е генериран в <b>%s</b>. DocFileGeneratedInto=Документа е генериран в <b>%s</b>. JumpToLogin=Връзката е прекъсната. Отидете на страницата за въвеждане на входни данни... @@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Разходния отчет е валидира Notify_EXPENSE_REPORT_APPROVE=Разходният отчет е одобрен Notify_HOLIDAY_VALIDATE=Молбата за отпуск е валидирана (изисква се одобрение) Notify_HOLIDAY_APPROVE=Молбата за отпуск е одобрена +Notify_ACTION_CREATE=Added action to Agenda SeeModuleSetup=Вижте настройка на модул %s NbOfAttachedFiles=Брой на прикачените файлове / документи TotalSizeOfAttachedFiles=Общ размер на прикачените файлове / документи @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Здравейте)__,\n\nМоля, виж PredefinedMailContentSendFichInter=__(Здравейте)__,\n\nМоля, вижте приложената интервенция __REF__\n\n\n__(Поздрави)__,\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Може да кликнете върху връзката по-долу, за да направите плащане, в случай, че не сте го извършили.\n\n%s\n\n PredefinedMailContentGeneric=__(Здравейте)__,\n\n\n__(Поздрави)__,\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 е компактна ERP / CRM система, която поддържа различни работни модули. Няма смисъл от демонстрация, показваща всички модули, тъй като такъв сценарий никога не се случва (на разположение са стотици модули). Налични са няколко демо профила. ChooseYourDemoProfil=Изберете демо профила, който най-добре отговаря на вашите нужди... ChooseYourDemoProfilMore=...или създайте свой собствен профил<br>(свободен избор на модули) @@ -214,6 +216,7 @@ EMailTextExpenseReportValidated=Разходен отчет %s е валидир EMailTextExpenseReportApproved=Разходен отчет %s е одобрен. EMailTextHolidayValidated=Молба за отпуск %s е валидирана. EMailTextHolidayApproved=Молба за отпуск %s е одобрена. +EMailTextActionAdded=The action %s has been added to the Agenda. ImportedWithSet=Набор от данни за импортиране DolibarrNotification=Автоматично известяване ResizeDesc=Въведете нова ширина <b>или</b> нова височина. Съотношението ще се запази по време преоразмеряването... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Контактът / адресът е създа ProjectCreatedByEmailCollector=Проектът е създаден, чрез имейл колектор от имейл MSGID %s TicketCreatedByEmailCollector=Тикетът е създаден, чрез имейл колектор от имейл MSGID %s OpeningHoursFormatDesc=Използвайте средно тире '-' за разделяне на часовете на отваряне и затваряне.<br> Използвайте интервал, за да въведете различни диапазони.<br> Пример: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Секция с експортирания diff --git a/htdocs/langs/bg_BG/products.lang b/htdocs/langs/bg_BG/products.lang index 02ca66e192d..e7009fa4c48 100644 --- a/htdocs/langs/bg_BG/products.lang +++ b/htdocs/langs/bg_BG/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Множество ценови сегменти за продукт / услуга (всеки клиент е в един ценови сегмент) MultiPricesNumPrices=Брой цени DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=Брой основни опаковащи продукти @@ -167,8 +168,10 @@ BuyingPrices=Покупни цени CustomerPrices=Клиентски цени SuppliersPrices=Доставни цени SuppliersPricesOfProductsOrServices=Доставни цени (на продукти / услуги) -CustomCode=Митнически / Стоков / ХС код +CustomCode=Customs|Commodity|HS code CountryOrigin=Държава на произход +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Произход на продукта (суровина / произведен) NatureOfProductShort=Nature of product NatureOfProductDesc=Raw material or finished product @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Използване на фиксирана цена PriceByQuantity=Различни цени за количество DisablePriceByQty=Деактивиране на цени за количество PriceByQuantityRange=Количествен диапазон -MultipriceRules=Правила за ценови сегмент +MultipriceRules=Automatic prices for segment UseMultipriceRules=Използване на правила за ценови сегмент (дефинирани в настройката на модула 'Продукти"), за да се изчисляват автоматично цените за всички други сегменти според първия сегмент PercentVariationOver=%% вариация над %s PercentDiscountOver=%% отстъпка над %s diff --git a/htdocs/langs/bg_BG/projects.lang b/htdocs/langs/bg_BG/projects.lang index a60103602e1..447427dfbc8 100644 --- a/htdocs/langs/bg_BG/projects.lang +++ b/htdocs/langs/bg_BG/projects.lang @@ -76,15 +76,16 @@ MyActivities=Мои задачи / дейности MyProjects=Мои проекти MyProjectsArea=Секция с мои проекти DurationEffective=Ефективна продължителност -ProgressDeclared=Деклариран напредък +ProgressDeclared=Declared real progress TaskProgressSummary=Напредък на задачата CurentlyOpenedTasks=Текущи активни задачи -TheReportedProgressIsLessThanTheCalculatedProgressionByX=Декларираният напредък е по-малко %s от изчисления напредък -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=Декларираният напредък е повече %s от изчисления напредък -ProgressCalculated=Изчислен напредък +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=с които съм свързан WhichIamLinkedToProject=с които съм свързан в проект Time=Време +TimeConsumed=Consumed ListOfTasks=Списък със задачи GoToListOfTimeConsumed=Показване на списъка с изразходвано време GanttView=Gantt диаграма diff --git a/htdocs/langs/bg_BG/recruitment.lang b/htdocs/langs/bg_BG/recruitment.lang index 2dfffcd1215..14eeb3f6dda 100644 --- a/htdocs/langs/bg_BG/recruitment.lang +++ b/htdocs/langs/bg_BG/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/bg_BG/sendings.lang b/htdocs/langs/bg_BG/sendings.lang index 0a41c54d2d7..cf1a6ec0ef6 100644 --- a/htdocs/langs/bg_BG/sendings.lang +++ b/htdocs/langs/bg_BG/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Други пратки за тази поръчка SendingsAndReceivingForSameOrder=Пратки и разписки за тази поръчка SendingsToValidate=Пратки за валидиране StatusSendingCanceled=Анулирана +StatusSendingCanceledShort=Анулирана StatusSendingDraft=Чернова StatusSendingValidated=Валидирана (продукти за изпращане или вече изпратени) StatusSendingProcessed=Обработена @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=Първо трябва да валидират # Sending methods # ModelDocument DocumentModelTyphon=Шаблон на разписка за доставка (лого, ...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Константата EXPEDITION_ADDON_NUMBER не е дефинирана SumOfProductVolumes=Общ обем на продуктите SumOfProductWeights=Общо тегло на продуктите diff --git a/htdocs/langs/bg_BG/stocks.lang b/htdocs/langs/bg_BG/stocks.lang index a2a308ad231..2e83457229d 100644 --- a/htdocs/langs/bg_BG/stocks.lang +++ b/htdocs/langs/bg_BG/stocks.lang @@ -62,6 +62,7 @@ EnhancedValueOfWarehouses=Складова стойност UserWarehouseAutoCreate=Автоматично създаване на личен потребителски склад при създаване на потребител AllowAddLimitStockByWarehouse=Управляване също и на стойност за минимална и желана наличност за двойка (продукт - склад) в допълнение към стойността за минимална и желана наличност за продукт RuleForWarehouse=Rule for warehouses +WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Склад по подразбиране @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/bg_BG/ticket.lang b/htdocs/langs/bg_BG/ticket.lang index 196f2f14856..e1801645a17 100644 --- a/htdocs/langs/bg_BG/ticket.lang +++ b/htdocs/langs/bg_BG/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Тикет - Видове TicketDictCategory=Тикет - Групи TicketDictSeverity=Тикет - Приоритети TicketDictResolution=Тикет - Решения -TicketTypeShortBUGSOFT=Софтуерна неизправност -TicketTypeShortBUGHARD=Хардуерна неизправност -TicketTypeShortCOM=Търговски въпрос +TicketTypeShortCOM=Търговски въпрос TicketTypeShortHELP=Молба за асистенция TicketTypeShortISSUE=Въпрос, грешка или проблем TicketTypeShortREQUEST=Заявка за подобрение @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Друго TicketSeverityShortLOW=Нисък TicketSeverityShortNORMAL=Нормален TicketSeverityShortHIGH=Висок -TicketSeverityShortBLOCKING=Критичен +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Полето "%s" е неправилно MenuTicketMyAssign=Мои тикети @@ -60,7 +58,6 @@ OriginEmail=Имейл източник Notify_TICKET_SENTBYMAIL=Изпращане на тикет съобщението по имейл # Status -NotRead=Непрочетен Read=Прочетен Assigned=Възложен InProgress=В изпълнение @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Публичният интерфейс по TicketsAutoAssignTicket=Автоматично възлагане на тикета на потребителя, който го е създал TicketsAutoAssignTicketHelp=При създаване на тикет, той може автоматично да бъде възложен на потребителя, който го е създал. TicketNumberingModules=Модул за номериране на тикети +TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Уведомяване на контрагента при създаване TicketsDisableCustomerEmail=Деактивиране на имейлите, когато тикетът е създаден от публичния интерфейс TicketsPublicNotificationNewMessage=Send email(s) when a new message is added @@ -233,7 +231,6 @@ TicketLogStatusChanged=Статусът е променен: от %s на %s TicketNotNotifyTiersAtCreate=Да не се уведомява фирмата при създаване на тикета Unread=Непрочетен TicketNotCreatedFromPublicInterface=Не е налично. Тикетът не беше създаден от публичният интерфейс. -PublicInterfaceNotEnabled=Публичният интерфейс не е активиран ErrorTicketRefRequired=Изисква се референтен номер на тикета # diff --git a/htdocs/langs/bg_BG/website.lang b/htdocs/langs/bg_BG/website.lang index 7378ad1189a..1696d94a7ad 100644 --- a/htdocs/langs/bg_BG/website.lang +++ b/htdocs/langs/bg_BG/website.lang @@ -30,7 +30,6 @@ EditInLine=Редактиране в движение AddWebsite=Добавяне на уебсайт Webpage=Уеб страница / контейнер AddPage=Добавяне на страница / контейнер -HomePage=Начална страница PageContainer=Страница PreviewOfSiteNotYetAvailable=Преглед на вашия уебсайт <strong>%s</strong> все още не е наличен. Първо трябва да '<strong>Импортирате пълен шаблон за уебсайт</strong>' или просто да '<strong>Добавите страница / контейнер</strong>'. RequestedPageHasNoContentYet=Заявената страница с id %s все още няма съдържание или кеш файлът .tpl.php е бил премахнат. Редактирайте съдържанието на страницата, за да коригирате това. @@ -101,7 +100,7 @@ EmptyPage=Празна страница ExternalURLMustStartWithHttp=Външният URL адрес трябва да започва с http:// или https:// ZipOfWebsitePackageToImport=Качете Zip файла на пакета с шаблон на уебсайта ZipOfWebsitePackageToLoad=или Изберете наличен пакет с вграден шаблон за уебсайт -ShowSubcontainers=Вмъкване на динамично съдържание +ShowSubcontainers=Show dynamic content InternalURLOfPage=Вътрешен URL адрес на страница ThisPageIsTranslationOf=Тази страница / контейнер е превод на ThisPageHasTranslationPages=Тази страница / контейнер има превод @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/bg_BG/withdrawals.lang b/htdocs/langs/bg_BG/withdrawals.lang index 00e2744c5ba..6f07b1f1877 100644 --- a/htdocs/langs/bg_BG/withdrawals.lang +++ b/htdocs/langs/bg_BG/withdrawals.lang @@ -42,6 +42,7 @@ LastWithdrawalReceipt=Разписки с директен дебит: %s пос MakeWithdrawRequest=Заявяване на плащане с директен дебит MakeBankTransferOrder=Make a credit transfer request WithdrawRequestsDone=%s заявления за плащане с директен дебит са записани +BankTransferRequestsDone=%s credit transfer requests recorded ThirdPartyBankCode=Банков код на контрагента NoInvoiceCouldBeWithdrawed=Няма успешно дебитирани фактури. Проверете дали фактурите са на фирми с валиден IBAN и дали този IBAN има UMR (Unique Mandate Reference) в режим <strong>%s</strong>. ClassCredited=Класифициране като 'Кредитирана' @@ -131,7 +132,8 @@ SEPARCUR=SEPA CUR SEPAFRST=SEPA FRST ExecutionDate=Дата на изпълнение CreateForSepa=Създаване на файл с директен дебит -ICS=Идентификатор на кредитора CI +ICS=Creditor Identifier CI for direct debit +ICSTransfer=Creditor Identifier CI for bank transfer END_TO_END='EndToEndId' SEPA XML таг - Уникален идентификатор, присвоен на транзакция USTRD='Unstructured' SEPA XML таг ADDDAYS=Добавяне на дни към датата на изпълнение @@ -146,3 +148,5 @@ InfoRejectSubject=Платежното нареждане с директен д InfoRejectMessage=Здравейте, <br><br> Платежното нареждане с директен дебит по фактура %s, отнасящо се до фирма %s, със сума от %s е отказано от банката. <br><br>--<br>%s ModeWarning=Опцията за реален режим не беше зададена, спираме след тази симулация 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/bg_BG/workflow.lang b/htdocs/langs/bg_BG/workflow.lang index ed2fb4312cf..82e4a079ac2 100644 --- a/htdocs/langs/bg_BG/workflow.lang +++ b/htdocs/langs/bg_BG/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=Автоматично създаване AutomaticClassification=Автоматично класифициране +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/bn_BD/accountancy.lang b/htdocs/langs/bn_BD/accountancy.lang index 3211a0b62df..9e084932477 100644 --- a/htdocs/langs/bn_BD/accountancy.lang +++ b/htdocs/langs/bn_BD/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Date Docref=Reference LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/bn_BD/admin.lang b/htdocs/langs/bn_BD/admin.lang index f1c41a3b62b..f9a6468d94a 100644 --- a/htdocs/langs/bn_BD/admin.lang +++ b/htdocs/langs/bn_BD/admin.lang @@ -56,6 +56,8 @@ 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. @@ -85,7 +87,6 @@ ShowPreview=Show preview ShowHideDetails=Show-Hide details PreviewNotAvailable=Preview not available ThemeCurrentlyActive=Theme currently active -CurrentTimeZone=TimeZone PHP (server) MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Dates are stored and returned by database server as if they were kept as submitted string. The timezone has effect only when using the UNIX_TIMESTAMP function (that should not be used by Dolibarr, so database TZ should have no effect, even if changed after data was entered). Space=Space @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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. @@ -256,6 +257,7 @@ 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. @@ -375,7 +377,7 @@ 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:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +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 @@ -406,7 +408,7 @@ UrlGenerationParameters=Parameters to secure URLs SecurityTokenIsUnique=Use a unique securekey parameter for each URL EnterRefToBuildUrl=Enter reference for object %s GetSecuredUrl=Get calculated URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +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 @@ -668,7 +670,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 @@ -1306,7 +1308,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,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 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=New menu MenuHandler=Menu handler MenuModule=Source module -HideUnauthorizedMenu= Hide unauthorized menus (gray) +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 @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/bn_BD/banks.lang b/htdocs/langs/bn_BD/banks.lang index 5cddfdaf30c..ac24131462a 100644 --- a/htdocs/langs/bn_BD/banks.lang +++ b/htdocs/langs/bn_BD/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/bn_BD/blockedlog.lang b/htdocs/langs/bn_BD/blockedlog.lang index 5afae6e9e53..0bba5605d0f 100644 --- a/htdocs/langs/bn_BD/blockedlog.lang +++ b/htdocs/langs/bn_BD/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/bn_BD/boxes.lang b/htdocs/langs/bn_BD/boxes.lang index d6fd298a3a7..9a751483fb1 100644 --- a/htdocs/langs/bn_BD/boxes.lang +++ b/htdocs/langs/bn_BD/boxes.lang @@ -46,9 +46,12 @@ 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. @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Accountancy +ValidatedProjects=Validated projects diff --git a/htdocs/langs/bn_BD/cashdesk.lang b/htdocs/langs/bn_BD/cashdesk.lang index 498baa82200..3fef645d99d 100644 --- a/htdocs/langs/bn_BD/cashdesk.lang +++ b/htdocs/langs/bn_BD/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +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 @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/bn_BD/categories.lang b/htdocs/langs/bn_BD/categories.lang index 84e5796763e..52327db3510 100644 --- a/htdocs/langs/bn_BD/categories.lang +++ b/htdocs/langs/bn_BD/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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 diff --git a/htdocs/langs/bn_BD/companies.lang b/htdocs/langs/bn_BD/companies.lang index ee3854f04f8..e60b163d09f 100644 --- a/htdocs/langs/bn_BD/companies.lang +++ b/htdocs/langs/bn_BD/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi 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=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=Potential diff --git a/htdocs/langs/bn_BD/compta.lang b/htdocs/langs/bn_BD/compta.lang index 8f4f058bb87..1afeb6e3727 100644 --- a/htdocs/langs/bn_BD/compta.lang +++ b/htdocs/langs/bn_BD/compta.lang @@ -111,7 +111,7 @@ 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 ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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 diff --git a/htdocs/langs/bn_BD/cron.lang b/htdocs/langs/bn_BD/cron.lang index d2da7ded67e..2ebdda1e685 100644 --- a/htdocs/langs/bn_BD/cron.lang +++ b/htdocs/langs/bn_BD/cron.lang @@ -6,14 +6,15 @@ 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 -OrToLaunchASpecificJob=Or to check and launch a specific job +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 environement you can use Scheduled task tools 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 @@ -42,10 +43,11 @@ CronModule=Module CronNoJobs=No jobs registered CronPriority=Priority CronLabel=Label -CronNbRun=Nb. launch -CronMaxRun=Max number launch +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 @@ -56,16 +58,16 @@ CronNote=Comment CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Enable +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 exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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 @@ -76,8 +78,14 @@ 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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +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' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/bn_BD/errors.lang b/htdocs/langs/bn_BD/errors.lang index 893f4a35b65..5b26be724d9 100644 --- a/htdocs/langs/bn_BD/errors.lang +++ b/htdocs/langs/bn_BD/errors.lang @@ -5,8 +5,10 @@ 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. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ 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=Ref used for creation already exists. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/bn_BD/exports.lang b/htdocs/langs/bn_BD/exports.lang index 2dcf4317e00..a0eb7161ef2 100644 --- a/htdocs/langs/bn_BD/exports.lang +++ b/htdocs/langs/bn_BD/exports.lang @@ -26,6 +26,8 @@ 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. @@ -131,3 +133,4 @@ 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/bn_BD/mails.lang b/htdocs/langs/bn_BD/mails.lang index 1235eef3b27..2d02c5ddcf9 100644 --- a/htdocs/langs/bn_BD/mails.lang +++ b/htdocs/langs/bn_BD/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Notifications -NoNotificationsWillBeSent=No email notifications are planned for this event and company -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent +NotificationsAuto=Notifications Auto. +NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company +ANotificationsWillBeSent=1 automatic notification will be sent by email +SomeNotificationsWillBeSent=%s automatic notifications will be sent by email +AddNewNotification=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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +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/bn_BD/main.lang b/htdocs/langs/bn_BD/main.lang index 49a5986c0df..d8cd5eaea4f 100644 --- a/htdocs/langs/bn_BD/main.lang +++ b/htdocs/langs/bn_BD/main.lang @@ -28,7 +28,9 @@ 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 @@ -85,6 +87,8 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C 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 @@ -220,6 +224,7 @@ Value=Value PersonalValue=Personal value NewObject=New %s NewValue=New value +OldValue=Old value %s CurrentValue=Current value Code=Code Type=Type @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Option +Filters=Filters List=List FullList=Full list FullConversation=Full conversation @@ -650,6 +656,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 @@ -671,7 +678,7 @@ SendMail=Send email Email=Email NoEMail=No email AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=No mobile phone Owner=Owner FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/bn_BD/modulebuilder.lang b/htdocs/langs/bn_BD/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/bn_BD/modulebuilder.lang +++ b/htdocs/langs/bn_BD/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/bn_BD/mrp.lang b/htdocs/langs/bn_BD/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/bn_BD/mrp.lang +++ b/htdocs/langs/bn_BD/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/bn_BD/other.lang b/htdocs/langs/bn_BD/other.lang index 54c0572d453..7a895bb1ca5 100644 --- a/htdocs/langs/bn_BD/other.lang +++ b/htdocs/langs/bn_BD/other.lang @@ -5,8 +5,6 @@ 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 -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Right CalculatedWeight=Calculated weight CalculatedVolume=Calculated volume Weight=Weight -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/bn_BD/products.lang b/htdocs/langs/bn_BD/products.lang index 97db059594f..9ecc11ed93d 100644 --- a/htdocs/langs/bn_BD/products.lang +++ b/htdocs/langs/bn_BD/products.lang @@ -108,7 +108,8 @@ 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=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +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 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/bn_BD/projects.lang b/htdocs/langs/bn_BD/projects.lang index baf0ecde17f..05aa1f5a560 100644 --- a/htdocs/langs/bn_BD/projects.lang +++ b/htdocs/langs/bn_BD/projects.lang @@ -76,15 +76,16 @@ MyActivities=My tasks/activities MyProjects=My projects MyProjectsArea=My projects Area DurationEffective=Effective duration -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Time +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/bn_BD/recruitment.lang b/htdocs/langs/bn_BD/recruitment.lang index b775e78552e..437445f25dc 100644 --- a/htdocs/langs/bn_BD/recruitment.lang +++ b/htdocs/langs/bn_BD/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/bn_BD/sendings.lang b/htdocs/langs/bn_BD/sendings.lang index 5ce3b7f67e9..73bd9aebd42 100644 --- a/htdocs/langs/bn_BD/sendings.lang +++ b/htdocs/langs/bn_BD/sendings.lang @@ -30,6 +30,7 @@ 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 @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=More complete document model for delivery receipts (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/bn_BD/stocks.lang b/htdocs/langs/bn_BD/stocks.lang index 660443bcded..a1f55010139 100644 --- a/htdocs/langs/bn_BD/stocks.lang +++ b/htdocs/langs/bn_BD/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/bn_BD/ticket.lang b/htdocs/langs/bn_BD/ticket.lang index 59519282c80..982fff90ffa 100644 --- a/htdocs/langs/bn_BD/ticket.lang +++ b/htdocs/langs/bn_BD/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Other TicketSeverityShortLOW=Low TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=High -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Read Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/bn_BD/website.lang b/htdocs/langs/bn_BD/website.lang index 03e042e4be6..f17def114b8 100644 --- a/htdocs/langs/bn_BD/website.lang +++ b/htdocs/langs/bn_BD/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/bn_BD/withdrawals.lang b/htdocs/langs/bn_BD/withdrawals.lang index a80c1865a0a..0e84cc071d2 100644 --- a/htdocs/langs/bn_BD/withdrawals.lang +++ b/htdocs/langs/bn_BD/withdrawals.lang @@ -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>. ClassCredited=Classify credited @@ -131,7 +132,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,3 +148,5 @@ 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/bn_BD/workflow.lang b/htdocs/langs/bn_BD/workflow.lang index 299be277e1d..494a0424a75 100644 --- a/htdocs/langs/bn_BD/workflow.lang +++ b/htdocs/langs/bn_BD/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 diff --git a/htdocs/langs/bn_IN/accountancy.lang b/htdocs/langs/bn_IN/accountancy.lang index 3211a0b62df..9e084932477 100644 --- a/htdocs/langs/bn_IN/accountancy.lang +++ b/htdocs/langs/bn_IN/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Date Docref=Reference LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/bn_IN/admin.lang b/htdocs/langs/bn_IN/admin.lang index f1c41a3b62b..f9a6468d94a 100644 --- a/htdocs/langs/bn_IN/admin.lang +++ b/htdocs/langs/bn_IN/admin.lang @@ -56,6 +56,8 @@ 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. @@ -85,7 +87,6 @@ ShowPreview=Show preview ShowHideDetails=Show-Hide details PreviewNotAvailable=Preview not available ThemeCurrentlyActive=Theme currently active -CurrentTimeZone=TimeZone PHP (server) MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Dates are stored and returned by database server as if they were kept as submitted string. The timezone has effect only when using the UNIX_TIMESTAMP function (that should not be used by Dolibarr, so database TZ should have no effect, even if changed after data was entered). Space=Space @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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. @@ -256,6 +257,7 @@ 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. @@ -375,7 +377,7 @@ 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:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +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 @@ -406,7 +408,7 @@ UrlGenerationParameters=Parameters to secure URLs SecurityTokenIsUnique=Use a unique securekey parameter for each URL EnterRefToBuildUrl=Enter reference for object %s GetSecuredUrl=Get calculated URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +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 @@ -668,7 +670,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 @@ -1306,7 +1308,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,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 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=New menu MenuHandler=Menu handler MenuModule=Source module -HideUnauthorizedMenu= Hide unauthorized menus (gray) +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 @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/bn_IN/banks.lang b/htdocs/langs/bn_IN/banks.lang index 9500a5b8b2e..81a23238550 100644 --- a/htdocs/langs/bn_IN/banks.lang +++ b/htdocs/langs/bn_IN/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/bn_IN/blockedlog.lang b/htdocs/langs/bn_IN/blockedlog.lang index 5afae6e9e53..0bba5605d0f 100644 --- a/htdocs/langs/bn_IN/blockedlog.lang +++ b/htdocs/langs/bn_IN/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/bn_IN/boxes.lang b/htdocs/langs/bn_IN/boxes.lang index d6fd298a3a7..9a751483fb1 100644 --- a/htdocs/langs/bn_IN/boxes.lang +++ b/htdocs/langs/bn_IN/boxes.lang @@ -46,9 +46,12 @@ 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. @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Accountancy +ValidatedProjects=Validated projects diff --git a/htdocs/langs/bn_IN/cashdesk.lang b/htdocs/langs/bn_IN/cashdesk.lang index 498baa82200..3fef645d99d 100644 --- a/htdocs/langs/bn_IN/cashdesk.lang +++ b/htdocs/langs/bn_IN/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +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 @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/bn_IN/categories.lang b/htdocs/langs/bn_IN/categories.lang index ba37a43b4ec..4ddf0d6093f 100644 --- a/htdocs/langs/bn_IN/categories.lang +++ b/htdocs/langs/bn_IN/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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 diff --git a/htdocs/langs/bn_IN/companies.lang b/htdocs/langs/bn_IN/companies.lang index dadff6a7894..8dc815b522e 100644 --- a/htdocs/langs/bn_IN/companies.lang +++ b/htdocs/langs/bn_IN/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi 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=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=Potential diff --git a/htdocs/langs/bn_IN/compta.lang b/htdocs/langs/bn_IN/compta.lang index 8f4f058bb87..1afeb6e3727 100644 --- a/htdocs/langs/bn_IN/compta.lang +++ b/htdocs/langs/bn_IN/compta.lang @@ -111,7 +111,7 @@ 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 ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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 diff --git a/htdocs/langs/bn_IN/cron.lang b/htdocs/langs/bn_IN/cron.lang index 1de1251831a..2ebdda1e685 100644 --- a/htdocs/langs/bn_IN/cron.lang +++ b/htdocs/langs/bn_IN/cron.lang @@ -7,13 +7,14 @@ Permission23103 = Delete Scheduled job Permission23104 = Execute Scheduled job # Admin CronSetup=Scheduled job management setup -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=Or to check and launch a specific job +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 @@ -46,6 +47,7 @@ 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 @@ -56,7 +58,7 @@ CronNote=Comment CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Enable +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Disable CronTaskInactive=This job is disabled CronId=Id @@ -82,3 +84,8 @@ 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/bn_IN/errors.lang b/htdocs/langs/bn_IN/errors.lang index 893f4a35b65..5b26be724d9 100644 --- a/htdocs/langs/bn_IN/errors.lang +++ b/htdocs/langs/bn_IN/errors.lang @@ -5,8 +5,10 @@ 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. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ 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=Ref used for creation already exists. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/bn_IN/exports.lang b/htdocs/langs/bn_IN/exports.lang index 3549e3f8b23..a0eb7161ef2 100644 --- a/htdocs/langs/bn_IN/exports.lang +++ b/htdocs/langs/bn_IN/exports.lang @@ -133,3 +133,4 @@ 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/bn_IN/mails.lang b/htdocs/langs/bn_IN/mails.lang index 1235eef3b27..2d02c5ddcf9 100644 --- a/htdocs/langs/bn_IN/mails.lang +++ b/htdocs/langs/bn_IN/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Notifications -NoNotificationsWillBeSent=No email notifications are planned for this event and company -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent +NotificationsAuto=Notifications Auto. +NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company +ANotificationsWillBeSent=1 automatic notification will be sent by email +SomeNotificationsWillBeSent=%s automatic notifications will be sent by email +AddNewNotification=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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +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/bn_IN/main.lang b/htdocs/langs/bn_IN/main.lang index 96c68cdcfa3..f8ba6f4073c 100644 --- a/htdocs/langs/bn_IN/main.lang +++ b/htdocs/langs/bn_IN/main.lang @@ -28,7 +28,9 @@ 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 @@ -85,6 +87,8 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C 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 @@ -220,6 +224,7 @@ Value=Value PersonalValue=Personal value NewObject=New %s NewValue=New value +OldValue=Old value %s CurrentValue=Current value Code=Code Type=Type @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Option +Filters=Filters List=List FullList=Full list FullConversation=Full conversation @@ -650,6 +656,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 @@ -671,7 +678,7 @@ SendMail=Send email Email=Email NoEMail=No email AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=No mobile phone Owner=Owner FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/bn_IN/modulebuilder.lang b/htdocs/langs/bn_IN/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/bn_IN/modulebuilder.lang +++ b/htdocs/langs/bn_IN/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/bn_IN/mrp.lang b/htdocs/langs/bn_IN/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/bn_IN/mrp.lang +++ b/htdocs/langs/bn_IN/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/bn_IN/other.lang b/htdocs/langs/bn_IN/other.lang index 54c0572d453..7a895bb1ca5 100644 --- a/htdocs/langs/bn_IN/other.lang +++ b/htdocs/langs/bn_IN/other.lang @@ -5,8 +5,6 @@ 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 -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Right CalculatedWeight=Calculated weight CalculatedVolume=Calculated volume Weight=Weight -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/bn_IN/products.lang b/htdocs/langs/bn_IN/products.lang index 97db059594f..9ecc11ed93d 100644 --- a/htdocs/langs/bn_IN/products.lang +++ b/htdocs/langs/bn_IN/products.lang @@ -108,7 +108,8 @@ 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=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +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 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/bn_IN/projects.lang b/htdocs/langs/bn_IN/projects.lang index baf0ecde17f..05aa1f5a560 100644 --- a/htdocs/langs/bn_IN/projects.lang +++ b/htdocs/langs/bn_IN/projects.lang @@ -76,15 +76,16 @@ MyActivities=My tasks/activities MyProjects=My projects MyProjectsArea=My projects Area DurationEffective=Effective duration -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Time +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/bn_IN/recruitment.lang b/htdocs/langs/bn_IN/recruitment.lang index b775e78552e..437445f25dc 100644 --- a/htdocs/langs/bn_IN/recruitment.lang +++ b/htdocs/langs/bn_IN/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/bn_IN/sendings.lang b/htdocs/langs/bn_IN/sendings.lang index 5ce3b7f67e9..73bd9aebd42 100644 --- a/htdocs/langs/bn_IN/sendings.lang +++ b/htdocs/langs/bn_IN/sendings.lang @@ -30,6 +30,7 @@ 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 @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=More complete document model for delivery receipts (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/bn_IN/stocks.lang b/htdocs/langs/bn_IN/stocks.lang index 660443bcded..a1f55010139 100644 --- a/htdocs/langs/bn_IN/stocks.lang +++ b/htdocs/langs/bn_IN/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/bn_IN/ticket.lang b/htdocs/langs/bn_IN/ticket.lang index 59519282c80..982fff90ffa 100644 --- a/htdocs/langs/bn_IN/ticket.lang +++ b/htdocs/langs/bn_IN/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Other TicketSeverityShortLOW=Low TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=High -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Read Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/bn_IN/website.lang b/htdocs/langs/bn_IN/website.lang index 03e042e4be6..f17def114b8 100644 --- a/htdocs/langs/bn_IN/website.lang +++ b/htdocs/langs/bn_IN/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/bn_IN/withdrawals.lang b/htdocs/langs/bn_IN/withdrawals.lang index 114a8d9dd6c..059b3451c11 100644 --- a/htdocs/langs/bn_IN/withdrawals.lang +++ b/htdocs/langs/bn_IN/withdrawals.lang @@ -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>. ClassCredited=Classify credited @@ -131,7 +132,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,3 +148,5 @@ 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/bn_IN/workflow.lang b/htdocs/langs/bn_IN/workflow.lang index 299be277e1d..494a0424a75 100644 --- a/htdocs/langs/bn_IN/workflow.lang +++ b/htdocs/langs/bn_IN/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 diff --git a/htdocs/langs/bs_BA/accountancy.lang b/htdocs/langs/bs_BA/accountancy.lang index 27f2742906e..6a1143bab46 100644 --- a/htdocs/langs/bs_BA/accountancy.lang +++ b/htdocs/langs/bs_BA/accountancy.lang @@ -16,6 +16,8 @@ ThisService=This service ThisProduct=Ovaj proizvod DefaultForService=Default for service DefaultForProduct=Pretpostavljeno za proizvod +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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Date Docref=Reference LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ Accounted=Accounted in ledger NotYetAccounted=Not yet accounted in ledger ShowTutorial=Show Tutorial NotReconciled=Nije izmireno +WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view ## Admin BindingOptions=Binding options @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/bs_BA/admin.lang b/htdocs/langs/bs_BA/admin.lang index 4149ca416ca..268bcdc7337 100644 --- a/htdocs/langs/bs_BA/admin.lang +++ b/htdocs/langs/bs_BA/admin.lang @@ -56,6 +56,8 @@ GUISetup=Prikaz SetupArea=Postavke UploadNewTemplate=Upload new template(s) FormToTestFileUploadForm=Forma za testiranje uploada fajlova (prema postavkama) +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. @@ -85,7 +87,6 @@ ShowPreview=Prikaži pretpregled ShowHideDetails=Show-Hide details PreviewNotAvailable=Pretpregled nije moguć ThemeCurrentlyActive=Trenutno aktivna tema -CurrentTimeZone=Vremenska zona PHP (servera) 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=Razmak @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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. @@ -256,6 +257,7 @@ 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. @@ -375,7 +377,7 @@ 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:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +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 @@ -406,7 +408,7 @@ UrlGenerationParameters=Parameters to secure URLs SecurityTokenIsUnique=Use a unique securekey parameter for each URL EnterRefToBuildUrl=Enter reference for object %s GetSecuredUrl=Get calculated URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +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 @@ -668,7 +670,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 @@ -1306,7 +1308,7 @@ 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=Optimizacija pretraživanja -YouHaveXObjectUseSearchOptim=You have %s %s in the database. You should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1365,7 +1367,7 @@ 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 +ForceInvoiceDate=Force invoice date to validation date (forcing is possible only the first time an invoice is validated) 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 @@ -1596,8 +1598,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 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=New menu MenuHandler=Menu handler MenuModule=Source module -HideUnauthorizedMenu= Hide unauthorized menus (gray) +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 @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/bs_BA/banks.lang b/htdocs/langs/bs_BA/banks.lang index 696a6ff35f6..9b7547ab933 100644 --- a/htdocs/langs/bs_BA/banks.lang +++ b/htdocs/langs/bs_BA/banks.lang @@ -173,10 +173,11 @@ SEPAMandate=SEPA mandate 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/bs_BA/blockedlog.lang b/htdocs/langs/bs_BA/blockedlog.lang index 5afae6e9e53..0bba5605d0f 100644 --- a/htdocs/langs/bs_BA/blockedlog.lang +++ b/htdocs/langs/bs_BA/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/bs_BA/boxes.lang b/htdocs/langs/bs_BA/boxes.lang index 7106f0a31c4..706ce4969d7 100644 --- a/htdocs/langs/bs_BA/boxes.lang +++ b/htdocs/langs/bs_BA/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=Posljednjih %s izmijenjenih donacija BoxTitleLastModifiedExpenses=Posljednjih %s izmijenjenih troškovnika BoxTitleLatestModifiedBoms=Latest %s modified BOMs BoxTitleLatestModifiedMos=Latest %s modified Manufacturing Orders +BoxTitleLastOutstandingBillReached=Customers with maximum outstanding exceeded BoxGlobalActivity=Globalne aktivnosti (fakture, prijedlozi, narudžbe) BoxGoodCustomers=Dobar kupac BoxTitleGoodCustomers=%s dobrih kupaca +BoxScheduledJobs=Scheduled jobs +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Failed to refresh RSS flux. Latest successful refresh date: %s LastRefreshDate=Posljednji datum ažuriranja NoRecordedBookmarks=Nema definisanih bookmark-a. @@ -92,8 +95,8 @@ LastXMonthRolling=Posljednje %s mjesečne plate ChooseBoxToAdd=Dodaj kutijicu na vašu nadzornu ploču BoxAdded=Kutijica je dodana na vašu nadzornu ploču BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users) -BoxLastManualEntries=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Računovodstvo +ValidatedProjects=Validated projects diff --git a/htdocs/langs/bs_BA/cashdesk.lang b/htdocs/langs/bs_BA/cashdesk.lang index b0ffb1d3f05..6ae6a2bda91 100644 --- a/htdocs/langs/bs_BA/cashdesk.lang +++ b/htdocs/langs/bs_BA/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=Broj faktura Paymentnumpad=Type of Pad to enter payment Numberspad=Numbers Pad @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/bs_BA/categories.lang b/htdocs/langs/bs_BA/categories.lang index 0672e7c4bc7..68923ab7d34 100644 --- a/htdocs/langs/bs_BA/categories.lang +++ b/htdocs/langs/bs_BA/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +ParentCategory=Parent tag/category +ParentCategoryLabel=Label of parent tag/category +CatSupList=List of vendors tags/categories +CatCusList=List of customers/prospects tags/categories CatProdList=Spisak oznaka proizvoda/kategorija CatMemberList=List of members tags/categories -CatContactList=List of contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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 diff --git a/htdocs/langs/bs_BA/companies.lang b/htdocs/langs/bs_BA/companies.lang index f1b1949d9a9..b199c6e0fce 100644 --- a/htdocs/langs/bs_BA/companies.lang +++ b/htdocs/langs/bs_BA/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi VATIntraManualCheck=You can also check manually on the European Commission website <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=Provjera nije moguća. Servis za provjeru nije naveden od stran države članice (%s). NorProspectNorCustomer=Not prospect, nor customer -JuridicalStatus=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=Potencijal diff --git a/htdocs/langs/bs_BA/compta.lang b/htdocs/langs/bs_BA/compta.lang index 90a8289d2d9..233903b0bfe 100644 --- a/htdocs/langs/bs_BA/compta.lang +++ b/htdocs/langs/bs_BA/compta.lang @@ -111,7 +111,7 @@ 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 ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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 diff --git a/htdocs/langs/bs_BA/cron.lang b/htdocs/langs/bs_BA/cron.lang index 32e49dd3bde..cb278ba6885 100644 --- a/htdocs/langs/bs_BA/cron.lang +++ b/htdocs/langs/bs_BA/cron.lang @@ -6,14 +6,15 @@ 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 -OrToLaunchASpecificJob=Or to check and launch a specific job +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=Sigurnosni ključ za URL za pokretanje cron poslova 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 environement you can use Scheduled task tools 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 @@ -42,10 +43,11 @@ CronModule=Modul CronNoJobs=Nema registrovanih poslova CronPriority=Prioritet CronLabel=Oznaka -CronNbRun=Broj pokretanja -CronMaxRun=Max number launch +CronNbRun=Number of launches +CronMaxRun=Maximum number of launches CronEach=Every JobFinished=Job launched and finished +Scheduled=Scheduled #Page card CronAdd= Dodaj posao CronEvery=Execute job each @@ -56,16 +58,16 @@ CronNote=Komentar CronFieldMandatory=Polja %s su obavezna CronErrEndDateStartDt=Datum završetka ne može biti prije datuma početka StatusAtInstall=Status at module installation -CronStatusActiveBtn=Enable +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Iskljući 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 exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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=Sistemska komanda za izvršenje CronCreateJob=Create new Scheduled Job CronFrom=Od @@ -76,8 +78,14 @@ CronType_method=Call method of a PHP Class CronType_command=Shell komanda 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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +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' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/bs_BA/errors.lang b/htdocs/langs/bs_BA/errors.lang index d3460403a51..e2d3b3e5347 100644 --- a/htdocs/langs/bs_BA/errors.lang +++ b/htdocs/langs/bs_BA/errors.lang @@ -5,8 +5,10 @@ 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 je pogrešan ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=Prijava %s već postoji. ErrorGroupAlreadyExists=Grupa %s već postoji. ErrorRecordNotFound=Zapis nije pronađen. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ 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=Ref used for creation already exists. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/bs_BA/exports.lang b/htdocs/langs/bs_BA/exports.lang index c1e9cc4b30f..30e7e97e5a5 100644 --- a/htdocs/langs/bs_BA/exports.lang +++ b/htdocs/langs/bs_BA/exports.lang @@ -26,6 +26,8 @@ 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. @@ -131,3 +133,4 @@ 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/bs_BA/mails.lang b/htdocs/langs/bs_BA/mails.lang index 93bde73c33f..a9adc014ec8 100644 --- a/htdocs/langs/bs_BA/mails.lang +++ b/htdocs/langs/bs_BA/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Linija %s u fajlu @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Notifikacije -NoNotificationsWillBeSent=Nema planiranih email notifikacija za ovaj događaj i kompaniju -ANotificationsWillBeSent=1 notifikacija će biti poslana emailom -SomeNotificationsWillBeSent=%s notifikacija će biti poslane emailom -AddNewNotification=Activate a new email notification target -ListOfActiveNotifications=List all active targets for email notification -ListOfNotificationsDone=Lista svih notifikacija o slanju emaila +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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=Inromacije ContactsWithThirdpartyFilter=Contacts with third-party filter Unanswered=Unanswered Answered=Answered IsNotAnAnswer=Is not answer (initial email) IsAnAnswer=Is an answer of an initial email +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/bs_BA/main.lang b/htdocs/langs/bs_BA/main.lang index 53577a4ab73..fb1c15f2bfd 100644 --- a/htdocs/langs/bs_BA/main.lang +++ b/htdocs/langs/bs_BA/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=Šablon za ovu vrstu emaila nije dostupan AvailableVariables=Dostupne zamjenske varijable NoTranslation=Nema prevoda Translation=Prevod +CurrentTimeZone=Vremenska zona PHP (servera) EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria NoRecordFound=Nije pronađen zapis NoRecordDeleted=Nijedan zapis nije obrisan NotEnoughDataYet=Nema dovoljno podataka @@ -85,6 +87,8 @@ FileWasNotUploaded=Datoteka je odabrana za prilog ali nije još postavljena. Kli NbOfEntries=No. of entries GoToWikiHelpPage=Pročitajte online pomoć (neophodan pristup internetu) GoToHelpPage=Pročitaj pomoć +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Home Page RecordSaved=Unos spremljen RecordDeleted=Unos obrisan RecordGenerated=Record generated @@ -220,6 +224,7 @@ Value=Vrijednost PersonalValue=Lična vrijednost NewObject=Novi %s NewValue=Nova vrijednost +OldValue=Old value %s CurrentValue=Trenutna vrijednost Code=Kod Type=Tip @@ -433,6 +438,7 @@ RemainToPay=Preostalo za platiti Module=Modul/aplikacija Modules=Moduli/aplikacije Option=Opcija +Filters=Filters List=Spisak FullList=Potpuni spisak FullConversation=Full conversation @@ -650,6 +656,7 @@ SupplierPreview=Pregled prodavača ShowCustomerPreview=Pokaži sažetak kupca ShowSupplierPreview=Pokaži pregled prodavača RefCustomer=Ref. kupca +InternalRef=Internal ref. Currency=valuta InfoAdmin=Informacije za administratore Undo=vrati @@ -671,7 +678,7 @@ SendMail=Pošalji e-mail Email=email NoEMail=nema emaila AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=Nema broj mobitela Owner=Vlasnik FollowingConstantsWillBeSubstituted=Sljedeće konstante će se zamijeniti sa odgovarajućim vrijednostima. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/bs_BA/modulebuilder.lang b/htdocs/langs/bs_BA/modulebuilder.lang index db704769abd..9281e1f7849 100644 --- a/htdocs/langs/bs_BA/modulebuilder.lang +++ b/htdocs/langs/bs_BA/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/bs_BA/mrp.lang b/htdocs/langs/bs_BA/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/bs_BA/mrp.lang +++ b/htdocs/langs/bs_BA/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/bs_BA/other.lang b/htdocs/langs/bs_BA/other.lang index 024bf6013d5..26ece215614 100644 --- a/htdocs/langs/bs_BA/other.lang +++ b/htdocs/langs/bs_BA/other.lang @@ -5,8 +5,6 @@ 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 -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Right CalculatedWeight=Calculated weight CalculatedVolume=Calculated volume Weight=Weight -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/bs_BA/products.lang b/htdocs/langs/bs_BA/products.lang index 23be1f760b5..467e9f62b86 100644 --- a/htdocs/langs/bs_BA/products.lang +++ b/htdocs/langs/bs_BA/products.lang @@ -108,7 +108,8 @@ 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=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +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 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/bs_BA/projects.lang b/htdocs/langs/bs_BA/projects.lang index 2a1023dec52..ed058b147fe 100644 --- a/htdocs/langs/bs_BA/projects.lang +++ b/htdocs/langs/bs_BA/projects.lang @@ -76,15 +76,16 @@ MyActivities=Moji zadaci/aktivnosti MyProjects=Moji projekti MyProjectsArea=My projects Area DurationEffective=Efektivno trajanje -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Vrijeme +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/bs_BA/recruitment.lang b/htdocs/langs/bs_BA/recruitment.lang index 1d485508eff..a2e64d9e81f 100644 --- a/htdocs/langs/bs_BA/recruitment.lang +++ b/htdocs/langs/bs_BA/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/bs_BA/sendings.lang b/htdocs/langs/bs_BA/sendings.lang index dfae5d3a8a8..1fc121104eb 100644 --- a/htdocs/langs/bs_BA/sendings.lang +++ b/htdocs/langs/bs_BA/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Druge pošiljke za ovu narudžbu SendingsAndReceivingForSameOrder=Shipments and receipts for this order SendingsToValidate=Pošiljke za potvrditi StatusSendingCanceled=Otkazano +StatusSendingCanceledShort=Otkazan StatusSendingDraft=Nacrt StatusSendingValidated=Potvrđeno (proizvodi za slanje ili već poslano) StatusSendingProcessed=Obrađeno @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=More complete document model for delivery receipts (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined SumOfProductVolumes=Suma količina proizvoda SumOfProductWeights=Suma težina proizvoda diff --git a/htdocs/langs/bs_BA/stocks.lang b/htdocs/langs/bs_BA/stocks.lang index 9dbb5dd7df2..3549cc9c195 100644 --- a/htdocs/langs/bs_BA/stocks.lang +++ b/htdocs/langs/bs_BA/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Glavno skladište @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/bs_BA/ticket.lang b/htdocs/langs/bs_BA/ticket.lang index c93c3a3c59e..fd582550e54 100644 --- a/htdocs/langs/bs_BA/ticket.lang +++ b/htdocs/langs/bs_BA/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Ostalo TicketSeverityShortLOW=Nizak potencijal TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=Veliki potencijal -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Pročitaj Assigned=Assigned InProgress=U toku @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/bs_BA/website.lang b/htdocs/langs/bs_BA/website.lang index 8aa0ca84eb0..aa90f42f735 100644 --- a/htdocs/langs/bs_BA/website.lang +++ b/htdocs/langs/bs_BA/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page PageContainer=Stranica 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/bs_BA/withdrawals.lang b/htdocs/langs/bs_BA/withdrawals.lang index ae61a690ede..67fafcf5faa 100644 --- a/htdocs/langs/bs_BA/withdrawals.lang +++ b/htdocs/langs/bs_BA/withdrawals.lang @@ -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>. ClassCredited=Označi na potraživanja @@ -131,7 +132,8 @@ SEPARCUR=SEPA CUR SEPAFRST=SEPA FRST ExecutionDate=Datum izvršenja 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,3 +148,5 @@ 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/bs_BA/workflow.lang b/htdocs/langs/bs_BA/workflow.lang index 81f8088f74d..713199e5ec9 100644 --- a/htdocs/langs/bs_BA/workflow.lang +++ b/htdocs/langs/bs_BA/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 diff --git a/htdocs/langs/ca_ES/accountancy.lang b/htdocs/langs/ca_ES/accountancy.lang index 6146dd28e9f..de5dd2c6a24 100644 --- a/htdocs/langs/ca_ES/accountancy.lang +++ b/htdocs/langs/ca_ES/accountancy.lang @@ -16,6 +16,8 @@ ThisService=Aquest servei ThisProduct=Aquest producte DefaultForService=Defecte per al servei DefaultForProduct=Defecte per al producte +ProductForThisThirdparty=Producte per a aquest tercer +ServiceForThisThirdparty=Servei per a aquest tercer CantSuggest=No es pot suggerir AccountancySetupDoneFromAccountancyMenu=La major part de la configuració de la comptabilitat es realitza des del menú %s ConfigAccountingExpert=Configuració del mòdul de comptabilitat (doble entrada) @@ -31,7 +33,7 @@ AssignDedicatedAccountingAccount=Compte nou per a assignar InvoiceLabel=Etiqueta de factura OverviewOfAmountOfLinesNotBound=Vista general de la quantitat de línies no comptabilitzades en un compte comptable OverviewOfAmountOfLinesBound=Vista general de la quantitat de línies ja comptabilitzades en un compte comptable -OtherInfo=Altra informació +OtherInfo=Una altra informació DeleteCptCategory=Eliminar el compte comptable del grup ConfirmDeleteCptCategory=Estàs segur que vols eliminar aquest compte comptable del grup de comptabilitat? JournalizationInLedgerStatus=Estat del diari @@ -46,8 +48,9 @@ CountriesNotInEEC=Països no integrats a la CEE CountriesInEECExceptMe=Països a la CEE excepte %s CountriesExceptMe=Tots els països, excepte %s AccountantFiles=Exporta documents d'origen -ExportAccountingSourceDocHelp=Amb aquesta eina, podeu exportar els esdeveniments d'origen (llista i PDF) que es van utilitzar per generar la vostra comptabilitat. Per exportar els vostres diaris, utilitzeu l’entrada de menú %s - %s. +ExportAccountingSourceDocHelp=Amb aquesta eina, podeu exportar els esdeveniments d'origen (llista i PDF) que es van utilitzar per a generar la vostra comptabilitat. Per a exportar els vostres diaris, utilitzeu l’entrada de menú %s - %s. VueByAccountAccounting=Veure per compte comptable +VueBySubAccountAccounting=Veure-ho per subcomptes comptables MainAccountForCustomersNotDefined=Compte comptable per a clients no definida en la configuració MainAccountForSuppliersNotDefined=Compte comptable principal per a proveïdors no definit a la configuració @@ -58,12 +61,12 @@ MainAccountForSubscriptionPaymentNotDefined=Compte comptable per a IVA no defini AccountancyArea=Àrea de comptabilitat AccountancyAreaDescIntro=L'ús del mòdul de comptabilitat es realitza en diverses etapes: AccountancyAreaDescActionOnce=Les següents accions s'executen normalment per una sola vegada, o un cop l'any ... -AccountancyAreaDescActionOnceBis=Els passos següents s'han de fer per a estalviar-vos temps en el futur suggerint-vos el compte comptable per defecte correcte al fer els diaris (escriptura dels registres en els diaris i Llibre Major) +AccountancyAreaDescActionOnceBis=Cal fer els passos següents per a estalviar-vos temps en el futur, suggerint-vos el compte comptable per defecte correcte quan feu els diaris (escriptura dels registres en els Diaris i Llibre major) AccountancyAreaDescActionFreq=Les següents accions s'executen normalment cada mes, setmana o dia per empreses molt grans ... AccountancyAreaDescJournalSetup=PAS %s: Crea o consulta el contingut dels teus diaris des del menú %s AccountancyAreaDescChartModel=PAS %s: Comproveu que existeix un model de pla comptable o creeu-ne un des del menú %s -AccountancyAreaDescChart=PAS %s: Seleccioneu i/o completeu el vostre pla comptable al menú %s +AccountancyAreaDescChart=PAS %s: Seleccioneu o completeu el vostre pla comptable al menú %s AccountancyAreaDescVat=PAS %s: Defineix comptes comptables per cada tipus d'IVA. Per això, utilitzeu l'entrada del menú %s. AccountancyAreaDescDefault=PAS %s: Definiu comptes comptables per defecte. Per a això, utilitzeu l'entrada de menú %s. @@ -144,24 +147,24 @@ NotVentilatedinAccount=No vinculat al compte comptable XLineSuccessfullyBinded=%s productes/serveis vinculats amb èxit a un compte comptable XLineFailedToBeBinded=%s de productes/serveis no comptabilitzats en cap compte comptable -ACCOUNTING_LIMIT_LIST_VENTILATION=Nombre d'elements a vincular mostrats per pàgina (màxim recomanat: 50) -ACCOUNTING_LIST_SORT_VENTILATION_TODO=Comença l'ordenació de la pàgina "Comptabilització per fer" pels elements més recents +ACCOUNTING_LIMIT_LIST_VENTILATION=Nombre màxim de línies en llistes per pàgina (recomanat: 50) +ACCOUNTING_LIST_SORT_VENTILATION_TODO=Comença l'ordenació de la pàgina "Comptabilització per a fer" pels elements més recents ACCOUNTING_LIST_SORT_VENTILATION_DONE=Comença l'ordenació de la pàgina "Comptabilització realitzada" pels elements més recents ACCOUNTING_LENGTH_DESCRIPTION=Truncar descripcions de producte i serveis en llistes de x caràcters (Millor = 50) ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=Truncar descripcions de comptes de producte i serveis en llistes de x caràcters (Millor = 50) -ACCOUNTING_LENGTH_GACCOUNT=Longitud dels comptes generals (Si s'estableix el valor a 6 aquí, el compte '706' apareixerà com '706000' a la pantalla) -ACCOUNTING_LENGTH_AACCOUNT=Longitud dels subcomptes (Si s'estableix el valor a 6 aquí, el compte '401' apareixerà com '401000' a la pantalla) -ACCOUNTING_MANAGE_ZERO=Gestiona un nombre diferent de zero al final d'un compte comptable. Necessària per alguns països (com Suïssa). Si es manté apagat (per defecte), pot configurar els següents 2 paràmetres per a demanar a l'aplicació afegir un zero virtual. -BANK_DISABLE_DIRECT_INPUT=Des-habilitar l'enregistrament directe de transaccions al compte bancari +ACCOUNTING_LENGTH_GACCOUNT=Longitud dels comptes generals (Si s'estableix el valor a 6 aquí, el compte «706» apareixerà com «706000» a la pantalla) +ACCOUNTING_LENGTH_AACCOUNT=Longitud dels subcomptes (Si s'estableix el valor a 6 aquí, el compte «401» apareixerà com «401000» a la pantalla) +ACCOUNTING_MANAGE_ZERO=Gestiona un nombre diferent de zero al final d'un compte comptable. És necessari per a alguns països (com Suïssa). Si es manté apagat (per defecte), podeu configurar els següents dos paràmetres per a demanar a l'aplicació d'afegir zeros virtuals. +BANK_DISABLE_DIRECT_INPUT=Desactiva el registre directe de transaccions al compte bancari ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Habilita l'exportació d'esborrany en el diari ACCOUNTANCY_COMBO_FOR_AUX=Activa la llista de combo per al compte subsidiari (pot ser lent si tens molts tercers) -ACCOUNTING_DATE_START_BINDING=Definiu una data per començar la vinculació i transferència a la comptabilitat. Per sota d’aquesta data, les transaccions no es transferiran a la comptabilitat. +ACCOUNTING_DATE_START_BINDING=Definiu una data per a començar la vinculació i transferència a la comptabilitat. Per sota d’aquesta data, les transaccions no es transferiran a la comptabilitat. ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER=En el cas de transferència de comptabilitat, seleccioneu el període a mostrar per defecte ACCOUNTING_SELL_JOURNAL=Diari de venda ACCOUNTING_PURCHASE_JOURNAL=Diari de compra -ACCOUNTING_MISCELLANEOUS_JOURNAL=Diari varis +ACCOUNTING_MISCELLANEOUS_JOURNAL=Diaris varis ACCOUNTING_EXPENSEREPORT_JOURNAL=Diari de l'informe de despeses ACCOUNTING_SOCIAL_JOURNAL=Diari social ACCOUNTING_HAS_NEW_JOURNAL=Té un nou Diari @@ -177,7 +180,7 @@ ACCOUNTING_ACCOUNT_SUSPENSE=Compte comptable d'espera DONATION_ACCOUNTINGACCOUNT=Compte comptable per a registrar les donacions ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Compte comptable per a registrar les donacions -ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT=Compte comptable per defecte per registrar el dipòsit del client +ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT=Compte comptable per defecte per a registrar el dipòsit del client ACCOUNTING_PRODUCT_BUY_ACCOUNT=Compte comptable per defecte per als productes comprats (utilitzat si no es defineix en el producte) ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=Compte de comptabilitat per defecte dels productes comprats a la CEE (utilitzat si no està definit a la taula de productes) @@ -198,7 +201,8 @@ Docdate=Data Docref=Referència LabelAccount=Etiqueta de compte LabelOperation=Etiqueta de l'operació -Sens=Significat +Sens=Direcció +AccountingDirectionHelp=Per a un compte comptable d'un client, utilitzeu Crèdit per a registrar un pagament que heu rebut <br> Per a un compte comptable d'un proveïdor, utilitzeu Dèbit per a registrar un pagament que feu LetteringCode=Codi de retolació Lettering=Lletres Codejournal=Diari @@ -206,8 +210,9 @@ JournalLabel=Títol de Diari NumPiece=Número de peça TransactionNumShort=Número de transacció AccountingCategory=Grups personalitzats -GroupByAccountAccounting=Agrupar per compte comptable -AccountingAccountGroupsDesc=Pots definir aquí alguns grups de compte comptable. S'utilitzaran per a informes comptables personalitzats. +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. ByAccounts=Per comptes ByPredefinedAccountGroups=Per grups predefinits ByPersonalizedAccountGroups=Per grups personalitzats @@ -216,14 +221,14 @@ NotMatch=No definit DeleteMvt=Elimina algunes línies d'operació de la comptabilitat DelMonth=Mes a eliminar DelYear=Any a eliminar -DelJournal=Diari per esborrar -ConfirmDeleteMvt=Això suprimirà totes les línies d'operació de la comptabilitat de l'any/mes i/o d'un diari específic (cal un criteri com a mínim). Haureu de tornar a utilitzar la funció '%s' per a que el registre suprimit torni al llibre major. +DelJournal=Diari per a suprimir +ConfirmDeleteMvt=Això suprimirà totes les línies d'operació de la comptabilitat de l'any/mes o d'un diari específic (cal un criteri com a mínim). Haureu d'utilitzar la funció «%s» per a tornar a tenir el registre suprimit al llibre major. ConfirmDeleteMvtPartial=Això suprimirà la transacció de la comptabilitat (se suprimiran totes les línies d’operació relacionades amb la mateixa transacció) FinanceJournal=Diari de finances ExpenseReportsJournal=Informe-diari de despeses -DescFinanceJournal=Finance journal including all the types of payments by bank account +DescFinanceJournal=Diari financer que inclou tots els tipus de pagaments per compte bancari DescJournalOnlyBindedVisible=Aquesta és una vista de registre que està vinculada a un compte comptable i que es pot registrar als diaris i llibres majors. -VATAccountNotDefined=Comptes comptables de IVA sense definir +VATAccountNotDefined=Comptes comptables d'IVA sense definir ThirdpartyAccountNotDefined=Comptes comptables de tercers (clients o proveïdors) sense definir ProductAccountNotDefined=Comptes comptables per al producte sense definir FeeAccountNotDefined=Compte per tarifa no definit @@ -248,10 +253,10 @@ PaymentsNotLinkedToProduct=Pagament no vinculat a cap producte / servei OpeningBalance=Saldo d'obertura ShowOpeningBalance=Mostra el saldo d'obertura HideOpeningBalance=Amagueu el balanç d'obertura -ShowSubtotalByGroup=Mostrar subtotals per grup +ShowSubtotalByGroup=Mostra el subtotal per nivell Pcgtype=Grup de compte -PcgtypeDesc=S'utilitzen grups de comptes com a criteris predefinits de "filtre" i "agrupació" per a alguns informes de comptabilitat. Per exemple, "Ingressos" o "DESPESES" s'utilitzen com a grups per a comptes de comptabilitat de productes per crear l'informe de despeses / ingressos. +PcgtypeDesc=S'utilitzen grups de comptes com a criteris predefinits de «filtre» i «agrupació» per a alguns informes de comptabilitat. Per exemple, «INGRESSOS» o «DESPESES» s'utilitzen com a grups per a comptes comptables de productes per a crear l'informe de despeses/ingressos. Reconcilable=Reconciliable @@ -259,7 +264,7 @@ TotalVente=Total turnover before tax TotalMarge=Marge total de vendes DescVentilCustomer=Consulti aquí la llista de línies de factures de client vinculades (o no) a comptes comptables de producte -DescVentilMore=En la majoria dels casos, si tu utilitzes productes o serveis predefinits i poses el número de compte a la fitxa de producte/servei, l'aplicació serà capaç de fer tots els vincles entre les línies de factura i els comptes comptables del teu pla comptable, només amb un clic mitjançant el botó <strong>"%s"</strong>. Si el compte no està col·locat a la fitxa del producte/servei o si encara hi ha alguna línia no vinculada a cap compte, hauràs de fer una vinculació manual a partir del menú "<strong>%s</strong>". +DescVentilMore=En la majoria dels casos, si utilitzeu productes o serveis predefinits i poses el número de compte a la fitxa de producte/servei, l'aplicació serà capaç de fer tots els vincles entre les línies de factura i els comptes comptables del vostre pla comptable, només amb un clic mitjançant el botó <strong>«%s»</strong>. Si el compte no està col·locat a la fitxa del producte/servei o si encara hi ha alguna línia no vinculada a cap compte, haureu de fer una vinculació manual a partir del menú «<strong>%s</strong>». DescVentilDoneCustomer=Consulta aquí la llista de línies de factures a clients i els seus comptes comptables de producte DescVentilTodoCustomer=Comptabilitza les línies de factura encara no comptabilitzades amb un compte comptable de producte ChangeAccount=Canvia el compte comptable de producte/servei per les línies seleccionades amb el següent compte comptable: @@ -268,14 +273,16 @@ DescVentilSupplier=Consulteu aquí la llista de les línies de facturació dels DescVentilDoneSupplier=Consulteu aquí la llista de les línies de venedors de factures i el seu compte comptable DescVentilTodoExpenseReport=Línies d'informes de despeses comptabilitzades encara no comptabilitzades amb un compte comptable de tarifa DescVentilExpenseReport=Consulteu aquí la llista de les línies d'informe de despeses vinculada (o no) a un compte comptable corresponent a tarifa -DescVentilExpenseReportMore=Si tu poses el compte comptable sobre les línies de l'informe per tipus de despesa, l'aplicació serà capaç de fer tots els vincles entre les línies de l'informe i els comptes comptables del teu pla comptable, només amb un clic amb el botó <strong>"%s"</strong>. Si el compte no estava al diccionari de tarifes o si encara hi ha línies no vinculades a cap compte, hauràs de fer-ho manualment a partir del menú "<strong>%s</strong>". +DescVentilExpenseReportMore=Si poseu el compte comptable sobre les línies de l'informe per tipus de despesa, l'aplicació serà capaç de fer tots els vincles entre les línies de l'informe i els comptes comptables del vostre pla comptable, només amb un clic amb el botó <strong>«%s»</strong>. Si el compte no estava al diccionari de tarifes o si encara hi ha línies no vinculades a cap compte, haureu de fer-ho manualment a partir del menú «<strong>%s</strong>». DescVentilDoneExpenseReport=Consulteu aquí la llista de les línies d'informes de despeses i el seu compte comptable de comissions -DescClosure=Consulteu aquí el nombre de moviments per mes que no són validats i els exercicis ja oberts +Closure=Tancament anual +DescClosure=Consulteu aquí el nombre de moviments mensuals que no estan validats i els exercicis fiscals encara oberts OverviewOfMovementsNotValidated=Pas 1 / Visió general dels moviments no validats. (Cal tancar un exercici) +AllMovementsWereRecordedAsValidated=Tots els moviments es van registrar com a validats +NotAllMovementsCouldBeRecordedAsValidated=No es poden registrar tots els moviments com a validats ValidateMovements=Valida moviments DescValidateMovements=Queda prohibida qualsevol modificació o supressió de registres. Totes les entrades d’un exercici s’han de validar, en cas contrari, el tancament no serà possible -SelectMonthAndValidate=Selecciona el mes i valida els moviments ValidateHistory=Comptabilitza automàticament AutomaticBindingDone=Comptabilització automàtica realitzada @@ -293,6 +300,7 @@ Accounted=Comptabilitzat en el llibre major NotYetAccounted=Encara no comptabilitzat en el llibre major ShowTutorial=Mostrar Tutorial NotReconciled=No conciliat +WarningRecordWithoutSubledgerAreExcluded=Advertiment: totes les operacions sense subcompte comptable definit es filtren i s'exclouen d'aquesta vista ## Admin BindingOptions=Opcions d'enquadernació @@ -320,7 +328,7 @@ ACCOUNTING_DISABLE_BINDING_ON_PURCHASES=Desactiva la vinculació i transferènci ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS=Desactiva la vinculació i transferència de comptes en els informes de despeses (els informes de despeses no es tindran en compte a la comptabilitat) ## Export -ExportDraftJournal=Exportar esborranys del llibre +ExportDraftJournal=Exporta els esborranys del llibre Modelcsv=Model d'exportació Selectmodelcsv=Selecciona un model d'exportació Modelcsv_normal=Exportació clàssica @@ -337,6 +345,7 @@ Modelcsv_LDCompta10=Exportar per LD Compta (v10 i més) Modelcsv_openconcerto=Exporta per a OpenConcerto (Test) Modelcsv_configurable=Exporta CSV configurable Modelcsv_FEC=Exporta FEC +Modelcsv_FEC2=Exporta FEC (amb escriptura de generació de dates / document invertit) Modelcsv_Sage50_Swiss=Exportació per Sage 50 Switzerland Modelcsv_winfic=Exportar Winfic - eWinfic - WinSis Compta Modelcsv_Gestinumv3=Exporta per a Gestinum (v3) @@ -345,13 +354,13 @@ ChartofaccountsId=Id pla comptable ## Tools - Init accounting account on product / service InitAccountancy=Inicialitza la comptabilitat -InitAccountancyDesc=Aquesta pàgina es pot utilitzar per inicialitzar un compte de comptabilitat en productes i serveis que no tenen compte comptable definit per a vendes i compres. -DefaultBindingDesc=Aquesta pàgina es pot utilitzar per establir un compte predeterminat que s'utilitzarà per enllaçar el registre de transaccions sobre el pagament de salaris, donacions, impostos i IVA quan encara no s'hagi establert cap compte comptable específic. -DefaultClosureDesc=Aquesta pàgina es pot utilitzar per definir els paràmetres usats per als tancaments de comptabilitat. +InitAccountancyDesc=Aquesta pàgina es pot utilitzar per a inicialitzar un compte comptable de productes i serveis que no tenen un compte comptable definit per a vendes i compres. +DefaultBindingDesc=Aquesta pàgina es pot utilitzar per a establir un compte predeterminat que s'utilitzarà per a enllaçar el registre de transaccions sobre el pagament de salaris, donacions, impostos i IVA quan encara no s'hagi establert cap compte comptable específic. +DefaultClosureDesc=Aquesta pàgina es pot utilitzar per a definir els paràmetres utilitzats per als tancaments de comptabilitat. Options=Opcions -OptionModeProductSell=En mode vendes -OptionModeProductSellIntra=Les vendes de mode exportades a la CEE -OptionModeProductSellExport=Les vendes de mode exportades a altres països +OptionModeProductSell=Modalitat de vendes +OptionModeProductSellIntra=Modalitats de vendes exportades a la CEE +OptionModeProductSellExport=Modalitats de vendes exportades a altres països OptionModeProductBuy=En mode compres OptionModeProductBuyIntra=Mode compres importades a la CEE OptionModeProductBuyExport=Mode compres importades de fora la CEE @@ -372,7 +381,7 @@ SaleLocal=Venda local SaleExport=Venda d’exportació SaleEEC=Venda en CEE SaleEECWithVAT=Venda a la CEE amb un IVA que no és nul, per la qual cosa suposem que NO es tracta d’una venda intracomunitària i el compte suggerit és el compte estàndard del producte. -SaleEECWithoutVATNumber=Venda a la CEE sense IVA però l’identificador d’IVA d'aquest tercer no està definit. Així que s'ha emprat el compte del producte per a vendes estàndard. Podeu corregir l’identificador d’IVA d'aquest tercer o el compte del producte si cal. +SaleEECWithoutVATNumber=Venda a la CEE sense IVA, però l’identificador d’IVA del tercer no està definit. S'ha emprat el compte del producte per a vendes estàndard. Podeu corregir l’identificador d’IVA del tercer o el compte del producte si cal. ## Dictionary Range=Rang de compte comptable @@ -389,7 +398,7 @@ BookeppingLineAlreayExists=Les línies ja existeixen en la comptabilitat NoJournalDefined=Cap diari definit Binded=Línies comptabilitzades ToBind=Línies a comptabilitzar -UseMenuToSetBindindManualy=Línies encara no enllaçades, utilitzeu el menú <a href="%s"> %s </a> per fer l'enllaç manualment +UseMenuToSetBindindManualy=Línies encara no enllaçades, utilitzeu el menú <a href="%s"> %s </a> per a fer l'enllaç manualment ## Import ImportAccountingEntries=Entrades de comptabilitat diff --git a/htdocs/langs/ca_ES/admin.lang b/htdocs/langs/ca_ES/admin.lang index 7d1f089796c..552135eda7c 100644 --- a/htdocs/langs/ca_ES/admin.lang +++ b/htdocs/langs/ca_ES/admin.lang @@ -2,7 +2,7 @@ Foundation=Entitat Version=Versió Publisher=Publicador -VersionProgram=Versió programa +VersionProgram=Versió del programa VersionLastInstall=Versió d'instal·lació inicial VersionLastUpgrade=Versió de l'última actualització VersionExperimental=Experimental @@ -10,7 +10,7 @@ VersionDevelopment=Desenvolupament VersionUnknown=Desconeguda VersionRecommanded=Recomanada FileCheck=Comprovador d'integritat de fitxers -FileCheckDesc=Aquesta eina et 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ó. Pots utilitzar aquesta eina per determinar si s'han modificat fitxers (per exemple, per un hacker). +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. FileIntegritySomeFilesWereRemovedOrModified=La comprovació d'integritat d'arxius ha fallat. Alguns arxius han sigut modificats, eliminats o afegits. @@ -22,7 +22,7 @@ FilesMissing=Arxius que falten FilesUpdated=Arxius actualitzats FilesModified=Fitxers modificats FilesAdded=Fitxers afegits -FileCheckDolibarr=Comprovar l'integritat dels arxius de l'aplicació +FileCheckDolibarr=Comprova la integritat dels fitxers de l'aplicació AvailableOnlyOnPackagedVersions=El fitxer local per a la comprovació d'integritat només està disponible quan l'aplicació està instal·lada des d'un paquet oficial XmlNotFound=No es troba l'arxiu xml SessionId=ID de sessió @@ -32,7 +32,7 @@ PurgeSessions=Purga de sessions ConfirmPurgeSessions=Estàs segur de voler purgar totes les sessions? Es desconnectaran tots els usuaris (excepte tu mateix) NoSessionListWithThisHandler=El gestor de sessions configurat al vostre PHP no permet llistar totes les sessions en execució. LockNewSessions=Bloquejar connexions noves -ConfirmLockNewSessions=Esteu segur de voler restringir l'accés a Dolibarr únicament al seu usuari? Només el login <b>%s</b> podrà connectar si confirma. +ConfirmLockNewSessions=Esteu segur que voleu restringir qualsevol nova connexió a Dolibarr només a vosaltres mateixos? Només l'usuari <b> %s </b> podrà connectar-se després d'això. UnlockNewSessions=Eliminar bloqueig de connexions YourSession=La seva sessió Sessions=Sessions d'usuaris @@ -41,7 +41,7 @@ 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). DBStoringCharset=Codificació base de dades per emmagatzematge de dades -DBSortingCharset=Codificació base de dades per classificar les dades +DBSortingCharset=Conjunt de caràcters de base de dades per a ordenar les dades HostCharset=Joc de caràcters del servidor ClientCharset=Joc de caràcters del client ClientSortingCharset="Collation" del client @@ -56,8 +56,10 @@ GUISetup=Entorn SetupArea=Configuració UploadNewTemplate=Carrega plantilles noves FormToTestFileUploadForm=Formulari de prova de càrrega de fitxer (segons opcions escollides) +ModuleMustBeEnabled=El mòdul/aplicació <b>%s</b> s'ha d'activar +ModuleIsEnabled=El mòdul/aplicació <b>%s</b> s'ha activat IfModuleEnabled=Nota: sí només és eficaç si el mòdul <b>%s</b> està activat -RemoveLock=Elimineu/renombreu el fitxer <b> %s </b> si existeix, per a permetre l'ús de l'eina d'actualització/instal·lació. +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 SecurityFilesDesc=Defineix les opcions relacionades amb la seguretat de càrrega de fitxers. @@ -66,7 +68,7 @@ ErrorModuleRequireDolibarrVersion=Error, aquest mòdul requereix una versió %s ErrorDecimalLargerThanAreForbidden=Error, les precisions superiors a <b>%s</b> no estan suportades. DictionarySetup=Configuració de Diccionari Dictionary=Diccionaris -ErrorReservedTypeSystemSystemAuto=L'ús del tipus 'system' i 'systemauto' està reservat. Podeu utilitzar 'user' com a valor per afegir el seu propi registre +ErrorReservedTypeSystemSystemAuto=Els valors "sistema" i "systemauto" per al tipus estan reservats. Podeu utilitzar "user" com a valor per a afegir el vostre propi registre ErrorCodeCantContainZero=El codi no pot contenir el valor 0 DisableJavascript=Desactivar les funcions Javascript DisableJavascriptNote=Nota: per a propòsits de prova o de depuració. Per a l’optimització dels navegadors cec o de text, és possible que preferiu utilitzar la configuració en el perfil de l’usuari @@ -74,7 +76,7 @@ UseSearchToSelectCompanyTooltip=A més, si teniu un gran nombre de tercers (> 10 UseSearchToSelectContactTooltip=A més, si teniu un gran nombre de tercers (> 100.000), podeu augmentar la velocitat establint la constant CONTACT_DONOTSEARCH_ANYWHERE a 1 a Configuració->Altres. La cerca es limitarà a l'inici de la cadena. DelaiedFullListToSelectCompany=Esperar fins que es prem una tecla abans de carregar el contingut de la llista combinada de Tercers. <br> Això pot augmentar el rendiment si teniu un gran nombre de tercers, però és menys convenient. DelaiedFullListToSelectContact=Espereu fins que es prem una tecla abans de carregar el contingut de la llista combinada de contactes. <br> Això pot augmentar el rendiment si teniu un gran nombre de contactes, però és menys convenient. -NumberOfKeyToSearch=Nombre de caràcters per activar la cerca: %s +NumberOfKeyToSearch=Nombre de caràcters per a activar la cerca: %s NumberOfBytes=Nombre de bytes SearchString=Cerca cadena NotAvailableWhenAjaxDisabled=No disponible quan Ajax estigui desactivat @@ -85,7 +87,6 @@ ShowPreview=Veure previsualització ShowHideDetails=Mostra-Amaga els detalls PreviewNotAvailable=Vista prèvia no disponible ThemeCurrentlyActive=Tema actualment actiu -CurrentTimeZone=Fus horari PHP (Servidor) MySQLTimeZone=Zona horària MySql (base de dades) TZHasNoEffect=El servidor de base de dades emmagatzema i retorna les dates com si les haguessin enviat com una cadena. La zona horària només té efecte quan s’utilitza la funció UNIX_TIMESTAMP (que Dolibarr no hauria d’utilitzar, de manera que la base de dades TZ no hauria de tenir cap efecte, fins i tot si es canvia després d’introduir les dades). Space=Àrea @@ -100,15 +101,15 @@ NextValueForDeposit=Següent valor (bestreta) NextValueForReplacements=Pròxim valor (rectificatives) MustBeLowerThanPHPLimit=Nota: actualment la vostra configuració PHP limita la mida màxima de fitxers per a la pujada a <b> %s </b> %s, independentment del valor d'aquest paràmetre. NoMaxSizeByPHPLimit=Cap limitació interna en el seu servidor PHP -MaxSizeForUploadedFiles=Tamany màxim dels documents a pujar (0 per prohibir la pujada) -UseCaptchaCode=Utilització de codi gràfic (CAPTCHA) en el login +MaxSizeForUploadedFiles=Mida màxima per als fitxers a pujar (0 per a no permetre cap pujada) +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 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 -MultiCurrencySetup=Configuració multi-divisa +MultiCurrencySetup=Configuració multidivisa MenuLimits=Límits i precisió MenuIdParent=Id del menú pare DetailMenuIdParent=IDr del menú pare (buit per a un menú superior) @@ -133,7 +134,7 @@ PHPTZ=Zona horària Servidor PHP DaylingSavingTime=Horari d'estiu (usuari) CurrentHour=Hora PHP (servidor) CurrentSessionTimeOut=Timeout sessió actual -YouCanEditPHPTZ=Per establir una zona horària PHP diferent (no és necessari), pots intentar afegir un fitxer .htaccess amb una línia com aquesta "SetEnv TZ Europe/Madrid" +YouCanEditPHPTZ=Per a establir una zona horària PHP diferent (no obligatori), podeu provar d'afegir un fitxer .htaccess amb una línia com aquesta "SetEnv TZ Europe/Madrid" HoursOnThisPageAreOnServerTZ=Avís, al contrari d'altres pantalles, les hores d'aquesta pàgina no són a la vostra zona horària local, sinó a la zona horària del servidor. Box=Panell Boxes=Panells @@ -141,23 +142,23 @@ MaxNbOfLinesForBoxes=Màx. nombre de línies pels panells AllWidgetsWereEnabled=Tots els widgets disponibles estan habilitats PositionByDefault=Posició per defecte Position=Lloc -MenusDesc=Els gestors de menú defineixen el contingut de les dos barres de menú (horitzontal i vertical) -MenusEditorDesc=L'editor de menús permet definir entrades a mida. S'ha d'emprar amb cura per evitar introduir entrades que no siguin no portin enlloc. <br>Alguns mòduls afegeixen entrades de menú (normalment a <b>Tots</b>). Si per error elimineu cap d'aquestes entrades de menú, podeu restablir-les desactivant i tornant a activar el mòdul. +MenusDesc=Els gestors de menú configuren el contingut de les dues barres de menú (horitzontal i vertical). +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, ...) System=Sistema SystemInfo=Informació del sistema SystemToolsArea=Àrea utilitats del sistema -SystemToolsAreaDesc=Aquesta àrea proporciona funcions d'administració. Utilitza el menú per triar la funció necessària. +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=Elimineu tots els fitxers temporals (no hi ha risc de perdre dades). Nota: La supressió només es fa si el directori temporal es va crear fa 24 hores. -PurgeDeleteTemporaryFilesShort=Elimina els fitxers temporals -PurgeDeleteAllFilesInDocumentsDir=Elimineu tots els arxius del directori: <b> %s </b>. <br> Això esborrarà tots documents generats i relacionats amb els elements (Tercers, factures etc ...), arxius carregats al mòdul ECM, còpies de seguretat de la Base de Dades, paperera i arxius temporals. +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. +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 -PurgeNothingToDelete=No hi ha carpeta o fitxers per esborrar. +PurgeNothingToDelete=No hi ha cap directori ni fitxers per a suprimir. PurgeNDirectoriesDeleted=<b>%s</b> arxius o carpetes eliminats PurgeNDirectoriesFailed=No s'han pogut eliminar <b>%s</b> fitxers o directoris. PurgeAuditEvents=Purgar els esdeveniments de seguretat @@ -172,14 +173,14 @@ YouCanDownloadBackupFile=Ara es pot descarregar el fitxer generat NoBackupFileAvailable=Cap còpia disponible ExportMethod=Mètode d'exportació ImportMethod=Mètode d'importació -ToBuildBackupFileClickHere=Per crear una còpia, feu clic <a href="%s">aquí</a>. +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: ImportMySqlCommand=%s %s < elmeuarxiubackup.sql ImportPostgreSqlCommand=%s %s elmeuarxiubackup.sql FileNameToGenerate=Nom del fitxer de còpia de seguretat: Compression=Compressió -CommandsToDisableForeignKeysForImport=Comanda per desactivar les claus excloents a la importació +CommandsToDisableForeignKeysForImport=Comanda per a desactivar les claus forànies 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 @@ -201,15 +202,15 @@ IgnoreDuplicateRecords=Ignorar errors de registres duplicats (INSERT IGNORE) AutoDetectLang=Autodetecta (idioma del navegador) FeatureDisabledInDemo=Opció deshabilitada en demo FeatureAvailableOnlyOnStable=Funcionalitat disponible únicament en versions estables oficials -BoxesDesc=Els panells són components que mostren algunes dades que poden afegir-se per personalitzar algunes pàgines. Pots triar entre mostrar el panell o no seleccionant la pàgina de destí i fent clic a 'Activar', o fent clic en la paperera per desactivar. +BoxesDesc=Els panells són components que mostren algunes dades que poden afegir-se per a personalitzar algunes pàgines. Pots triar entre mostrar el panell o no seleccionant la pàgina de destí i fent clic a 'Activar', o fent clic en la paperera per a desactivar. OnlyActiveElementsAreShown=Només els elements de <a href="%s"> mòduls activats</a> són mostrats ModulesDesc=Els mòduls/aplicacions determinen quines funcions estan disponibles al programari. Alguns mòduls requereixen que es concedeixin permisos als usuaris després d'activar-lo. Feu clic al botó d'encesa/apagada <span class="small valignmiddle">%s</span> de cada mòdul per a habilitar o desactivar un mòdul/aplicació. -ModulesMarketPlaceDesc=Pots trobar més mòduls per descarregar en pàgines web externes per internet... -ModulesDeployDesc=Si els permisos del vostre sistema de fitxers ho permeten, podeu utilitzar aquesta eina per desplegar un mòdul extern. El mòdul serà visible a la pestanya <strong> %s </strong>. +ModulesMarketPlaceDesc=A internet podeu trobar més mòduls per a descarregar en pàgines web externes... +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 -DOLISTOREdescriptionLong=En lloc d'anar al lloc web <a href="https://www.dolistore.com">www.dolistore.com</a> per 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)... +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 @@ -220,11 +221,11 @@ SeeSetupOfModule=Vegi la configuració del mòdul %s Updated=Actualitzat Nouveauté=Novetat AchatTelechargement=Comprar / Descarregar -GoModuleSetupArea=Per desplegar / instal·lar un nou mòdul, aneu a l'àrea de configuració del mòdul: <a href="%s"> %s </a>. +GoModuleSetupArea=Per a desplegar/instal·lar un mòdul nou, aneu a l'àrea de configuració del mòdul: <a href="%s"> %s </a>. DoliStoreDesc=DoliStore, el lloc oficial de mòduls complementaris per Dolibarr ERP / CRM DoliPartnersDesc=Llista d’empreses que ofereixen mòduls o funcions desenvolupades a mida. <br> Nota: ja que Dolibarr és una aplicació de codi obert, <i> qualsevol usuari </i> experimentat en la programació PHP hauria de poder desenvolupar un mòdul. WebSiteDesc=Llocs web de referència per a trobar més mòduls (no core)... -DevelopYourModuleDesc=Algunes solucions per desenvolupar el vostre propi mòdul... +DevelopYourModuleDesc=Algunes solucions per a desenvolupar el vostre propi mòdul... URL=URL RelativeURL=URL relativa BoxesAvailable=Panells disponibles @@ -239,10 +240,10 @@ Security=Seguretat Passwords=Contrasenyes DoNotStoreClearPassword=Encripta les contrasenyes emmagatzemades a la base de dades (NO com a text sense format). Es recomana activar aquesta opció. MainDbPasswordFileConfEncrypted=Encriptar la contrasenya de la base de dades emmagatzemada a conf.php. Es recomana activar aquesta opció. -InstrucToEncodePass=Per tenir la contrasenya encriptada al fitxer <b>conf.php</b> reemplaça la línia<br><b>$dolibarr_main_db_pass="...";</b><br>per<br><b>$dolibarr_main_db_pass="crypted:%s";</b> -InstrucToClearPass=Per tenir la contrasenya descodificada en el fitxer de configuració <b> conf.php </b>, reemplaça en aquest fitxer la línia <br><b>$dolibarr_main_db_pass="crypted:..."</b><br> per <br><b>$dolibarr_main_db_pass="%s"</b> +InstrucToEncodePass=Per a tenir la contrasenya codificada al fitxer <b>conf.php</b>, substituïu la línia <br> <b> $ dolibarr_main_db_pass="...";</b><br>per<br><b> $dolibarr_main_db_pass = "xifrat:%s";</b> +InstrucToClearPass=Per a tenir la contrasenya descodificada en el fitxer de configuració <b>conf.php</b>, reemplaça en aquest fitxer la línia <br><b>$dolibarr_main_db_pass="crypted:...";</b><br>per<br><b>$dolibarr_main_db_pass="%s";</b> ProtectAndEncryptPdfFiles=Protegeix els fitxers PDF generats. Això NO es recomana ja que trenca la generació massiva de PDF. -ProtectAndEncryptPdfFilesDesc=La protecció d'un document PDF el manté disponible per llegir i imprimir amb qualsevol navegador PDF. No obstant això, l'edició i la còpia ja no és possible. Tingues en compte que l'ús d'aquesta característica fa que la construcció d'un arxiu PDF fusionat global no funcioni. +ProtectAndEncryptPdfFilesDesc=La protecció d’un document PDF el manté disponible per a llegir i imprimir amb qualsevol navegador PDF. Tanmateix, ja no és possible editar ni copiar. Tingueu en compte que l'ús d'aquesta funció fa que la creació d'un PDF combinat global no funcioni. Feature=Funció DolibarrLicense=Llicència Developpers=Desenvolupadors/col·laboradors @@ -256,19 +257,20 @@ ReferencedPreferredPartners=Soci preferent OtherResources=Altres recursos ExternalResources=Recursos externs SocialNetworks=Xarxes socials +SocialNetworkId=Identificador de la xarxa social ForDocumentationSeeWiki=Per a la documentació d'usuari, desenvolupador o Preguntes Freqüents (FAQ), consulteu el wiki Dolibarr: <br><b><a href="%s" target="_blank">%s</a></b> ForAnswersSeeForum=Per altres qüestions o realitzar les seves pròpies consultes, pot utilitzar el fòrum Dolibarr: <br><b><a href="%s" target="_blank">%s</a></b> -HelpCenterDesc1=Aquests són alguns recursos per obtenir ajuda i suport amb Dolibarr. +HelpCenterDesc1=Aquests són alguns recursos per a obtenir ajuda i suport amb Dolibarr. HelpCenterDesc2=Alguns d'aquests serveis només estan disponibles en <b>anglès</b>. CurrentMenuHandler=Gestor de menú MeasuringUnit=Unitat de mesura -LeftMargin=Marge esquerra +LeftMargin=Marge esquerre TopMargin=Marge superior PaperSize=Tipus de paper Orientation=Orientació SpaceX=Àrea X SpaceY=Àrea Y -FontSize=Tamany de font +FontSize=Mida de la font Content=Contingut NoticePeriod=Preavís NewByMonth=Nou per mes @@ -326,13 +328,13 @@ MenuHandlers=Gestors de menú MenuAdmin=Editor de menú DoNotUseInProduction=No utilitzar en producció ThisIsProcessToFollow=Procediment d'actualització: -ThisIsAlternativeProcessToFollow=Aquesta és una configuració alternativa per processar manualment: +ThisIsAlternativeProcessToFollow=Aquesta és una configuració alternativa per a processar manualment: StepNb=Pas %s FindPackageFromWebSite=Cerca un paquet que proporcioni les funcions que necessites (per exemple, al lloc web oficial %s). 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 instal·lar un mòdul extern, descomprimir l'arxiu en el directori del servidor dedicat als mòduls: <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 configurar els mòduls: <a href="%s">%s</a>. +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>. 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 "#". @@ -345,7 +347,7 @@ 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 utilitzar els primers mesos de l'any fiscal definits a la configuració o 99 per 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> +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> GenericMaskCodes3=Qualsevol altre caràcter a la màscara es quedarà sense canvis. <br> No es permeten espais<br> GenericMaskCodes4a=<u>Exemple en el 99 %s del tercer L'Empresa, amb data 31/01/2007:</u><br> @@ -358,16 +360,16 @@ ServerNotAvailableOnIPOrPort=Servidor no disponible en l'adreça <b>%s</b> al po DoTestServerAvailability=Provar la connexió amb el servidor DoTestSend=Provar enviament DoTestSendHTML=Prova l'enviament HTML -ErrorCantUseRazIfNoYearInMask=Error: no pot utilitzar l'opció @ per reiniciar el comptador cada any si la seqüencia {yy} o {yyyy} no es troba a la mascara +ErrorCantUseRazIfNoYearInMask=Error, no es pot utilitzar l'opció @ per a restablir el comptador cada any si la seqüència {yy} o {yyyy} no està emmascarada. 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ó UseACacheDelay= Demora en memòria cau de l'exportació en segons (0 o buit sense memòria) -DisableLinkToHelpCenter=Amagar l'enllaç "Necessita suport o ajuda" a la pàgina de login +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>" AddCRIfTooLong=No hi ha cap tall de text automàtic, el text massa llarg no es mostrarà als documents. Si cal, afegiu devolucions de carro a l'àrea de text. -ConfirmPurge=Estàs segur de voler realitzar aquesta purga? <br> Això esborrarà definitivament totes les dades dels seus fitxers (àrea GED, arxius adjunts etc.). +ConfirmPurge=Esteu segur que voleu executar aquesta purga? <br>Això suprimirà permanentment tots els fitxers de dades sense opció de restaurar-los (fitxers del GED, fitxers adjunts...). MinLength=Longitud mínima LanguageFilesCachedIntoShmopSharedMemory=arxius .lang en memòria compartida LanguageFile=Fitxer d'idioma @@ -375,12 +377,12 @@ 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>. NumberOfModelFilesFound=Nombre d'arxius de plantilles ODT/ODS trobats en aquest(s) directori(s) -ExampleOfDirectoriesForModelGen=Exemples de sintaxi:<br>c:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +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: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Crear_un_modelo_de_documento_ODT FirstnameNamePosition=Posició del Nom/Cognoms DescWeather=Les imatges següents es mostraran al tauler de control quan el nombre d'accions posteriors arriba als valors següents: -KeyForWebServicesAccess=Clau per utilitzar els Web Services (paràmetre "dolibarrkey" en els webservices) +KeyForWebServicesAccess=Clau per a utilitzar els serveis web (paràmetre "dolibarrkey" als serveis web) TestSubmitForm=Formulari de proves ThisForceAlsoTheme=L’ús d’aquest gestor de menús també farà servir el seu propi tema sigui quina sigui l’opció de l’usuari. A més, aquest gestor de menú especialitzat per a telèfons intel·ligents no funciona en tots els telèfons intel·ligents. Utilitzeu un altre gestor de menús si teniu problemes amb el vostre. ThemeDir=Directori dels temes @@ -388,7 +390,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 encriptar urls +SecurityToken=Clau per a protegir les 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 @@ -406,7 +408,7 @@ 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 -ButtonHideUnauthorized=Amaga els botons a usuaris no administradors per accions no autoritzades enlloc de mostrar-los en gris deshabilitats +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 PriceBaseTypeToChange=Canviar el preu on la referència de base és @@ -435,23 +437,23 @@ ExtrafieldCheckBox=Caselles de selecció ExtrafieldCheckBoxFromList=Caselles de selecció des d'una taula ExtrafieldLink=Enllaç a un objecte ComputedFormula=Camp calculat -ComputedFormulaDesc=Podeu introduir aquí una fórmula utilitzant altres propietats de l’objecte o qualsevol codi PHP per obtenir un valor calculat dinàmicament. Podeu utilitzar qualsevol fórmula compatible amb PHP, inclòs l'operador condicional "?" i els següents objectes globals: <strong> $db, $conf, $langs, $mysoc, $user, $object </strong>. <br> <strong> ATENCIÓ </strong>: Només poden estar disponibles algunes propietats de $object. Si necessiteu una propietat no carregada, només cal que incorporeu l'objecte a la vostra fórmula com en el segon exemple. <br> Utilitzar un camp calculat implica que no podreu introduir cap valor des de la interfície. A més, si hi ha un error de sintaxi, la fórmula pot no tornar res. <br> <br> Exemple 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> Exemple per tornar a carregar l'objecte <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 altre exemple de fórmula per forçar la càrrega de l'objecte i el seu objecte pare: <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' +ComputedFormulaDesc=Podeu introduir aquí una fórmula utilitzant altres propietats de l’objecte o qualsevol codi PHP per a obtenir un valor calculat dinàmicament. Podeu utilitzar qualsevol fórmula compatible amb PHP, inclòs l'operador condicional «?» i els següents objectes globals: <strong>$db, $conf, $langs, $mysoc, $user, $object</strong>. <br><strong>ATENCIÓ</strong>: Només poden estar disponibles algunes propietats de $object. Si necessiteu una propietat no carregada, només cal que incorporeu l'objecte a la vostra fórmula com en el segon exemple. <br> Utilitzar un camp calculat implica que no podreu introduir cap valor des de la interfície. A més, si hi ha un error de sintaxi, la fórmula pot no tornar res. <br> <br> Exemple 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> Exemple per a tornar a carregar l'objecte <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 altre exemple de fórmula per a forçar la càrrega de l'objecte i el seu objecte pare: <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=Emmagatzemar el camp computat -ComputedpersistentDesc=Els camps addicionals computats s’emmagatzemaran a la base de dades, però, el valor només es tornarà a calcular quan l’objecte d’aquest camp s’ha canviat. Si el camp calculat depèn d'altres objectes o dades globals, aquest valor podria estar equivocat !! -ExtrafieldParamHelpPassword=Mantenir aquest camp buit significa que el valor s'emmagatzema sense xifrar (el camp només ha d'estar amagat amb una estrella sobre la pantalla). <br> Establiu aquí el valor 'auto' per utilitzar la regla de xifrat per defecte per guardar la contrasenya a la base de dades (el valor llegit serà només el "hash", no hi haurà cap manera de recuperar el valor original) -ExtrafieldParamHelpselect=La llista de valors ha de ser un conjunt de línies amb un par del tipus clau,valor (on la clau no pot ser '0') <br><br> per exemple : <br>clau1,valor1<br>clau2,valor2<br>clau3,valor3<br>...<br><br>Per 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 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 (a 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 (a 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 mostrar només els valors actius<br>També pots utilitzar $ID$ al filtre per representar el ID de l'actual objecte en curs<br>Per utilitzar un SELECT al filtre, utilitzeu la paraula clau $SEL$ per evitar la protecció antiinjecció.<br>Si vols filtrar camps addicionals utilitza la sintaxi extra.nom_camp=... (on nom_camp és el codi del camp addicional)<br><br>Per 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 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 mostrar només el valor actiu <br> També podeu utilitzar $ID$ en el filtre per 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 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 tenir la llista depenent d'una altra llista: c_typent:libelle:id:<i>codi_llista_pare</i>|parent_column:filter +ComputedpersistentDesc=Els camps addicionals calculats s’emmagatzemaran a la base de dades, però el valor només es recalcularà quan es canviï l’objecte d’aquest camp. Si el camp calculat depèn d'altres objectes o dades globals, aquest valor pot ser incorrecte!! +ExtrafieldParamHelpPassword=Mantenir aquest camp buit significa que el valor s'emmagatzema sense xifrar (el camp només ha d'estar amagat amb una estrella sobre la pantalla). <br> Establiu aquí el valor 'auto' per a utilitzar la regla de xifrat per defecte per a guardar la contrasenya a la base de dades (el valor llegit serà només el "hash", no hi haurà cap manera de recuperar el valor original) +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 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 generar PDF +LibraryToBuildPDF=Llibreria utilitzada per a la generació de PDF LocalTaxDesc=Alguns països apliquen 2 o 3 impostos en cada línia de factura. Si aquest és el cas, escull el tipus pel segon i el tercer impost i el seu valor. Els tipus possibles són: <br>1: impostos locals aplicats en productes i serveis sense IVA (l'impost local serà calculat en el total sense impostos)<br>2: impost local aplicat en productes i serveis amb IVA (l'impost local serà calculat amb el total + l'impost principal)<br>3: impost local aplicat en productes sense IVA (l'impost local serà calculat en el total sense impost)<br>4: impost local aplicat en productes amb IVA (l'impost local serà calculat amb el total + l'impost principal)<br>5: impost local aplicat en serveis sense IVA (l'impost local serà calculat amb el total sense impost)<br>6: impost local aplicat en serveis amb IVA inclòs (l'impost local serà calculat amb el total + IVA) SMS=SMS -LinkToTestClickToDial=Introduïu un número de telèfon que voleu marcar per provar l'enllaç de crida ClickToDial per a l'usuari <strong>%s</strong> +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ç seleccionable per l'usuari <strong>%s</strong> (feu clic al número per provar) +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 KeepThisEmptyInMostCases=En la majoria dels casos, pots deixar aquest camp buit. DefaultLink=Enllaç per defecte @@ -467,22 +469,22 @@ EraseAllCurrentBarCode=Esborrar tots els valors de codi de barres actuals ConfirmEraseAllCurrentBarCode=Esteu segur que voleu esborrar tots els valors de codis de barres actuals? AllBarcodeReset=S'han eliminat tots els valors de codi de barres NoBarcodeNumberingTemplateDefined=No hi ha cap plantilla de codi de barres habilitada a la configuració del mòdul de codi de barres. -EnableFileCache=Habilita la caché de fitxers +EnableFileCache=Activa la memòria cau de fitxers ShowDetailsInPDFPageFoot=Afegiu més detalls al peu de pàgina, com ara l'adreça de l'empresa o els noms dels gestors (a més d'identificadors professionals, capital de l'empresa i número de NIF/CIF). NoDetails=No hi ha detalls addicionals al peu de pàgina DisplayCompanyInfo=Mostra l'adreça de l'empresa DisplayCompanyManagers=Mostra el gestor de noms DisplayCompanyInfoAndManagers=Mostra l'adreça de l'empresa i els noms de la persona gestora EnableAndSetupModuleCron=Si voleu que aquesta factura periòdica es generi automàticament, el mòdul * %s * s’ha d’habilitar i configurar correctament. En cas contrari, la generació de factures s’ha de fer manualment des d’aquesta plantilla mitjançant el botó *Crea*. Tingueu en compte que, fins i tot si heu activat la generació automàtica, encara podeu iniciar la generació manual amb seguretat. No es pot generar duplicats per al mateix període. -ModuleCompanyCodeCustomerAquarium=%s seguit de codi de client de tercers per obtenir un codi de comptabilitat de clients +ModuleCompanyCodeCustomerAquarium=%s seguit del codi de client per a un codi comptable de client ModuleCompanyCodeSupplierAquarium=%s seguit del codi de proveïdor per a un codi de comptabilitat del proveïdor 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 aprovar. Noteu que si un usuari te permisos tant per crear com per 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 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). UseDoubleApproval=Utilitza una aprovació en 3 passos quan l'import (sense impostos) sigui més gran que... -WarningPHPMail=ADVERTÈNCIA: la configuració per 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 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: +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. @@ -492,7 +494,7 @@ WarningPHPMailSPF=Si el nom de domini de l’adreça de correu electrònic del r ClickToShowDescription=Clica per 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 llegir el contingut de la pàgina HTML per a obtenir el nom clau d’un camp. +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> @@ -502,11 +504,11 @@ 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. Field=Camp -ProductDocumentTemplates=Plantilles de documents per generar document de producte +ProductDocumentTemplates=Plantilles de documents per a generar document de producte FreeLegalTextOnExpenseReports=Text legal lliure en informes de despeses WatermarkOnDraftExpenseReports=Marca d'aigua en informes de despeses esborrany AttachMainDocByDefault=Establiu-lo a 1 si voleu adjuntar el document principal al correu electrònic de manera predeterminada (si escau) -FilesAttachedToEmail=Adjuntar fitxer +FilesAttachedToEmail=Adjunta el fitxer SendEmailsReminders=Enviar recordatoris d'agenda per correu electrònic davDescription=Configura un servidor WebDAV DAVSetup=Configuració del mòdul DAV @@ -566,7 +568,7 @@ Module70Desc=Gestió de intervencions Module75Name=Notes de despeses i desplaçaments Module75Desc=Gestió de les notes de despeses i desplaçaments Module80Name=Expedicions -Module80Desc=Enviaments i gestió de notes de lliurament +Module80Desc=Gestió d’enviaments i albarans Module85Name=Bancs i Efectiu Module85Desc=Gestió de comptes bancaris o efectiu Module100Name=Lloc extern @@ -615,11 +617,11 @@ Module1520Desc=Generació de documents de correu electrònic massiu Module1780Name=Etiquetes Module1780Desc=Crea etiquetes (productes, clients, proveïdors, contactes o socis) Module2000Name=Editor WYSIWYG -Module2000Desc=Permetre que els camps de text es puguin editar/formatejar amb CKEditor (html) -Module2200Name=Multi-preus +Module2000Desc=Permet editar/formatar els camps de text mitjançant CKEditor (html) +Module2200Name=Preus dinàmics Module2200Desc=Utilitza expressions matemàtiques per a la generació automàtica de preus Module2300Name=Tasques programades -Module2300Desc=Gestió de tasques programades (alias cron o taula chrono) +Module2300Desc=Gestió de tasques programades (àlies cron o taula de crons) Module2400Name=Esdeveniments/Agenda Module2400Desc=Seguiment d'esdeveniments. Registre d'esdeveniments automàtics per a fer el seguiment o registrar esdeveniments manuals o reunions. Aquest és el mòdul principal per a una bona gestió de la relació amb clients o proveïdors. Module2500Name=SGD / GCE @@ -641,10 +643,10 @@ Module4000Name=RRHH Module4000Desc=Gestió de recursos humans (gestionar departaments, empleats, contractes i "feelings") Module5000Name=Multi-empresa Module5000Desc=Permet gestionar diverses empreses -Module6000Name=Workflow +Module6000Name=Flux de treball Module6000Desc=Gestió del flux de treball (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 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 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. 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 @@ -652,15 +654,15 @@ Module39000Desc=Lots, números de sèrie, gestió de data de comerç / venda per Module40000Name=Multidivisa Module40000Desc=Utilitza divises alternatives en preus i documents Module50000Name=PayBox -Module50000Desc=Oferiu als clients una pàgina de pagament en línia de PayBox (targetes de crèdit / dèbit). Això es pot utilitzar per permetre als vostres clients fer pagaments o pagaments ad hoc relacionats amb un objecte Dolibarr específic (factura, ordre, etc ...) +Module50000Desc=Oferiu als clients una pàgina de pagament en línia de PayBox (targetes de crèdit/dèbit). Es pot utilitzar per a permetre als vostres clients fer pagaments ad-hoc o pagaments relacionats amb un objecte Dolibarr específic (factura, comanda, etc.) Module50100Name=TPV SimplePOS Module50100Desc=Mòdul de punt de venda SimplePOS (TPV simple). Module50150Name=TPV TakePOS Module50150Desc=Mòdul de punt de venda TakePOS (TOS de pantalla tàctil, per a botigues, bars o restaurants). Module50200Name=Paypal -Module50200Desc=Ofereix als clients una pàgina de pagament en línia de PayPal (compte PayPal o targetes de crèdit / dèbit). Això es pot utilitzar per permetre als vostres clients fer pagaments o pagaments ad-hoc relacionats amb un objecte Dolibarr específic (factura, ordre, etc ...) +Module50200Desc=Oferiu als clients una pàgina de pagament en línia de PayPal (compte de PayPal o targetes de crèdit/dèbit). Es pot utilitzar per a permetre als vostres clients fer pagaments ad-hoc o pagaments relacionats amb un objecte Dolibarr específic (factura, comanda, etc.) Module50300Name=Stripe -Module50300Desc=Oferiu als clients una pàgina de pagament en línia de Stripe (targetes de crèdit / dèbit). Això es pot utilitzar per permetre als vostres clients fer pagaments o pagaments ad-hoc relacionats amb un objecte Dolibarr específic (factura, ordre, etc ...) +Module50300Desc=Oferiu als clients una pàgina de pagaments en línia de Stripe (targetes de crèdit/dèbit). Es pot utilitzar per a permetre als vostres clients fer pagaments ad-hoc o pagaments relacionats amb un objecte Dolibarr específic (factura, comanda, etc.) Module50400Name=Comptabilitat (doble entrada) Module50400Desc=Gestió comptable (entrades dobles, suport de comptabilitats generals i subsidiàries). Exporteu el llibre major en altres formats de programari de comptabilitat. Module54000Name=PrintIPP @@ -668,23 +670,23 @@ Module54000Desc=Impressió directa (sense obrir els documents) mitjançant la in Module55000Name=Enquesta o votació Module55000Desc=Creeu enquestes o vots en línia (com Doodle, Studs, RDVz, etc.) Module59000Name=Marges -Module59000Desc=Mòdul per gestionar els marges +Module59000Desc=Mòdul per a seguir els marges Module60000Name=Comissions -Module60000Desc=Mòdul per gestionar les comissions +Module60000Desc=Mòdul per a gestionar comissions Module62000Name=Incoterms -Module62000Desc=Afegir funcions per gestionar Incoterm +Module62000Desc=Afegeix funcions per a gestionar Incoterms Module63000Name=Recursos Module63000Desc=Gestiona els recursos (impressores, cotxes, habitacions...) que pots compartir en esdeveniments Permission11=Consulta factures de client Permission12=Crear/Modificar factures Permission13=Invalida les factures dels clients -Permission14=Validar factures +Permission14=Valida les factures dels clients Permission15=Envia factures per e-mail Permission16=Crear cobraments per factures de client Permission19=Elimina factures de client Permission21=Consulta pressupostos Permission22=Crear/modificar pressupostos -Permission24=Validar pressupostos +Permission24=Valida pressupostos Permission25=Envia pressupostos Permission26=Tancar pressupostos Permission27=Elimina pressupostos @@ -695,9 +697,9 @@ Permission34=Elimina productes Permission36=Veure/gestionar els productes ocults Permission38=Exportar productes Permission39=Ignora el preu mínim -Permission41=Llegir projectes i tasques (projectes compartits i projectes dels que sóc contacte). També pot introduir temps consumits, per a mi o els meus subordinats, en tasques assignades (Fulls de temps). -Permission42=Crea/modifica projectes (projectes compartits i projectes dels que sóc contacte). També pot crear tasques i assignar usuaris a projectes i tasques -Permission44=Elimina projectes (projectes compartits i projectes dels que en sóc contacte) +Permission41=Consulta projectes i tasques (projecte compartit i projectes dels qui en soc contacte). També pot introduir temps consumits, per a mi o dels meus subordinats, en tasques assignades (Fulls de temps). +Permission42=Crea/modifica projectes (projecte compartit i projectes dels qui en soc contacte). També pot crear tasques i assignar usuaris al projecte i tasques +Permission44=Elimina projectes (projecte compartit i projectes de qui en soc contacte) Permission45=Exporta projectes Permission61=Consulta intervencions Permission62=Crea/modifica intervencions @@ -742,9 +744,9 @@ Permission121=Consulta tercers enllaçats a usuaris Permission122=Crea/modifica tercers enllaçats a l'usuari Permission125=Elimina tercers enllaçats a l'usuari Permission126=Exporta tercers -Permission141=Consulta tots els projectes i tasques (també els projectes privats dels que no sóc contacte) -Permission142=Crea/modifica tots els projectes i tasques (també projectes privats dels que no sóc el contacte) -Permission144=Elimina tots els projectes i tasques (també els projectes privats dels que no sóc contacte) +Permission141=Consulta tots els projectes i tasques (també els projectes privats dels qui no en soc contacte) +Permission142=Crea/modifica tots els projectes i tasques (també projectes privats dels qui no en soc contacte) +Permission144=Elimina tots els projectes i tasques (també els projectes privats dels qui no en soc contacte) Permission146=Consulta proveïdors Permission147=Consulta estadístiques Permission151=Llegir domiciliacions @@ -833,7 +835,7 @@ Permission354=Eliminar o desactivar grups Permission358=Exportar usuaris Permission401=Consultar havers Permission402=Crear/modificar havers -Permission403=Validar havers +Permission403=Valida els descomptes Permission404=Eliminar havers Permission430=Utilitzeu la barra de depuració Permission511=Consulta els pagaments dels sous (vostres i subordinats) @@ -1047,14 +1049,14 @@ VATIsNotUsedExampleFR=A França, es tracta d'associacions que no siguin declarad TypeOfSaleTaxes=Tipus d’impost sobre vendes LTRate=Tarifa LocalTax1IsNotUsed=No subjecte -LocalTax1IsUsedDesc=Utilitzar un 2on tipus d'impost (diferent de l'IVA) -LocalTax1IsNotUsedDesc=No utilitzar un 2on tipus d'impost (diferent de l'IVA) +LocalTax1IsUsedDesc=Utilitza un 2n tipus d'impost (diferent de l'IVA) +LocalTax1IsNotUsedDesc=No utilitzis un 2n tipus d’impost (diferent de l'IVA) LocalTax1Management=2n tipus d'impost LocalTax1IsUsedExample= LocalTax1IsNotUsedExample= LocalTax2IsNotUsed=No subjecte -LocalTax2IsUsedDesc=Utilitzar un 3er tipus d'impost (diferent de l'IVA) -LocalTax2IsNotUsedDesc=No utilitzar un 3er tipus d'impost (diferent de l'IVA) +LocalTax2IsUsedDesc=Utilitza un 3r tipus d'impost (diferent de l'IVA) +LocalTax2IsNotUsedDesc=No utilitzis un 3r tipus d'impost (diferent de l'IVA) LocalTax2Management=3r tipus d'impost LocalTax2IsUsedExample= LocalTax2IsNotUsedExample= @@ -1084,7 +1086,7 @@ LabelOnDocuments=Etiqueta sobre documents LabelOrTranslationKey=Clau de traducció o cadena ValueOfConstantKey=Valor d’una constant de configuració ConstantIsOn=L'opció %s està activada -NbOfDays=Nº de dies +NbOfDays=Nombre de dies AtEndOfMonth=A final de mes CurrentNext=Actual/Següent Offset=Decàleg @@ -1094,7 +1096,7 @@ MenuUpgrade=Actualització / Extensió AddExtensionThemeModuleOrOther=Instal·lar mòduls/complements externs WebServer=Servidor web DocumentRootServer=Carpeta arrel de les pàgines web -DataRootServer=Carpeta arrel dels arxius de dades +DataRootServer=Directori de fitxers de dades IP=IP Port=Port VirtualServerName=Nom del servidor virtual @@ -1105,11 +1107,11 @@ Database=Base de dades DatabaseServer=Host de la base de dades DatabaseName=Nom de la base de dades DatabasePort=Port de la base de dades -DatabaseUser=Login de la base de dades +DatabaseUser=Usuari de la base de dades DatabasePassword=Contrasenya de la base de dades Tables=Taules TableName=Nom de la taula -NbOfRecord=Nº de registres +NbOfRecord=Nombre de registres Host=Servidor DriverType=Tipus de driver SummarySystem=Resum de la informació de sistemes Dolibarr @@ -1123,8 +1125,8 @@ MaxSizeList=Longitud màxima per llistats DefaultMaxSizeList=Longitud màxima per defecte per a les llistes DefaultMaxSizeShortList=Longitud màxima per defecte en llistes curtes (per exemple, en la fitxa de client) MessageOfDay=Missatge del dia -MessageLogin=Missatge del login -LoginPage=Pàgina de login +MessageLogin=Missatge en la pàgina d'inici de sessió +LoginPage=Pàgina d'inici de sessió BackgroundImageLogin=Imatge de fons PermanentLeftSearchForm=Zona de recerca permanent del menú de l'esquerra DefaultLanguage=Idioma per defecte @@ -1166,11 +1168,11 @@ Delays_MAIN_DELAY_CUSTOMER_BILLS_UNPAYED=Factura del client no pagada Delays_MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE=Conciliació bancària pendent Delays_MAIN_DELAY_MEMBERS=Quota de membre retardada Delays_MAIN_DELAY_CHEQUES_TO_DEPOSIT=Ingrés de xec no realitzat -Delays_MAIN_DELAY_EXPENSEREPORTS=Informe de despeses per aprovar +Delays_MAIN_DELAY_EXPENSEREPORTS=Informe de despeses per a aprovar Delays_MAIN_DELAY_HOLIDAYS=Dies lliures a aprovar SetupDescription1=Abans de començar a utilitzar Dolibarr cal definir alguns paràmetres inicials i habilitar/configurar els mòduls. SetupDescription2=Les dues seccions següents són obligatòries (les dues primeres entrades al menú Configuració): -SetupDescription3= <a href="%s"> %s -> %s </a> <br> <br> Paràmetres bàsics utilitzats per personalitzar el comportament predeterminat de la teva aplicació (per exemple, per a les funcions relacionades amb el país). +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 @@ -1201,12 +1203,12 @@ 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 triggers són arxius que modifiquen el comportament del fluxe de treball de Dolibarr un cop s'han copiat a la carpeta <b>htdocs/core/triggers</b>. Realitzen noves accions activades pels esdeveniments de Dolibarr (creació d'empresa, validació factura, ...). +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 TriggerActiveAsModuleActive=Triggers d'aquest arxiu actius ja que el mòdul <b>%s</b> està activat -GeneratedPasswordDesc=Trieu el mètode que s'utilitzarà per a les contrasenyes auto-generades. +GeneratedPasswordDesc=Trieu el mètode que s'utilitzarà per a les contrasenyes generades automàticament. DictionaryDesc=Afegeix totes les dades de referència. Pots afegir els teus valors per defecte. ConstDesc=Aquesta pàgina permet editar (anul·lar) paràmetres no disponibles en altres pàgines. Aquests són paràmetres reservats només per a desenvolupadors o solucions avançades de problemes. MiscellaneousDesc=Aquí es defineixen la resta de paràmetres relacionats amb la seguretat. @@ -1222,15 +1224,15 @@ ParameterActiveForNextInputOnly=Paràmetre efectiu només a partir de les proper NoEventOrNoAuditSetup=No s'ha registrat cap esdeveniment de seguretat. Això és normal si l'auditoria no s'ha activat a la pàgina "Configuració - Seguretat - Esdeveniments". NoEventFoundWithCriteria=No s'han trobat esdeveniments de seguretat per a aquests criteris de cerca. SeeLocalSendMailSetup=Veure la configuració local de sendmail -BackupDesc=Una còpia de seguretat <b> completa de </b> d'una instal·lació de Dolibarr requereix dos passos. +BackupDesc=Una còpia de seguretat <b>completa</b> d'una instal·lació Dolibarr requereix dos passos. BackupDesc2=Feu una còpia de seguretat del contingut del directori "documents" (<b> %s </b>) que conté tots els fitxers carregats i generats. Això també inclourà tots els fitxers d'escombraries generats al pas 1. Aquesta operació pot tardar uns minuts BackupDesc3=Feu una còpia de seguretat de l'estructura i continguts de la vostra base de dades (<b> %s </b>) en un arxiu de bolcat. Per això, podeu utilitzar el següent assistent. BackupDescX=La carpeta arxivada haurà de guardar-se en un lloc segur BackupDescY=L'arxiu de bolcat generat haurà de guardar-se en un lloc segur. BackupPHPWarning=La còpia de seguretat no pot ser garantida amb aquest mètode. És preferible utilitzar l'anterior -RestoreDesc=Per restaurar una còpia de seguretat de Dolibarr, calen dos passos. +RestoreDesc=Per a restaurar una còpia de seguretat de Dolibarr, calen dos passos. RestoreDesc2=Restaura el fitxer de còpia de seguretat (fitxer zip, per exemple) del directori "documents" a una nova instal·lació de Dolibarr o en aquest directori de documents actual (<b> %s </b>). -RestoreDesc3=Restaura l'estructura i les dades de la base de dades des d'un fitxer d'emmagatzematge de seguretat a la base de dades de la nova instal·lació de Dolibarr o bé a la base de dades d'aquesta instal·lació actual (<b> %s </b>). Avís, un cop finalitzada la restauració, haureu d'utilitzar un inici de sessió / contrasenya, que existia des de la còpia de seguretat / instal·lació per tornar a connectar-se. <br> Per restaurar una base de dades de còpia de seguretat en aquesta instal·lació actual, podeu seguir aquest assistent. +RestoreDesc3=Restaura l'estructura i les dades de la base de dades des d'un fitxer d'emmagatzematge de seguretat a la base de dades de la nova instal·lació de Dolibarr o bé a la base de dades d'aquesta instal·lació actual (<b> %s </b>). Avís, un cop finalitzada la restauració, haureu d'utilitzar un usuari/contrasenya, que existia en el moment de la còpia de seguretat per a tornar a connectar-se. <br> Per a restaurar una base de dades de còpia de seguretat en aquesta instal·lació actual, podeu seguir aquest assistent. RestoreMySQL=Importació MySQL ForcedToByAModule=Aquesta regla està forçada a <b>%s</b> per un dels mòduls activats ValueIsForcedBySystem=Aquest valor és forçat pel sistema. No es pot canviar. @@ -1240,7 +1242,7 @@ WeekStartOnDay=Primer dia de la setmana RunningUpdateProcessMayBeRequired=Sembla que cal executar el procés d’actualització (la versió del programa %s és diferent de la versió de la base de dades %s) 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 descarregar +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 ShowProfIdInAddress=Mostra l'identificador professional amb adreces ShowVATIntaInAddress=Amaga el número d'IVA intracomunitari amb adreces @@ -1250,7 +1252,7 @@ MeteoStdMod=Mode estàndard MeteoStdModEnabled=Mode estàndard habilitat MeteoPercentageMod=Mode percentual MeteoPercentageModEnabled=Mode de percentatge activat -MeteoUseMod=Feu clic per utilitzar %s +MeteoUseMod=Feu clic per a utilitzar %s TestLoginToAPI=Comprovar connexió a l'API ProxyDesc=Algunes característiques de Dolibarr requereixen accés a Internet. Definiu aquí els paràmetres de connexió a Internet, com ara l'accés a través d'un servidor proxy, si és necessari. ExternalAccess=Accés extern / accés a Internet @@ -1276,12 +1278,12 @@ ExtraFieldsSupplierInvoices=Atributs complementaris (factures) ExtraFieldsProject=Atributs complementaris (projectes) ExtraFieldsProjectTask=Atributs complementaris (tasques) ExtraFieldsSalaries=Atributs complementaris (sous) -ExtraFieldHasWrongValue=L'atribut %s té un valor no valid +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>. PathToDocuments=Rutes d'accés a documents PathDirectory=Catàleg -SendmailOptionMayHurtBuggedMTA=La característica per 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 rebuts. El resultat és que alguns usuaris no poden llegir alguns mails d'aquestes plataformes falses. 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ò amb el servidor de correu rebedor. Tanmateix, podeu afegir una opció MAIN_FIX_FOR_BUGGED_MTA a 1 en la instal·lació: una altra per modificar Dolibarr per evitar-ho. Tanmateix, pot tenir problemes amb altres servidors que utilitzin estrictament l'estàndard SMTP. L'altra solució (recomanada) és utilitzar el mètode "biblioteca de sockets SMTP" que no té cap desavantatge. +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. TranslationSetup=Configuració de traducció TranslationKeySearch=Cerca una clau o cadena de traducció TranslationOverwriteKey=Sobreescriu una cadena de traducció @@ -1306,7 +1308,7 @@ YouUseBestDriver=Utilitzeu el controlador %s, que és el millor controlador disp YouDoNotUseBestDriver=S'utilitza el controlador %s, però es recomana utilitzar el controlador %s. NbOfObjectIsLowerThanNoPb=Només teniu %s %s a la base de dades. Això no requereix cap optimització particular. SearchOptim=Cerca optimització -YouHaveXObjectUseSearchOptim=Teniu %s %s a la base de dades. Hauríeu d’afegir la constant %s a 1 a Home-Setup-Other. Limiteu la cerca a l'inici de cadenes, cosa que permet que la base de dades utilitzeu índexs i haureu d'obtenir una resposta immediata. +YouHaveXObjectUseSearchOptim=Teniu %s %s a la base de dades. Podeu afegir la constant %s a 1 a Inici-Configuració-Altres. Limiteu la cerca al començament de les cadenes, cosa que fa possible que la base de dades utilitzi índexs i hauríeu d'obtenir una resposta immediata. YouHaveXObjectAndSearchOptimOn=Teniu %s %s a la base de dades i %s constant es configura com a 1 a Home-Setup-Other. BrowserIsOK=Esteu utilitzant el navegador web %s. Aquest navegador està bé per a la seguretat i el rendiment. 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. @@ -1324,8 +1326,8 @@ DocumentModules=Models de documents ##### Module password generation PasswordGenerationStandard=Retorna una contrasenya generada segons l'algorisme intern de Dolibarr: %s caràcters amb barreja de números i caràcters en minúscula. PasswordGenerationNone=No suggereixis una contrasenya generada. La contrasenya s'ha d'escriure manualment. -PasswordGenerationPerso=Retorna una contrasenya d'acord a la seva configuració personalitzada. -SetupPerso=D'acord a la teva configuració +PasswordGenerationPerso=Retorna una contrasenya segons la vostra configuració personalitzada. +SetupPerso=Segons la vostra configuració PasswordPatternDesc=Descripció patró contrasenya ##### Users setup ##### RuleForGeneratedPasswords=Regles per a generar i validar contrasenyes @@ -1340,7 +1342,7 @@ HRMSetup=Configuració de mòdul de gestió de recursos humans ##### Company setup ##### CompanySetup=Configuració del mòdul empreses CompanyCodeChecker=Opcions per a la generació automàtica de codis de client / proveïdor -AccountCodeManager=Opcions per generar automàticament codis de comptabilitat de client / proveïdor +AccountCodeManager=Opcions per a la generació automàtica de comptes comptables de client/proveïdor NotificationsDesc=Les notificacions per correu electrònic es poden enviar automàticament per a alguns esdeveniments de Dolibarr. <br> Es poden definir els destinataris de les notificacions: NotificationsDescUser=* per usuari, un usuari alhora. NotificationsDescContact=* per contactes de tercers (clients o venedors), un contacte a la vegada. @@ -1388,8 +1390,8 @@ SupplierProposalNumberingModules=Models de numeració de sol·licitud de preus a SupplierProposalPDFModules=Models de documents de sol·licituds de preus a proveïdors FreeLegalTextOnSupplierProposal=Text lliure en sol·licituds de preus a proveïdors WatermarkOnDraftSupplierProposal=Marca d'aigua en sol·licituds de preus a proveïdors (en cas d'estar buit) -BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL=Preguntar per compte bancari per utilitzar en el pressupost -WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER=Preguntar per el magatzem d'origen per a la comanda +BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL=Demana el compte bancari a utilitzar en el pressupost +WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER=Demana pel magatzem d'origen per a la comanda ##### Suppliers Orders ##### BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER=Demana el compte bancari de destí de la comanda de compra ##### Orders ##### @@ -1399,8 +1401,8 @@ OrdersNumberingModules=Models de numeració de comandes OrdersModelModule=Models de documents de comandes FreeLegalTextOnOrders=Text lliure en comandes WatermarkOnDraftOrders=Marca d'aigua en comandes esborrany (en cas d'estar buit) -ShippableOrderIconInList=Afegir una icona en el llistat de comandes que indica si la comanda és enviable -BANK_ASK_PAYMENT_BANK_DURING_ORDER=Preguntar pel compte bancari a l'utilitzar la comanda +ShippableOrderIconInList=Afegeix una icona a la llista de comandes que indiqui si la comanda es pot enviar +BANK_ASK_PAYMENT_BANK_DURING_ORDER=Demana el compte bancari de destí en la comanda ##### Interventions ##### InterventionsSetup=Configuració del mòdul intervencions FreeLegalTextOnInterventions=Text addicional en les fitxes d'intervenció @@ -1499,11 +1501,11 @@ LDAPSetupForVersion3=Servidor LDAP configurat en versió 3 LDAPSetupForVersion2=Servidor LDAP configurat en versió 2 LDAPDolibarrMapping=Mapping Dolibarr LDAPLdapMapping=Mapping LDAP -LDAPFieldLoginUnix=Login (unix) +LDAPFieldLoginUnix=Nom d'usuari (unix) LDAPFieldLoginExample=Exemple: uid LDAPFilterConnection=Filtre de cerca LDAPFilterConnectionExample=Exemple: & (objectClass = inetOrgPerson) -LDAPFieldLoginSamba=Login (samba, activedirectory) +LDAPFieldLoginSamba=Nom d'usuari (samba, activedirectory) LDAPFieldLoginSambaExample=Exemple: samaccountname LDAPFieldFullname=Nom complet LDAPFieldFullnameExample=Exemple: cn @@ -1569,7 +1571,7 @@ 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. -MemcachedModuleAvailableButNotSetup=S'ha trobat el mòdul memcached per a la aplicació de memòria cau, però la configuració del mòdul no està completa. +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). @@ -1585,7 +1587,7 @@ CompressionOfResources=Compressió de les respostes HTTP CompressionOfResourcesDesc=Per exemple, utilitzant la directiva Apache "AddOutputFilterByType DEFLATE" TestNotPossibleWithCurrentBrowsers=La detecció automàtica no és possible amb els navegadors actuals DefaultValuesDesc=Aquí podeu definir el valor predeterminat que voleu utilitzar quan creeu un registre nou, i / o filtres predeterminats o l'ordre de classificació quan enumereu els registres. -DefaultCreateForm=Valors per defecte (per utilitzar-los en formularis) +DefaultCreateForm=Valors predeterminats (per a utilitzar en formularis) DefaultSearchFilters=Filtres de cerca per defecte DefaultSortOrder=Tipus d'ordenació per defecte DefaultFocus=Camps d'enfocament per defecte @@ -1596,8 +1598,13 @@ ServiceSetup=Configuració del mòdul Serveis ProductServiceSetup=Configuració dels mòduls Productes i Serveis NumberOfProductShowInSelect=Nombre màxim de productes que es mostraran a les llistes de selecció combo (0 = sense límit) ViewProductDescInFormAbility=Mostra les descripcions dels productes en els formularis (en cas contrari es mostra en una finestra emergent de suggeriments) +DoNotAddProductDescAtAddLines=No afegiu la descripció del producte (de la fitxa de producte) en afegir línies als formularis +OnProductSelectAddProductDesc=Com s'utilitza la descripció dels productes quan s'afegeix un producte com a línia d'un document +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 -ViewProductDescInThirdpartyLanguageAbility=Mostra les descripcions dels productes en l'idioma del tercer +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. 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 @@ -1617,7 +1624,7 @@ 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) SyslogFileNumberOfSaves=Nombre de registres de còpia de seguretat que cal conservar -ConfigureCleaningCronjobToSetFrequencyOfSaves=Configura la tasca programada de neteja per establir la freqüència de còpia de seguretat del registre +ConfigureCleaningCronjobToSetFrequencyOfSaves=Configureu la tasca programada de neteja per a establir la freqüència de còpia de seguretat del registre ##### Donations ##### DonationsSetup=Configuració del mòdul donacions DonationsReceiptModel=Plantilla de rebut de donació @@ -1657,8 +1664,8 @@ NotificationEMailFrom=Correu electrònic del remitent (des de) per als correus e FixedEmailTarget=Destinatari ##### Sendings ##### SendingsSetup=Configuració del mòdul d'enviament -SendingsReceiptModel=Model de rebut de lliurament -SendingsNumberingModules=Mòduls de numeració de notes de lliurament +SendingsReceiptModel=Model de rebut d’enviament +SendingsNumberingModules=Mòduls de numeració d'enviaments SendingsAbility=Suport en fulles d'expedició per entregues de clients NoNeedForDeliveryReceipts=En la majoria dels casos, els fulls d'enviament s'utilitzen tant com a fulls de lliurament de clients (llista de productes a enviar) i fulls rebuts i signats pel client. Per tant, el rebut de lliurament del producte és una característica duplicada i rarament s'activa. FreeLegalTextOnShippings=Text lliure en els enviaments @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Els menús personalitzats no estan enllaçats a una e NewMenu=Menú nou MenuHandler=Gestor de menús MenuModule=Mòdul origen -HideUnauthorizedMenu= Amaga també els menús no autoritzats a usuaris interns (si no només atenuats) +HideUnauthorizedMenu=Amaga els menús no autoritzats també per als usuaris interns (en cas contrari, en gris) DetailId=Identificador del menú DetailMenuHandler=Nom del gestor de menús DetailMenuModule=Nom del mòdul si l'entrada del menú és resultant d'un mòdul @@ -1717,7 +1724,7 @@ OptionVatDebitOptionDesc=L'IVA es deu: <br> - en el lliurament de mercaderies (s OptionPaymentForProductAndServices=Base de caixa de productes i serveis OptionPaymentForProductAndServicesDesc=L'IVA es deu: <br> - pel pagament de béns <br> - sobre els pagaments per serveis SummaryOfVatExigibilityUsedByDefault=Durada de l'elegibilitat de l'IVA per defecte d'acord amb l'opció escollida: -OnDelivery=Al lliurament +OnDelivery=En entrega OnPayment=Al pagament OnInvoice=A la factura SupposedToBePaymentDate=Data de pagament utilitzada @@ -1725,7 +1732,7 @@ SupposedToBeInvoiceDate=Data de factura utilitzada Buy=Compra Sell=Venda InvoiceDateUsed=Data utilitzada de factura -YourCompanyDoesNotUseVAT=L'empresa s'ha configurat com a no subjecta a IVA (Inici - Configuració - Empresa/Organització), per tant no hi ha opcions per configurar l'IVA. +YourCompanyDoesNotUseVAT=L'empresa s'ha configurat com a no subjecta a IVA (Inici - Configuració - Empresa/Organització), per tant no hi ha opcions per a configurar l'IVA. AccountancyCode=Codi comptable AccountancyCodeSell=Codi comptable vendes AccountancyCodeBuy=Codi comptable compres @@ -1761,7 +1768,7 @@ CashDeskDoNotDecreaseStock=Desactiva la reducció d'estoc quan es realitza una v 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 va desactivar la disminució de les existències en fer una venda des del punt de venda. Per tant, es requereix un magatzem. +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. 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) @@ -1777,11 +1784,11 @@ EndPointIs=Els clients SOAP han d’enviar les seves sol·licituds al punt final ##### API #### ApiSetup=Configuració del mòdul API ApiDesc=Habilitant aquest mòdul, Dolibarr serà un servidor REST per oferir varis serveis web. -ApiProductionMode=Activa el mode de producció (activarà l'ús de cachés per a la gestió de serveis) +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 OnlyActiveElementsAreExposed=Només s'exposen els elements de mòduls habilitats ApiKey=Clau per l'API -WarningAPIExplorerDisabled=S'ha deshabilitat l'explorador de API. No és necessari API Explorer per a proporcionar serveis API. És una ferramenta per a que el desenvolupador trobe/probe API REST. Si necessita aquesta ferramenta, vaja a la configuració del mòdul API REST per activar-la. +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. ##### Bank ##### BankSetupModule=Configuració del mòdul Banc FreeLegalTextOnChequeReceipts=Text lliure en els rebuts de xecs @@ -1803,7 +1810,7 @@ IfSetToYesDontForgetPermission=Si establiu un valor vàlid, no us oblideu d'esta ##### GeoIPMaxmind ##### GeoIPMaxmindSetup=Configuració del mòdul GeoIP Maxmind PathToGeoIPMaxmindCountryDataFile=Ruta al fitxer que conté Maxmind ip a la traducció del país. <br> Exemples: <br> /usr/local/share/GeoIP/GeoIP.dat <br> /usr/share/GeoIP/GeoIP.dat <br> /usr/share/GeoIP/GeoLite2-Country.mmdb -NoteOnPathLocation=Tingueu en compte que aquest arxiu ha d'estar en una carpeta accessible desde la seva PHP (Comproveu la configuració de open_basedir de la seva PHP i els permisos d'arxiu/carpetes). +NoteOnPathLocation=Tingueu en compte que el fitxer de dades IP a país ha de ser dins d’un directori que pugui llegir PHP (Comproveu la configuració de PHP open_basedir i els permisos del sistema de fitxers). YouCanDownloadFreeDatFileTo=Pot descarregar-se una <b>versió demo gratuïta</b> de l'arxiu de països Maxmind GeoIP a l'adreça %s. YouCanDownloadAdvancedDatFileTo=També pot descarregar-se una <b>versió més completa</b> de l'arxiu de països Maxmind GeoIP a l'adreça %s. TestGeoIPResult=Test de conversió IP -> País @@ -1825,7 +1832,7 @@ DeleteFiscalYear=Eliminar any fiscal ConfirmDeleteFiscalYear=Esteu segur d'eliminar aquest any fiscal? ShowFiscalYear=Mostra el període comptable AlwaysEditable=Sempre es pot editar -MAIN_APPLICATION_TITLE=Força veure el nom de l'aplicació (advertència: indicar el teu propi nom aquí pot trencar la característica d'auto-omplir l'inici de sessió en utilitzar l'aplicació mòbil DoliDroid) +MAIN_APPLICATION_TITLE=Força el nom visible de l'aplicació (advertència: definir el vostre propi nom aquí pot trencar la funció d'inici de sessió d'emplenament automàtic quan s'utilitza l'aplicació mòbil DoliDroid) NbMajMin=Nombre mínim de caràcters en majúscules NbNumMin=Nombre mínim de caràcters numèrics NbSpeMin=Nombre mínim de caràcters especials @@ -1839,8 +1846,8 @@ IncludePath=Incloure ruta (que es defineix a la variable %s) ExpenseReportsSetup=Configuració del mòdul Informe de Despeses TemplatePDFExpenseReports=Plantilles de documents per a generar un document d’informe de despeses ExpenseReportsRulesSetup=Configurar mòdul Informes de despeses - Regles -ExpenseReportNumberingModules=Número del mòdul Informe de despeses -NoModueToManageStockIncrease=No esta activat el mòdul per gestionar automàticament l'increment d'estoc. L'increment d'estoc es realitzara només amb l'entrada manual +ExpenseReportNumberingModules=Mòdul de numeració d'informes de despeses +NoModueToManageStockIncrease=No s'ha activat cap mòdul capaç de gestionar l'increment automàtic d'estoc. L’increment d’estoc es farà només amb entrada manual. YouMayFindNotificationsFeaturesIntoModuleNotification=Podeu trobar opcions de notificacions per correu electrònic habilitant i configurant el mòdul "Notificació". 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** @@ -1853,7 +1860,7 @@ BackupZipWizard=Assistent per 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ó -ConfFileMustContainCustom=Per instal·lar o crear un mòdul extern desde l'aplicació es necessita desar els fitxers del mòdul en el directori <strong>%s</strong>. Per permetre a Dolibarr el processament d'aquest directori, has de configurar el teu <strong>conf/conf.php</strong> afegint aquestes 2 línies:<br><strong>$dolibarr_main_url_root_alt='/custom';</strong><br><strong>$dolibarr_main_document_root_alt='%s/custom';</strong> +ConfFileMustContainCustom=Per a instal·lar o crear un mòdul extern des de l'aplicació es necessita desar els fitxers del mòdul en el directori <strong>%s</strong>. Per a permetre a Dolibarr el processament d'aquest directori, has de configurar el teu <strong>conf/conf.php</strong> afegint aquestes 2 línies:<br><strong>$dolibarr_main_url_root_alt='/custom';</strong><br><strong>$dolibarr_main_document_root_alt='%s/custom';</strong> HighlightLinesOnMouseHover=Remarca línies de la taula quan el ratolí passi per sobre HighlightLinesColor=Ressalteu el color de la línia quan el ratolí passa (utilitzeu 'ffffff' per no ressaltar) HighlightLinesChecked=Ressalteu el color de la línia quan està marcada (utilitzeu 'ffffff' per no ressaltar) @@ -1911,10 +1918,10 @@ MailToProject=Projectes MailToTicket=Tiquets ByDefaultInList=Mostra per defecte en la vista del llistat YouUseLastStableVersion=Estàs utilitzant l'última versió estable -TitleExampleForMajorRelease=Exemple de missatge que es pot utilitzar per anunciar aquesta actualització de versió (ets lliure d'utilitzar-ho a les teves webs) -TitleExampleForMaintenanceRelease=Exemple de missatge que es pot utilitzar per anunciar aquesta actualització de manteniment (ets lliure d'utilitzar-ho a les teves webs) +TitleExampleForMajorRelease=Exemple de missatge que podeu utilitzar per a anunciar aquesta actualització de versió (no dubteu a utilitzar-lo als vostres llocs web) +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 obtenir una 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. ModelModulesProduct=Plantilles per documents de productes WarehouseModelModules=Plantilles per a documents de magatzems @@ -1939,7 +1946,7 @@ AddOtherPagesOrServices=Afegeix altres pàgines o serveis AddModels=Afegeix document o model de numeració AddSubstitutions=Afegeix claus de substitució DetectionNotPossible=Detecció no possible -UrlToGetKeyToUseAPIs=Url per obtenir el token per utilitzar l'API (una vegada que s'ha rebut el testimoni es guarda a la taula d'usuaris de la base de dades i s'ha de proporcionar en cada trucada de l'API) +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 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>. @@ -1983,15 +1990,16 @@ EMailHost=Servidor IMAP de correu electrònic MailboxSourceDirectory=Directori d'origen de la bústia MailboxTargetDirectory=Directori de destinació de la bústia EmailcollectorOperations=Operacions a fer per recol·lector +EmailcollectorOperationsDesc=Les operacions s’executen de dalt a baix MaxEmailCollectPerCollect=Nombre màxim de correus electrònics recopilats per recollida CollectNow=Recolliu ara ConfirmCloneEmailCollector=Esteu segur que voleu clonar el recollidor de correu electrònic %s? -DateLastCollectResult=Data del darrer intent de recollida +DateLastCollectResult=Data de l'últim intent de recollida DateLastcollectResultOk=Data de la darrera recollida amb èxit LastResult=Últim resultat EmailCollectorConfirmCollectTitle=Confirmació de recollida de correu electrònic EmailCollectorConfirmCollect=Voleu executar ara la recol·lecció d’aquest col·lector? -NoNewEmailToProcess=No hi ha cap altre correu electrònic (filtres coincidents) per processar +NoNewEmailToProcess=No hi ha cap correu electrònic nou (filtres coincidents) per a processar NothingProcessed=No s'ha fet res XEmailsDoneYActionsDone=%s correus electrònics qualificats, %s correus electrònics processats amb èxit (per %s registre / accions realitzades) RecordEvent=Registre d'esdeveniments de correu electrònic @@ -2005,17 +2013,17 @@ WithDolTrackingID=Missatge d'una conversa iniciada per un primer correu electrò WithoutDolTrackingID=Missatge d'una conversa iniciada per un primer correu electrònic NO enviat des de Dolibarr WithDolTrackingIDInMsgId=Missatge enviat des de Dolibarr WithoutDolTrackingIDInMsgId=Missatge NO enviat des de Dolibarr -CreateCandidature=Crea candidatura -FormatZip=Codi postal +CreateCandidature=Crea sol·licitud de feina +FormatZip=Format Zip MainMenuCode=Codi d'entrada del menú (menú principal) ECMAutoTree=Mostra l'arbre ECM automàtic -OperationParamDesc=Definiu els valors a emprar per l'objecte de l'acció, o com extreure valors. Per exemple:<br>objproperty1=SET:el valor a assignar<br>objproperty2=SET:un valor am un valor amb substitució de __objproperty1__<br>objproperty3=SETIFEMPTY:valor usat si objproperty3 no ha estat definit<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:EL nom de la meva empresa és\\s([^\\s]*)<br><br>Empreu un punt i coma (;) com a separadorper a extreure o definir vàries propietats alhora. +OperationParamDesc=Definiu els valors a utilitzar per a l'objecte de l'acció, o com extreure valors. Per exemple:<br>objproperty1=SET:el valor a assignar<br>objproperty2=SET:un valor amb substitució de __objproperty1__<br>objproperty3=SETIFEMPTY:valor usat si objproperty3 no ha estat definit<br>objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:SUBJECT:([^&#92;n]*)<br>object.objproperty5=EXTRACT:BODY:El nom de la meva empresa és\\s([^\\s]*)<br><br>Empreu ; com a separador per a extreure o definir diverses propietats alhora. OpeningHours=Horari d'obertura OpeningHoursDesc=Introduïu aquí l'horari habitual d'obertura de la vostra empresa. 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 enllaçar un recurs als usuaris -DisabledResourceLinkContact=Desactiva la funció per enllaçar un recurs als contactes +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 ConfirmUnactivation=Confirma el restabliment del mòdul OnMobileOnly=Només en pantalla petita (telèfon intel·ligent) @@ -2051,8 +2059,8 @@ SmallerThan=Menor que LargerThan=Major que IfTrackingIDFoundEventWillBeLinked=Tingueu en compte que si es troba un identificador de seguiment d’un objecte al correu electrònic o si el correu electrònic és una resposta d’un correu electrònic que ja està recollit i enllaçat a un objecte, l’esdeveniment creat s’enllaçarà automàticament a l’objecte relacionat conegut. WithGMailYouCanCreateADedicatedPassword=Amb un compte de GMail, si heu activat la validació de dos passos, es recomana crear una segona contrasenya dedicada a l’aplicació en comptes d’utilitzar la contrasenya del vostre compte des de https://myaccount.google.com/. -EmailCollectorTargetDir=Pot ser un comportament desitjat traslladar el correu electrònic a una altra etiqueta / directori quan s'ha processat correctament. Només heu de definir el nom del directori per utilitzar aquesta funció (NO utilitzeu caràcters especials en nom). Tingueu en compte que també heu d'utilitzar un compte d'inici de sessió de lectura / escriptura. -EmailCollectorLoadThirdPartyHelp=Podeu utilitzar aquesta acció per a utilitzar el contingut del correu electrònic per trobar i carregar un tercer existent a la vostra base de dades. El tercer trobat (o creat) s'utilitzarà per seguir les accions que ho necessitin. Al camp del paràmetre podeu utilitzar, per exemple, 'EXTRACT:BODY:Name:\\s([^\\s]*)' si voleu extreure el nom del tercer d'una cadena 'Name:name to find' que es troba al cos. +EmailCollectorTargetDir=Pot ser un comportament desitjat traslladar el correu electrònic a una altra etiqueta/directori quan s'ha processat correctament. Només heu de definir el nom del directori per a utilitzar aquesta funció (NO utilitzeu caràcters especials en el nom). Tingueu en compte que també heu d'utilitzar un compte d'inici de sessió de lectura/escriptura. +EmailCollectorLoadThirdPartyHelp=Podeu utilitzar aquesta acció per a utilitzar el contingut del correu electrònic per a trobar i carregar un tercer existent a la vostra base de dades. El tercer trobat (o creat) s'utilitzarà per a seguir les accions que ho necessitin. Al camp del paràmetre podeu utilitzar, per exemple, 'EXTRACT:BODY:Name:\\s([^\\s]*)' si voleu extreure el nom del tercer d'una cadena 'Name:name to find' que es troba al cos. EndPointFor=Punt final per %s: %s DeleteEmailCollector=Suprimeix el recollidor de correu electrònic ConfirmDeleteEmailCollector=Esteu segur que voleu suprimir aquest recollidor de correu electrònic? @@ -2066,20 +2074,24 @@ MakeAnonymousPing=Creeu un ping &quot;+1&quot; anònim al servidor de bases Doli 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_USE_ALSO_LANGUAGE_CODE=Si voleu tenir alguns textos del vostre PDF duplicats en 2 idiomes diferents en el mateix PDF generat, heu d’establir aquí aquest segon idioma a fi que el PDF generat contingui 2 idiomes diferents a la mateixa pàgina, el triat per generar el PDF i aquest segon ( només algunes plantilles PDF suporten això). Manteniu-lo buit per a 1 idioma per PDF. +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ó de canal RSS proporciona un giny que heu d'habilitar per tenir-lo disponible al tauler de control +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 -MeasuringUnitTypeDesc=Utilitzeu aquí un valor com "size", "surface", "volume", "weight", "time" +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 TemplateUpdated=Plantilla actualitzada TemplateDeleted=S'ha suprimit la plantilla MailToSendEventPush=Correu electrònic de recordatori d'esdeveniments -SwitchThisForABetterSecurity=Es recomana canviar aquest valor a %s per obtenir més seguretat +SwitchThisForABetterSecurity=Es recomana canviar aquest valor a %s per a obtenir més seguretat 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. 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ó diff --git a/htdocs/langs/ca_ES/agenda.lang b/htdocs/langs/ca_ES/agenda.lang index ac453608960..7950ff65d5b 100644 --- a/htdocs/langs/ca_ES/agenda.lang +++ b/htdocs/langs/ca_ES/agenda.lang @@ -34,7 +34,7 @@ AutoActions= Inclusió automàtica a l'agenda AgendaAutoActionDesc= Aquí pots definir esdeveniments que vols que Dolibarr creï automàticament a Agenda. Si no hi ha res comprovat, només s'inclouran les accions manuals als registres i es mostraran a Agenda. El seguiment automàtic de les accions empresarials realitzades en objectes (validació, canvi d'estat) no es desarà. AgendaSetupOtherDesc= Aquesta pàgina permet configurar algunes opcions que permeten exportar una vista de la seva agenda Dolibar a un calendari extern (thunderbird, google calendar, ...) AgendaExtSitesDesc=Aquesta pàgina permet configurar calendaris externs per a la seva visualització en l'agenda de Dolibarr. -ActionsEvents=Esdeveniments per a què Dolibarr crei una acció de forma automàtica +ActionsEvents=Esdeveniments pels quals Dolibarr crearà una acció a l'agenda automàticament EventRemindersByEmailNotEnabled=Els recordatoris d'esdeveniments per correu electrònic no estaven habilitats en la configuració del mòdul %s. ##### Agenda event labels ##### NewCompanyToDolibarr=Tercer %s creat @@ -60,7 +60,7 @@ MemberSubscriptionModifiedInDolibarr=Subscripció %s per a membre %s, modificada MemberSubscriptionDeletedInDolibarr=Subscripció %s per a membre %s, eliminada ShipmentValidatedInDolibarr=Expedició %s validada ShipmentClassifyClosedInDolibarr=Expedició %s classificada com a facturada -ShipmentUnClassifyCloseddInDolibarr=Enviament %s classificat com a re-obert +ShipmentUnClassifyCloseddInDolibarr=Enviament %s classificat de nou com a obert ShipmentBackToDraftInDolibarr=Enviament %s retornat a l'estat d'esborrany ShipmentDeletedInDolibarr=Expedició %s eliminada ReceptionValidatedInDolibarr=S'ha validat la recepció %s @@ -131,7 +131,7 @@ AgendaUrlOptionsProject=<b>project=PROJECT_ID</b> per a restringir la sortida d' AgendaUrlOptionsNotAutoEvent=<b>notactiontype=systemauto</b> per excloure esdeveniments automàtics. AgendaUrlOptionsIncludeHolidays= <b> includeholidays = 1 </b> per incloure esdeveniments de vacances. AgendaShowBirthdayEvents=Mostra aniversaris dels contactes -AgendaHideBirthdayEvents=Oculta aniversaris dels contactes +AgendaHideBirthdayEvents=Amaga els aniversaris dels contactes Busy=Ocupat ExportDataset_event1=Llista d'esdeveniments de l'agenda DefaultWorkingDays=Rang de dies de treball per defecte durant la setmana (Exemple: 1-5, 1-6) @@ -158,12 +158,12 @@ EveryMonth=Cada mes DayOfMonth=Dia del mes DayOfWeek=Dia de la setmana DateStartPlusOne=Data d'inici + 1 hora -SetAllEventsToTodo=Definir tots els events com a pendents -SetAllEventsToInProgress=Definir tots els events en progrés -SetAllEventsToFinished=Definir tots els events com a enllestits +SetAllEventsToTodo=Estableix tots els esdeveniments com a pendents +SetAllEventsToInProgress=Estableix tots els esdeveniments a en curs +SetAllEventsToFinished=Estableix tots els esdeveniments com a finalitzats ReminderTime=Període de recordatori abans de l'esdeveniment TimeType=Tipus de durada ReminderType=Tipus de devolució de trucada AddReminder=Crea una notificació de recordatori automàtica per a aquest esdeveniment ErrorReminderActionCommCreation=S'ha produït un error en crear la notificació de recordatori per a aquest esdeveniment -BrowserPush=Notificació del navegador +BrowserPush=Notificació emergent del navegador diff --git a/htdocs/langs/ca_ES/banks.lang b/htdocs/langs/ca_ES/banks.lang index 593678f8d7d..a8562e1ab57 100644 --- a/htdocs/langs/ca_ES/banks.lang +++ b/htdocs/langs/ca_ES/banks.lang @@ -69,14 +69,14 @@ BankTransactionByCategories=Registres bancaris per categories BankTransactionForCategory=Registres bancaris per la categoria <b>%s</b> RemoveFromRubrique=Suprimir vincle amb categoria RemoveFromRubriqueConfirm=Està segur de voler eliminar l'enllaç entre el registre i la categoria? -ListBankTransactions=Llistat de registres bancaris +ListBankTransactions=Llista de registres bancaris IdTransaction=Id de transacció BankTransactions=Registres bancaris BankTransaction=Registre bancari -ListTransactions=Llistat registres -ListTransactionsByCategory=Llistat registres/categoria +ListTransactions=Llista de registres +ListTransactionsByCategory=Llista de registres/categoria TransactionsToConciliate=Registres a conciliar -TransactionsToConciliateShort=Per conciliar +TransactionsToConciliateShort=Per a conciliar Conciliable=Conciliable Conciliate=Conciliar Conciliation=Conciliació @@ -93,7 +93,7 @@ StatusAccountOpened=Obert StatusAccountClosed=Tancada AccountIdShort=Número LineRecord=Registre -AddBankRecord=Afegir registre +AddBankRecord=Afegeix entrada AddBankRecordLong=Afegir registre manualment Conciliated=Conciliat ConciliatedBy=Conciliat per @@ -122,9 +122,9 @@ BankChecks=Xec bancari BankChecksToReceipt=Xecs en espera de l'ingrés BankChecksToReceiptShort=Xecs en espera de l'ingrés ShowCheckReceipt=Mostra la remesa d'ingrés de xec -NumberOfCheques=Nº de xec +NumberOfCheques=Núm. de xec DeleteTransaction=Eliminar registre -ConfirmDeleteTransaction=Esteu segur de voler eliminar aquesta registre? +ConfirmDeleteTransaction=Esteu segur que voleu suprimir aquest registre? ThisWillAlsoDeleteBankRecord=Açò eliminarà també els registres bancaris generats BankMovements=Moviments PlannedTransactions=Registres prevists @@ -133,7 +133,7 @@ ExportDataset_banque_1=Registres bancaris i extractes ExportDataset_banque_2=Resguard TransactionOnTheOtherAccount=Transacció sobre l'altra compte PaymentNumberUpdateSucceeded=Número de pagament actualitzat correctament -PaymentNumberUpdateFailed=Numero de pagament no va poder ser modificat +PaymentNumberUpdateFailed=No s'ha pogut actualitzar el número de pagament PaymentDateUpdateSucceeded=Data de pagament actualitzada correctament PaymentDateUpdateFailed=Data de pagament no va poder ser modificada Transactions=Transaccions @@ -157,10 +157,10 @@ RejectCheck=Xec retornat ConfirmRejectCheck=Estàs segur que vols marcar aquesta comprovació com a rebutjada? RejectCheckDate=Data de devolució del xec CheckRejected=Xec retornat -CheckRejectedAndInvoicesReopened=Xecs retornats i factures re-obertes +CheckRejectedAndInvoicesReopened=Xec retornat i factures reobertes BankAccountModelModule=Plantilles de documents per comptes bancaris DocumentModelSepaMandate=Plantilla per a mandat SEPA. Vàlid només per a països europeus de la CEE. -DocumentModelBan=Plantilla per imprimir una pàgina amb informació BAN +DocumentModelBan=Plantilla per a imprimir una pàgina amb informació BAN. NewVariousPayment=Pagament divers nou VariousPayment=Pagament divers VariousPayments=Pagaments varis @@ -171,12 +171,13 @@ VariousPaymentLabel=Etiqueta de pagament divers ConfirmCloneVariousPayment=Confirmeu el clon d'un pagament divers SEPAMandate=Mandat SEPA YourSEPAMandate=La vostra ordre SEPA -FindYourSEPAMandate=Aquest és el vostre mandat de SEPA per autoritzar a la nostra empresa a realitzar un ordre de dèbit directe al vostre banc. Gràcies per retornar-la signada (escanejar el document signat) o envieu-lo per correu a +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=Tancar Efectiu del Punt de Venda -NewCashFence=Tancament d'efectiu nou +CashControl=Control de caixa TPV +NewCashFence=Tancament de caixa nou 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 les conciliacions bancàries en alguns comptes bancaris, desactiveu la propietat "%s" per eliminar aquest advertiment. +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 diff --git a/htdocs/langs/ca_ES/bills.lang b/htdocs/langs/ca_ES/bills.lang index 61e70a38bea..01a98bf0260 100644 --- a/htdocs/langs/ca_ES/bills.lang +++ b/htdocs/langs/ca_ES/bills.lang @@ -11,8 +11,8 @@ BillsSuppliersUnpaidForCompany=Factures de proveïdors pendents de pagament per BillsLate=Retard en el pagament BillsStatistics=Estadístiques factures a clients BillsStatisticsSuppliers=Estadístiques de Factures de proveïdors -DisabledBecauseDispatchedInBookkeeping=Desactivat perquè la factura s'ha contabilitzat -DisabledBecauseNotLastInvoice=Desactivat perque la factura no es pot eliminar. S'han creat factures després d'aquesta i crearia buits al contador. +DisabledBecauseDispatchedInBookkeeping=Desactivat perquè la factura ja s'ha comptabilitzat +DisabledBecauseNotLastInvoice=Desactivat perquè la factura no es pot esborrar. Algunes factures s'han registrat després d'aquesta i això crearia espais buits al comptador. DisabledBecauseNotErasable=Desactivat perque no es pot eliminar InvoiceStandard=Factura estàndard InvoiceStandardAsk=Factura estàndard @@ -66,9 +66,9 @@ paymentInInvoiceCurrency=en divisa de factures PaidBack=Reemborsat DeletePayment=Elimina el pagament ConfirmDeletePayment=Esteu segur de voler eliminar aquest pagament? -ConfirmConvertToReduc=Voleu convertir aquesta %s en crèdit disponible? +ConfirmConvertToReduc=Voleu convertir aquest %s en un crèdit disponible? ConfirmConvertToReduc2=L’import s’emmagatzemarà entre tots els descomptes i es podrà utilitzar com a descompte per a una factura actual o futura per a aquest client. -ConfirmConvertToReducSupplier=Voleu convertir aquesta %s en un crèdit disponible? +ConfirmConvertToReducSupplier=Voleu convertir aquest %s en un crèdit disponible? ConfirmConvertToReducSupplier2=L’import s’ha desat entre tots els descomptes i es podrà utilitzar com a descompte per a una factura actual o futura per a aquest proveïdor. SupplierPayments=Pagaments a proveïdors ReceivedPayments=Pagaments rebuts @@ -84,7 +84,7 @@ PaymentMode=Forma de pagament PaymentTypeDC=Dèbit/Crèdit Tarja PaymentTypePP=PayPal IdPaymentMode=Forma de pagament (Id) -CodePaymentMode=Payment type (code) +CodePaymentMode=Tipus de pagament (codi) LabelPaymentMode=Forma de pagament (etiqueta) PaymentModeShort=Forma de pagament PaymentTerm=Condicions de pagament @@ -94,11 +94,11 @@ PaymentAmount=Import pagament PaymentHigherThanReminderToPay=Pagament superior a la resta a pagar HelpPaymentHigherThanReminderToPay=Atenció, l'import del pagament d'una o més factures és superior a l'import pendent de pagar. <br> Editeu la vostra entrada; en cas contrari, confirmeu i considereu la possibilitat de crear un abonament per l'excés rebut per cada factura pagada de més. HelpPaymentHigherThanReminderToPaySupplier=Atenció, l'import del pagament d'una o més factures és superior a l'import pendent de pagar.<br>Editeu l'entrada, en cas contrari, confirmeu i considereu la possibilitat de crear un abonament per l'excés pagat per cada factura pagada de més. -ClassifyPaid=Classificar 'Pagat' +ClassifyPaid=Classifica "Pagat" ClassifyUnPaid=Classifica &quot;sense pagar&quot; -ClassifyPaidPartially=Classificar 'Pagat parcialment' -ClassifyCanceled=Classificar 'Abandonat' -ClassifyClosed=Classificar 'Tancat' +ClassifyPaidPartially=Classifica "Pagat parcialment" +ClassifyCanceled=Classifica "Abandonat" +ClassifyClosed=Classifica "Tancat" ClassifyUnBilled=Classifiqueu 'facturar' CreateBill=Crear factura CreateCreditNote=Crear abonament @@ -109,11 +109,11 @@ SearchACustomerInvoice=Cercar una factura a client SearchASupplierInvoice=Cercar una factura de proveïdor CancelBill=Anul·lar una factura SendRemindByMail=Envia recordatori per e-mail -DoPayment=Afegir pagament +DoPayment=Introdueix el pagament DoPaymentBack=Afegir reemborsament ConvertToReduc=Marca com a crèdit disponible -ConvertExcessReceivedToReduc=Convertir l'excés rebut en el crèdit disponible -ConvertExcessPaidToReduc=Convertir l'excés pagat en descompte disponible +ConvertExcessReceivedToReduc=Converteix l'excés rebut en crèdit disponible +ConvertExcessPaidToReduc=Converteix l'excés pagat en descompte disponible EnterPaymentReceivedFromCustomer=Afegir cobrament rebut del client EnterPaymentDueToCustomer=Fer pagament del client DisabledBecauseRemainderToPayIsZero=Desactivar ja que la resta a pagar és 0 @@ -123,7 +123,7 @@ StatusOfGeneratedInvoices=Estat de factures generades BillStatusDraft=Esborrany (a validar) BillStatusPaid=Pagada BillStatusPaidBackOrConverted=Nota de crèdit reembossada o marcada com a crèdit disponible -BillStatusConverted=Pagada (llesta per utilitzar-se en factura final) +BillStatusConverted=Pagada (llesta per a utilitzar-se en la factura final) BillStatusCanceled=Abandonada BillStatusValidated=Validada (a pagar) BillStatusStarted=Pagada parcialment @@ -156,12 +156,12 @@ ErrorCantCancelIfReplacementInvoiceNotValidated=Error, no és possible cancel·l ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved=Aquesta part o una altra ja s'utilitza, de manera que la sèrie de descompte no es pot treure. BillFrom=Emissor BillTo=Enviar a -ActionsOnBill=Eventos sobre la factura +ActionsOnBill=Accions en la factura RecurringInvoiceTemplate=Plantilla / Factura recurrent -NoQualifiedRecurringInvoiceTemplateFound=No s'ha qualificat cap plantilla de factura recurrent per generar-se. -FoundXQualifiedRecurringInvoiceTemplate=S'ha trobat la plantilla de factura/es recurrent %s qualificada per generar-se. +NoQualifiedRecurringInvoiceTemplateFound=No es pot generar cap factura de plantilla periòdica. +FoundXQualifiedRecurringInvoiceTemplate=S'han trobat %s factures recurrents de plantilla qualificades per a la generació. NotARecurringInvoiceTemplate=No és una plantilla de factura recurrent -NewBill=Nova factura +NewBill=Factura nova LastBills=Últimes %s factures LatestTemplateInvoices=Últimes %s plantilles de factura LatestCustomerTemplateInvoices=Últimes %s plantilles de factures de client @@ -192,20 +192,20 @@ 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ó») -ConfirmClassifyPaidPartiallyReasonDiscountVatDesc=En alguns països, aquesta elecció només pot ser possible si la teva factura conté les notes correctes. +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. ConfirmClassifyPaidPartiallyReasonProductReturnedDesc=Aquesta elecció és possible si el cas de pagament incomplet és arran d'una devolució de part dels productes -ConfirmClassifyPaidPartiallyReasonOtherDesc=Utilitza aquesta opció si totes les altres no et convenen, per exemple en la situació següent:<br>- pagament parcial ja que una partida de productes s'ha tornat<br>- la quantitat reclamada és massa important perquè s'ha oblidat un descompte<br>En tots els casos, la reclamació s'ha de regularitzar mitjançant un abonament. +ConfirmClassifyPaidPartiallyReasonOtherDesc=Utilitza aquesta opció si totes les altres no són adequades, per exemple, en la següent situació: <br>- el pagament no s'ha completat perquè alguns productes es van tornar a enviar<br>- la quantitat reclamada és massa important perquè s'ha oblidat un descompte <br>En tots els casos, s'ha de corregir l'import excessiu en el sistema de comptabilitat mitjançant la creació d’un abonament. ConfirmClassifyAbandonReasonOther=Altres ConfirmClassifyAbandonReasonOtherDesc=Aquesta elecció serà per a qualsevol altre cas. Per exemple arran de la intenció de crear una factura rectificativa. ConfirmCustomerPayment=Confirmes aquesta entrada de pagament per a <b>%s</b> %s? ConfirmSupplierPayment=Confirmes aquesta entrada de pagament per a <b>%s</b> %s? ConfirmValidatePayment=Estàs segur que vols validar aquest pagament? No es poden fer canvis un cop el pagament s'ha validat. -ValidateBill=Validar factura +ValidateBill=Valida la factura UnvalidateBill=Tornar factura a esborrany -NumberOfBills=Nº de factures -NumberOfBillsByMonth=Nº de factures per mes +NumberOfBills=Nombre de factures +NumberOfBillsByMonth=Nombre de factures per mes AmountOfBills=Import de les factures AmountOfBillsHT=Import de factures (net d'impostos) AmountOfBillsByMonthHT=Import de les factures per mes (Sense IVA) @@ -256,7 +256,7 @@ DateMaxPayment=Pagament vençut DateInvoice=Data facturació DatePointOfTax=Punt d'impostos NoInvoice=Cap factura -ClassifyBill=Classificar la factura +ClassifyBill=Classifica la factura SupplierBillsToPay=Factures de proveïdors pendents de pagament CustomerBillsUnpaid=Factures de client pendents de cobrament NonPercuRecuperable=No percebut recuperable @@ -269,7 +269,7 @@ RepeatableInvoice=Factura recurrent RepeatableInvoices=Factures recurrents Repeatable=Recurrent Repeatables=Recurrents -ChangeIntoRepeatableInvoice=Convertir en recurrent +ChangeIntoRepeatableInvoice=Converteix-la en plantilla CreateRepeatableInvoice=Crear factura recurrent CreateFromRepeatableInvoice=Crear des de factura recurrent CustomersInvoicesAndInvoiceLines=Factures del client i detalls de la factura @@ -304,8 +304,8 @@ DiscountFromExcessReceived=Pagaments superiors a la factura %s DiscountFromExcessPaid=Pagaments superiors a la factura %s AbsoluteDiscountUse=Aquest tipus de crèdit no es pot utilitzar en una factura abans de la seva validació CreditNoteDepositUse=La factura deu estar validada per a utilitzar aquest tipus de crèdits -NewGlobalDiscount=Nou descompte fixe -NewRelativeDiscount=Nou descompte +NewGlobalDiscount=Descompte absolut nou +NewRelativeDiscount=Descompte relatiu nou DiscountType=Tipus de descompte NoteReason=Nota/Motiu ReasonDiscount=Motiu @@ -328,7 +328,7 @@ InvoiceStatus=Estat factura InvoiceNote=Nota factura InvoicePaid=Factura pagada InvoicePaidCompletely=Pagat per complet -InvoicePaidCompletelyHelp=Factura pagada per complet. Això exclou les factures que estan pagades parcialment. Per obtenir la llista de totes les factures tancades o no tancades, utilitzeu el filtre de l'estat de la factura. +InvoicePaidCompletelyHelp=Factura pagada per complet. Això exclou les factures que estan pagades parcialment. Per a obtenir la llista de totes les factures tancades o no tancades, utilitzeu el filtre de l'estat de la factura. OrderBilled=Ordre facturat DonationPaid=Donació pagada PaymentNumber=Número de pagament @@ -338,7 +338,7 @@ InvoiceNotChecked=Cap factura pendent està seleccionada ConfirmCloneInvoice=Vols clonar aquesta factura <b>%s</b>? DisabledBecauseReplacedInvoice=Acció desactivada perquè és una factura reemplaçada DescTaxAndDividendsArea=Aquesta àrea presenta un resum de tots els pagaments fets per a despeses especials. Aquí només s'inclouen registres amb pagament durant l'any fixat. -NbOfPayments=Nº de pagaments +NbOfPayments=Nombre de pagaments SplitDiscount=Dividir el dte. en dos ConfirmSplitDiscount=Estàs segur que vols dividir aquest descompte de <b>%s</b> %s en 2 descomptes més baixos? TypeAmountOfEachNewDiscount=Import de l'entrada per a cada una de les dues parts: @@ -371,10 +371,10 @@ NextDateToExecution=Data de la propera generació de factures NextDateToExecutionShort=Data següent gen. DateLastGeneration=Data de l'última generació DateLastGenerationShort=Data última gen. -MaxPeriodNumber=Nº màxim de generació de factures -NbOfGenerationDone=Número de generació de factura ja realitzat +MaxPeriodNumber=Màx. nombre de generació de factures +NbOfGenerationDone=Nombre de generació de factura ja realitzat NbOfGenerationDoneShort=Número de generació realitzat -MaxGenerationReached=Número màxim de generacions aconseguides +MaxGenerationReached=Nombre màxim de generacions assolides InvoiceAutoValidate=Valida les factures automàticament GeneratedFromRecurringInvoice=Generat des de la plantilla de factura recurrent %s DateIsNotEnough=Encara no s'ha arribat a la data @@ -396,12 +396,12 @@ PaymentConditionShort60D=60 dies PaymentCondition60D=60 dies PaymentConditionShort60DENDMONTH=60 dies final de mes PaymentCondition60DENDMONTH=En els 60 dies següents a final de mes -PaymentConditionShortPT_DELIVERY=Al lliurament -PaymentConditionPT_DELIVERY=Al lliurament +PaymentConditionShortPT_DELIVERY=Entrega +PaymentConditionPT_DELIVERY=En entrega PaymentConditionShortPT_ORDER=Comanda PaymentConditionPT_ORDER=A la recepció de la comanda PaymentConditionShortPT_5050=50/50 -PaymentConditionPT_5050=50%% per avançat, 50%% al lliurament +PaymentConditionPT_5050=50%% per avançat, 50%% a l’entrega PaymentConditionShort10D=10 dies PaymentCondition10D=10 dies PaymentConditionShort10DENDMONTH=10 dies final de mes @@ -447,8 +447,8 @@ BIC=BIC/SWIFT BICNumber=Codi BIC/SWIFT ExtraInfos=Informacions complementàries RegulatedOn=Pagar el -ChequeNumber=Xec nº -ChequeOrTransferNumber=Nº Xec/Transferència +ChequeNumber=Número de xec +ChequeOrTransferNumber=Núm. de xec/transferència ChequeBordereau=Comprova horari ChequeMaker=Autor xec/transferència ChequeBank=Banc del xec @@ -476,19 +476,19 @@ UseCreditNoteInInvoicePayment=Reduir el pagament amb aquest crèdit MenuChequeDeposits=Ingrés de xecs MenuCheques=Xecs MenuChequesReceipts=Remeses de xecs -NewChequeDeposit=Nou dipòsit +NewChequeDeposit=Dipòsit nou ChequesReceipts=Remeses de xecs -ChequesArea=Àrea de ingrés de xecs +ChequesArea=Àrea d'ingressos de xecs ChequeDeposits=Ingrés de xecs Cheques=Xecs DepositId=Id. dipòsit -NbCheque=Número de xecs +NbCheque=Nombre de xecs CreditNoteConvertedIntoDiscount=This %s has been converted into %s UsBillingContactAsIncoiveRecipientIfExist=Utilitzeu el contacte / adreça amb el tipus 'contacte de facturació' en comptes de l'adreça de tercers com a destinatari de factures ShowUnpaidAll=Mostrar tots els pendents ShowUnpaidLateOnly=Mostrar els pendents en retard només PaymentInvoiceRef=Pagament factura %s -ValidateInvoice=Validar factura +ValidateInvoice=Valida la factura ValidateInvoices=Validació de factures Cash=Efectiu Reported=Ajornat @@ -514,8 +514,8 @@ PDFSpongeDescription=Plantilla PDF de factures Sponge. Una plantilla de factura 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 -TerreNumRefModelError=Ja hi ha una factura amb $syymm i no és compatible amb aquest model de seqüència. Elimineu o renómbrela per poder activar aquest mòdul -CactusNumRefModelDesc1=Retorna un numero amb format %syymm-nnnn per a factures estàndard, %syymm-nnnn per a notes de crèdit i %syymm-nnnn per a factures de dipòsits anticipats a on yy es l'any, mm és el mes i nnnn és una seqüència sense ruptura i sense retorn a 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 EarlyClosingReason=Motiu de tancament anticipat EarlyClosingComment=Nota de tancament anticipat ##### Types de contacts ##### @@ -557,7 +557,7 @@ 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. -ToCreateARecurringInvoiceGene=Per generar futures factures regulars i manualment, només ves al menú <strong>%s - %s - %s</strong>. +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? diff --git a/htdocs/langs/ca_ES/blockedlog.lang b/htdocs/langs/ca_ES/blockedlog.lang index 5c380fdb581..dc38c2149c7 100644 --- a/htdocs/langs/ca_ES/blockedlog.lang +++ b/htdocs/langs/ca_ES/blockedlog.lang @@ -2,7 +2,7 @@ BlockedLog=Registres inalterables Field=Camp BlockedLogDesc=Aquest mòdul fa un seguiment d'alguns esdeveniments en un registre inalterable (que no es pot modificar una vegada registrat) en una cadena de blocs, en temps real. Aquest mòdul ofereix compatibilitat amb els requisits de les lleis d'alguns països (com França amb la llei Finances 2016 - Norma NF525). Fingerprints=Esdeveniments arxivats i empremtes digitals -FingerprintsDesc=Aquesta és l'eina per explorar o extreure els registres inalterables. Els registres inalterables es generen i es arxiven localment en una taula dedicada, en temps real quan es registra un esdeveniment empresarial. Podeu utilitzar aquesta eina per exportar aquest arxiu i desar-lo en un suport extern (alguns països, com França, demanen que ho feu cada any). Tingueu en compte que, no hi ha cap funció per purgar aquest registre i tots els canvis que s'hagin intentat fer directament en aquest registre (per exemple, un hacker) es comunicaran amb una empremta digital no vàlida. Si realment necessiteu purgar aquesta taula perquè heu utilitzat la vostra aplicació per a un propòsit de demostració / prova i voleu netejar les vostres dades per iniciar la vostra producció, podeu demanar al vostre distribuïdor o integrador que restableixi la vostra base de dades (totes les vostres dades seran eliminades). +FingerprintsDesc=Aquesta és l'eina per a explorar o extreure els registres inalterables. Els registres inalterables es generen i s'arxiven localment en una taula dedicada, en temps real quan es registra un esdeveniment de negoci. Podeu utilitzar aquesta eina per a exportar aquest arxiu i desar-lo en un suport extern (alguns països, com França, demanen que ho feu cada any). Tingueu en compte que, no hi ha cap funció per a purgar aquest registre i tots els canvis que s'hagin intentat fer directament en aquest registre (per exemple, un hacker) es comunicaran amb una empremta digital no vàlida. Si realment necessiteu purgar aquesta taula perquè heu utilitzat la vostra aplicació per a un propòsit de demostració / prova i voleu netejar les vostres dades per a iniciar la vostra producció, podeu demanar al vostre distribuïdor o integrador que restableixi la vostra base de dades (totes les vostres dades seran eliminades). CompanyInitialKey=Clau inicial de l'empresa (hash de bloc de gènesi) BrowseBlockedLog=Registres inalterables ShowAllFingerPrintsMightBeTooLong=Mostra tots els registres arxivats (pot ser llarg) @@ -35,7 +35,7 @@ logDON_DELETE=Donació de l'eliminació lògica logMEMBER_SUBSCRIPTION_CREATE=S'ha creat una subscripció de membre logMEMBER_SUBSCRIPTION_MODIFY=S'ha modificat la subscripció de membre logMEMBER_SUBSCRIPTION_DELETE=Supressió lògica de subscripció de membre -logCASHCONTROL_VALIDATE=Gravació de tanques d'efectiu +logCASHCONTROL_VALIDATE=Registre de tancament de caixa BlockedLogBillDownload=Descarrega la factura del client BlockedLogBillPreview=Previsualització de la factura del client BlockedlogInfoDialog=Detalls del registre @@ -45,10 +45,10 @@ DownloadLogCSV=Exporta els registres arxivats (CSV) logDOC_PREVIEW=Vista prèvia d'un document validat per imprimir o descarregar logDOC_DOWNLOAD=Descarregar un document validat per imprimir o enviar DataOfArchivedEvent=Dades completes d'esdeveniments arxivats -ImpossibleToReloadObject=Objecte original (tipus %s, id %s) no enllaçat (vegeu la columna "Dades complets" per obtenir dades guardades inalterables) +ImpossibleToReloadObject=Objecte original (tipus %s, identificador %s) no enllaçat (vegeu la columna "Dades completes" per a obtenir dades desades inalterables) BlockedLogAreRequiredByYourCountryLegislation=El mòdul de registres inalterables pot ser requerit per la legislació del vostre país. La desactivació d'aquest mòdul pot fer que qualsevol transacció futura sigui invàlida pel que fa a la llei i l'ús del programari legal, ja que no es pot validar mitjançant una auditoria fiscal. BlockedLogActivatedBecauseRequiredByYourCountryLegislation=El mòdul de registres inalterables s'ha activat a causa de la legislació del vostre país. La desactivació d'aquest mòdul pot fer que qualsevol transacció futura sigui invàlida pel que fa a la llei i l'ús del programari legal, ja que no es pot validar mitjançant una auditoria fiscal. BlockedLogDisableNotAllowedForCountry=Llista de països on l'ús d'aquest mòdul és obligatori (només per impedir que es desactivi el mòdul per error, si el vostre país està en aquesta llista, la desactivació del mòdul no és possible sense editar aquesta llista. Noteu també que habilitar / desactivar aquest mòdul seguiu una pista en el registre inalterable). OnlyNonValid=No vàlid TooManyRecordToScanRestrictFilters=Hi ha massa registres per escanejar / analitzar. Limiteu la llista amb filtres més restrictius. -RestrictYearToExport=Restringiu el mes / any per exportar +RestrictYearToExport=Restringeix el mes / any per a exportar diff --git a/htdocs/langs/ca_ES/bookmarks.lang b/htdocs/langs/ca_ES/bookmarks.lang index 8e406ad77d6..423f70a3814 100644 --- a/htdocs/langs/ca_ES/bookmarks.lang +++ b/htdocs/langs/ca_ES/bookmarks.lang @@ -4,15 +4,15 @@ Bookmark=Marcador Bookmarks=Marcadors ListOfBookmarks=Llista de marcadors EditBookmarks=Llista/edita els marcadors -NewBookmark=Nou marcador +NewBookmark=Marcador nou ShowBookmark=Mostra marcador OpenANewWindow=Obriu una pestanya nova ReplaceWindow=Reemplaça la pestanya actual -BookmarkTargetNewWindowShort=Nova pestanya +BookmarkTargetNewWindowShort=Pestanya nova BookmarkTargetReplaceWindowShort=Pestanya actual BookmarkTitle=Nom de marcatge UrlOrLink=URL -BehaviourOnClick=Comportament al fer clic a la URL +BehaviourOnClick=Comportament quan se selecciona un URL de marcador CreateBookmark=Crea marcador SetHereATitleForLink=Estableix un nom per al marcador UseAnExternalHttpLinkOrRelativeDolibarrLink=Utilitzeu un enllaç extern / absolut (https://URL) o un enllaç intern / relatiu (/DOLIBARR_ROOT/htdocs/...) diff --git a/htdocs/langs/ca_ES/boxes.lang b/htdocs/langs/ca_ES/boxes.lang index db7fab66a6b..37668884c7a 100644 --- a/htdocs/langs/ca_ES/boxes.lang +++ b/htdocs/langs/ca_ES/boxes.lang @@ -40,19 +40,22 @@ BoxTitleLastModifiedContacts=Adreces i contactes: últims %s modificats BoxMyLastBookmarks=Adreces d'interès: últims %s BoxOldestExpiredServices=Serveis antics expirats BoxLastExpiredServices=Últims %s contactes amb serveis actius expirats -BoxTitleLastActionsToDo=Últims %s events a realitzar +BoxTitleLastActionsToDo=Últimes %s accions a fer BoxTitleLastContracts=Últims %s contractes modificats BoxTitleLastModifiedDonations=Últimes %s donacions modificades BoxTitleLastModifiedExpenses=Últimes %s despeses modificades BoxTitleLatestModifiedBoms=Últimes %s llistes de material modificades BoxTitleLatestModifiedMos=Últimes %s ordres de fabricació modificades +BoxTitleLastOutstandingBillReached=Clients que han superat el màxim pendent BoxGlobalActivity=Activitat global BoxGoodCustomers=Bons clients BoxTitleGoodCustomers=% bons clients +BoxScheduledJobs=Tasques programades +BoxTitleFunnelOfProspection=Oportunitat embut FailedToRefreshDataInfoNotUpToDate=No s'ha pogut actualitzar el flux RSS. Última data d'actualització amb èxit: %s LastRefreshDate=Última data que es va refrescar NoRecordedBookmarks=No hi ha marcadors personals. -ClickToAdd=Faci clic aquí per afegir. +ClickToAdd=Feu clic aquí per a afegir. NoRecordedCustomers=Cap client registrat NoRecordedContacts=Cap contacte registrat NoActionsToDo=Sense esdeveniments a realitzar @@ -92,8 +95,8 @@ LastXMonthRolling=Els últims %s mesos consecutius ChooseBoxToAdd=Afegeix el panell a la teva taula de control BoxAdded=S'ha afegit el panell a la teva taula de control BoxTitleUserBirthdaysOfMonth=Aniversaris d'aquest mes (usuaris) -BoxLastManualEntries=Últimes entrades manuals en comptabilitat -BoxTitleLastManualEntries=Les darreres entrades manuals %s +BoxLastManualEntries=Últim registre de comptabilitat introduït manualment o sense document d'origen +BoxTitleLastManualEntries=%s últim registre introduït manualment o sense document d'origen NoRecordedManualEntries=No hi ha registres d'entrades manuals en comptabilitat BoxSuspenseAccount=Operació comptable de comptes amb compte de suspens BoxTitleSuspenseAccount=Nombre de línies no assignades @@ -102,6 +105,7 @@ SuspenseAccountNotDefined=El compte de suspens no està definit BoxLastCustomerShipments=Últims enviaments de clients BoxTitleLastCustomerShipments=Últims %s enviaments de clients NoRecordedShipments=Cap enviament de client registrat +BoxCustomersOutstandingBillReached=Clients que superen el límit pendent # Pages AccountancyHome=Comptabilitat ValidatedProjects=Projectes validats diff --git a/htdocs/langs/ca_ES/cashdesk.lang b/htdocs/langs/ca_ES/cashdesk.lang index c17e230f1ee..9cfb5122c12 100644 --- a/htdocs/langs/ca_ES/cashdesk.lang +++ b/htdocs/langs/ca_ES/cashdesk.lang @@ -11,10 +11,10 @@ CashDeskStock=Estoc CashDeskOn=de CashDeskThirdParty=Tercer ShoppingCart=Cistella -NewSell=Nova venda +NewSell=Venda nova AddThisArticle=Afegeix aquest article RestartSelling=Reprendre la venda -SellFinished=Venda acabada +SellFinished=Venda completa PrintTicket=Imprimir SendTicket=Envia el tiquet NoProductFound=Cap article trobat @@ -32,7 +32,7 @@ ShowStock=Veure magatzem DeleteArticle=Feu clic per treure aquest article FilterRefOrLabelOrBC=Cerca (Ref/Etiq.) UserNeedPermissionToEditStockToUsePos=Es demana disminuir l'estoc en la creació de la factura, de manera que l'usuari que utilitza el TPV ha de tenir permís per editar l'estoc. -DolibarrReceiptPrinter=Impressora de tickets de Dolibarr +DolibarrReceiptPrinter=Impressora de tiquets de Dolibarr PointOfSale=Punt de venda PointOfSaleShort=TPV CloseBill=Tanca el compte @@ -49,9 +49,9 @@ Footer=Peu de pàgina AmountAtEndOfPeriod=Import al final del període (dia, mes o any) TheoricalAmount=Import teòric RealAmount=Import real -CashFence=Recompte d'efectiu +CashFence=Tancament de caixa CashFenceDone=Tancament de caixa realitzat pel període -NbOfInvoices=Nº de factures +NbOfInvoices=Nombre de factures Paymentnumpad=Tipus de pad per introduir el pagament Numberspad=Números Pad BillsCoinsPad=Pad de monedes i bitllets @@ -60,9 +60,9 @@ TakeposNeedsCategories=TakePOS necessita que les categories de productes funcion OrderNotes=Notes de comanda CashDeskBankAccountFor=Compte predeterminat a utilitzar per als pagaments NoPaimementModesDefined=No hi ha cap mode de pagament definit a la configuració de TakePOS -TicketVatGrouped=Agrupar IVA per tipus als tickets/rebuts -AutoPrintTickets=Imprimir automàticament tickets/rebuts -PrintCustomerOnReceipts=Imprimir el client als tickets/rebuts +TicketVatGrouped=Agrupa IVA per tipus als tiquets|rebuts +AutoPrintTickets=Imprimeix automàticament els tiquets|rebuts +PrintCustomerOnReceipts=Imprimeix el client als tiquets|rebuts EnableBarOrRestaurantFeatures=Habiliteu funcions per a bar o restaurant ConfirmDeletionOfThisPOSSale=Confirmeu la supressió de la venda actual? ConfirmDiscardOfThisPOSSale=Voleu descartar aquesta venda actual? @@ -89,18 +89,19 @@ Colorful=Colorit HeadBar=Barra de capçalera SortProductField=Camp per a ordenar productes Browser=Navegador -BrowserMethodDescription=Impressió de rebuts senzilla i senzilla. Només uns quants paràmetres per configurar el rebut. Imprimeix a través del navegador. +BrowserMethodDescription=Impressió de rebuts fàcil i senzilla. Només uns quants paràmetres per a configurar el rebut. Imprimeix mitjançant el navegador. TakeposConnectorMethodDescription=Mòdul extern amb funcions addicionals. Possibilitat d’imprimir des del núvol. PrintMethod=Mètode d'impressió ReceiptPrinterMethodDescription=Mètode potent amb molts paràmetres. Completament personalitzable amb plantilles. No es pot imprimir des del núvol. ByTerminal=Per terminal TakeposNumpadUsePaymentIcon=Utilitzeu la icona en lloc del text als botons de pagament del teclat numèric -CashDeskRefNumberingModules=Mòdul de numeració per a vendes del Punt de Venda (POS) -CashDeskGenericMaskCodes6 = <br>l'etiqueta <b>{TN}</b> s'utilitza per afegir el numero de terminal +CashDeskRefNumberingModules=Mòdul de numeració per a vendes des del TPV (Punt de Venda) +CashDeskGenericMaskCodes6 = L'etiqueta <br><b>{TN}</b> s'utilitza per a afegir el número de terminal TakeposGroupSameProduct=Agrupa les mateixes línies de productes -StartAParallelSale=Inicia una nova venda paral·lela -ControlCashOpening=Control de caixa en obrir el TPV -CloseCashFence=Tanca el recompte d'efectiu +StartAParallelSale=Comenceu una venda nova paral·lela +SaleStartedAt=La venda va començar a %s +ControlCashOpening=Finestra emergent de control de caixa en obrir el TPV +CloseCashFence=Tanca el control de caixa CashReport=Informe d'efectiu MainPrinterToUse=Impressora principal a utilitzar OrderPrinterToUse=Impressora de comandes a utilitzar diff --git a/htdocs/langs/ca_ES/categories.lang b/htdocs/langs/ca_ES/categories.lang index 900f42e763a..195fe0a4157 100644 --- a/htdocs/langs/ca_ES/categories.lang +++ b/htdocs/langs/ca_ES/categories.lang @@ -5,9 +5,9 @@ RubriquesTransactions=Etiquetes d'assentaments categories=etiquetes NoCategoryYet=No s'ha creat cap etiqueta d'aquest tipus In=En -AddIn=Afegir en -modify=Modificar -Classify=Classificar +AddIn=Afegeix +modify=Modifica +Classify=Classifica CategoriesArea=Àrea d'etiquetes ProductsCategoriesArea=Àrea d'etiquetes de productes/serveis SuppliersCategoriesArea=Àrea d'etiquetes de proveïdors @@ -19,6 +19,7 @@ ProjectsCategoriesArea=Àrea d'etiquetes de projectes UsersCategoriesArea=Àrea d'etiquetes d'usuaris SubCats=Subcategories CatList=Llistat d'etiquetes +CatListAll=Llista d'etiquetes (tots els tipus) NewCategory=Etiqueta nova ModifCat=Modifica l'etiqueta CatCreated=Etiqueta creada @@ -65,16 +66,22 @@ UsersCategoriesShort=Etiquetes d'usuaris StockCategoriesShort=Etiquetes / categories de magatzem ThisCategoryHasNoItems=Aquesta categoria no conté cap element. CategId=ID d'etiqueta -CatSupList=Llistat d'etiquetes de proveïdors -CatCusList=Llistat d'etiquetes de clients/clients potencials +ParentCategory=Etiqueta mare +ParentCategoryLabel=Descripció de l'etiqueta mare +CatSupList=Llista d'etiquetes de proveïdors +CatCusList=Llista d'etiquetes de clients/potencials CatProdList=Llistat d'etiquetes de productes CatMemberList=Llistat d'etiquetes de socis -CatContactList=Llistat d'etiquetes de contactes +CatContactList=Llista d’etiquetes de contactes +CatProjectsList=Llista d’etiquetes de projectes +CatUsersList=Llista d'etiquetes d'usuaris CatSupLinks=Enllaços entre proveïdors i etiquetes CatCusLinks=Enllaços entre clients/clients potencials i etiquetes CatContactsLinks=Enllaços entre contactes / adreces i etiquetes / categories CatProdLinks=Enllaços entre productes/serveis i etiquetes -CatProJectLinks=Enllaços entre projectes i etiquetes +CatMembersLinks=Enllaços entre socis i etiquetes +CatProjectsLinks=Enllaços entre projectes i etiquetes +CatUsersLinks=Enllaços entre usuaris i etiquetes DeleteFromCat=Elimina de l'etiqueta ExtraFieldsCategories=Atributs complementaris CategoriesSetup=Configuració d'etiquetes diff --git a/htdocs/langs/ca_ES/commercial.lang b/htdocs/langs/ca_ES/commercial.lang index 6dbcc4f80cd..ce0aee13e4a 100644 --- a/htdocs/langs/ca_ES/commercial.lang +++ b/htdocs/langs/ca_ES/commercial.lang @@ -6,7 +6,7 @@ Customers=Clients Prospect=Client potencial Prospects=Clients potencials DeleteAction=Elimina un esdeveniment -NewAction=Nou esdeveniment +NewAction=Esdeveniment nou AddAction=Crea esdeveniment AddAnAction=Crea un esdeveniment AddActionRendezVous=Crear una cita @@ -33,7 +33,7 @@ LastDoneTasks=Últimes %s accions acabades LastActionsToDo=Les %s més antigues accions no completades DoneAndToDoActions=Llista d'esdeveniments realitzats o a realitzar DoneActions=Llista d'esdeveniments realitzats -ToDoActions=Llista d'esdevenimentss incomplets +ToDoActions=Esdeveniments incomplets SendPropalRef=Enviament del pressupost %s SendOrderRef=Enviament de la comanda %s StatusNotApplicable=No aplicable diff --git a/htdocs/langs/ca_ES/companies.lang b/htdocs/langs/ca_ES/companies.lang index 1ed63965f27..0125a802bf8 100644 --- a/htdocs/langs/ca_ES/companies.lang +++ b/htdocs/langs/ca_ES/companies.lang @@ -68,8 +68,8 @@ PhoneShort=Telèfon Skype=Skype Call=Trucar Chat=Xat -PhonePro=Telf. treball -PhonePerso=Telf. particular +PhonePro=Tel. treball +PhonePerso=Tel. personal PhoneMobile=Mòbil No_Email=No enviar e-mailings massius Fax=Fax @@ -245,7 +245,7 @@ ProfId3TN=CNAE ProfId4TN=CCC ProfId5TN=- ProfId6TN=- -ProfId1US=Prof Id (FEIN) <i>associat a l'Administració de taxes dels USA</i> +ProfId1US=FEIN ProfId2US=- ProfId3US=- ProfId4US=- @@ -286,7 +286,7 @@ HasNoRelativeDiscountFromSupplier=No tens descomptes relatius per defecte d'aque CompanyHasAbsoluteDiscount=Aquest client té descomptes disponibles (notes de crèdit o bestretes) per <b>%s</b> %s CompanyHasDownPaymentOrCommercialDiscount=Aquest client té un descompte disponible (comercial, de pagament) per a <b>%s</b>%s CompanyHasCreditNote=Aquest client encara té abonaments per <b>%s</b> %s -HasNoAbsoluteDiscountFromSupplier=No tens crèdit disponible per descomptar d'aquest proveïdor +HasNoAbsoluteDiscountFromSupplier=No teniu disponible cap crèdit de descompte per aquest proveïdor HasAbsoluteDiscountFromSupplier=Disposes de descomptes (notes de crèdits o pagaments pendents) per a <b> %s </b> %s d'aquest proveïdor HasDownPaymentOrCommercialDiscountFromSupplier=Teniu descomptes disponibles (comercials, pagaments inicials) de <b> %s </b> %s d'aquest proveïdor HasCreditNoteFromSupplier=Teniu notes de crèdit per a <b> %s </b> %s d'aquest proveïdor @@ -349,7 +349,7 @@ NewContactAddress=Contacte/Adreça nova MyContacts=Els meus contactes Capital=Capital CapitalOf=Capital de %s -EditCompany=Modificar empresa +EditCompany=Edita l'empresa ThisUserIsNot=Aquest usuari no és client potencial, client o proveïdor VATIntraCheck=Verificar VATIntraCheckDesc=L'enllaç <b>%s</b> permet consultar el NIF intracomunitari al servei de control europeu. Es requereix accés a internet per a que el servei funcioni. @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Verifica el NIF Intracomunitari a la web de la Comissi VATIntraManualCheck=També podeu verificar-ho manualment al lloc web de la Comissió Europea <a href="%s" target="_blank">%s</a> 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 legal +JuridicalStatus=Tipus d'entitat empresarial Workforce=Força de treball Staff=Empleats ProspectLevelShort=Potencial @@ -398,7 +398,7 @@ ProspectsByStatus=Clients potencials per estat NoParentCompany=Cap ExportCardToFormat=Exporta fitxa a format ContactNotLinkedToCompany=Contacte no vinculat a un tercer -DolibarrLogin=Login usuari +DolibarrLogin=Nom d'usuari de Dolibarr NoDolibarrAccess=Sense accés d'usuari ExportDataset_company_1=Tercers (empreses/entitats/persones físiques) i propietats ExportDataset_company_2=Contactes i propietats diff --git a/htdocs/langs/ca_ES/compta.lang b/htdocs/langs/ca_ES/compta.lang index 7cd6406d3ff..36c3821c1be 100644 --- a/htdocs/langs/ca_ES/compta.lang +++ b/htdocs/langs/ca_ES/compta.lang @@ -75,12 +75,12 @@ TypeContrib=Tipus d'aportació MenuSpecialExpenses=Pagaments especials MenuTaxAndDividends=Impostos i càrregues MenuSocialContributions=Impostos varis -MenuNewSocialContribution=Nou impost varis -NewSocialContribution=Nou impost varis +MenuNewSocialContribution=Impost varis nou +NewSocialContribution=Impost varis nou AddSocialContribution=Afegeix un impost varis ContributionsToPay=Impostos varis a pagar AccountancyTreasuryArea=Àrea de facturació i pagament -NewPayment=Nou pagament +NewPayment=Pagament nou PaymentCustomerInvoice=Cobrament factura a client PaymentSupplierInvoice=Pagament de la factura del proveïdor PaymentSocialContribution=Pagament d'impost varis @@ -88,16 +88,16 @@ PaymentVat=Pagament IVA ListPayment=Llistat de pagaments ListOfCustomerPayments=Llistat de cobraments de clients ListOfSupplierPayments=Llista de pagaments a proveïdors -DateStartPeriod=Data d'inici del periode -DateEndPeriod=Data final del periode -newLT1Payment=Nou pagament de RE -newLT2Payment=Nou pagament IRPF +DateStartPeriod=Data d'inici del període +DateEndPeriod=Data final del període +newLT1Payment=Pagament de RE nou +newLT2Payment=Pagament d'IRPF nou LT1Payment=Pagament RE LT1Payments=Pagaments RE LT2Payment=Pagament IRPF LT2Payments=Pagaments IRPF -newLT1PaymentES=Nou pagament de RE -newLT2PaymentES=Nou pagament d'IRPF +newLT1PaymentES=Pagament de RE nou +newLT2PaymentES=Pagament d'IRPF nou LT1PaymentES=Pagament de RE LT1PaymentsES=Pagaments de RE LT2PaymentES=Pagament IRPF @@ -105,19 +105,19 @@ LT2PaymentsES=Pagaments IRPF VATPayment=Pagament d'impost de vendes VATPayments=Pagaments d'impost de vendes VATRefund=Devolució IVA -NewVATPayment=Nou pagament d'impostos a les vendes -NewLocalTaxPayment=Nou pagament d'impostos %s +NewVATPayment=Pagament nou de l'impost sobre les vendes +NewLocalTaxPayment=Pagament nou d'impostos %s Refund=Devolució SocialContributionsPayments=Pagaments d'impostos varis ShowVatPayment=Veure pagaments IVA TotalToPay=Total a pagar -BalanceVisibilityDependsOnSortAndFilters=El balanç es visible en aquest llistat només si la taula està ordenada de manera ascendent sobre %s i filtrada per 1 compte bancari +BalanceVisibilityDependsOnSortAndFilters=El saldo només es pot veure en aquesta llista si la taula està ordenada amb %s i es filtra en 1 compte bancari (sense altres filtres) CustomerAccountancyCode=Codi comptable del client SupplierAccountancyCode=Codi de comptabilitat del venedor CustomerAccountancyCodeShort=Codi compt. cli. SupplierAccountancyCodeShort=Codi compt. prov. AccountNumber=Número de compte -NewAccountingAccount=Nou compte +NewAccountingAccount=Compte nou Turnover=Facturació facturada TurnoverCollected=Facturació recopilada SalesTurnoverMinimum=Facturació mínima @@ -127,12 +127,12 @@ ByUserAuthorOfInvoice=Per autor de la factura CheckReceipt=Ingrés de xec CheckReceiptShort=Ingrés de xec LastCheckReceiptShort=Últimes %s remeses de xec -NewCheckReceipt=Nou descompte -NewCheckDeposit=Nou ingrés +NewCheckReceipt=Descompte nou +NewCheckDeposit=Ingrés nou NewCheckDepositOn=Crea remesa per ingressar al compte: %s NoWaitingChecks=Sense xecs en espera de l'ingrés. DateChequeReceived=Data recepció del xec -NbOfCheques=Nº de xecs +NbOfCheques=Nombre de xecs PaySocialContribution=Pagar un impost varis ConfirmPaySocialContribution=Esteu segur de voler classificar aquest impost varis com a pagat? DeleteSocialContribution=Elimina un pagament d'impost varis @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Esteu segur de voler eliminar el pagament d'aque 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>. -CalcModeDebt=Anàlisi de factures conegudes registrades, fins i tot si encara no estan comptabilitzades en el llibre major. +CalcModeDebt=Anàlisi de documents registrats coneguts encara no comptabilitzats al llibre major. CalcModeEngagement=Anàlisi dels pagaments registrats coneguts, fins i tot si encara no estan comptabilitzat en el Llibre Major. CalcModeBookkeeping=Anàlisi de dades publicades a la taula de compilació de llibres. CalcModeLT1= Metode <b>%sRE factures a client - factures de proveïdor%s</b> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Saldo d'ingressos i despeses, resum anual AnnualByCompanies=Saldo d'ingressos i despeses, per grups de compte predefinits AnnualByCompaniesDueDebtMode=Saldo d'ingressos i despeses, detall per grups predefinits, mode <b> %sReclamacions-Deutes%s</b> és a dir <b>Comptabilitat de compromisos</b>. AnnualByCompaniesInputOutputMode=Saldo d'ingressos i despeses, detall per grups predefinits, mode <b> %sIngresos-Despeses%s</b> és a dir <b>comptabilitat d'efectiu</b>. -SeeReportInInputOutputMode=Veure %sl'anàlisi de pagaments %s per a un càlcul dels pagaments realitzats fins i tot si encara no estan comptabilitzats en el Llibre Major. -SeeReportInDueDebtMode=Veure l'informe %sanàlisi de factures%s per a un càlcul basat en factures registrades conegudes encara que encara no s'hagin comptabilitzat en el Llibre Major. -SeeReportInBookkeepingMode=Veure <b>%sl'informe%s</b> per a un càlcul a <b> Taula de Llibre Major</b> +SeeReportInInputOutputMode=Mostra<b>%sl'anàlisi de pagaments%s</b> per a obtenir un càlcul basat en <b>pagaments registrats</b> realitzats fins i tot si encara no estan comptabilitzats al llibre major +SeeReportInDueDebtMode=Mostra l'<b>%sanàlisi de documents registrats%s </b> per a obtenir un càlcul basat en els <b>documents registrats</b> coneguts, fins i tot si encara no estan comptabilitzats al llibre major. +SeeReportInBookkeepingMode=Mostra <b>%sl'anàlisi de la taula de llibres comptables%s</b> per a obtenir un informe basat en <b>Taula de llibres comptables</b> RulesAmountWithTaxIncluded=- Els imports mostrats són amb tots els impostos inclosos. RulesResultDue=- Inclou factures pendents, despeses, IVA, donacions tant si han estat pagades com si no. També inclou salaris pagats. <br> - Es basa en la data de facturació de les factures i en la data de venciment per despeses o pagaments d’impostos. Per als salaris definits amb el mòdul Salari, s’utilitza la data de valor del pagament. RulesResultInOut=- Inclou els pagaments reals realitzats en les factures, les despeses, l'IVA i els salaris. <br> - Es basa en les dates de pagament de les factures, les despeses, l'IVA i els salaris. La data de la donació per a la donació. @@ -166,7 +166,7 @@ RulesCATotalSaleJournal=Inclou totes les línies de crèdit del Diari de venda. 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> -SeePageForSetup=Veure el menú <a href="%s"> %s </a> per configurar-lo +SeePageForSetup=Veure el menú <a href="%s"> %s </a> per a configurar-lo DepositsAreNotIncluded=- Les factures de bestreta no estan incloses DepositsAreIncluded=- Les factures de bestreta estan incloses LT1ReportByMonth=Informe RE per mes @@ -189,7 +189,7 @@ LT1ReportByQuartersES=Informe per taxa de RE LT2ReportByQuartersES=Informe per taxa de IRPF SeeVATReportInInputOutputMode=Veure l'informe <b>%sIVA pagat%s </b> per a un mode de càlcul estàndard SeeVATReportInDueDebtMode=Veure l'informe <b>%s IVA degut%s </b> per a un mode de càlcul amb l'opció sobre el degut -RulesVATInServices=- Per als serveis, l'informe inclou la normativa de l'IVA rebuts o emesos en base a la data de pagament. +RulesVATInServices=- Per als serveis, l'informe inclou la normativa de l'IVA realment rebuda o emesa en funció de la data de pagament. RulesVATInProducts=- Per a actius materials, l'informe inclou l'IVA rebut o emès a partir de la data de pagament. RulesVATDueServices=- Per als serveis, l'informe inclou l'IVA de les factures degudes, pagades o no basant-se en la data d'aquestes factures. RulesVATDueProducts=- Pel que fa als béns materials, l'informe inclou les factures de l'IVA, segons la data de facturació. @@ -231,7 +231,7 @@ ACCOUNTING_VAT_SOLD_ACCOUNT=Compte de comptabilitat per defecte per l'IVA en ven ACCOUNTING_VAT_BUY_ACCOUNT=Compte de comptabilitat per defecte per l'IVA en les compres (s'utilitza si no es defineix en la configuració del diccionari d'IVA) ACCOUNTING_VAT_PAY_ACCOUNT=Compte comptable per defecte per IVA pagat ACCOUNTING_ACCOUNT_CUSTOMER=Accounting account used for customer third parties -ACCOUNTING_ACCOUNT_CUSTOMER_Desc=El compte de comptabilitat dedicat definit a la targeta de tercers només s'utilitzarà per a la comptabilitat del Llibre Major. Aquest serà utilitzat per al Llibre Major i com a valor predeterminat de la comptabilitat de subcompte si el compte de comptabilitat de clients dedicat a tercers no està definit. +ACCOUNTING_ACCOUNT_CUSTOMER_Desc=El compte comptable dedicat definit a la fitxa de tercer només s’utilitzarà per a la comptabilitat auxiliar. Aquest s'utilitzarà per al llibre major i com a valor per defecte de la comptabilitat auxiliar si no es defineix un compte comptable de client dedicat a tercers. 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 @@ -261,7 +261,7 @@ PurchasebyVatrate=Compra per l'impost sobre vendes LabelToShow=Etiqueta curta PurchaseTurnover=Volum de compres PurchaseTurnoverCollected=Volum de compres recollit -RulesPurchaseTurnoverDue=- Inclou les factures degudes al proveïdor tant si són pagaes com si no. <br> - Es basa en la data de factura d'aquestes factures. <br> +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. ReportPurchaseTurnover=Volum de compres facturat diff --git a/htdocs/langs/ca_ES/cron.lang b/htdocs/langs/ca_ES/cron.lang index c2771dd9a03..96066b666fe 100644 --- a/htdocs/langs/ca_ES/cron.lang +++ b/htdocs/langs/ca_ES/cron.lang @@ -7,10 +7,10 @@ Permission23103 = Elimina la tasca programada Permission23104 = Executa les tasques programades # Admin CronSetup=Pàgina de configuració del mòdul - Gestió de tasques planificades -URLToLaunchCronJobs=URL per comprovar i posar en marxa les tasques automàtiques qualificades -OrToLaunchASpecificJob=O per llançar una tasca específica +URLToLaunchCronJobs=URL per comprovar i iniciar les tasques programades des d'un navegador +OrToLaunchASpecificJob=O per comprovar i iniciar una tasca específica des d’un navegador KeyForCronAccess=Codi de seguretat per a la URL de llançament de tasques automàtiques -FileToLaunchCronJobs=Línia de comando per verificar i executar tasques cron qualificades +FileToLaunchCronJobs=Línia d'ordres per a comprovar i iniciar les tasques cron qualificades CronExplainHowToRunUnix=A entorns Unix s'ha d'utilitzar la següent entrada crontab per executar la comanda cada 5 minuts CronExplainHowToRunWin=En l'entorn de Microsoft (tm) de Windows, podeu utilitzar les Eines de tasques programades per executar la línia de comandaments cada 5 minuts CronMethodDoesNotExists=La classe %s no conté cap mètode %s @@ -22,7 +22,7 @@ EnabledAndDisabled=Habilitat i deshabilitat # Page list CronLastOutput=Última sortida d'execució CronLastResult=Últim codi retornat -CronCommand=Comando +CronCommand=Ordre CronList=Tasques programades CronDelete=Elimina les tasques programades CronConfirmDelete=Vols eliminar aquests treballs programats? @@ -43,13 +43,13 @@ CronModule=Mòdul CronNoJobs=Sense treballs actualment CronPriority=Prioritat CronLabel=Etiqueta -CronNbRun=Nº execucions -CronMaxRun=Número màxim d'execucions +CronNbRun=Nombre d'execucions +CronMaxRun=Nombre màxim d'execucions CronEach=Tota (s) JobFinished=Tasques llançades i finalitzades Scheduled=Programat #Page card -CronAdd= Afegir una tasca +CronAdd= Afegeix tasques CronEvery=Executa cada tasca CronObject=Instància/Objecte a crear CronArgs=Argument @@ -68,15 +68,15 @@ CronClassFileHelp=La ruta relativa i el nom del fitxer a carregar (la ruta és r CronObjectHelp=El nom de l'objecte a carregar. <BR> Per exemple, per cridar al mètode "fetch" de l'objecte Producte de Dolibarr /htdocs/product/class/product.class.php, el valor pel nom del fitxer de classe és<br> <i>Product</i> CronMethodHelp=El mètode d'objecte a cridar. <BR> Per exemple, per cridar al mètode "fetch" de l'objecte Producte de Dolibarr /htdocs/product/class/product.class.php, el valor pel mètode és<br> <i>fetch</i> CronArgsHelp=Els arguments del mètode. <BR> Per exemple, cridar al mètode "fetch" de l'objecte Producte de Dolibarr /htdocs/product/class/product.class.php, el valor dels paràmetres pot ser <br> <i>0, ProductRef</i> -CronCommandHelp=El comando del sistema a executar +CronCommandHelp=La línia d'ordres del sistema a executar. CronCreateJob=Crear nova tasca programada CronFrom=De # Info # Common CronType=Tipus de tasca CronType_method=Mètode per cridar una classe PHP -CronType_command=Comando Shell -CronCannotLoadClass=Impossible carregar el fitxer de la classe %s (per utilitzar la classe %s) +CronType_command=Ordre Shell +CronCannotLoadClass=Impossible carregar el fitxer de la classe %s (per a utilitzar la classe %s) CronCannotLoadObject=El "class file" %s s'ha carregat, però l'objecte %s no s'ha trobat dins d'ell UseMenuModuleToolsToAddCronJobs=Vés al menú "<a href="%s">Inici - Eines d'administració: treballs programats</a>" per veure i editar les tasques programades. JobDisabled=Tasca desactivada @@ -84,3 +84,8 @@ MakeLocalDatabaseDumpShort=Còpia de seguretat de la base de dades local MakeLocalDatabaseDump=Crear un bolcat de la base de dades local. Els paràmetres són: compressió ('gz' o 'bz' o 'none'), tipus de còpia de seguretat ('mysql' o 'pgsql'), 1, 'auto' o nom de fitxer per a compilar, nombre de fitxers de còpia de seguretat per conservar 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=Netejador de dades i anonimitzador +JobXMustBeEnabled=La tasca %s s'ha d'activar +# Cron Boxes +LastExecutedScheduledJob=Darrera tasca programada executada +NextScheduledJobExecute=Propera tasca programada a executar +NumberScheduledJobError=Nombre de tasques programades en error diff --git a/htdocs/langs/ca_ES/dict.lang b/htdocs/langs/ca_ES/dict.lang index 00988d0d397..1d0f708a3e0 100644 --- a/htdocs/langs/ca_ES/dict.lang +++ b/htdocs/langs/ca_ES/dict.lang @@ -166,7 +166,7 @@ CountryNR=Nauru CountryNP=Nepal CountryAN=Antilles Holandeses CountryNC=Nova Caledònia -CountryNZ=Nouvelle-Zélande +CountryNZ=Nova Zelanda CountryNI=Nicaragua CountryNE=Níger CountryNG=Nigèria @@ -197,7 +197,7 @@ CountryPM=San Pedro i Miquelon CountryVC=Saint Vincent i les Grenadines CountryWS=Samoa CountrySM=San Marino -CountryST=São Tomé i Príncipe +CountryST=Sao Tomé i Príncep CountryRS=Serbia CountrySC=Seychelles CountrySL=Sierra Leone @@ -223,7 +223,7 @@ CountryTO=Tonga CountryTT=Trinité-et-Tobago CountryTR=Turquia CountryTM=Turkmenistan -CountryTC=Illes turques i caicos +CountryTC=Illes Turques i Caicos CountryTV=Tuvalu CountryUG=Uganda CountryUA=Ucraïna @@ -245,7 +245,7 @@ CountryGG=Guernesey CountryIM=Ile de Man CountryJE=Jersey CountryME=Monténégro -CountryBL=Saint-Barthélemy +CountryBL=Sant Bartomeu CountryMF=Saint-Martin ##### Civilities ##### @@ -353,7 +353,7 @@ ExpAuto10PCV=10 CV i més ExpAuto11PCV=11 CV i més ExpAuto12PCV=12 CV i més ExpAuto13PCV=13 CV i més -ExpCyclo=Capacitat inferior a 50cm3 +ExpCyclo=Capacitat inferior a 50 cm3 ExpMoto12CV=Moto 1 ó 2 CV ExpMoto345CV=Moto 3, 4 ó 5 CV ExpMoto5PCV=Moto 5 CV i més diff --git a/htdocs/langs/ca_ES/ecm.lang b/htdocs/langs/ca_ES/ecm.lang index f26824bcc38..4f27a022b9e 100644 --- a/htdocs/langs/ca_ES/ecm.lang +++ b/htdocs/langs/ca_ES/ecm.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - ecm -ECMNbOfDocs=Nº de documents en el directori +ECMNbOfDocs=Nombre de documents al directori ECMSection=Carpeta ECMSectionManual=Carpeta manual ECMSectionAuto=Carpeta automàtica @@ -7,15 +7,15 @@ ECMSectionsManual=Arbre manual ECMSectionsAuto=Arbre automàtic ECMSections=Carpetes ECMRoot=Arrel del ECM -ECMNewSection=Nova carpeta -ECMAddSection=Afegir carpeta +ECMNewSection=Carpeta nova +ECMAddSection=Afegeix directori ECMCreationDate=Data creació ECMNbOfFilesInDir=Nombre d'arxius a la carpeta -ECMNbOfSubDir=nombre de subcarpetes +ECMNbOfSubDir=Nombre de subcarpetes ECMNbOfFilesInSubDir=Nombre d'arxius en les subcarpetes ECMCreationUser=Creador ECMArea=Àrea SGD/GCE -ECMAreaDesc=L'àrea SGD / GCE (Sistema de Gestió de Documents / Gestió de Continguts Electrònics) et permet desar, compartir i cercar ràpidament tot tipus de documents a Dolibarr. +ECMAreaDesc=L’àrea SGD/GED (Sistema de Gestió de Documents / Gestió de Continguts Electrònics) us permet desar, compartir i cercar ràpidament tota mena de documents a Dolibarr. ECMAreaDesc2=Podeu crear carpetes manuals i adjuntar els documents<br>Les carpetes automàtiques són emplenades automàticament en l'addició d'un document en una fitxa. ECMSectionWasRemoved=La carpeta <b>%s</b> ha estat eliminada ECMSectionWasCreated=S'ha creat el directori <b>%s</b>. @@ -33,7 +33,7 @@ CannotRemoveDirectoryContainsFilesOrDirs=L'eliminació no és possible perquè c CannotRemoveDirectoryContainsFiles=L'eliminació no és possible perquè conté alguns fitxers ECMFileManager=Explorador de fitxers ECMSelectASection=Seleccioneu una carpeta en l'arbre... -DirNotSynchronizedSyncFirst=Aquest directori sembla que s'ha creat o modificat fora del mòdul ECM. Heu de prémer el botó "Resincronitzar" per sincronitzar el disc i la base de dades per obtenir el contingut d'aquest directori. +DirNotSynchronizedSyncFirst=Sembla que aquest directori es va crear o modificar fora del mòdul ECM. Primer heu de fer clic al botó "Resincronitza" per sincronitzar el disc i la base de dades per a obtenir el contingut d'aquest directori. ReSyncListOfDir=Resincronitzar la llista de directoris HashOfFileContent=Resum matemàtic ("hash") del contingut del fitxer NoDirectoriesFound=No s'han trobat directoris diff --git a/htdocs/langs/ca_ES/errors.lang b/htdocs/langs/ca_ES/errors.lang index 520515f844c..26ff6a8f8bd 100644 --- a/htdocs/langs/ca_ES/errors.lang +++ b/htdocs/langs/ca_ES/errors.lang @@ -8,7 +8,8 @@ ErrorBadEMail=Correu electrònic %s és incorrecte ErrorBadMXDomain=El correu electrònic %s sembla incorrecte (el domini no té cap registre MX vàlid) ErrorBadUrl=Url %s invàlida ErrorBadValueForParamNotAString=Valor incorrecte del paràmetre. Acostuma a passar quan falta la traducció. -ErrorLoginAlreadyExists=El login %s ja existeix. +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>'. @@ -22,7 +23,7 @@ ErrorFailToDeleteDir=Error en eliminar la carpeta '<b>%s</b>'. ErrorFailToMakeReplacementInto=Failed to make replacement into file '<b>%s</b>'. ErrorFailToGenerateFile=Failed to generate file '<b>%s</b>'. ErrorThisContactIsAlreadyDefinedAsThisType=Aquest contacte ja està definit com a contacte per a aquest tipus. -ErrorCashAccountAcceptsOnlyCashMoney=Aquesta compte bancari és de tipus caixa i només accepta el mètode de pagament de tipus <b>espècie</b>. +ErrorCashAccountAcceptsOnlyCashMoney=Aquest compte bancari és un compte d'efectiu, de manera que només accepta pagaments de tipus efectiu. ErrorFromToAccountsMustDiffers=El compte origen i destinació han de ser diferents. ErrorBadThirdPartyName=Valor incorrecte per al nom de tercers ErrorProdIdIsMandatory=El %s es obligatori @@ -49,6 +50,7 @@ ErrorFieldsRequired=No s'han indicat alguns camps obligatoris ErrorSubjectIsRequired=The email topic is required ErrorFailedToCreateDir=Error en la creació d'una carpeta. Comprovi que l'usuari del servidor web té drets d'escriptura en les carpetes de documents de Dolibarr. Si el paràmetre <b>safe_mode</b> està actiu en aquest PHP, Comproveu que els fitxers php dolibarr pertanyen a l'usuari del servidor web. ErrorNoMailDefinedForThisUser=E-Mail no definit per a aquest usuari +ErrorSetupOfEmailsNotComplete=La configuració dels correus electrònics no s'ha completat ErrorFeatureNeedJavascript=Aquesta funcionalitat requereix javascript actiu per funcionar. Modifiqueu en configuració->entorn. ErrorTopMenuMustHaveAParentWithId0=Un menú del tipus 'Superior' no pot tenir un menú pare. Poseu 0 al menú pare o trieu un menú del tipus 'Esquerra'. ErrorLeftMenuMustHaveAParentId=Un menú del tipus 'Esquerra' ha de tenir un ID de pare @@ -59,7 +61,7 @@ ErrorDirAlreadyExists=Ja existeix una carpeta amb aquest nom. ErrorFileAlreadyExists=Ja existeix un fitxer amb aquest nom. ErrorPartialFile=Arxiu no rebut íntegrament pel servidor. ErrorNoTmpDir=Directori temporal de recepció %s inexistent -ErrorUploadBlockedByAddon=Pujada bloquejada per un plugin PHP/Apache. +ErrorUploadBlockedByAddon=Càrrega bloquejada per un connector PHP/Apache. ErrorFileSizeTooLarge=La mida del fitxer és massa gran. ErrorFieldTooLong=El camp %s és massa llarg. ErrorSizeTooLongForIntType=Longitud del camp massa llarg per al tipus int (màxim %s xifres) @@ -74,10 +76,10 @@ 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 creat un arxiu .ldif a la carpeta %s. Intenta carregar-lo manualment des de la línia de comandes per tenir més informació sobre l'error. +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. ErrorCantSaveADoneUserWithZeroPercentage=No es pot desar una acció amb "estat no iniciat" si el camp "fet per" també s'omple. -ErrorRefAlreadyExists=La referència utilitzada per a la creació ja existeix -ErrorPleaseTypeBankTransactionReportName=Si us plau, tecleja el nom del extracte bancari on s'informa del registre (format AAAAMM o AAAAMMDD) +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. @@ -133,14 +135,14 @@ ErrorModuleFileRequired=Ha de seleccionar un arxiu del paquet del mòdul de Doli ErrorPhpCurlNotInstalled=L'extensió PHP CURL no es troba instal·lada, és indispensable per dialogar amb Paypal. ErrorFailedToAddToMailmanList=S'ha produït un error en intentar afegir un registre a la llista Mailman o base de dades SPIP ErrorFailedToRemoveToMailmanList=Error en l'eliminació de %s de la llista Mailmain %s o base SPIP -ErrorNewValueCantMatchOldValue=El Nou valor no pot ser igual al antic +ErrorNewValueCantMatchOldValue=El valor nou no pot ser igual al valor antic ErrorFailedToValidatePasswordReset=No s'ha pogut restablir la contrasenya. És possible que aquest enllaç ja s'hagi utilitzat (aquest enllaç només es pot utilitzar una vegada). Si no és el cas prova de reiniciar el procés de restabliment de contrasenya des del principi. ErrorToConnectToMysqlCheckInstance=Error de connexió amb la base de dades. Comprovi que el servidor de la base de dades està funcionant (per exemple, amb mysql/mariadb, pot iniciar-lo amb el comandament 'sudo service mysql start') ErrorFailedToAddContact=Error en l'addició del contacte ErrorDateMustBeBeforeToday=La data ha de ser inferior a la d’avui ErrorDateMustBeInFuture=La data ha de ser major que avui ErrorPaymentModeDefinedToWithoutSetup=S'ha establert la forma de pagament al tipus %s però a la configuració del mòdul de factures no s'ha indicat la informació per mostrar aquesta forma de pagament. -ErrorPHPNeedModule=Error, el seu PHP ha de tenir instal·lat el mòdul <b>%s</b> per utilitzar aquesta funcionalitat. +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 ErrorWarehouseMustDiffers=El magatzem d'origen i destí han de ser diferents ErrorBadFormat=El format és incorrecte! @@ -173,7 +175,7 @@ ErrorTryToMakeMoveOnProductRequiringBatchData=Error, intentant fer un moviment d 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ó ErrorGlobalVariableUpdater0=Petició HTTP fallida amb error '%s' -ErrorGlobalVariableUpdater1=Format JSON '%s' invalid +ErrorGlobalVariableUpdater1=Format JSON no vàlid "%s" ErrorGlobalVariableUpdater2=Falta el paràmetre '%s' ErrorGlobalVariableUpdater3=No s'han trobat les dades sol·licitades ErrorGlobalVariableUpdater4=El client SOAP ha fallat amb l'error '%s' @@ -181,7 +183,7 @@ ErrorGlobalVariableUpdater5=Sense variable global seleccionada ErrorFieldMustBeANumeric=El camp <b>%s</b> ha de ser un valor numèric ErrorMandatoryParametersNotProvided=Paràmetre/s obligatori/s no definits ErrorOppStatusRequiredIfAmount=Establiu una quantitat estimada d'aquest avantatge. Així que també heu d'introduir el seu estat. -ErrorFailedToLoadModuleDescriptorForXXX=Failed to load module descriptor class for %s +ErrorFailedToLoadModuleDescriptorForXXX=No s'ha pogut carregar la classe del descriptor del mòdul per %s ErrorBadDefinitionOfMenuArrayInModuleDescriptor=Definició incorrecta del menú Array en el descriptor del mòdul (valor incorrecte per a la clau fk_menu) ErrorSavingChanges=S'ha produït un error en desar els canvis ErrorWarehouseRequiredIntoShipmentLine=El magatzem és obligatori en la línia a enviar @@ -199,7 +201,7 @@ ErrorFieldAccountNotDefinedForBankLine=Value for Accounting account not defined 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, el nom del comunicat del banc deu de seguir la regla de sintaxis %s -ErrorPhpMailDelivery=Comproveu que no faci servir un nombre massa alt de destinataris i que el seu contingut de correu electrònic no sigui similar a un Spam. Demani també al seu administrador que verifiqui el tallafocs i els arxius dels registres del servidor per obtenir una informació més completa. +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. ErrorTaskAlreadyAssigned=La tasca també està assignada a l'usuari ErrorModuleFileSeemsToHaveAWrongFormat=Pareix que el mòdul té un format incorrecte. @@ -207,7 +209,7 @@ ErrorModuleFileSeemsToHaveAWrongFormat2=Al ZIP d'un mòdul ha d'haver necessàri ErrorFilenameDosNotMatchDolibarrPackageRules=El nom de l'arxiu del mòdul (<strong>%s</strong>) no coincideix amb la sintaxi del nom esperat: <strong>%s</strong> ErrorDuplicateTrigger=Error, nom de disparador %s duplicat. Ja es troba carregat des de %s. ErrorNoWarehouseDefined=Error, no hi ha magatzems definits. -ErrorBadLinkSourceSetButBadValueForRef=The link you use is not valid. A 'source' for payment is defined, but value for 'ref' is not valid. +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) ErrorObjectMustHaveStatusDraftToBeValidated=L'objecte %s ha de tenir l'estat 'Esborrany' per ser validat. @@ -224,10 +226,10 @@ ErrorDuringChartLoad=S'ha produït un error en carregar el gràfic de comptes. S 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). ErrorURLMustStartWithHttp=L'URL %s ha de començar amb http: // o https: // -ErrorNewRefIsAlreadyUsed=Error, la nova referència ja s’està utilitzant +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. -ErrorObjectMustHaveStatusActiveToBeDisabled=Per desactivar els objectes, han de tenir l'estat "Actiu" +ErrorObjectMustHaveStatusActiveToBeDisabled=Per a desactivar els objectes, han de tenir l'estat "Actiu" ErrorObjectMustHaveStatusDraftOrDisabledToBeActivated=Per ser activats, els objectes han de tenir l'estat "Esborrany" o "Desactivat" ErrorNoFieldWithAttributeShowoncombobox=Cap camp té la propietat "showoncombobox" en la definició de l'objecte "%s". No es pot mostrar el llistat desplegable. ErrorFieldRequiredForProduct=El camp "%s" és obligatori per al producte %s @@ -246,10 +248,18 @@ ErrorProductDoesNotNeedBatchNumber=Error, el producte '<b> %s </b>' no accepta u 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 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 +ErrorNotAvailableWithThisDistribution=No disponible amb aquesta distribució +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ó + # 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í -WarningMandatorySetupNotComplete=Feu clic aquí per configurar els paràmetres obligatoris +WarningMandatorySetupNotComplete=Feu clic aquí per a configurar els paràmetres obligatoris WarningEnableYourModulesApplications=Feu clic aquí per 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. @@ -266,7 +276,7 @@ WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Funcionalitat deshabilita WarningPaymentDateLowerThanInvoiceDate=La data de pagament (%s) és anterior a la data (%s) de la factura %s. WarningTooManyDataPleaseUseMoreFilters=Massa dades (més de %s línies). Utilitza més filtres o indica la constant %s amb un límit superior. WarningSomeLinesWithNullHourlyRate=Algunes vegades es van registrar per alguns usuaris quan no s'havia definit el seu preu per hora. Es va utilitzar un valor de 0 %s per hora, però això pot resultar una valoració incorrecta del temps dedicat. -WarningYourLoginWasModifiedPleaseLogin=El teu login s'ha modificat. Per seguretat has de fer login amb el nou login abans de la següent acció. +WarningYourLoginWasModifiedPleaseLogin=El vostre nom d'usuari s'ha modificat. Per motius de seguretat, haureu d'iniciar sessió amb el vostre nou nom d'usuari abans de la propera acció. WarningAnEntryAlreadyExistForTransKey=Ja existeix una entrada per la clau de traducció d'aquest idioma WarningNumberOfRecipientIsRestrictedInMassAction=Advertència: el nombre de destinataris diferents està limitat a <b> %s </b> quan s'utilitzen les accions massives a les llistes. WarningDateOfLineMustBeInExpenseReportRange=Advertència, la data de la línia no està dins del rang de l'informe de despeses @@ -275,4 +285,5 @@ WarningProjectClosed=El projecte està tancat. Heu de tornar a obrir primer. WarningSomeBankTransactionByChequeWereRemovedAfter=Algunes transaccions bancàries es van suprimir després que es generés el rebut que les conté. Per tant, el nombre de xecs i el total de rebuts poden diferir del nombre i el total a la llista. WarningFailedToAddFileIntoDatabaseIndex=Advertiment: no s'ha pogut afegir l'entrada de fitxer a la taula d'índex de la base de dades ECM 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 trobar-los en aquesta llista. +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. diff --git a/htdocs/langs/ca_ES/exports.lang b/htdocs/langs/ca_ES/exports.lang index 5a0d95fcf7d..f66769a30f7 100644 --- a/htdocs/langs/ca_ES/exports.lang +++ b/htdocs/langs/ca_ES/exports.lang @@ -1,8 +1,8 @@ # Dolibarr language file - Source file is en_US - exports ExportsArea=Exportacions ImportArea=Importació -NewExport=Nova exportació -NewImport=Nova importació +NewExport=Exportació nova +NewImport=Importació nova ExportableDatas=Conjunt de dades exportables ImportableDatas=Conjunt de dades importables SelectExportDataSet=Trieu un conjunt predefinit de dades que voleu exportar ... @@ -23,7 +23,7 @@ DatasetToImport=Lot de dades a importar ChooseFieldsOrdersAndTitle=Trieu l'ordre dels camps ... FieldsTitle=Títol camps FieldTitle=Títol camp -NowClickToGenerateToBuildExportFile=Ara, seleccioneu el format del fitxer al quadre combinat i feu clic a "Generar" per generar el fitxer d'exportació ... +NowClickToGenerateToBuildExportFile=Ara, seleccioneu el format de fitxer al quadre combinat i feu clic a "Genera" per a crear el fitxer d'exportació... AvailableFormats=Formats disponibles LibraryShort=Llibreria ExportCsvSeparator=Caràcter separador del CSV @@ -35,7 +35,7 @@ FormatedImportDesc2=El primer pas és triar el tipus de dades que voleu importar FormatedExport=Assistent d'exportació FormatedExportDesc1=Aquestes eines permeten l'exportació de dades personalitzades mitjançant un assistent, per ajudar-vos en el procés sense necessitat de coneixements tècnics. FormatedExportDesc2=El primer pas és triar un conjunt de dades predefinit, després els camps que voleu exportar i en quin ordre. -FormatedExportDesc3=Quan se seleccionen les dades per exportar, podeu triar el format del fitxer de sortida. +FormatedExportDesc3=Quan se seleccionen les dades per a exportar, podeu triar el format del fitxer de sortida. Sheet=Fulla NoImportableData=Sense taules de dades importables (cap mòdul amb les definicions dels perfils d'importació està actiu) FileSuccessfullyBuilt=Fitxer generat @@ -92,8 +92,8 @@ NbOfLinesOK=Nombre de línies sense errors ni warnings: <b>%s</b>. NbOfLinesImported=Nombre de línies correctament importades: <b>%s</b>. DataComeFromNoWhere=El valor a inserir no correspon a cap camp de l'arxiu origen. DataComeFromFileFieldNb=El valor a inserir es correspon al camp nombre <<b>%s</b> de l'arxiu origen. -DataComeFromIdFoundFromRef=El valor que prové del número de camp <b> %s </b> del fitxer d'origen s'utilitzarà per trobar l'id del objecte primari que s'utilitzarà (de manera que l'objecte <b> %s </b> que té la referència del fitxer d'origen ha d'existir a la base de dades). -DataComeFromIdFoundFromCodeId=El codi que prové del número de camp <b> %s </b> del fitxer d'origen s'utilitzarà per trobar l'id del seu objecte primari a utilitzar (pel que el codi del fitxer d'origen ha d'existir al diccionari <b> %s </b>). Tingueu en compte que si coneixeu l'identificador, també podeu utilitzar-lo al fitxer font en lloc del codi. La importació ha de funcionar en ambdós casos. +DataComeFromIdFoundFromRef=El valor que prové del camp numèric <b>%s</b> del fitxer d'origen s'utilitzarà per a trobar l'id de l'objecte pare que s'utilitzarà (de manera que l'objecte <b>%s</b> que té la referència del fitxer d'origen ha d'existir a la base de dades). +DataComeFromIdFoundFromCodeId=El codi que prové del camp numèric <b>%s</b> del fitxer d'origen s'utilitzarà per a trobar l'id de l'objecte pare a utilitzar (pel que el codi del fitxer d'origen ha d'existir al diccionari <b>%s</b>). Tingueu en compte que si coneixeu l'identificador, també podeu utilitzar-lo al fitxer font en lloc del codi. La importació ha de funcionar en ambdós casos. DataIsInsertedInto=Les dades de l'arxiu d'origen s'inseriran en el següent camp: DataIDSourceIsInsertedInto=L'identificador de l'objecte primari s'ha trobat utilitzant les dades del fitxer d'origen, s'inserirà en el camp següent: DataCodeIDSourceIsInsertedInto=L'id de la línia pare trobada a partir del codi, s'ha d'inserir en el següent camp: @@ -117,8 +117,8 @@ ImportFromLine=Importa començant des del número de línia EndAtLineNb=Final en el número de línia ImportFromToLine=Interval límit (Des de - Fins a). Per exemple per a ometre les línies de capçalera. SetThisValueTo2ToExcludeFirstLine=Per exemple, estableixi aquest valor a 3 per excloure les 2 primeres línies. <br> Si no s'ometen les línies de capçalera, això provocarà diversos errors en la simulació d'importació. -KeepEmptyToGoToEndOfFile=Mantingueu aquest camp buit per processar totes les línies al final del fitxer. -SelectPrimaryColumnsForUpdateAttempt=Seleccioneu les columnes que s'utilitzaran com a clau principal per a una importació UPDATE +KeepEmptyToGoToEndOfFile=Mantingueu aquest camp buit per a processar totes les línies fins al final del fitxer. +SelectPrimaryColumnsForUpdateAttempt=Seleccioneu les columnes que vulgueu utilitzar com a clau principal per a la importació d'ACTUALITZACIÓ UpdateNotYetSupportedForThisImport=L'actualització no és compatible amb aquest tipus d'importació (només afegir) NoUpdateAttempt=No s'ha realitzat cap intent d'actualització, només afegir ImportDataset_user_1=Usuaris (empleats o no) i propietats @@ -130,6 +130,7 @@ FilteredFieldsValues=Valors de filtres FormatControlRule=Regla de control de format ## imports updates KeysToUseForUpdates=Clau (columna) a utilitzar per <b> actualització </b> dades existents -NbInsert=Número de línies afegides: %s -NbUpdate=Número de línies actualizades: %s +NbInsert=Nombre de línies afegides: %s +NbUpdate=Nombre de línies actualitzades: %s MultipleRecordFoundWithTheseFilters=S'han trobat múltiples registres amb aquests filtres: %s +StocksWithBatch=Estocs i ubicacions (magatzem) de productes amb número de lot/sèrie diff --git a/htdocs/langs/ca_ES/holiday.lang b/htdocs/langs/ca_ES/holiday.lang index e1143a0ae38..5a0098d8bdd 100644 --- a/htdocs/langs/ca_ES/holiday.lang +++ b/htdocs/langs/ca_ES/holiday.lang @@ -3,7 +3,7 @@ HRM=RRHH Holidays=Dies lliures CPTitreMenu=Dies lliures MenuReportMonth=Estat mensual -MenuAddCP=Nova petició de dia lliure +MenuAddCP=Sol·licitud nova de permís NotActiveModCP=Ha d'activar el mòdul Dies lliures retribuïts per veure aquesta pàgina AddCP=Realitzar una petició de dies lliures DateDebCP=Data inici @@ -15,14 +15,14 @@ CancelCP=Anul·lada RefuseCP=Rebutjada ValidatorCP=Validador ListeCP=Llista de dies lliures -Leave=Fitxa de dies lliures +Leave=Sol·licitud de permís LeaveId=Identificador de baixa ReviewedByCP=Serà revisada per UserID=ID d'usuari UserForApprovalID=Usuari per al ID d'aprovació UserForApprovalFirstname=Nom de l'usuari d'aprovació UserForApprovalLastname=Cognom de l'usuari d'aprovació -UserForApprovalLogin=Login de l'usuari d'aprovació +UserForApprovalLogin=Nom d'usuari de l’usuari d’aprovació DescCP=Descripció SendRequestCP=Enviar la petició de dies lliures DelayToRequestCP=Les peticions de dies lliures s'han de realitzar al menys <b>%s dies</b> abans. @@ -33,7 +33,7 @@ ErrorSQLCreateCP=S'ha produït un error de SQL durant la creació: ErrorIDFicheCP=S'ha produït un error, aquesta sol·licitud de dies lliures no existeix ReturnCP=Tornar a la pàgina anterior ErrorUserViewCP=No esta autoritzat a llegir aquesta petició de dies lliures. -InfosWorkflowCP=Informació del workflow +InfosWorkflowCP=Informació del flux de treball RequestByCP=Comandada per TitreRequestCP=Fitxa de dies lliures TypeOfLeaveId=Tipus d'identificador de baixa @@ -46,14 +46,14 @@ NbUseDaysCPShortInMonth=Dies consumits al mes DayIsANonWorkingDay=%s és un dia no laborable DateStartInMonth=Data d'inici al mes DateEndInMonth=Data de finalització al mes -EditCP=Modificar +EditCP=Edita DeleteCP=Eliminar ActionRefuseCP=Rebutja ActionCancelCP=Cancel·la StatutCP=Estat TitleDeleteCP=Eliminar la petició de dies lliures ConfirmDeleteCP=Estàs segur de voler eliminar aquesta petició de dies lliures? -ErrorCantDeleteCP=Error, no te permisos per eliminar aquesta petició de dies lliures +ErrorCantDeleteCP=Error, no teniu permisos per a suprimir aquesta sol·licitud de permís. CantCreateCP=Note permisos per realitzar peticions de dies lliures InvalidValidatorCP=Ha d'indicar un validador per la seva petició de dies lliures NoDateDebut=Ha d'indicar una data d'inici. @@ -80,12 +80,12 @@ UserCP=Usuari ErrorAddEventToUserCP=S'ha produït un error en l'assignació del permís excepcional. AddEventToUserOkCP=S'ha afegit el permís excepcional. MenuLogCP=Veure registre de canvis -LogCP=Historial d'actualizacions de dies lliures +LogCP=Registre d’actualitzacions dels dies de vacances disponibles ActionByCP=Realitzat per UserUpdateCP=Per a l'usuari PrevSoldeCP=Saldo anterior -NewSoldeCP=Nou saldo -alreadyCPexist=Ha s'ha efectuat una petició de dies lliures per aquest periode +NewSoldeCP=Saldo nou +alreadyCPexist=En aquest període ja s’ha fet una sol·licitud de dia lliure. FirstDayOfHoliday=Primer dia lliure LastDayOfHoliday=Últim dia de vacances BoxTitleLastLeaveRequests=Últimes %s peticions de dies lliures modificades @@ -113,22 +113,22 @@ ErrorMailNotSend=S'ha produït un error en l'enviament del correu electrònic: NoticePeriod=Preavís #Messages HolidaysToValidate=Dies lliures retribuïts a validar -HolidaysToValidateBody=A continuació trobara una sol·licitud de dies lliures retribuïts per validar +HolidaysToValidateBody=A continuació es mostra una sol·licitud de permís per a validar HolidaysToValidateDelay=Aquesta sol·licitud de dies lliures retribuïts tindrà lloc en un termini de menys de %s dies. HolidaysToValidateAlertSolde=L'usuari que ha realitzat la sol·licitud de dies lliures retribuïts no disposa de suficients dies disponibles -HolidaysValidated=Dies lliures retribuïts valids +HolidaysValidated=Sol·licituds de permís validats HolidaysValidatedBody=La seva sol·licitud de dies lliures retribuïts des de el %s al %s ha sigut validada. HolidaysRefused=Dies lliures retribuïts denegats HolidaysRefusedBody=La seva sol·licitud de dies lliures retribuïts des de el %s al %s ha sigut denegada per el següent motiu: HolidaysCanceled=Dies lliures retribuïts cancel·lats -HolidaysCanceledBody=La seva solicitud de dies lliures retribuïts del %s al %s ha sigut cancel·lada. +HolidaysCanceledBody=S'ha cancel·lat la vostra sol·licitud de permís del %s al %s. FollowedByACounter=1: Aquest tipus de dia lliure necessita el seguiment d'un comptador. El comptador s'incrementa manualment o automàticament i quan hi ha una petició de dia lliure validada, el comptador es decrementa.<br>0: No seguit per un comptador. NoLeaveWithCounterDefined=No s'han definit els tipus de dies lliures que son necessaris per poder seguir-los amb comptador -GoIntoDictionaryHolidayTypes=Ves a <strong>Inici - Configuració - Diccionaris - Tipus de dies lliures</strong> per configurar els diferents tipus de dies lliures +GoIntoDictionaryHolidayTypes=Ves a <strong>Inici - Configuració - Diccionaris - Tipus de dies lliures</strong> per a configurar els diferents tipus de dies lliures HolidaySetup=Configuració del mòdul Vacances HolidaysNumberingModules=Models numerats de sol·licituds de dies lliures -TemplatePDFHolidays=Plantilla de sol · licitud de dies lliures en PDF +TemplatePDFHolidays=Plantilla per a sol·licituds de permisos en PDF FreeLegalTextOnHolidays=Text gratuït a PDF WatermarkOnDraftHolidayCards=Marques d'aigua sobre esborranys de sol·licituds de dies lliures -HolidaysToApprove=Vacances per aprovar -NobodyHasPermissionToValidateHolidays=Ningú té permís per validar vacances +HolidaysToApprove=Vacances per a aprovar +NobodyHasPermissionToValidateHolidays=Ningú no té permís per a validar les vacances diff --git a/htdocs/langs/ca_ES/hrm.lang b/htdocs/langs/ca_ES/hrm.lang index 2952d702637..cc584a4d291 100644 --- a/htdocs/langs/ca_ES/hrm.lang +++ b/htdocs/langs/ca_ES/hrm.lang @@ -1,6 +1,6 @@ # Dolibarr language file - en_US - hrm # Admin -HRM_EMAIL_EXTERNAL_SERVICE=Correu electrònic per prevenir serveis externs HRM +HRM_EMAIL_EXTERNAL_SERVICE=Correu electrònic per a evitar el servei extern de HRM Establishments=Establiments Establishment=Establiment NewEstablishment=Establiment nou diff --git a/htdocs/langs/ca_ES/install.lang b/htdocs/langs/ca_ES/install.lang index 98b6efbeb16..485ed64c1c8 100644 --- a/htdocs/langs/ca_ES/install.lang +++ b/htdocs/langs/ca_ES/install.lang @@ -42,7 +42,7 @@ WebPagesDirectory=Carpeta que conté les pàgines web DocumentsDirectory=Carpeta que ha de contenir els documents generats (PDF, etc.) URLRoot=URL Arrel ForceHttps=Forçar connexions segures (https) -CheckToForceHttps=Marqueu aquesta opció per forçar connexions segures (https).<br>Per a això és necessari que el servidor web està configurat amb un certificat SSL. +CheckToForceHttps=Marqueu aquesta opció per a forçar connexions segures (https). <br> Això requereix que el servidor web estigui configurat amb un certificat SSL. DolibarrDatabase=Base de dades Dolibarr DatabaseType=Tipus de la base de dades DriverType=Tipus del driver @@ -89,21 +89,21 @@ GoToUpgradePage=Ves de nou a la pàgina d'actualització WithNoSlashAtTheEnd=Sense el signe "/" al final DirectoryRecommendation= <span class="warning"> IMPORTANT </span>: Heu d'utilitzar un directori que es troba fora de les pàgines web (no utilitzeu un subdirector del paràmetre anterior). LoginAlreadyExists=Ja existeix -DolibarrAdminLogin=Login de l'usuari administrador de Dolibarr +DolibarrAdminLogin=Nom d'usuari d’administrador de Dolibarr AdminLoginAlreadyExists=El compte d'administrador de Dolibarr '<b> %s </b>' ja existeix. Torneu enrere si voleu crear un altre. FailedToCreateAdminLogin=No s'ha pogut crear el compte d'administrador de Dolibarr. -WarningRemoveInstallDir=Avís, per motius de seguretat, un cop finalitzada la instal·lació o l'actualització, heu d'afegir un fitxer anomenat <b> install.lock </b> al directori del document Dolibarr per evitar l'ús accidental / maliciós de les eines d'instal·lació de nou. +WarningRemoveInstallDir=Advertiment, per motius de seguretat, un cop finalitzada la instal·lació o actualització, heu d'afegir un fitxer anomenat <b> install.lock </b> al directori del document Dolibarr per a evitar l'ús accidental / malintencionat de les eines d'instal·lació. FunctionNotAvailableInThisPHP=No està disponible en aquest PHP ChoosedMigrateScript=Elecció de l'script de migració DataMigration=Migració de la base de dades (dades) DatabaseMigration=Migració de la base de dades (estructura + algunes dades) ProcessMigrateScript=Execució del script -ChooseYourSetupMode=Tria el teu mètode d'instal·lació i fes clic a "Començar" +ChooseYourSetupMode=Trieu el mode de configuració i feu clic a "Comença"... FreshInstall=Nova instal·lació FreshInstallDesc=Utilitzeu aquest mode si aquesta és la vostra primera instal·lació. Si no, aquest mode pot reparar una instal·lació prèvia incompleta. Si voleu actualitzar la vostra versió, seleccioneu "Actualitzar". Upgrade=Actualització UpgradeDesc=Utilitzeu aquest mètode després d'haver actualitzat els fitxers d'una instal·lació Dolibarr antiga pels d'una versió més recent. Aquesta elecció permet posar al dia la base de dades i les seves dades per a aquesta nova versió. -Start=Començar +Start=Comença InstallNotAllowed=Instal·lació no autoritzada per els permisos de l'arxiu <b>conf.php</b> YouMustCreateWithPermission=Ha de crear un fitxer %s i donar-li els drets d'escriptura al servidor web durant el procés d'instal·lació. CorrectProblemAndReloadPage=Corregiu el problema i premeu F5 per tornar a carregar la pàgina. @@ -117,7 +117,7 @@ YouAskLoginCreationSoDolibarrNeedToConnect=Heu seleccionat crear un usuari de ba BecauseConnectionFailedParametersMayBeWrong=La connexió a la base de dades ha fallat: els paràmetres de l'amfitrió o superusuari han de ser incorrectes. OrphelinsPaymentsDetectedByMethod=Pagaments orfes detectats pel mètode %s RemoveItManuallyAndPressF5ToContinue=Esborreu manualment i premeu F5 per continuar. -FieldRenamed=Camp renombrat +FieldRenamed=S'ha canviat el nom del camp IfLoginDoesNotExistsCheckCreateUser=Si l'usuari encara no existeix, heu de marcar l'opció "Crear usuari" ErrorConnection=El servidor "<b> %s </b>", el nom de la base de dades "<b> %s </b>", inici de sessió "<b> %s </b>" o la contrasenya de la base de dades pot ser incorrecte o la versió del client PHP pot ser massa antiga en comparació amb la versió de la base de dades. InstallChoiceRecommanded=Opció recomanada per a instal·lar la versió <b>%s</b> sobre la seva actual versió <b>%s</b> @@ -126,13 +126,13 @@ MigrateIsDoneStepByStep=La versió específica (%s) té un buit de diverses vers CheckThatDatabasenameIsCorrect=Comproveu que el nom de la base de dades "<b> %s </b>" sigui correcte. IfAlreadyExistsCheckOption=Si el nom és correcte i la base de dades no existeix, heu de seleccionar l'opció "Crear la base de dades" OpenBaseDir=Paràmetre php openbasedir -YouAskToCreateDatabaseSoRootRequired=Heu marcat el quadre "Crea una base de dades". Per això, heu de proporcionar el login / contrasenya del superusuari (part inferior del formulari). -YouAskToCreateDatabaseUserSoRootRequired=Heu marcat el quadre "Crea propietari de la base de dades". Per això, heu de proporcionar el login / contrasenya del superusuari (part inferior del formulari). +YouAskToCreateDatabaseSoRootRequired=Heu marcat el quadre "Crea una base de dades". Per això, heu de proporcionar el nom d'usuari / contrasenya del superusuari (part inferior del formulari). +YouAskToCreateDatabaseUserSoRootRequired=Heu marcat el quadre "Crea propietari de la base de dades". Per això, heu de proporcionar el nom d'usuari / contrasenya del superusuari (part inferior del formulari). NextStepMightLastALongTime=El següent pas pot trigar diversos minuts. Després d'haver validat, li agraïm esperi a la completa visualització de la pàgina següent per continuar. -MigrationCustomerOrderShipping=Actualització de les dades de expedicions de comandes de clients -MigrationShippingDelivery=Actualització de les dades de expedicions -MigrationShippingDelivery2=Actualització de les dades expedicions 2 -MigrationFinished=Acabada l'actualització +MigrationCustomerOrderShipping=Migració de dades d'enviament de comandes de venda +MigrationShippingDelivery=Actualització de les dades d'enviaments +MigrationShippingDelivery2=Actualització de les dades d'enviaments 2 +MigrationFinished=S'ha acabat la migració LastStepDesc=<strong> Darrer pas </strong>: definiu aquí l'inici de sessió i la contrasenya que voleu utilitzar per connectar-se a Dolibarr. <b> No perdis això, ja que és el compte mestre per administrar tots els altres / comptes d'usuari addicionals.</b> ActivateModule=Activació del mòdul %s ShowEditTechnicalParameters=Premi aquí per veure/editar els paràmetres tècnics (mode expert) @@ -142,9 +142,9 @@ KeepDefaultValuesWamp=Heu utilitzat l'assistent de configuració Dolibarr de Dol KeepDefaultValuesDeb=Heu utilitzat l'assistent de configuració Dolibarr des d'un paquet Linux (Ubuntu, Debian, Fedora ...), de manera que els valors proposats aquí ja estan optimitzats. Només s'ha d'introduir la contrasenya del propietari de la base de dades per crear. Canvieu altres paràmetres només si saps el que estàs fent. KeepDefaultValuesMamp=Heu utilitzat l'assistent de configuració Dolibarr de DoliMamp, de manera que els valors proposats aquí ja estan optimitzats. Canvieu-los només si saps el que estàs fent. KeepDefaultValuesProxmox=Heu utilitzat l'assistent de configuració de Dolibarr des d'un dispositiu virtual Proxmox, de manera que els valors proposats aquí ja estan optimitzats. Canvieu-los només si saps el que estàs fent. -UpgradeExternalModule=Executeu el procés d'actualització dedicat del mòdul extern +UpgradeExternalModule=Execució del procés d'actualització dedicat de mòdul extern SetAtLeastOneOptionAsUrlParameter=Estableix com a mínim una opció com a paràmetre a l'URL. Per exemple: '... repair.php?standard=confirmed' -NothingToDelete=Res per netejar / esborrar +NothingToDelete=Res a netejar/esborrar NothingToDo=No hi ha res a fer ######### # upgrade @@ -167,15 +167,15 @@ MigrationContractsNumberToUpdate=%s contracte(s) a actualitzar MigrationContractsLineCreation=Crea una línia de contracte per referència del contracte %s MigrationContractsNothingToUpdate=No hi ha més contractes (vinculats a un producte) sense línies de detalls que hagin de corregir. MigrationContractsFieldDontExist=El camp fk_facture ja no existeix. Res a fer. -MigrationContractsEmptyDatesUpdate=Actualització de les dades de contractes no indicades +MigrationContractsEmptyDatesUpdate=Correcció de la data buida de contracte MigrationContractsEmptyDatesUpdateSuccess=La correcció de la data buida del contracte s'ha realitzat correctament MigrationContractsEmptyDatesNothingToUpdate=No hi ha data de contracte buida per corregir MigrationContractsEmptyCreationDatesNothingToUpdate=No hi ha data de creació del contracte per corregir -MigrationContractsInvalidDatesUpdate=Actualització dades contracte incorrectes (per contractes amb detall en servei) +MigrationContractsInvalidDatesUpdate=Correcció del valor incorrecte de la data de contracte MigrationContractsInvalidDateFix=Corregir contracte %s (data contracte=%s, Data posada en servei min=%s) MigrationContractsInvalidDatesNumber=%s contractes modificats MigrationContractsInvalidDatesNothingToUpdate=No hi ha més de contractes que hagin de corregir-se. -MigrationContractsIncoherentCreationDateUpdate=Actualització de les dades de creació de contracte que tenen un valor incoherent +MigrationContractsIncoherentCreationDateUpdate=Correcció del valor incorrecte de la data de creació del contracte MigrationContractsIncoherentCreationDateUpdateSuccess=S'ha fet correctament la correcció del valor incorrecte en la data de creació de contracte MigrationContractsIncoherentCreationDateNothingToUpdate=No hi ha més dades de contractes. MigrationReopeningContracts=Reobertura dels contractes que tenen almenys un servei actiu no tancat @@ -184,16 +184,16 @@ MigrationReopenedContractsNumber=%s contractes modificats MigrationReopeningContractsNothingToUpdate=No hi ha contractes tancats per a obrir MigrationBankTransfertsUpdate=Actualitza l'enllaç entre el registre bancari i la transferència bancària MigrationBankTransfertsNothingToUpdate=Cap vincle desfasat -MigrationShipmentOrderMatching=Actualitzar rebuts de lliurament +MigrationShipmentOrderMatching=Actualització de rebuts d'enviaments MigrationDeliveryOrderMatching=Actualitzar rebuts d'entrega MigrationDeliveryDetail=Actualitzar recepcions -MigrationStockDetail=Actualitzar valor en stock dels productes +MigrationStockDetail=Actualitza el valor de l'estoc dels productes MigrationMenusDetail=Actualització de la taula de menús dinàmics MigrationDeliveryAddress=Actualització de les adreces d'enviament en les notes de lliurament MigrationProjectTaskActors=Migració de dades per a la taula llx_projet_task_actors MigrationProjectUserResp=Migració del camp fk_user_resp de llx_projet a llx_element_contact MigrationProjectTaskTime=Actualitza el temps dedicat en segons -MigrationActioncommElement=Actualització de les dades de accions sobre elements +MigrationActioncommElement=Actualització de dades d'accions MigrationPaymentMode=Migració de dades per tipus de pagament MigrationCategorieAssociation=Actualització de les categories MigrationEvents=Migració d'esdeveniments per afegir el propietari de l'esdeveniment a la taula d'assignacions @@ -203,7 +203,7 @@ MigrationRemiseExceptEntity=Actualitza el valor del camp entity de llx_societe_r MigrationUserRightsEntity=Actualitza el valor del camp de l'entitat llx_user_rights MigrationUserGroupRightsEntity=Actualitza el valor del camp de l'entitat llx_usergroup_rights MigrationUserPhotoPath=Migració de rutes per les fotos dels usuaris -MigrationFieldsSocialNetworks=Migració de camps de xarxes socials de usuaris (%s) +MigrationFieldsSocialNetworks=Migració de camps de xarxes socials d'usuaris (%s) MigrationReloadModule=Recarrega el mòdul %s MigrationResetBlockedLog=Restablir el mòdul BlockedLog per l'algoritme v7 ShowNotAvailableOptions=Mostra les opcions no disponibles diff --git a/htdocs/langs/ca_ES/interventions.lang b/htdocs/langs/ca_ES/interventions.lang index ec994e9dd8d..242a537dcc8 100644 --- a/htdocs/langs/ca_ES/interventions.lang +++ b/htdocs/langs/ca_ES/interventions.lang @@ -2,7 +2,7 @@ Intervention=Intervenció Interventions=Intervencions InterventionCard=Fitxa intervenció -NewIntervention=Nova intervenció +NewIntervention=Intervenció nova AddIntervention=Crea intervenció ChangeIntoRepeatableIntervention=Canvia-ho a intervenció repetible ListOfInterventions=Llistat d'intervencions @@ -18,14 +18,14 @@ DeleteInterventionLine=Eliminar línia d'intervenció ConfirmDeleteIntervention=Vols eliminar aquesta intervenció? ConfirmValidateIntervention=Vols validar aquesta intervenció amb nom <b>%s</b>? ConfirmModifyIntervention=Vols modificar aquesta intervenció? -ConfirmDeleteInterventionLine=Vols eliminar aquesta línia d'intervenció? +ConfirmDeleteInterventionLine=Esteu segur que voleu suprimir aquesta línia d'intervenció? ConfirmCloneIntervention=Estàs segur que vols clonar aquesta intervenció? NameAndSignatureOfInternalContact=Nom i signatura del participant: NameAndSignatureOfExternalContact=Nom i signatura del client: DocumentModelStandard=Document model estàndard per a intervencions InterventionCardsAndInterventionLines=Fitxes i línies d'intervenció -InterventionClassifyBilled=Classificar "facturat" -InterventionClassifyUnBilled=Classificar "no facturat" +InterventionClassifyBilled=Classifica "Facturat" +InterventionClassifyUnBilled=Classifica "No facturat" InterventionClassifyDone=Classifica com a "Fet" StatusInterInvoiced=Facturada SendInterventionRef=Presentar intervenció %s @@ -48,8 +48,8 @@ UseServicesDurationOnFichinter=Utilitza la durada dels serveis en les intervenci UseDurationOnFichinter=Oculta el camp de durada dels registres d'intervenció UseDateWithoutHourOnFichinter=Oculta hores i minuts del camp de dates dels registres d'intervenció InterventionStatistics=Estadístiques de intervencions -NbOfinterventions=Nº de fitxes d'intervenció -NumberOfInterventionsByMonth=Nº de fitxes d'intervenció per mes (data de validació) +NbOfinterventions=Nombre de fitxers d’intervenció +NumberOfInterventionsByMonth=Nombre de fitxes d'intervenció per mes (data de validació) AmountOfInteventionNotIncludedByDefault=La quantitat d'intervenció no s'inclou de manera predeterminada en els beneficis (en la majoria dels casos, els fulls de temps s'utilitzen per comptar el temps dedicat). Per incloure'ls, afegiu la opció PROJECT_INCLUDE_INTERVENTION_AMOUNT_IN_PROFIT amb el valor 1 a Configuració &rarr; Varis. InterId=Id. d'intervenció InterRef=Ref. d'intervenció diff --git a/htdocs/langs/ca_ES/mails.lang b/htdocs/langs/ca_ES/mails.lang index be984d41323..ffcbd2fd725 100644 --- a/htdocs/langs/ca_ES/mails.lang +++ b/htdocs/langs/ca_ES/mails.lang @@ -14,7 +14,7 @@ MailTo=Destinatari(s) MailToUsers=A l'usuari(s) MailCC=Còpia a MailToCCUsers=Còpia l'usuari(s) -MailCCC=Adjuntar còpia a +MailCCC=Còpia oculta a MailTopic=Tema de correu electrònic MailText=Missatge MailFile=Fitxers adjunts @@ -23,7 +23,7 @@ SubjectNotIn=No està subjecte BodyNotIn=No en el cos ShowEMailing=Mostrar E-Mailing ListOfEMailings=Llistat de E-Mailings -NewMailing=Nou E-Mailing +NewMailing=E-Mailing nou EditMailing=Editar E-Mailing ResetMailing=Nou enviament DeleteMailing=Elimina E-Mailing @@ -50,14 +50,14 @@ ConfirmValidMailing=Vols validar aquest E-Mailing? ConfirmResetMailing=Advertència, reiniciant el correu electrònic <b> %s </b>, permetrà tornar a enviar aquest correu electrònic en un correu a granel. Estàs segur que vols fer això? ConfirmDeleteMailing=Esteu segur que voleu suprimir aquesta adreça electrònica? NbOfUniqueEMails=Nombre de correus electrònics exclusius -NbOfEMails=Nº d'E-mails +NbOfEMails=Nombre de correus electrònics TotalNbOfDistinctRecipients=Nombre de destinataris únics NoTargetYet=Cap destinatari definit NoRecipientEmail=No hi ha cap correu electrònic destinatari per a %s RemoveRecipient=Eliminar destinatari YouCanAddYourOwnPredefindedListHere=Per crear el seu mòdul de selecció e-mails, mireu htdocs /core/modules/mailings/README. EMailTestSubstitutionReplacedByGenericValues=En mode prova, les variables de substitució són substituïdes per valors genèrics -MailingAddFile=Adjuntar aquest arxiu +MailingAddFile=Adjunta aquest fitxer NoAttachedFiles=Sense fitxers adjunts BadEMail=Valor incorrecte per correu electrònic ConfirmCloneEMailing=Vols clonar aquest E-Mailing? @@ -87,14 +87,15 @@ MailingModuleDescContactsWithThirdpartyFilter=Contacte amb filtres de client MailingModuleDescContactsByCompanyCategory=Contactes per categoria de tercers MailingModuleDescContactsByCategory=Contactes per categories MailingModuleDescContactsByFunction=Contactes per càrrec -MailingModuleDescEmailsFromFile=Correus electrònics desde fitxer +MailingModuleDescEmailsFromFile=Correus electrònics des de fitxer MailingModuleDescEmailsFromUser=Entrada de correus electrònics per usuari MailingModuleDescDolibarrUsers=Usuaris amb correus electrònics MailingModuleDescThirdPartiesByCategories=Tercers (per categories) SendingFromWebInterfaceIsNotAllowed=L'enviament des de la interfície web no està permès. +EmailCollectorFilterDesc=Tots els filtres han de coincidir perquè es reculli un correu electrònic # Libelle des modules de liste de destinataires mailing -LineInFile=Línea %s en archiu +LineInFile=Línia %s al fitxer RecipientSelectionModules=Mòduls de selecció dels destinataris MailSelectedRecipients=Destinataris seleccionats MailingArea=Àrea E-Mailings @@ -105,13 +106,13 @@ MailNoChangePossible=Destinataris d'un E-Mailing validat no modificables SearchAMailing=Cercar un E-Mailing SendMailing=Envia e-mailing SentBy=Enviat por -MailingNeedCommand=L'enviament d'un emailing pot realitzar-se desde la línia de comandos. Solicita a l'administrador del servidor que executi el següent comando per enviar l'emailing a tots els destinataris: +MailingNeedCommand=L’enviament de correus electrònics massius es pot realitzar des de la línia de comandes. Demaneu a l'administrador del servidor que iniciï la següent comanda per enviar els correus electrònics a tots els destinataris: MailingNeedCommand2=Podeu enviar en línia afegint el paràmetre MAILING_LIMIT_SENDBYWEB amb un valor nombre que indica el màxim nombre d'e-mails enviats per sessió. Per això aneu a Inici - Configuració - Varis -ConfirmSendingEmailing=Si desitja enviar emailing directament desde aquesta pantalla, confirme que està segur de voler enviar l'emailing ara desde el seu navegador -LimitSendingEmailing=Nota: L'enviament de e-mailings des de l'interfície web es realitza en tandes per raons de seguretat i "timeouts", s'enviaran a <b>%s</b> destinataris per tanda +ConfirmSendingEmailing=Si voleu enviar correus electrònics directament des d'aquesta pantalla, confirmeu que esteu segur que voleu enviar correus electrònics ara des del vostre navegador? +LimitSendingEmailing=Nota: L'enviament de missatges massius de correu electrònic des de la interfície web es realitza diverses vegades per motius de seguretat i temps d'espera, <b> %s </b> als destinataris de cada sessió d'enviament. TargetsReset=Buidar llista ToClearAllRecipientsClickHere=Per buidar la llista dels destinataris d'aquest E-Mailing, feu clic al botó -ToAddRecipientsChooseHere=Per afegir destinataris, escolliu els que figuren en les llistes a continuació +ToAddRecipientsChooseHere=Afegiu destinataris escollint entre les llistes NbOfEMailingsReceived=E-Mailings en massa rebuts NbOfEMailingsSend=E-mails massius enviats IdRecord=ID registre @@ -125,22 +126,23 @@ TagMailtoEmail=Correu electrònic del destinatari (inclòs l'enllaç "mailto:" h NoEmailSentBadSenderOrRecipientEmail=No s'ha enviat el correu electrònic. Enviador del correu incorrecte. Verifica el perfil d'usuari. # Module Notifications Notifications=Notificacions -NoNotificationsWillBeSent=Cap notificació per e-mail està prevista per a aquest esdeveniment i empresa -ANotificationsWillBeSent=1 notificació serà enviada per e-mail -SomeNotificationsWillBeSent=%s notificacions seran enviades per e-mail -AddNewNotification=Activar una de notificació per correu electrònic -ListOfActiveNotifications=Llista tots els destinataris actius per notificacions de correu electrònic -ListOfNotificationsDone=Llista de notificacions d'e-mails enviades +NotificationsAuto=Notificacions automàtiques. +NoNotificationsWillBeSent=No hi ha previstes notificacions automàtiques per correu electrònic per a aquest tipus d'esdeveniment ni per a aquesta empresa +ANotificationsWillBeSent=S'enviarà 1 notificació automàtica per correu electrònic +SomeNotificationsWillBeSent=S'enviaran %s notificacions automàtiques per correu electrònic +AddNewNotification=Subscriviu-vos a una nova notificació automàtica per correu electrònic (destinatari/esdeveniment) +ListOfActiveNotifications=Llista totes les subscripcions actives (destinataris/esdeveniments) per a notificacions automàtiques per correu electrònic +ListOfNotificationsDone=Llista totes les notificacions automàtiques enviades per correu electrònic MailSendSetupIs=La configuració d'enviament d'e-mail s'ha ajustat a '%s'. Aquest mètode no es pot utilitzar per enviar e-mails massius. -MailSendSetupIs2=Abans tindrà que, amb un compte d'administrador, en el menú %sinici - Configuració - E-Mails%s, camviar el paràmetre <strong>'%s'</strong> per usar el mètode '%s'. Amb aquest metode pot configurar un servidor SMTP del seu proveïdor de serveis d'internet. -MailSendSetupIs3=Si te preguntes de com configurar el seu servidor SMTP, pot contactar amb %s. +MailSendSetupIs2=Primer heu d’anar, amb un compte d’administrador, al menú %sInici - Configuració - Correus electrònics%s per a canviar el paràmetre <strong>'%s'</strong> per a utilitzar el mode '%s'. Amb aquest mode, podeu introduir la configuració del servidor SMTP proporcionat pel vostre proveïdor de serveis d'Internet i utilitzar la funció de correu electrònic massiu. +MailSendSetupIs3=Si teniu cap pregunta sobre com configurar el servidor SMTP, podeu demanar-li a %s. YouCanAlsoUseSupervisorKeyword=També pot afegir l'etiqueta <strong>__SUPERVISOREMAIL__</strong> per tenir un e-mail enviat pel supervisor a l'usuari (només funciona si un e-mail és definit per aquest supervisor) -NbOfTargetedContacts=Número actual de contactes destinataris d'e-mails +NbOfTargetedContacts=Nombre actual de correus electrònics de contactes destinataris UseFormatFileEmailToTarget=El fitxer importat ha de tenir el format <strong>email;nom;cognom;altre</strong> UseFormatInputEmailToTarget=Entra una cadena amb el format <strong>email;nom;cognom;altre</strong> MailAdvTargetRecipients=Destinataris (selecció avançada) AdvTgtTitle=Ompliu els camps d'entrada per seleccionar prèviament els tercers o contactes / adreces a destinació -AdvTgtSearchTextHelp=Utilitzeu %% com comodins. Per exemple, per trobar tots els elements com <b> jean, joe, jim </b>, podeu ingressar <b> j%% </b>, també podeu utilitzar; com a separador de valor i ús! per excepte aquest valor. Per exemple, <b> jean; joe; jim%% ;; jimo ;; jima% </b> tindrà com a objectiu tot Jean, joe, comença amb Jim però no Jimo i no tot el que comença amb Jima +AdvTgtSearchTextHelp=Utilitzeu %% com a comodins. Per exemple, per a trobar tots els elements com <b> jean, joe, jim </b>, podeu introduir <b> j%% </b>, també podeu utilitzar ; com a separador de valor i utilitzar ! per excepcions d'aquest valor. Per exemple, <b> jean;joe;jim%%;!jimo;!jima%% </b> tindrà com a objectiu tots els jean, joe, començant per jim però no jimo ni tot el que comenci amb jima AdvTgtSearchIntHelp=Utilitza un interval per seleccionar un valor enter o decimal AdvTgtMinVal=Valor mínim AdvTgtMaxVal=Valor màxim @@ -159,16 +161,19 @@ AdvTgtLoadFilter=Carrega filtre AdvTgtDeleteFilter=Elimina filtre AdvTgtSaveFilter=Desa filtre AdvTgtCreateFilter=Crea filtre -AdvTgtOrCreateNewFilter=Nom de nou filtre +AdvTgtOrCreateNewFilter=Nom del filtre nou NoContactWithCategoryFound=No s'han trobat contactes/adreces amb categoria NoContactLinkedToThirdpartieWithCategoryFound=No s'han trobat contactes/adreces amb categoria -OutGoingEmailSetup=Configuració de correus electrònics sortints -InGoingEmailSetup=Configuració de correus electrònics entrants -OutGoingEmailSetupForEmailing=Configuració del correu sortint (per al mòdul %s) -DefaultOutgoingEmailSetup=Configuració per defecte del correu electrònic sortint +OutGoingEmailSetup=Correus electrònics de sortida +InGoingEmailSetup=Correus electrònics entrants +OutGoingEmailSetupForEmailing=Correu electrònic de sortida (per al mòdul %s) +DefaultOutgoingEmailSetup=La mateixa configuració que el correu electrònic de sortida global Information=Informació ContactsWithThirdpartyFilter=Contactes amb filtre de tercers -Unanswered=Unanswered +Unanswered=Sense resposta Answered=Respost -IsNotAnAnswer=Is not answer (initial email) -IsAnAnswer=Is an answer of an initial email +IsNotAnAnswer=No és resposta (correu electrònic inicial) +IsAnAnswer=És la resposta d’un correu electrònic inicial +RecordCreatedByEmailCollector=Registre creat pel Receptor de correus electrònics %s des del correu electrònic %s +DefaultBlacklistMailingStatus=Estat de contacte predeterminat per a rebutjar correus electrònics massius +DefaultStatusEmptyMandatory=Buit però obligatori diff --git a/htdocs/langs/ca_ES/main.lang b/htdocs/langs/ca_ES/main.lang index c970c1697f3..a50db98d5f8 100644 --- a/htdocs/langs/ca_ES/main.lang +++ b/htdocs/langs/ca_ES/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=No hi ha cap plantilla disponible per a aquest tipus de correu AvailableVariables=Variables de substitució disponibles NoTranslation=Sense traducció Translation=Traducció +CurrentTimeZone=Fus horari PHP (Servidor) EmptySearchString=Introdueix criteris de cerca no buits +EnterADateCriteria=Introduïu un criteri de data NoRecordFound=No s'han trobat registres NoRecordDeleted=Sense registres eliminats NotEnoughDataYet=Dades insuficients @@ -52,7 +54,7 @@ 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 -ErrorRecordIsUsedByChild=Impossible de suprimir aquest registre. Es sent utilitzat com a pare per almenys un registre fill. +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 ErrorNoRequestInError=Cap petició en error @@ -75,16 +77,18 @@ ClickHere=Fes clic aquí Here=Aquí Apply=Aplicar BackgroundColorByDefault=Color de fons -FileRenamed=L'arxiu s'ha renombrat correctament +FileRenamed=El fitxer s’ha reanomenat correctament FileGenerated=L'arxiu ha estat generat correctament FileSaved=El fitxer s'ha desat correctament FileUploaded=L'arxiu s'ha carregat correctament FileTransferComplete=El(s) fitxer(s) s'han carregat correctament FilesDeleted=El(s) fitxer(s) s'han eliminat correctament FileWasNotUploaded=Un arxiu ha estat seleccionat per adjuntar, però encara no ha estat pujat. Feu clic a "Adjuntar aquest arxiu" per a això. -NbOfEntries=Nº d'entrades +NbOfEntries=Nombre d'entrades GoToWikiHelpPage=Llegiu l'ajuda en línia (cal tenir accés a Internet) GoToHelpPage=Consultar l'ajuda +DedicatedPageAvailable=Hi ha una pàgina d’ajuda dedicada relacionada amb la pantalla actual +HomePage=Pàgina d'inici RecordSaved=Registre guardat RecordDeleted=Registre eliminat RecordGenerated=Registre generat @@ -109,7 +113,7 @@ RequestLastAccessInError=Últimes peticions d'accés a la base de dades amb erro ReturnCodeLastAccessInError=Retorna el codi per les últimes peticions d'accés a la base de dades amb error 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 vostre fitxer de configuració per obtenir més informació. +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) MoreInformation=Més informació TechnicalInformation=Informació tècnica @@ -149,11 +153,11 @@ Enable=Activar Deprecated=Obsolet Disable=Desactivar Disabled=Desactivat -Add=Afegir +Add=Afegeix AddLink=Enllaçar RemoveLink=Elimina enllaç AddToDraft=Afegeix a esborrany -Update=Modificar +Update=Actualitza Close=Tancar CloseAs=Indica l'estat CloseBox=Elimina el panell de la taula de control @@ -163,10 +167,10 @@ Delete=Elimina Remove=Retirar Resiliate=Dona de baixa Cancel=Cancel·la -Modify=Modificar +Modify=Modifica Edit=Editar -Validate=Validar -ValidateAndApprove=Validar i aprovar +Validate=Valida +ValidateAndApprove=Valida i aprova ToValidate=A validar NotValidated=No validat Save=Desa @@ -174,10 +178,10 @@ SaveAs=Desa com SaveAndStay=Desa i continua SaveAndNew=Desa i nou TestConnection=Provar la connexió -ToClone=Copiar +ToClone=Clona ConfirmCloneAsk=Esteu segur que voleu clonar l'objecte <b> %s </b>? ConfirmClone=Trieu les dades que voleu clonar: -NoCloneOptionsSpecified=no hi ha dades definits per copiar +NoCloneOptionsSpecified=No s'ha definit cap dada per a clonar. Of=de Go=Anar Run=llançar @@ -220,6 +224,7 @@ Value=Valor PersonalValue=Valor personalitzat NewObject=Nou %s NewValue=Valor nou +OldValue=Valor antic %s CurrentValue=Valor actual Code=Codi Type=Tipus @@ -329,7 +334,7 @@ HourShort=H MinuteShort=Minut Rate=Tipus CurrencyRate=Tarifa de conversió de moneda -UseLocalTax=Incloure taxes +UseLocalTax=Inclou impostos Bytes=Bytes KiloBytes=Kilobytes MegaBytes=Megabytes @@ -343,7 +348,7 @@ Mb=Mb Gb=Gb Tb=Tb Cut=Tallar -Copy=Copiar +Copy=Copia Paste=Pegar Default=Defecte DefaultValue=Valor per defecte @@ -433,6 +438,7 @@ RemainToPay=Queda per pagar Module=Mòdul/Aplicació Modules=Mòduls/Aplicacions Option=Opció +Filters=Filtres List=Llistat FullList=Llista completa FullConversation=Conversa completa @@ -484,7 +490,7 @@ TotalDuration=Duració total Summary=Resum DolibarrStateBoard=Estadístiques de base de dades DolibarrWorkBoard=Elements oberts -NoOpenedElementToProcess=No hi ha elements oberts per processar +NoOpenedElementToProcess=No hi ha elements oberts per a processar Available=Disponible NotYetAvailable=Encara no disponible NotAvailable=No disponible @@ -501,7 +507,7 @@ and=i or=o Other=Altres Others=Altres -OtherInformations=Altra informació +OtherInformations=Una altra informació Quantity=Quantitat Qty=Qt. ChangedBy=Modificat per @@ -517,7 +523,7 @@ Draft=Esborrany Drafts=Esborranys StatusInterInvoiced=Facturat Validated=Validat -ValidatedToProduce=Validat (per produir) +ValidatedToProduce=Validat (per a produir) Opened=Actiu OpenAll=Obre (tot) ClosedAll=Tancat (tot) @@ -525,7 +531,7 @@ New=Nou Discount=Descompte Unknown=Desconegut General=General -Size=Tamany +Size=Mida OriginalSize=Mida original Received=Rebut Paid=Pagat @@ -546,14 +552,14 @@ LateDesc=L'element es defineix com Retardat segons la configuració del sistema NoItemLate=No hi ha cap element tardà Photo=Foto Photos=Fotos -AddPhoto=Afegir foto +AddPhoto=Afegeix una imatge DeletePicture=Elimina la imatge ConfirmDeletePicture=Confirmes l'eliminació de la imatge? -Login=Login +Login=Nom d'usuari LoginEmail=Codi d'usuari (correu electrònic) LoginOrEmail=Codi d'usuari o correu electrònic -CurrentLogin=Login actual -EnterLoginDetail=Introduir detalls del login +CurrentLogin=Nom d'usuari actual +EnterLoginDetail=Introduïu les dades d'inici de sessió January=gener February=febrer March=març @@ -650,6 +656,7 @@ SupplierPreview=Vista prèvia del proveïdor ShowCustomerPreview=Veure historial client ShowSupplierPreview=Mostra la vista prèvia del proveïdor RefCustomer=Ref. client +InternalRef=Ref. Interna Currency=Divisa InfoAdmin=Informació per als administradors Undo=Desfer @@ -716,7 +723,7 @@ MenuAWStats=AWStats MenuMembers=Socis MenuAgendaGoogle=Agenda Google MenuTaxesAndSpecialExpenses=Impostos | Despeses especials -ThisLimitIsDefinedInSetup=Límit Dolibarr (Menú inici-configuració-seguretat): %s Kb, PHP limit: %s Kb +ThisLimitIsDefinedInSetup=Límit Dolibarr (Menú inici-configuració-seguretat): %s Kb, límit PHP: %s Kb NoFileFound=No hi ha documents guardats en aquesta carpeta CurrentUserLanguage=Idioma actual CurrentTheme=Tema actual @@ -737,7 +744,7 @@ Informations=Informació Page=Pàgina Notes=Notes AddNewLine=Afegeix una línia nova -AddFile=Afegir arxiu +AddFile=Afegeix un fitxer FreeZone=Producte de text lliure FreeLineOfType=Element de text lliure, escriviu: CloneMainAttributes=Clonar l'objecte amb aquests atributs principals @@ -747,9 +754,9 @@ Merge=Fussió DocumentModelStandardPDF=Plantilla PDF estàndard PrintContentArea=Mostrar pàgina d'impressió de la zona central MenuManager=Gestor de menú -WarningYouAreInMaintenanceMode=Advertència, esteu en mode de manteniment: només podeu iniciar sessió <b> %s </b> per utilitzar l'aplicació en aquest mode. +WarningYouAreInMaintenanceMode=Atenció, esteu en mode de manteniment: només podeu iniciar sessió amb <b> %s </b> per a utilitzar l'aplicació en aquest mode. CoreErrorTitle=Error del sistema -CoreErrorMessage=Ho sentim, hi ha un error. Contacti amb el seu administrador del sistema per a comprovar els "logs" o des-habilita $dolibarr_main_prod=1 per a obtenir més informació. +CoreErrorMessage=Ho sentim, s'ha produït un error. Poseu-vos en contacte amb l'administrador del sistema per a comprovar els registres o desactiva $dolibarr_main_prod=1 per a obtenir més informació. CreditCard=Targeta de crèdit ValidatePayment=Validar aquest pagament CreditOrDebitCard=Tarja de crèdit o dèbit @@ -822,8 +829,8 @@ toward=cap a Access=Accés SelectAction=Selecciona acció SelectTargetUser=Selecciona l'usuari/empleat de destí -HelpCopyToClipboard=Utilitzeu Ctrl+C per copiar al portapapers -SaveUploadedFileWithMask=Desa el fitxer al servidor amb el nom "<strong>%s</strong>" (del contrari "%s") +HelpCopyToClipboard=Utilitzeu Ctrl+C per a copiar al porta-retalls +SaveUploadedFileWithMask=Desa el fitxer al servidor amb el nom "<strong> %s </strong>" (en cas contrari "%s") OriginFileName=Nom original de l'arxiu SetDemandReason=Indica l'origen SetBankAccount=Definir el compte bancari @@ -858,7 +865,7 @@ ConfirmDeleteObject=Esteu segur que voleu suprimir aquest objecte? DeleteLine=Elimina la línia ConfirmDeleteLine=Esteu segur que voleu suprimir aquesta línia? ErrorPDFTkOutputFileNotFound=Error: el fitxer no s'ha generat. Comproveu que la comanda "pdftk" estigui instal·lada en un directori inclòs a la variable d'entorn $ PATH (només linux / unix) o poseu-vos en contacte amb l'administrador del vostre sistema. -NoPDFAvailableForDocGenAmongChecked=No hi havia PDF disponibles per a la generació de document entre els registre comprovats +NoPDFAvailableForDocGenAmongChecked=No hi havia PDF disponible per a la generació de document amb el registre comprovat TooManyRecordForMassAction=S'ha seleccionat massa registres per a l'acció massiva. L'acció està restringida a una llista de %s registres. NoRecordSelected=No s'han seleccionat registres MassFilesArea=Àrea de fitxers generats per accions massives @@ -866,8 +873,8 @@ ShowTempMassFilesArea=Mostra l'àrea de fitxers generats per accions massives ConfirmMassDeletion=Confirmació d'esborrament massiu ConfirmMassDeletionQuestion=Esteu segur que voleu suprimir els (s) registre (s) %s? RelatedObjects=Objectes relacionats -ClassifyBilled=Classificar facturat -ClassifyUnbilled=Classificar no facturat +ClassifyBilled=Classifica facturat +ClassifyUnbilled=Classifica no facturat Progress=Progrés ProgressShort=Progr. FrontOffice=Front office @@ -1057,7 +1064,7 @@ ValidUntil=Vàlid fins NoRecordedUsers=No hi ha usuaris ToClose=Per tancar ToProcess=A processar -ToApprove=Per aprovar +ToApprove=Per a aprovar GlobalOpenedElemView=Vista global NoArticlesFoundForTheKeyword=No s'ha trobat cap article per a la paraula clau &quot; <strong>%s</strong> &quot; NoArticlesFoundForTheCategory=No s'ha trobat cap article per a la categoria @@ -1093,7 +1100,7 @@ AmountMustBePositive=L'import ha de ser positiu ByStatus=Per estat InformationMessage=Informació Used=Usat -ASAP=El més aviat possible +ASAP=Tan aviat com sigui possible CREATEInDolibarr=Registre %s creat MODIFYInDolibarr=Registre %s modificat DELETEInDolibarr=Registre %s eliminat @@ -1107,3 +1114,9 @@ UpToDate=Actualitzat OutOfDate=Obsolet EventReminder=Recordatori d'esdeveniments UpdateForAllLines=Actualització per a totes les línies +OnHold=Fora de servei +Civility=Civility +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 diff --git a/htdocs/langs/ca_ES/members.lang b/htdocs/langs/ca_ES/members.lang index f2a3b4f400b..7fe30fe8322 100644 --- a/htdocs/langs/ca_ES/members.lang +++ b/htdocs/langs/ca_ES/members.lang @@ -11,13 +11,13 @@ MembersTickets=Etiquetes de socis 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>, login: <b>%s</b>) 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). +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. SetLinkToUser=Vincular a un usuari Dolibarr SetLinkToThirdParty=Vincular a un tercer Dolibarr MembersCards=Carnets de socis MembersList=Llistat de socis -MembersListToValid=Llistat de socis esborrany (per validar) +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 @@ -34,7 +34,7 @@ EndSubscription=Final d'afiliació SubscriptionId=ID d'afiliació WithoutSubscription=Sense afiliació MemberId=ID de soci -NewMember=Nou soci +NewMember=Soci nou MemberType=Tipus de soci MemberTypeId=ID de tipus de soci MemberTypeLabel=Etiqueta de tipus de soci @@ -54,8 +54,8 @@ MembersStatusResiliated=Socis donats de baixa MemberStatusNoSubscription=Validat (no cal subscripció) MemberStatusNoSubscriptionShort=Validat SubscriptionNotNeeded=No cal subscripció -NewCotisation=Nova aportació -PaymentSubscription=Nou pagament de quota +NewCotisation=Aportació nova +PaymentSubscription=Pagament de quota nou SubscriptionEndDate=Data final d'afiliació MembersTypeSetup=Configuració dels tipus de socis MemberTypeModified=Tipus de soci modificat @@ -63,8 +63,8 @@ DeleteAMemberType=Elimina un tipus de soci ConfirmDeleteMemberType=Estàs segur de voler eliminar aquest tipus de soci? MemberTypeDeleted=Tipus de soci eliminat MemberTypeCanNotBeDeleted=El tipus de soci no es pot eliminar -NewSubscription=Nova afiliació -NewSubscriptionDesc=Utilitzi aquest formulari per registrar-se com un nou soci de l'entitat. Per a una renovació (si ja és soci) poseu-vos en contacte amb l'entitat mitjançant l'e-mail %s. +NewSubscription=Afiliació nova +NewSubscriptionDesc=Aquest formulari us permet registrar la vostra afiliació com a soci nou de l'entitat. Si voleu renovar l'afiliació (si ja sou soci), poseu-vos en contacte amb el gestor de l'entitat per correu electrònic %s. Subscription=Afiliació Subscriptions=Afiliacions SubscriptionLate=En retard @@ -73,7 +73,7 @@ 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" -NewMemberType=Nou tipus de soci +NewMemberType=Tipus de soci nou WelcomeEMail=Correu electrònic de benvinguda SubscriptionRequired=Subjecte a cotització DeleteType=Elimina @@ -120,7 +120,7 @@ SendingReminderActionComm=Enviament de recordatori de l’esdeveniment de l’ag # Topic of email templates YourMembershipRequestWasReceived=S'ha rebut la vostra subscripció. YourMembershipWasValidated=S'ha validat la vostra subscripció -YourSubscriptionWasRecorded=S'ha registrat la vostra nova subscripció +YourSubscriptionWasRecorded=S'ha registrat la vostra afiliació nova SubscriptionReminderEmail=Recordatori de subscripció YourMembershipWasCanceled=S'ha cancel·lat la vostra pertinença CardContent=Contingut de la seva fitxa de soci @@ -179,10 +179,10 @@ LatestSubscriptionDate=Data de l'última afiliació MemberNature=Naturalesa del membre MembersNature=Naturalesa dels socis Public=Informació pública -NewMemberbyWeb=S'ha afegit un nou soci. A l'espera d'aprovació -NewMemberForm=Formulari d'inscripció +NewMemberbyWeb=S'ha afegit un soci nou. Esperant l'aprovació +NewMemberForm=Formulari de soci nou SubscriptionsStatistics=Estadístiques de cotitzacions -NbOfSubscriptions=Nombre de cotitzacions +NbOfSubscriptions=Nombre d'afiliacions AmountOfSubscriptions=Import de cotitzacions TurnoverOrBudget=Volum de vendes (empresa) o Pressupost (associació o col.lectiu) DefaultAmount=Import per defecte cotització diff --git a/htdocs/langs/ca_ES/modulebuilder.lang b/htdocs/langs/ca_ES/modulebuilder.lang index 59936812c4a..275cdac1d5d 100644 --- a/htdocs/langs/ca_ES/modulebuilder.lang +++ b/htdocs/langs/ca_ES/modulebuilder.lang @@ -5,18 +5,18 @@ EnterNameOfObjectDesc=Introduïu el nom de l'objecte que voleu crear sense espai 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> ModuleBuilderDesc4=Es detecta un mòdul com "editable" quan el fitxer <strong>%s</strong> existeix al directori arrel del mòdul -NewModule=Nou mòdul -NewObjectInModulebuilder=Nou objecte +NewModule=Mòdul nou +NewObjectInModulebuilder=Objecte nou ModuleKey=Clau del mòdul ObjectKey=Clau de l'objecte ModuleInitialized=Mòdul inicialitzat -FilesForObjectInitialized=S'han inicialitzat els fitxers per al nou objecte '%s' +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. ModuleBuilderDescmenus=Aquesta pestanya està dedicada a definir les entrades de menú proporcionades pel teu mòdul. -ModuleBuilderDescpermissions=Aquesta pestanya està dedicada a definir els nous permisos que vols proporcionar amb el 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 @@ -40,6 +40,7 @@ PageForCreateEditView=Pàgina PHP per crear/editar/veure 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 +PageForContactTab=Pàgina PHP per a la pestanya de contacte PathToModulePackage=Ruta al zip del paquet del mòdul/aplicació PathToModuleDocumentation=Camí al fitxer de la documentació del mòdul / aplicació (%s) SpaceOrSpecialCharAreNotAllowed=Els espais o caràcters especials no estan permesos. @@ -82,11 +83,11 @@ ListOfMenusEntries=Llista d'entrades de menú ListOfDictionariesEntries=Llista d'entrades de diccionaris ListOfPermissionsDefined=Llista de permisos definits SeeExamples=Mira exemples aquí -EnabledDesc=Condició per tenir activat aquest camp (Exemples: 1 ó $conf->global->MYMODULE_MYOPTION) +EnabledDesc=Condició per a tenir aquest camp actiu (Exemples: 1 ó $conf->global->MYMODULE_MYOPTION) VisibleDesc=És visible el camp ? (Exemples: 0=Mai visible, 1=Visible als llistats i als formularis crear/modificar/veure, 2=Visible només als llistats, 3=Visible només als formularis crear/modificar/veure (no als llistats), 4=Visible als llistats i només als formularis modificar/veure (no al de crear), 5=Visible als llistats i només al formulari de veure (però no als formularis de crear i modificar).<br><br>Utilitzant un valor negatiu implicarà que el camp no es mostrarà per defecte als llistats però podrà ser escollit per veure's).<br><br>pot ser una expressió, per exemple:<br>preg_match('/public/', $_SERVER['PHP_SELF'])?0:1<br>($user->rights->holiday->define_holiday ? 1 : 0) DisplayOnPdfDesc=Mostra aquest camp en documents PDF compatibles. Podeu gestionar la posició amb el camp "Posició". <br/> Actualment, els models PDF compatibles coneguts són: eratosthene (comanda), espadon (enviament), sponge (factures), cyan (propal / pressupost), cornas (comanda del proveïdor) <br/> <br/><strong>Per al document :</strong><br/>0 = no es mostra<br/> 1 = mostra <br/> 2 = només si no està buit <br/> <br/> <strong> Per a les línies de documents: </strong> <br/> 0 = no es veuen les <br/> 1 = mostra en una columna <br/> = 3 = mostra a la columna de descripció de línia després de la descripció <br/> 4 = mostra a la columna de descripció després de la descripció només si no està buida DisplayOnPdf=Visualització en PDF -IsAMeasureDesc=Es pot acumular el valor del camp per obtenir un total en la llista? (Exemples: 1 o 0) +IsAMeasureDesc=Es pot acumular el valor del camp per a obtenir un total a la llista? (Exemples: 1 o 0) SearchAllDesc=El camp utilitzat per realitzar una cerca des de l'eina de cerca ràpida? (Exemples: 1 o 0) SpecDefDesc=Introduïu aquí tota la documentació que voleu proporcionar amb el vostre mòdul que encara no està definit per altres pestanyes. Podeu utilitzar .md o millor, la sintaxi enriquida .asciidoc. LanguageDefDesc=Introduïu a aquests fitxers, totes les claus i les traduccions per a cada fitxer d'idioma. @@ -126,9 +127,8 @@ UseSpecificEditorURL = Utilitzeu editor específic URL UseSpecificFamily = Utilitzeu una família específica UseSpecificAuthor = Utilitzeu un autor específic UseSpecificVersion = Utilitzeu una versió inicial específica -ModuleMustBeEnabled=El mòdul / aplicació s'ha d’habilitar primer IncludeRefGeneration=La referència de l’objecte s’ha de generar automàticament -IncludeRefGenerationHelp=Marca-ho si vols incloure codi per gestionar la generació automàtica de la referència +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 @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Tipus de camps: <br> varchar(99), double (24,8), real, text, ht AsciiToHtmlConverter=Convertidor Ascii a HTML AsciiToPdfConverter=Convertidor Ascii a PDF TableNotEmptyDropCanceled=La taula no està buida. S'ha cancel·lat l'eliminació. +ModuleBuilderNotAllowed=El creador de mòduls està disponible però no permès al vostre usuari. diff --git a/htdocs/langs/ca_ES/mrp.lang b/htdocs/langs/ca_ES/mrp.lang index 32ad23c0c3a..fe06e690cd0 100644 --- a/htdocs/langs/ca_ES/mrp.lang +++ b/htdocs/langs/ca_ES/mrp.lang @@ -1,7 +1,7 @@ Mrp=Ordres de fabricació MOs=Ordres de fabricació ManufacturingOrder=Ordre de fabricació -MRPDescription=Mòdul per gestionar Ordres de Fabricació o producció (OF). +MRPDescription=Mòdul per a gestionar Ordres de producció i fabricació (OF). MRPArea=Àrea MRP MrpSetupPage=Configuració del mòdul MRP MenuBOM=Llistes de material @@ -34,10 +34,10 @@ ConfirmDeleteBillOfMaterials=Estàs segur que vols suprimir aquesta llista de ma ConfirmDeleteMo=Esteu segur que voleu suprimir aquesta factura de material? MenuMRP=Ordres de fabricació NewMO=Ordre de fabricació nova -QtyToProduce=Quantitat per produir +QtyToProduce=Quantitat a produir DateStartPlannedMo=Data d’inici prevista DateEndPlannedMo=Data prevista de finalització -KeepEmptyForAsap=Buit significa &quot;el més aviat possible&quot; +KeepEmptyForAsap=Buit significa "Tan aviat com sigui possible" EstimatedDuration=Durada estimada EstimatedDurationDesc=Durada estimada per fabricar aquest producte mitjançant aquesta llista de material ConfirmValidateBom=Segur que voleu validar la llista de material amb la referència <strong>%s</strong> (podreu utilitzar-lo per crear noves Ordres de Fabricació) @@ -62,7 +62,7 @@ ConsumeOrProduce=Consumir o Produir ConsumeAndProduceAll=Consumir i produir tot Manufactured=Fabricat TheProductXIsAlreadyTheProductToProduce=El producte a afegir ja és el producte a produir. -ForAQuantityOf=Per produir una quantitat de %s +ForAQuantityOf=Per a produir una quantitat de %s ConfirmValidateMo=Voleu validar aquesta Ordre de Fabricació? ConfirmProductionDesc=Fent clic a '%s' validareu el consum i/o la producció per a les quantitats establertes. També s’actualitzarà l'estoc i es registrarà els moviments d'estoc. ProductionForRef=Producció de %s @@ -70,7 +70,7 @@ AutoCloseMO=Tancar automàticament l’Ordre de Fabricació si s’arriba a les NoStockChangeOnServices=Sense canvi d’estoc en serveis ProductQtyToConsumeByMO=Quantitat de producte que encara es pot consumir amb OP obertes ProductQtyToProduceByMO=Quantitat de producte que encara es pot produir mitjançant OP obertes -AddNewConsumeLines=Afegiu una línia nova per consumir +AddNewConsumeLines=Afegiu una nova línia per a consumir ProductsToConsume=Productes a consumir ProductsToProduce=Productes a produir UnitCost=Cost unitari @@ -78,3 +78,27 @@ TotalCost=Cost total BOMTotalCost=El cost de produir aquesta Llista de materials en funció del cost de cada quantitat i producte a consumir (utilitza el preu de cost si està definit, altrament el preu mitjà ponderat si està definit, altrament el millor preu de compra) GoOnTabProductionToProduceFirst=Per tancar una Ordre de fabricació primer heu d'iniciar la producció (vegeu la pestanya '%s'). Però sí podeu cancel·lar-la. ErrorAVirtualProductCantBeUsedIntoABomOrMo=Un kit no es pot utilitzar en una llista de material o en una OF +Workstation=Estació de treball +Workstations=Estacions de treball +WorkstationsDescription=Gestió d’estacions de treball +WorkstationSetup = Workstations setup +WorkstationSetupPage = Workstations setup page +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about page +WorkstationList=Llista d’estacions de treball +WorkstationCreate=Afegeix una nova estació de treball +ConfirmEnableWorkstation=Esteu segur que voleu habilitar l'estació de treball <b> %s </b>? +EnableAWorkstation=Activa una estació de treball +ConfirmDisableWorkstation=Esteu segur que voleu desactivar l'estació de treball <b> %s </b>? +DisableAWorkstation=Desactiva una estació de treball +DeleteWorkstation=Supprimer +NbOperatorsRequired=Number of operators required +THMOperatorEstimated=Estimated operator THM +THMMachineEstimated=Estimated machine THM +WorkstationType=Tipus d'estació de treball +Human=Humà +Machine=Màquina +HumanMachine=Humà / Màquina +WorkstationArea=Workstation area +Machines=Màquines +THMEstimatedHelp=This rate makes it possible to define a forecast cost of the item diff --git a/htdocs/langs/ca_ES/multicurrency.lang b/htdocs/langs/ca_ES/multicurrency.lang index 65919bb8818..2b058698634 100644 --- a/htdocs/langs/ca_ES/multicurrency.lang +++ b/htdocs/langs/ca_ES/multicurrency.lang @@ -4,10 +4,10 @@ ErrorAddRateFail=Error en la taxa afegida ErrorAddCurrencyFail=Error en la moneda afegida ErrorDeleteCurrencyFail=Error en esborrar multicurrency_syncronize_error=Error de sincronització: %s -MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE=Utilitza la data del document per trobar el tipus de canvi, en comptes d'utilitzar l'última conversió coneguda +MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE=Utilitza la data del document per a trobar el tipus de canvi, en lloc d’utilitzar la conversió més recent conegut multicurrency_useOriginTx=Quan un objecte es crea des d'un altre, manté la conversió original de l'objecte origen (en cas contrari, fes servir l'última conversió coneguda) CurrencyLayerAccount=API Moneda-Layer -CurrencyLayerAccount_help_to_synchronize=Heu de crear un compte al lloc web %s per utilitzar aquesta funcionalitat. <br> Obtingueu la vostra <b>clau d’API</b> . <br> Si utilitzeu un compte gratuït, no podeu canviar la <b>moneda d'origen</b> (per defecte, USD). <br> Si la vostra moneda principal no és USD, l'aplicació la recalcularà automàticament. <br><br> Es limita a 1000 sincronitzacions mensuals. +CurrencyLayerAccount_help_to_synchronize=Heu de crear un compte al lloc web %s per a utilitzar aquesta funcionalitat. <br> Obtingueu la vostra <b>clau d’API</b> . <br> Si utilitzeu un compte gratuït, no podeu canviar la <b>moneda d'origen</b> (per defecte, USD). <br> Si la vostra moneda principal no és USD, l'aplicació la recalcularà automàticament. <br><br> Es limita a 1000 sincronitzacions mensuals. multicurrency_appId=Clau API multicurrency_appCurrencySource=Moneda origen multicurrency_alternateCurrencySource=Moneda d'origen alternativa diff --git a/htdocs/langs/ca_ES/oauth.lang b/htdocs/langs/ca_ES/oauth.lang index 62daa92dadc..95bb8384e1b 100644 --- a/htdocs/langs/ca_ES/oauth.lang +++ b/htdocs/langs/ca_ES/oauth.lang @@ -7,13 +7,13 @@ IsTokenGenerated=S'ha generat el token? NoAccessToken=No es pot accedir al token desat en la base de dades local HasAccessToken=S'ha generat un token i s'ha desat en la base de dades local NewTokenStored=Token rebut i desat -ToCheckDeleteTokenOnProvider=Fes clic aqui per comprovar/eliminar l'autorització desada pel proveïdor OAuth %s +ToCheckDeleteTokenOnProvider=Feu clic aquí per comprovar/eliminar l'autorització desada pel proveïdor OAuth %s TokenDeleted=Token eliminat -RequestAccess=Clica aquí per demanar/renovar l'accés i rebre un nou token per desar -DeleteAccess=Faci clic aquí per eliminar token +RequestAccess=Feu clic aquí per a sol·licitar/renovar l'accés i rebre un nou testimoni per a desar +DeleteAccess=Feu clic aquí per a suprimir el testimoni UseTheFollowingUrlAsRedirectURI=Utilitzeu l'URL següent com a URI de redirecció quan creeu les vostres credencials amb el vostre proveïdor de OAuth: ListOfSupportedOauthProviders=Introduïu les credencials proporcionades pel vostre proveïdor OAuth2. Només es mostren aquí els proveïdors compatibles OAuth2. Aquests serveis poden ser utilitzats per altres mòduls que necessiten autenticació OAuth2. -OAuthSetupForLogin=Pàgina per generar un token OAuth +OAuthSetupForLogin=Pàgina per a generar un token OAuth SeePreviousTab=Veure la pestanya anterior OAuthIDSecret=OAuth ID i Secret TOKEN_REFRESH=Refresc present de token @@ -27,6 +27,6 @@ OAUTH_GOOGLE_DESC=Aneu a <a class="notasortlink" href="https://console.developer OAUTH_GITHUB_NAME=Servei OAuth GitHub OAUTH_GITHUB_ID=OAuth GitHub Id OAUTH_GITHUB_SECRET=OAuth GitHub Secret -OAUTH_GITHUB_DESC=Aneu a <a class="notasortlink" href="https://github.com/settings/developers" target="_blank"> a aquesta pàgina </a> i després "Registra una nova aplicació" per crear credencials d'OAuth. +OAUTH_GITHUB_DESC=Aneu a<a class="notasortlink" href="https://github.com/settings/developers" target="_blank">aquesta pàgina</a> i després a "Registra una aplicació nova" per a crear les credencials d'OAuth OAUTH_STRIPE_TEST_NAME=OAuth Stripe Test OAUTH_STRIPE_LIVE_NAME=OAuth Stripe Live diff --git a/htdocs/langs/ca_ES/opensurvey.lang b/htdocs/langs/ca_ES/opensurvey.lang index a2a57bd1d8f..4a88e4c8f61 100644 --- a/htdocs/langs/ca_ES/opensurvey.lang +++ b/htdocs/langs/ca_ES/opensurvey.lang @@ -5,12 +5,12 @@ OrganizeYourMeetingEasily=Organitza fàcilment les teves reunions i enquestes. P NewSurvey=Enquesta nova OpenSurveyArea=Àrea enquestes AddACommentForPoll=Pot afegir un comentari a l'enquesta... -AddComment=Afegir comentari +AddComment=Afegeix un comentari CreatePoll=Crear enquesta PollTitle=Títol de l'enquesta ToReceiveEMailForEachVote=Rebre un correu electrònic per cada vot TypeDate=Tipus de data -TypeClassic=Tipus estándar +TypeClassic=Tipus estàndard OpenSurveyStep2=Selecciona les dates entre els dies lliures (gris). Els dies seleccionats són verds. Pots anul·lar la selecció d'un dia prèviament seleccionat fent clic de nou en ell RemoveAllDays=Eliminar tots els dies CopyHoursOfFirstDay=Copia hores del primer dia @@ -19,7 +19,7 @@ SelectedDays=Dies seleccionats TheBestChoice=Actualment la millor opció és TheBestChoices=Actualment les millors opcions són with=amb -OpenSurveyHowTo=Si està d'acord per votar en aquesta enquesta, ha de donar el seu nom, triar els valors que s'ajusten millor per a vostè i validi amb el botó de més al final de la línia. +OpenSurveyHowTo=Si accepteu votar en aquesta enquesta, haureu de donar el vostre nom, escollir els valors que millor s’adapten a vosaltres i validar-los amb el botó al final de la línia. CommentsOfVoters=Comentaris dels votants ConfirmRemovalOfPoll=Està segur que desitja eliminar aquesta enquesta (i tots els vots) RemovePoll=Eliminar enquesta @@ -30,21 +30,21 @@ CreateSurveyStandard=Crear una enquesta estàndard CheckBox=Casella de selecció simple YesNoList=Llista (buit/sí/no) PourContreList=Llista (buit/a favor/en contra) -AddNewColumn=Afegir nova columna +AddNewColumn=Afegeix una columna nova TitleChoice=Títol de l'opció ExportSpreadsheet=Exportar resultats a un full de càlcul ExpireDate=Data límit -NbOfSurveys=Número d'enquestes -NbOfVoters=Nº de votants +NbOfSurveys=Nombre d'enquestes +NbOfVoters=Nombre de votants SurveyResults=Resultats PollAdminDesc=Està autoritzat per canviar totes les línies de l'enquesta amb el botó "Editar". Pot, també, eliminar una columna o una línia amb %s. També podeu afegir una nova columna amb %s. 5MoreChoices=5 opcions més Against=En contra YouAreInivitedToVote=Està convidat a votar en aquesta enquesta VoteNameAlreadyExists=Aquest nom ja havia estat usat per a aquesta enquesta -AddADate=Afegir una data -AddStartHour=Afegir hora d'inici -AddEndHour=Afegir hora de fi +AddADate=Afegeix una data +AddStartHour=Afegeix l’hora d’inici +AddEndHour=Afegeix l'hora final votes=vot(s) NoCommentYet=Cap comentari ha estat publicat per a aquesta enquesta CanComment=Els votants poden comentar a l'enquesta @@ -58,4 +58,4 @@ MoreChoices=Introdueixi més opcions pels votants SurveyExpiredInfo=L'enquesta s'ha tancat o el temps de votació s'ha acabat. EmailSomeoneVoted=%s ha emplenat una línia.\nPot trobar la seva enquesta en l'enllaç:\n%s ShowSurvey=Mostra l'enquesta -UserMustBeSameThanUserUsedToVote=Per publicar un comentari has d'utilitzar el mateix nom d'usuari que l'utilitzat per votar. +UserMustBeSameThanUserUsedToVote=Per a publicar un comentari, heu d'haver votat i utilitzar el mateix nom d'usuari utilitzat per a votar diff --git a/htdocs/langs/ca_ES/orders.lang b/htdocs/langs/ca_ES/orders.lang index ff1877a88a0..a840d554c15 100644 --- a/htdocs/langs/ca_ES/orders.lang +++ b/htdocs/langs/ca_ES/orders.lang @@ -10,8 +10,8 @@ OrderLine=Línia de comanda OrderDate=Data comanda OrderDateShort=Data comanda OrderToProcess=Comanda a processar -NewOrder=Nova comanda -NewOrderSupplier=Nova comanda de compra +NewOrder=Comanda nova +NewOrderSupplier=Comanda de compra nova ToOrder=Realitzar comanda MakeOrder=Realitzar comanda SupplierOrder=Comanda de compra @@ -24,7 +24,7 @@ CustomersOrdersAndOrdersLines=Ordres de venda i detalls de la comanda OrdersDeliveredToBill=Comandes de venda lliurats a la factura OrdersToBill=Ordres de venda lliurades OrdersInProcess=Ordres de venda en procés -OrdersToProcess=Ordres de venda per processar +OrdersToProcess=Comandes de venda a processar SuppliersOrdersToProcess=Comandes de compra a processar SuppliersOrdersAwaitingReception=Comandes de compra en espera de recepció AwaitingReception=Esperant recepció @@ -37,7 +37,7 @@ StatusOrderOnProcessShort=Comanda StatusOrderProcessedShort=Processada StatusOrderDelivered=Entregada StatusOrderDeliveredShort=Entregada -StatusOrderToBillShort=Emès +StatusOrderToBillShort=Lliurat StatusOrderApprovedShort=Aprovada StatusOrderRefusedShort=Rebutjada StatusOrderToProcessShort=A processar @@ -49,7 +49,7 @@ StatusOrderValidated=Validada StatusOrderOnProcess=Comanda - En espera de recepció StatusOrderOnProcessWithValidation=Comanda - A l'espera de rebre o validar StatusOrderProcessed=Processada -StatusOrderToBill=Emès +StatusOrderToBill=Lliurat StatusOrderApproved=Aprovada StatusOrderRefused=Rebutjada StatusOrderReceivedPartially=Rebuda parcialment @@ -97,7 +97,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=Classificar enviat +ClassifyShipped=Classifica enviada DraftOrders=Esborranys de comandes DraftSuppliersOrders=Esborrany de comandes de compra OnProcessOrders=Comandes en procés @@ -107,10 +107,10 @@ RefOrderSupplier=Ref. comanda pel proveïdor RefOrderSupplierShort=Ref. comanda proveïdor SendOrderByMail=Envia comanda per e-mail ActionsOnOrder=Esdeveniments sobre la comanda -NoArticleOfTypeProduct=No hi ha articles de tipus 'producte' i per tant enviables en aquesta comanda +NoArticleOfTypeProduct=No hi ha cap article del tipus "producte", de manera que no es pot enviar cap article per a aquesta comanda OrderMode=Mètode de comanda AuthorRequest=Autor/Sol·licitant -UserWithApproveOrderGrant=Usuaris habilitats per aprovar les comandes +UserWithApproveOrderGrant=Usuaris amb permís "aprovar comandes". PaymentOrderRef=Pagament comanda %s ConfirmCloneOrder=Vols clonar aquesta comanda <b>%s</b>? DispatchSupplierOrder=Recepció de l'ordre de compra %s @@ -148,14 +148,14 @@ PDFProformaDescription=Una plantilla completa de factura Proforma CreateInvoiceForThisCustomer=Facturar comandes CreateInvoiceForThisSupplier=Facturar comandes NoOrdersToInvoice=Sense comandes facturables -CloseProcessedOrdersAutomatically=Classificar automàticament com "Processades" les comandes seleccionades. +CloseProcessedOrdersAutomatically=Classifica com a "Processades" totes les comandes seleccionades. OrderCreation=Creació comanda 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". -OptionToSetOrderBilledNotEnabled=Està desactivada l'opció del mòdul Workflow per canviar automàticament l'estat de la comanda com a "Facturada" quan la factura es valida, així que haurà d'establir manualment l'estat de la comanda com a "Facturada". +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. SetShippingMode=Indica el tipus d'enviament diff --git a/htdocs/langs/ca_ES/other.lang b/htdocs/langs/ca_ES/other.lang index acae89147c1..77a93f1499e 100644 --- a/htdocs/langs/ca_ES/other.lang +++ b/htdocs/langs/ca_ES/other.lang @@ -23,7 +23,7 @@ MessageForm=Missatge al formulari de pagament en línia MessageOK=Missatge a la pàgina de devolució d'un pagament validat MessageKO=Missatge a la pàgina de devolució d'un pagament cancel·lat ContentOfDirectoryIsNotEmpty=El contingut d'aquest directori no és buit. -DeleteAlsoContentRecursively=Marqueu per eliminar tot el contingut recursivament +DeleteAlsoContentRecursively=Marqueu per a suprimir tot el contingut recursivament PoweredBy=Impulsat per YearOfInvoice=Any de la data de factura PreviousYearOfInvoice=Any anterior de la data de la factura @@ -77,12 +77,13 @@ Notify_TASK_DELETE=Tasca eliminada Notify_EXPENSE_REPORT_VALIDATE=Informe de despeses validat (cal aprovar) Notify_EXPENSE_REPORT_APPROVE=Informe de despeses aprovat Notify_HOLIDAY_VALIDATE=Sol·licitud de sol licitud validada (cal aprovar) -Notify_HOLIDAY_APPROVE=Deixa la sol · licitud aprovada +Notify_HOLIDAY_APPROVE=Sol·licitud de permís aprovada +Notify_ACTION_CREATE=S'ha afegit l'acció a l'Agenda SeeModuleSetup=Vegi la configuració del mòdul %s NbOfAttachedFiles=Número arxius/documents adjunts TotalSizeOfAttachedFiles=Mida total dels arxius/documents adjunts -MaxSize=Tamany màxim -AttachANewFile=Adjuntar nou arxiu/document +MaxSize=Mida màxima +AttachANewFile=Adjunta un fitxer/document nou LinkedObject=Objecte adjuntat NbOfActiveNotifications=Nombre de notificacions (número de correus electrònics del destinatari) PredefinedMailTest=__(Hola)__\nAquest és un missatge de prova enviat a __EMAIL__.\nLes línies estan separades per una tornada de carro.\n\n__USER_SIGNATURE__ @@ -100,7 +101,7 @@ PredefinedMailContentSendFichInter=__(Hola)__\n\nTrobeu la intervenció __REF__ PredefinedMailContentLink=Podeu fer clic a l'enllaç següent per fer el pagament si encara no està fet.\n\n%s\n\n PredefinedMailContentGeneric=__(Hello)__\n\n\n__ (Sincerely) __\n\n__USER_SIGNATURE__ PredefinedMailContentSendActionComm=Recordatori d'esdeveniments "__EVENT_LABEL__" el dia __EVENT_DATE__ a les __EVENT_TIME__ <br> <br> Aquest és un missatge automàtic, no respongueu. -DemoDesc=Dolibarr és un ERP/CRM per a la gestió de negocis (professionals o associacions), compost de mòduls funcionals independents i opcionals. Una demostració que incloga tots aquests mòduls no té sentit perquè no utilitzarà tots els mòduls al mateix temps. Per això, hi han disponibles diferents tipus de perfils de demostració. +DemoDesc=Dolibarr és un ERP/CRM compacte que admet diversos mòduls empresarials. Una demostració que mostri tots els mòduls no té cap sentit, ja que aquest escenari no es produeix mai (diversos centenars disponibles). Per tant, hi ha disponibles diversos perfils de demostració. ChooseYourDemoProfil=Selecciona el perfil de demo que cobreixi millor les teves necessitats... ChooseYourDemoProfilMore=o construeix el teu perfil<br>(selecció de mòduls manual) DemoFundation=Gestió de socis d'una entitat @@ -119,11 +120,11 @@ ModifiedById=Id de l'usuari que ha fet l'últim canvi ValidatedById=ID d'usuari que a validat CanceledById=ID d'usuari que ha cancel·lat ClosedById=ID d'usuari que a tancat -CreatedByLogin=Login d'usuari que a creat +CreatedByLogin=Usuari que ha creat ModifiedByLogin=Codi d'usuari que ha fet l'últim canvi -ValidatedByLogin=Login d'usuari que ha validat -CanceledByLogin=Login d'usuari que ha cancel·lat -ClosedByLogin=Login d'usuari que a tancat +ValidatedByLogin=Usuari que ha validat +CanceledByLogin=Usuari que ha cancel·lat +ClosedByLogin=Usuari que ha tancat FileWasRemoved=L'arxiu %s s'ha eliminat DirWasRemoved=La carpeta %s s'ha eliminat FeatureNotYetAvailable=Funcionalitat encara no disponible en aquesta versió @@ -136,7 +137,7 @@ Bottom=Inferior Left=Esquerra Right=Dreta CalculatedWeight=Pes calculat -CalculatedVolume=Volume calculat +CalculatedVolume=Volum calculat Weight=Pes WeightUnitton=tona WeightUnitkg=kg @@ -177,23 +178,23 @@ BugTracker=Incidències SendNewPasswordDesc=Aquest formulari et permet sol·licitar una nova contrasenya. S'enviarà a la teva adreça de correu electrònic. <br> El canvi es farà efectiu una vegada facis clic a l'enllaç de confirmació del correu electrònic. <br> Comprova la teva safata d'entrada. BackToLoginPage=Tornar a la pàgina de connexió AuthenticationDoesNotAllowSendNewPassword=El mode d'autenticació de Dolibarr està configurat com "<b>%s</b>".<br>En aquest mode Dolibarr no pot conèixer ni modificar la seva contrasenya<br>Contacti amb l'administrador per conèixer les modalitats de canvi. -EnableGDLibraryDesc=Instala o habilita la llibreria GD en la teva instal·lació PHP per poder utilitzar aquesta opció. +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 StatsByNumberOfEntities=Estadístiques en nombre d'entitats referents (número de factura o ordre ...) -NumberOfProposals=Número de pressupostos +NumberOfProposals=Nombre de pressupostos NumberOfCustomerOrders=Nombre de comandes de venda -NumberOfCustomerInvoices=Número de factures de client -NumberOfSupplierProposals=Nombre de propostes de venedor +NumberOfCustomerInvoices=Nombre de factures de client +NumberOfSupplierProposals=Nombre de pressupostos de proveïdor NumberOfSupplierOrders=Nombre de comandes de compra NumberOfSupplierInvoices=Nombre de factures de venedor NumberOfContracts=Nombre de contractes NumberOfMos=Nombre d'ordres de fabricació -NumberOfUnitsProposals=Número d'unitats en pressupostos +NumberOfUnitsProposals=Nombre d'unitats en pressupostos NumberOfUnitsCustomerOrders=Nombre d'unitats per comandes de venda -NumberOfUnitsCustomerInvoices=Número d'unitats en factures de client -NumberOfUnitsSupplierProposals=Nombre d'unitats en propostes de venedor +NumberOfUnitsCustomerInvoices=Nombre d'unitats en factures de client +NumberOfUnitsSupplierProposals=Nombre d'unitats en pressupostos de proveïdor NumberOfUnitsSupplierOrders=Nombre d'unitats en comandes de compra NumberOfUnitsSupplierInvoices=Nombre d'unitats a les factures del venedor NumberOfUnitsContracts=Nombre d’unitats en contractes @@ -215,12 +216,13 @@ EMailTextExpenseReportValidated=L'informe de despeses %s ha estat validat. EMailTextExpenseReportApproved=S'ha aprovat l'informe de despeses %s. EMailTextHolidayValidated=S'ha validat la sol licitud %s. EMailTextHolidayApproved=S'ha aprovat la sol licitud %s. +EMailTextActionAdded=L'acció %s s'ha afegit a l'agenda. ImportedWithSet=Lot d'importació (import key) DolibarrNotification=Notificació automàtica ResizeDesc=Introduïu l'ample <b>O</b> la nova alçada. La relació es conserva en canviar la mida... -NewLength=Nou ample -NewHeight=Nova alçada -NewSizeAfterCropping=Noves dimensions després de retallar +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 ImageEditor=Editor d'imatge @@ -230,18 +232,18 @@ ThisIsListOfModules=Li mostrem un llistat de mòduls preseleccionats per a aques UseAdvancedPerms=Usar els drets avançats en els permisos dels mòduls FileFormat=Format d'arxiu SelectAColor=Tria un color -AddFiles=Afegir arxius +AddFiles=Afegeix arxius StartUpload=Transferir CancelUpload=Cancel·lar transferència FileIsTooBig=L'arxiu és massa gran -PleaseBePatient=Preguem esperi uns instants... -NewPassword=Nova contrasenya +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à ClickHereToGoTo=Clica aquí per anar a %s -YouMustClickToChange=però, primer ha de fer clic en el següent enllaç per validar aquest canvi de contrasenya +YouMustClickToChange=De totes formes, primer heu de fer clic al següent enllaç per a validar aquest canvi de contrasenya 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 @@ -259,6 +261,7 @@ ContactCreatedByEmailCollector=Contacte / adreça creada pel recollidor de corre ProjectCreatedByEmailCollector=Projecte creat pel recollidor de correus electrònics MSGID %s TicketCreatedByEmailCollector=Tiquet creat pel recollidor de correus electrònics MSGID %s OpeningHoursFormatDesc=Utilitzeu a - per separar l’horari d’obertura i tancament. <br> Utilitzeu un espai per introduir diferents intervals. <br> Exemple: 8-12 14-18 +PrefixSession=Prefix per a l'identificador de sessió ##### Export ##### ExportsArea=Àrea d'exportacions diff --git a/htdocs/langs/ca_ES/paybox.lang b/htdocs/langs/ca_ES/paybox.lang index a83d626c618..0da9d902659 100644 --- a/htdocs/langs/ca_ES/paybox.lang +++ b/htdocs/langs/ca_ES/paybox.lang @@ -18,12 +18,11 @@ YourPaymentHasBeenRecorded=Aquesta pàgina confirma que el pagament s'ha registr YourPaymentHasNotBeenRecorded=El vostre pagament no s'ha registrat i la transacció s'ha cancel·lat. Gràcies. AccountParameter=Paràmetres del compte UsageParameter=Paràmetres d'ús -InformationToFindParameters=Informació per trobar la seva configuració de compte %s +InformationToFindParameters=Ajuda per a trobar la vostra informació del compte %s PAYBOX_CGI_URL_V2=Url del mòdul CGI Paybox de pagament -VendorName=Nom del venedor CSSUrlForPaymentForm=Url del full d'estil CSS per al formulari de pagament -NewPayboxPaymentReceived=Nou pagament Paybox rebut -NewPayboxPaymentFailed=Nou intent de pagament Paybox sense èxit +NewPayboxPaymentReceived=S'ha rebut el nou pagament de Paybox +NewPayboxPaymentFailed=S'ha provat el nou pagament de Paybox, però ha fallat PAYBOX_PAYONLINE_SENDEMAIL=Notificació per correu electrònic després de l'intent de pagament (èxit o fracàs) PAYBOX_PBX_SITE=Valor per PBX SITE PAYBOX_PBX_RANG=valor per PBX Rang diff --git a/htdocs/langs/ca_ES/productbatch.lang b/htdocs/langs/ca_ES/productbatch.lang index 8ca82527e6c..798e4d56cbb 100644 --- a/htdocs/langs/ca_ES/productbatch.lang +++ b/htdocs/langs/ca_ES/productbatch.lang @@ -1,17 +1,17 @@ # ProductBATCH language file - en_US - ProductBATCH -ManageLotSerial=Utilitzar numeració per lots/series -ProductStatusOnBatch=Si (es necessita lot/serie) -ProductStatusNotOnBatch=No (no s'utilitza lot/serie) +ManageLotSerial=Utilitza el número de lot/sèrie +ProductStatusOnBatch=Sí (es requereix un lot/sèrie) +ProductStatusNotOnBatch=No (lot/sèrie no utilitzat) ProductStatusOnBatchShort=Si ProductStatusNotOnBatchShort=No -Batch=Lot/Serie -atleast1batchfield=Data de caducitat o Data de venda o Lot/Numero de Serie -batch_number=Número de Lot/Serie -BatchNumberShort=Lot/Serie +Batch=Lot/Sèrie +atleast1batchfield=Data de caducitat o data de venda o número de lot/sèrie +batch_number=Número de lot/sèrie +BatchNumberShort=Lot/Sèrie EatByDate=Data de caducitat SellByDate=Data límit de venda -DetailBatchNumber=Detalls del lot/serie -printBatch=Lot/Serie %s +DetailBatchNumber=Detalls del lot/sèrie +printBatch=Lot/Sèrie: %s printEatby=Caducitat: %s printSellby=Límit venda: %s printQty=Quant.: %d @@ -21,4 +21,4 @@ ProductDoesNotUseBatchSerial=Aquest producte no utilitza lot/número de sèrie 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=Detalls del stock per lot +StockDetailPerBatch=Detall d’estoc per lot diff --git a/htdocs/langs/ca_ES/products.lang b/htdocs/langs/ca_ES/products.lang index 49bfe4daa99..ab089492c72 100644 --- a/htdocs/langs/ca_ES/products.lang +++ b/htdocs/langs/ca_ES/products.lang @@ -15,12 +15,12 @@ Service=Servei ProductId=ID producte/servei Create=Crear Reference=Referència -NewProduct=Nou producte -NewService=Nou servei +NewProduct=Producte nou +NewService=Servei nou ProductVatMassChange=Actualització d'Impostos Global ProductVatMassChangeDesc=Aquesta eina actualitza el tipus d'IVA establert a <b> <u> TOTS </u> </b> els productes i serveis! MassBarcodeInit=Inicialització massiu de codis de barres -MassBarcodeInitDesc=Pot utilitzar aquesta pàgina per inicialitzar el codi de barres en els objectes que no tenen un codi de barres definit. Comprovi abans que el mòdul de codis de barres estar ben configurat +MassBarcodeInitDesc=Aquesta pàgina es pot utilitzar per a inicialitzar un codi de barres en els objectes que no tenen un codi de barres definit. Comproveu abans que la configuració del mòdul de codi de barres està completada. ProductAccountancyBuyCode=Codi comptable (compra) ProductAccountancyBuyIntraCode=Codi comptable (compra intracomunitària) ProductAccountancyBuyExportCode=Codi comptable (compra d'importació) @@ -48,7 +48,7 @@ LastRecordedProducts=Últims %s productes registrats LastRecordedServices=Últims %s serveis registrats CardProduct0=Producte CardProduct1=Servei -Stock=Stock +Stock=Estoc MenuStocks=Estocs Stocks=Estocs i ubicació (magatzem) de productes Movements=Moviments @@ -77,10 +77,10 @@ CostPriceDescription=Aquest camp de preus (sense IVA) es pot utilitzar per emmag CostPriceUsage=Aquest valor pot utilitzar-se per al càlcul de marges SoldAmount=Import venut PurchasedAmount=Import comprat -NewPrice=Nou preu +NewPrice=Preu nou MinPrice=Min. preu de venda EditSellingPriceLabel=Edita l'etiqueta de preu de venda -CantBeLessThanMinPrice=El preu de venda no ha de ser inferior al mínim per a aquest producte (%s sense IVA). Aquest missatge pot estar causat per un descompte molt gran. +CantBeLessThanMinPrice=El preu de venda no pot ser inferior al mínim permès per a aquest producte (%s sense IVA). Aquest missatge també pot aparèixer si escriviu un descompte massa gran. ContractStatusClosed=Tancat ErrorProductAlreadyExists=Un producte amb la referència %s ja existeix. ErrorProductBadRefOrLabel=El valor de la referència o etiqueta és incorrecte @@ -93,7 +93,7 @@ ShowService=Mostrar servei ProductsAndServicesArea=Àrea productes i serveis ProductsArea=Àrea Productes ServicesArea=Àrea Serveis -ListOfStockMovements=Llistat de moviments de stock +ListOfStockMovements=Llista de moviments d’estoc BuyingPrice=Preu de compra PriceForEachProduct=Productes amb preus específics SupplierCard=Targeta venedor @@ -106,12 +106,13 @@ NoteNotVisibleOnBill=Nota (no visible en les factures, pressupostos, etc.) ServiceLimitedDuration=Si el servei és de durada limitada: FillWithLastServiceDates=Emplena les dates de l'última línia de servei MultiPricesAbility=Segments de preus múltiples per producte / servei (cada client està en un segment de preus) -MultiPricesNumPrices=Nº de preus +MultiPricesNumPrices=Nombre de preus DefaultPriceType=Base de preus per defecte (contra impostos) en afegir preus de venda nous -AssociatedProductsAbility=Activa els kits (productes virtuals) +AssociatedProductsAbility=Activa els kits (conjunt de diversos productes) +VariantsAbility=Activa les variants (variacions de productes, per exemple, color, mida) AssociatedProducts=Kits -AssociatedProductsNumber=Número de productes que componen aquest kit -ParentProductsNumber=Nº de productes que aquest compon +AssociatedProductsNumber=Nombre de productes que componen aquest kit +ParentProductsNumber=Nombre de productes on està inclòs ParentProducts=Productes pare IfZeroItIsNotAVirtualProduct=Si és 0, aquest producte no és un kit IfZeroItIsNotUsedByVirtualProduct=Si és 0, aquest producte no s'utilitza en cap kit @@ -131,13 +132,13 @@ ExportDataset_service_1=Serveis ImportDataset_produit_1=Productes ImportDataset_service_1=Serveis DeleteProductLine=Eliminar línia de producte -ConfirmDeleteProductLine=Esteu segur de voler eliminar aquesta línia de producte? +ConfirmDeleteProductLine=Esteu segur que voleu suprimir aquesta línia de producte? 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) -DiscountQtyMin=Descompte per aquest quantitat +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 PredefinedProductsToSell=Producte predefinit @@ -148,12 +149,12 @@ PredefinedServicesToPurchase=Serveis predefinits per comprar PredefinedProductsAndServicesToPurchase=Productes / serveis predefinits per comprar NotPredefinedProducts=Sense productes/serveis predefinits GenerateThumb=Generar l'etiqueta -ServiceNb=Servei nº %s +ServiceNb=Servei núm. %s ListProductServiceByPopularity=Llistat de productes/serveis per popularitat ListProductByPopularity=Llistat de productes/serveis per popularitat ListServiceByPopularity=Llistat de serveis per popularitat Finished=Producte fabricat -RowMaterial=Matèria prima +RowMaterial=Matèria primera ConfirmCloneProduct=Estàs segur que vols clonar el producte o servei <b>%s</b>? CloneContentProduct=Clona tota la informació principal del producte/servei ClonePricesProduct=Clonar preus @@ -161,14 +162,16 @@ CloneCategoriesProduct=Etiquetes i categories de clons enllaçades CloneCompositionProduct=Clonar virtualment un producte/servei CloneCombinationsProduct=Clonar variants de producte ProductIsUsed=Aquest producte és utilitzat -NewRefForClone=Ref. del nou producte/servei +NewRefForClone=Ref. del producte/servei nou SellingPrices=Preus de venda BuyingPrices=Preus de compra CustomerPrices=Preus de client SuppliersPrices=Preus del proveïdor SuppliersPricesOfProductsOrServices=Preus del venedor (de productes o serveis) -CustomCode=Duana / mercaderia / codi HS +CustomCode=Duanes | Productes bàsics | Codi HS CountryOrigin=País d'origen +RegionStateOrigin=Regió d'origen +StateOrigin=Estat | Província d'origen Nature=Naturalesa del producte (material/acabat) NatureOfProductShort=Naturalesa del producte NatureOfProductDesc=Matèria primera o producte acabat @@ -216,7 +219,7 @@ unitDM=dm unitCM=cm unitMM=mm unitFT=peu -unitIN=pulzada +unitIN=polzada unitM2=Metre quadrat unitDM2=dm² unitCM2=cm² @@ -239,17 +242,17 @@ AlwaysUseFixedPrice=Utilitzar el preu fixat PriceByQuantity=Preus diferents per quantitat DisablePriceByQty=Desactivar els preus per quantitat PriceByQuantityRange=Rang de quantitats -MultipriceRules=Regles de nivell de preu +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 PercentVariationOver=%% variació sobre %s PercentDiscountOver=%% descompte sobre %s -KeepEmptyForAutoCalculation=Mantingueu-lo buit per obtenir-ho calculat automàticament pel pes o el volum dels productes +KeepEmptyForAutoCalculation=Mantingueu-lo buit per a calcular-ho automàticament a partir del pes o volum dels productes VariantRefExample=Exemples: COL, TALLA VariantLabelExample=Exemples: Color, Talla ### composition fabrication Build=Fabricar ProductsMultiPrice=Productes i preus per cada nivell de preu -ProductsOrServiceMultiPrice=Preus de client (productes o serveis, multi-preus) +ProductsOrServiceMultiPrice=Preus per als clients (de productes o serveis, multipreus) ProductSellByQuarterHT=Facturació de productes trimestral abans d'impostos ServiceSellByQuarterHT=Facturació de serveis trimestral abans d'impostos Quarter1=1º trimestre @@ -258,7 +261,7 @@ Quarter3=3º trimestre Quarter4=4º trimestre BarCodePrintsheet=Imprimeix codi de barres PageToGenerateBarCodeSheets=Amb aquesta eina, podeu imprimir fulls adhesius de codis de barres. Trieu el format de la vostra pàgina d'etiqueta, tipus de codi de barres i valor del codi de barres, i feu clic al botó <b> %s </b>. -NumberOfStickers=Nùmero d'etiquetes per imprimir a la pàgina +NumberOfStickers=Nombre d'adhesius per imprimir a la pàgina PrintsheetForOneBarCode=Imprimir varies etiquetes per codi de barres BuildPageToPrint=Generar pàgines a imprimir FillBarCodeTypeAndValueManually=Emplenar tipus i valor del codi de barres manualment @@ -276,10 +279,10 @@ AddCustomerPrice=Afegir preus per client ForceUpdateChildPriceSoc=Indica el mateix preu a les filials dels clients PriceByCustomerLog=Registre de preus de clients anteriors MinimumPriceLimit=El preu mínim no pot ser inferior a %s -MinimumRecommendedPrice=El preu mínim recomenat es: %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 configurar un preu. Utilitzi ; per separar expresions +PriceExpressionEditorHelp1="price = 2 + 2" o "2 + 2" per definir el preu. Utilitzeu ; per 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> @@ -308,10 +311,10 @@ GlobalVariableUpdaterHelpFormat1=El format per a la sol·licitud és {"URL": "ht UpdateInterval=Interval d'actualització (minuts) LastUpdated=Última actualització CorrectlyUpdated=Actualitzat correctament -PropalMergePdfProductActualFile=Els fitxers utilitzats per afegir-se en el PDF Azur són +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 -DefaultPriceRealPriceMayDependOnCustomer=Preu per defecte, el preu real depén de client +DefaultPriceRealPriceMayDependOnCustomer=Preu predeterminat, el preu real pot dependre del client WarningSelectOneDocument=Selecciona com a mínim un document DefaultUnitToShow=Unitat NbOfQtyInProposals=Qtat. en pressupostos @@ -328,7 +331,7 @@ WidthUnits=Unitat d’amplada LengthUnits=Unitat de longitud HeightUnits=Unitat d'alçada SurfaceUnits=Unitat de superfície -SizeUnits=Unitat de tamany +SizeUnits=Unitat de mida DeleteProductBuyPrice=Elimina preu de compra ConfirmDeleteProductBuyPrice=Esteu segur de voler eliminar aquest preu de compra? SubProduct=Subproducte @@ -356,9 +359,9 @@ ProductCombinations=Variants PropagateVariant=Propaga variants HideProductCombinations=Ocultar les variants en el selector de productes ProductCombination=Variant -NewProductCombination=Nova variant +NewProductCombination=Variant nova EditProductCombination=Editant variant -NewProductCombinations=Nous variants +NewProductCombinations=Variants noves EditProductCombinations=Editant variants SelectCombination=Selecciona la combinació ProductCombinationGenerator=Generador de variants @@ -368,11 +371,11 @@ ImpactOnPriceLevel=Impacte en el nivell de preus %s ApplyToAllPriceImpactLevel= Aplica a tots els nivells ApplyToAllPriceImpactLevelHelp=En fer clic aquí, establireu el mateix impacte de preu en tots els nivells WeightImpact=Impacte en el pes -NewProductAttribute=Nou atribut -NewProductAttributeValue=Nou valor de l'atribut -ErrorCreatingProductAttributeValue=Ha ocorregut un error al crear el valor de l'atribut. Això pot ser perque ja no existeixca un valor amb aquesta referència +NewProductAttribute=Atribut nou +NewProductAttributeValue=Valor d'atribut nou +ErrorCreatingProductAttributeValue=S'ha produït un error en crear el valor de l'atribut. Podria ser perquè ja hi ha un valor existent amb aquesta referència ProductCombinationGeneratorWarning=Si continua, abans de generar noves variants, totes les anteriors seran ELIMINADES. Les ja existents s'actualitzaran amb els nous valors -TooMuchCombinationsWarning=Generar una gran quantitat de variants pot donar lloc a un ús de CPU alta, ús de memòria i que Dolibarr no siga capaç de crearles. Habilitar l'opció "%s" pot ajudar a reduir l'ús de memòria. +TooMuchCombinationsWarning=La generació de moltes variants pot provocar un elevat consum de la CPU i ús de memòria i Dolibarr no les podrà crear. Habilitant l'opció "%s" pot ajudar a reduir l'ús de memòria. DoNotRemovePreviousCombinations=No elimineu les variants anteriors UsePercentageVariations=Utilitzar variants percentuals PercentageVariation=Variant percentual diff --git a/htdocs/langs/ca_ES/projects.lang b/htdocs/langs/ca_ES/projects.lang index d7b36bb013a..d9a8e813264 100644 --- a/htdocs/langs/ca_ES/projects.lang +++ b/htdocs/langs/ca_ES/projects.lang @@ -7,7 +7,7 @@ ProjectsArea=Àrea de projectes ProjectStatus=Estat el projecte SharedProject=Projecte compartit PrivateProject=Contactes del projecte -ProjectsImContactFor=Projectes on sóc explícitament un contacte +ProjectsImContactFor=Projectes dels qui en soc explícitament un contacte AllAllowedProjects=Tots els projectes que puc llegir (meu + públic) AllProjects=Tots els projectes MyProjectsDesc=Aquesta vista mostra aquells projectes dels quals sou un contacte. @@ -20,12 +20,12 @@ MyTasksDesc=Aquesta vista es limita als projectes o a les tasques als quals sou OnlyOpenedProject=Només visibles els projectes oberts (els projectes en estat d'esborrany o tancats no són visibles) ClosedProjectsAreHidden=Els projectes tancats no són visibles. TasksPublicDesc=Aquesta vista mostra tots els projectes i tasques en els que vostè té dret a tenir visibilitat. -TasksDesc=Aquesta vista mostra tots els projectes i tasques (les sevas autoritzacions li ofereixen una visió completa). +TasksDesc=Aquesta vista presenta tots els projectes i tasques (els permisos d'usuari us concedeixen permís per veure-ho tot). AllTaskVisibleButEditIfYouAreAssigned=Totes les tasques per a projectes qualificats són visibles, però podeu ingressar només el temps per a la tasca assignada a l'usuari seleccionat. Assigneu la tasca si necessiteu introduir-hi el temps. OnlyYourTaskAreVisible=Només són visibles les tasques que tens assignades. Assigna't tasques si no són visibles i vols afegir-hi les hores. ImportDatasetTasks=Tasques de projectes ProjectCategories=Etiquetes de projecte -NewProject=Nou projecte +NewProject=Projecte nou AddProject=Crear projecte DeleteAProject=Eliminar un projecte DeleteATask=Eliminar una tasca @@ -65,10 +65,10 @@ Task=Tasca TaskDateStart=Data d'inici TaskDateEnd=Data de finalització TaskDescription=Descripció de tasca -NewTask=Nova tasca +NewTask=Tasca nova AddTask=Crear tasca AddTimeSpent=Crea temps dedicat -AddHereTimeSpentForDay=Afegeix aqui el temps dedicat per aquest dia/tasca +AddHereTimeSpentForDay=Afegiu aquí el temps dedicat a aquest dia/tasca AddHereTimeSpentForWeek=Afegeix aquí el temps dedicat per aquesta setmana/tasca Activity=Activitat Activities=Tasques/activitats @@ -85,6 +85,7 @@ ProgressCalculated=Progressió calculada WhichIamLinkedTo=al qual estic vinculat WhichIamLinkedToProject=que estic vinculat al projecte Time=Temps +TimeConsumed=Consumit ListOfTasks=Llistat de tasques GoToListOfTimeConsumed=Ves al llistat de temps consumit GanttView=Vista de Gantt @@ -120,7 +121,7 @@ ValidateProject=Validar projecte ConfirmValidateProject=Vols validar aquest projecte? CloseAProject=Tancar projecte ConfirmCloseAProject=Vols tancar aquest projecte? -AlsoCloseAProject=Tancar també el projecte (mantindre obert si encara necessita seguir les tasques de producció en ell) +AlsoCloseAProject=Tanqueu el projecte també (manteniu-lo obert si encara heu de seguir les tasques de producció) ReOpenAProject=Reobrir projecte ConfirmReOpenAProject=Vols reobrir aquest projecte? ProjectContact=Contactes del projecte @@ -139,7 +140,7 @@ LinkedToAnotherCompany=Enllaçat a una altra empresa TaskIsNotAssignedToUser=Tasca no assignada a l'usuari. Utilitza el botó '<strong>%s</strong>' per assignar una tasca ara. ErrorTimeSpentIsEmpty=El temps dedicat està buit ThisWillAlsoRemoveTasks=Aquesta operació també destruirà les tasques del projecte (<b>%s</b> tasques en aquest moment) i tots els seus temps dedicats. -IfNeedToUseOtherObjectKeepEmpty=Si els elements (factura, comanda, ...) pertanyen a un tercer que no és el seleccionat, havent aquests estar lligats al projecte a crear, deixeu buit per permetre el projecte a multi-tercers. +IfNeedToUseOtherObjectKeepEmpty=Si alguns objectes (factura, comanda...), pertanyents a un altre tercer, han d'estar vinculats al projecte a crear, manteniu-los buits perquè el projecte sigui multitercers. CloneTasks=Clonar les tasques CloneContacts=Clonar els contactes CloneNotes=Clonar les notes @@ -208,7 +209,7 @@ ProjectOverview=Informació general ManageTasks=Utilitzeu projectes per seguir les tasques i / o informar el temps dedicat (fulls de temps) ManageOpportunitiesStatus=Utilitza els projectes per seguir oportunitats ProjectNbProjectByMonth=Nombre de projectes creats per mes -ProjectNbTaskByMonth=Nº de tasques creades per mes +ProjectNbTaskByMonth=Nombre de tasques creades per mes ProjectOppAmountOfProjectsByMonth=Quantitat de clients potencials per mes ProjectWeightedOppAmountOfProjectsByMonth=Quantitat ponderada de clients potencials per mes ProjectOpenedProjectByOppStatus=Projecte obert | lead per l'estat de lead @@ -254,7 +255,7 @@ TimeSpentForInvoice=Temps dedicat OneLinePerUser=Una línia per usuari ServiceToUseOnLines=Servei d'ús a les línies InvoiceGeneratedFromTimeSpent=La factura %s s'ha generat a partir del temps dedicat al projecte -ProjectBillTimeDescription=Comproveu si heu introduït el full de temps en les tasques del projecte I teniu previst generar factures des del full de temps per facturar al client del projecte (no comproveu si voleu crear la factura que no es basa en els fulls de temps introduïts). Nota: Per generarla factura, aneu a la pestanya "Temps introduït" del projecte i seleccioneu les línies que cal incloure. +ProjectBillTimeDescription=Comproveu si heu introduït el full de temps en les tasques del projecte I teniu previst generar factures des del full de temps per a facturar al client del projecte (no comproveu si voleu crear la factura que no es basa en els fulls de temps introduïts). Nota: Per a generar la factura, aneu a la pestanya "Temps introduït" del projecte i seleccioneu les línies que cal incloure. ProjectFollowOpportunity=Segueix l’oportunitat ProjectFollowTasks=Seguir les tasques o el temps dedicat Usage=Ús @@ -262,7 +263,7 @@ UsageOpportunity=Ús: Oportunitat UsageTasks=Ús: Tasques UsageBillTimeShort=Ús: temps de facturació InvoiceToUse=Esborrany de factura a utilitzar -NewInvoice=Nova factura +NewInvoice=Factura nova OneLinePerTask=Una línia per tasca OneLinePerPeriod=Una línia per període RefTaskParent=Ref. Tasca pare diff --git a/htdocs/langs/ca_ES/receiptprinter.lang b/htdocs/langs/ca_ES/receiptprinter.lang index d0aa69ce402..cee89d1b087 100644 --- a/htdocs/langs/ca_ES/receiptprinter.lang +++ b/htdocs/langs/ca_ES/receiptprinter.lang @@ -5,28 +5,28 @@ PrinterUpdated=Impressora %s actualitzada PrinterDeleted=Impressora %s esborrada TestSentToPrinter=Prova enviada a la impressora %s ReceiptPrinter=Impressores de tiquets -ReceiptPrinterDesc=Configuració d'impresora de tiquets +ReceiptPrinterDesc=Configuració d'impressores de tiquets ReceiptPrinterTemplateDesc=Configuració de plantilles -ReceiptPrinterTypeDesc=Descripció del tipus d'impresora de tiquets -ReceiptPrinterProfileDesc=Descripció del perfil d'impresora de tiquets +ReceiptPrinterTypeDesc=Descripció del tipus d'impressora de tiquets +ReceiptPrinterProfileDesc=Descripció del perfil de la impressora de tiquets ListPrinters=Llista d'impressores SetupReceiptTemplate=Configuració de plantilla CONNECTOR_DUMMY=Impressora de proves -CONNECTOR_NETWORK_PRINT=Impresora en xarxa +CONNECTOR_NETWORK_PRINT=Impressora de xarxa CONNECTOR_FILE_PRINT=Impressora local CONNECTOR_WINDOWS_PRINT=Impressora local en Windows CONNECTOR_CUPS_PRINT=Impressora CUPS -CONNECTOR_DUMMY_HELP=Impresora de proves, no fa res +CONNECTOR_DUMMY_HELP=Impressora falsa per a provar, no fa res 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=Nom de la impressora CUPS, exemple: HPRT_TP805L PROFILE_DEFAULT=Perfil per defecte -PROFILE_SIMPLE=Perfil simpre +PROFILE_SIMPLE=Perfil simple PROFILE_EPOSTEP=Perfil Epos Tep PROFILE_P822D=Perfil P822D PROFILE_STAR=Perfil Star -PROFILE_DEFAULT_HELP=Perfil per defecte per a les impresores Epson +PROFILE_DEFAULT_HELP=Perfil predeterminat adequat per a impressores Epson PROFILE_SIMPLE_HELP=Perfil simple sense gràfics PROFILE_EPOSTEP_HELP=Perfil Epos Tep PROFILE_P822D_HELP=Perfil P822D sense gràfics diff --git a/htdocs/langs/ca_ES/recruitment.lang b/htdocs/langs/ca_ES/recruitment.lang index 538b7c54ea1..f9b8ebf2176 100644 --- a/htdocs/langs/ca_ES/recruitment.lang +++ b/htdocs/langs/ca_ES/recruitment.lang @@ -20,7 +20,7 @@ # Module label 'ModuleRecruitmentName' ModuleRecruitmentName = Contractació # Module description 'ModuleRecruitmentDesc' -ModuleRecruitmentDesc = Gestiona i segueix les campanyes de contractació de nous llocs de treball +ModuleRecruitmentDesc = Gestiona i segueix les campanyes de contractació de llocs de treball nous # # Admin page @@ -38,7 +38,7 @@ EnablePublicRecruitmentPages=Activa les pàgines públiques de treballs actius About = Sobre RecruitmentAbout = Quant a la contractació RecruitmentAboutPage = Pàgina quant a la contractació -NbOfEmployeesExpected=Nº previst d'empleats +NbOfEmployeesExpected=Nombre previst d'empleats JobLabel=Descripció del lloc de treball WorkPlace=Lloc de treball DateExpected=Data prevista @@ -54,7 +54,7 @@ JobOfferToBeFilled=Lloc de treball a cobrir ThisIsInformationOnJobPosition=Informació del lloc de treball a ocupar ContactForRecruitment=Contacte per a la contractació EmailRecruiter=El reclutador de correu electrònic -ToUseAGenericEmail=Per utilitzar un correu electrònic genèric. Si no està definit, s’utilitzarà el correu electrònic del responsable de la contractació +ToUseAGenericEmail=Per a utilitzar un correu electrònic genèric. Si no està definit, s’utilitzarà el correu electrònic del responsable de la contractació NewCandidature=Candidatura nova ListOfCandidatures=Llista de candidatures RequestedRemuneration=Retribució sol·licitada @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=L’oferta de feina està tancada. El lloc s'ha cobe JobClosedTextCanceled=L’oferta de feina està tancada. ExtrafieldsJobPosition=Atributs complementaris (llocs de treball) ExtrafieldsCandidatures=Atributs complementaris (sol·licituds de feina) +MakeOffer=Feu una oferta diff --git a/htdocs/langs/ca_ES/resource.lang b/htdocs/langs/ca_ES/resource.lang index f4b0d69ddf6..a608f69d929 100644 --- a/htdocs/langs/ca_ES/resource.lang +++ b/htdocs/langs/ca_ES/resource.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - resource MenuResourceIndex=Recursos -MenuResourceAdd=Nou recurs +MenuResourceAdd=Recurs nou DeleteResource=Elimina recurs ConfirmDeleteResourceElement=Estàs segur de voler eliminar el recurs d'aquest element? NoResourceInDatabase=Sense recursos a la base de dades. @@ -31,7 +31,7 @@ DictionaryResourceType=Tipus de recurs SelectResource=Seleccionar recurs IdResource=Id de recurs -AssetNumber=Número de serie +AssetNumber=Número de sèrie ResourceTypeCode=Codi de tipus de recurs ImportDataset_resource_1=Recursos diff --git a/htdocs/langs/ca_ES/salaries.lang b/htdocs/langs/ca_ES/salaries.lang index f4567d2fd49..de594952360 100644 --- a/htdocs/langs/ca_ES/salaries.lang +++ b/htdocs/langs/ca_ES/salaries.lang @@ -1,18 +1,18 @@ # Dolibarr language file - Source file is en_US - salaries SALARIES_ACCOUNTING_ACCOUNT_PAYMENT=Compte comptable utilitzat per usuaris tercers -SALARIES_ACCOUNTING_ACCOUNT_PAYMENT_Desc=S'utilitzarà un compte comptable dedicat definit en la fitxa d'usuari per a omplir el Llibre Major, o com valor predeterminar de la comptabilitat del Llibre Major si no es defineix un compte comptable en la fitxa d'usuari. +SALARIES_ACCOUNTING_ACCOUNT_PAYMENT_Desc=El compte comptable dedicat definit a la fitxa d'usuari només s’utilitzarà per a la comptabilitat auxiliar. Aquest s'utilitzarà per al llibre major i com a valor per defecte de la comptabilitat auxiliar si no es defineix un compte comptable d'usuari dedicat. SALARIES_ACCOUNTING_ACCOUNT_CHARGE=Compte comptable per defecte per als pagaments salarials Salary=Sou Salaries=Sous -NewSalaryPayment=Nou pagament de sous +NewSalaryPayment=Pagament de salari nou AddSalaryPayment=Afegeix pagament de sou SalaryPayment=Pagament de sous SalariesPayments=Pagaments de sous ShowSalaryPayment=Veure pagament de sous THM=Tarifa per hora mitjana -TJM=Tarifa diaria mitjana +TJM=Tarifa mitjana diària CurrentSalary=Salari actual -THMDescription=Aquest valor es pot utilitzar per calcular el cost del temps consumit en un projecte introduït pels usuaris si s'utilitza el projecte de mòdul +THMDescription=Aquest valor es pot utilitzar per a calcular el cost del temps consumit en un projecte introduït pels usuaris si s'utilitza el mòdul de projecte TJMDescription=Aquest valor només és informatiu i no s'utilitza en cap càlcul LastSalaries=Últims %s pagaments de salari AllSalaries=Tots els pagaments de salari diff --git a/htdocs/langs/ca_ES/sendings.lang b/htdocs/langs/ca_ES/sendings.lang index 421112e34da..a973ace4aee 100644 --- a/htdocs/langs/ca_ES/sendings.lang +++ b/htdocs/langs/ca_ES/sendings.lang @@ -15,7 +15,7 @@ StatisticsOfSendings=Estadístiques d'enviaments NbOfSendings=Nombre d'enviaments NumberOfShipmentsByMonth=Nombre d'enviaments per mes SendingCard=Fitxa d'enviament -NewSending=Nou enviament +NewSending=Enviament nou CreateShipment=Crear enviament QtyShipped=Qt. enviada QtyShippedShort=Quant. env. @@ -30,16 +30,17 @@ OtherSendingsForSameOrder=Altres enviaments d'aquesta comanda SendingsAndReceivingForSameOrder=Enviaments i recepcions per aquesta comanda SendingsToValidate=Enviaments a validar StatusSendingCanceled=Anul·lada +StatusSendingCanceledShort=Cancel·lat StatusSendingDraft=Esborrany StatusSendingValidated=Validat (productes a enviar o enviats) StatusSendingProcessed=Processat StatusSendingDraftShort=Esborrany StatusSendingValidatedShort=Validat StatusSendingProcessedShort=Processat -SendingSheet=Nota d'entrga +SendingSheet=Full d’enviament ConfirmDeleteSending=Estàs segur que vols eliminar aquest enviament? ConfirmValidateSending=Estàs segur que vols validar aquest enviament amb referència <b>%s</b>? -ConfirmCancelSending=Estàs segur que vols cancelar aquest enviament? +ConfirmCancelSending=Esteu segur que voleu cancel·lar aquest enviament? DocumentModelMerou=Model Merou A5 WarningNoQtyLeftToSend=Alerta, cap producte en espera d'enviament. StatsOnShipmentsOnlyValidated=Estadístiques realitzades únicament sobre les expedicions validades @@ -50,7 +51,7 @@ DateReceived=Data real de recepció ClassifyReception=Marca rebut SendShippingByEMail=Envia expedició per e-mail SendShippingRef=Enviament de l'expedició %s -ActionsOnShipping=Events sobre l'expedició +ActionsOnShipping=Esdeveniments en l'enviament LinkToTrackYourPackage=Enllaç per al seguiment del seu paquet ShipmentCreationIsDoneFromOrder=De moment, la creació d'una nova expedició es realitza des de la fitxa de comanda. ShipmentLine=Línia d'expedició diff --git a/htdocs/langs/ca_ES/stocks.lang b/htdocs/langs/ca_ES/stocks.lang index a567ac331f0..5de1e46400b 100644 --- a/htdocs/langs/ca_ES/stocks.lang +++ b/htdocs/langs/ca_ES/stocks.lang @@ -3,13 +3,13 @@ WarehouseCard=Fitxa magatzem Warehouse=Magatzem Warehouses=Magatzems ParentWarehouse=Magatzem pare -NewWarehouse=Nou magatzem o zona d'emmagatzematge +NewWarehouse=Magatzem / Ubicació d'estoc nova WarehouseEdit=Edició magatzem -MenuNewWarehouse=Nou magatzem +MenuNewWarehouse=Magatzem nou WarehouseSource=Magatzem origen WarehouseSourceNotDefined=Sense magatzems definits, AddWarehouse=Crea un magatzem -AddOne=Afegir un +AddOne=Afegeix-ne un DefaultWarehouse=Magatzem predeterminat WarehouseTarget=Magatzem destinació ValidateSending=Elimina l'enviament @@ -17,8 +17,8 @@ CancelSending=Cancel·la l'enviament DeleteSending=Elimina l'enviament Stock=Estoc Stocks=Estocs -MissingStocks=Estoc que falta -StockAtDate=Existències en data +MissingStocks=Estocs que falten +StockAtDate=Estocs en data StockAtDateInPast=Data passada StockAtDateInFuture=Data en el futur StocksByLotSerial=Estocs per lot/sèrie @@ -27,7 +27,7 @@ LotSerialList=Llista de lots/sèries Movements=Moviments ErrorWarehouseRefRequired=El nom de referència del magatzem és obligatori ListOfWarehouses=Llistat de magatzems -ListOfStockMovements=Llistat de moviments de estoc +ListOfStockMovements=Llistat de moviments d'estoc ListOfInventories=Llista d'inventaris MovementId=ID del moviment StockMovementForId=ID de moviment %d @@ -46,7 +46,7 @@ Units=Unitats Unit=Unitat StockCorrection=Regularització d'estoc CorrectStock=Regularització d'estoc -StockTransfer=Transferencia d'estoc +StockTransfer=Transferència d’estoc TransferStock=Transferència d'estoc MassStockTransferShort=Transferència d'estoc massiu StockMovement=Moviment d'estoc @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Estableix un magatzem per a les comandes de venda UserDefaultWarehouse=Estableix un magatzem per Usuaris MainDefaultWarehouse=Magatzem predeterminat @@ -102,9 +103,9 @@ IdWarehouse=Id. magatzem DescWareHouse=Descripció magatzem LieuWareHouse=Localització magatzem WarehousesAndProducts=Magatzems i productes -WarehousesAndProductsBatchDetail=Magatzems i productes (amb detalls per lot/serie) +WarehousesAndProductsBatchDetail=Magatzems i productes (amb detall per lot/sèrie) AverageUnitPricePMPShort=Preu mitjà ponderat -AverageUnitPricePMPDesc=El preu unitari mitjà d’entrada que hem de pagar als proveïdors per incorporar el producte a les nostres existències. +AverageUnitPricePMPDesc=El preu unitari mitjà d’entrada que hem hagut de pagar als proveïdors per incorporar el producte al nostre estoc. SellPriceMin=Preu de venda unitari EstimatedStockValueSellShort=Valor per vendre EstimatedStockValueSell=Valor per vendre @@ -112,7 +113,7 @@ EstimatedStockValueShort=Valor compra (PMP) EstimatedStockValue=Valor de compra (PMP) DeleteAWarehouse=Eliminar un magatzem ConfirmDeleteWarehouse=Vols eliminar el magatzem <b>%s</b>? -PersonalStock=Stoc personal %s +PersonalStock=Estoc personal %s ThisWarehouseIsPersonalStock=Aquest magatzem representa l'estoc personal de %s %s SelectWarehouseForStockDecrease=Tria el magatzem a utilitzar en el decrement d'estoc SelectWarehouseForStockIncrease=Tria el magatzem a utilitzar en l'increment d'estoc @@ -127,24 +128,24 @@ UseRealStockByDefault=Utilitza estoc real, en lloc d’estoc virtual, per a la f ReplenishmentCalculation=La quantitat a demanar serà (quantitat desitjada - estoc real) en lloc de (quantitat desitjada - estoc virtual) UseVirtualStock=Utilitza estoc virtual UsePhysicalStock=Utilitzar estoc físic -CurentSelectionMode=Mode de sel·leció actual +CurentSelectionMode=Mètode de selecció actual CurentlyUsingVirtualStock=Estoc virtual CurentlyUsingPhysicalStock=Estoc físic RuleForStockReplenishment=Regla pels reaprovisionaments d'estoc SelectProductWithNotNullQty=Seleccioneu com a mínim un producte amb un valor no nul i un proveïdor AlertOnly= Només alertes -IncludeProductWithUndefinedAlerts = Incloure també estocs negatius per als productes sense la quantitat desitjada definida, per restaurar-los a 0 -WarehouseForStockDecrease=Per la disminució d'estoc s'utilitzara el magatzem <b>%s</b> -WarehouseForStockIncrease=Pe l'increment d'estoc s'utilitzara el magatzem <b>%s</b> +IncludeProductWithUndefinedAlerts = Incloure també estoc negatiu per als productes sense la quantitat desitjada definida, per a restaurar-los a 0 +WarehouseForStockDecrease=El magatzem <b>%s</b> s’utilitzarà per a disminuir l’estoc +WarehouseForStockIncrease=El magatzem <b>%s</b> s'utilitzarà per a augmentar l'estoc ForThisWarehouse=Per aquest magatzem ReplenishmentStatusDesc=Aquesta és una llista de tots els productes amb un estoc inferior a l'estoc desitjat (o inferior al valor d'alerta si la casella de selecció "només alerta" està marcada). Amb la casella de selecció, podeu crear comandes de compra per suplir la diferència. ReplenishmentStatusDescPerWarehouse=Si voleu una reposició basada en la quantitat desitjada definida per magatzem, heu d’afegir un filtre al magatzem. ReplenishmentOrdersDesc=Aquesta és una llista de totes les comandes de compra oberta incloent productes predefinits. Només s'obren ordres amb productes predefinits, de manera que les comandes que poden afectar les existències, són visibles aquí. Replenishments=reaprovisionament -NbOfProductBeforePeriod=Quantitat del producte %s en estoc abans del periode seleccionat (< %s) +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 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=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". RecordMovement=Registre de transferència ReceivingForSameOrder=Recepcions d'aquesta comanda StockMovementRecorded=Moviments d'estoc registrat @@ -165,7 +166,7 @@ MovementCorrectStock=Ajustament d'estoc del producte %s MovementTransferStock=Transferència d'estoc de producte %s a un altre magatzem InventoryCodeShort=Codi Inv./Mov. NoPendingReceptionOnSupplierOrder=No hi ha cap recepció pendent deguda a l'ordre de compra obert -ThisSerialAlreadyExistWithDifferentDate=Aquest número de lot/serie (<strong%s</strong>) ja existeix, però amb una data de caducitat o venda diferent (trobat <strong>%s</strong> però ha introduït <strong>%s</strong>). +ThisSerialAlreadyExistWithDifferentDate=Aquest número de lot/sèrie (<strong> %s </strong>) ja existeix però amb diferent data de caducitat o venda (s'ha trobat <strong> %s </strong> però heu introduït <strong> %s </strong>). OpenAll=Actiu per a totes les accions OpenInternal=Actiu sols per accions internes UseDispatchStatus=Utilitzeu un estat d'enviament (aprovació / rebuig) per a les línies de productes en la recepció de l'ordre de compra @@ -176,9 +177,9 @@ ProductStockWarehouseDeleted=S'ha eliminat correctament el límit d'estoc per al AddNewProductStockWarehouse=Posar nou estoc límit per alertar i nou estoc òptim desitjat AddStockLocationLine=Decrementa quantitat i a continuació fes clic per afegir un altre magatzem per aquest producte InventoryDate=Data d'inventari -NewInventory=Nou inventari +NewInventory=Inventari nou inventorySetup = Configuració de l'inventari -inventoryCreatePermission=Crea un nou inventari +inventoryCreatePermission=Crea un inventari nou inventoryReadPermission=Veure inventaris inventoryWritePermission=Actualitza els inventaris inventoryValidatePermission=Valida l'inventari @@ -186,7 +187,7 @@ inventoryTitle=Inventari inventoryListTitle=Inventaris inventoryListEmpty=Cap inventari en progrés inventoryCreateDelete=Crea/elimina l'inventari -inventoryCreate=Crea nou +inventoryCreate=Crea un nou inventoryEdit=Edita inventoryValidate=Validat inventoryDraft=En servei @@ -201,7 +202,7 @@ SelectFournisseur=Categoria del proveïdor inventoryOnDate=Inventari INVENTORY_USE_INVENTORY_DATE_FOR_DATE_OF_MVT=Els moviments d’estoc tindran la data de l'inventari (en lloc de la data de validació de l'inventari) inventoryChangePMPPermission=Permet canviar el valor PMP d'un producte -ColumnNewPMP=Nova unitat PMP +ColumnNewPMP=Unitat PMP nova OnlyProdsInStock=No afegeixis producte sense estoc TheoricalQty=Qtat. teòrica TheoricalValue=Qtat. teòrica @@ -233,10 +234,11 @@ InventoryForASpecificProduct=Inventari d’un producte específic StockIsRequiredToChooseWhichLotToUse=Es requereix estoc per a triar quin lot utilitzar 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=Podeu veure aquí el valor (accions reals) en una data determinada en el passat -StockAtDateFutureDesc=Podeu veure aquí l'estoc (accions virtuals) en una data determinada en endavant +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 CurrentStock=Estoc actual -InventoryRealQtyHelp=Estableix el valor a 0 per restablir qty <br> Mantenir el camp buit o suprimir la línia per mantenir-la sense canvis +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 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. diff --git a/htdocs/langs/ca_ES/stripe.lang b/htdocs/langs/ca_ES/stripe.lang index 70f55a466e2..1f519da9659 100644 --- a/htdocs/langs/ca_ES/stripe.lang +++ b/htdocs/langs/ca_ES/stripe.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - stripe StripeSetup=Configuració del mòdul Stripe -StripeDesc=Ofereix als clients una pàgina de pagament en línia de Stripe per als pagaments amb targetes credit / cebit a través de <a href="http://www.stripe.com" target="_blank"> Stripe </a>. Això es pot utilitzar per permetre als vostres clients fer pagaments ad-hoc o pagaments relacionats amb un objecte particular de Dolibarr (factura, comanda ...) +StripeDesc=Ofereix als clients una pàgina de pagaments en línia de Stripe per als pagaments amb targetes de crèdit/dèbit mitjançant <a href="http://www.stripe.com" target="_blank">Stripe</a>. Es pot utilitzar per a permetre als clients fer pagaments ad-hoc o per a pagaments relacionats amb un objecte Dolibarr concret (factura, comanda, ...) StripeOrCBDoPayment=Pagar amb targeta de crèdit o Stripe FollowingUrlAreAvailableToMakePayments=Les següents URL estan disponibles per a permetre a un client fer un cobrament en objectes de Dolibarr PaymentForm=Formulari de pagament @@ -22,24 +22,24 @@ ToOfferALinkForOnlinePaymentOnContractLine=URL per oferir una pàgina de pagamen ToOfferALinkForOnlinePaymentOnFreeAmount=URL per oferir una pàgina de pagament en línia %s de qualsevol quantitat sense cap objecte associat ToOfferALinkForOnlinePaymentOnMemberSubscription=URL per oferir una pàgina de pagament en línia %s per a una subscripció per membres ToOfferALinkForOnlinePaymentOnDonation=URL per oferir una pàgina de pagament en línia %s per al pagament d’una donació -YouCanAddTagOnUrl=També podeu afegir el paràmetre URL <b>&tag= <i>valor</i> </b> a qualsevol d'aquestes URLs (obligatori només per al pagament no vinculat a cap objecte) per afegir la vostra pròpia etiqueta de comentari de pagament. <br> Per a la URL de pagaments no vinculta a cap objecte existent, també podeu afegir el paràmetre <strong>&noidempotency=1</strong> de manera que el mateix enllaç amb una mateixa etiqueta es pot utilitzar diverses vegades (alguns modes de pagament poden limitar els intents de pagament a 1 per a cada enllaç si no s'utilitza aquest paràmetre) +YouCanAddTagOnUrl=També podeu afegir el paràmetre URL <b> &tag=<i>valor</i></b> a qualsevol d’aquests URL (obligatori només per al pagament que no estigui vinculat a un objecte) per a afegir la vostra pròpia etiqueta de comentari de pagament. <br>Per a l'URL de pagaments sense objecte existent, també podeu afegir el paràmetre <strong> &noidempotency=1 </strong>, de manera que es pot utilitzar el mateix enllaç amb la mateixa etiqueta diverses vegades (alguns modes de pagament poden limitar el pagament a 1 per a cada enllaç diferent sense aquest paràmetre) SetupStripeToHavePaymentCreatedAutomatically=Configureu el vostre Stripe amb l'URL <b>%s</b> per fer que el pagament es creï automàticament quan es valide mitjançant Stripe. AccountParameter=Paràmetres del compte UsageParameter=Paràmetres d'ús -InformationToFindParameters=Informació per trobar la seva configuració de compte %s +InformationToFindParameters=Ajuda per a trobar la vostra informació del compte %s STRIPE_CGI_URL_V2=URL CGI del mòdul Stripe per al pagament CSSUrlForPaymentForm=Url del full d'estil CSS per al formulari de pagament -NewStripePaymentReceived=S'ha rebut un nou pagament de Stripe -NewStripePaymentFailed=S'ha intentat el pagament de Stripe però, ha fallat +NewStripePaymentReceived=S'ha rebut un pagament nou de Stripe +NewStripePaymentFailed=S'ha intentat el pagament nou de Stripe, però ha fallat FailedToChargeCard=No s'ha pogut fer el càrrec a la targeta STRIPE_TEST_SECRET_KEY=Clau secreta de test STRIPE_TEST_PUBLISHABLE_KEY=Clau de test publicable STRIPE_TEST_WEBHOOK_KEY=Clau de prova de Webhook STRIPE_LIVE_SECRET_KEY=Clau secreta -STRIPE_LIVE_PUBLISHABLE_KEY=Clau pubicable +STRIPE_LIVE_PUBLISHABLE_KEY=Clau publicable STRIPE_LIVE_WEBHOOK_KEY=Webhook clau en directe -ONLINE_PAYMENT_WAREHOUSE=Les existències per utilitzar per disminuir les existències quan es fa el pagament en línia <br> (Pendent de fer Quan es fa una opció per reduir l'estoc en una acció a la factura i es genera la factura el pagament en línia?) -StripeLiveEnabled=Stripe live activat (del contrari en mode test/sandbox) +ONLINE_PAYMENT_WAREHOUSE=Estoc a utilitzar per a disminuir l'estoc quan es fa el pagament en línia <br>(Pendent de fer quan l'opció per a reduir l'estoc es fa en una acció a la factura i el pagament en línia es genera la seva factura?) +StripeLiveEnabled=Stripe live activat (en cas contrari, mode de prova/sandbox) StripeImportPayment=Importar pagaments per Stripe ExampleOfTestCreditCard=Exemple de targeta de crèdit per a la prova: %s => vàlid, %s => error CVC, %s => caducat, %s => falla la càrrega StripeGateways=Passarel·les Stripe @@ -62,7 +62,7 @@ ConfirmDeleteCard=Estàs segur que vols eliminar aquesta targeta de crèdit o de CreateCustomerOnStripe=Crea un client a Stripe CreateCardOnStripe=Crea una targeta a Stripe ShowInStripe=Mostra a Stripe -StripeUserAccountForActions=Compte d'usuari per utilitzar en alguns e-mails de notificació d'esdeveniments Stripe (pagaments Stripe) +StripeUserAccountForActions=Compte d'usuari que s'utilitzarà per a la notificació per correu electrònic d'alguns esdeveniments de Stripe (pagaments de Stripe) StripePayoutList=Llista de pagaments de Stripe ToOfferALinkForTestWebhook=Enllaç a la configuració de Stripe WebHook per trucar a l’IPN (mode de prova) ToOfferALinkForLiveWebhook=Enllaç a la configuració de Stripe WebHook per trucar a l’IPN (mode en directe) diff --git a/htdocs/langs/ca_ES/supplier_proposal.lang b/htdocs/langs/ca_ES/supplier_proposal.lang index b7f9c5a4ba4..5a6546a4e81 100644 --- a/htdocs/langs/ca_ES/supplier_proposal.lang +++ b/htdocs/langs/ca_ES/supplier_proposal.lang @@ -1,7 +1,7 @@ # Dolibarr language file - Source file is en_US - supplier_proposal SupplierProposal=Pressupostos de proveïdor supplier_proposalDESC=Gestiona les peticions de preu de proveïdors -SupplierProposalNew=Nova petició de preu +SupplierProposalNew=Sol·licitud de preu nova CommRequest=Petició de preu CommRequests=Peticions de preu SearchRequest=Busca una petició @@ -13,12 +13,13 @@ SupplierProposalArea=Àrea de pressupostos de proveïdor SupplierProposalShort=Pressupost de proveïdor SupplierProposals=Pressupostos de proveïdor SupplierProposalsShort=Pressupostos de proveïdor -NewAskPrice=Nova petició de preu +AskPrice=Petició de preu +NewAskPrice=Sol·licitud de preu nova ShowSupplierProposal=Mostra una petició de preu AddSupplierProposal=Crea una petició de preu SupplierProposalRefFourn=Ref. proveïdor SupplierProposalDate=Data de lliurament -SupplierProposalRefFournNotice=Abans de tancar-ho com a "Acceptat", pensa en captar les referències del proveïdor. +SupplierProposalRefFournNotice=Abans de tancar-ho com a "Acceptat", penseu a captar les referències dels proveïdors. ConfirmValidateAsk=Estàs segur que vols validar aquest preu de sol·licitud sota el nom <b>%s</b>? DeleteAsk=Elimina la petició ValidateAsk=Validar petició @@ -48,7 +49,7 @@ DefaultModelSupplierProposalToBill=Model per defecte en tancar una petició de p DefaultModelSupplierProposalClosed=Model per defecte en tancar una petició de preu (rebutjada) ListOfSupplierProposals=Llista de sol·licituds de pressupostos a proveïdor ListSupplierProposalsAssociatedProject=Llista de pressupostos de proveïdor associats al projecte -SupplierProposalsToClose=Pressupostos de proveïdor per tancar +SupplierProposalsToClose=Pressupostos de proveïdor per a tancar SupplierProposalsToProcess=Pressupostos de proveïdor a processar LastSupplierProposals=Últims %s preus de sol·licitud AllPriceRequests=Totes les peticions diff --git a/htdocs/langs/ca_ES/ticket.lang b/htdocs/langs/ca_ES/ticket.lang index ee5f34745e3..8e111a62ae9 100644 --- a/htdocs/langs/ca_ES/ticket.lang +++ b/htdocs/langs/ca_ES/ticket.lang @@ -58,7 +58,6 @@ OriginEmail=Origen de correu electrònic Notify_TICKET_SENTBYMAIL=Envia el missatge del tiquet per correu electrònic # Status -NotRead=No llegit Read=Llegit Assigned=Assignat InProgress=En progrés @@ -105,9 +104,9 @@ TicketPublicInterfaceTopicHelp=Aquest text apareixerà com el títol de la inter TicketPublicInterfaceTextHelpMessageLabelAdmin=Text d'ajuda a l'entrada del missatge TicketPublicInterfaceTextHelpMessageHelpAdmin=Aquest text apareixerà a sobre de l'àrea d'entrada de missatges per a l'usuari. ExtraFieldsTicket=Extra atributs -TicketCkEditorEmailNotActivated=L'editor HTML no està activat. Poseu FCKEDITOR_ENABLE_MAIL contingut a 1 per obtenir-lo. +TicketCkEditorEmailNotActivated=L'editor HTML no està activat. Poseu el contingut de FCKEDITOR_ENABLE_MAIL a 1 per a obtenir-lo. TicketsDisableEmail=No enviïs missatges de correu electrònic per a la creació de bitllets o la gravació de missatges -TicketsDisableEmailHelp=De manera predeterminada, s'envien correus electrònics quan es creen nous tiquets o missatges. Activeu aquesta opció per desactivar totes les *all* notificacions per correu electrònic +TicketsDisableEmailHelp=De manera predeterminada, s'envien correus electrònics quan es creen nous tiquets o missatges. Activeu aquesta opció per a desactivar *totes* les notificacions per correu electrònic TicketsLogEnableEmail=Activa el 'log' (registre d'activitat) per correu electrònic TicketsLogEnableEmailHelp=En cada canvi, s'enviarà un correu ** a cada contacte ** associat al tiquet. TicketParams=Paràmetres @@ -124,12 +123,13 @@ TicketsActivatePublicInterfaceHelp=La interfície pública permet qualsevol visi TicketsAutoAssignTicket=Assigna automàticament l'usuari que va crear el tiquet TicketsAutoAssignTicketHelp=Quan es crea un tiquet, l'usuari pot assignar-se automàticament al tiquet. TicketNumberingModules=Mòdul de numeració de tiquets +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=Enviar correu(s) electonic(s) quan s'afegeix un nou missatge -TicketsPublicNotificationNewMessageHelp=Enviar correu(s) electrònic(s) quan un nou missatge s'afegeix des d'una interfície pública (cap a l'usuari assignat o la notificació del correu electrònic cap a (actualitzar) i/o les notificacions del correu electrònic cap a) +TicketsPublicNotificationNewMessage=Envia correus electrònics quan s'afegeixi un missatge nou +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=Enviar un correu nou missatge de notificació cap a aquesta adreça si el tiquet no te usuari assignat o l'usuari no te correu electrònic. +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. # # Index & list page # @@ -155,7 +155,7 @@ CreateTicket=Crea un tiquet EditTicket=Editar el tiquet TicketsManagement=Gestió de tiquets CreatedBy=Creat per -NewTicket=Nou tiquet +NewTicket=Tiquet nou SubjectAnswerToTicket=Resposta de tiquet TicketTypeRequest=Tipus de sol·licitud TicketCategory=Grup @@ -192,7 +192,7 @@ TicketDurationAuto=Durada calculada TicketDurationAutoInfos=Durada calculada automàticament a partir de la intervenció relacionada TicketUpdated=Tiquet actualitzat SendMessageByEmail=Envia un missatge per correu electrònic -TicketNewMessage=Mou missatge +TicketNewMessage=Missatge nou ErrorMailRecipientIsEmptyForSendTicketMessage=El destinatari està buit. Email no enviat TicketGoIntoContactTab=Aneu a la pestanya "Contactes" per seleccionar-los TicketMessageMailIntro=Introducció @@ -225,13 +225,12 @@ UnableToCreateInterIfNoSocid=No es pot crear una intervenció quan no s'hagi def TicketMailExchanges=Intercanvis de correus TicketInitialMessageModified=Missatge inicial modificat TicketMessageSuccesfullyUpdated=Missatge actualitzat amb èxit -TicketChangeStatus=Canvi de estatus -TicketConfirmChangeStatus=Confirmar el canvi d'estatus : %s ? -TicketLogStatusChanged=Estatus canviat : %s a %s +TicketChangeStatus=Canvia l'estat +TicketConfirmChangeStatus=Confirmeu el canvi d'estat: %s? +TicketLogStatusChanged=Estat canviat: %s a %s TicketNotNotifyTiersAtCreate=No es notifica a l'empresa a crear Unread=No llegit TicketNotCreatedFromPublicInterface=No disponible El tiquet no s'ha creat des de la interfície pública. -PublicInterfaceNotEnabled=La interfície pública no s'ha activat ErrorTicketRefRequired=El nom de referència del tiquet és obligatori # @@ -242,7 +241,7 @@ NoLogForThisTicket=Encara no hi ha 'log' per aquest tiquet TicketLogAssignedTo=Tiquet %s assignat a %s TicketLogPropertyChanged=Tiquet %s modificat: classificació de %s a %s TicketLogClosedBy=Tiquet %s tancat per %s -TicketLogReopen=El tiquet %s s'ha re-obert +TicketLogReopen=El tiquet %s s'ha reobert # # Public pages @@ -252,14 +251,14 @@ ShowListTicketWithTrackId=Mostra la llista d'entrades a partir de l'identificado ShowTicketWithTrackId=Mostra tiquets de l'identificador de traça TicketPublicDesc=Podeu crear un tiquet d'assistència o consultar des d'una identificació (ID) existent. YourTicketSuccessfullySaved=S'ha desat el tiquet amb èxit! -MesgInfosPublicTicketCreatedWithTrackId=S'ha creat un nou tiquet amb l'ID %s i la ref. %s. +MesgInfosPublicTicketCreatedWithTrackId=S'ha creat un tiquet nou amb l'ID %s i la ref. %s. PleaseRememberThisId=Guardeu el número de traça que us podríem demanar més tard. TicketNewEmailSubject=Confirmació de la creació de tiquet - Ref %s (ID de l’entrada pública %s) -TicketNewEmailSubjectCustomer=Nou tiquet de suport +TicketNewEmailSubjectCustomer=Tiquet de suport nou TicketNewEmailBody=Aquest és un correu electrònic automàtic per confirmar que heu registrat un nou tiquet. TicketNewEmailBodyCustomer=Aquest és un correu electrònic automàtic per confirmar que un nou tiquet acaba de ser creat al vostre compte. TicketNewEmailBodyInfosTicket=Informació per al seguiment del tiquet -TicketNewEmailBodyInfosTrackId=Traça de tiquet numero: %s +TicketNewEmailBodyInfosTrackId=Número de seguiment de tiquet: %s TicketNewEmailBodyInfosTrackUrl=Podeu veure el progrés del tiquet fent clic a l'enllaç de dalt. 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. @@ -273,13 +272,13 @@ Subject=Assumpte ViewTicket=Vista del tiquet ViewMyTicketList=Veure la meva llista de tiquets ErrorEmailMustExistToCreateTicket=Error: adreça de correu electrònic no trobada a la nostra base de dades -TicketNewEmailSubjectAdmin=S'ha creat un nou tiquet: Ref %s (ID d'entrada pública %s) +TicketNewEmailSubjectAdmin=S'ha creat un tiquet nou - Ref %s (ID de tiquet públic %s) TicketNewEmailBodyAdmin=<p>S'ha creat una entrada amb ID #%s, veure informació :</p> SeeThisTicketIntomanagementInterface=Consulteu el tiquet a la interfície de gestió TicketPublicInterfaceForbidden=La interfície pública de les entrades no estava habilitada ErrorEmailOrTrackingInvalid=Valor incorrecte per a identificació de seguiment o correu electrònic OldUser=Usuari antic -NewUser=Nou usuari +NewUser=Usuari nou NumberOfTicketsByMonth=Nombre d’entrades mensuals NbOfTickets=Nombre d’entrades # notifications diff --git a/htdocs/langs/ca_ES/trips.lang b/htdocs/langs/ca_ES/trips.lang index 04c987be86f..f8a508426a3 100644 --- a/htdocs/langs/ca_ES/trips.lang +++ b/htdocs/langs/ca_ES/trips.lang @@ -6,20 +6,20 @@ TripsAndExpensesStatistics=Estadístiques de l'informe de despeses TripCard=Informe de despesa de targeta AddTrip=Crear informe de despeses ListOfTrips=Llistat de informes de despeses -ListOfFees=Llistat notes de honoraris +ListOfFees=Llista de taxes TypeFees=Tipus de despeses ShowTrip=Mostra l'informe de despeses -NewTrip=Nou informe de despeses +NewTrip=Informe de despeses nou LastExpenseReports=Últims %s informes de despeses AllExpenseReports=Tots els informes de despeses CompanyVisited=Empresa/organització visitada FeesKilometersOrAmout=Import o quilòmetres -DeleteTrip=Eliminar informe de despeses +DeleteTrip=Suprimeix l'informe de despeses ConfirmDeleteTrip=Estàs segur que vols eliminar aquest informe de despeses? ListTripsAndExpenses=Llistat d'informes de despeses ListToApprove=Pendent d'aprovació ExpensesArea=Àrea d'informes de despeses -ClassifyRefunded=Classificar 'Retornat' +ClassifyRefunded=Classifica "Retornat" ExpenseReportWaitingForApproval=S'ha generat un nou informe de vendes per aprovació ExpenseReportWaitingForApprovalMessage=S'ha enviat un nou informe de despeses i està pendent d'aprovació. <br> - Usuari: %s <br> - Període: %s <br> Cliqueu aquí per validar: %s ExpenseReportWaitingForReApproval=S'ha generat un informe de despeses per a re-aprovació @@ -27,16 +27,16 @@ ExpenseReportWaitingForReApprovalMessage=S'ha enviat un informe de despeses i es ExpenseReportApproved=S'ha aprovat un informe de despeses ExpenseReportApprovedMessage=S'ha aprovat l'informe de despeses %s. <br> - Usuari: %s <br> - Aprovat per: %s <br> Feu clic aquí per veure l'informe de despeses: %s ExpenseReportRefused=S'ha rebutjat un informe de despeses -ExpenseReportRefusedMessage=El informe de despeses %s s'ha denegat. <br> - Usuari: %s <br> - Rebutjada per: %s <br> - Motiu de denegació: %s <br> Cliqueu aquí per veure l'informe de despeses: %s +ExpenseReportRefusedMessage=L'informe de despeses %s s'ha denegat. <br> - Usuari: %s <br> - Rebutjat per: %s <br> - Motiu de denegació: %s <br> Cliqueu aquí per a veure l'informe de despeses: %s ExpenseReportCanceled=S'ha cancel·lat un informe de despeses ExpenseReportCanceledMessage=L'informe de despeses %s s'ha cancel·lat. <br> - Usuari: %s <br> - Cancel·lat per: %s <br> - Motiu de cancel·lació: %s <br> Cliqueu aquí per veure l'informe de despeses: %s ExpenseReportPaid=S'ha pagat un informe de despeses -ExpenseReportPaidMessage=El informe de despeses %s s'ha pagat. <br> - Usuari: %s <br> - Pagat per: %s <br> Feu clic aquí per veure l'informe de despeses: %s +ExpenseReportPaidMessage=L'informe de despeses %s s'ha pagat. <br> - Usuari: %s <br> - Pagat per: %s <br> Feu clic aquí per a veure l'informe de despeses: %s TripId=Id d'informe de despeses AnyOtherInThisListCanValidate=Persona a informar per a validar TripSociete=Informació de l'empresa TripNDF=Informacions de l'informe de despeses -PDFStandardExpenseReports=Plantilla estàndard per generar un document PDF per l'informe de despeses +PDFStandardExpenseReports=Plantilla estàndard per a generar un document PDF per a l'informe de despeses ExpenseReportLine=Línia de l'informe de despeses TF_OTHER=Altres TF_TRIP=Transport @@ -73,7 +73,7 @@ EX_PAR_VP=PV d'aparcament EX_CAM_VP=PV de manteniment i reparació DefaultCategoryCar=Mode de transport per defecte DefaultRangeNumber=Número de rang per defecte -UploadANewFileNow=Carrega ara un nou document +UploadANewFileNow=Carrega ara un document nou Error_EXPENSEREPORT_ADDON_NotDefined=Error, la regla per a la numeració d'informes de despeses no es va definir a la configuració del mòdul "Informe de despeses" ErrorDoubleDeclaration=Has declarat un altre informe de despeses en un altre rang de dates semblant AucuneLigne=Encara no hi ha informe de despeses declarat @@ -88,32 +88,32 @@ MOTIF_REFUS=Raó MOTIF_CANCEL=Raó DATE_REFUS=Data de denegació DATE_SAVE=Data de validació -DATE_CANCEL=Data de cancelació +DATE_CANCEL=Data de cancel·lació DATE_PAIEMENT=Data de pagament BROUILLONNER=Reobrir ExpenseReportRef=Ref. de l'informe de despeses ValidateAndSubmit=Validar i sotmetre a aprovació ValidatedWaitingApproval=Validat (pendent d'aprovació) -NOT_AUTHOR=No ets l'autor d'aquest informe de despeses. L'operació s'ha cancelat. +NOT_AUTHOR=No sou l’autor d’aquest informe de despeses. Operació cancel·lada. ConfirmRefuseTrip=Estàs segur que vols denegar aquest informe de despeses? ValideTrip=Aprova l'informe de despeses ConfirmValideTrip=Estàs segur que vols aprovar aquest informe de despeses? PaidTrip=Pagar un informe de despeses -ConfirmPaidTrip=Estàs segur que vols canviar l'estatus d'aquest informe de despeses a "Pagat"? +ConfirmPaidTrip=Esteu segur que voleu canviar l'estat d'aquest informe de despeses a "Pagat"? ConfirmCancelTrip=Estàs segur que vols cancel·lar aquest informe de despeses? BrouillonnerTrip=Tornar l'informe de despeses a l'estat "Esborrany" -ConfirmBrouillonnerTrip=Estàs segur que vols moure aquest informe de despeses al estatus de "Esborrany"? +ConfirmBrouillonnerTrip=Esteu segur que voleu traslladar aquest informe de despeses a l'estat "Esborrany"? SaveTrip=Valida l'informe de despeses ConfirmSaveTrip=Estàs segur que vols validar aquest informe de despeses? -NoTripsToExportCSV=No hi ha informe de despeses per exportar en aquest període +NoTripsToExportCSV=No hi ha cap informe de despeses per a exportar en aquest període. ExpenseReportPayment=Informe de despeses pagades -ExpenseReportsToApprove=Informes de despeses per aprovar +ExpenseReportsToApprove=Informes de despeses per a aprovar ExpenseReportsToPay=Informes de despeses a pagar ConfirmCloneExpenseReport=Estàs segur de voler clonar aquest informe de despeses ? ExpenseReportsIk=Configuració de les despeses de quilometratge ExpenseReportsRules=Normes d'informe de despeses ExpenseReportIkDesc=Podeu modificar el càlcul de les despeses de quilometratge per categoria i abast, els quals s'han definit anteriorment. <b>d</b> és la distància en quilòmetres -ExpenseReportRulesDesc=Podeu crear o actualitzar les regles del càlcul. Aquesta part s'utilitzarà quan l'usuari crei un nou informe de despeses +ExpenseReportRulesDesc=Podeu crear o actualitzar qualsevol regla de càlcul. Aquesta part s'utilitzarà quan l'usuari crei un informe de despeses nou expenseReportOffset=Decàleg expenseReportCoef=Coeficient expenseReportTotalForFive=Exemple amb <u>d</u> = 5 @@ -124,13 +124,13 @@ expenseReportCatDisabled=Categoria deshabilitada: consulteu el diccionari c_exp_ expenseReportRangeDisabled=S'ha desactivat el rang: consulteu el diccionari c_exp_tax_range expenseReportPrintExample=offset + (d x coef) = %s ExpenseReportApplyTo=Aplicar a -ExpenseReportDomain=Domini al que aplicar +ExpenseReportDomain=Domini a aplicar ExpenseReportLimitOn=Limitar a ExpenseReportDateStart=Data inici ExpenseReportDateEnd=Data fi ExpenseReportLimitAmount=Import límit ExpenseReportRestrictive=Restrictiu -AllExpenseReport=Tot tipus d'informe de despeses +AllExpenseReport=Tots els tipus d’informe de despeses OnExpense=Línia de despesa ExpenseReportRuleSave=S'ha desat la regla de l'informe de despeses ExpenseReportRuleErrorOnSave=Error: %s diff --git a/htdocs/langs/ca_ES/users.lang b/htdocs/langs/ca_ES/users.lang index 8ec96cdf243..0d7ea59bf46 100644 --- a/htdocs/langs/ca_ES/users.lang +++ b/htdocs/langs/ca_ES/users.lang @@ -6,7 +6,7 @@ Permission=Permís Permissions=Permisos EditPassword=Canviar contrasenya SendNewPassword=Enviar una contrasenya nova -SendNewPasswordLink=Envia enllaç per reiniciar la contrasenya +SendNewPasswordLink=Envia restabliment de contrasenya ReinitPassword=Generar una contrasenya nova PasswordChangedTo=Contrasenya modificada en: %s SubjectNewPassword=La teva nova paraula de pas per a %s @@ -26,7 +26,7 @@ ConfirmDeleteGroup=Vols eliminar el grup <b>%s</b>? ConfirmEnableUser=Vols habilitar l'usuari <b>%s</b>? ConfirmReinitPassword=Vols generar una nova contrasenya per a l'usuari <b>%s</b>? ConfirmSendNewPassword=Vols generar i enviar una nova contrasenya per a l'usuari <b>%s</b>? -NewUser=Nou usuari +NewUser=Usuari nou CreateUser=Crear usuari LoginNotDefined=L'usuari no està definit NameNotDefined=El nom no està definit @@ -40,14 +40,14 @@ DolibarrUsers=Usuaris Dolibarr LastName=Cognoms FirstName=Nom ListOfGroups=Llistat de grups -NewGroup=Nou grup +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> 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 restablir la contrasenya. -IfEmailExistPasswordRequestSent=Si aquest correu electrònic és un compte vàlid, s'ha enviat un correu electrònic per restablir la contrasenya. +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. ConfirmPasswordReset=Confirma la restauració de la contrasenya MenuUsersAndGroups=Usuaris i grups LastGroupsCreated=Últims %s grups creats @@ -81,7 +81,7 @@ UserWillBeExternalUser=L'usuari creat serà un usuari extern (ja que està lliga IdPhoneCaller=ID trucant (telèfon) NewUserCreated=usuari %s creat NewUserPassword=Contrasenya canviada per a %s -NewPasswordValidated=La vostra nova contrasenya s’ha validat i s’ha d’utilitzar ara per iniciar la sessió. +NewPasswordValidated=La vostra contrasenya nova s'ha validat i s'ha d'utilitzar ara per a iniciar la sessió. EventUserModified=Usuari %s modificat UserDisabled=Usuari %s deshabilitat UserEnabled=Usuari %s activat @@ -92,12 +92,12 @@ GroupDeleted=Grup %s eliminat ConfirmCreateContact=Vols crear un compte de Dolibarr per a aquest contacte? ConfirmCreateLogin=Vols crear un compte de Dolibarr per a aquest soci? ConfirmCreateThirdParty=Vols crear un tercer per a aquest soci? -LoginToCreate=Login a crear +LoginToCreate=Nom d'usuari a crear NameToCreate=Nom del tercer a crear YourRole=Els seus rols YourQuotaOfUsersIsReached=Ha arribat a la seva quota d'usuaris actius! -NbOfUsers=Nº d'usuaris -NbOfPermissions=Nº de permisos +NbOfUsers=Nombre d'usuaris +NbOfPermissions=Nombre de permisos DontDowngradeSuperAdmin=Només un superadmin pot degradar un superadmin HierarchicalResponsible=Supervisor HierarchicView=Vista jeràrquica diff --git a/htdocs/langs/ca_ES/website.lang b/htdocs/langs/ca_ES/website.lang index 7adb65909be..2e035ce7bf6 100644 --- a/htdocs/langs/ca_ES/website.lang +++ b/htdocs/langs/ca_ES/website.lang @@ -4,7 +4,7 @@ WebsiteSetupDesc=Creeu aquí els llocs web que voleu utilitzar. A continuació, 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. WEBSITE_TYPE_CONTAINER=Tipus de pàgina/contenidor -WEBSITE_PAGE_EXAMPLE=Pàgina web per utilitzar com a exemple +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, ... @@ -30,7 +30,6 @@ EditInLine=Editar en línia AddWebsite=Afegir lloc web Webpage=Pàgina/contenidor web AddPage=Afegeix pàgina/contenidor -HomePage=Pàgina d'inici PageContainer=Pàgina PreviewOfSiteNotYetAvailable=Vista prèvia del seu lloc web <strong>%s</strong> encara no està disponible. Primer ha de '<strong>Importar plantilla web</strong>' o sols '<strong>Afegir pàgina/contenidor</strong>'. RequestedPageHasNoContentYet=La pàgina sol·licitada amb l'identificador %s encara no té contingut, o el fitxer de memòria cau .tpl.php s'ha eliminat. Edita el contingut de la pàgina per solucionar-ho. @@ -52,7 +51,7 @@ 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. </li> <br> <br> El servidor %s serà servit pel servidor Dolibarr d'aquesta manera no es necessita instal·la cap servidor web addicional (com ara Apache, Nginx, IIS).<br>L'inconvenient és que l'URL de les pàgines no son amigables i començen per la ruta del vostre Dolibarr. <br>URL servit per Dolibarr:<br><strong> %s </strong> <br> <br> Per utilitzar el vostre propi servidor web extern per a servir a aquest lloc web, creeu un amfitrió ('host') 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 (botó de 'preview'). +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 NoPageYet=Encara sense pàgines YouCanCreatePageOrImportTemplate=Podeu crear una pàgina nova o importar una plantilla completa del lloc web @@ -87,7 +86,7 @@ MyContainerTitle=Títol del meu lloc web AnotherContainer=Així s’inclou contingut d’una altra pàgina / contenidor (pot ser que tingueu un error aquí si activeu el codi dinàmic perquè pot no existir el subconjunt incrustat) SorryWebsiteIsCurrentlyOffLine=Ho sentim, actualment aquest lloc web està fora de línia. Per favor com a més endavant ... WEBSITE_USE_WEBSITE_ACCOUNTS=Activa la taula del compte del lloc web -WEBSITE_USE_WEBSITE_ACCOUNTSTooltip=Activeu la taula per emmagatzemar comptes del lloc web (login/contrasenya) per a cada lloc web de tercers +WEBSITE_USE_WEBSITE_ACCOUNTSTooltip=Activeu la taula per a emmagatzemar comptes de lloc web (nom d'usuari / contrasenya) per a cada lloc web / tercer YouMustDefineTheHomePage=Primer heu de definir la pàgina d'inici predeterminada OnlyEditionOfSourceForGrabbedContentFuture=Avís: la creació d'una pàgina web mitjançant la importació d'una pàgina web externa es reserva per a usuaris experimentats. Segons la complexitat de la pàgina d'origen, el resultat de la importació pot diferir de l'original. També si la pàgina font utilitza estils CSS comuns o Javascript en conflicte, pot trencar l'aspecte o les funcions de l'editor del lloc web quan es treballi en aquesta pàgina. Aquest mètode és una manera més ràpida de crear una pàgina, però es recomana crear la vostra pàgina nova des de zero o des d’una plantilla de pàgina suggerida. <br> Tingueu en compte també que l'editor en línia pot no funcionar correctament quan s'utilitza en una pàgina creada a partir d'importar una externa. OnlyEditionOfSourceForGrabbedContent=Només l'edició de codi HTML és possible quan el contingut s'ha capturat d'un lloc extern @@ -101,7 +100,7 @@ EmptyPage=Pàgina buida ExternalURLMustStartWithHttp=L'URL externa ha de començar amb http:// o https:// ZipOfWebsitePackageToImport=Carregueu el fitxer Zip del paquet de plantilles del lloc web ZipOfWebsitePackageToLoad=o trieu un paquet de plantilles de lloc web incrustat disponible -ShowSubcontainers=Inclou contingut dinàmic +ShowSubcontainers=Mostra contingut dinàmic InternalURLOfPage=URL interna de la pàgina ThisPageIsTranslationOf=Aquesta pàgina/contenidor és una traducció de ThisPageHasTranslationPages=Aquesta pàgina/contenidor té traducció @@ -115,7 +114,7 @@ DeleteAlsoMedias=Voleu suprimir també tots els fitxers de mitjans específics d MyWebsitePages=Les meves pàgines web SearchReplaceInto=Cercar | Substituïu-lo a ReplaceString=Cadena nova -CSSContentTooltipHelp=Introduïu aquí contingut CSS. Per evitar qualsevol conflicte amb el CSS de l’aplicació, assegureu-vos que preposeu tota declaració amb la classe .bodywebsite. Per exemple: <br><br> #mycssselector, input.myclass: hover {...} <br> ha de ser <br> .bodywebsite #mycssselector, .bodywebsite input.myclass: hover {...} <br><br> Nota: Si teniu un fitxer gran sense aquest prefix, podeu fer servir 'lessc' per convertir-lo per afegir el prefix .bodywebs site arreu. +CSSContentTooltipHelp=Introduïu aquí contingut CSS. Per a evitar qualsevol conflicte amb el CSS de l’aplicació, assegureu-vos que preposeu tota declaració amb la classe .bodywebsite. Per exemple: <br><br> #mycssselector, input.myclass: hover {...} <br> ha de ser <br> .bodywebsite #mycssselector, .bodywebsite input.myclass: hover {...} <br><br> Nota: Si teniu un fitxer gran sense aquest prefix, podeu fer servir 'lessc' per a convertir-lo per a afegir el prefix .bodywebsite arreu. LinkAndScriptsHereAreNotLoadedInEditor=Avís: aquest contingut només es produeix quan s'accedeix al lloc des d'un servidor. No s'utilitza en mode Edit, de manera que si necessiteu carregar fitxers Javascript també en mode d'edició, només heu d'afegir la vostra etiqueta 'script src = ...' a la pàgina. Dynamiccontent=Exemple d’una pàgina amb contingut dinàmic ImportSite=Importa la plantilla del lloc web @@ -137,3 +136,4 @@ RSSFeedDesc=Podeu obtenir un feed RSS dels darrers articles amb el tipus "blogpo 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. diff --git a/htdocs/langs/ca_ES/withdrawals.lang b/htdocs/langs/ca_ES/withdrawals.lang index 6d70774d3ac..d41189fe88b 100644 --- a/htdocs/langs/ca_ES/withdrawals.lang +++ b/htdocs/langs/ca_ES/withdrawals.lang @@ -3,8 +3,8 @@ CustomersStandingOrdersArea=Cobraments per ordres de domiciliació bancària SuppliersStandingOrdersArea=Pagaments per transferència bancària StandingOrdersPayment=Ordres de cobrament per domiciliació StandingOrderPayment=Ordre de cobrament per domiciliació -NewStandingOrder=Nova ordre de domiciliació bancària -NewPaymentByBankTransfer=Nou pagament mitjançant transferència bancària +NewStandingOrder=Domiciliació nova +NewPaymentByBankTransfer=Pagament nou per transferència bancària StandingOrderToProcess=A processar PaymentByBankTransferReceipts=Ordres de transferència bancària PaymentByBankTransferLines=Línies d'ordres de transferència bancària @@ -23,9 +23,9 @@ RequestStandingOrderTreated=Peticions processades d'ordres de cobrament per domi RequestPaymentsByBankTransferToTreat=Peticions de transferència bancària a processar RequestPaymentsByBankTransferTreated=Peticions de transferència bancària processades NotPossibleForThisStatusOfWithdrawReceiptORLine=Encara no és possible. L'estat de la domiciliació ter que ser 'abonada' abans de poder realitzar devolucions a les seves línies -NbOfInvoiceToWithdraw=Nº de factures de client qualificades que esperen una ordre de domiciliació +NbOfInvoiceToWithdraw=Nombre de factures de client qualificades que esperen una ordre de domiciliació NbOfInvoiceToWithdrawWithInfo=Número de factures a client en espera de domiciliació per a clients que tenen el número de compte definida -NbOfInvoiceToPayByBankTransfer=Nº de factures de proveïdors qualificats que esperen un pagament per transferència bancària +NbOfInvoiceToPayByBankTransfer=Nombre de factures de proveïdors qualificades que esperen un pagament per transferència SupplierInvoiceWaitingWithdraw=Factura de venedor en espera de pagament mitjançant transferència bancària InvoiceWaitingWithdraw=Factura esperant per domiciliació bancària InvoiceWaitingPaymentByBankTransfer=Factura en espera de transferència bancària @@ -39,12 +39,13 @@ WithdrawStatistics=Estadístiques del pagament mitjançant domiciliació bancàr CreditTransferStatistics=Estadístiques de transferència bancària Rejects=Devolucions LastWithdrawalReceipt=Últims %s rebuts domiciliats -MakeWithdrawRequest=Fer una petició de pagament per domiciliació bancària -MakeBankTransferOrder=Fes una petició de transferència bancària +MakeWithdrawRequest=Fes una sol·licitud de domiciliació +MakeBankTransferOrder=Fes una sol·licitud de transferència WithdrawRequestsDone=%s domiciliacions registrades +BankTransferRequestsDone=S'han registrat %s sol·licituds de transferència ThirdPartyBankCode=Codi bancari de tercers NoInvoiceCouldBeWithdrawed=Cap factura s'ha carregat amb èxit. Comproveu que els tercers de les factures tenen un IBAN vàlid i que IBAN té un RUM (Referència de mandat exclusiva) amb mode <strong>%s</strong>. -ClassCredited=Classificar com "Abonada" +ClassCredited=Classifica com "Abonada" ClassCreditedConfirm=Esteu segur de voler classificar aquesta domiciliació com abonada al seu compte bancari? TransData=Data enviament TransMetod=Mètode enviament @@ -92,21 +93,21 @@ WithBankUsingBANBIC=Per als comptes bancaris que utilitzen el codi BAN/BIC/SWIFT BankToReceiveWithdraw=Recepció del compte bancari BankToPayCreditTransfer=Compte bancari utilitzat com a font de pagaments CreditDate=Abonada el -WithdrawalFileNotCapable=No és possible generar el fitxer bancari de domiciliació pel país %s (El país no esta suportat) +WithdrawalFileNotCapable=No es pot generar el fitxer de rebut de domiciliació del vostre país %s (El vostre país no és compatible) ShowWithdraw=Mostra l'ordre de domiciliació IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Tanmateix, si la factura té com a mínim una ordre de pagament de domiciliació bancària que encara no ha estat processada, no es definirà com a pagament per permetre la gestió prèvia de la retirada. -DoStandingOrdersBeforePayments=Aquesta pestanya et permet sol·licitar una ordre de domiciliació. Un cop fet, ves al menú Banc->Cobrament per domiciliació per generar i gestionar l’ordre de domiciliació. Quan es tanqui l’ordre de domiciliació, es registrarà automàticament el cobrament de les factures i es tancaran les factures si no queda cobrament pendent. -DoCreditTransferBeforePayments=Aquesta pestanya et permet sol·licitar una ordre de transferència bancària. Un cop fet, ves al menú Banc->Pagament per transferència bancària per generar i gestionar l’ordre de transferència bancària. Quan es tanqui l’ordre de transferència bancària, es registrarà automàticament el pagament de les factures i es tancaran les factures si no queda pagament pendent. +DoStandingOrdersBeforePayments=Aquesta pestanya us permet sol·licitar una ordre de pagament per domiciliació bancària. Un cop fet això, aneu al menú Banc-> Pagament mitjançant domiciliació bancària per a generar i gestionar l’ordre de domiciliació bancària. Quan es tanca la comanda de domiciliació bancària, el pagament de les factures es registrarà automàticament i es tancaran les factures si la resta de pagament és nul·la. +DoCreditTransferBeforePayments=Aquesta pestanya et permet sol·licitar una ordre de transferència bancària. Un cop feta, ves al menú Banc->Pagament per transferència bancària per agenerar i gestionar l’ordre de transferència bancària. Quan es tanqui l’ordre de transferència bancària, es registrarà automàticament el pagament de les factures i es tancaran les factures si no queda cap pagament pendent. WithdrawalFile=Fitxer de comanda de dèbit CreditTransferFile=Fitxer de transferència de crèdit -SetToStatusSent=Classificar com "Arxiu enviat" +SetToStatusSent=Estableix l'estat "Fitxer enviat" ThisWillAlsoAddPaymentOnInvoice=També registrarà els pagaments en les factures i els classificarà com a "Pagats" si resten a pagar és nul StatisticsByLineStatus=Estadístiques per estats de línies RUM=UMR DateRUM=Data de signatura del mandat RUMLong=Referència de mandat única (UMR) RUMWillBeGenerated=Si està buit, es generarà una UMR (Referència de mandat únic) una vegada que es guardi la informació del compte bancari. -WithdrawMode=Modo de domiciliació bancària (FRST o RECUR) +WithdrawMode=Mode de domiciliació bancària (FRST o RECUR) WithdrawRequestAmount=Import de la domiciliació BankTransferAmount=Import de la petició de transferència bancària: WithdrawRequestErrorNilAmount=No és possible crear una domiciliació sense import @@ -131,7 +132,8 @@ SEPARCUR=SEPA CUR SEPAFRST=SEPA FRST ExecutionDate=Data d'execució CreateForSepa=Crea un fitxer de domiciliació bancària -ICS=Identificador de creditor CI +ICS=Identificador de creditor CI per domiciliació bancària +ICSTransfer=Identificador de creditor CI per transferència bancària END_TO_END=Etiqueta XML "EndToEndId" de SEPA - Id. Única assignada per transacció USTRD=Etiqueta XML de la SEPA "no estructurada" ADDDAYS=Afegiu dies a la data d'execució @@ -146,3 +148,5 @@ InfoRejectSubject=Rebut de domiciliació bancària rebutjat InfoRejectMessage=Hola,<br><br>el rebut domiciliat de la factura %s relacionada amb la companyia %s, amb un import de %s ha estat rebutjada pel banc.<br><br>--<br>%s ModeWarning=No s'ha establert l'opció de treball en real, ens aturarem després d'aquesta simulació ErrorCompanyHasDuplicateDefaultBAN=L’empresa amb l’identificador %s té més d’un compte bancari per defecte. No hi ha manera de saber quin utilitzar. +ErrorICSmissing=Falta ICS al compte bancari %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/ca_ES/workflow.lang b/htdocs/langs/ca_ES/workflow.lang index 0cbac959060..a673ed97ca0 100644 --- a/htdocs/langs/ca_ES/workflow.lang +++ b/htdocs/langs/ca_ES/workflow.lang @@ -1,9 +1,9 @@ # Dolibarr language file - Source file is en_US - workflow -WorkflowSetup=Configuració del mòdul workflow +WorkflowSetup=Configuració del mòdul de flux de treball WorkflowDesc=Aquest mòdul ofereix algunes accions automàtiques. Per defecte, el flux de treball està obert (podeu fer les coses en l'ordre que vulgueu), però aquí podeu activar algunes accions automàtiques. -ThereIsNoWorkflowToModify=No hi ha modificacions disponibles del fluxe de treball amb els mòduls activats. +ThereIsNoWorkflowToModify=No hi ha disponibles modificacions del flux de treball amb els mòduls activats. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Crea automàticament una comanda de client després de signar un pressupost (la nova comanda tindrà el mateix import que el pressupost) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Crea automàticament una comanda de client després de signar un pressupost (la comanda nova tindrà el mateix import que el pressupost) descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Crea automàticament una factura del client després de signar un pressupost (la nova factura tindrà el mateix import que el pressupost) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Crear automàticament una factura a client després de validar un contracte descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Crea automàticament una factura de client després de tancar una comanda de client (la nova factura tindrà el mateix import que la comanda) @@ -21,3 +21,5 @@ descWORKFLOW_BILL_ON_RECEPTION=Classifica les recepcions com a "facturades" quan descWORKFLOW_TICKET_CLOSE_INTERVENTION=Tanca totes les intervencions vinculades quan es tanca un tiquet AutomaticCreation=Creació automàtica AutomaticClassification=Classificació automàtica +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/cs_CZ/accountancy.lang b/htdocs/langs/cs_CZ/accountancy.lang index cc61eeb86f0..93353881a95 100644 --- a/htdocs/langs/cs_CZ/accountancy.lang +++ b/htdocs/langs/cs_CZ/accountancy.lang @@ -16,6 +16,8 @@ ThisService=Tato služba ThisProduct=Tento výrobek DefaultForService=Výchozí nastavení pro službu DefaultForProduct=Výchozí produkt +ProductForThisThirdparty=Product for this thirdparty +ServiceForThisThirdparty=Service for this thirdparty CantSuggest=Nelze navrhnout AccountancySetupDoneFromAccountancyMenu=Většina nastavení účetnictví se provádí z nabídky %s ConfigAccountingExpert=Configuration of the module accounting (double entry) @@ -48,6 +50,7 @@ CountriesExceptMe=Všechny země kromě %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=Hlavní účetní účetnictví pro zákazníky, které nejsou definovány v nastavení MainAccountForSuppliersNotDefined=Hlavní účty účetnictví pro dodavatele, které nejsou definovány v nastavení @@ -144,7 +147,7 @@ NotVentilatedinAccount=Neprověřeno v účetním účtu XLineSuccessfullyBinded=%s Produkty / služby úspěšně spojené s účtem účetnictví XLineFailedToBeBinded=%s produkty / služby nebyly vázány na žádný účetní účet -ACCOUNTING_LIMIT_LIST_VENTILATION=Počet prvků pro vazbu zobrazených na stránce (maximální doporučeno: 50) +ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Začněte třídění stránky "Vazba na pověření" pomocí nejnovějších prvků ACCOUNTING_LIST_SORT_VENTILATION_DONE=Zahájit třídění na stránce „Prověření hotovo“ od nejnovějších prvků @@ -198,7 +201,8 @@ Docdate=Datum Docref=Reference LabelAccount=Štítek účtu LabelOperation=Operace štítků -Sens=Sens +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=Písmenový kód Lettering=Nápis Codejournal=Deník @@ -206,7 +210,8 @@ JournalLabel=Označení časopisu NumPiece=počet kusů TransactionNumShort=Num. transakce AccountingCategory=Personalizované skupiny -GroupByAccountAccounting=Seskupte účetní účet +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. ByAccounts=Podle účtů ByPredefinedAccountGroups=Podle předdefinovaných skupin @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Platba není spojena s žádným produktem / službou OpeningBalance=Počáteční zůstatek ShowOpeningBalance=Zobrazit počáteční zůstatek HideOpeningBalance=Skrýt počáteční zůstatek -ShowSubtotalByGroup=Zobrazit mezisoučet podle skupiny +ShowSubtotalByGroup=Show subtotal by level Pcgtype=Skupina účtů PcgtypeDesc=Skupina účtů se používá jako předdefinovaná kritéria pro filtrování a seskupování pro některé účetní výkazy. Například „PŘÍJMY“ nebo „VÝDAJE“ se používají jako skupiny pro účetní účty produktů k sestavení výkazu nákladů / výnosů. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Zde si přečtěte seznam výkazů výdajů vázaných ( DescVentilExpenseReportMore=Pokud nastavíte účetní účet na řádcích výkazu druhů výdajů, aplikace bude schopna provést veškerou vazbu mezi řádky výkazu výdajů a účetním účtem vašeho účtovacího schématu, a to jedním kliknutím tlačítkem <strong> "%s" </strong>. Pokud účet nebyl nastaven na slovník poplatků nebo máte stále nějaké řádky, které nejsou vázány na žádný účet, budete muset provést ruční vazbu z nabídky "<strong> %s </strong>". DescVentilDoneExpenseReport=Poraďte se zde seznam v souladu se zprávami výdajů a jejich poplatků účtování účtu +Closure=Annual closure DescClosure=Zde se podívejte na počet pohybů za měsíc, kteří nejsou validováni a fiskální roky již otevřeny OverviewOfMovementsNotValidated=Krok 1 / Přehled pohybů neověřených. (Nezbytné uzavřít fiskální rok) +AllMovementsWereRecordedAsValidated=All movements were recorded as validated +NotAllMovementsCouldBeRecordedAsValidated=Not all movements could be recorded as validated ValidateMovements=Ověřte pohyby DescValidateMovements=Jakékoli úpravy nebo vymazání písem, nápisů a vymazání budou zakázány. Všechny přihlášky na cvičení musí být validovány, jinak nebude možné uzavřít -SelectMonthAndValidate=Vyberte měsíc a potvrďte pohyby ValidateHistory=Ověřit automaticky AutomaticBindingDone=Automatické vázání provedeno @@ -293,6 +300,7 @@ Accounted=Účtováno v knize NotYetAccounted=Zatím nebyl zaznamenán v knize ShowTutorial=Zobrazit výuku NotReconciled=Nesladěno +WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view ## Admin BindingOptions=Binding options @@ -337,6 +345,7 @@ Modelcsv_LDCompta10=Export pro LD Compta (v10 a vyšší) Modelcsv_openconcerto=Export pro OpenConcerto (Test) Modelcsv_configurable=Export CSV konfigurovatelný Modelcsv_FEC=Export FEC +Modelcsv_FEC2=Export FEC (With dates generation writing / document reversed) Modelcsv_Sage50_Swiss=Export pro Sage 50 Švýcarsko Modelcsv_winfic=Exportovat Winfic - eWinfic - WinSis Compta Modelcsv_Gestinumv3=Export for Gestinum (v3) diff --git a/htdocs/langs/cs_CZ/admin.lang b/htdocs/langs/cs_CZ/admin.lang index 4a4c07061e4..e272aa6e780 100644 --- a/htdocs/langs/cs_CZ/admin.lang +++ b/htdocs/langs/cs_CZ/admin.lang @@ -56,6 +56,8 @@ GUISetup=Zobrazení SetupArea=Nastavení UploadNewTemplate=Nahrát novou šablonu(y) FormToTestFileUploadForm=Formulář pro testování uploadu souborů (dle nastavení) +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled IfModuleEnabled=Poznámka: Ano má efekt pouze tehdy, pokud je aktivní modul <b>%s</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. @@ -85,7 +87,6 @@ ShowPreview=Zobrazit náhled ShowHideDetails=Show-Hide details PreviewNotAvailable=Náhled není k dispozici ThemeCurrentlyActive=Téma aktivní -CurrentTimeZone=Časové pásmo PHP (server) MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Data jsou uložena a vrácena databázovým serverem, jako kdyby byly uchovávány jako předložený řetězec. Časová zóna je účinná pouze při použití funkce UNIX_TIMESTAMP (která by Dolibarr neměla používat, takže databáze TZ by neměla mít žádný vliv, i když byla změněna po zadání dat). Space=Mezera @@ -153,8 +154,8 @@ 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=Odstraňte všechny dočasné soubory (bez rizika ztráty dat). Poznámka: Odstranění se provede pouze v případě, že dočasný adresář byl vytvořen před 24 hodinami. -PurgeDeleteTemporaryFilesShort=Odstranit dočasné soubory +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 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í PurgeNothingToDelete=Žádný adresář nebo soubor k odstranění @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Preferovaní partneři OtherResources=jiné zdroje ExternalResources=Externí zdroje SocialNetworks=Sociální sítě +SocialNetworkId=Social Network ID ForDocumentationSeeWiki=Pro uživatelskou nebo vývojářskou dokumentaci (Doc, FAQs ...) <br> navštivte Dolibarr Wiki: <br> <a href="%s" target="_blank"><b>%s</b></a> ForAnswersSeeForum=V případě jakýchkoliv dalších dotazů nebo nápovědy použijte fórum Dolibarr: <br> <a href="%s" target="_blank"><b>%s</b></a> HelpCenterDesc1=Tato oblast slouží k získání nápovědy a podpory systému Dolibarr. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Příklady s aktuální konfigurací ListOfDirectories=Seznam adresářů šablon OpenDocument ListOfDirectoriesForModelGenODT=Seznam adresářů obsahující soubory šablon s formátem OpenDocument. <br> <br> Zde vložte úplnou cestu adresářů. <br> Přidejte návrat vozíku mezi adresářem eah. <br> Chcete-li přidat adresář modulu GED, přidejte zde <b> DOL_DATA_ROOT / ecm / yourdirectoryname </b>. <br> <br> Soubory v těchto adresářích musí končit <b> .odt </b> nebo <b> .ods </b>. NumberOfModelFilesFound=Počet souborů šablon ODT / ODS nalezených v těchto adresářích -ExampleOfDirectoriesForModelGen=Příklady syntaxe: <br> c: \\ mydir <br> / Home / mydir <br> DOL_DATA_ROOT / ECM / ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br> Chcete-li vědět, jak vytvořit své ODT šablony dokumentů před jejich uložením do těchto adresářů, přečtěte si wiki dokumentace: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Pozice Jméno / Příjmení @@ -406,7 +408,7 @@ UrlGenerationParameters=Parametry k zajištění URL SecurityTokenIsUnique=Pro každou adresu URL použijte jedinečný bezpečnostní parametr EnterRefToBuildUrl=Zadejte odkaz na objekt %s GetSecuredUrl=Získejte vypočtenou URL -ButtonHideUnauthorized=Skrýt tlačítka pro uživatele, kteří nejsou administrátory, pro neoprávněné akce namísto zobrazování šedých vypnutých tlačítek +ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) OldVATRates=Staré Sazba DPH NewVATRates=Nová sazba DPH PriceBaseTypeToChange=Změňte ceny podle základní referenční hodnoty definované na @@ -668,7 +670,7 @@ Module54000Desc=Přímý tisk (bez otevírání dokumentů) pomocí rozhraní Cu Module55000Name=Anketa, průzkum nebo hlasování Module55000Desc=Vytvořte ankety, průzkumy nebo hlasování online (jako Doodle, Studs, RDVz atd ...) Module59000Name=Okraje -Module59000Desc=Modul pro správu marže +Module59000Desc=Module to follow margins Module60000Name=Provize Module60000Desc=Modul pro správu provize Module62000Name=Incoterms @@ -1306,7 +1308,7 @@ YouUseBestDriver=Používáte ovladač %s, který je v současné době nejlepš YouDoNotUseBestDriver=Používáte ovladač %s, ale doporučuje se ovladač %s. NbOfObjectIsLowerThanNoPb=V databázi máte pouze %s %s. To nevyžaduje žádnou zvláštní optimalizaci. SearchOptim=Optimalizace pro vyhledávače -YouHaveXObjectUseSearchOptim=V databázi máte %s %s. Konstantu %s byste měli přidat k 1 v Home-Setup-Other. Omezte vyhledávání na začátek řetězců, což umožňuje databázi používat indexy a měli byste získat okamžitou odpověď. +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=Máte %s %s v databázi a konstanta %s je nastavena na 1 v Home-Setup-Other. BrowserIsOK=Používáte webový prohlížeč %s. Tento prohlížeč je v pořádku pro zabezpečení a výkon. BrowserIsKO=Používáte webový prohlížeč %s. Tento prohlížeč je znám jako špatná volba pro zabezpečení, výkon a spolehlivost. Doporučujeme používat prohlížeče Firefox, Chrome, Opera nebo Safari. @@ -1596,8 +1598,13 @@ ServiceSetup=Nastavení modulu služeb ProductServiceSetup=Nastavení modulů produktů a služeb NumberOfProductShowInSelect=Maximální počet produktů, které mají být zobrazeny v seznamu výběrových kombinací (0 = žádný limit) ViewProductDescInFormAbility=Zobrazovat popisy produktů ve formulářích (jinak se zobrazí v popupu popisků) +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=Aktivovat v servisním / Attached kartě výrobku Soubory možnost sloučit produkt PDF dokument k návrhu PDF Azur-li výrobek / služba je v návrhu -ViewProductDescInThirdpartyLanguageAbility=Zobrazte popisy produktů v jazyce subjektu +ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) UseSearchToSelectProductTooltip=Také, pokud máte velké množství produktů (> 100 000), můžete zvýšit rychlost nastavením konstantního PRODUCT_DONOTSEARCH_ANYWHERE na 1 v nabídce Setup-> Other. Hledání bude omezeno na začátek řetězce. UseSearchToSelectProduct=Počkejte, než stisknete klávesu před načtením obsahu seznamu combo produktu (Může se tím zvýšit výkon, pokud máte velké množství produktů, ale je méně vhodný) SetDefaultBarcodeTypeProducts=Výchozí typ čárového kódu použít pro produkty @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalizované nabídky, které nejsou propojeny s NewMenu=Nová nabídka MenuHandler=Ovládání nabídek MenuModule=Zdrojový modul -HideUnauthorizedMenu= Skrýt neautorizovaná menu (šedá) +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=Id nabídka DetailMenuHandler=Ovládání nabídek, kde se má zobrazit nové menu DetailMenuModule=Název modulu, pokud položky nabídky pocházejí z modulu @@ -1983,11 +1990,12 @@ EMailHost=Hostitel poštovního IMAP serveru MailboxSourceDirectory=Adresář zdrojové schránky MailboxTargetDirectory=Adresář cílové schránky EmailcollectorOperations=Operace prováděné sběratelem +EmailcollectorOperationsDesc=Operations are executed from top to bottom order MaxEmailCollectPerCollect=Maximální počet e-mailů shromážděných za sběr CollectNow=Sbírat nyní ConfirmCloneEmailCollector=Opravdu chcete klonovat sběratel e-mailů %s? -DateLastCollectResult=Datum poslední vyzvednutí vyzkoušeno -DateLastcollectResultOk=Datum poslední sbírat úspěšně +DateLastCollectResult=Date of latest collect try +DateLastcollectResultOk=Date of latest collect success LastResult=Poslední výsledek EmailCollectorConfirmCollectTitle=Potvrzení sběru e-mailu EmailCollectorConfirmCollect=Chcete nyní spustit kolekci tohoto sběratele? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Vstupní kód nabídky (hlavní menu) ECMAutoTree=Zobrazit automatický strom ECM @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/cs_CZ/banks.lang b/htdocs/langs/cs_CZ/banks.lang index 5dea684e67a..2a7b3acfdfa 100644 --- a/htdocs/langs/cs_CZ/banks.lang +++ b/htdocs/langs/cs_CZ/banks.lang @@ -173,10 +173,11 @@ SEPAMandate=Mandát SEPA 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 peněžní oplocení -NewCashFence=Nový peněžní plot +CashControl=POS cash desk control +NewCashFence=New cash desk 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 diff --git a/htdocs/langs/cs_CZ/blockedlog.lang b/htdocs/langs/cs_CZ/blockedlog.lang index bb64468a731..2637c5675ae 100644 --- a/htdocs/langs/cs_CZ/blockedlog.lang +++ b/htdocs/langs/cs_CZ/blockedlog.lang @@ -35,7 +35,7 @@ logDON_DELETE=Donace logické odstranění logMEMBER_SUBSCRIPTION_CREATE=Členové odběry byly vytvořeny logMEMBER_SUBSCRIPTION_MODIFY=Členský odběr byl změněn logMEMBER_SUBSCRIPTION_DELETE=Členská logická smazání odběru -logCASHCONTROL_VALIDATE=Zaznamenávání peněžních plotů +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Stažení faktury od zákazníka BlockedLogBillPreview=Zobrazení náhledu zákaznické faktury BlockedlogInfoDialog=Podrobnosti o protokolu diff --git a/htdocs/langs/cs_CZ/boxes.lang b/htdocs/langs/cs_CZ/boxes.lang index b7104985e78..e6624e679e4 100644 --- a/htdocs/langs/cs_CZ/boxes.lang +++ b/htdocs/langs/cs_CZ/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=Nejnovější %s upravené dary BoxTitleLastModifiedExpenses=Nejnovější %s upravené výkazy výdajů BoxTitleLatestModifiedBoms=Poslední %s upravené kusovníky BoxTitleLatestModifiedMos=Poslední upravené výrobní zakázky %s +BoxTitleLastOutstandingBillReached=Customers with maximum outstanding exceeded BoxGlobalActivity=Globální aktivita (faktury, návrhy, objednávky) BoxGoodCustomers=Dobří zákazníci BoxTitleGoodCustomers=%s Dobří zákazníci +BoxScheduledJobs=Naplánované úlohy +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Nepodařilo se obnovit RSS zdroj. Poslední úspěšné datum obnovení: %s LastRefreshDate=Nejnovější datum obnovení NoRecordedBookmarks=Nejsou definované žádné záložky. @@ -92,8 +95,8 @@ LastXMonthRolling=Nejnovější %s měsíc válcování ChooseBoxToAdd=Přidání widgetu do hlavního panelu BoxAdded=Widget byl přidán do hlavního panelu BoxTitleUserBirthdaysOfMonth=Narozeniny tohoto měsíce (uživatelé) -BoxLastManualEntries=Poslední manuální zápisy v účetnictví -BoxTitleLastManualEntries=%s nejnovější manuální zápisy +BoxLastManualEntries=Latest record in accountancy entered manually or without source document +BoxTitleLastManualEntries=%s latest record entered manually or without source document NoRecordedManualEntries=V účetnictví nejsou zaznamenány žádné manuální záznamy BoxSuspenseAccount=Počítání účetních operací s dočasným účtem BoxTitleSuspenseAccount=Počet nepřidělených linek @@ -102,5 +105,7 @@ SuspenseAccountNotDefined=Účet pozastavení není definován BoxLastCustomerShipments=Poslední zásilky zákazníků BoxTitleLastCustomerShipments=Nejnovější %s zásilky zákazníků NoRecordedShipments=Žádná zaznamenaná zásilka zákazníka +BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages AccountancyHome=Účetnictví +ValidatedProjects=Validated projects diff --git a/htdocs/langs/cs_CZ/cashdesk.lang b/htdocs/langs/cs_CZ/cashdesk.lang index e83a9e313de..58ca4072acb 100644 --- a/htdocs/langs/cs_CZ/cashdesk.lang +++ b/htdocs/langs/cs_CZ/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Zápatí AmountAtEndOfPeriod=Částka na konci období (den, měsíc nebo rok) TheoricalAmount=Teoretická částka RealAmount=Skutečná částka -CashFence=Hotovostní plot -CashFenceDone=Peněžní oplatek za období +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=Některé z faktur Paymentnumpad=Zadejte Pad pro vložení platby Numberspad=Numbers Pad @@ -99,8 +99,9 @@ CashDeskRefNumberingModules=Modul číslování pro prodej POS CashDeskGenericMaskCodes6 = <br> <b> {TN} </b> se používá k přidání čísla terminálu TakeposGroupSameProduct=Seskupte stejné produktové řady StartAParallelSale=Zahajte nový paralelní prodej -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Zavřete hotovostní plot +SaleStartedAt=Sale started at %s +ControlCashOpening=Control cash popup at opening POS +CloseCashFence=Close cash desk control CashReport=Hotovostní zpráva MainPrinterToUse=Hlavní tiskárna k použití OrderPrinterToUse=Objednejte tiskárnu k použití @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/cs_CZ/categories.lang b/htdocs/langs/cs_CZ/categories.lang index 53d6caa3877..fc7d27f5efa 100644 --- a/htdocs/langs/cs_CZ/categories.lang +++ b/htdocs/langs/cs_CZ/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=Oblast projektů značek/kategorií UsersCategoriesArea=Kategorie značek/kategorií uživatelů SubCats=Podkategorie CatList=Výpis tagů/kategorií +CatListAll=List of tags/categories (all types) NewCategory=Nový tag/kategorie ModifCat=Upravit tag/kategorii CatCreated=Tag/kategorie byla vytvořená @@ -65,16 +66,22 @@ UsersCategoriesShort=Uživatelské značky/kategorie StockCategoriesShort=Značky/kategorie skladů ThisCategoryHasNoItems=Tato kategorie neobsahuje žádné položky. CategId=ID tagu/kategorie -CatSupList=Seznam tagů/kategorií dodavatelů -CatCusList=Seznam tagů/kategorií zákazníků/cílů +ParentCategory=Parent tag/category +ParentCategoryLabel=Label of parent tag/category +CatSupList=List of vendors tags/categories +CatCusList=List of customers/prospects tags/categories CatProdList=Seznam tagů/kategorií produktů CatMemberList=Seznam tagů/kategorií uživatelů -CatContactList=Seznam kontaktů tagů/kategorií -CatSupLinks=Spojení mezi dodavateli a tagy/kategoriemi +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=Spojení mezi zákazníky/cíly a tagy/kategoriemi CatContactsLinks=Odkazy mezi kontakty/adresami a značkami/kategoriemi CatProdLinks=Spojení mezi produkty/službami a tagy/kategoriemi -CatProJectLinks=Links between projects and tags/categories +CatMembersLinks=Spojení mezi uživateli a tagy/kategoriemi +CatProjectsLinks=Links between projects and tags/categories +CatUsersLinks=Links between users and tags/categories DeleteFromCat=Odebrat z tagů/kategorií ExtraFieldsCategories=Doplňkové atributy CategoriesSetup=Nastavení tagů/kategorií diff --git a/htdocs/langs/cs_CZ/companies.lang b/htdocs/langs/cs_CZ/companies.lang index 19b9513ae7c..7f16ddead5c 100644 --- a/htdocs/langs/cs_CZ/companies.lang +++ b/htdocs/langs/cs_CZ/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Zkontrolujte ID DPH uvnitř Společenství na webovýc VATIntraManualCheck=Můžete také zkontrolovat ručně na evropských stránkách <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=Kontrola není možná. Služba není členským státem poskytována (%s). NorProspectNorCustomer=Ani cíl, ani zákazník -JuridicalStatus=Typ právnické osoby +JuridicalStatus=Business entity type Workforce=Workforce Staff=Zaměstnanci ProspectLevelShort=Potenciální diff --git a/htdocs/langs/cs_CZ/compta.lang b/htdocs/langs/cs_CZ/compta.lang index 9e64b689ff2..b725f1ab696 100644 --- a/htdocs/langs/cs_CZ/compta.lang +++ b/htdocs/langs/cs_CZ/compta.lang @@ -111,7 +111,7 @@ Refund=Vrácení SocialContributionsPayments=Sociální / platby daně za ShowVatPayment=Zobrazit platbu DPH TotalToPay=Celkem k zaplacení -BalanceVisibilityDependsOnSortAndFilters=pouze tehdy, pokud je řazen tabulka vzestupně na %s a filtrován 1 bankovního účtu je vidět v tomto seznamu Balance +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=Zákaznický účetní kód SupplierAccountancyCode=dodavatelský účetní kód CustomerAccountancyCodeShort=Cust. účet. kód @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Opravdu chcete vymazat tuto sociální / daňovo 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> -CalcModeDebt=Analýza známých zaznamenaných faktur, a to i v případě, že ještě nejsou účtovány v účetní evidenci. +CalcModeDebt=Analysis of known recorded documents even if they are not yet accounted in ledger. CalcModeEngagement=Analýza známých zaznamenaných plateb, i když ještě nejsou účtovány v Ledgeru. CalcModeBookkeeping=Analýza údajů publikovaných v tabulce Účetnictví účetnictví. CalcModeLT1= Mod <b>%sRE na zákaznické faktury - dodavatelské faktury%s</b> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Bilance příjmů a výdajů, roční shrnutí AnnualByCompanies=Bilance příjmů a výdajů podle předem definovaných skupin účtů AnnualByCompaniesDueDebtMode=Bilance výnosů a nákladů, podrobnosti podle předdefinovaných skupin, režim <b> %sClaims-Debts%s</b> uvedl <b>Účtování závazků</b> . AnnualByCompaniesInputOutputMode=Bilance výnosů a nákladů, podrobnosti podle předdefinovaných skupin, režim <b> %sInvestice-Výdaje%s </b> uvedl <b> hotovostní účetnictví </b>. -SeeReportInInputOutputMode=Viz %sanalýza plateb %spro výpočet skutečných plateb, i když ještě nejsou účtovány v Ledgeru. -SeeReportInDueDebtMode=Viz %sanalýza faktur %s pro výpočet založený na známých zaznamenaných fakturách, i když ještě nejsou účtovány v Ledgeru. -SeeReportInBookkeepingMode=Viz část <b> %sKontrola report %s</b> pro výpočet na <b> Tabulce účtů účetnictví </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=- Uvedené částky jsou se všemi daněmi RulesResultDue=- Zahrnuje nezaplacené faktury, výdaje, DPH, dary, ať už jsou či nejsou zaplaceny. Zahrnuje také placené platy. <br> - Je založen na fakturačním datu faktur a na datu splatnosti pro výdaje nebo platby daní. U platů definovaných modulem Plat se použije datum platby. RulesResultInOut=- To zahrnuje skutečné platby na fakturách, nákladů, DPH a platů. <br> - Je založen na datech plateb faktur, náklady, DPH a platů. Datum daru pro dárcovství. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=Zobrazuje záznam ve vašem účtu s účetn SeePageForSetup=Viz menu <a href="%s"> %s </a> pro nastavení DepositsAreNotIncluded=- Zálohové faktury nejsou zahrnuty DepositsAreIncluded=- Zálohové faktury jsou zahrnuty +LT1ReportByMonth=Tax 2 report by month +LT2ReportByMonth=Tax 3 report by month LT1ReportByCustomers=Nahlásit daň 2 subjektu LT2ReportByCustomers=Oznámte daň 3 subjektu LT1ReportByCustomersES=Zpráva třetí strany RE LT2ReportByCustomersES=Zpráva o třetí straně IRPF VATReport=Zpráva o dani z prodeje VATReportByPeriods=Zpráva o dani z prodeje podle období +VATReportByMonth=Sale tax report by month VATReportByRates=Zpráva o dani z prodeje podle sazeb VATReportByThirdParties=Zpráva o dani z prodeje subjekty VATReportByCustomers=Zpráva o dani z prodeje zákazníkem diff --git a/htdocs/langs/cs_CZ/cron.lang b/htdocs/langs/cs_CZ/cron.lang index b2b351ec4e2..2301936582d 100644 --- a/htdocs/langs/cs_CZ/cron.lang +++ b/htdocs/langs/cs_CZ/cron.lang @@ -7,13 +7,14 @@ Permission23103 = Smazat naplánovanou úlohu Permission23104 = Provést naplánovanou úlohu # Admin CronSetup=Nastavení naplánovaných úloh -URLToLaunchCronJobs=URL ke kontrole a spuštění úlohy v případě potřeby -OrToLaunchASpecificJob=Nebo zkontrolovat a zahájit konkrétní práci +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=Bezpečnostní klíč URL spuštění úlohy FileToLaunchCronJobs=Příkazový řádek pro kontrolu a spuštění kvalifikovaných úloh v cronu CronExplainHowToRunUnix=Na Unixových systémech by jste měli použít následující položku crontab ke spuštění příkazového řádku každých 5 minut CronExplainHowToRunWin=V prostředí Microsoft Windows můžete pomocí nástrojů Naplánované úlohy spustit příkazový řádek každých 5 minut CronMethodDoesNotExists=Třída %s neobsahuje žádné metody %s +CronMethodNotAllowed=Method %s of class %s is in blacklist of forbidden methods CronJobDefDesc=Profily úloh Cron jsou definovány do souboru deskriptoru modulu. Když je modul aktivován, jsou načteny a dostupné, takže můžete spravovat úlohy z nabídky nástrojů admin %s. CronJobProfiles=Seznam předdefinovaných úloh profilu cron # Menu @@ -46,6 +47,7 @@ CronNbRun=Počet spuštění CronMaxRun=Maximální počet spuštění CronEach=Každý JobFinished=Práce zahájena a dokončena +Scheduled=Scheduled #Page card CronAdd= Přidat práci CronEvery=Vykonat práci každý @@ -56,7 +58,7 @@ CronNote=Komentář CronFieldMandatory=Pole %s je povinné CronErrEndDateStartDt=Datum ukončení nemůže být před datem zahájení StatusAtInstall=Stav při instalaci modulu -CronStatusActiveBtn=Umožnit +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Zakázat CronTaskInactive=Tato úloha je zakázána CronId=Id @@ -82,3 +84,8 @@ MakeLocalDatabaseDumpShort=Záloha lokální databáze MakeLocalDatabaseDump=Vytvoření výpisu místní databáze. Parametry jsou: komprese ('gz' nebo 'bz' nebo 'none'), zálohovací typ ('mysql', 'pgsql', 'auto'), WarningCronDelayed=Pozor, pokud jde o výkonnost, bez ohledu na to, co je příštím datem provedení povolených úloh, mohou být vaše úlohy zpožděny maximálně do %s hodin, než budou spuštěny. DATAPOLICYJob=Čistič dat a anonymizér +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/cs_CZ/errors.lang b/htdocs/langs/cs_CZ/errors.lang index a9028d01278..0be889628dc 100644 --- a/htdocs/langs/cs_CZ/errors.lang +++ b/htdocs/langs/cs_CZ/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=Žádná chyba, jsme se nedopustili # Errors ErrorButCommitIsDone=Byly nalezeny chyby, ale přesto jsme provedli ověření. Snad to pojede .... ErrorBadEMail=E-mail %s je špatný +ErrorBadMXDomain=Email %s seems wrong (domain has no valid MX record) ErrorBadUrl=Url %s je špatně ErrorBadValueForParamNotAString=Špatná hodnota parametru. Připojí se obecně, když chybí překlad. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=Přihlášení %s již existuje. ErrorGroupAlreadyExists=Skupina %s již existuje. ErrorRecordNotFound=Záznam není nalezen. @@ -48,6 +50,7 @@ ErrorFieldsRequired=Některá povinná pole nebyla vyplněna. Neflákejte to !! ErrorSubjectIsRequired=Předmět e-mailu je povinný ErrorFailedToCreateDir=Nepodařilo se vytvořit adresář. Zkontrolujte, zda má uživatel webového serveru oprávnění zapisovat do adresáře dokumentů Dolibarr. Pokud je v tomto PHP aktivován parametr <b> safe_mode</b>, zkontrolujte, zda jsou soubory Dolibarr php vlastní uživateli (nebo skupinou) webového serveru. ErrorNoMailDefinedForThisUser=Pro tohoto uživatele není definován žádný e-mail +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=Tato funkce vyžaduje zapnutí javascriptu pro práci. Změňte nastavení v zobrazení nastavení. ErrorTopMenuMustHaveAParentWithId0=Nabídka typu "Top" nemůže mít nadřazenou nabídku. Vložte 0 do rodičovského menu nebo zvolte nabídku typu "Vlevo". ErrorLeftMenuMustHaveAParentId=Nabídka typu "Left" musí mít nadřazený identifikátor. @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=Toto jméno profilu již existuje pro tuto exportní ErrorLDAPSetupNotComplete=Dolibarr-LDAP shoda není dokončena. ErrorLDAPMakeManualTest=Soubor .ldif byl vygenerován v adresáři %s. Pokuste se jej z příkazového řádku ručně načíst a získat další informace o chybách. ErrorCantSaveADoneUserWithZeroPercentage=Nelze uložit akci s "stav nebyl spuštěn", pokud je vyplněn také pole "provedeno". -ErrorRefAlreadyExists=Ref používané pro vytváření již existuje. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorPleaseTypeBankTransactionReportName=Zadejte prosím název výpisu banky, na kterém má být záznam zaznamenán (formát YYYYMM nebo YYYYMMDD) ErrorRecordHasChildren=Záznam se nepodařilo smazat, protože má některé podřízené záznamy. ErrorRecordHasAtLeastOneChildOfType=Objekt má alespoň jeden podřízený záznam typu %s @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=Musíte zvolit, zda je článek p ErrorDiscountLargerThanRemainToPaySplitItBefore=Sleva, kterou se pokoušíte použít, je větší než platba. Rozdělte slevu ve 2 menších slevách dříve. A moc to nepřehánějte .... ErrorFileNotFoundWithSharedLink=Soubor nebyl nalezen. Může být změněn klíč sdílení nebo nedávno odstraněn soubor. ErrorProductBarCodeAlreadyExists=Výrobní čárový kód %s již existuje u jiného odkazu na produkt. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Všimněte si také, že použití virtuálního produktu k automatickému zvýšení / snížení podprogramů není možné, pokud alespoň jeden subprodukt (nebo subprodukt subproduktů) potřebuje číslo seriálu / šarže. +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=Popis je povinný pro linky s volným produktem ErrorAPageWithThisNameOrAliasAlreadyExists=Stránka / kontejner <strong> %s</strong> má stejný název nebo jiný alias, než ten, který se pokoušíte použít ErrorDuringChartLoad=Při načtení tabulky účtů došlo k chybě. Pokud nebylo načteno několik účtů, můžete je zadat ručně. @@ -243,6 +246,16 @@ ErrorReplaceStringEmpty=Chyba, řetězec, který chcete nahradit, je prázdný 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=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 + # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Váš parametr PHP upload_max_filesize (%s) je vyšší než parametr PHP post_max_size (%s). Toto není konzistentní nastavení. WarningPasswordSetWithNoAccount=Pro tohoto člena bylo nastaveno heslo. Nebyl však vytvořen žádný uživatelský účet. Toto heslo je uloženo, ale nemůže být použito pro přihlášení k Dolibarr. Může být použito externím modulem / rozhraním, ale pokud nemáte pro člena definováno žádné přihlašovací jméno ani heslo, můžete vypnout možnost "Správa přihlášení pro každého člena" z nastavení modulu člena. Pokud potřebujete spravovat přihlašovací údaje, ale nepotřebujete žádné heslo, můžete toto pole ponechat prázdné, abyste se tomuto varování vyhnuli. Poznámka: E-mail může být také použit jako přihlašovací jméno, pokud je člen připojen k uživateli. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Vaše přihlašovací údaje byly změně WarningAnEntryAlreadyExistForTransKey=Položka již existuje pro překladatelské klíč pro tento jazyk WarningNumberOfRecipientIsRestrictedInMassAction=Upozornění: počet různých příjemců je omezen na <b> %s </b> při použití hromadných akcí v seznamech WarningDateOfLineMustBeInExpenseReportRange=Upozornění: datum řádku není v rozsahu výkazu výdajů +WarningProjectDraft=Project is still in draft mode. Don't forget to validate it if you plan to use tasks. WarningProjectClosed=Projekt je uzavřen. Nejprve je musíte znovu otevřít. WarningSomeBankTransactionByChequeWereRemovedAfter=Některé bankovní transakce byly odstraněny poté, co byly vygenerovány potvrzení včetně těchto. Počet kontrol a celkový příjem se tedy může lišit od počtu a celkového počtu v seznamu. Špek pro případnou kontrolu !! -WarningFailedToAddFileIntoDatabaseIndex=Výstraha: Nepodařilo se přidat položku souboru do indexové tabulky databáze ECM +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. diff --git a/htdocs/langs/cs_CZ/exports.lang b/htdocs/langs/cs_CZ/exports.lang index 85d98be9e68..34c0d9b41d6 100644 --- a/htdocs/langs/cs_CZ/exports.lang +++ b/htdocs/langs/cs_CZ/exports.lang @@ -133,3 +133,4 @@ KeysToUseForUpdates=Klíč (sloupec), který chcete použít pro <b> aktualizaci NbInsert=Počet vložených řádků: %s NbUpdate=Počet aktualizovaných řádků: %s MultipleRecordFoundWithTheseFilters=Bylo nalezeno více záznamů s těmito filtry: %s +StocksWithBatch=Stocks and location (warehouse) of products with batch/serial number diff --git a/htdocs/langs/cs_CZ/mails.lang b/htdocs/langs/cs_CZ/mails.lang index aad25597cf4..ffa9e363aa8 100644 --- a/htdocs/langs/cs_CZ/mails.lang +++ b/htdocs/langs/cs_CZ/mails.lang @@ -92,6 +92,7 @@ MailingModuleDescEmailsFromUser=Emaily zadávané uživatelem MailingModuleDescDolibarrUsers=Uživatelé s e-maily MailingModuleDescThirdPartiesByCategories=Subjekty (podle kategorií) SendingFromWebInterfaceIsNotAllowed=Odesílání z webového rozhraní není povoleno. +EmailCollectorFilterDesc=All filters must match to have an email being collected # Libelle des modules de liste de destinataires mailing LineInFile=Řádek %s v souboru @@ -125,12 +126,13 @@ TagMailtoEmail=E-mail příjemce (včetně html odkazu "mailto:") NoEmailSentBadSenderOrRecipientEmail=Žádný e-mail nebyl odeslán. Špatný e-mail odesílatele nebo příjemce. Ověřte profil uživatele. # Module Notifications Notifications=Upozornění -NoNotificationsWillBeSent=Nejsou plánovány žádná e-mailová oznámení pro tuto událost nebo společnost -ANotificationsWillBeSent=1 notifikace bude zaslána e-mailem -SomeNotificationsWillBeSent=%s oznámení bude zasláno e-mailem -AddNewNotification=Aktivace cíle pro nové e-mailové upozornění -ListOfActiveNotifications=Seznam všech aktivních cílů / událostí pro oznámení emailem -ListOfNotificationsDone=Vypsat všechny odeslané e.mailové oznámení +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=Konfigurace odesílání e-maiů byla nastavena tak, aby '%s'. Tento režim nelze použít k odesílání hromadných e-mailů. MailSendSetupIs2=Nejprve je nutné jít s admin účtem, do nabídky%sHome - Nastavení - e-maily%s pro změnu parametru <strong>"%s"</strong> do režimu použít "%s". V tomto režimu, můžete zadat nastavení serveru SMTP vašeho poskytovatele služeb internetu a používat hromadnou e-mailovou funkci. MailSendSetupIs3=Pokud máte nějaké otázky o tom, jak nastavit SMTP server, můžete se zeptat na%s, nebo si prostudujte dokumentaci vašeho poskytovatele. \nPoznámka: V současné době bohužel většina serverů nasazuje služby pro filtrování nevyžádané pošty a různé způsoby ověřování odesilatele. Bez detailnějších znalostí a nastavení vašeho SMTP serveru se vám bude vracet většina zpráv jako nedoručené. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Importovaný soubor musí mít formát <strong> e-mai UseFormatInputEmailToTarget=Zadejte řetězec s formátem <strong> e-mail; jméno; první jméno; další </strong> MailAdvTargetRecipients=Příjemci (rozšířený výběr) AdvTgtTitle=Vyplňte vstupní pole, chcete-li předvolit subjekty nebo kontakty / adresy, na které chcete cílit -AdvTgtSearchTextHelp=Jako zástupné znaky použijte %%. Chcete-li například najít všechny položky jako <b> jean, joe, jim</b>, můžete zadat <b> j%%</b>, můžete také použít; jako oddělovač pro hodnotu a použití pro tuto hodnotu. Například<b>jim%%; jimo; jima% </b> bude zaměřen na všechny jean, joe, začít s jim, ale ne jimo a ne všechno, co začíná jima +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=Pomocí intervalu vyberte hodnotu int nebo float AdvTgtMinVal=Minimální hodnota AdvTgtMaxVal=Maximální hodnota @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Vytvořte filtr AdvTgtOrCreateNewFilter=Název nového filtru NoContactWithCategoryFound=Žádný kontakt / adresa s nalezenou kategorií NoContactLinkedToThirdpartieWithCategoryFound=Žádný kontakt / adresa s nalezenou kategorií -OutGoingEmailSetup=Nastavení odchozí pošty -InGoingEmailSetup=Příchozí nastavení e-mailu -OutGoingEmailSetupForEmailing=Nastavení odchozí pošty (pro modul %s) -DefaultOutgoingEmailSetup=Výchozí nastavení odchozí pošty +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=Informace ContactsWithThirdpartyFilter=Kontakty s filtrem subjektu Unanswered=Unanswered Answered=Odpovězeno IsNotAnAnswer=Is not answer (initial email) IsAnAnswer=Is an answer of an initial email +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/cs_CZ/main.lang b/htdocs/langs/cs_CZ/main.lang index b2fcda76ae4..e5c81c5c737 100644 --- a/htdocs/langs/cs_CZ/main.lang +++ b/htdocs/langs/cs_CZ/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=Pro tento typ e-mailu není k dispozici žádná šablona AvailableVariables=K dispozici substituční proměnné NoTranslation=Překlad není Translation=Překlad +CurrentTimeZone=Časové pásmo PHP (server) EmptySearchString=Zadejte neprázdná kritéria vyhledávání +EnterADateCriteria=Enter a date criteria NoRecordFound=Nebyl nalezen žádný záznam NoRecordDeleted=Žádný záznam nebyl smazán NotEnoughDataYet=Nedostatek dat @@ -85,6 +87,8 @@ FileWasNotUploaded=Soubor vybrán pro připojení, ale ještě nebyl nahrán. Kl NbOfEntries=Počet vstupů GoToWikiHelpPage=Přečtěte si online nápovědu (přístup k internetu je potřeba) GoToHelpPage=Přečíst nápovědu +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Domovská stránka RecordSaved=Záznam uložen RecordDeleted=Záznam smazán RecordGenerated=Záznam byl vygenerován @@ -220,6 +224,7 @@ Value=Hodnota PersonalValue=Osobní hodnota NewObject=Nové %s NewValue=Nová hodnota +OldValue=Old value %s CurrentValue=Současná hodnota Code=Kód Type=Typ @@ -433,6 +438,7 @@ RemainToPay=Zbývá platit Module=Modul/aplikace Modules=Moduly/aplikace Option=Volba +Filters=Filters List=Seznam FullList=Plný seznam FullConversation=Plná konverzace @@ -650,6 +656,7 @@ SupplierPreview=Náhled dodavatele ShowCustomerPreview=Zobrazit náhled zákazníka ShowSupplierPreview=Zobrazit náhled dodavatele RefCustomer=Ref. zákazník +InternalRef=Internal ref. Currency=Měna InfoAdmin=Informace pro správce Undo=Zrušit @@ -671,7 +678,7 @@ SendMail=Odeslat e-mail Email=E-mail NoEMail=Žádný e-mail AlreadyRead=Již jste si přečetli -NotRead=Nepřečetl +NotRead=Nepřečtený NoMobilePhone=Žádné telefonní číslo Owner=Majitel FollowingConstantsWillBeSubstituted=Následující konstanty budou nahrazeny odpovídající hodnotou. @@ -1107,3 +1114,9 @@ UpToDate=Up-to-date OutOfDate=Out-of-date EventReminder=Event Reminder UpdateForAllLines=Update for all lines +OnHold=Pozdržen +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 diff --git a/htdocs/langs/cs_CZ/modulebuilder.lang b/htdocs/langs/cs_CZ/modulebuilder.lang index 51093a410ec..325c3fe3b52 100644 --- a/htdocs/langs/cs_CZ/modulebuilder.lang +++ b/htdocs/langs/cs_CZ/modulebuilder.lang @@ -40,6 +40,7 @@ PageForCreateEditView=PHP stránku pro vytvoření / úpravu / prohlížení zá PageForAgendaTab=Stránka PHP pro kartu události PageForDocumentTab=Stránka PHP pro kartu dokumentu PageForNoteTab=Stránka PHP pro kartu poznámky +PageForContactTab=PHP page for contact tab PathToModulePackage=Cesta k zip modulu / aplikačního balíčku PathToModuleDocumentation=Cesta k souboru dokumentace modulu/aplikace (%s) SpaceOrSpecialCharAreNotAllowed=Mezery nebo speciální znaky nejsou povoleny. @@ -77,7 +78,7 @@ IsAMeasure=Je to opatření DirScanned=Adresář naskenován NoTrigger=Žádný spouštěč NoWidget=Žádný widget -GoToApiExplorer=Přejděte na prohlížeč rozhraní API +GoToApiExplorer=API explorer ListOfMenusEntries=Seznam položek menu ListOfDictionariesEntries=Seznam položek slovníků ListOfPermissionsDefined=Seznam definovaných oprávnění @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=Pokud máte znalosti o SQL a PHP, můžete použít pr SeeTopRightMenu=Viz <span class="fa fa-bug"> </span> v pravé horní nabídce AddLanguageFile=Přidat jazyk YouCanUseTranslationKey=Zde můžete použít klíč, který je překladatelským klíčem nalezeným v jazykovém souboru (viz záložka "Jazyky") -DropTableIfEmpty=(Vymazat tabulku, pokud je prázdná) +DropTableIfEmpty=(Destroy table if empty) TableDoesNotExists=Tabulka %s neexistuje TableDropped=Tabulka %s byla smazána InitStructureFromExistingTable=Vytvořte řetězec struktury pole existující tabulky @@ -126,7 +127,6 @@ UseSpecificEditorURL = Použijte specifickou adresu URL editoru UseSpecificFamily = Použijte konkrétní rodinu UseSpecificAuthor = Použijte specifického autora UseSpecificVersion = Použijte specifickou počáteční verzi -ModuleMustBeEnabled=Nejprve musí být aktivován modul / aplikace IncludeRefGeneration=Odkaz na objekt musí být generován automaticky IncludeRefGenerationHelp=Zaškrtněte toto, pokud chcete zahrnout kód pro automatické generování reference IncludeDocGeneration=Chci z objektu vygenerovat nějaké dokumenty @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Typ polí: <br> varchar (99), dvojitý (24,8), reálný, text, AsciiToHtmlConverter=Převodník ASCII na HTML AsciiToPdfConverter=Převodník ASCII na PDF TableNotEmptyDropCanceled=Tabulka není prázdná. Odstranění tabulky bylo zrušeno. +ModuleBuilderNotAllowed=The module builder is available but not allowed to your user. diff --git a/htdocs/langs/cs_CZ/mrp.lang b/htdocs/langs/cs_CZ/mrp.lang index a3e64ead7a8..e86ca5e8c48 100644 --- a/htdocs/langs/cs_CZ/mrp.lang +++ b/htdocs/langs/cs_CZ/mrp.lang @@ -78,3 +78,27 @@ TotalCost=Celkové náklady BOMTotalCost=Náklady na výrobu tohoto kusovníku na základě nákladů na každé spotřebované množství a produkt (použijte cenu Cena, pokud je definována, jinak průměrná vážená cena, pokud je definována, jinak nejlepší kupní cena) 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/cs_CZ/other.lang b/htdocs/langs/cs_CZ/other.lang index ba0a69321c7..23b567fc52b 100644 --- a/htdocs/langs/cs_CZ/other.lang +++ b/htdocs/langs/cs_CZ/other.lang @@ -5,8 +5,6 @@ Tools=Nástroje TMenuTools=Nástroje ToolsDesc=Všechny nástroje, které nejsou zahrnuty v jiných položkách nabídky, jsou zde seskupeny. <br> Všechny nástroje jsou přístupné v levém menu. Birthday=Narozeniny -BirthdayDate=datum narozenin -DateToBirth=Datum narození BirthdayAlertOn=Připomenutí narozenin aktivní BirthdayAlertOff=Připomenutí narozenin neaktivní TransKey=Překlad klíčů TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Předchozí měsíc (číslo 1-12) data faktury TextPreviousMonthOfInvoice=Předchozí měsíc (text) data faktury NextMonthOfInvoice=Následující měsíc (číslo 1-12) data faktury TextNextMonthOfInvoice=Následující měsíc (text) data faktury +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip soubor generovaný do <b> %s </b>. DocFileGeneratedInto=Soubor Doc generován do <b> %s </b>. JumpToLogin=Odpojeno. Přejít na přihlašovací stránku ... @@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Zpráva o výdajích ověřena (vyžaduje se schv Notify_EXPENSE_REPORT_APPROVE=Zpráva o výdajích byla schválena Notify_HOLIDAY_VALIDATE=Zanechat žádost ověřenou (vyžaduje se schválení) Notify_HOLIDAY_APPROVE=Zanechat žádost schválenou +Notify_ACTION_CREATE=Added action to Agenda SeeModuleSetup=Viz nastavení modulu %s NbOfAttachedFiles=Počet připojených souborů/dokumentů TotalSizeOfAttachedFiles=Celková velikost připojených souborů/dokumentů @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Ahoj)__\n\nNajděte prosím dodací lhůtu PredefinedMailContentSendFichInter=__(Ahoj)__\n\nNajděte zásah __REF__\n\n\n__(S pozdravem)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Klepnutím na níže uvedený odkaz proveďte platbu, pokud ještě není hotovo.\n\n%s\n\n PredefinedMailContentGeneric=__(Ahoj)__\n\n\n__(S pozdravem)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendActionComm=Event reminder "__EVENT_LABEL__" on __EVENT_DATE__ at __EVENT_TIME__<br><br>This is an automatic message, please do not reply. DemoDesc=Dolibarr je kompaktní ERP/CRM systém, který se skládá z více funkčních modulů. Demo, které obsahuje všechny moduly vám nepředstaví všechny možnosti, protože v reálné situaci všechny moduly najednou používat nebudete. Pro lepší a snadnější seznámení s celým systémem máte k dispozici několik demo profilů lépe vystihujících vaše požadavky. ChooseYourDemoProfil=Vyberte demo profil, který nejlépe odpovídá vaší činnosti, nebo zaměření ... ChooseYourDemoProfilMore=... nebo vytvořit vlastní profil <br> (manuální výběr požadovaných modulů) @@ -137,7 +139,7 @@ Right=Pravý CalculatedWeight=Vypočtená hmotnost CalculatedVolume=Vypočtený objem Weight=Hmotnost -WeightUnitton=tuna +WeightUnitton=tón WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,7 @@ EMailTextExpenseReportValidated=Zpráva o výdajích %s byla ověřena. EMailTextExpenseReportApproved=Zpráva o výdajích %s byla schválena. EMailTextHolidayValidated=Oprávnění %s bylo ověřeno. EMailTextHolidayApproved=Opustit požadavek %s byl schválen. +EMailTextActionAdded=The action %s has been added to the Agenda. ImportedWithSet=Import souboru dat DolibarrNotification=Automatické upozornění ResizeDesc=Zadejte novou šířku <b>nebo</b> novou výšku. Poměry budou uchovávány při změně velikosti ... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Kontakt/adresa vytvořená sběratelem e-mailů z ProjectCreatedByEmailCollector=Projekt vytvořený sběratelem e-mailů z e-mailu MSGID %s TicketCreatedByEmailCollector=Lístek vytvořený sběratelem e-mailů z e-mailu MSGID %s OpeningHoursFormatDesc=Pomocí a - oddělte otevírací a zavírací dobu. <br> Pomocí mezery zadejte různé rozsahy. <br> Příklad: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exportní plocha diff --git a/htdocs/langs/cs_CZ/products.lang b/htdocs/langs/cs_CZ/products.lang index 239f764a81b..9f144427c41 100644 --- a/htdocs/langs/cs_CZ/products.lang +++ b/htdocs/langs/cs_CZ/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Více cenových segmentů na produkt / službu (každý zákazník je v jednom cenovém segmentu) MultiPricesNumPrices=Počet cen DefaultPriceType=Základ cen za prodlení (s versus bez daně) při přidávání nových prodejních cen -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=Počet výchozích balení výrobku @@ -167,8 +168,10 @@ BuyingPrices=Nákupní ceny CustomerPrices=Zákaznické ceny SuppliersPrices=Ceny prodejců SuppliersPricesOfProductsOrServices=Ceny prodejců (produktů nebo služeb) -CustomCode=Kód cla / komodity / HS +CustomCode=Customs|Commodity|HS code CountryOrigin=Země původu +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Druh produktu (materiál / hotový) NatureOfProductShort=Druh produktu NatureOfProductDesc=Surovina nebo hotový produkt @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Použijte pevnou cenu PriceByQuantity=Různé ceny podle množství DisablePriceByQty=Zakázat ceny podle množství PriceByQuantityRange=Množstevní rozsah -MultipriceRules=Pravidla segmentu cen +MultipriceRules=Automatic prices for segment UseMultipriceRules=Použijte pravidla segmentu cen (definovaná v nastavení modulu produktu) pro automatické výpočty cen všech ostatních segmentů podle prvního segmentu PercentVariationOver=%% variace přes %s PercentDiscountOver=%% sleva na %s diff --git a/htdocs/langs/cs_CZ/projects.lang b/htdocs/langs/cs_CZ/projects.lang index e75df1f5d9e..88f500f0753 100644 --- a/htdocs/langs/cs_CZ/projects.lang +++ b/htdocs/langs/cs_CZ/projects.lang @@ -76,15 +76,16 @@ MyActivities=Moje úkoly / činnosti MyProjects=Moje projekty MyProjectsArea=Moje projekty Oblast DurationEffective=Efektivní doba trvání -ProgressDeclared=Hlášený progres +ProgressDeclared=Declared real progress TaskProgressSummary=Průběh úkolu CurentlyOpenedTasks=Aktuálně otevřené úkoly -TheReportedProgressIsLessThanTheCalculatedProgressionByX=Deklarovaný pokrok je menší %s než vypočtená progrese -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=Deklarovaný pokrok je více %s než vypočtená progrese -ProgressCalculated=Vypočítaný progres +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=se kterým jsem spojen WhichIamLinkedToProject=které jsem propojil s projektem Time=Čas +TimeConsumed=Consumed ListOfTasks=Seznam úkolů GoToListOfTimeConsumed=Přejít na seznam času spotřebovaného GanttView=Gantt View diff --git a/htdocs/langs/cs_CZ/recruitment.lang b/htdocs/langs/cs_CZ/recruitment.lang index e8f2b878873..e60db728965 100644 --- a/htdocs/langs/cs_CZ/recruitment.lang +++ b/htdocs/langs/cs_CZ/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/cs_CZ/sendings.lang b/htdocs/langs/cs_CZ/sendings.lang index 94d137ed4a6..61d599a95a7 100644 --- a/htdocs/langs/cs_CZ/sendings.lang +++ b/htdocs/langs/cs_CZ/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Další zásilky pro tuto objednávku SendingsAndReceivingForSameOrder=Zásilky a potvrzení o této objednávce SendingsToValidate=Zásilky se ověřují StatusSendingCanceled=Zrušený +StatusSendingCanceledShort=Zrušený StatusSendingDraft=Návrh StatusSendingValidated=Ověřené (výrobky pro dodávku nebo již dodány) StatusSendingProcessed=Zpracované @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=Nejprve musíte potvrdit objednávku před tím # Sending methods # ModelDocument DocumentModelTyphon=Více kompletních modelů dokumentů pro potvrzení o doručení (logo. ..) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Konstanta EXPEDITION_ADDON_NUMBER není definována SumOfProductVolumes=Součet objemu produktů SumOfProductWeights=Součet hmotnosti produktů diff --git a/htdocs/langs/cs_CZ/stocks.lang b/htdocs/langs/cs_CZ/stocks.lang index 25558173d1a..ef41559e9f1 100644 --- a/htdocs/langs/cs_CZ/stocks.lang +++ b/htdocs/langs/cs_CZ/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Nastavit sklad na prodejní objednávky UserDefaultWarehouse=Nastavit sklad na Uživatelé MainDefaultWarehouse=Výchozí sklad @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/cs_CZ/ticket.lang b/htdocs/langs/cs_CZ/ticket.lang index 83a4e3cd4e6..268ab00719c 100644 --- a/htdocs/langs/cs_CZ/ticket.lang +++ b/htdocs/langs/cs_CZ/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Vstupenka - Typy TicketDictCategory=Vstupenka - skupiny TicketDictSeverity=Vstupenka - závažnosti TicketDictResolution=Vstupenka - rozlišení -TicketTypeShortBUGSOFT=Logika Dysfonctionnement -TicketTypeShortBUGHARD=Dysfonctionnement matériel -nějaký mišmaš ??? -TicketTypeShortCOM=Obchodní otázka +TicketTypeShortCOM=Obchodní otázka TicketTypeShortHELP=Žádost o funkční pomoc TicketTypeShortISSUE=Problém, chyba nebo problém TicketTypeShortREQUEST=Žádost o změnu nebo vylepšení @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Jiný TicketSeverityShortLOW=Nízký TicketSeverityShortNORMAL=Normální TicketSeverityShortHIGH=Vysoký -TicketSeverityShortBLOCKING=Kritické / Blokování +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Pole '%s' nesprávné MenuTicketMyAssign=Moje jízdenky @@ -60,7 +58,6 @@ OriginEmail=Zdroj e-mailu Notify_TICKET_SENTBYMAIL=Odeslat e-mailem zprávu o lince # Status -NotRead=Nepřečetl Read=Číst Assigned=Přidělené InProgress=probíhá @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Veřejné rozhraní umožňuje všem návšt TicketsAutoAssignTicket=Automaticky přiřadit uživateli, který vytvořil lístek TicketsAutoAssignTicketHelp=Při tvorbě vstupenky může být uživateli automaticky přiřazen lístek. 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) @@ -233,7 +231,6 @@ TicketLogStatusChanged=Stav změněn: %s až %s TicketNotNotifyTiersAtCreate=Neinformovat společnost na vytvoření Unread=Nepřečtený TicketNotCreatedFromPublicInterface=Není dostupný. Vstupenka nebyla vytvořena z veřejného rozhraní. -PublicInterfaceNotEnabled=Veřejné rozhraní nebylo povoleno ErrorTicketRefRequired=Je vyžadován referenční název vstupenky # diff --git a/htdocs/langs/cs_CZ/website.lang b/htdocs/langs/cs_CZ/website.lang index cf30e5bd64d..1fb8d39059e 100644 --- a/htdocs/langs/cs_CZ/website.lang +++ b/htdocs/langs/cs_CZ/website.lang @@ -30,7 +30,6 @@ EditInLine=Úpravy v řádku AddWebsite=Přidat webovou stránku Webpage=Webová stránka / kontejner AddPage=Přidat stránku / kontejner -HomePage=Domovská stránka PageContainer=Strana PreviewOfSiteNotYetAvailable=Náhled vašeho webu <strong> %s </strong> zatím není k dispozici. Nejprve musíte '<strong> Importovat celou šablonu webových stránek </strong>' nebo jen '<strong> Přidat stránku / kontejner </strong>'. RequestedPageHasNoContentYet=Požadovaná stránka s ID %s nemá dosud žádný obsah nebo byl odstraněn soubor cache .tpl.php. Upravte obsah stránky pro vyřešení tohoto problému. @@ -101,7 +100,7 @@ EmptyPage=Prázdná stránka ExternalURLMustStartWithHttp=Externí adresa URL musí začít s http: // nebo https: // ZipOfWebsitePackageToImport=Nahrajte soubor ZIP balíčku šablony webové stránky ZipOfWebsitePackageToLoad=nebo Vyberte dostupný balíček integrovaných webových stránek -ShowSubcontainers=Zahrnout dynamický obsah +ShowSubcontainers=Show dynamic content InternalURLOfPage=Interní adresa URL stránky ThisPageIsTranslationOf=Tato stránka / kontejner je překladem ThisPageHasTranslationPages=Tato stránka / kontejner obsahuje překlad @@ -137,3 +136,4 @@ RSSFeedDesc=Pomocí této adresy URL můžete získat RSS kanál nejnovějších 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. diff --git a/htdocs/langs/cs_CZ/withdrawals.lang b/htdocs/langs/cs_CZ/withdrawals.lang index 1d5f1bb8ada..3e1ffcb7b3c 100644 --- a/htdocs/langs/cs_CZ/withdrawals.lang +++ b/htdocs/langs/cs_CZ/withdrawals.lang @@ -42,6 +42,7 @@ LastWithdrawalReceipt=Poslední %s přímého inkasa debetní MakeWithdrawRequest=Zadejte žádost o platbu inkasem MakeBankTransferOrder=Proveďte žádost o převod WithdrawRequestsDone=%s zaznamenané žádosti o inkaso +BankTransferRequestsDone=%s credit transfer requests recorded ThirdPartyBankCode=Kód banky subjektu NoInvoiceCouldBeWithdrawed=Žádná faktura nebyla odepsána úspěšně. Zkontrolujte, zda jsou faktury u společností s platným IBAN a zda má IBAN UMR (Unique Mandate Reference) s režimem <strong> %s </strong>. ClassCredited=Označit přidání kreditu @@ -131,7 +132,8 @@ SEPARCUR=SEPA CUR SEPAFRST=SEPA FRST ExecutionDate=Datum provedení CreateForSepa=Vytvořte soubor s inkasem -ICS=Identifikátor věřitele CI +ICS=Creditor Identifier CI for direct debit +ICSTransfer=Creditor Identifier CI for bank transfer END_TO_END="EndToEndId" SEPA XML tag - jedinečný identifikátor přiřazený ke každé transakci USTRD="Nestrukturovaná" značka SEPA XML ADDDAYS=Přidání dnů do data provedení @@ -146,3 +148,5 @@ InfoRejectSubject=Příkaz k inkasu odmítnut InfoRejectMessage=Dobrý den, <br> <br> příkaz k inkasu faktury %s týkající se společnosti %s, částkou %s, byla bankou odmítnuta. <br> <br> - <br> %s ModeWarning=Volba pro reálný režim nebyl nastaven, můžeme zastavit tuto simulaci ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorICSmissing=Missing ICS in Bank account %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/cs_CZ/workflow.lang b/htdocs/langs/cs_CZ/workflow.lang index 3e06aed94aa..748bd0e27d6 100644 --- a/htdocs/langs/cs_CZ/workflow.lang +++ b/htdocs/langs/cs_CZ/workflow.lang @@ -16,8 +16,10 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Klasifikujte propojenou prodejní o # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Označte návrh dodavatele propojeného zdroje jako fakturovaný při validaci dodavatele (a pokud je částka faktury shodná s celkovou částkou propojeného návrhu) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Zařadit propojenou objednávku zdroje jako fakturovanou fakturaci dodavatele (a pokud je částka faktury shodná s celkovou částkou propojené objednávky) -descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +descWORKFLOW_BILL_ON_RECEPTION=Po ověření objednávky propojeného dodavatele klasifikujte recepce na „účtované“ # Autoclose intervention -descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Když je lístek uzavřen, ukončete všechny zásahy spojené s lístkem AutomaticCreation=Automatická tvorba AutomaticClassification=Automatická klasifikace +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/da_DK/accountancy.lang b/htdocs/langs/da_DK/accountancy.lang index 3af2cf33fbc..4f65c3b5d02 100644 --- a/htdocs/langs/da_DK/accountancy.lang +++ b/htdocs/langs/da_DK/accountancy.lang @@ -16,6 +16,8 @@ ThisService=Denne ydelse ThisProduct=Dette produkt DefaultForService=forvalg ydelse DefaultForProduct=Forvalg produkt +ProductForThisThirdparty=Produkt til denne tredjepart +ServiceForThisThirdparty=Service for denne tredjepart CantSuggest=Kan ikke foreslå AccountancySetupDoneFromAccountancyMenu=Hovedparten af opsætningen for regnskabet sker fra menuen %s ConfigAccountingExpert=Konfiguration af modulregnskabet (dobbelt indtastning) @@ -48,6 +50,7 @@ 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. VueByAccountAccounting=Vis efter regnskabskonto +VueBySubAccountAccounting=Vis efter regnskabsmæssig underkonto MainAccountForCustomersNotDefined=Standardkonto for kunder, der ikke er defineret i opsætningen MainAccountForSuppliersNotDefined=Hoved kontokort for leverandører, der ikke er defineret i opsætningen @@ -144,7 +147,7 @@ NotVentilatedinAccount=Ikke bundet til regnskabskontoen XLineSuccessfullyBinded=%s varer/ydelser blev bundet til en regnskabskonto XLineFailedToBeBinded=%s varer/ydelser blev ikke bundet til en regnskabskonto -ACCOUNTING_LIMIT_LIST_VENTILATION=Antal elementer, der skal bindes vist efter side (maks. Anbefalet: 50) +ACCOUNTING_LIMIT_LIST_VENTILATION=Maksimalt antal linjer på listen og bind siden (anbefales: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Vis siden "Ikke bogførte linjer" med de nyeste poster først ACCOUNTING_LIST_SORT_VENTILATION_DONE=Vis siden "Ikke bogførte linjer" med de nyeste poster først @@ -198,7 +201,8 @@ Docdate=Dato Docref=Reference LabelAccount=Kontonavn LabelOperation=Bilagstekst -Sens=Sens +Sens=Retning +AccountingDirectionHelp=For en kundes regnskabskonto skal du bruge kredit til at registrere en betaling, du har modtaget <br>. For en leverandørs regnskabskonto skal du bruge Debet til at registrere en betaling, du foretager LetteringCode=Bogstaver kode Lettering=Skrift Codejournal=Kladde @@ -206,7 +210,8 @@ JournalLabel=Journalmærke NumPiece=Partsnummer TransactionNumShort=Transaktionsnr. AccountingCategory=Regnskabskontogrupper -GroupByAccountAccounting=Gruppér efter regnskabskonto +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. ByAccounts=Konti ByPredefinedAccountGroups=Efter foruddefinerede grupper @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Betaling er ikke knyttet til noget produkt / tjeneste OpeningBalance=Åbnings balance ShowOpeningBalance=Vis åbningsbalance HideOpeningBalance=Skjul åbningsbalancen -ShowSubtotalByGroup=Vis subtotal efter grupper +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Her vises listen over udgiftsrapporter linjer bundet (el DescVentilExpenseReportMore=Hvis du opsætter regnskabskonto på typen af ​​udgiftsrapporter, vil applikationen kunne foretage hele bindingen mellem dine udgiftsrapporter og kontoen for dit kontoplan, kun med et klik med knappen <strong> "%s" </strong>. Hvis kontoen ikke var angivet i gebyrordbog, eller hvis du stadig har nogle linjer, der ikke er bundet til nogen konto, skal du lave en manuel binding fra menuen "<strong> %s</strong>". DescVentilDoneExpenseReport=Her vises listen over linjerne for udgiftsrapporter og deres gebyrkonto +Closure=Årlig lukning DescClosure=Se her antallet af bevægelser pr. Måned, der ikke er valideret og regnskabsår, der allerede er åbent OverviewOfMovementsNotValidated=Trin 1 / Oversigt over bevægelser, der ikke er valideret. (Nødvendigt at lukke et regnskabsår) +AllMovementsWereRecordedAsValidated=Alle bevægelser blev registreret som godkendt +NotAllMovementsCouldBeRecordedAsValidated=Ikke alle bevægelser kunne registreres som godkendt ValidateMovements=Valider bevægelser DescValidateMovements=Enhver ændring eller sletning af skrivning, bogstaver og sletning er forbudt. Alle poster til en øvelse skal valideres, ellers er lukning ikke mulig -SelectMonthAndValidate=Vælg måned og valider bevægelser ValidateHistory=Automatisk Bogføring AutomaticBindingDone=Automatisk Bogføring @@ -293,6 +300,7 @@ Accounted=Regnskab i hovedbog NotYetAccounted=Endnu ikke indregnet i hovedbog ShowTutorial=Vis selvstudie NotReconciled=Ikke afstemt +WarningRecordWithoutSubledgerAreExcluded=Advarsel, alle handlinger uden underskrevet konto defineret filtreres og udelukkes fra denne visning ## Admin BindingOptions=Bindende muligheder @@ -337,6 +345,7 @@ Modelcsv_LDCompta10=Eksport til LD Compta (v10 og nyere) Modelcsv_openconcerto=Eksport til OpenConcerto (Test) Modelcsv_configurable=Eksporter CSV Konfigurerbar Modelcsv_FEC=Eksport FEC +Modelcsv_FEC2=Eksport FEC (med datagenereringsskrivning / omvendt dokument) Modelcsv_Sage50_Swiss=Eksport til Sage 50 Schweiz Modelcsv_winfic=Eksport Winfic - eWinfic - WinSis Compta Modelcsv_Gestinumv3=Eksport til Gestinum (v3) diff --git a/htdocs/langs/da_DK/admin.lang b/htdocs/langs/da_DK/admin.lang index d7714c0c1df..57b913ae14a 100644 --- a/htdocs/langs/da_DK/admin.lang +++ b/htdocs/langs/da_DK/admin.lang @@ -56,6 +56,8 @@ GUISetup=Udseende SetupArea=Indstillinger UploadNewTemplate=Upload nye skabelon(er) FormToTestFileUploadForm=Formular til test af fil upload (ifølge opsætning) +ModuleMustBeEnabled=Modulet / applikationen <b> %s </b> skal være aktiveret +ModuleIsEnabled=Modulet / applikationen <b> %s </b> er blevet aktiveret 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. @@ -85,7 +87,6 @@ ShowPreview=Vis forhåndsvisning ShowHideDetails=Vis skjul detaljer PreviewNotAvailable=Preview ikke tilgængeligt ThemeCurrentlyActive=Tema aktuelt aktive -CurrentTimeZone=Aktuelle tidszone MySQLTimeZone=Tidszone MySql (database) TZHasNoEffect=Datoer gemmes og returneres af databaseserveren som om de blev holdt som sendt streng. Tidszonen har kun virkning, når du bruger UNIX_TIMESTAMP-funktionen (som ikke skal bruges af Dolibarr, så databasen TZ skal ikke have nogen effekt, selvom den er ændret efter indtastning af data). Space=Mellemrum @@ -153,8 +154,8 @@ 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 midlertidige filer (ingen risiko for at miste data). Bemærk: Sletning udføres kun, hvis "temp" biblioteket blev oprettet for 24 timer siden. -PurgeDeleteTemporaryFilesShort=Slet midlertidige filer +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. +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 PurgeNothingToDelete=Ingen mappe eller filer, der skal slettes. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Foretrukne partnere OtherResources=Andre ressourcer ExternalResources=Eksterne ressourcer SocialNetworks=Sociale netværk +SocialNetworkId=Socialt netværk ID ForDocumentationSeeWiki=For brugerens eller bygherren dokumentation (doc, FAQs ...), <br> tage et kig på Dolibarr Wiki: <br> <a href="%s" target="_blank"><b> %s</b></a> ForAnswersSeeForum=For alle andre spørgsmål / hjælpe, kan du bruge Dolibarr forum: <br> <a href="%s" target="_blank"><b> %s</b></a> HelpCenterDesc1=Her er nogle ressourcer til at få hjælp og support med Dolibarr. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Eksempler med den nuværende konfiguration ListOfDirectories=Liste over OpenDocument-skabeloner mapper ListOfDirectoriesForModelGenODT=Liste over mapper, som indeholder skabeloner filer med OpenDocument format.<br><br>her fulde sti til mapper.<br>Føjer vognretur mellem eah mappe.<br / >for At tilføje en mappe af GED modul, tilføje her <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b>.<br><br>Filer i disse mapper skal ende med <b>.odt</b> eller <b>.ods</b>. NumberOfModelFilesFound=Antal ODT / ODS-template filer, der findes i disse mapper -ExampleOfDirectoriesForModelGen=Eksempler på syntaks: <br> c: \\ mydir <br> / Home / mydir <br> DOL_DATA_ROOT / ECM / ecmdir +ExampleOfDirectoriesForModelGen=Eksempler på syntaks: <br> c: \\ myapp \\ mydocumentdir \\ mysubdir <br> / home / myapp / mydocumentdir / mysubdir <br> DOL_DATA_ROOT / ecm / ecmdir FollowingSubstitutionKeysCanBeUsed=<br> At vide hvordan du opretter dine odt dokumentskabeloner, før gemme dem i disse mapper, skal du læse wiki dokumentation: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Placering af fornavn / navn @@ -406,7 +408,7 @@ UrlGenerationParameters=Parametre for at sikre URL'er SecurityTokenIsUnique=Brug en unik securekey parameter for hver enkelt webadresse EnterRefToBuildUrl=Indtast reference for objekter %s GetSecuredUrl=Få beregnet URL -ButtonHideUnauthorized=Skjul knapper til brugere uden for administrasjon for uautoriserede handlinger i stedet for at vise gråaktiverede knapper +ButtonHideUnauthorized=Skjul uautoriserede handlingsknapper også for interne brugere (bare ellers gråtonet) OldVATRates=Gammel momssats NewVATRates=Ny momssats PriceBaseTypeToChange=Rediger priser med basisreferenceværdi defineret på @@ -668,7 +670,7 @@ Module54000Desc=Direkte udskrivning (uden at åbne dokumenterne) ved hjælp af I Module55000Name=Afstemning, Undersøgelse eller Afstemning Module55000Desc=Opret online afstemninger, undersøgelser eller stemmer (som Doodle, Studs, RDVz osv. ..) Module59000Name=Margin -Module59000Desc=Modul til at styre avancer +Module59000Desc=Modul til at følge margener Module60000Name=Kommissioner Module60000Desc=Modul til at håndtere Kommissioner Module62000Name=Incoterms @@ -1306,7 +1308,7 @@ YouUseBestDriver=Du bruger driver %s, som er den bedste driver, der for øjeblik YouDoNotUseBestDriver=Du bruger driveren %s, men driveren %s anbefales. NbOfObjectIsLowerThanNoPb=Du har kun %s %s i databasen. Dette kræver ingen særlig optimering. SearchOptim=Søg optimering -YouHaveXObjectUseSearchOptim=Du har %s %s i databasen. Du skal tilføje den konstante %s til 1 i Home-Setup-Other. Begræns søgningen til begyndelsen af strenge, hvilket gør det muligt for databasen at bruge indekser, og du skal få et øjeblikkeligt svar. +YouHaveXObjectUseSearchOptim=Du har %s %s i databasen. Du kan tilføje konstanten %s til 1 i Hjem-Setup-Andre. Begræns søgningen til begyndelsen af strenge, som gør det muligt for databasen at bruge indekser, og du skal få et øjeblikkeligt svar. YouHaveXObjectAndSearchOptimOn=Du har %s %s i databasen, og konstant %s er indstillet til 1 i Home-Setup-Other. BrowserIsOK=Du bruger browseren %s. Denne browser er ok for sikkerhed og ydeevne. BrowserIsKO=Du bruger browseren %s. Denne browser er kendt for at være et dårligt valg for sikkerhed, ydeevne og pålidelighed. Vi anbefaler at bruge Firefox, Chrome, Opera eller Safari. @@ -1596,8 +1598,13 @@ ServiceSetup=Installation af servicemoduler ProductServiceSetup=Opsætning af Varer/ydelser-modul NumberOfProductShowInSelect=Maksimalt antal produkter, der skal vises i kombinationsvalglister (0 = ingen grænse) ViewProductDescInFormAbility=Vis produktbeskrivelser i formularer (ellers vist i en værktøjstip-popup) +DoNotAddProductDescAtAddLines=Tilføj ikke produktbeskrivelse (fra produktkort) på indsend tilføjelseslinjer på formularer +OnProductSelectAddProductDesc=Sådan bruges beskrivelsen af produkterne, når du tilføjer et produkt som en linje i et dokument +AutoFillFormFieldBeforeSubmit=Udfyld automatisk indtastningsfeltet med beskrivelsen af produktet +DoNotAutofillButAutoConcat=Udfyld ikke indtastningsfeltet automatisk med produktbeskrivelse. Produktbeskrivelsen sammenkædes automatisk med den indtastede beskrivelse. +DoNotUseDescriptionOfProdut=Produktbeskrivelse vil aldrig blive inkluderet i beskrivelsen af dokumentlinjer MergePropalProductCard=Aktivér i produkt / tjeneste Vedhæftede filer fanen en mulighed for at fusionere produkt PDF-dokument til forslag PDF azur hvis produkt / tjeneste er i forslaget -ViewProductDescInThirdpartyLanguageAbility=Vis produktbeskrivelser på tredjeparts sprog +ViewProductDescInThirdpartyLanguageAbility=Vis produktbeskrivelser i formularer på tredjeparts sprog (ellers på brugerens sprog) UseSearchToSelectProductTooltip=Også hvis du har et stort antal produkter (> 100 000), kan du øge hastigheden ved at indstille konstant PRODUCT_DONOTSEARCH_ANYWHERE til 1 i Setup-> Other. Søgningen er så begrænset til starten af ​​strengen. UseSearchToSelectProduct=Vent, indtil du trykker på en tast, inden du læser indholdet af produktkombinationslisten (dette kan øge ydeevnen, hvis du har et stort antal produkter, men det er mindre praktisk) SetDefaultBarcodeTypeProducts=Standard stregkodetype, der skal bruges til varer @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personlige menuer, der ikke er knyttet til en topmenu NewMenu=Ny menu MenuHandler=Menu handling MenuModule=Kilde modul -HideUnauthorizedMenu= Skjul uautoriserede menuer (grå) +HideUnauthorizedMenu=Skjul uautoriserede menuer også for interne brugere (bare gråtonet ellers) DetailId=Id menuen DetailMenuHandler=Menu handling, hvor der viser ny menu DetailMenuModule=Modul navn, hvis menuen indrejse kommer fra et modul @@ -1983,11 +1990,12 @@ EMailHost=Vært af e-mail-IMAP-server MailboxSourceDirectory=Postkasse kilde bibliotek MailboxTargetDirectory=Postkasse målkatalog EmailcollectorOperations=Operationer at gøre af samleren +EmailcollectorOperationsDesc=Opgaver udføres fra øverste til nederste ordre MaxEmailCollectPerCollect=Maks antal Emails indsamlet pr. Samling CollectNow=Indsamle nu ConfirmCloneEmailCollector=Er du sikker på, at du vil klone Email samleren %s? -DateLastCollectResult=Dato seneste indsamlet prøvet -DateLastcollectResultOk=Dato seneste indsamling succesfuld +DateLastCollectResult=Dato for seneste indsamlingsforsøg +DateLastcollectResultOk=Dato for seneste succes med indsamling LastResult=Seneste resultat EmailCollectorConfirmCollectTitle=Email samle bekræftelse EmailCollectorConfirmCollect=Vil du køre kollektionen for denne samler nu? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Besked fra en samtale startet af en første e-mail sendt fra D WithoutDolTrackingID=Besked fra en samtale startet af en første e-mail, der IKKE blev sendt fra Dolibarr WithDolTrackingIDInMsgId=Besked sendt fra Dolibarr WithoutDolTrackingIDInMsgId=Besked IKKE sendt fra Dolibarr -CreateCandidature=Opret kandidatur +CreateCandidature=Opret jobansøgning FormatZip=Postnummer MainMenuCode=Menu indtastningskode (hovedmenu) ECMAutoTree=Vis automatisk ECM-træ @@ -2083,3 +2091,7 @@ 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. 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 diff --git a/htdocs/langs/da_DK/banks.lang b/htdocs/langs/da_DK/banks.lang index add4d042a86..c1fb2a83106 100644 --- a/htdocs/langs/da_DK/banks.lang +++ b/htdocs/langs/da_DK/banks.lang @@ -173,10 +173,11 @@ SEPAMandate=SEPA mandat 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 kontant terminal -NewCashFence=Nyt kontanthegn +CashControl=POS kasse apparats kontrol +NewCashFence=Ny kasse apparat 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 diff --git a/htdocs/langs/da_DK/bills.lang b/htdocs/langs/da_DK/bills.lang index a996f7a199a..07502e953de 100644 --- a/htdocs/langs/da_DK/bills.lang +++ b/htdocs/langs/da_DK/bills.lang @@ -207,7 +207,7 @@ UnvalidateBill=Fjern godkendelse af faktura NumberOfBills=Antal fakturaer NumberOfBillsByMonth=Antal fakturaer pr. Måned AmountOfBills=Mængden af fakturaer -AmountOfBillsHT=Fakturabeløb (ekskl. Skat) +AmountOfBillsHT=Fakturabeløb (ekskl. moms) AmountOfBillsByMonthHT=Mængden af ​​fakturaer efter måned (ekskl. moms) UseSituationInvoices=Tillad midlertidig faktura UseSituationInvoicesCreditNote=Tillad midlertidig faktura kreditnota @@ -531,6 +531,7 @@ TypeContact_invoice_supplier_external_SERVICE=Leverandørens kontakt InvoiceFirstSituationAsk=Første faktura InvoiceFirstSituationDesc=<B> Situationsfakturaerne </b> er bundet til situationer, der er relateret til en progression, for eksempel fremdriften af ​​en konstruktion. Hver situation er bundet til en faktura. InvoiceSituation=Kontoudtog +PDFInvoiceSituation=Kontoudtog InvoiceSituationAsk=Faktura efter kontoudtog InvoiceSituationDesc=Opret en ny situation efter en allerede eksisterende SituationAmount=Kontoudtog beløb (netto) @@ -575,3 +576,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Leverandørfaktura slettet UnitPriceXQtyLessDiscount=Enhedspris x Antal - Rabat CustomersInvoicesArea=Kunde fakturerings område SupplierInvoicesArea=Leverandør fakturerings område +FacParentLine=Faktura Line Parent +SituationTotalRayToRest=Resten til at betale uden skat +PDFSituationTitle=Situation nr. %d +SituationTotalProgress=Samlet fremskridt %d %% diff --git a/htdocs/langs/da_DK/blockedlog.lang b/htdocs/langs/da_DK/blockedlog.lang index 186fadbf852..cc7298bf441 100644 --- a/htdocs/langs/da_DK/blockedlog.lang +++ b/htdocs/langs/da_DK/blockedlog.lang @@ -35,7 +35,7 @@ logDON_DELETE=Donation logisk sletning logMEMBER_SUBSCRIPTION_CREATE=Medlem abonnement oprettet logMEMBER_SUBSCRIPTION_MODIFY=Medlems abonnement ændret logMEMBER_SUBSCRIPTION_DELETE=Medlems abonnement logisk sletning -logCASHCONTROL_VALIDATE=Registrering af kontanthegn +logCASHCONTROL_VALIDATE=Optagelse ved lukning af kasse apparatet BlockedLogBillDownload=Kundefaktura download BlockedLogBillPreview=Kunde faktura preview BlockedlogInfoDialog=Log detaljer diff --git a/htdocs/langs/da_DK/boxes.lang b/htdocs/langs/da_DK/boxes.lang index 1481c03b97f..dfa01d60748 100644 --- a/htdocs/langs/da_DK/boxes.lang +++ b/htdocs/langs/da_DK/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=Latest %s modified donations BoxTitleLastModifiedExpenses=Latest %s modified expense reports BoxTitleLatestModifiedBoms=Nyeste %s modificerede styklister BoxTitleLatestModifiedMos=Seneste %s ændrede produktionsordrer +BoxTitleLastOutstandingBillReached=Kunder med maksimalt udestående overskredet BoxGlobalActivity=Global activity (invoices, proposals, orders) BoxGoodCustomers=Good customers BoxTitleGoodCustomers=%s Good customers +BoxScheduledJobs=Scheduled jobs +BoxTitleFunnelOfProspection=Blytragt FailedToRefreshDataInfoNotUpToDate=Kunne ikke opdatere RSS-flux. Seneste succesfulde opdateringsdato: %s LastRefreshDate=Latest refresh date NoRecordedBookmarks=Ingen bogmærker defineret. @@ -83,8 +86,8 @@ BoxTitleLatestModifiedSupplierOrders=Leverandør Ordrer: senest %s ændret BoxTitleLastModifiedCustomerBills=Kundefakturaer: sidst %s ændret BoxTitleLastModifiedCustomerOrders=Salgsordrer: sidst %s ændret BoxTitleLastModifiedPropals=Seneste %s tilrettede tilbud -BoxTitleLatestModifiedJobPositions=Latest %s modified jobs -BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures +BoxTitleLatestModifiedJobPositions=Seneste %s ændrede job +BoxTitleLatestModifiedCandidatures=Seneste %s ændrede kandidaturer ForCustomersInvoices=Kundernes fakturaer ForCustomersOrders=Customers orders ForProposals=Tilbud @@ -92,8 +95,8 @@ LastXMonthRolling=The latest %s month rolling ChooseBoxToAdd=Add widget to your dashboard BoxAdded=Box blev tilføjet til dit instrumentbræt BoxTitleUserBirthdaysOfMonth=Fødselsdage i denne måned (brugere) -BoxLastManualEntries=Sidste manuelle poster i regnskab -BoxTitleLastManualEntries=%s seneste manuelle indtastninger +BoxLastManualEntries=Seneste post i regnskab indtastet manuelt eller uden kildedokument +BoxTitleLastManualEntries=%s seneste post indtastet manuelt eller uden kildedokument NoRecordedManualEntries=Der er ikke registreret nogen manuelle poster i regnskab BoxSuspenseAccount=Tæl regnskab drift med midlertidig konto BoxTitleSuspenseAccount=Antal ikke-tildelte linjer @@ -102,5 +105,7 @@ SuspenseAccountNotDefined=Midlertidig konto er ikke defineret BoxLastCustomerShipments=Sidste kunde forsendelser BoxTitleLastCustomerShipments=Nyeste %s forsendelser kunde NoRecordedShipments=Ingen registreret kundeforsendelse +BoxCustomersOutstandingBillReached=Kunder med en udestående grænse nået # Pages AccountancyHome=Bogføring +ValidatedProjects=Validerede projekter diff --git a/htdocs/langs/da_DK/cashdesk.lang b/htdocs/langs/da_DK/cashdesk.lang index bcba80e2087..9f5abd81617 100644 --- a/htdocs/langs/da_DK/cashdesk.lang +++ b/htdocs/langs/da_DK/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Sidefod AmountAtEndOfPeriod=Beløb ved udgangen af perioden (dag, måned eller år) TheoricalAmount=Teoretisk mængde RealAmount=Reelt beløb -CashFence=Kontant begrænsning -CashFenceDone=Cash fence gjort for perioden +CashFence=Lukning af kasseapperat +CashFenceDone=Lukning af kasseapparat udført for perioden NbOfInvoices=Antal fakturaer Paymentnumpad=numerisk tastatur til at indtaste betaling Numberspad=Numerisk tastatur @@ -77,7 +77,7 @@ POSModule=POS Modulet BasicPhoneLayout=Brug grundlæggende layout til telefoner SetupOfTerminalNotComplete=Opsætning af terminal %s er ikke afsluttet DirectPayment=Direkte betaling -DirectPaymentButton=Add a "Direct cash payment" button +DirectPaymentButton=Tilføj en "Direkte kontant betaling" -knap InvoiceIsAlreadyValidated=Fakturaen er allerede valideret NoLinesToBill=Ingen linjer til fakturering CustomReceipt=Tilpasset kvittering @@ -94,13 +94,14 @@ TakeposConnectorMethodDescription=Eksternt modul med ekstra funktioner. Mulighed PrintMethod=Udskrivningsmetode ReceiptPrinterMethodDescription=Kraftig metode med en masse parametre. Fuld tilpasning med skabeloner. Kan ikke udskrive fra cloud. ByTerminal=Med terminal -TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad +TakeposNumpadUsePaymentIcon=Brug ikonet i stedet for tekst på betalingsknapperne på numpad CashDeskRefNumberingModules=Nummereringsmodul til POS-salg CashDeskGenericMaskCodes6 = <br><b>{TN}</b> tag bruges til at tilføje terminal nummere TakeposGroupSameProduct=Grupper sammen produktlinjer StartAParallelSale=Start et nyt parallelt salg -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Luk kontantindhold +SaleStartedAt=Salget startede den %s +ControlCashOpening=Kontroller kontant beholdning ved åbning af POS +CloseCashFence=Luk kontrol af kasseapparatet CashReport=Kontantrapport MainPrinterToUse=Fortrukket printer til brug OrderPrinterToUse=Bestil printer, der skal bruges @@ -117,8 +118,9 @@ HideCategoryImages=Skjul Kategori billeder HideProductImages=Skjul produktbilleder NumberOfLinesToShow=Antal linjer af billeder, der skal vises DefineTablePlan=Definer tabeller planlægger -GiftReceiptButton=Add a "Gift receipt" button -GiftReceipt=Gift receipt -ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first -AllowDelayedPayment=Allow delayed payment -PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts +GiftReceiptButton=Tilføj en "gavekvittering" -knap +GiftReceipt=Gavekvittering +ModuleReceiptPrinterMustBeEnabled=Modul kvitterings printer skal først være aktiveret +AllowDelayedPayment=Tillad forsinket betaling +PrintPaymentMethodOnReceipts=Udskriv betalingsmetode på billetter | kvitteringer +WeighingScale=Vægt skala diff --git a/htdocs/langs/da_DK/categories.lang b/htdocs/langs/da_DK/categories.lang index 18b12b53318..881d4fe22c6 100644 --- a/htdocs/langs/da_DK/categories.lang +++ b/htdocs/langs/da_DK/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=Projekter tags/kategorier område UsersCategoriesArea=Brugere tags / kategorier område SubCats=Sub-kategorier CatList=Liste over tags/kategorier +CatListAll=Liste over tags / kategorier (alle typer) NewCategory=Nyt tag/kategori ModifCat=Rediger tag/kategori CatCreated=Tag/kategori oprettet @@ -65,16 +66,22 @@ UsersCategoriesShort=Brugere tags / kategorier StockCategoriesShort=Lagermærker / kategorier ThisCategoryHasNoItems=Denne kategori indeholder ikke nogen produkter. CategId=Tag/kategori id -CatSupList=Liste over leverandør tags / kategorier -CatCusList=Liste over kunde/potentiel kunde tags/kategorier +ParentCategory=Overordnet tag / kategori +ParentCategoryLabel=Mærke for overordnet tag / kategori +CatSupList=Liste over leverandørmærker / kategorier +CatCusList=Liste over kunder / potentielle tags / kategorier CatProdList=Liste over tags/kategorier for varer CatMemberList=Liste over medlemmer tags/kategorier -CatContactList=Liste over kontaktmærker/kategorier -CatSupLinks=Links mellem leverandører og tags/kategorier +CatContactList=Liste over kontaktkoder / kategorier +CatProjectsList=Liste over projekter tags / kategorier +CatUsersList=Liste over brugers tags / kategorier +CatSupLinks=Links mellem leverandører og tags / kategorier CatCusLinks=Links mellem kunder/potentielle kunder og tags/kategorier CatContactsLinks=Links mellem kontakter / adresser og tags / kategorier CatProdLinks=Links mellem varer/ydelser og tags/kategorier -CatProJectLinks=Links mellem projekter og tags/kategorier +CatMembersLinks=Links mellem medlemmer og tags / kategorier +CatProjectsLinks=Links mellem projekter og tags/kategorier +CatUsersLinks=Links mellem brugere og tags / kategorier DeleteFromCat=Fjern fra tags/kategori ExtraFieldsCategories=Supplerende attributter CategoriesSetup=Tags/kategorier opsætning diff --git a/htdocs/langs/da_DK/companies.lang b/htdocs/langs/da_DK/companies.lang index 76b286db769..c01f19fef89 100644 --- a/htdocs/langs/da_DK/companies.lang +++ b/htdocs/langs/da_DK/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Kontroller moms nummer på EU webside VATIntraManualCheck=Du kan også tjekke manuelt på Europa-Kommissionens websted <a href="%s" target="_blank"> %s </a> ErrorVATCheckMS_UNAVAILABLE=Kontrol er ikke muligt. Denne service leveres ikke af medlemsstaten (%s). NorProspectNorCustomer=Ikke mulighedder eller kunde -JuridicalStatus=Juridisk enhedstype +JuridicalStatus=Forretningsenhedstype Workforce=Arbejdskraft Staff=Medarbejdere ProspectLevelShort=Potentiale diff --git a/htdocs/langs/da_DK/compta.lang b/htdocs/langs/da_DK/compta.lang index 22641410445..67d0f186df3 100644 --- a/htdocs/langs/da_DK/compta.lang +++ b/htdocs/langs/da_DK/compta.lang @@ -111,7 +111,7 @@ Refund=Tilbagebetaling SocialContributionsPayments=Betalinger af skat/afgift ShowVatPayment=Vis momsbetaling TotalToPay=At betale i alt -BalanceVisibilityDependsOnSortAndFilters=Balancen er kun synlig i denne liste, hvis tabellen sorteres stigende på %s og filtreret til 1 bankkonto +BalanceVisibilityDependsOnSortAndFilters=Saldo er kun synlig på denne liste, hvis tabellen er sorteret på %s og filtreret på 1 bankkonto (uden andre filtre) CustomerAccountancyCode=Regnskabskode for kunde SupplierAccountancyCode=Sælgers regnskabskode CustomerAccountancyCodeShort=Cust. konto. kode @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Er du sikker på, at du vil slette denne betalin ExportDataset_tax_1=Betalinger af skatter/afgifter CalcModeVATDebt=Indstilling <b> %sMoms på forpligtelseskonto%s </b>. CalcModeVATEngagement=Mode <b> %sVAT på indkomst-udgifter%s </ b>. -CalcModeDebt=Analyse af kendte registrerede fakturaer, selvom de endnu ikke er bogført i hovedbogen. +CalcModeDebt=Analyse af kendte registrerede dokumenter, selvom de endnu ikke er bogført i hovedbogen. CalcModeEngagement=Analyse af kendte registrerede betalinger, selvom de endnu ikke er indregnet i hovedbogen. CalcModeBookkeeping=Analyse af data journaliseret i bogførings tabelen. CalcModeLT1= Mode <b> %sRE på kundefakturaer - leverandører invoices%s </b> @@ -154,10 +154,10 @@ AnnualSummaryInputOutputMode=Balance mellem indtægter og udgifter, årligt samm AnnualByCompanies=Indkomst- og udgiftsbalance, pr. Foruddefinerede regnskabet AnnualByCompaniesDueDebtMode=Indkomst- og udgiftsbalance, detaljer ved foruddefinerede grupper, tilstand <b> %sClaims-Debts%s </b> sagde <b> Forpligtelsesregnskab </b>. AnnualByCompaniesInputOutputMode=Indkomst- og udgiftsbalance, detaljer ved foruddefinerede grupper, tilstand <b> %sIncomes-Expenses%s </b> sagde <b> kontantregnskab </b>. -SeeReportInInputOutputMode=Se %sanalyse af betaling%s for en beregning af faktiske betalinger foretaget, selvom de endnu ikke er opført i hovedbogen. -SeeReportInDueDebtMode=Se %sanalyse af faktura%s for en beregning baseret på kendte registrerede fakturaer, selvom de endnu ikke er opført i hovedbogen. -SeeReportInBookkeepingMode=Se <b> %skassekladde report%s </b> til en beregning på <b> kasssekladdens tabelen </b> -RulesAmountWithTaxIncluded=- De viste beløb er med alle inkl. moms +SeeReportInInputOutputMode=Se <b> %sanalyse af betalinger%s </b> for en beregning baseret på <b> registrerede betalinger </b> foretaget, selvom de endnu ikke er registreret i Ledger +SeeReportInDueDebtMode=Se <b> %sanalyse af registrerede dokumenter%s </b> for en beregning baseret på kendt <b> registrerede dokumenter </b> selvom de endnu ikke er registreret +SeeReportInBookkeepingMode=Se <b> %sanalyse af bogholderibillede table%s </b> for en rapport baseret på <b> Bogholderibord </b> +RulesAmountWithTaxIncluded=- De viste beløb er inkl. moms og afgifter RulesResultDue=- Det inkluderer udestående fakturaer, udgifter, moms, donationer, uanset om de er betalt eller ej. Indeholder også betalte lønninger.<br> - Det er baseret på faktureringens fakturadato og på forfaldsdato for udgifter eller skattebetalinger. For lønninger, der er defineret med lønningsmodulet, bruges betalingsdato. RulesResultInOut=- Den omfatter de reelle betalinger foretaget på fakturaer, udgifter, moms og løn. <br> - Det er baseret på betalingsdatoer for fakturaer, udgifter, moms og løn. Donationsdatoen for donation. RulesCADue=- Det inkluderer kundens forfaldne fakturaer, uanset om de er betalt eller ej.<br> - Det er baseret på faktureringsdatoen for disse fakturaer.<br> @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=Det viser kontoer i din hovedbog med regnskab SeePageForSetup=Se menuen <a href="%s"> %s </a> til opsætning DepositsAreNotIncluded=- Betalingsfakturaer er ikke inkluderet DepositsAreIncluded=- Fakturaer med forudbetaling er inkluderet +LT1ReportByMonth=Skat 2-rapport efter måned +LT2ReportByMonth=Skat 3-rapport efter måned LT1ReportByCustomers=Indberette skat 2 af tredjepart LT2ReportByCustomers=Indberette skat 3 af tredjepart LT1ReportByCustomersES=Rapport fra tredjemand RE LT2ReportByCustomersES=Rapport fra tredjepart IRPF VATReport=Salgsskat rapport VATReportByPeriods=Salgsskat rapport efter periode +VATReportByMonth=Salgsmoms rapport efter måned VATReportByRates=Salgsskat rapport med satser VATReportByThirdParties=Salgsskatterapport fra tredjepart VATReportByCustomers=Salgsskat rapport af kunde diff --git a/htdocs/langs/da_DK/cron.lang b/htdocs/langs/da_DK/cron.lang index af3f09161a9..ed3fbc88478 100644 --- a/htdocs/langs/da_DK/cron.lang +++ b/htdocs/langs/da_DK/cron.lang @@ -7,13 +7,14 @@ Permission23103 = Delete Scheduled job Permission23104 = Execute Scheduled job # Admin CronSetup=Planlagt opsætning af jobstyring -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=Or to check and launch a specific job +URLToLaunchCronJobs=URL til at kontrollere og starte kvalificerede cron-job fra en browser +OrToLaunchASpecificJob=Eller for at kontrollere og starte et bestemt job fra en browser KeyForCronAccess=Security key for URL to launch cron jobs FileToLaunchCronJobs=Kommandolinje for at kontrollere og starte kvalificerede cron-job CronExplainHowToRunUnix=On Unix environment you should use the following crontab entry to run the command line each 5 minutes CronExplainHowToRunWin=På Microsoft (tm) Windows-miljø kan du bruge Scheduled Task-værktøjer til at køre kommandolinjen hvert 5. minut CronMethodDoesNotExists=Class %s does not contains any method %s +CronMethodNotAllowed=Metode %s af klasse %s er i sortliste over forbudte metoder CronJobDefDesc=Cron-jobprofiler er defineret i modulbeskrivelsesfilen. Når modulet er aktiveret, er de indlæst og tilgængeligt, så du kan administrere jobene fra adminværktøjsmenuen %s. CronJobProfiles=Liste over forud definerede cron jobprofiler # Menu @@ -46,6 +47,7 @@ CronNbRun=Antal lanceringer CronMaxRun=Maksimalt antal lanceringer CronEach=Every JobFinished=Job startet og gennemført +Scheduled=Planlagt #Page card CronAdd= Add jobs CronEvery=Execute job each @@ -56,7 +58,7 @@ CronNote=Kommentar CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status ved modul installation -CronStatusActiveBtn=Enable +CronStatusActiveBtn=Tidsplan CronStatusInactiveBtn=Deaktivere CronTaskInactive=This job is disabled CronId=Id @@ -82,3 +84,8 @@ MakeLocalDatabaseDumpShort=Local database backup MakeLocalDatabaseDump=Opret en lokal database dump. Parametre er: komprimering ('gz' eller 'bz' eller 'ingen'), backup type ('mysql', 'pgsql', 'auto'), 1, 'auto' eller filnavn til opbygning, antal backupfiler 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=Datarenser og anonymizer +JobXMustBeEnabled=Job %s skal være aktiveret +# Cron Boxes +LastExecutedScheduledJob=Sidste udførte planlagte job +NextScheduledJobExecute=Næste planlagte job, der skal udføres +NumberScheduledJobError=Antal planlagte job med fejl diff --git a/htdocs/langs/da_DK/errors.lang b/htdocs/langs/da_DK/errors.lang index 9306acbcee1..96148c9c1a8 100644 --- a/htdocs/langs/da_DK/errors.lang +++ b/htdocs/langs/da_DK/errors.lang @@ -1,12 +1,14 @@ # Dolibarr language file - Source file is en_US - errors # No errors -NoErrorCommitIsDone=No error, we commit +NoErrorCommitIsDone=Ingen fejl, vi begår # Errors ErrorButCommitIsDone=Errors found but we validate despite this ErrorBadEMail=E-mail%s er forkert +ErrorBadMXDomain=E-mail %s virker forkert (domæne har ingen gyldig MX-post) ErrorBadUrl=Url %s er forkert ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing. +ErrorRefAlreadyExists=Reference <b> %s </b> findes allerede. ErrorLoginAlreadyExists=Log ind %s eksisterer allerede. ErrorGroupAlreadyExists=Gruppe %s eksisterer allerede. ErrorRecordNotFound=Optag ikke fundet. @@ -48,6 +50,7 @@ ErrorFieldsRequired=Nogle krævede felter ikke var fyldt. ErrorSubjectIsRequired=Emne er påkrævet ErrorFailedToCreateDir=Det lykkedes ikke at oprette en mappe. Kontroller, at web-serveren bruger har tilladelse til at skrive i Dolibarr dokumenter bibliotek. Hvis parameter <b>safe_mode</b> er aktiveret på dette PHP, kontrollere, at Dolibarr php filer ejer til web-serveren bruger (eller gruppe). ErrorNoMailDefinedForThisUser=Ingen e-mail defineret for denne bruger +ErrorSetupOfEmailsNotComplete=Opsætningen af e-mails er ikke afsluttet ErrorFeatureNeedJavascript=Denne funktion kræver, at javascript aktiveres for at fungere. Skift dette i setup - display. ErrorTopMenuMustHaveAParentWithId0=En menu af type 'Top' kan ikke have en forælder menuen. Sæt 0 i moderselskabet menu eller vælge en menu af typen »Venstre«. ErrorLeftMenuMustHaveAParentId=En menu af typen »Venstre« skal have en forælder id. @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=This profile name already exists for this export set. ErrorLDAPSetupNotComplete=Dolibarr-LDAP matchende er ikke komplet. ErrorLDAPMakeManualTest=A. LDIF-fil er blevet genereret i mappen %s. Prøv at indlæse den manuelt fra kommandolinjen for at få flere informationer om fejl. ErrorCantSaveADoneUserWithZeroPercentage=Kan ikke gemme en handling med "status ikke startet", hvis feltet "udført af" også er udfyldt. -ErrorRefAlreadyExists=Ref bruges til oprettelse eksisterer allerede. +ErrorRefAlreadyExists=Reference <b> %s </b> findes allerede. ErrorPleaseTypeBankTransactionReportName=Indtast venligst kontoudskriftsnavnet, hvor indgangen skal rapporteres (Format YYYYMM eller YYYYMMDD) ErrorRecordHasChildren=Kunne ikke slette rekord, da det har nogle børneposter. ErrorRecordHasAtLeastOneChildOfType=Objektet har mindst et under objekt af type %s @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=Du skal vælge, om artiklen er en ErrorDiscountLargerThanRemainToPaySplitItBefore=Den rabat, du forsøger at anvende, er større end det der forblive at betale. Opdel rabatten i 2 mindre rabatter før. ErrorFileNotFoundWithSharedLink=Filen blev ikke fundet. Det kan være, at dele nøglen blev ændret eller filen blev fjernet for nylig. ErrorProductBarCodeAlreadyExists=Produktets stregkode %s eksisterer allerede på en anden produktreference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Bemærk også, at brug af virtuelt produkt med automatisk forøgelse / nedsættelse af underprodukter ikke er mulig, når mindst et underprodukt (eller underprodukt af underprodukter) har brug for et serienummer / parti nummer. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Bemærk også, at det ikke er muligt at bruge sæt til automatisk forøgelse / formindskelse af underprodukter, når mindst et underprodukt (eller underprodukt af underprodukter) har brug for et serienummer / lotnummer. ErrorDescRequiredForFreeProductLines=Beskrivelse er obligatorisk for linjer med gratis produkt ErrorAPageWithThisNameOrAliasAlreadyExists=Siden / beholderen <strong> %s </ strong> har samme navn eller alternativt alias som den, du forsøger at bruge ErrorDuringChartLoad=Fejl ved indlæsning af kontoplan. Hvis nogle konti ikke blev indlæst, kan du stadig indtaste dem manuelt. @@ -240,9 +243,19 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=Ikke tilstrækkelig mængde ErrorOnlyOneFieldForGroupByIsPossible=Kun 1 felt for 'Group by' er muligt (andre kasseres) ErrorTooManyDifferentValueForSelectedGroupBy=Fundet for mange forskellig værdi (mere end <b>%s</b>) til feltet '<b>%s</b>', så vi ikke kan bruge det som en 'gruppe af' for grafik. Feltet 'Gruppe Af' er blevet fjernet. Kan være du ønskede at bruge det som en X-akse? ErrorReplaceStringEmpty=Fejl, strengen, der skal erstattes til, er tom -ErrorProductNeedBatchNumber=Error, product '<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> +ErrorProductNeedBatchNumber=Fejl, produkt '<b> %s </b>' har brug for meget / serienummer +ErrorProductDoesNotNeedBatchNumber=Fejl, produkt '<b> %s </b>' accepterer ikke meget / serienummer +ErrorFailedToReadObject=Fejl, objektet af typen <b> kunne ikke læses %s </b> +ErrorParameterMustBeEnabledToAllwoThisFeature=Fejl, parameter <b> %s </b> skal aktiveres i <b> conf / conf.php <b> for at tillade brug af kommandolinjegrænsefladen af den interne jobplanlægning +ErrorLoginDateValidity=Fejl, dette login er uden for gyldighedsdatointervallet +ErrorValueLength=Feltets længde '<b> %s </b>' skal være højere end '<b> %s </b>' +ErrorReservedKeyword=Ordet '<b> %s </b>' er et forbeholdt nøgleord +ErrorNotAvailableWithThisDistribution=Ikke tilgængelig med denne distribution +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 + # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Din PHP-parameter upload_max_filesize (%s) er højere end PHP-parameter post_max_size (%s). Dette er ikke en ensartet opsætning. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur WarningAnEntryAlreadyExistForTransKey=An entry already exists for the translation key for this language WarningNumberOfRecipientIsRestrictedInMassAction=Advarsel, antallet af forskellige modtagere er begrænset til <b> %s </ b>, når du bruger massehandlingerne på lister WarningDateOfLineMustBeInExpenseReportRange=Advarsel, datoen for linjen ligger ikke inden for udgiftsrapporten +WarningProjectDraft=Projektet er stadig i kladdetilstand. Glem ikke at validere det, hvis du planlægger at bruge opgaver. WarningProjectClosed=Projektet er lukket. Du skal genåbne det først. WarningSomeBankTransactionByChequeWereRemovedAfter=Nogle banktransaktioner blev fjernet, efter at kvitteringen inklusive dem blev genereret. Så nb af kontroller og det samlede antal modtagelser kan afvige fra antal og total på listen. -WarningFailedToAddFileIntoDatabaseIndex=Advarsel, kunne ikke tilføje filpost i ECM-databasens indekstabel +WarningFailedToAddFileIntoDatabaseIndex=Advarsel! Kunne ikke tilføje filindtastning i ECM-databaseindekstabellen +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. diff --git a/htdocs/langs/da_DK/exports.lang b/htdocs/langs/da_DK/exports.lang index 5f05261b9c9..3b1b4072def 100644 --- a/htdocs/langs/da_DK/exports.lang +++ b/htdocs/langs/da_DK/exports.lang @@ -133,3 +133,4 @@ KeysToUseForUpdates=Nøgle (kolonne), der skal bruges til <b> opdatering </ b> e NbInsert=Number of inserted lines: %s NbUpdate=Number of updated lines: %s MultipleRecordFoundWithTheseFilters=Multiple records have been found with these filters: %s +StocksWithBatch=Lager og placering (lager) af produkter med batch / serienummer diff --git a/htdocs/langs/da_DK/mailmanspip.lang b/htdocs/langs/da_DK/mailmanspip.lang index bab4b3576b4..b0f19f96de9 100644 --- a/htdocs/langs/da_DK/mailmanspip.lang +++ b/htdocs/langs/da_DK/mailmanspip.lang @@ -1,27 +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) +MailmanSpipSetup=Mailman og SPIP-modul Sætop +MailmanTitle=Mailman post list system +TestSubscribe=At teste abonnement på Mailman lister +TestUnSubscribe=For at afprøve afmeldingen fra Mailman lister +MailmanCreationSuccess=Abonnements testen blev udført med succes +MailmanDeletionSuccess=Unsubscription test blev udført med succes +SynchroMailManEnabled=En Mailman opdatering vil blive udført +SynchroSpipEnabled=En Spip opdatering vil blive udført +DescADHERENT_MAILMAN_ADMINPW=Mailman administrator adgangskode +DescADHERENT_MAILMAN_URL=URL til Mailman abonnementer +DescADHERENT_MAILMAN_UNSUB_URL=URL til Mailman abonnementer +DescADHERENT_MAILMAN_LISTS=Liste (r) til automatisk registrering af nye medlemmer (adskilt af komma) SPIPTitle=SPIP Content Management System DescADHERENT_SPIP_SERVEUR=SPIP Server -DescADHERENT_SPIP_DB=SPIP database name +DescADHERENT_SPIP_DB=SPIP database navn 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 +DescADHERENT_SPIP_PASS=SPIP database kodeord +AddIntoSpip=Tilføj til SPIP +AddIntoSpipConfirmation=Er du sikker på, at du vil tilføje denne medlem til SPIP? +AddIntoSpipError=Kunne ikke tilføje brugeren i SPIP +DeleteIntoSpip=Fjern fra SPIP +DeleteIntoSpipConfirmation=Er du sikker på, at du vil fjerne denne medlem fra SPIP? +DeleteIntoSpipError=Kunne ikke undertrykke brugeren fra SPIP +SPIPConnectionFailed=Kunne ikke oprette forbindelse til SPIP +SuccessToAddToMailmanList=%s med succes tilføjet mailman liste %s eller SPIP database +SuccessToRemoveToMailmanList=%s med succes fjernet fra mailman liste %s eller SPIP database diff --git a/htdocs/langs/da_DK/mails.lang b/htdocs/langs/da_DK/mails.lang index bfd9b1dd5ea..e0275f61e0b 100644 --- a/htdocs/langs/da_DK/mails.lang +++ b/htdocs/langs/da_DK/mails.lang @@ -92,6 +92,7 @@ MailingModuleDescEmailsFromUser=Emails indlæst af brugeren MailingModuleDescDolibarrUsers=Brugere med e-mails MailingModuleDescThirdPartiesByCategories=Tredjeparter (efter kategorier) SendingFromWebInterfaceIsNotAllowed=Afsendelse fra webgrænseflade er ikke tilladt. +EmailCollectorFilterDesc=Alle filtre skal matche for at en e-mail bliver indsamlet # Libelle des modules de liste de destinataires mailing LineInFile=Line %s filtjenester @@ -125,12 +126,13 @@ TagMailtoEmail=Modtager E-mail (herunder html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Adviséringer -NoNotificationsWillBeSent=Ingen e-mail-meddelelser er planlagt for denne begivenhed, og firmaet -ANotificationsWillBeSent=1 anmeldelse vil blive sendt via email -SomeNotificationsWillBeSent=%s meddelelser vil blive sendt via email -AddNewNotification=Activate a new email notification target -ListOfActiveNotifications=List all active targets for email notification -ListOfNotificationsDone=List alle e-mail meddelelser +NotificationsAuto=Underretninger Auto. +NoNotificationsWillBeSent=Ingen automatiske e-mail-underretninger er planlagt for denne begivenhedstype og virksomhed +ANotificationsWillBeSent=1 automatisk underretning sendes via e-mail +SomeNotificationsWillBeSent=%s automatiske meddelelser sendes via e-mail +AddNewNotification=Abonner på en ny automatisk e-mail-underretning (mål / begivenhed) +ListOfActiveNotifications=Liste over alle aktive abonnementer (mål / begivenheder) til automatisk e-mail-underretning +ListOfNotificationsDone=Liste over alle sendte automatiske e-mail-meddelelser 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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir UseFormatInputEmailToTarget=Enter a string with format <strong>email;name;firstname;other</strong> MailAdvTargetRecipients=Recipients (advanced selection) AdvTgtTitle=Udfyld indtastningsfelter for at vælge tredjeparter eller kontaktpersoner / adresser, der skal målrettes -AdvTgtSearchTextHelp=Brug %% som jokertegn. For eksempel for at finde alle emner som <b> jean, joe, jim </ b>, kan du indtaste <b> j%% </ b>, du kan også bruge; som separator for værdi og brug! for undtagen denne værdi. For eksempel <b> jean; joe; jim%%;! Jimo;! Jima% </ b> vil målrette alle jean, joe, start med jim men ikke jimo og ikke alt der starter med jima +AdvTgtSearchTextHelp=Brug %% som wildcards. For eksempel for at finde alle varer som <b> jean, joe, jim </b>, kan du indtaste <b> j%% </b>, du kan også bruge; som separator for værdi, og brug! for undtagen denne værdi. For eksempel <b> jean; joe; jim%%;! Jimo;! Jima%% </b> vil målrette mod alle jean, joe, start med jim, men ikke jimo og ikke alt, der starter med jima AdvTgtSearchIntHelp=Use interval to select int or float value AdvTgtMinVal=Minimum value AdvTgtMaxVal=Maximum value @@ -162,13 +164,16 @@ 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=Udgående e-mail opsætning -InGoingEmailSetup=Indgående e-mail opsætning -OutGoingEmailSetupForEmailing=Udgående e-mail opsætning (til modul%s) -DefaultOutgoingEmailSetup=Standard udgående e-mail opsætning +OutGoingEmailSetup=Udgående e-mails +InGoingEmailSetup=Indgående e-mails +OutGoingEmailSetupForEmailing=Udgående e-mails (for modul %s) +DefaultOutgoingEmailSetup=Samme konfiguration end den globale opsætning af udgående e-mail Information=Information ContactsWithThirdpartyFilter=Kontakter med tredjepart filter -Unanswered=Unanswered +Unanswered=Ubesvaret Answered=Besvaret -IsNotAnAnswer=Is not answer (initial email) -IsAnAnswer=Is an answer of an initial email +IsNotAnAnswer=Er ikke svar (indledende e-mail) +IsAnAnswer=Er et svar på en indledende e-mail +RecordCreatedByEmailCollector=Post oprettet af Email Collector %s fra e-mail %s +DefaultBlacklistMailingStatus=Standard kontaktstatus for afvisning af masse-e-mail +DefaultStatusEmptyMandatory=Tom men obligatorisk diff --git a/htdocs/langs/da_DK/main.lang b/htdocs/langs/da_DK/main.lang index b388aeabcdd..340e9f756c2 100644 --- a/htdocs/langs/da_DK/main.lang +++ b/htdocs/langs/da_DK/main.lang @@ -24,11 +24,13 @@ FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p FormatDateHourTextShort=%d %b %Y %H:%M FormatDateHourText=%d %B %Y %H:%M DatabaseConnection=Database forbindelse -NoTemplateDefined=Ingen skabelon til rådighed for denne Email-type +NoTemplateDefined=Ingen skabelon til rådighed for denne e-mail-type AvailableVariables=Tilgængelige erstatnings variabler NoTranslation=Ingen oversættelse Translation=Oversættelse +CurrentTimeZone=Aktuelle tidszone EmptySearchString=Indtast ikke tomme søgekriterier +EnterADateCriteria=Indtast et datokriterium NoRecordFound=Ingen poster fundet NoRecordDeleted=Ingen post slettet NotEnoughDataYet=Ikke nok data @@ -47,7 +49,7 @@ ErrorSQL=SQL Fejl ErrorLogoFileNotFound=Logo fil '%s' blev ikke fundet ErrorGoToGlobalSetup=Gå til 'Firma/Organisation' opsætning for at rette dette ErrorGoToModuleSetup=Gå til modulopsætning for at rette dette -ErrorFailedToSendMail=Det lykkedes ikke at sende Email (sender=%s, receiver= %s) +ErrorFailedToSendMail=Det lykkedes ikke at sende e-mail (afsender=%s, modtager= %s) ErrorFileNotUploaded=Filen blev ikke uploadet. Kontroller, at størrelse ikke overstiger det maksimalt tilladte, at den frie plads der er til rådighed på disken, og at der ikke allerede en fil med samme navn i denne mappe. ErrorInternalErrorDetected=Fejl opdaget ErrorWrongHostParameter=Forkert vært parameter @@ -85,6 +87,8 @@ FileWasNotUploaded=En fil er valgt som vedhæng, men endnu ikke uploadet. Klik p NbOfEntries=Antal indgange GoToWikiHelpPage=Læs online hjælp (Adgang til Internettet er nødvendig) GoToHelpPage=Læs hjælp +DedicatedPageAvailable=Der er en dedikeret hjælpeside, der er relateret til din aktuelle skærm +HomePage=Hjemmeside RecordSaved=Data gemt RecordDeleted=Post slettet RecordGenerated=Data genereret @@ -220,6 +224,7 @@ Value=Værdi PersonalValue=Personlige værdi NewObject=Ny %s NewValue=Ny værdi +OldValue=Gammel værdi %s CurrentValue=Nuværende værdi Code=Kode Type=Type @@ -236,7 +241,7 @@ Designation=Beskrivelse DescriptionOfLine=Beskrivelse af linje DateOfLine=Dato for linje DurationOfLine=Linjens varighed -Model=Dokumenter skabeloner +Model=Skabelon DefaultModel=Standard dokument skabelon Action=Begivenhed About=Om @@ -248,7 +253,7 @@ Limit=Grænseværdi Limits=Grænseværdier Logout=Log ud NoLogoutProcessWithAuthMode=Ingen applikations afbrydelses funktion med autentificeringstilstand <b>%s</b> -Connection=Logind +Connection=Log ind Setup=Opsætning Alert=Alarm MenuWarnings=Indberetninger @@ -355,25 +360,25 @@ UnitPriceHT=Enhedspris (ekskl.) UnitPriceHTCurrency=Enhedspris (ekskl.) (Valuta) UnitPriceTTC=Enhedspris PriceU=Salgspris -PriceUHT=Salgspris (netto) +PriceUHT=Pris (netto) PriceUHTCurrency=Salgspris (Valuta) -PriceUTTC=Brutto(Inkl.Moms) +PriceUTTC=Brutto (inkl. moms) Amount=Beløb AmountInvoice=Fakturabeløbet AmountInvoiced=Beløb faktureres AmountInvoicedHT=Faktureret beløb (ekskl. Moms) -AmountInvoicedTTC=Faktureret beløb (inkl. Moms) +AmountInvoicedTTC=Faktureret beløb (inkl. moms) AmountPayment=Indbetalingsbeløb AmountHTShort=Beløb (ekskl.) AmountTTCShort=Beløb (inkl. moms) -AmountHT=Beløb (ekskl. Skat) +AmountHT=Beløb (ekskl. moms) AmountTTC=Beløb (inkl. moms) AmountVAT=Momsbeløb MulticurrencyAlreadyPaid=Allerede betalt, original valuta MulticurrencyRemainderToPay=Manglene betaling , original valuta MulticurrencyPaymentAmount=Betalingsbeløb, oprindelig valuta -MulticurrencyAmountHT=Beløb (ekskl. Skat), original valuta -MulticurrencyAmountTTC=Beløb (inkl. Moms), oprindelig valuta +MulticurrencyAmountHT=Beløb (ekskl. moms), original valuta +MulticurrencyAmountTTC=Beløb (inkl. moms), oprindelig valuta MulticurrencyAmountVAT=Momsbeløb, oprindelige valuta MulticurrencySubPrice=Beløb subpris multi valuta AmountLT1=Momsbeløb 2 @@ -387,15 +392,15 @@ PriceQtyMinHTCurrency=Prismængde min. (ekskl. skat) (valuta) Percentage=Procent Total=I alt SubTotal=Sum -TotalHTShort=I alt (ekskl.) +TotalHTShort=I alt (u/moms) TotalHT100Short=I alt 100%% (ekskl.) -TotalHTShortCurrency=I alt (ekskl. I valuta) -TotalTTCShort=I alt (Inkl. moms) -TotalHT=I alt (ekskl. Skat) -TotalHTforthispage=I alt (ekskl. Skat) for denne side +TotalHTShortCurrency=I alt (ekskl. i valuta) +TotalTTCShort=I alt (m/moms) +TotalHT=I alt (u/moms) +TotalHTforthispage=I alt (ekskl. moms) for denne side Totalforthispage=I alt for denne side -TotalTTC=I alt (Inkl. Moms) -TotalTTCToYourCredit=I alt (Inkl. Moms) til din kredit +TotalTTC=I alt (m/moms) +TotalTTCToYourCredit=I alt (inkl. moms) til din kredit TotalVAT=Moms i alt TotalVATIN=IGST i alt TotalLT1=Total Moms 2 @@ -404,10 +409,10 @@ TotalLT1ES=RE i alt TotalLT2ES=IRPF i alt TotalLT1IN=I alt CGST TotalLT2IN=I alt SGST -HT=Ekskl. skat -TTC=Inkl. Moms -INCVATONLY=Inkl. Moms -INCT=Inkl. Alle skatter +HT=Ekskl. moms +TTC=Inkl. moms +INCVATONLY=Inkl. moms +INCT=Inkl. moms og afgifter VAT=Moms VATIN=IGST VATs=Salgs Moms @@ -433,6 +438,7 @@ RemainToPay=Manglende betaling Module=Modul/Applikation Modules=Moduler/Applikationer Option=Valgmulighed +Filters=Filtre List=Liste FullList=Fuldstændig liste FullConversation=Fuld samtale @@ -503,7 +509,7 @@ Other=Anden Others=Andre OtherInformations=Anden information Quantity=Antal -Qty=Qty +Qty=Antal ChangedBy=Ændret af ApprovedBy=Godkendt af ApprovedBy2=Godkendt af (sekundær) @@ -550,10 +556,10 @@ AddPhoto=Tilføj billede DeletePicture=Billede slette ConfirmDeletePicture=Bekræft billed sletning? Login=Login -LoginEmail=Logind (email) -LoginOrEmail=Logind eller Email +LoginEmail=Login (e-mail) +LoginOrEmail=Login eller e-mail CurrentLogin=Nuværende login -EnterLoginDetail=Indtast logind oplysninger +EnterLoginDetail=Indtast login-oplysninger January=Januar February=Februar March=Marts @@ -650,6 +656,7 @@ SupplierPreview=Forhandler forhåndsvisning ShowCustomerPreview=Vis forhåndsvisning til kunde ShowSupplierPreview=Vis sælger forhåndsvisning RefCustomer=Ref. Kunde +InternalRef=Intern ref. Currency=Valuta InfoAdmin=Oplysninger til administratorer Undo=Fortryd @@ -662,16 +669,16 @@ FeatureNotYetSupported=Funktion endnu ikke understøttet CloseWindow=Luk vindue Response=Responds Priority=Prioritet -SendByMail=Send via email -MailSentBy=Email sendt fra +SendByMail=Send via e-mail +MailSentBy=E-mail sendt af NotSent=Ikke sendt TextUsedInTheMessageBody=Email indhold SendAcknowledgementByMail=Send bekræftelses Email -SendMail=Send Email -Email=EMail +SendMail=Send e-mail +Email=E-mail NoEMail=Ingen Email AlreadyRead=Har allerede læst -NotRead=Ikke læst +NotRead=Ulæst NoMobilePhone=Ingen mobil telefon Owner=Ejer FollowingConstantsWillBeSubstituted=Følgende konstanterne skal erstatte med tilsvarende værdi. @@ -1107,3 +1114,9 @@ UpToDate=Opdateret OutOfDate=Umoderne EventReminder=Påmindelse om begivenhed UpdateForAllLines=Opdatering til alle linjer +OnHold=I venteposition +Civility=Høflighed +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 diff --git a/htdocs/langs/da_DK/modulebuilder.lang b/htdocs/langs/da_DK/modulebuilder.lang index d576de3f2db..7d0df081858 100644 --- a/htdocs/langs/da_DK/modulebuilder.lang +++ b/htdocs/langs/da_DK/modulebuilder.lang @@ -40,6 +40,7 @@ PageForCreateEditView=PHP side til at oprette / redigere / se en post PageForAgendaTab=PHP side for fanen begivenhed PageForDocumentTab=PHP-side for dokumentfanen PageForNoteTab=PHP side til notatfane +PageForContactTab=PHP-side til kontaktfanen PathToModulePackage=Sti til zip af modul / applikationspakke PathToModuleDocumentation=Sti til fil af modul / applikationsdokumentation (%s) SpaceOrSpecialCharAreNotAllowed=Mellemrum eller specialtegn er ikke tilladt. @@ -77,7 +78,7 @@ IsAMeasure=Er en foranstaltning DirScanned=Directory scannet NoTrigger=Ingen udløser NoWidget=Ingen widget -GoToApiExplorer=Gå til API Explorer +GoToApiExplorer=API udforske ListOfMenusEntries=Liste over menupunkter ListOfDictionariesEntries=Liste over poster i ordbøger ListOfPermissionsDefined=Liste over definerede tilladelser @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=Hvis du har kendskab til SQL og PHP, kan du bruge guide SeeTopRightMenu=Se <span class = "fa fa-bug"> </span> i øverste højre menu AddLanguageFile=Tilføj sprogfil YouCanUseTranslationKey=Du kan her bruge en nøgle, der er oversættelsessnøglen fundet i sprogfilen (se fanen "Sprog"). -DropTableIfEmpty=(Slet tabel hvis tom) +DropTableIfEmpty=(Ødelæg tabel, hvis det er tomt) TableDoesNotExists=Tabellen %s findes ikke TableDropped=Tabel %s slettet InitStructureFromExistingTable=Byg strukturen array streng af en eksisterende tabel @@ -126,7 +127,6 @@ UseSpecificEditorURL = Brug en bestemt editor webadresse UseSpecificFamily = Brug en bestemt familie UseSpecificAuthor = Brug en bestemt forfatter UseSpecificVersion = Brug en bestemt initial version -ModuleMustBeEnabled=Modulet / applikationen skal være aktiveret først IncludeRefGeneration=Reference til objekt skal genereres automatisk IncludeRefGenerationHelp=Kontroller dette, hvis du vil inkludere kode til at styre genereringen af referencen automatisk IncludeDocGeneration=Jeg vil generere nogle dokumenter fra objektet @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Felttype:<br> varchar (99), dobbelt (24,8), reel, tekst, html, AsciiToHtmlConverter=Ascii til HTML-konverter AsciiToPdfConverter=Ascii til PDF konverter TableNotEmptyDropCanceled=Tabellen er ikke tom. Drop er annulleret. +ModuleBuilderNotAllowed=Modulbyggeren er tilgængelig, men ikke tilladt for din bruger. diff --git a/htdocs/langs/da_DK/mrp.lang b/htdocs/langs/da_DK/mrp.lang index 063976415c0..22f0fc4aa08 100644 --- a/htdocs/langs/da_DK/mrp.lang +++ b/htdocs/langs/da_DK/mrp.lang @@ -78,3 +78,27 @@ TotalCost=Udgifter i alt BOMTotalCost=Omkostningerne til at fremstille denne BOM baseret på prisen for hver mængde og produkt, der skal forbruges (brug Prisen, hvis defineret, ellers Gennemsnit Vægtet pris, hvis defineret, ellers den bedste købspris) GoOnTabProductionToProduceFirst=Du skal først have startet produktionen for at lukke en produktionsordre (se fanen '%s'). Men du kan annullere det. ErrorAVirtualProductCantBeUsedIntoABomOrMo=Et sæt kan ikke bruges i en stykliste eller en MO +Workstation=Arbejdsstation +Workstations=Arbejdsstationer +WorkstationsDescription=Arbejdsstationsadministration +WorkstationSetup = Opsætning af arbejdsstationer +WorkstationSetupPage = Opsætningsside for arbejdsstationer +WorkstationAbout = Om arbejdsstation +WorkstationAboutPage = Arbejdsstationer om side +WorkstationList=Arbejdsstationsliste +WorkstationCreate=Tilføj ny arbejdsstation +ConfirmEnableWorkstation=Er du sikker på, at du vil aktivere arbejdsstation <b> %s </b>? +EnableAWorkstation=Aktivér en arbejdsstation +ConfirmDisableWorkstation=Er du sikker på, at du vil deaktivere arbejdsstationen <b> %s </b>? +DisableAWorkstation=Deaktiver en arbejdsstation +DeleteWorkstation=Fjerne +NbOperatorsRequired=Antal krævede operatører +THMOperatorEstimated=Anslået operatør THM +THMMachineEstimated=Anslået maskine THM +WorkstationType=Arbejdsstationstype +Human=Person +Machine=Maskine +HumanMachine=Person / maskine +WorkstationArea=Arbejdsstationsområde +Machines=Maskiner +THMEstimatedHelp=Denne sats gør det muligt at definere en overslagspris for varen diff --git a/htdocs/langs/da_DK/orders.lang b/htdocs/langs/da_DK/orders.lang index 42464a28ed3..11b4d53dfbd 100644 --- a/htdocs/langs/da_DK/orders.lang +++ b/htdocs/langs/da_DK/orders.lang @@ -55,7 +55,7 @@ StatusOrderRefused=Afvist StatusOrderReceivedPartially=Delvist modtaget StatusOrderReceivedAll=Alle varer modtaget ShippingExist=En forsendelse findes -QtyOrdered=Qty bestilt +QtyOrdered=Antal bestilt ProductQtyInDraft=Produkt mængde i udkast ordrer ProductQtyInDraftOrWaitingApproved=Produkt mængde i udkast eller godkendte ordrer, endnu ikke bestilt MenuOrdersToBill=Ordrer leveret @@ -137,7 +137,7 @@ Error_OrderNotChecked=Ingen ordrer til faktura valgt # Order modes (how we receive order). Not the "why" are keys stored into dict.lang OrderByMail=Mail OrderByFax=Fax -OrderByEMail=EMail +OrderByEMail=E-mail OrderByWWW=Online OrderByPhone=Telefon # Documents models diff --git a/htdocs/langs/da_DK/other.lang b/htdocs/langs/da_DK/other.lang index 31fb1453cd4..cf4145b5f03 100644 --- a/htdocs/langs/da_DK/other.lang +++ b/htdocs/langs/da_DK/other.lang @@ -5,8 +5,6 @@ Tools=Værktøj TMenuTools=Værktøjer ToolsDesc=Alle værktøjer, der ikke er inkluderet i andre menupunkter, er grupperet her. <br> Alle værktøjerne er tilgængelige via menuen til venstre. Birthday=Fødselsdag -BirthdayDate=Fødselsdato -DateToBirth=Fødselsdato BirthdayAlertOn=fødselsdag alarm aktive BirthdayAlertOff=fødselsdag alarm inaktive TransKey=Oversættelse af nøgle TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Forrige måned (nummer 1-12) på faktura dato TextPreviousMonthOfInvoice=Forrige måned (tekst) af faktura dato NextMonthOfInvoice=Følgende måned (nummer 1-12) på faktura dato TextNextMonthOfInvoice=Følgende måned (tekst) af faktura dato +PreviousMonth=Forrige måned +CurrentMonth=Indeværende måned ZipFileGeneratedInto=Zip-fil genereret til <b> %s </ b>. DocFileGeneratedInto=Doc-fil genereret til <b> %s </ b>. JumpToLogin=Afbrudt. Gå til login side ... @@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Udgiftsrapport valideret (godkendelse krævet) Notify_EXPENSE_REPORT_APPROVE=Udgiftsrapport godkendt Notify_HOLIDAY_VALIDATE=Anmodning om tilladelse er godkendt (godkendelse kræves) Notify_HOLIDAY_APPROVE=Anmodning om tilladelse godkendt +Notify_ACTION_CREATE=Føjede handling til dagsorden SeeModuleSetup=Se opsætning af modul %s NbOfAttachedFiles=Antal vedhæftede filer / dokumenter TotalSizeOfAttachedFiles=Samlede størrelse på vedhæftede filer / dokumenter @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nFind forsendelse __REF__ vedhæ PredefinedMailContentSendFichInter=__(Hello)__\n\nFind intervention __REF__ vedhæftet\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Du kan klikke på linket herunder for at foretage din betaling, hvis den ikke allerede er færdig.\n\n%s\n\n PredefinedMailContentGeneric=__(Hej)__\n\n\n__ (Sincerely) __\n\n__USER_SIGNATURE__ +PredefinedMailContentSendActionComm=Begivenhedspåmindelse "__EVENT_LABEL__" den __EVENT_DATE__ kl. __EVENT_TIME__ <br> <br> Dette er en automatisk besked, bedes du ikke svare. DemoDesc=Dolibarr er en kompakt ERP / CRM, der understøtter flere forretningsmoduler. En demo, der viser alle moduler, giver ingen mening, da dette scenario aldrig forekommer (flere hundrede tilgængelige). Så flere demo profiler er tilgængelige. ChooseYourDemoProfil=Vælg den demoprofil, der passer bedst til dine behov ... ChooseYourDemoProfilMore=... eller bygg din egen profil <br> (manuel modulvalg) @@ -214,6 +216,7 @@ EMailTextExpenseReportValidated=Udgiftsrapport %s er godkendt. EMailTextExpenseReportApproved=Udgiftsrapport %s er godkendt. EMailTextHolidayValidated=Anmodning om orlov/ferie %s er godkendt. EMailTextHolidayApproved=Anmodning om ferie %s er godkendt. +EMailTextActionAdded=Handlingen %s er føjet til dagsordenen. ImportedWithSet=Indførsel datasæt DolibarrNotification=Automatisk anmeldelse ResizeDesc=Indtast nye bredde <b>OR</b> ny højde. Ratio vil blive holdt i resizing ... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Kontakt / adresse skabt via e-mail indsamler fra ProjectCreatedByEmailCollector=Projekt skabt via e-mail indsamler fra mail MSGID %s TicketCreatedByEmailCollector=Billet skabt via e-mail indsamler fra mail MSGID %s OpeningHoursFormatDesc=Brug et - til separat åbning og lukning timer. <br> brug en mellemrum"Space" til at indtaste forskellige område. <br> Eksempel: 8-12 14-18 +PrefixSession=Præfiks til session-id ##### Export ##### ExportsArea=Eksport område @@ -278,9 +282,9 @@ LinesToImport=Linjer at importere MemoryUsage=Brug af hukommelse RequestDuration=Anmodningens varighed -ProductsPerPopularity=Products/Services by popularity +ProductsPerPopularity=Produkter / Ydelser efter popularitet PopuProp=Produkter/tjenester efter popularitet i forslag PopuCom=Produkter/tjenester efter popularitet i ordrer ProductStatistics=Produkter / services statistik NbOfQtyInOrders=Antal i ordrer -SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... +SelectTheTypeOfObjectToAnalyze=Vælg den type objekt, der skal analyseres ... diff --git a/htdocs/langs/da_DK/products.lang b/htdocs/langs/da_DK/products.lang index d266cdfa657..dc8281f3a00 100644 --- a/htdocs/langs/da_DK/products.lang +++ b/htdocs/langs/da_DK/products.lang @@ -70,7 +70,7 @@ UpdateDefaultPrice=Opdater standardpris UpdateLevelPrices=Opdater priser for hvert niveau AppliedPricesFrom=Anvendt fra SellingPrice=Salgspris -SellingPriceHT=Salgspris (ekskl. Skat) +SellingPriceHT=Salgspris (ekskl. moms) SellingPriceTTC=Salgspris (inkl. moms) SellingMinPriceTTC=Minimumssalgspris (inkl. Skat) CostPriceDescription=Dette prisfelt (ekskl. Skat) kan bruges til at gemme det gennemsnitlige beløb, dette produkt koster for din virksomhed. Det kan være enhver pris, du selv beregner, for eksempel ud fra den gennemsnitlige købspris plus gennemsnitlige produktions- og distributionsomkostninger. @@ -104,24 +104,25 @@ SetDefaultBarcodeType=Vælg stregkodetype BarcodeValue=Stregkodeværdi NoteNotVisibleOnBill=Note (ikke synlig på fakturaer, tilbud ...) ServiceLimitedDuration=Hvis varen er en ydelse med begrænset varighed: -FillWithLastServiceDates=Fill with last service line dates +FillWithLastServiceDates=Udfyld med sidste servicelinjedatoer MultiPricesAbility=Flere prissegmenter pr. Produkt / service (hver kunde er i et prissegment) MultiPricesNumPrices=Antal priser DefaultPriceType=Prisgrundlag pr. Standard (med eller uden skat) ved tilføjelse af nye salgspriser -AssociatedProductsAbility=Activate kits (virtual products) -AssociatedProducts=Kits -AssociatedProductsNumber=Number of products composing this kit +AssociatedProductsAbility=Aktivér sæt (sæt med flere produkter) +VariantsAbility=Aktiver varianter (variationer af produkter, f.eks. Farve, størrelse) +AssociatedProducts=Sæt +AssociatedProductsNumber=Antal produkter, der udgør dette sæt ParentProductsNumber=Antal forældrevarer ParentProducts=Moderselskaber -IfZeroItIsNotAVirtualProduct=If 0, this product is not a kit -IfZeroItIsNotUsedByVirtualProduct=If 0, this product is not used by any kit +IfZeroItIsNotAVirtualProduct=Hvis 0, er dette produkt ikke et sæt +IfZeroItIsNotUsedByVirtualProduct=Hvis 0, bruges dette produkt ikke af noget sæt KeywordFilter=Keyword filter CategoryFilter=Kategori filter ProductToAddSearch=Søg produkt for at tilføje NoMatchFound=Ingen match fundet ListOfProductsServices=Liste over produkter / tjenester -ProductAssociationList=List of products/services that are component(s) of this kit -ProductParentList=List of kits with this product as a component +ProductAssociationList=Liste over produkter / tjenester, der er komponent (er) i dette sæt +ProductParentList=Liste over sæt med dette produkt som en komponent ErrorAssociationIsFatherOfThis=En af valgte produkt er moderselskab med aktuelle produkt DeleteProduct=Slet en vare/ydelse ConfirmDeleteProduct=Er du sikker på du vil slette denne vare/ydelse? @@ -167,8 +168,10 @@ BuyingPrices=Købspriser CustomerPrices=Kundepriser SuppliersPrices=Leverandørpriser SuppliersPricesOfProductsOrServices=Sælgerpriser (af produkter eller tjenester) -CustomCode=Told / vare / HS-kode +CustomCode=Told | Råvare | HS-kode CountryOrigin=Oprindelsesland +RegionStateOrigin=Region oprindelse +StateOrigin=Stat | provinsens oprindelse Nature=Produktets art (materiale / færdig) NatureOfProductShort=Produktets art NatureOfProductDesc=Råmateriale eller færdigt produkt @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Brug den faste pris PriceByQuantity=Forskellige priser efter mængde DisablePriceByQty=Deaktiver priserne efter antal PriceByQuantityRange=Mængdeområde -MultipriceRules=Prissegmentregler +MultipriceRules=Automatiske priser for segment UseMultipriceRules=Brug prissegmentregler (defineret i opsætning af produktmodul) til automatisk beregning af priser for alle andre segmenter i henhold til første segment PercentVariationOver=%% variation over %s PercentDiscountOver=%% rabat over %s @@ -287,7 +290,7 @@ PriceExpressionEditorHelp5=Tilgængelige globale værdier: PriceMode=Pris-tilstand PriceNumeric=Numero DefaultPrice=Standard pris -DefaultPriceLog=Log of previous default prices +DefaultPriceLog=Log over tidligere standardpriser ComposedProductIncDecStock=Forøg / sænk lagerbeholdning ved forældreændring ComposedProduct=Børneprodukter MinSupplierPrice=Min købskurs @@ -340,7 +343,7 @@ UseProductFournDesc=Tilføj en funktion til at definere beskrivelser af produkte ProductSupplierDescription=Leverandørbeskrivelse for produktet UseProductSupplierPackaging=Brug emballage til leverandørpriser (genberegn mængder i henhold til emballage, der er angivet på leverandørpris, når du tilføjer / opdaterer linje i leverandørdokumenter) PackagingForThisProduct=Emballage -PackagingForThisProductDesc=On supplier order, you will automaticly order this quantity (or a multiple of this quantity). Cannot be less than minimum buying quantity +PackagingForThisProductDesc=Ved leverandørbestilling bestiller du automatisk denne mængde (eller et multiplum af denne mængde). Må ikke være mindre end det mindste købsmængde QtyRecalculatedWithPackaging=Mængden af linjen blev beregnet om efter leverandøremballage #Attributes @@ -364,9 +367,9 @@ SelectCombination=Vælg kombination ProductCombinationGenerator=Varianter generator Features=Funktioner PriceImpact=Prispåvirkning -ImpactOnPriceLevel=Impact on price level %s -ApplyToAllPriceImpactLevel= Apply to all levels -ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels +ImpactOnPriceLevel=Effekt på prisniveau %s +ApplyToAllPriceImpactLevel= Anvend på alle niveauer +ApplyToAllPriceImpactLevelHelp=Ved at klikke her indstiller du den samme prispåvirkning på alle niveauer WeightImpact=Vægtpåvirkning NewProductAttribute=Ny attribut NewProductAttributeValue=Ny attributværdi diff --git a/htdocs/langs/da_DK/projects.lang b/htdocs/langs/da_DK/projects.lang index b0bac561043..56f72838a88 100644 --- a/htdocs/langs/da_DK/projects.lang +++ b/htdocs/langs/da_DK/projects.lang @@ -76,15 +76,16 @@ MyActivities=Mine opgaver / aktiviteter MyProjects=Mine projekter MyProjectsArea=Mine projekter Område DurationEffective=Effektiv varighed -ProgressDeclared=Erklæret fremskridt +ProgressDeclared=Erklæret reel fremskridt TaskProgressSummary=Opgave fremskridt CurentlyOpenedTasks=Aktuelt åbne opgaver -TheReportedProgressIsLessThanTheCalculatedProgressionByX=Den erklærede fremgang er mindre %s end den beregnede progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=Den erklærede fremgang er mere %s end den beregnede progression -ProgressCalculated=Beregnede fremskridt +TheReportedProgressIsLessThanTheCalculatedProgressionByX=Den erklærede reelle fremgang er mindre %s end fremskridt med forbrug +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=Den erklærede reelle fremgang er mere %s end fremskridt med forbrug +ProgressCalculated=Fremskridt med hensyn til forbrug WhichIamLinkedTo=som jeg er knyttet til WhichIamLinkedToProject=som jeg er knyttet til projektet Time=Tid +TimeConsumed=Forbruges ListOfTasks=Liste over opgaver GoToListOfTimeConsumed=Gå til listen over tid forbrugt GanttView=Gantt View @@ -211,9 +212,9 @@ ProjectNbProjectByMonth=Antal oprettet projekter pr. Måned ProjectNbTaskByMonth=Antal oprettet opgaver efter måned ProjectOppAmountOfProjectsByMonth=Mængden af ​​kundeemner pr. Måned ProjectWeightedOppAmountOfProjectsByMonth=Vægtet antal kundeemner pr. Måned -ProjectOpenedProjectByOppStatus=Open project|lead by lead status -ProjectsStatistics=Statistics on projects or leads -TasksStatistics=Statistics on tasks of projects or leads +ProjectOpenedProjectByOppStatus=Åbn projekt | ført efter leadstatus +ProjectsStatistics=Statistik over projekter eller kundeemner +TasksStatistics=Statistik over opgaver for projekter eller leads TaskAssignedToEnterTime=Opgave tildelt. Indtastning af tid på denne opgave skal være muligt. IdTaskTime=Id opgave tid YouCanCompleteRef=Hvis du ønsker at afslutte ref med et eller flere suffiks, anbefales det at tilføje et - tegn for at adskille det, så den automatiske nummerering stadig fungerer korrekt til næste projekter. For eksempel %s-MYSUFFIX diff --git a/htdocs/langs/da_DK/propal.lang b/htdocs/langs/da_DK/propal.lang index d742aaccad7..01e676de7d8 100644 --- a/htdocs/langs/da_DK/propal.lang +++ b/htdocs/langs/da_DK/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Send tilbud med posten DatePropal=Dato for tilbud DateEndPropal=Gyldighed udløber ValidityDuration=Gyldighedstid -CloseAs=Sæt status til SetAcceptedRefused=Sæt accepteret/afvist ErrorPropalNotFound=Propal %s blev ikke fundet AddToDraftProposals=Tilføj skabelon @@ -57,7 +56,7 @@ CreateEmptyPropal=Opret tomt kommercielt forslag eller fra listen over produkter DefaultProposalDurationValidity=Standard gyldighedstid for tilbud (i dage) UseCustomerContactAsPropalRecipientIfExist=Brug kontakt/adresse med type 'Kontakt opfølgnings forslag', hvis det er defineret i stedet for tredjepartsadresse som forslag modtageradresse ConfirmClonePropal=Er du sikker på, du vil klone tilbuddet <b>%s</b>? -ConfirmReOpenProp=Er du sikker på du vil genåbne 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 AvailabilityPeriod=Tilgængelighed forsinkelse @@ -85,3 +84,8 @@ ProposalCustomerSignature=Skriftlig accept, firmastempel, dato og underskrift ProposalsStatisticsSuppliers=Forhandler forslagsstatistik CaseFollowedBy=Sag efterfulgt af SignedOnly=Kun underskrevet +IdProposal=Forslags-id +IdProduct=Produkt-id +PrParentLine=Forslagsforældrelinje +LineBuyPriceHT=Købspris Beløb fratrukket skat for linje + diff --git a/htdocs/langs/da_DK/recruitment.lang b/htdocs/langs/da_DK/recruitment.lang index 3895222dc56..a747076bfdd 100644 --- a/htdocs/langs/da_DK/recruitment.lang +++ b/htdocs/langs/da_DK/recruitment.lang @@ -27,10 +27,10 @@ ModuleRecruitmentDesc = Administrer og følg rekrutteringskampagner til nye stil # RecruitmentSetup = Rekrutteringsopsætning Settings = Indstillinger -RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentSetupPage = Indtast her opsætningen af de vigtigste muligheder for rekrutteringsmodulet RecruitmentArea=Rekrutteringsområde -PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. -EnablePublicRecruitmentPages=Enable public pages of open jobs +PublicInterfaceRecruitmentDesc=Offentlige sider med job er offentlige webadresser, der skal vises og besvares ved åbne job. Der er et andet link til hvert åbent job, der findes på hver jobjournal. +EnablePublicRecruitmentPages=Aktivér offentlige sider med åbne job # # About page @@ -46,30 +46,31 @@ FutureManager=Fremtidig leder ResponsibleOfRecruitement=Ansættelsesansvarlig IfJobIsLocatedAtAPartner=Hvis jobbet er placeret på en partner sted PositionToBeFilled=Stilling -PositionsToBeFilled=Job positions -ListOfPositionsToBeFilled=List of job positions -NewPositionToBeFilled=New job positions +PositionsToBeFilled=Jobstillinger +ListOfPositionsToBeFilled=Liste over jobstillinger +NewPositionToBeFilled=Nye jobstillinger -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) +JobOfferToBeFilled=Jobposition, der skal besættes +ThisIsInformationOnJobPosition=Oplysninger om den stilling, der skal besættes +ContactForRecruitment=Kontakt for rekruttering +EmailRecruiter=E-mail-rekrutterer +ToUseAGenericEmail=At bruge en generisk e-mail. Hvis det ikke er defineret, vil e-mailen til den ansvarlige for rekrutteringen blive brugt +NewCandidature=Ny applikation +ListOfCandidatures=Liste over applikationer +RequestedRemuneration=Anmodet vederlag +ProposedRemuneration=Foreslået vederlag +ContractProposed=Foreslået kontrakt +ContractSigned=Kontrakt underskrevet +ContractRefused=Kontrakten blev afvist +RecruitmentCandidature=Ansøgning +JobPositions=Jobstillinger +RecruitmentCandidatures=Ansøgninger +InterviewToDo=Interview at gøre +AnswerCandidature=Ansøgning svar +YourCandidature=Din ansøgning +YourCandidatureAnswerMessage=Tak for din ansøgning. <br> ... +JobClosedTextCandidateFound=Jobpositionen er lukket. Stillingen er besat. +JobClosedTextCanceled=Jobpositionen er lukket. +ExtrafieldsJobPosition=Supplerende attributter (jobstillinger) +ExtrafieldsCandidatures=Supplerende attributter (jobansøgninger) +MakeOffer=Giv et tilbud diff --git a/htdocs/langs/da_DK/sendings.lang b/htdocs/langs/da_DK/sendings.lang index d430c0fe7ac..4d4c7a5a07d 100644 --- a/htdocs/langs/da_DK/sendings.lang +++ b/htdocs/langs/da_DK/sendings.lang @@ -17,10 +17,10 @@ NumberOfShipmentsByMonth=Antal forsendelser pr. Måned SendingCard=Forsendelse kort NewSending=Ny afsendelse CreateShipment=Opret afsendelse -QtyShipped=Qty afsendt +QtyShipped=Antal afsendt QtyShippedShort=Antal skibe. QtyPreparedOrShipped=Antal forberedt eller afsendt -QtyToShip=Qty til skibet +QtyToShip=Antal til afsendelse QtyToReceive=Antal at modtage QtyReceived=Antal modtagne QtyInOtherShipments=Antal i andre forsendelser @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Andre sendings for denne ordre SendingsAndReceivingForSameOrder=Forsendelser og kvitteringer for denne ordre SendingsToValidate=Henvist til bekræfte StatusSendingCanceled=Aflyst +StatusSendingCanceledShort=Aflyst StatusSendingDraft=Udkast StatusSendingValidated=Bekræftet (varer til afsendelse eller allerede afsendt) StatusSendingProcessed=Forarbejdet @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=Du skal først bekræfte ordren, inden du kan f # Sending methods # ModelDocument DocumentModelTyphon=Mere komplet dokument model for levering kvitteringer (logo. ..) +DocumentModelStorm=Mere komplet dokumentmodel for leveringskvitteringer og ekstrafields kompatibilitet (logo ...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Konstant EXPEDITION_ADDON_NUMBER ikke defineret SumOfProductVolumes=Summen af ​​produktmængder SumOfProductWeights=Summen af ​​produktvægt diff --git a/htdocs/langs/da_DK/stocks.lang b/htdocs/langs/da_DK/stocks.lang index 5c024d33a93..e4de3145acb 100644 --- a/htdocs/langs/da_DK/stocks.lang +++ b/htdocs/langs/da_DK/stocks.lang @@ -34,7 +34,7 @@ StockMovementForId=Bevægelses-id %d ListMouvementStockProject=Liste over lagerbevægelser forbundet med projektet StocksArea=Pakhuse AllWarehouses=Alle lagre -IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock +IncludeEmptyDesiredStock=Inkluder også negativ bestand med udefineret ønsket lager IncludeAlsoDraftOrders=Medtag også udkast til ordrer Location=Placering LocationSummary=Kort placerings navn @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Indstil et lager med salgsordrer UserDefaultWarehouse=Indstil et lager til brugere MainDefaultWarehouse=Standardlager @@ -122,9 +123,9 @@ DesiredStockDesc=Dette lagerbeløb er den værdi, der bruges til at fylde lagere StockToBuy=At bestille Replenishment=genopfyldning ReplenishmentOrders=Replenishment ordrer -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=I henhold til stigning / formindskelse af aktieoptioner kan fysisk aktie og virtuel aktie (fysisk aktie + åbne ordrer) variere +UseRealStockByDefault=Brug ægte lager i stedet for virtuel lager til genopfyldningsfunktion +ReplenishmentCalculation=Mængden til ordren vil være (ønsket mængde - reel lager) i stedet for (ønsket mængde - virtuel lager) UseVirtualStock=Brug virtuelt lager UsePhysicalStock=Brug fysisk lager CurentSelectionMode=Aktuel valgtilstand @@ -236,7 +237,8 @@ AlwaysShowFullArbo=Vis hele træets lagertrin ved pop op af warehouse-links (Adv StockAtDatePastDesc=Du kan her se aktien (ægte aktier) på en given dato i fortiden StockAtDateFutureDesc=Du kan her se bestanden (virtuel bestand) på en given dato fremover CurrentStock=Aktuel lager -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) +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 +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. diff --git a/htdocs/langs/da_DK/ticket.lang b/htdocs/langs/da_DK/ticket.lang index 9bc8f5b81c7..86d053f9cc4 100644 --- a/htdocs/langs/da_DK/ticket.lang +++ b/htdocs/langs/da_DK/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Opgaver - Typer TicketDictCategory=Opgave - Grupper TicketDictSeverity=Opgave - Sværhedsgrader TicketDictResolution=Opgave - Afsluttet -TicketTypeShortBUGSOFT=Funktionssvigt logik -TicketTypeShortBUGHARD=Funktionssvigt udstyr -TicketTypeShortCOM=Kommercielt spørgsmål +TicketTypeShortCOM=Kommercielt spørgsmål TicketTypeShortHELP=Anmodning om hjælp TicketTypeShortISSUE=Problem, fejl eller problemer TicketTypeShortREQUEST=Skift eller anmodning om forbedring @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Andre TicketSeverityShortLOW=Lav TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=Høj -TicketSeverityShortBLOCKING=Kritiske / Blokering +TicketSeverityShortBLOCKING=Kritisk, blokering ErrorBadEmailAddress=Felt '%s' forkert MenuTicketMyAssign=Mine opgaver @@ -60,7 +58,6 @@ OriginEmail=Email kilde Notify_TICKET_SENTBYMAIL=Send opgaver besked via Email # Status -NotRead=Ikke læst Read=Læs Assigned=Tildelt InProgress=I gang @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Offentlig grænseflade tillader alle besøgen TicketsAutoAssignTicket=Tildel automatisk brugeren, der oprettede opgaven TicketsAutoAssignTicketHelp=Når du opretter en opgave, kan brugeren automatisk tildeles opgaven. 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 @@ -164,7 +162,7 @@ TicketCategory=Gruppe SeeTicket=Se opgave TicketMarkedAsRead=Opgaven er blevet markeret som læst TicketReadOn=Læs videre -TicketCloseOn=Udløbsdato +TicketCloseOn=lukke dato MarkAsRead=Markér opgaven som læst TicketHistory=Opgave historik AssignUser=Tildel til bruger @@ -224,7 +222,7 @@ InitialMessage=Indledende besked LinkToAContract=Link til en kontrakt TicketPleaseSelectAContract=Vælg en kontrakt UnableToCreateInterIfNoSocid=Kan ikke oprette en intervention, når der ikke er defineret nogen tredjepart -TicketMailExchanges=Email udvekslinger +TicketMailExchanges=Email udveksling TicketInitialMessageModified=Indledende besked ændret TicketMessageSuccesfullyUpdated=Meddelelsen er opdateret TicketChangeStatus=Skift status @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status ændret: %s til %s TicketNotNotifyTiersAtCreate=Ikke underret firma på create Unread=Ulæst TicketNotCreatedFromPublicInterface=Ikke tilgængelig. Opgaven blev ikke oprettet fra den offentlige grænseflade. -PublicInterfaceNotEnabled=Den offentlige grænseflade var ikke aktiveret ErrorTicketRefRequired=Opgave reference navn er påkrævet # diff --git a/htdocs/langs/da_DK/website.lang b/htdocs/langs/da_DK/website.lang index 35d95b5bc5e..ec009b5ebf1 100644 --- a/htdocs/langs/da_DK/website.lang +++ b/htdocs/langs/da_DK/website.lang @@ -30,7 +30,6 @@ EditInLine=Rediger inline AddWebsite=Tilføj hjemmeside Webpage=Webside / container AddPage=Tilføj side / container -HomePage=Hjemmeside PageContainer=Side PreviewOfSiteNotYetAvailable=Forhåndsvisning af dit websted <strong> %s </ strong> endnu ikke tilgængeligt. Du skal først <strong> Importer en fuld hjemmeside skabelon </ strong> 'eller bare <strong> Tilføj en side / container </ strong>'. RequestedPageHasNoContentYet=Den ønskede side med id %s har intet indhold endnu, eller cache-filen .tpl.php blev fjernet. Rediger indholdet på siden for at løse dette. @@ -101,7 +100,7 @@ EmptyPage=Tom side ExternalURLMustStartWithHttp=Ekstern webadresse skal starte med http: // eller https: // ZipOfWebsitePackageToImport=Upload Zip-filen i webstedsskabelonpakken ZipOfWebsitePackageToLoad=eller vælg en tilgængelig indbygget websteds skabelonpakke -ShowSubcontainers=Inkluder dynamisk indhold +ShowSubcontainers=Vis dynamisk indhold InternalURLOfPage=Intern webadresse for siden ThisPageIsTranslationOf=Denne side / container er en oversættelse af ThisPageHasTranslationPages=Denne side / container har oversættelse @@ -137,3 +136,4 @@ RSSFeedDesc=Du kan få et RSS-feed af de nyeste artikler med typen 'blogpost' ve 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. diff --git a/htdocs/langs/da_DK/withdrawals.lang b/htdocs/langs/da_DK/withdrawals.lang index 0ae1c22b6f9..7ddd6401d6f 100644 --- a/htdocs/langs/da_DK/withdrawals.lang +++ b/htdocs/langs/da_DK/withdrawals.lang @@ -42,6 +42,7 @@ LastWithdrawalReceipt=Seneste %s direkte debit kvitteringer MakeWithdrawRequest=Lav en anmodning om direkte debitering MakeBankTransferOrder=Foretag en kreditoverførselsanmodning WithdrawRequestsDone=%s anmodninger om direkte debitering indbetalt +BankTransferRequestsDone=%s kredit overførselsanmodninger registreret ThirdPartyBankCode=Tredjeparts bankkode NoInvoiceCouldBeWithdrawed=Ingen faktura debiteres med succes. Kontroller, at fakturaer er på virksomheder med en gyldig IBAN, og at IBAN har en UMR (Unique Mandate Reference) med tilstanden <strong> %s </ strong>. ClassCredited=Klassificere krediteres @@ -63,7 +64,7 @@ InvoiceRefused=Faktura nægtet (Oplad afvisningen til kunden) StatusDebitCredit=Status debet / kredit StatusWaiting=Venter StatusTrans=Transmitteret -StatusDebited=Debited +StatusDebited=Debiteret StatusCredited=Krediteres StatusPaid=Betalt StatusRefused=Afviste @@ -79,13 +80,13 @@ StatusMotif8=Andre grunde CreateForSepaFRST=Opret direkte debit fil (SEPA FRST) CreateForSepaRCUR=Opret direkte debitering fil (SEPA RCUR) CreateAll=Opret direkte debitfil (alle) -CreateFileForPaymentByBankTransfer=Create file for credit transfer +CreateFileForPaymentByBankTransfer=Opret fil til kreditoverførsel CreateSepaFileForPaymentByBankTransfer=Opret kreditoverførselsfil (SEPA) CreateGuichet=Kun kontor CreateBanque=Kun bank OrderWaiting=Venter på behandling -NotifyTransmision=Record file transmission of order -NotifyCredit=Record credit of order +NotifyTransmision=Registrer filoverførsel af ordre +NotifyCredit=Registrer ordrekredit NumeroNationalEmetter=National Transmitter Antal WithBankUsingRIB=For bankkonti ved hjælp af RIB WithBankUsingBANBIC=For bankkonti ved hjælp af IBAN / BIC / SWIFT @@ -97,8 +98,8 @@ ShowWithdraw=Vis direkte debiteringsordre IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Hvis fakturaen dog har mindst en betalingsordre til direkte debitering, der endnu ikke er behandlet, indstilles den ikke til at blive betalt for at tillade forudgående udtræksstyring. DoStandingOrdersBeforePayments=Denne fane giver dig mulighed for at anmode om en betalingsordre med direkte debitering. Når det er gjort, skal du gå til menuen Bank-> Betaling med direkte debet for at generere og administrere direkte debetordre. Når ordre med direkte debitering lukkes, registreres betaling på fakturaer automatisk, og fakturaer lukkes, hvis resten til betaling er null. DoCreditTransferBeforePayments=Denne fane giver dig mulighed for at anmode om en kredit overførselsordre. Når det er gjort, skal du gå til menuen Bank-> Betaling med kreditoverførsel for at generere og administrere kredit overførselsordren. Når pengeoverførsel er lukket, vil betaling på fakturaer oplysninger registreres automatisk, og fakturaer lukkes, hvis resten til løn er nul.\n  -WithdrawalFile=Debit order file -CreditTransferFile=Credit transfer file +WithdrawalFile=Debiteringsfil +CreditTransferFile=Kreditoverførselsfil SetToStatusSent=Sæt til status "Fil sendt" ThisWillAlsoAddPaymentOnInvoice=Dette registrerer også betalinger på fakturaer og klassificerer dem som "Betalt", hvis resterende betaling er null StatisticsByLineStatus=Statistikker efter status af linjer @@ -124,14 +125,15 @@ SEPAFrstOrRecur=Betalings type ModeRECUR=Tilbagevendende betaling ModeFRST=Engangsbetaling PleaseCheckOne=Tjek venligst kun en -CreditTransferOrderCreated=Credit transfer order %s created +CreditTransferOrderCreated=Kreditoverførselsordre %s oprettet DirectDebitOrderCreated=Direkte debitering %s oprettet AmountRequested=Beløb anmodet SEPARCUR=SEPA CUR SEPAFRST=SEPA FRST ExecutionDate=Udførelsesdato CreateForSepa=Opret direkte debitering fil -ICS=Kreditor identifikator CI +ICS=Kreditor identifikator CI til direkte debitering +ICSTransfer=Kreditor identifikator CI til bankoverførsel END_TO_END=SEPA XML-tag "EndToEndId" - Unikt id tildelt pr. Transaktion USTRD="Ustruktureret" SEPA XML-tag ADDDAYS=Tilføj dage til udførelsesdato @@ -145,4 +147,6 @@ InfoTransData=Beløb: %s <br> Methodology: %s <br> Dato: %s InfoRejectSubject=Betalingsordren afvises InfoRejectMessage=Hej, <br> <br> Betalingsordre for faktura %s relateret til firmaet %s, med et beløb på %s er blevet afvist af banken. <br> <br> <br> <br> %s ModeWarning=Mulighed for real mode ikke var indstillet, vi stopper efter denne simulation -ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorCompanyHasDuplicateDefaultBAN=Virksomhed med id %s har mere end en standard bankkonto. Ingen måde at vide, hvilken man skal bruge. +ErrorICSmissing=Mangler ICS på bankkonto %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Det samlede beløb for direkte debiteringsordre adskiller sig fra summen af linjer diff --git a/htdocs/langs/da_DK/workflow.lang b/htdocs/langs/da_DK/workflow.lang index a9659eb77ee..c129a7244fb 100644 --- a/htdocs/langs/da_DK/workflow.lang +++ b/htdocs/langs/da_DK/workflow.lang @@ -16,8 +16,10 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Klassificer den tilknyttede kildes # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Klassificer tilsluttet kildeleverandørforslag som faktureret, når leverandørfakturaen er bekræftet (og hvis fakturaens størrelse er det samme som det samlede beløb for det linkede forslag) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Klassificer købt købsordre med kilden som faktureret, når leverandørfakturaen er bekræftet (og hvis fakturaens størrelse er den samme som det samlede beløb for den tilknyttede ordre) -descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +descWORKFLOW_BILL_ON_RECEPTION=Klassificer modtagelser til "faktureret", når en linket leverandørordre valideres # Autoclose intervention -descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Luk alle indgreb, der er knyttet til billetten, når en billet er lukket AutomaticCreation=Automatisk oprettelse AutomaticClassification=Automatisk klassificering +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Klassificer tilknyttet kildeforsendelse som lukket, når kundefaktura er valideret diff --git a/htdocs/langs/de_AT/accountancy.lang b/htdocs/langs/de_AT/accountancy.lang index f2d0909a71e..2caaa72c1fd 100644 --- a/htdocs/langs/de_AT/accountancy.lang +++ b/htdocs/langs/de_AT/accountancy.lang @@ -1,2 +1,3 @@ # 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 1e86ef15672..2cae2180393 100644 --- a/htdocs/langs/de_AT/admin.lang +++ b/htdocs/langs/de_AT/admin.lang @@ -72,6 +72,7 @@ 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 @@ -147,6 +148,7 @@ 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/boxes.lang b/htdocs/langs/de_AT/boxes.lang index 08c21e780d9..33329e3f2b2 100644 --- a/htdocs/langs/de_AT/boxes.lang +++ b/htdocs/langs/de_AT/boxes.lang @@ -1,2 +1,3 @@ # Dolibarr language file - Source file is en_US - boxes BoxCurrentAccounts=Aktueller Saldo +BoxCustomersOrdersPerMonth=Bestellungen pro Monat diff --git a/htdocs/langs/de_AT/mails.lang b/htdocs/langs/de_AT/mails.lang index 3c3f69af33e..dc53b9e6bab 100644 --- a/htdocs/langs/de_AT/mails.lang +++ b/htdocs/langs/de_AT/mails.lang @@ -8,5 +8,3 @@ MailingArea=E-Mail-Kampagnenübersicht MailNoChangePossible=Die Empfängerliste einer freigegebenen E-Mail-Kampagne kann nicht mehr geändert werden LimitSendingEmailing=Aus Sicherheits- und Zeitüberschreitungsgründen ist der Online-Versadn von E-Mails auf <b>%s</b> Empfänger je Sitzung beschränkt. IdRecord=Eintrags ID -ANotificationsWillBeSent=1 Benachrichtigung wird per E-Mail versandt -ListOfNotificationsDone=Liste aller versandten E-Mail-Benachrichtigungen diff --git a/htdocs/langs/de_AT/mrp.lang b/htdocs/langs/de_AT/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/de_AT/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/de_AT/products.lang b/htdocs/langs/de_AT/products.lang index d4e36dd82c8..454cbcab118 100644 --- a/htdocs/langs/de_AT/products.lang +++ b/htdocs/langs/de_AT/products.lang @@ -17,6 +17,7 @@ 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? @@ -30,4 +31,3 @@ ListProductByPopularity=Liste der Produkte/Services nach Beliebtheit ListServiceByPopularity=Liste der Services nach Beliebtheit Finished=Eigenerzeugung NewRefForClone=Artikel Nr. des neuen Produkts/Services -CustomCode=Customs / Commodity / HS code diff --git a/htdocs/langs/de_AT/withdrawals.lang b/htdocs/langs/de_AT/withdrawals.lang index 1e452c7a2bd..3ae942e5927 100644 --- a/htdocs/langs/de_AT/withdrawals.lang +++ b/htdocs/langs/de_AT/withdrawals.lang @@ -5,3 +5,4 @@ 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 afe0da5d99f..0a0ec0ef160 100644 --- a/htdocs/langs/de_CH/accountancy.lang +++ b/htdocs/langs/de_CH/accountancy.lang @@ -104,7 +104,7 @@ 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=Zu verbindende Elemente pro Bildschirmseite (Empfohlen max. 50) +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) @@ -139,7 +139,6 @@ LetteringCode=Beschriftung JournalLabel=Journalbezeichnung TransactionNumShort=Transaktionsnummer AccountingCategory=Eigene Kontogruppen -GroupByAccountAccounting=Sortiere nach Buchhaltungskonto AccountingAccountGroupsDesc=Trage hier deine eigenen Buchhaltungs - Kontogruppen ein. Daraus kannst du spezielle Berichte erzeugen. ByAccounts=Nach Konto ByPredefinedAccountGroups=Nach Gruppe @@ -187,7 +186,6 @@ DescClosure=Du siehst hier die Bewegungen pro Monat des offenen Geschäftsjahres OverviewOfMovementsNotValidated=Schritt 1: Nicht frei gegebene Bewegungen (Die müssen für den Jahresabschluss bearbeitet sein). ValidateMovements=Kontobewegungen freigeben DescValidateMovements=Für den Abschluss müssen alle Kontobewegungen frei gegeben sein. Danach sind sie nicht mehr änderbar. -SelectMonthAndValidate=Wähle den Monat, um dessen Bewegungen frei zu geben. ValidateHistory=Automatisch verknüpfen AutomaticBindingDone=Automatisches Verknüpfen abgeschlossen ErrorAccountancyCodeIsAlreadyUse=Hoppla, dieses Buchhaltungskonto wird noch verwendet - du kannst es deshalb nicht löschen. diff --git a/htdocs/langs/de_CH/admin.lang b/htdocs/langs/de_CH/admin.lang index 951b6e8c534..b81530cabec 100644 --- a/htdocs/langs/de_CH/admin.lang +++ b/htdocs/langs/de_CH/admin.lang @@ -74,8 +74,6 @@ Language_en_US_es_MX_etc=Sprache setzen (de_CH, en_GB,...) SystemToolsAreaDesc=Dieser Bereich ist voll mit Administratorfunktionen - Wähle im Menu aus. Purge=Säubern PurgeAreaDesc=Hier können Sie alle vom System erzeugten und gespeicherten Dateien löschen (temporäre Dateien oder alle Dateien im Verzeichnis <b>%s</b>). Diese Funktion ist richtet sich vorwiegend an Benutzer ohne Zugriff auf das Dateisystem des Webservers (z.B. Hostingpakete) -PurgeDeleteTemporaryFiles=Lösche alle Temporären Dateien. Dabei gehen keine Arbeitsdaten verloren.\nHinweis: Das funktioniert nur, wenn das Verzeichnis 'Temp' seit 24h da ist. -PurgeDeleteTemporaryFilesShort=Temporärdateien löschen PurgeDeleteAllFilesInDocumentsDir=Alle Dateien im Verzeichnis <b>%s</b> löschen. <br> Dadurch werden alle generierten Dokumente gelöscht, die sich auf Elemente (Geschäftspartner, Rechnungen usw.), Dateien, die in das ECM-Modul hochgeladen wurden, Datenbank-Backup-Dumps und temporäre Dateien beziehen. PurgeNDirectoriesDeleted=<b>%s</b> Dateien oder Verzeichnisse gelöscht. PurgeNDirectoriesFailed=Löschen von <b>%s</b> Dateien oder Verzeichnisse fehlgeschlagen. @@ -205,7 +203,6 @@ HideDescOnPDF=Verstecke Produktbeschreibungen HideRefOnPDF=Verstecke Produktnummern HideDetailsOnPDF=Verstecke Produktzeilen PlaceCustomerAddressToIsoLocation=ISO Position für die Kundenadresse verwenden -ButtonHideUnauthorized=Buttons für Nicht-Admins ausblenden anstatt ausgrauen? OldVATRates=Alter MwSt. Satz NewVATRates=Neuer MwSt. Satz MassConvert=Massenkonvertierung starten @@ -323,6 +320,7 @@ 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. @@ -464,6 +462,7 @@ 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/banks.lang b/htdocs/langs/de_CH/banks.lang index b0dd8f505a0..68eae87b2c8 100644 --- a/htdocs/langs/de_CH/banks.lang +++ b/htdocs/langs/de_CH/banks.lang @@ -86,8 +86,6 @@ SEPAMandate=SEPA - Mandat YourSEPAMandate=Dein SEPA - Mandat FindYourSEPAMandate=Dein SEPA - Mandat berechtigt uns, Aufträge via LSV direkt deinem Bankkonto zu belasten. Bitte schick uns das unterschrieben retour, oder Scanne- und Maile es an AutoReportLastAccountStatement=Das Feld "Kontoauszug" automatisch mit der letzten bekannten Kontoauszugsnummer ausfüllen, beim Ausgleichen. -CashControl=POS - Bartransaktion -NewCashFence=Neue Bartransaktion BankColorizeMovement=Transaktionen einfärben BankColorizeMovementDesc=Wenn du das einschaltest, kannst du für Belastungen und Gutschriften separate Farben für die Anzeige wählen. BankColorizeMovementName1=Hintergrundfarbe für Belastungen diff --git a/htdocs/langs/de_CH/boxes.lang b/htdocs/langs/de_CH/boxes.lang index e597dd56def..e4f64b3302a 100644 --- a/htdocs/langs/de_CH/boxes.lang +++ b/htdocs/langs/de_CH/boxes.lang @@ -37,6 +37,7 @@ BoxTitleLatestModifiedBoms=Die neuesten %s geänderten Materiallisten (BOMs) BoxTitleLatestModifiedMos=Die neuesten %s geänderten Fertigungsaufträge BoxGoodCustomers=Guter Kunde LastRefreshDate=Datum der letzten Aktualisierung +NoRecordedBookmarks=Keine Lesezeichen gesetzt. Klicken Sie <a href="%s">hier</a>, um ein Lesezeichen zu setzen. NoRecordedCustomers=Keine erfassten Kunden NoRecordedContacts=Keine erfassten Kontakte NoRecordedInterventions=Keine verzeichneten Einsätze @@ -56,7 +57,6 @@ LastXMonthRolling=%s letzte Monate gleitend ChooseBoxToAdd=Box zum Dashboard hinzufügen BoxAdded=Box zum Dashboard hinzugefügt BoxTitleUserBirthdaysOfMonth=Benutzer - Geburtstage dieses Monates -BoxLastManualEntries=Die neuesten von Hand gebuchten Einträge NoRecordedManualEntries=Es gibt keine manuell hinzugefügte Einträge in der Buchhaltung BoxSuspenseAccount=Anzahl Buchungen in Wartestellung BoxTitleSuspenseAccount=Nicht kontierte Positionen diff --git a/htdocs/langs/de_CH/categories.lang b/htdocs/langs/de_CH/categories.lang index 589f21b1d0e..974a26170ae 100644 --- a/htdocs/langs/de_CH/categories.lang +++ b/htdocs/langs/de_CH/categories.lang @@ -58,15 +58,11 @@ AccountsCategoriesShort=Kontenschlagworte / -kategorien ProjectsCategoriesShort=Projektschlagworte / -kateorien UsersCategoriesShort=Benutzerschlagworte und -kategorien CategId=Schlagwort / Kategorie ID -CatSupList=Liste der Lieferantenschlagworte / -kategorien -CatCusList=Liste der Kunden-/ Interessentenschlagworte / -kategorien CatProdList=Liste der Produktschlagworte / -kategorien CatMemberList=Liste der Mitgliederschlagworte / -kategorien -CatContactList=Liste der Kontaktschlagworte / -kategorien -CatSupLinks=Verbindung zwischen Lieferanten und Schlagwörtern / Kategorien CatCusLinks=Verbindung zwischen Kunden-/Leads und Schlagwörtern / Kategorien CatProdLinks=Verbindung zwischen Produkten/Leistungen und Schlagwörtern / Kategorien -CatProJectLinks=Verknüpfungen zwischen Projekten und Schlagwörtern / Kategorien +CatProjectsLinks=Verknüpfungen zwischen Projekten und Schlagwörtern / Kategorien ExtraFieldsCategories=Ergänzende Eigenschaften CategoriesSetup=Suchwörter/Kategorien Einrichten CategorieRecursiv=Automatisch mit übergeordnetem Schlagwort / Kategorie verbinden diff --git a/htdocs/langs/de_CH/cron.lang b/htdocs/langs/de_CH/cron.lang index cc4ff19f7eb..137bb7f08e8 100644 --- a/htdocs/langs/de_CH/cron.lang +++ b/htdocs/langs/de_CH/cron.lang @@ -4,6 +4,5 @@ EnabledAndDisabled=Aktiviert und deaktiviert CronDtStart=Nicht vor CronDtEnd=Nicht nach JobFinished=Job gestarted und beendet -UseMenuModuleToolsToAddCronJobs=Öffnen Sie das Menü "Start - Module Werkzeuge - Cronjob Liste" um geplante Skript-Aufgaben zu sehen und zu verändern. JobDisabled=Job deaktiviert MakeLocalDatabaseDumpShort=Lokale Datenbanksicherung diff --git a/htdocs/langs/de_CH/mails.lang b/htdocs/langs/de_CH/mails.lang index 3bcda95e62c..b279747d723 100644 --- a/htdocs/langs/de_CH/mails.lang +++ b/htdocs/langs/de_CH/mails.lang @@ -28,10 +28,6 @@ ToAddRecipientsChooseHere=Fügen Sie Empfänger über die Listenauswahl hinzu NbOfEMailingsSend=E-Mail-Kampagne versandt TagUnsubscribe=Abmelde Link NoEmailSentBadSenderOrRecipientEmail=Kein E-Mail gesendet. Ungültige Absender oder Empfänger Adresse. Benutzerprofil kontrollieren. -NoNotificationsWillBeSent=Für dieses Ereignis und diesen Geschäftspartner sind keine Benachrichtigungen geplant -ANotificationsWillBeSent=Eine Benachrichtigung wird per E-Mail versandt -SomeNotificationsWillBeSent=%s Benachrichtigungen werden per E-Mail versandt -ListOfNotificationsDone=Liste aller versandten E-Mail Benachrichtigungen MailSendSetupIs2=Sie müssen zuerst mit einem Admin-Konto im Menü %sStart - Einstellungen - EMails%s den Parameter <strong>'%s'</strong> auf den Modus '%s' ändern. Dann können Sie die Daten des SMTP-Servers von Ihrem Internetdienstanbieter eingeben und die E-Mail-Kampagnen-Funktion nutzen. MailAdvTargetRecipients=Empfänger (Erweiterte Selektion) AdvTgtSearchIntHelp=Intervall verwenden um den Zahlenwert auszuwählen diff --git a/htdocs/langs/de_CH/mrp.lang b/htdocs/langs/de_CH/mrp.lang index 81048e8f8b6..0f4ccf47087 100644 --- a/htdocs/langs/de_CH/mrp.lang +++ b/htdocs/langs/de_CH/mrp.lang @@ -1,2 +1,7 @@ # Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material BOMsSetup=Einstellungen Modul Materiallisten (BOM) +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/de_CH/products.lang b/htdocs/langs/de_CH/products.lang index ea19db34f53..b2ef1eb5c60 100644 --- a/htdocs/langs/de_CH/products.lang +++ b/htdocs/langs/de_CH/products.lang @@ -38,6 +38,7 @@ 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 @@ -64,7 +65,6 @@ BuyingPrices=Einkaufspreise CustomerPrices=Kunden Preise SuppliersPrices=Lieferantenpreise SuppliersPricesOfProductsOrServices=Anbieterpreise -CustomCode=Zolltarifnummer (z.B. HSN) set=gesetzt se=gesetzt kilogram=Kilo @@ -78,7 +78,6 @@ unitCM3=Kubikcentimeter unitMM3=Kubikmillimeter ServiceCodeModel=Vorlage für Dienstleistungs-Referenz DisablePriceByQty=Staffelpreise sperren -MultipriceRules=Regeln für Preissegmente UseMultipriceRules=Mit diesen Regeln für Preisstufen kann man automatisch von der ersten Stufe aus die Preise der folgenden Stufen ausrechnen lassen.\nDie Regeln werden im Modul - Setup hinterlegt. KeepEmptyForAutoCalculation=Für automatische Berechnung kannst du das einfach leer lassen. VariantRefExample=Zum Beispiel: Col, Gr. diff --git a/htdocs/langs/de_CH/sendings.lang b/htdocs/langs/de_CH/sendings.lang index ec1ab38899a..e03dac2f60c 100644 --- a/htdocs/langs/de_CH/sendings.lang +++ b/htdocs/langs/de_CH/sendings.lang @@ -1,7 +1,12 @@ # Dolibarr language file - Source file is en_US - sendings RefSending=Versand Nr. SendingCard=Auslieferungen +QtyToShip=Versandmenge KeepToShip=Zum Versand behalten +StatusSendingCanceledShort=widerrufen +StatusSendingProcessed=Verarbeitete +StatusSendingProcessedShort=Fertig +SendingSheet=Auslieferungen WarningNoQtyLeftToSend=Achtung, keine Produkte für den Versand StatsOnShipmentsOnlyValidated=Versandstatistik (nur Freigegebene). Das Datum ist das der Freigabe (geplantes Lieferdatum ist nicht immer bekannt). ClassifyReception=Lieferung klassifizieren diff --git a/htdocs/langs/de_CH/ticket.lang b/htdocs/langs/de_CH/ticket.lang index 2c200f923ce..18ff7a30fab 100644 --- a/htdocs/langs/de_CH/ticket.lang +++ b/htdocs/langs/de_CH/ticket.lang @@ -1,6 +1,5 @@ # Dolibarr language file - Source file is en_US - ticket TypeContact_ticket_external_SUPPORTCLI=Kundenkontakt / Störfallverfolgung -NotRead=Ungelesen InProgress=In Bearbeitung TicketCloseOn=Schliessungsdatum TicketAddIntervention=Einsatz erstellen diff --git a/htdocs/langs/de_CH/withdrawals.lang b/htdocs/langs/de_CH/withdrawals.lang index 4a0aee41836..72755cae42a 100644 --- a/htdocs/langs/de_CH/withdrawals.lang +++ b/htdocs/langs/de_CH/withdrawals.lang @@ -6,3 +6,4 @@ 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 112d1879d15..8e2382d07d4 100644 --- a/htdocs/langs/de_DE/accountancy.lang +++ b/htdocs/langs/de_DE/accountancy.lang @@ -16,16 +16,18 @@ ThisService=Diese Leistung ThisProduct=Dieses Produkt DefaultForService=Standard für Leistung DefaultForProduct=Standard für Produkt +ProductForThisThirdparty=Produkt für diesen Partner +ServiceForThisThirdparty=Leistungen für diesen Partner CantSuggest=Kann keines vorschlagen AccountancySetupDoneFromAccountancyMenu=Die wichtigste Teil der Konfiguration der Buchhaltung aus dem Menü %s wurde erledigt -ConfigAccountingExpert=Configuration of the module accounting (double entry) +ConfigAccountingExpert=Konfiguration des Moduls Buchhaltung (doppelt) Journalization=Journalisieren Journals=Journale JournalFinancial=Finanzjournale BackToChartofaccounts=Zurück zum Kontenplan Chartofaccounts=Kontenplan -ChartOfSubaccounts=Chart of individual accounts -ChartOfIndividualAccountsOfSubsidiaryLedger=Chart of individual accounts of the subsidiary ledger +ChartOfSubaccounts=Plan der einzelnen Konten +ChartOfIndividualAccountsOfSubsidiaryLedger=Plan der Einzelkonten des Nebenbuchs CurrentDedicatedAccountingAccount=Aktuelles dediziertes Konto AssignDedicatedAccountingAccount=Neues Konto zuweisen InvoiceLabel=Rechnungsanschrift @@ -35,8 +37,8 @@ OtherInfo=Zusatzinformationen DeleteCptCategory=Buchhaltungskonto aus Gruppe entfernen ConfirmDeleteCptCategory=Soll dieses Buchhaltungskonto wirklich aus der Gruppe entfernt werden? JournalizationInLedgerStatus=Status der Journalisierung -AlreadyInGeneralLedger=Already transferred in accounting journals and ledger -NotYetInGeneralLedger=Not yet transferred in accouting journals and ledger +AlreadyInGeneralLedger=Bereits in Buchhaltungsjournale und Hauptbuch übertragen +NotYetInGeneralLedger=Noch nicht in Buchhaltungsjournale und Hauptbuch übertragen GroupIsEmptyCheckSetup=Gruppe ist leer, kontrollieren Sie die persönlichen Kontogruppen DetailByAccount=Detail pro Konto zeigen AccountWithNonZeroValues=Konto mit Werten != 0 @@ -46,8 +48,9 @@ CountriesNotInEEC=Nicht-EU Länder CountriesInEECExceptMe=EU-Länder außer %s CountriesExceptMe=Alle Länder außer %s AccountantFiles=Belegdokumente exportieren -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. +ExportAccountingSourceDocHelp=Mit diesem Tool können Sie die Quellereignisse (Liste und PDFs) exportieren, die zum Generieren Ihrer Buchhaltung verwendet wurden. Verwenden Sie zum Exportieren Ihrer Journale den Menüeintrag %s - %s. VueByAccountAccounting=Ansicht nach Buchhaltungskonto +VueBySubAccountAccounting=Ansicht nach Buchhaltungsunterkonto MainAccountForCustomersNotDefined=Standardkonto für Kunden im Setup nicht definiert MainAccountForSuppliersNotDefined=Standardkonto für Lieferanten die nicht im Setup definiert sind @@ -83,7 +86,7 @@ AccountancyAreaDescAnalyze=SCHRITT %s: Vorhandene Transaktionen hinzufügen oder AccountancyAreaDescClosePeriod=SCHRITT %s: Schließen Sie die Periode, damit wir in Zukunft keine Veränderungen vornehmen können. -TheJournalCodeIsNotDefinedOnSomeBankAccount=A mandatory step in setup has not been completed (accounting code journal not defined for all bank accounts) +TheJournalCodeIsNotDefinedOnSomeBankAccount=Eine erforderliche Einrichtung wurde nicht abgeschlossen. (Kontierungsinformationen fehlen bei einigen Bankkonten) Selectchartofaccounts=Aktiven Kontenplan wählen ChangeAndLoad=ändern & laden Addanaccount=Fügen Sie ein Buchhaltungskonto hinzu @@ -93,8 +96,8 @@ SubledgerAccount=Nebenbuchkonto SubledgerAccountLabel=Nebenbuchkonto-Bezeichnung ShowAccountingAccount=Buchhaltungskonten anzeigen ShowAccountingJournal=Buchhaltungsjournal anzeigen -ShowAccountingAccountInLedger=Show accounting account in ledger -ShowAccountingAccountInJournals=Show accounting account in journals +ShowAccountingAccountInLedger=Buchhaltungskonto im Hauptbuch anzeigen +ShowAccountingAccountInJournals=Buchhaltungskonto in Journalen anzeigen AccountAccountingSuggest=Buchhaltungskonto Vorschlag MenuDefaultAccounts=Standardkonten MenuBankAccounts=Bankkonten @@ -116,7 +119,7 @@ ExpenseReportsVentilation=Spesenabrechnung Zuordnung CreateMvts=neue Transaktion erstellen UpdateMvts=Änderung einer Transaktion ValidTransaction=Transaktion bestätigen -WriteBookKeeping=Register transactions in accounting +WriteBookKeeping=Transaktionen in der Buchhaltung registrieren Bookkeeping=Hauptbuch BookkeepingSubAccount=Nebenbuch AccountBalance=Saldo Sachkonten @@ -144,7 +147,7 @@ NotVentilatedinAccount=Nicht zugeordnet, zu einem Buchhaltungskonto XLineSuccessfullyBinded=%s Produkte/Leistungen erfolgreich an Buchhaltungskonto zugewiesen XLineFailedToBeBinded=%s Produkte/Leistungen waren an kein Buchhaltungskonto zugeordnet -ACCOUNTING_LIMIT_LIST_VENTILATION=Anzahl der Elemente, die zum Kontieren angezeigt werden (empfohlen max. 50) +ACCOUNTING_LIMIT_LIST_VENTILATION=Maximale Zeilenanzahl auf Liste und Kontierungsseite (empfohlen: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Beginnen Sie die Sortierung der Seite "Link zu realisieren“ durch die neuesten Elemente ACCOUNTING_LIST_SORT_VENTILATION_DONE=Beginnen Sie mit der Sortierung der Seite &quot; Zuordnung erledigt &quot; nach den neuesten Elementen @@ -156,8 +159,8 @@ ACCOUNTING_MANAGE_ZERO=Verwalten der Null am Ende eines Buchhaltungskontos. \nIn BANK_DISABLE_DIRECT_INPUT=Deaktivieren der direkte Aufzeichnung von Transaktion auf dem Bankkonto ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Entwurfexport für Journal aktivieren ACCOUNTANCY_COMBO_FOR_AUX=Kombinationsliste für Nebenkonto aktivieren \n(kann langsam sein, wenn Sie viele Geschäftspartner haben) -ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. -ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER=On accountancy transfer, select period show by default +ACCOUNTING_DATE_START_BINDING=Definieren Sie ein Datum, an dem die Bindung und Übertragung in der Buchhaltung beginnen soll. Transaktionen vor diesem Datum werden nicht in die Buchhaltung übertragen. +ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER=Bei der Übertragung der Buchhaltung standardmäßig den Zeitraum anzeigen auswählen anzeigen ACCOUNTING_SELL_JOURNAL=Verkaufsjournal ACCOUNTING_PURCHASE_JOURNAL=Einkaufsjournal @@ -177,7 +180,7 @@ ACCOUNTING_ACCOUNT_SUSPENSE=Buchhaltungskonto in Wartestellung DONATION_ACCOUNTINGACCOUNT=Buchhaltungskonto für Spenden ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Buchhaltungskonto für Abonnements -ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT=Accounting account by default to register customer deposit +ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT=Standard-Buchhaltungskonto zur Registrierung der Kundeneinzahlung ACCOUNTING_PRODUCT_BUY_ACCOUNT=Standard-Buchhaltungskonto für gekaufte Produkte \n(wenn nicht anders im Produktblatt definiert) ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=Standardmäßig Buchhaltungskonto für die gekauften Produkte in der EU (wird verwendet, wenn nicht im Produktblatt definiert) @@ -198,7 +201,8 @@ Docdate=Datum Docref=Referenz LabelAccount=Konto-Beschriftung LabelOperation=Bezeichnung der Operation -Sens=Zweck +Sens=Richtung +AccountingDirectionHelp=Verwenden Sie für ein Buchhaltungskonto eines Kunden «Guthaben», um eine Zahlung zu erfassen, die Sie erhalten haben. <br> Verwenden Sie für ein Buchhaltungskonto eines Lieferanten «Debit», um eine von Ihnen geleistete Zahlung zu erfassen LetteringCode=Beschriftungscode Lettering=Beschriftung Codejournal=Journal @@ -206,23 +210,24 @@ JournalLabel=Journal-Bezeichnung NumPiece=Teilenummer TransactionNumShort=Anz. Buchungen AccountingCategory=Personalisierte Gruppen -GroupByAccountAccounting=Gruppieren nach Buchhaltungskonto +GroupByAccountAccounting=Gruppieren nach Hauptbuchkonto +GroupBySubAccountAccounting=Gruppieren nach Nebenbuchkonto AccountingAccountGroupsDesc=Hier können Kontengruppen definiert werden. Diese werden für personaliserte Buchhaltungsreports verwendet. ByAccounts=Pro Konto ByPredefinedAccountGroups=Pro vordefinierten Gruppen ByPersonalizedAccountGroups=Pro persönlichen Gruppierung ByYear=pro Jahr NotMatch=undefiniert -DeleteMvt=Delete some operation lines from accounting +DeleteMvt=Einige Operationszeilen aus der Buchhaltung löschen DelMonth=Monat zum Löschen DelYear=Jahr zu entfernen DelJournal=Journal zu entfernen -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=Dadurch werden alle Vorgangszeilen der Buchhaltung für das Jahr / den Monat und / oder für ein bestimmtes Journal gelöscht (mindestens ein Kriterium ist erforderlich). Sie müssen die Funktion '%s' erneut verwenden, um den gelöschten Datensatz wieder im Hauptbuch zu haben. +ConfirmDeleteMvtPartial=Dadurch wird die Transaktion aus der Buchhaltung gelöscht (alle mit derselben Transaktion verknüpften Vorgangszeilen werden gelöscht). FinanceJournal=Finanzjournal ExpenseReportsJournal=Spesenabrechnungsjournal DescFinanceJournal=Finanzjournal inklusive aller Arten von Zahlungen mit Bankkonto -DescJournalOnlyBindedVisible=This is a view of record that are bound to an accounting account and can be recorded into the Journals and Ledger. +DescJournalOnlyBindedVisible=Dies ist eine Ansicht von Aufzeichnungen, die an ein Buchhaltungskonto gebunden sind und in den Journalen und im Hauptbuch erfasst werden können. VATAccountNotDefined=Steuerkonto nicht definiert ThirdpartyAccountNotDefined=Konto für Geschäftspartner nicht definiert ProductAccountNotDefined=Konto für Produkt nicht definiert @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Zahlung ist keinem Produkt oder Dienstleistung zugewi OpeningBalance=Eröffnungsbilanz ShowOpeningBalance=Eröffnungsbilanz anzeigen HideOpeningBalance=Eröffnungsbilanz ausblenden -ShowSubtotalByGroup=Zwischensumme nach Gruppe anzeigen +ShowSubtotalByGroup=Zwischensumme nach Ebene anzeigen Pcgtype=Kontenklasse PcgtypeDesc=Kontengruppen werden für einige Buchhaltungsberichte als vordefinierte Filter- und Gruppierungskriterien verwendet. Beispielsweise werden "EINKOMMEN" oder "AUSGABEN" als Gruppen für die Buchhaltung von Produktkonten verwendet, um die Ausgaben- / Einnahmenrechnung zu erstellen. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Kontieren Sie hier in der Liste Spesenabrechnungszeilen DescVentilExpenseReportMore=Wenn Sie beim Buchhaltungskonto den Typen Spesenabrechnungpositionen eingestellt haben, wird die Applikation alle Kontierungen zwischen den Spesenabrechnungspositionen und dem Buchhaltungskonto von Ihrem Kontenrahmen verwenden, durch einen einzigen Klick auf die Schaltfläche <strong> "%s" </strong>. Wenn kein Konto definiert wurde unter Stammdaten / Gebührenarten oder wenn Sie einige Zeilen nicht zu irgendeinem automatischen Konto gebunden haben, müssen Sie die Zuordnung manuell aus dem Menü "<strong> %s </strong>“ machen. DescVentilDoneExpenseReport=Hier finden Sie die Liste der Aufwendungsposten und ihr Gebühren Buchhaltungskonto +Closure=Jahresabschluss DescClosure=Informieren Sie sich hier über die Anzahl der Bewegungen pro Monat, die nicht validiert sind und die bereits in den Geschäftsjahren geöffnet sind. OverviewOfMovementsNotValidated=Schritt 1 / Bewegungsübersicht nicht validiert. \n(Notwendig, um ein Geschäftsjahr abzuschließen.) +AllMovementsWereRecordedAsValidated=Alle Bewegungen wurden als validiert aufgezeichnet +NotAllMovementsCouldBeRecordedAsValidated=Nicht alle Bewegungen konnten als validiert aufgezeichnet werden ValidateMovements=Bewegungen validieren DescValidateMovements=Jegliche Änderung oder Löschung des Schreibens, Beschriftens und Löschens ist untersagt. Alle Eingaben für eine Übung müssen validiert werden, da sonst ein Abschluss nicht möglich ist -SelectMonthAndValidate=Monat auswählen und Bewegungen validieren ValidateHistory=automatisch zuordnen AutomaticBindingDone=automatische Zuordnung erledigt @@ -293,9 +300,10 @@ Accounted=im Hauptbuch erfasst NotYetAccounted=noch nicht im Hauptbuch erfasst ShowTutorial=Tutorial anzeigen NotReconciled=nicht ausgeglichen +WarningRecordWithoutSubledgerAreExcluded=Achtung, alle Vorgänge ohne definiertes Nebenbuchkonto werden gefiltert und von dieser Ansicht ausgeschlossen ## Admin -BindingOptions=Binding options +BindingOptions=Verbindungsoptionen ApplyMassCategories=Massenaktualisierung der Kategorien AddAccountFromBookKeepingWithNoCategories=Verfügbares Konto noch nicht in der personalisierten Gruppe CategoryDeleted=Die Gruppe für das Buchhaltungskonto wurde entfernt @@ -315,9 +323,9 @@ ErrorAccountingJournalIsAlreadyUse=Dieses Journal wird bereits verwendet AccountingAccountForSalesTaxAreDefinedInto=Hinweis: Buchaltungskonten für Steuern sind im Menü <b>%s</b> - <b>%s</b> definiert NumberOfAccountancyEntries=Anzahl der Einträge NumberOfAccountancyMovements=Anzahl der Bewegungen -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=Deaktivieren Sie die Bindung und Übertragung in der Buchhaltung bei Verkäufen (Kundenrechnungen werden in der Buchhaltung nicht berücksichtigt). +ACCOUNTING_DISABLE_BINDING_ON_PURCHASES=Deaktivieren Sie die Bindung und Übertragung in der Buchhaltung bei Einkäufen (Lieferantenrechnungen werden in der Buchhaltung nicht berücksichtigt). +ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS=Deaktivieren Sie die Bindung und Übertragung in der Buchhaltung für Spesenabrechnungen (Spesenabrechnungen werden bei der Buchhaltung nicht berücksichtigt). ## Export ExportDraftJournal=Entwurfsjournal exportieren @@ -337,10 +345,11 @@ Modelcsv_LDCompta10=Export für LD Compta (v10 und höher) Modelcsv_openconcerto=Export für OpenConcerto (Test) Modelcsv_configurable=konfigurierbarer CSV-Export Modelcsv_FEC=Export nach FEC +Modelcsv_FEC2=Export FEC (Mit Datumsgenerierung schriftlich / Dokument umgekehrt) Modelcsv_Sage50_Swiss=Export für Sage 50 (Schweiz) Modelcsv_winfic=Exportiere Winfic - eWinfic - WinSis Compta -Modelcsv_Gestinumv3=Export for Gestinum (v3) -Modelcsv_Gestinumv5Export for Gestinum (v5) +Modelcsv_Gestinumv3=Export für Gestinum (v3) +Modelcsv_Gestinumv5Export für Gestinum (v5) ChartofaccountsId=Kontenplan ID ## Tools - Init accounting account on product / service diff --git a/htdocs/langs/de_DE/admin.lang b/htdocs/langs/de_DE/admin.lang index 7af899574d9..21f0a05f884 100644 --- a/htdocs/langs/de_DE/admin.lang +++ b/htdocs/langs/de_DE/admin.lang @@ -56,6 +56,8 @@ GUISetup=Benutzeroberfläche SetupArea=Einstellungen UploadNewTemplate=Neue Druckvorlage(n) hochladen FormToTestFileUploadForm=Formular für das Testen von Datei-Uplads (je nach Konfiguration) +ModuleMustBeEnabled=Das Modul / die Anwendung <b> %s </b> muss aktiviert sein +ModuleIsEnabled=Das Modul / die Anwendung <b> %s </b> wurde aktiviert 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. @@ -85,7 +87,6 @@ ShowPreview=Vorschau anzeigen ShowHideDetails=Details ein-/ausblenden PreviewNotAvailable=Vorschau nicht verfügbar ThemeCurrentlyActive=derzeit aktivierte grafische Oberfläche -CurrentTimeZone=Aktuelle Zeitzone des PHP-Servers MySQLTimeZone=Aktuelle Zeitzone der SQL-Datenbank TZHasNoEffect=Daten werden vom Datenbank-Server gespeichert und zurückgeliefert, als würde der eingegebene String abgelegt werden. Die Zeitzone hat nur dann eine Auswirkung, wenn die UNIX_TIMESTAMP-Funktion benutzt wird (Dolibarr nutzt diese nicht, daher sollte die Datenbank-TZ keine Rolle spielen, selbst wenn diese nach Dateneingabe geändert wird). Space=Platz @@ -153,8 +154,8 @@ 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=Löschen Sie alle temporären Dateien (kein Datenverlustrisiko). Hinweis: Das Löschen erfolgt nur, wenn das temporäre Verzeichnis vor über 24 Stunden erstellt wurde. -PurgeDeleteTemporaryFilesShort=temporäre Dateien löschen +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. +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 PurgeNothingToDelete=Keine zu löschenden Verzeichnisse oder Dateien @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Bevorzugte Partner OtherResources=Weitere Ressourcen ExternalResources=Externe Ressourcen SocialNetworks=Soziale Netzwerke +SocialNetworkId=ID des sozialen Netzwerks ForDocumentationSeeWiki=Für Benutzer-und Entwickler-Dokumentationen und FAQs<br>werfen Sie bitte einen Blick auf die Dolibarr-Wiki: <br> <a href="%s" target="_blank"><b> %s</b></a> ForAnswersSeeForum=Für alle anderen Fragen können Sie das Dolibarr-Forum <br> <a href="%s" target="_blank"><b> %s</b></a> benutzen. HelpCenterDesc1=In diesem Bereich finden Sie eine Übersicht an verfügbaren Quellen, bei denen Sie im Fall von Problemen und Fragen Unterstützung bekommen können. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Beispiele mit der aktuellen Systemkonfiguration ListOfDirectories=Liste der OpenDocument-Vorlagenverzeichnisse ListOfDirectoriesForModelGenODT=Liste der Verzeichnisse mit Vorlagendateien im OpenDocument-Format.<br><br>Fügen Sie hier den vollständigen Pfad der Verzeichnisse ein.<br>Trennen Sie jedes Verzeichnis mit einem Zeilenumbruch.<br>Verzeichnisse des ECM-Moduls fügen Sie z.B. so ein <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b>.<br><br> Dateien in diesen Verzeichnissen müssen mit <b>.odt</b> oder <b>.ods</b> enden. NumberOfModelFilesFound=Anzahl der in diesen Verzeichnissen gefundenen .odt/.ods-Dokumentvorlagen -ExampleOfDirectoriesForModelGen=Beispiele für Syntax:<br>c:\\mydir<br>/Home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +ExampleOfDirectoriesForModelGen=Beispiele für die Syntax: <br> c:\\myapp\\mydocumentdir\\mysubdir <br> /home/myapp/mydocumentdir/mysubdir <br> DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br>Lesen Sie die Wiki Dokumentation um zu wissen, wie Sie Ihre odt Dokumentenvorlage erstellen, bevor Sie diese in den Kategorien speichern: FullListOnOnlineDocumentation=https://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Reihenfolge von Vor- und Nachname @@ -406,7 +408,7 @@ UrlGenerationParameters=Parameter zum Sichern von URLs SecurityTokenIsUnique=Verwenden Sie einen eindeutigen Sicherheitsschlüssel für jede URL EnterRefToBuildUrl=Geben Sie eine Referenz für das Objekt %s ein GetSecuredUrl=Holen der berechneten URL -ButtonHideUnauthorized=Ausblenden von Schaltflächen für Nicht-Administrator für nicht autorisierte Aktionen, anstatt grau unterlegte deaktivierte Schaltflächen anzuzeigen. +ButtonHideUnauthorized=Verstecke nicht autorisierte Aktionsschaltflächen auch für interne Benutzer (ansonsten nur grau) OldVATRates=Alter Umsatzsteuer-Satz NewVATRates=Neuer Umsatzsteuer-Satz PriceBaseTypeToChange=Ändern Sie den Basispreis definierte nach @@ -442,7 +444,7 @@ 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=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 +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 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) @@ -488,7 +490,7 @@ WarningPHPMailB=- Bei einigen E-Mail-Dienstanbietern (wie Yahoo) können Sie kei WarningPHPMailC=- Interessant ist auch die Verwendung des SMTP-Servers Ihres eigenen E-Mail-Dienstanbieters zum Senden von E-Mails, sodass alle von der Anwendung gesendeten E-Mails auch in dem Verzeichnis "Gesendet" Ihrer Mailbox gespeichert werden. WarningPHPMailD=Wenn die Methode 'PHP Mail' wirklich die Methode ist, die Sie verwenden möchten, können Sie diese Warnung entfernen, indem Sie die Konstante MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP unter Start - Einstellungen - Erweiterte Einstellungen zu 1 hinzufügen. WarningPHPMail2=Wenn Ihr E-Mail-SMTP-Anbieter den E-Mail-Client auf einige IP-Adressen beschränken muss (sehr selten), dann ist dies die IP-Adresse des Mail User Agent (MUA) für ihr Dolibarr-System: <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>. +WarningPHPMailSPF=Wenn der Domainname in Ihrer Absender-E-Mail-Adresse durch einen SPF-Eintrag geschützt ist (beim Registrar des Domainnamens zu erfragen), müssen dem SPF-Eintrag des DNS Ihrer Domain die folgenden IP-Adressen hinzufügt werden: <strong> %s </strong>. ClickToShowDescription=Klicke um die Beschreibung zu sehen DependsOn=Diese Modul benötigt folgenden Module RequiredBy=Diese Modul ist für folgende Module notwendig @@ -554,9 +556,9 @@ Module54Desc=Verwaltung von Verträgen (Dienstleistungen oder wiederkehrende Abo Module55Name=Barcodes Module55Desc=Barcode-Verwaltung Module56Name=Zahlung per Überweisung -Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module56Desc=Verwaltung der Zahlung von Lieferanten durch Überweisungsaufträge. Es beinhaltet die Erstellung von SEPA-Dateien für europäische Länder. Module57Name=Zahlungen per Lastschrifteinzug -Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. +Module57Desc=Verwaltung von Lastschriftaufträgen. Es beinhaltet die Erstellung von SEPA-Dateien für europäische Länder. Module58Name=ClickToDial Module58Desc=ClickToDial-Integration Module60Name=Etiketten @@ -599,7 +601,7 @@ Module520Name=Kredite / Darlehen Module520Desc=Verwaltung von Darlehen Module600Name=Benachrichtigungen über Geschäftsereignisse Module600Desc=E-Mail-Benachrichtigungen senden, die durch ein Geschäftsereignis ausgelöst werden: pro Benutzer (Einrichtung definiert für jeden Benutzer), pro Drittanbieter-Kontakte (Einrichtung definiert für jeden Drittanbieter) oder durch bestimmte E-Mails. -Module600Long=Beachten Sie, dass dieses Modul E-Mails in Echtzeit sendet, wenn ein bestimmtes Geschäftsereignis stattfindet. Wenn Sie nach einer Funktion zum Senden von e-Mail-Erinnerungen für Agenda-Ereignisse suchen, gehen Sie in die Einrichtung den dem Modul Agenda. +Module600Long=Beachten Sie, dass dieses Modul E-Mails in Echtzeit versendet, wenn ein bestimmtes Geschäftsereignis stattfindet. Wenn Sie nach einer Funktion zum Senden von e-Mail-Erinnerungen für Agenda-Ereignisse suchen, gehen Sie in die Einstellungen des Modul Agenda. Module610Name=Produktvarianten Module610Desc=Erlaubt das Erstellen von Produktvarianten, basierend auf Merkmalen (Farbe, Grösse, ...) Module700Name=Spenden @@ -728,7 +730,7 @@ Permission95=Buchhaltung einsehen Permission101=Auslieferungen einsehen Permission102=Auslieferungen erstellen/bearbeiten Permission104=Auslieferungen freigeben -Permission105=Send sendings by email +Permission105=Sende Sendungen per E-Mail Permission106=Auslieferungen exportieren Permission109=Sendungen löschen Permission111=Finanzkonten einsehen @@ -836,10 +838,10 @@ Permission402=Rabatte erstellen/bearbeiten Permission403=Rabatte freigeben Permission404=Rabatte löschen Permission430=Debug Bar nutzen -Permission511=Read payments of salaries (yours and subordinates) +Permission511=Zahlungen von Gehältern (Ihre und Untergebene) lesen Permission512=Lohnzahlungen anlegen / ändern Permission514=Lohn-/Gehaltszahlungen löschen -Permission517=Read payments of salaries of everybody +Permission517= Gehaltszahlungen von allen lesen Permission519=Löhne exportieren Permission520=Darlehen anzeigen Permission522=Darlehen erstellen/bearbeiten @@ -851,10 +853,10 @@ Permission532=Leistungen erstellen/bearbeiten Permission534=Leistungen löschen Permission536=Versteckte Leistungen einsehen/verwalten Permission538=Leistungen exportieren -Permission561=Read payment orders by credit transfer -Permission562=Create/modify payment order by credit transfer -Permission563=Send/Transmit payment order by credit transfer -Permission564=Record Debits/Rejections of credit transfer +Permission561=Zahlungsaufträge per Überweisung lesen +Permission562=Zahlungsauftrag per Überweisung erstellen / ändern +Permission563=Zahlungsauftrag per Überweisung senden / übertragen +Permission564=Belastungen / Ablehnungen der Überweisung erfassen Permission601=Aufkleber lesen Permission602=Erstellen / Ändern von Aufklebern Permission609=Aufkleber löschen @@ -1182,7 +1184,7 @@ InfoWebServer=Über Ihren Webserver InfoDatabase=Über Ihre Datenbank InfoPHP=Über PHP InfoPerf=Leistungs-Informationen -InfoSecurity=About Security +InfoSecurity=Über Sicherheit BrowserName=Browsername BrowserOS=Betriebssystem des Browsers ListOfSecurityEvents=Liste der sicherheitsrelevanten Ereignisse @@ -1306,7 +1308,7 @@ YouUseBestDriver=Sie verwenden den Treiber %s, dies ist derzeit der best verfüg 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. SearchOptim=Such Optimierung -YouHaveXObjectUseSearchOptim=Sie haben %s %s in der Datenbank. Sie sollten die Konstante %s zu 1 in Home-Setup-Other hinzufügen. Begrenzen Sie die Suche auf den Anfang von Zeichenfolgen. Dadurch kann die Datenbank Indizes verwenden, und Sie sollten sofort eine Antwort erhalten. +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. BrowserIsOK=Sie verwenden %s als Webbrowser. Dieser ist hinsichtlich Sicherheit und Leistung ausreichend. BrowserIsKO=Sie verwenden %s als Webbrowser. Dieser ist bekanntlich eine schlechte Wahl wenn es um Sicherheit, Leistung und Zuverlässigkeit geht. Wir empfehlen Firefox, Chrome, Opera oder Safari zu benutzen. @@ -1314,7 +1316,7 @@ PHPModuleLoaded=PHP Komponente %s ist geladen PreloadOPCode=Vorgeladener OPCode wird verwendet AddRefInList=Anzeigen der Info-Liste mit Kunden- / Lieferantenreferenz (Auswahlliste oder Combobox) und die meisten Hyperlinks. <br> Drittanbieter werden mit dem Namensformat "CC12345 - SC45678 - The Big Company corp." anstelle von "The Big Company corp" angezeigt. AddAdressInList=Anzeigen der Info-Liste mit Kunden- / Lieferantenadressen (Auswahlliste oder Kombinationsfeld) <br> Dritte werden mit dem Namensformat "The Big Company Corp. - 21 jump street 123456 Big Town - USA" anstelle von "The Big Company Corp." angezeigt. -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=Kontakt-E-Mail (oder Telefone, falls nicht definiert) und Stadtinfo-Liste (Auswahlliste oder Combobox) anzeigen <br> Kontakte werden mit dem Namensformat "Dupond Durand - dupond.durand@email.com - Paris" oder "Dupond Durand - 06 07" angezeigt 59 65 66 - Paris "statt" Dupond Durand ". AskForPreferredShippingMethod=Nach der bevorzugten Versandart für Drittanbieter fragen. FieldEdition=Bearbeitung von Feld %s FillThisOnlyIfRequired=Beispiel: +2 (nur ausfüllen, wenn Sie Probleme mit der Zeitzone haben) @@ -1421,7 +1423,7 @@ AdherentMailRequired=Für das Anlegen eines neuen Mitglieds ist eine E-Mail-Adre MemberSendInformationByMailByDefault=Das Kontrollkästchen für den automatischen Versand einer E-Mail-Bestätigung an Mitglieder (bei Freigabe oder neuem Abonnement) ist standardmäßig aktiviert VisitorCanChooseItsPaymentMode=Der Besucher kann aus verschiedenen Zahlungsmethoden auswählen MEMBER_REMINDER_EMAIL=Aktivieren Sie die automatische Erinnerung <b> per E-Mail </b> an abgelaufene Abonnements. Hinweis: Das Modul <strong> %s </strong> muss aktiviert und ordnungsgemäß eingerichtet sein, damit Erinnerungen gesendet werden können. -MembersDocModules=Document templates for documents generated from member record +MembersDocModules=Dokumentvorlagen für Dokumente, die aus dem Mitgliedsdatensatz generiert wurden ##### LDAP setup ##### LDAPSetup=LDAP-Einstellungen LDAPGlobalParameters=Globale LDAP-Parameter @@ -1564,9 +1566,9 @@ LDAPDescValues=Die Beispielwerte für <b>OpenLDAP</b> verfügen über folgende M ForANonAnonymousAccess=Für einen authentifizierten Zugang (z.B. für Schreibzugriff) PerfDolibarr=Leistungs-Einstellungen/Optimierungsreport YouMayFindPerfAdviceHere=Auf dieser Seite finden Sie einige Überprüfungen oder Hinweise zur Leistung. -NotInstalled=Not installed. -NotSlowedDownByThis=Not slowed down by this. -NotRiskOfLeakWithThis=Not risk of leak with this. +NotInstalled=Nicht installiert. +NotSlowedDownByThis=Nicht dadurch verlangsamt. +NotRiskOfLeakWithThis=Hiermit keine Verlustgefahr. ApplicativeCache=geeigneter Cache MemcachedNotAvailable=Kein Cache Anwendung gefunden. \nSie können die Leistung durch die Installation des Cache-Server Memcached und die Aktivierung des Moduls Anwendungscache<br>hier mehr Informationen <a href="http://wiki.dolibarr.org/index.php/Module_MemCached_EN">http://wiki.dolibarr.org/index.php/Module_MemCached_EN</a>.<br>\nverbessern.\nBeachten Sie, dass viele Billig-Provider keine solche Cache-Server in ihrer Infrastruktur anbieten. MemcachedModuleAvailableButNotSetup=Module memcached für geeigneten Cache gefunden, aber Setup-Modul ist nicht vollständig. @@ -1596,8 +1598,13 @@ ServiceSetup=Modul Leistungen - Einstellungen ProductServiceSetup=Produkte und Leistungen Module Einstellungen NumberOfProductShowInSelect=Max. Anzahl der Produkte in Dropdownlisten (0=kein Limit) ViewProductDescInFormAbility=Anzeige der Produktbeschreibungen in Formularen (sonst als ToolTip- Popup) +DoNotAddProductDescAtAddLines=Fügen Sie beim absenden keine Produktbeschreibung (von der Produktkarte) füge Zeilen an die Formulare\n +OnProductSelectAddProductDesc=So verwenden Sie die Produktbeschreibung, wenn Sie ein Produkt als Dokumentzeile hinzufügen +AutoFillFormFieldBeforeSubmit=Das Eingabefeld für die Beschreibung automatisch mit der Produktbeschreibung füllen +DoNotAutofillButAutoConcat=Füllen Sie das Eingabefeld nicht automatisch mit der Produktbeschreibung aus. Die Produktbeschreibung wird automatisch mit der eingegebenen Beschreibung verkettet. +DoNotUseDescriptionOfProdut=Die Produktbeschreibung wird niemals in die Beschreibung der Dokumentenzeilen aufgenommen MergePropalProductCard=Aktivieren einer Option unter Produkte/Leistungen Registerkarte verknüpfte Dateien, um Produkt-PDF-Dokumente um Angebots PDF azur zusammenzuführen, wenn Produkte/Leistungen in dem Angebot sind. -ViewProductDescInThirdpartyLanguageAbility=Anzeige der Produktbeschreibungen in der Sprache des Partners +ViewProductDescInThirdpartyLanguageAbility=Anzeige von Produktbeschreibungen in Formularen in der Sprache des Partners (sonst in der Sprache des Benutzer) UseSearchToSelectProductTooltip=Wenn Sie eine große Anzahl von Produkten (> 100.000) haben, können Sie die Geschwindigkeit verbessern, indem Sie in Einstellungen -> Andere die Konstante PRODUCT_DONOTSEARCH_ANYWHERE auf 1 setzen. Die Suche startet dann am Beginn der Zeichenkette. UseSearchToSelectProduct=Warte auf Tastendruck, bevor der Inhalt der Produkt-Combo-Liste geladen wird (Dies kann die Leistung verbessern, wenn Sie eine große Anzahl von Produkten haben). SetDefaultBarcodeTypeProducts=Standard-Code-Typ für Produkte @@ -1672,7 +1679,7 @@ AdvancedEditor=Erweiterter Editor ActivateFCKeditor=FCKEditor aktivieren für: FCKeditorForCompany=WYSIWIG Erstellung/Bearbeitung der Partnerinformationen und Notizen FCKeditorForProduct=WYSIWIG Erstellung/Bearbeitung von Produkt-/Serviceinformationen und Notizen -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 Erstellung / Ausgabe von Produkt-Detailzeilen für alle Dokumente (Vorschläge, Bestellungen, Rechnungen usw.). <span class="warning"> Warnung: Die Verwendung dieser Option für diesen Fall wird nicht empfohlen, da dies beim Erstellen von PDF-Dateien zu Problemen mit Sonderzeichen und Seitenformatierung führen kann. </span> FCKeditorForMailing= WYSIWIG Erstellung/Bearbeitung von E-Mails FCKeditorForUserSignature=WYSIWIG Erstellung/Bearbeitung von Benutzer-Signaturen FCKeditorForMail=WYSIWYG-Erstellung/Bearbeitung für alle E-Mails (außer Werkzeuge->eMailing) @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalisierte Menüs die nicht mit dem Top-Menü ve NewMenu=Neues Menü MenuHandler=Menü-Handler MenuModule=Quellmodul -HideUnauthorizedMenu= Hide unbefugte Menüs (grau) +HideUnauthorizedMenu=Nicht autorisierte Menüs auch für interne Benutzer ausblenden (sonst nur grau) DetailId=Menü ID DetailMenuHandler=Menü-Handler für die Anzeige des neuen Menüs DetailMenuModule=Modulname falls Menüeintrag aus einem Modul stimmt @@ -1738,10 +1745,10 @@ AGENDA_USE_EVENT_TYPE_DEFAULT=Diesen Standardwert automatisch als Ereignistyp im AGENDA_DEFAULT_FILTER_TYPE=Diesen Ereignisstatus automatisch in den Suchfilter für die Agenda-Ansicht übernehmen AGENDA_DEFAULT_FILTER_STATUS=Diesen Ereignisstatus automatisch in den Suchfilter für die Agenda-Ansicht übernehmen AGENDA_DEFAULT_VIEW=Welche Standardansicht soll geöffnet werden, wenn das Menü 'Agenda' geöffnet wird -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=Aktiviere die Ereigniserinnerung <b> im Browser des Benutzers. </b> (Wenn das Erinnerungsdatum erreicht ist, wird vom Browser ein Popup angezeigt. Jeder Benutzer kann solche Benachrichtigungen in seinem Browser-Benachrichtigungs-Setup deaktivieren.) AGENDA_REMINDER_BROWSER_SOUND=Aktiviere Tonbenachrichtigung -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=Aktiviere die Ereigniserinnerung <b> per E-Mail </b> (Erinnerungsoption / Verzögerung kann für jedes Ereignis definiert werden). +AGENDA_REMINDER_EMAIL_NOTE=Hinweis: Die Häufigkeit der Aufgabe %s muss ausreichen, um sicherzustellen, dass die Erinnerung zum richtigen Zeitpunkt gesendet wird. AGENDA_SHOW_LINKED_OBJECT=Verknüpfte Objekte in Agenda anzeigen ##### Clicktodial ##### ClickToDialSetup=Click-to-Dial Moduleinstellungen @@ -1983,6 +1990,7 @@ EMailHost=Hostname des IMAP-Servers MailboxSourceDirectory=Quellverzechnis des eMail-Kontos MailboxTargetDirectory=Zielverzechnis des eMail-Kontos EmailcollectorOperations=Aktivitäten, die der eMail-Collector ausführen soll +EmailcollectorOperationsDesc=Operationen werden von oben nach unten ausgeführt MaxEmailCollectPerCollect=Maximale Anzahl an einzusammelnden E-Mails je Collect-Vorgang CollectNow=Jetzt abrufen ConfirmCloneEmailCollector=Sind Sie sicher, dass Sie den eMail-Collektor %s duplizieren möchten? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Nachricht einer Unterhaltung die durch eine erste von Dolibarr WithoutDolTrackingID=Nachricht einer Unterhaltung die NICHT durch eine erste von Dolibarr gesendete E-Mail initiiert wurde WithDolTrackingIDInMsgId=Nachricht von Dolibarr gesendet WithoutDolTrackingIDInMsgId=Nachricht NICHT von Dolibarr gesendet -CreateCandidature=Bewerbung erstellen +CreateCandidature=Stellen-Bewerbung erstellen FormatZip=PLZ MainMenuCode=Menüpunktcode (Hauptmenü) ECMAutoTree=Automatischen ECM-Baum anzeigen @@ -2083,3 +2091,7 @@ 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. 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 diff --git a/htdocs/langs/de_DE/agenda.lang b/htdocs/langs/de_DE/agenda.lang index 73e7c40f93c..ed52994e717 100644 --- a/htdocs/langs/de_DE/agenda.lang +++ b/htdocs/langs/de_DE/agenda.lang @@ -3,7 +3,7 @@ IdAgenda=Ereignis-ID Actions=Ereignisse Agenda=Terminplan TMenuAgenda=Terminplanung -Agendas=Tagesordnungen +Agendas=Terminpläne LocalAgenda=interne Kalender ActionsOwnedBy=Ereignis stammt von ActionsOwnedByShort=Eigentümer @@ -33,7 +33,7 @@ ViewPerType=Anzeige pro Typ AutoActions= Automatische Befüllung der Tagesordnung AgendaAutoActionDesc= Hier können Sie Ereignisse definieren, die Dolibarr automatisch in der Agenda erstellen soll. Wenn nichts markiert ist, werden nur manuelle Aktionen in die Protokolle aufgenommen und in der Agenda angezeigt. Die automatische Verfolgung von Geschäftsaktionen an Objekten (Validierung, Statusänderung) wird nicht gespeichert. AgendaSetupOtherDesc= Diese Seite bietet Optionen, um den Export Ihrer Dolibarr-Ereignisse in einen externen Kalender (Thunderbird, Google Calendar usw.) zu ermöglichen. -AgendaExtSitesDesc=Diese Seite erlaubt Ihnen externe Kalender zu konfigurieren. +AgendaExtSitesDesc=Diese Seite erlaubt es, externe Kalenderquellen zu definieren, um deren Termine in der Dolibarr-Terminplanung zu sehen. ActionsEvents=Veranstaltungen zur automatischen Übernahme in die Agenda EventRemindersByEmailNotEnabled=Aufgaben-/Terminerinnerungen via E-Mail sind in den Einstellungen des Moduls %s nicht aktiviert. ##### Agenda event labels ##### @@ -166,4 +166,4 @@ TimeType=Erinnerungsdauer ReminderType=Erinnerungstyp AddReminder=Erstellt eine automatische Erinnerungsbenachrichtigung für dieses Ereignis ErrorReminderActionCommCreation=Fehler beim Erstellen der Erinnerungsbenachrichtigung für dieses Ereignis -BrowserPush=Browser Benachrichtigung +BrowserPush=Browser-Popup-Benachrichtigung diff --git a/htdocs/langs/de_DE/banks.lang b/htdocs/langs/de_DE/banks.lang index a5c59fe2608..1a24bc0bd5e 100644 --- a/htdocs/langs/de_DE/banks.lang +++ b/htdocs/langs/de_DE/banks.lang @@ -173,10 +173,11 @@ SEPAMandate=SEPA Mandat 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 Kassenbestand -NewCashFence=neuer Kassenbestand +CashControl=POS-Kassensteuerung +NewCashFence=Neue Kasse schließt 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=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. +IfYouDontReconcileDisableProperty=Wenn Sie auf einigen Bankkonten keine Bankkontenabgleiche vornehmen, deaktivieren Sie die Eigenschaft "%s", um diese Warnung zu entfernen. +NoBankAccountDefined=Kein Bankkonto definiert diff --git a/htdocs/langs/de_DE/bills.lang b/htdocs/langs/de_DE/bills.lang index 597455e1fda..1ecc1ea7641 100644 --- a/htdocs/langs/de_DE/bills.lang +++ b/htdocs/langs/de_DE/bills.lang @@ -520,7 +520,7 @@ EarlyClosingReason=Grund für die vorzeitige Schließung EarlyClosingComment=Notiz zur vorzeitigen Schließung ##### Types de contacts ##### TypeContact_facture_internal_SALESREPFOLL=Repräsentative Follow-up Kundenrechnung -TypeContact_facture_external_BILLING=Kundenrechnung Kontakt +TypeContact_facture_external_BILLING=Kontakt für Kundenrechnungen TypeContact_facture_external_SHIPPING=Kundenversand Kontakt TypeContact_facture_external_SERVICE=Kundenservice Kontakt TypeContact_invoice_supplier_internal_SALESREPFOLL=Repräsentative Folgerechnung eines Lieferanten @@ -577,6 +577,6 @@ UnitPriceXQtyLessDiscount=Stückpreis x Anzahl - Rabatt CustomersInvoicesArea=Abrechnungsbereich Kunden SupplierInvoicesArea=Abrechnungsbereich Lieferanten FacParentLine=Übergeordnete Rechnungszeile -SituationTotalRayToRest=Remainder to pay without taxe +SituationTotalRayToRest=Restbetrag zu zahlen ohne Steuern PDFSituationTitle=Situation Nr. %d -SituationTotalProgress=Total progress %d %% +SituationTotalProgress=Gesamtfortschritt %d %% diff --git a/htdocs/langs/de_DE/blockedlog.lang b/htdocs/langs/de_DE/blockedlog.lang index 76f7b5b97ce..65396077e9f 100644 --- a/htdocs/langs/de_DE/blockedlog.lang +++ b/htdocs/langs/de_DE/blockedlog.lang @@ -35,7 +35,7 @@ logDON_DELETE=Spende automatisch gelöscht logMEMBER_SUBSCRIPTION_CREATE=Mitglieds-Abonnement erstellt logMEMBER_SUBSCRIPTION_MODIFY=Mitglieds-Abonnement geändert logMEMBER_SUBSCRIPTION_DELETE=Mitglieds-Abonnement automatisch löschen -logCASHCONTROL_VALIDATE=Aufzeichnung Kassenschnitt +logCASHCONTROL_VALIDATE=Kassenabschluss-Aufzeichnung BlockedLogBillDownload=Kundenrechnung herunterladen BlockedLogBillPreview=Kundenrechnung - Vorschau BlockedlogInfoDialog=Details zum Log diff --git a/htdocs/langs/de_DE/boxes.lang b/htdocs/langs/de_DE/boxes.lang index b633a2ef019..0ebb4d77679 100644 --- a/htdocs/langs/de_DE/boxes.lang +++ b/htdocs/langs/de_DE/boxes.lang @@ -46,12 +46,15 @@ BoxTitleLastModifiedDonations=Zuletzt bearbeitete Spenden (maximal %s) BoxTitleLastModifiedExpenses=Zuletzt bearbeitete Spesenabrechnungen (maximal %s) BoxTitleLatestModifiedBoms=Zuletzt bearbeitete Stücklisten (maximal %s) BoxTitleLatestModifiedMos=Zuletzt bearbeitete Produktionsaufträge (maximal %s) +BoxTitleLastOutstandingBillReached=Kunden mit überschrittenen Maximal-Aussenständen BoxGlobalActivity=Globale Aktivität (Rechnungen, Angebote, Aufträge) BoxGoodCustomers=Gute Kunden BoxTitleGoodCustomers=%s gute Kunden +BoxScheduledJobs=Geplante Aufträge +BoxTitleFunnelOfProspection=Interessenten Trichter FailedToRefreshDataInfoNotUpToDate=Fehler beim RSS-Abruf. Letzte erfolgreiche Aktualisierung: %s LastRefreshDate=Letzte Aktualisierung -NoRecordedBookmarks=Keine Lesezeichen gesetzt. Klicken Sie <a href="%s">hier</a>, um ein Lesezeichen zu setzen. +NoRecordedBookmarks=Keine Lesezeichen definiert. ClickToAdd=Hier klicken um hinzuzufügen. NoRecordedCustomers=keine erfassten Kunden NoRecordedContacts=keine erfassten Kontakte @@ -83,8 +86,8 @@ BoxTitleLatestModifiedSupplierOrders=zuletzt bearbeitete Lieferantenbestellungen BoxTitleLastModifiedCustomerBills=Zuletzt bearbeitete Kundenrechnungen (maximal %s) BoxTitleLastModifiedCustomerOrders=Zuletzt bearbeitete Kundenaufträge (maximal %s) BoxTitleLastModifiedPropals=Zuletzt bearbeitete Angebote (maximal %s) -BoxTitleLatestModifiedJobPositions=Latest %s modified jobs -BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures +BoxTitleLatestModifiedJobPositions=Neueste %s geänderte Jobs +BoxTitleLatestModifiedCandidatures=Neueste %s modifizierte Kandidaturen ForCustomersInvoices=Kundenrechnungen ForCustomersOrders=Kundenaufträge ForProposals=Angebote @@ -92,8 +95,8 @@ LastXMonthRolling=Die letzten %s Monate gleitend ChooseBoxToAdd=Widget zu Ihrer Startseite hinzufügen BoxAdded=Widget wurde zu Ihrer Startseite hinzugefügt BoxTitleUserBirthdaysOfMonth=Geburtstage in diesem Monat (Benutzer) -BoxLastManualEntries=Letzte manuelle Einträge in der Buchhaltung -BoxTitleLastManualEntries=%s neueste manuelle Einträge +BoxLastManualEntries=letzte Einträge in der Buchhaltung, manuell oder ohne Quelldokument eingegeben +BoxTitleLastManualEntries=%s letzter Datensatz, der manuell oder ohne Quelldokument eingegeben wurde NoRecordedManualEntries=In der Buchhaltung sind keine manuellen Einträge erfasst BoxSuspenseAccount=Zähle die Buchhaltungsoperation mit dem Zwischenonto BoxTitleSuspenseAccount=Anzahl nicht zugewiesener Zeilen @@ -102,5 +105,7 @@ SuspenseAccountNotDefined=Zwischenkonto ist nicht definiert BoxLastCustomerShipments=Letzte Kundenlieferungen BoxTitleLastCustomerShipments=Neueste %s Kundensendungen NoRecordedShipments=Keine erfasste Kundensendung +BoxCustomersOutstandingBillReached=Kunden mit erreichtem Aussenständen-Limit # Pages AccountancyHome=Buchführung +ValidatedProjects=Validierte Projekte diff --git a/htdocs/langs/de_DE/cashdesk.lang b/htdocs/langs/de_DE/cashdesk.lang index 095e3d6e1f8..342df5e5a55 100644 --- a/htdocs/langs/de_DE/cashdesk.lang +++ b/htdocs/langs/de_DE/cashdesk.lang @@ -50,7 +50,7 @@ AmountAtEndOfPeriod=Betrag am Ende der Periode (Tag, Monat oder Jahr) TheoricalAmount=Theoretischer Betrag RealAmount=Realer Betrag CashFence=Kassenschluss -CashFenceDone=Kassenschnitt im Zeitraum durchgeführt +CashFenceDone=Kassenschließung für den Zeitraum durchgeführt NbOfInvoices=Anzahl der Rechnungen Paymentnumpad=Art des Pads zur Eingabe der Zahlung Numberspad=Nummernblock @@ -77,7 +77,7 @@ POSModule=POS-Modul BasicPhoneLayout=Verwenden Sie das Basislayout für Telefone SetupOfTerminalNotComplete=Die Einrichtung von Terminal %s ist nicht abgeschlossen DirectPayment=Direktzahlung -DirectPaymentButton=Add a "Direct cash payment" button +DirectPaymentButton=Fügen Sie eine Schaltfläche "Direkte Barzahlung" hinzu InvoiceIsAlreadyValidated=Rechnung ist bereits geprüft NoLinesToBill=Keine Zeilen zu berechnen CustomReceipt=Benutzerdefinierte Quittung @@ -94,13 +94,14 @@ TakeposConnectorMethodDescription=Externes Modul mit zusätzlichen Funktionen. M PrintMethod=Druckmethode ReceiptPrinterMethodDescription=Leistungsstarke Methode mit vielen Parametern. Vollständig anpassbar mit Vorlagen. Kann nicht aus der Cloud drucken. ByTerminal=über Terminal -TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad +TakeposNumpadUsePaymentIcon=Verwenden Sie das Symbol anstelle des Textes auf den Zahlungsschaltflächen des Nummernblocks CashDeskRefNumberingModules=Nummerierungsmodul für POS-Verkäufe CashDeskGenericMaskCodes6 =  Das Tag <br> <b> {TN} </b> wird zum Hinzufügen der Terminalnummer verwendet TakeposGroupSameProduct=Gruppieren Sie dieselben Produktlinien StartAParallelSale=Starten Sie einen neuen Parallelverkauf -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Kasse schließen +SaleStartedAt=Der Verkauf begann bei %s +ControlCashOpening=Kontrollieren Sie das Popup-Fenster beim Öffnen des POS +CloseCashFence=Schließen Sie die Kassensteuerung CashReport=Kassenbericht MainPrinterToUse=Quittungsdrucker OrderPrinterToUse=Drucker für Bestellungen @@ -117,8 +118,9 @@ HideCategoryImages=Kategorie Bilder ausblenden HideProductImages=Produktbilder ausblenden NumberOfLinesToShow=Anzahl der anzuzeigenden Bildzeilen DefineTablePlan=Tabellenplan definieren -GiftReceiptButton=Add a "Gift receipt" button -GiftReceipt=Gift receipt -ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first -AllowDelayedPayment=Allow delayed payment -PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts +GiftReceiptButton=Fügen Sie eine Schaltfläche "Gutschrift-Quittung" hinzu +GiftReceipt=Gutschrift-Quittung +ModuleReceiptPrinterMustBeEnabled=Das Modul Belegdrucker muss zuerst aktiviert worden sein +AllowDelayedPayment=Verzögerte Zahlung zulassen +PrintPaymentMethodOnReceipts=Zahlungsmethode auf Tickets | Quittungen drucken +WeighingScale=Waage diff --git a/htdocs/langs/de_DE/categories.lang b/htdocs/langs/de_DE/categories.lang index c8fc85f28c9..6a04179c699 100644 --- a/htdocs/langs/de_DE/categories.lang +++ b/htdocs/langs/de_DE/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=Übersicht Projektkategorien UsersCategoriesArea=Bereich: Benutzer Tags/Kategorien SubCats=Unterkategorie(n) CatList=Liste der Kategorien +CatListAll=Liste der Schlagwörter / Kategorien (alle Typen) NewCategory=Neue Kategorie ModifCat=Kategorie bearbeiten CatCreated=Kategorie erstellt @@ -65,24 +66,30 @@ UsersCategoriesShort=Benutzerkategorien StockCategoriesShort=Lagerort-Kategorien ThisCategoryHasNoItems=Diese Kategorie enthält keine Elemente. CategId=Kategorie-ID -CatSupList=Liste der Lieferanten-Kategorien -CatCusList=Liste der Kunden-/ Interessentenkategorien +ParentCategory=Übergeordnetes Schlagwort / Kategorie +ParentCategoryLabel=Label des übergeordneten Schlagwortes / der übergeordneten Kategorie +CatSupList=Liste der Schlagwörter / Kategorien für Anbieter +CatCusList=Liste der Schlagwörter / Kategorien für Kunden / Interessenten CatProdList=Liste der Produktkategorien CatMemberList=Liste der Mitgliederkategorien -CatContactList=Liste der Kontaktkategorien -CatSupLinks=Verbindung zwischen Lieferanten und Kategorien +CatContactList=Liste der Schlagwörter / Kategorien für Kontakte +CatProjectsList=Liste der Schlagwörter / Kategorien für Projekte +CatUsersList=Liste der Schlagwörter / Kategorien für Benutzer +CatSupLinks=Verknüpfungen zwischen Anbietern und Schlagwörter / Kategorien CatCusLinks=Verbindung zwischen Kunden-/Leads und Kategorien CatContactsLinks=Verknüpfungen zwischen Kontakten/Adressen und Tags/Kategorien CatProdLinks=Verbindung zwischen Produkten/Leistungen und Kategorien -CatProJectLinks=Verbindung zwischen Projekten und Kategorien bzw. Suchwörtern +CatMembersLinks=Verbindung zwischen Mitgliedern und Kategorien +CatProjectsLinks=Verbindung zwischen Projekten und Kategorien bzw. Suchwörtern +CatUsersLinks=Verknüpfungen zwischen Benutzern und Schlagwörter / Kategorien DeleteFromCat=Aus Kategorie entfernen ExtraFieldsCategories=Ergänzende Attribute CategoriesSetup=Kategorie-Einstellungen CategorieRecursiv=Automatisch mit übergeordneter Kategorie verbinden CategorieRecursivHelp=Wenn die Option aktiviert ist, wird beim Hinzufügen eines Produkts zu einer Unterkategorie das Produkt auch automatisch zur übergeordneten Kategorie hinzugefügt. AddProductServiceIntoCategory=Folgendes Produkt / folgende Leistung dieser Kategorie hinzufügen: -AddCustomerIntoCategory=Assign category to customer -AddSupplierIntoCategory=Assign category to supplier +AddCustomerIntoCategory=Ordnen Sie dem Kunden eine Kategorie zu +AddSupplierIntoCategory=Ordnen Sie dem Lieferanten eine Kategorie zu ShowCategory=Zeige Kategorie ByDefaultInList=Standardwert in Liste ChooseCategory=Kategorie auswählen diff --git a/htdocs/langs/de_DE/companies.lang b/htdocs/langs/de_DE/companies.lang index f8bad6b3a9e..717b52abe65 100644 --- a/htdocs/langs/de_DE/companies.lang +++ b/htdocs/langs/de_DE/companies.lang @@ -213,7 +213,7 @@ ProfId1MA=Prof ID 1 (R.C.) ProfId2MA=Prof ID 2 ProfId3MA=Prof ID 3 ProfId4MA=Prof ID 4 -ProfId5MA=Id prof. 5 (I.C.E.) +ProfId5MA=Id prof. 5 (Identifiant Commun Entreprise) ProfId6MA=- ProfId1MX=Prof Id 1 (R.F.C). ProfId2MX=Prof Id 2 (R..P. IMSS) @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Überprüfungsergebnis des MwSt-Informationsaustauschs VATIntraManualCheck=Sie können die Überprüfung auch manuell auf der Internetseite der Europäische Kommission durchführen: <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=Anfrage nicht möglich. Überprüfungsdienst wird vom Mitgliedsland nicht angeboten (%s). NorProspectNorCustomer=kein Interessent / kein Kunde -JuridicalStatus=Rechtsform +JuridicalStatus=Geschäftsentitätstyp Workforce=Mitarbeiter/innen Staff=Mitarbeiter ProspectLevelShort=Potenzial diff --git a/htdocs/langs/de_DE/compta.lang b/htdocs/langs/de_DE/compta.lang index 6d646740b35..472a03cbb90 100644 --- a/htdocs/langs/de_DE/compta.lang +++ b/htdocs/langs/de_DE/compta.lang @@ -111,7 +111,7 @@ Refund=Rückerstattung SocialContributionsPayments=Sozialabgaben-/Steuer Zahlungen ShowVatPayment=Zeige USt. Zahlung TotalToPay=Zu zahlender Gesamtbetrag -BalanceVisibilityDependsOnSortAndFilters=Differenz ist nur in dieser Liste sichtbar, wenn die Tabelle aufsteigend nach %s sortiert ist und gefiltert mit nur 1 Bankkonto +BalanceVisibilityDependsOnSortAndFilters=Der Kontostand ist in dieser Liste nur sichtbar, wenn die Tabelle nach %s sortiert und nach 1 Bankkonto gefiltert ist (ohne andere Filter). CustomerAccountancyCode=Kontierungscode Kunde SupplierAccountancyCode=Kontierungscode Lieferanten CustomerAccountancyCodeShort=Buchh. Kunden-Konto @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Möchten Sie diese Sozialabgaben-, oder Steuerza 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>. -CalcModeDebt=Analyse der erfassten Rechnungen, auch wenn diese noch nicht Kontiert wurden +CalcModeDebt=Analyse bekannter erfasster Dokumente, auch wenn diese noch nicht im Hauptbuch erfasst sind. CalcModeEngagement=Analyse der erfassten Zahlungen, auch wenn diese noch nicht Kontiert wurden CalcModeBookkeeping=Analyse der in der Tabelle Buchhaltungs-Ledger protokollierten Daten. CalcModeLT1= Modus <b>%sRE auf Kundenrechnungen - Lieferantenrechnungen%s</b> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Saldo der Erträge und Aufwendungen, Jahresübersic AnnualByCompanies=Bilanz Ertrag/Aufwand, pro vordefinierten Kontogruppen AnnualByCompaniesDueDebtMode=Die Ertrags-/Aufwands-Bilanz nach vordefinierten Gruppen, im Modus <b>%sForderungen-Verbindlichkeiten%s</b> meldet <b>Kameralistik</b>. AnnualByCompaniesInputOutputMode=Die Ertrags-/Aufwands-Bilanz im Modus <b>%sEinkünfte-Ausgaben%s</b> meldet <b>Ist-Besteuerung</b>. -SeeReportInInputOutputMode=Zeige %sZahlungsanalyse%s für die Berechnung der aktuellen Zahlungen auch wenn diese noch nicht ins Hauptbuch übernommen wurden. -SeeReportInDueDebtMode=Zeige %sRechnungsanalyse%s für die Berechnung der aktuellen Rechnungen auch wenn diese noch nicht ins Hauptbuch übernommen wurden. -SeeReportInBookkeepingMode=Siehe <b>%sBuchungsreport%s</b> für die Berechnung via <b>Hauptbuch </b> +SeeReportInInputOutputMode=Siehe <b> %sAnalyse der Zahlungen%s </b> für eine Berechnung basierend auf <b> erfassten Zahlungen </b>, auch wenn diese noch nicht ins Hauptbuch übernommen wurden. +SeeReportInDueDebtMode=Siehe <b> %sAnalyse aufgezeichneter Dokumente%s </b> für eine Berechnung basierend auf bekannten <b> aufgezeichneten Dokumenten </b>, auch wenn diese noch nicht ins Hauptbuch übernommen wurden. +SeeReportInBookkeepingMode=Siehe <b> %sAnalyse des Buchhaltungsbuchs-Tabelle%s </b> für einen Bericht basierend auf <b>Buchhaltungstabelle </b> RulesAmountWithTaxIncluded=- Angezeigte Beträge enthalten alle Steuern RulesResultDue=- Es beinhaltet ausstehende Rechnungen, Ausgaben, Mehrwertsteuer, Spenden, ob sie bezahlt sind oder nicht. Es sind auch bezahlte Gehälter enthalten. <br> - Es basiert auf dem Rechnungsdatum von Rechnungen und dem Fälligkeitsdatum für Ausgaben oder Steuerzahlungen. Für Gehälter, die mit dem Modul Gehalt definiert wurden, wird der Wert Datum der Zahlung verwendet. RulesResultInOut=- Es sind nur tatsächliche Zahlungen für Rechnungen, Kostenabrechnungen, USt und Gehälter enthalten. <br>- Bei Rechnungen, Kostenabrechnungen, USt und Gehälter gilt das Zahlugnsdatum. Bei Spenden gilt das Spendendatum. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=Zeigt die Buchungen im Hauptbuch mit Konten < SeePageForSetup=Siehe Menü <a href="%s"> %s </a> für die Einrichtung DepositsAreNotIncluded=- Anzahlungsrechnungen sind nicht enthalten DepositsAreIncluded=- Inklusive Anzahlungsrechnungen +LT1ReportByMonth=Steuer 2 Bericht pro Monat +LT2ReportByMonth=Steuer 3 Bericht pro Monat LT1ReportByCustomers=Auswertung Steuer 2 pro Partner LT2ReportByCustomers=Auswertung Steuer 3 pro Partner LT1ReportByCustomersES=Bericht von Kunden RE LT2ReportByCustomersES=Bericht von Partner EKSt. VATReport=Umsatzsteuer Report VATReportByPeriods=Umsatzsteuerauswertung pro Periode +VATReportByMonth=Umsatzsteuerbericht nach Monat VATReportByRates=Umsatzsteuerauswertung pro Steuersatz VATReportByThirdParties=Umsatzsteuerauswertung pro Partner VATReportByCustomers=Umsatzsteuerauswertung pro Kunde diff --git a/htdocs/langs/de_DE/cron.lang b/htdocs/langs/de_DE/cron.lang index a2b7c2ffa51..16b0ab2b940 100644 --- a/htdocs/langs/de_DE/cron.lang +++ b/htdocs/langs/de_DE/cron.lang @@ -7,13 +7,14 @@ Permission23103 = Lösche geplanten Job Permission23104 = Führe geplanten Job aus # Admin CronSetup=Jobverwaltungs-Konfiguration -URLToLaunchCronJobs=URL zum Prüfen und Starten von speziellen Jobs -OrToLaunchASpecificJob=Oder zum Prüfen und Starten von speziellen Jobs +URLToLaunchCronJobs=URL zum Überprüfen und Starten qualifizierter Cron-Jobs über einen Browser +OrToLaunchASpecificJob=Oder um einen bestimmten Job über einen Browser zu überprüfen und zu starten KeyForCronAccess=Sicherheitsschlüssel für URL zum Starten von Cronjobs FileToLaunchCronJobs=Befehlszeile zum Überprüfen und Starten von qualifizierten Cron-Jobs CronExplainHowToRunUnix=In Unix-Umgebung sollten Sie die folgenden crontab-Eintrag verwenden, um die Befehlszeile alle 5 Minuten ausführen CronExplainHowToRunWin=In Microsoft™ Windows Umgebungen kannst Du die Aufgabenplanung benutzen, um die Kommandozeile alle 5 Minuten aufzurufen. CronMethodDoesNotExists=Klasse %s enthält keine Methode %s +CronMethodNotAllowed=Die Methode %s der Klasse %s befindet sich in der schwarzen Liste der verbotenen Methoden CronJobDefDesc=Cron-Jobprofile sind in der Moduldeskriptordatei definiert. Wenn das Modul aktiviert ist, sind diese geladen und verfügbar, so dass Sie die Jobs über das Menü admin tools %s verwalten können. CronJobProfiles=Liste vordefinierter Cron-Jobprofile # Menu @@ -46,6 +47,7 @@ CronNbRun=Anzahl Starts CronMaxRun=Maximale Anzahl von Starts CronEach=Jede JobFinished=Job gestartet und beendet +Scheduled=Geplant #Page card CronAdd= Jobs hinzufügen CronEvery=Jeden Job ausführen @@ -56,7 +58,7 @@ CronNote=Kommentar CronFieldMandatory=Feld %s ist zwingend nötig CronErrEndDateStartDt=Enddatum kann nicht vor dem Startdatum liegen StatusAtInstall=Status bei der Modulinstallation -CronStatusActiveBtn=Aktivieren +CronStatusActiveBtn=Zeitplan CronStatusInactiveBtn=Deaktivieren CronTaskInactive=Dieser Job ist deaktiviert CronId=ID @@ -82,3 +84,8 @@ MakeLocalDatabaseDumpShort=lokales Datenbankbackup MakeLocalDatabaseDump=Erstellen Sie einen lokalen Datenbankspeicherauszug. Parameter sind: Komprimierung ('gz' oder 'bz' oder 'none'), Sicherungstyp ('mysql', 'pgsql', 'auto'), 1, 'auto' oder zu erstellender Dateiname, Anzahl der zu speichernden Sicherungsdateien WarningCronDelayed=Bitte beachten: Aus Leistungsgründen können Ihre Jobs um bis zu %s Stunden verzögert werden, unabhängig vom nächsten Ausführungstermin. DATAPOLICYJob=Datenbereiniger und Anonymisierer +JobXMustBeEnabled=Job %s muss aktiviert sein +# Cron Boxes +LastExecutedScheduledJob=Zuletzt ausgeführter geplanter Job +NextScheduledJobExecute=Nächster geplanter Job, der ausgeführt werden soll +NumberScheduledJobError=Anzahl der fehlerhaften geplanten Jobs diff --git a/htdocs/langs/de_DE/deliveries.lang b/htdocs/langs/de_DE/deliveries.lang index aabd4dea18c..c3c906b07e4 100644 --- a/htdocs/langs/de_DE/deliveries.lang +++ b/htdocs/langs/de_DE/deliveries.lang @@ -12,7 +12,7 @@ ValidateDeliveryReceiptConfirm=Sind Sie sicher, dass Sie diesen Lieferschein bes DeleteDeliveryReceipt=Lieferschein löschen DeleteDeliveryReceiptConfirm=Möchten Sie den Lieferschein <b>%s</b> wirklich löschen? DeliveryMethod=Versandart -TrackingNumber=Tracking Nummer +TrackingNumber=Sendungsnummer DeliveryNotValidated=Lieferung nicht validiert StatusDeliveryCanceled=Storniert StatusDeliveryDraft=Entwurf @@ -27,5 +27,6 @@ Recipient=Empfänger ErrorStockIsNotEnough=Nicht genügend Bestand Shippable=Versandfertig NonShippable=Nicht versandfertig +ShowShippableStatus=Versandstatus anzeigen ShowReceiving=Zustellbestätigung anzeigen NonExistentOrder=Auftrag existiert nicht diff --git a/htdocs/langs/de_DE/ecm.lang b/htdocs/langs/de_DE/ecm.lang index 8dffa1f324e..706af0b1a82 100644 --- a/htdocs/langs/de_DE/ecm.lang +++ b/htdocs/langs/de_DE/ecm.lang @@ -23,7 +23,7 @@ ECMSearchByKeywords=Suche nach Stichwörtern ECMSearchByEntity=Suche nach Objekten/Belegarten ECMSectionOfDocuments=Dokumentenordner ECMTypeAuto=Automatisch -ECMDocsBy=Documents linked to %s +ECMDocsBy=Mit %s verknüpfte Dokumente ECMNoDirectoryYet=noch kein Verzeichnis erstellt ShowECMSection=Verzeichnis anzeigen DeleteSection=Verzeichnis löschen @@ -38,6 +38,6 @@ ReSyncListOfDir=Liste der Verzeichnisse nochmal synchronisieren HashOfFileContent=Hashwert der Datei NoDirectoriesFound=Keine Verzeichnisse gefunden FileNotYetIndexedInDatabase=Datei noch nicht in Datenbank indiziert (bitte Datei nochmals hochladen) -ExtraFieldsEcmFiles=Extrafields Ecm Files -ExtraFieldsEcmDirectories=Extrafields Ecm Directories -ECMSetup=ECM Setup +ExtraFieldsEcmFiles=Extrafelder Ecm-Dateien +ExtraFieldsEcmDirectories=Extrafelder Ecm-Verzeichnisse +ECMSetup=DMS Einstellungen diff --git a/htdocs/langs/de_DE/errors.lang b/htdocs/langs/de_DE/errors.lang index 77988952bc9..b99e6a58364 100644 --- a/htdocs/langs/de_DE/errors.lang +++ b/htdocs/langs/de_DE/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=Kein Fehler, Befehl wurde ausgeführt # Errors ErrorButCommitIsDone=Fehler aufgetreten, Freigabe erfolgt dennoch ErrorBadEMail=Die E-Mail-Adresse %s ist nicht korrekt +ErrorBadMXDomain=E-Mail %s scheint falsch zu sein (Domain hat keinen gültigen MX-Eintrag) ErrorBadUrl=URL %s ist nicht korrekt ErrorBadValueForParamNotAString=Ungültiger Wert für Ihren Parameter. Normalerweise passiert das, wenn die Übersetzung fehlt. +ErrorRefAlreadyExists=Die Referenz <b> %s </b> ist bereits vorhanden. ErrorLoginAlreadyExists=Benutzername %s existiert bereits. ErrorGroupAlreadyExists=Gruppe %s existiert bereits. ErrorRecordNotFound=Eintrag wurde nicht gefunden. @@ -48,6 +50,7 @@ ErrorFieldsRequired=Ein oder mehrere erforderliche Felder wurden nicht ausgefül ErrorSubjectIsRequired=Der E-Mail-Betreff ist obligatorisch ErrorFailedToCreateDir=Fehler beim Erstellen eines Verzeichnisses. Vergewissern Sie sich, dass der Webserver-Benutzer Schreibberechtigungen für das Dokumentverzeichnis des Systems besitzt. Bei aktiviertem <b>safe_mode</b> sollten die Systemdateien den Webserver-Benutzer oder die -Gruppe als Besitzer haben. ErrorNoMailDefinedForThisUser=Für diesen Benutzer ist keine E-Mail-Adresse eingetragen. +ErrorSetupOfEmailsNotComplete=Das Einrichten von E-Mails ist nicht abgeschlossen ErrorFeatureNeedJavascript=Diese Funktion erfordert aktiviertes JavaScript. Sie können dies unter Einstellungen-Anzeige ändern. ErrorTopMenuMustHaveAParentWithId0=Ein Menü vom Typ 'Top' kann kein Eltern-Menü sein. Setzen Sie 0 als Eltern-Menü oder wählen Sie ein Menü vom Typ 'Links'. ErrorLeftMenuMustHaveAParentId=Ein Menü vom Typ 'Links' erfordert einen Eltern-Menü ID. @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=Dieser Profilname existiert bereits für dieses Expor ErrorLDAPSetupNotComplete=Der LDAP-Abgleich für dieses System ist nicht vollständig eingerichtet. ErrorLDAPMakeManualTest=Eine .ldif-Datei wurde im Verzeichnis %s erstellt. Laden Sie diese Datei von der Kommandozeile aus um mehr Informationen über Fehler zu erhalten. ErrorCantSaveADoneUserWithZeroPercentage=Ereignisse können nicht mit Status "Nicht begonnen" gespeichert werden, wenn das Feld "Erledigt durch" ausgefüllt ist. -ErrorRefAlreadyExists=Die Nr. für den Erstellungsvorgang ist bereits vergeben +ErrorRefAlreadyExists=Die Referenz <b> %s </b> ist bereits vorhanden. ErrorPleaseTypeBankTransactionReportName=Geben Sie den Kontoauszug an, in dem die Zahlung enthalten ist (Format JJJJMM oder JJJJMMTT) ErrorRecordHasChildren=Kann diesen Eintrag nicht löschen. Dieser Eintrag wird von mindestens einem untergeordneten Datensatz verwendet. ErrorRecordHasAtLeastOneChildOfType=Objekt hat mindestens einen Untereintrag vom Typ %s @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=Sie müssen angeben ob der Artike ErrorDiscountLargerThanRemainToPaySplitItBefore=Der Rabatt den Sie anwenden wollen ist grösser als der verbleibende Rechnungsbetrag. Teilen Sie den Rabatt in zwei kleinere Rabatte auf. ErrorFileNotFoundWithSharedLink=Datei nicht gefunden. Eventuell wurde der Sharekey verändert oder die Datei wurde gelöscht. ErrorProductBarCodeAlreadyExists=Der Produktbarcode %sexistiert schon bei einer anderen Produktreferenz -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Das verwenden von virtuellen Produkten welche den Lagerbestand von Unterprodukten verändern ist nicht möglich, wenn ein Unterprodukt (Oder Unter-Unterprodukt) eine Seriennummer oder Chargennummer benötigt. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Beachte auch, dass die Verwendung von Sätzen zum automatischen Erhöhen / Verringern von Unterprodukten nicht möglich ist, wenn mindestens ein Unterprodukt (oder Unterprodukt von Unterprodukten) eine Serien- / Chargennummer benötigt. ErrorDescRequiredForFreeProductLines=Beschreibung ist erforderlich für freie Produkte ErrorAPageWithThisNameOrAliasAlreadyExists=Die Seite/der Container <strong> %s </strong> hat denselben Namen oder alternativen Alias, den Sie verwenden möchten ErrorDuringChartLoad=Fehler beim Laden des Kontenplans. Wenn einige Konten nicht geladen wurden, können Sie sie trotzdem manuell eingeben. @@ -240,9 +243,19 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=Bestand nicht ausreichend f ErrorOnlyOneFieldForGroupByIsPossible=Nur ein Feld ist für 'Gruppieren nach' möglich (andere werden verworfen) ErrorTooManyDifferentValueForSelectedGroupBy=Es wurden zu viele unterschiedliche Werte (mehr als <b> %s </b>) für das Feld '<b> %s </b>' gefunden um 'Gruppieren nach' anzuzeigen. Das Feld 'Gruppieren nach' wurde entfernt. Vielleicht wollten Sie es als X-Achse verwenden? ErrorReplaceStringEmpty=Fehler: die zu ersetzende Zeichenfolge ist leer -ErrorProductNeedBatchNumber=Error, product '<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> +ErrorProductNeedBatchNumber=Fehler, das Produkt '<b> %s </b>' benötigt eine Chargen- / Seriennummer +ErrorProductDoesNotNeedBatchNumber=Fehler, dieses Produkt '<b> %s </b>' akzeptiert keine Chargen- / Seriennummer +ErrorFailedToReadObject=Fehler, das Objekt vom Typ <b> %s </b> konnte nicht gelesen werden +ErrorParameterMustBeEnabledToAllwoThisFeature=Fehler, Parameter <b> %s </b> muss in <b> conf / conf.php <b> aktiviert sein, damit die Befehlszeilen-Schnittstelle vom internen Job Scheduler verwendet werden kann +ErrorLoginDateValidity=Fehler, diese Anmeldung liegt außerhalb des Gültigkeitszeitraums +ErrorValueLength=Die Länge des Feldes '<b> %s </b>' muss höher sein als '<b> %s </b>'. +ErrorReservedKeyword=Das Wort '<b> %s </b>' ist ein reserviertes Schlüsselwort +ErrorNotAvailableWithThisDistribution=Nicht verfügbar mit dieser Version +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 + # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Ihr PHP Parameter upload_max_filesize (%s) ist größer als Parameter post_max_size (%s). Dies ist eine inkonsistente Einstellung. WarningPasswordSetWithNoAccount=Es wurde ein Passwort für dieses Mitglied vergeben, aber kein Benutzer erstellt. Das Passwort wird gespeichert, aber kann nicht für die Anmeldung an Dolibarr verwendet werden. Es kann von einem externen Modul/einer Schnittstelle verwendet werden, aber wenn Sie kein Login oder Passwort für dieses Mitglied definiert müssen, können Sie die Option "Login für jedes Mitglied verwalten" in den Mitgliedseinstellungen deaktivieren. Wenn Sie ein Login aber kein Passwort benötige, lassen Sie dieses Feld leer, um diese Meldung zu deaktivieren. Anmerkung: Die E-Mail-Adresse kann auch zur Anmeldung verwendet werden, wenn das Mitglied mit einem Benutzer verbunden wird. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Ihr Login wurde verändert. Aus Sicherhei WarningAnEntryAlreadyExistForTransKey=Eine Übersetzung für diesen Übersetzungsschlüssel existiert schon für diese Sprache WarningNumberOfRecipientIsRestrictedInMassAction=Achtung, die Anzahl der verschiedenen Empfänger ist auf <b> %s </b> beschränkt, wenn Massenaktionen für Listen verwendet werden WarningDateOfLineMustBeInExpenseReportRange=Das Datum dieser Positionszeile ist ausserhalb der Datumsspanne dieser Spesenabrechnung +WarningProjectDraft=Das Projekt befindet sich noch im Entwurfsmodus. Vergessen Sie nicht, es zu validieren, wenn Sie Aufgaben verwenden möchten. WarningProjectClosed=Projekt ist geschlossen. Sie müssen es zuerst wieder öffnen. WarningSomeBankTransactionByChequeWereRemovedAfter=Einige Bank-Transaktionen wurden entfernt, nachdem der Kassenbon, der diese enthielt, erzeugt wurde. Daher wird sich die Anzahl der Checks und die Endsumme auf dem Kassenbon von der Anzahl und Endsumme in der Liste unterscheiden. -WarningFailedToAddFileIntoDatabaseIndex=Warnung, Dateieintrag zur ECM-Datenbankindextabelle konnte nicht hinzugefügt werden. +WarningFailedToAddFileIntoDatabaseIndex=Warnung: Dateieintrag zur ECM-Datenbankindextabelle konnte nicht hinzugefügt werden +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. diff --git a/htdocs/langs/de_DE/exports.lang b/htdocs/langs/de_DE/exports.lang index 972584e5da7..911f2646c68 100644 --- a/htdocs/langs/de_DE/exports.lang +++ b/htdocs/langs/de_DE/exports.lang @@ -133,3 +133,4 @@ KeysToUseForUpdates=Schlüssel (Spalte), der zum <b> Aktualisieren </b> der vorh NbInsert=Anzahl eingefügter Zeilen: %s NbUpdate=Anzahl geänderter Zeilen: %s MultipleRecordFoundWithTheseFilters=Mehrere Ergebnisse wurden mit diesen Filtern gefunden: %s +StocksWithBatch=Lagerbestände und Standort (Lager) von Produkten mit Chargen- / Seriennummer diff --git a/htdocs/langs/de_DE/ftp.lang b/htdocs/langs/de_DE/ftp.lang index b620f05a5ce..c60e50f9251 100644 --- a/htdocs/langs/de_DE/ftp.lang +++ b/htdocs/langs/de_DE/ftp.lang @@ -1,14 +1,14 @@ # Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP-Verbindungseinstellungen -NewFTPClient=Neue FTP-Verbindung -FTPArea=FTP-Verbindung(en) -FTPAreaDesc=Diese Ansicht zeigt Ihnen den Inhalt eines FTP-Servers an. -SetupOfFTPClientModuleNotComplete=Die Einstellungen des FTP-Verbindungsmoduls scheinen unvollständig zu sein. -FTPFeatureNotSupportedByYourPHP=Ihre eingesetzte PHP-Version unterstützt keine FTP-Funktionen -FailedToConnectToFTPServer=Fehler beim Verbindungsaufbau zum FTP-Server %s, Port %s -FailedToConnectToFTPServerWithCredentials=Anmeldung am FTP-Server mit dem eingegebenen Benutzername / Passwort fehlgeschlagen +FTPClientSetup=Einrichtung des FTP- oder SFTP-Client-Moduls +NewFTPClient=Neue FTP / FTPS-Verbindungs-Konfiguration +FTPArea=FTP / FTPS-Bereich +FTPAreaDesc=Dieser Bildschirm zeigt eine Ansicht eines FTP- und SFTP-Servers. +SetupOfFTPClientModuleNotComplete=Die Konfiguration des FTP- oder SFTP-Client-Moduls scheint unvollständig zu sein +FTPFeatureNotSupportedByYourPHP=Ihr PHP unterstützt keine FTP- oder SFTP-Funktionen +FailedToConnectToFTPServer=Verbindung zum Server fehlgeschlagen (Server %s, Port %s) +FailedToConnectToFTPServerWithCredentials=Anmeldung am Server mit definiertem Login / Passwort fehlgeschlagen FTPFailedToRemoveFile=Konnte Datei <b>%s</b> nicht entfernen. Überprüfen Sie die Berechtigungen. FTPFailedToRemoveDir=Konnte Verzeichnis <b>%s</b> nicht entfernen. Überprüfen Sie die Berechtigungen und ob das Verzeichnis leer ist. FTPPassiveMode=Passives FTP -ChooseAFTPEntryIntoMenu=Wählen Sie eine FTP-Adresse im Menü aus +ChooseAFTPEntryIntoMenu=Wählen Sie eine FTP / SFTP-Seite aus dem Menü ... FailedToGetFile=Folgende Datei(en) konnte(n) nicht geladen werden: %s diff --git a/htdocs/langs/de_DE/interventions.lang b/htdocs/langs/de_DE/interventions.lang index ca931e06152..0822f3dda20 100644 --- a/htdocs/langs/de_DE/interventions.lang +++ b/htdocs/langs/de_DE/interventions.lang @@ -4,7 +4,7 @@ Interventions=Serviceaufträge InterventionCard=Serviceauftrag - Arbeitsbericht NewIntervention=Neuer Serviceauftrag AddIntervention=Serviceauftrag erstellen -ChangeIntoRepeatableIntervention=Wechseln Sie zu wiederholbaren Eingriffen +ChangeIntoRepeatableIntervention=Wechseln Sie zu wiederholbaren Serviceauftrag ListOfInterventions=Liste der Serviceaufträge ActionsOnFicheInter=Aktionen zum Serviceauftrag LastInterventions=%s neueste Serviceaufträge @@ -17,10 +17,10 @@ ModifyIntervention=Ändere Serviceauftrag DeleteInterventionLine=Serviceauftragsposition löschen ConfirmDeleteIntervention=Möchten Sie diesen Serviceauftrag wirklich löschen? ConfirmValidateIntervention=Sind Sie sicher, dass Sie den Serviceauftrag <b>%s</b> freigeben wollen? -ConfirmModifyIntervention=Möchten sie diesen Serviceauftrag wirklich ändern? +ConfirmModifyIntervention=Möchten Sie diesen Serviceauftrag wirklich ändern? ConfirmDeleteInterventionLine=Möchten Sie diese Vertragsposition wirklich löschen? ConfirmCloneIntervention=Möchten Sie diesen Serviceauftrag wirklich duplizieren? -NameAndSignatureOfInternalContact=Name und Unterschrift des Mitarbeiter: +NameAndSignatureOfInternalContact=Name und Unterschrift des Mitarbeiters: NameAndSignatureOfExternalContact=Name und Unterschrift des Kunden: DocumentModelStandard=Standard-Dokumentvorlage für Serviceaufträge InterventionCardsAndInterventionLines=Serviceaufträge und Serviceauftragspositionen @@ -64,3 +64,5 @@ InterLineDuration=Serviceauftragsposition Dauer InterLineDesc=Serviceauftragsposition Beschreibung RepeatableIntervention=Vorlage der Intervention ToCreateAPredefinedIntervention=Für eine vordefinierte oder wiederkehrende Intervention erstellen Sie zunächst eine gemeinsame Intervention und konvertieren diese dann in eine Vorlage +Reopen=entwerfen +ConfirmReopenIntervention=Möchten Sie den Serviceauftrag <b> %s </b> wieder öffnen? diff --git a/htdocs/langs/de_DE/intracommreport.lang b/htdocs/langs/de_DE/intracommreport.lang index 4ce6f017ea5..c86e525cc51 100644 --- a/htdocs/langs/de_DE/intracommreport.lang +++ b/htdocs/langs/de_DE/intracommreport.lang @@ -31,10 +31,10 @@ IntracommReportTitle=XML-Datei der Zollerklärung vorbereiten # List IntracommReportList=Liste der Erkärungen -IntracommReportNumber=Numero of declaration -IntracommReportPeriod=Period of nalysis +IntracommReportNumber=Numero der Erklärung +IntracommReportPeriod=Analysezeitraum IntracommReportTypeDeclaration=Art der Erklärung -IntracommReportDownload=download XML file +IntracommReportDownload=XML-Datei herunterladen # Invoice IntracommReportTransportMode=Versandweg diff --git a/htdocs/langs/de_DE/languages.lang b/htdocs/langs/de_DE/languages.lang index 0c63da65bab..9a61df6591a 100644 --- a/htdocs/langs/de_DE/languages.lang +++ b/htdocs/langs/de_DE/languages.lang @@ -40,7 +40,7 @@ Language_es_PA=Spanish (Panama) Language_es_PY=Spanisch (Paraguay) Language_es_PE=Spanisch (Peru) Language_es_PR=Spanisch (Puerto Rico) -Language_es_US=Spanish (USA) +Language_es_US=Spanisch (USA) Language_es_UY=Spanisch (Uruguay) Language_es_GT=Spanisch (Guatemala) Language_es_VE=Spanisch (Venezuela) diff --git a/htdocs/langs/de_DE/mails.lang b/htdocs/langs/de_DE/mails.lang index 413cb8e07f1..3c7a87f490e 100644 --- a/htdocs/langs/de_DE/mails.lang +++ b/htdocs/langs/de_DE/mails.lang @@ -92,6 +92,7 @@ MailingModuleDescEmailsFromUser=E-Mail-Adresse durch manuelle Eingabe hinzufüge MailingModuleDescDolibarrUsers=Benutzer mit E-Mail-Adresse MailingModuleDescThirdPartiesByCategories=Partner (nach Kategorien) SendingFromWebInterfaceIsNotAllowed=Versand vom Webinterface ist nicht erlaubt +EmailCollectorFilterDesc=Alle Filter müssen übereinstimmen, damit eine E-Mail erfasst wird # Libelle des modules de liste de destinataires mailing LineInFile=Zeile %s in der Datei @@ -125,12 +126,13 @@ TagMailtoEmail=Empfänger E-Mail (beinhaltet html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=Kein E-Mail gesendet. Ungültige Absender- oder Empfängeradresse. Benutzerprofil kontrollieren. # Module Notifications Notifications=Benachrichtigungen -NoNotificationsWillBeSent=Für dieses Ereignis und diesen Partner sind keine Benachrichtigungen geplant -ANotificationsWillBeSent=Eine Benachrichtigung wird per E-Mail versendet. -SomeNotificationsWillBeSent=%s Benachrichtigungen werden per E-Mail versendet. -AddNewNotification=Neues E-Mail-Benachrichtigungsziel-Event aktivieren -ListOfActiveNotifications=Liste aller aktiven Empänger/Events für E-Mail Benachrichtigungen -ListOfNotificationsDone=Liste aller versendeten E-Mail-Benachrichtigungen +NotificationsAuto=Benachrichtigungen Auto. +NoNotificationsWillBeSent=Für diesen Ereignistyp und dieses Unternehmen sind keine automatischen E-Mail-Benachrichtigungen geplant +ANotificationsWillBeSent=1 automatische Benachrichtigung wird per E-Mail gesendet +SomeNotificationsWillBeSent=%s automatische Benachrichtigungen werden per E-Mail gesendet +AddNewNotification=Abonnieren Sie eine neue automatische E-Mail-Benachrichtigung (Ziel / Ereignis) +ListOfActiveNotifications=Alle aktiven Abonnements (Ziele / Ereignisse) für die automatische E-Mail-Benachrichtigung auflisten +ListOfNotificationsDone=Alle automatisch gesendeten E-Mail-Benachrichtigungen auflisten MailSendSetupIs=Der E-Mail-Versand wurde auf '%s' konfiguriert. Dieser Modus kann nicht für E-Mail-Kampagnen verwendet werden. MailSendSetupIs2=Sie müssen zuerst mit einem Admin-Konto im Menü %sStart - Einstellungen - E-Mails%s den Parameter <strong>'%s'</strong> auf den Modus '%s' ändern. Dann können Sie die Daten des SMTP-Servers von Ihrem Internetdienstanbieter eingeben und die E-Mail-Kampagnen-Funktion nutzen. MailSendSetupIs3=Bei Fragen über die Einrichtung Ihres SMTP-Servers, können Sie %s fragen. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Die importierte Datei muss im folgenden Format vorlie UseFormatInputEmailToTarget=Geben Sie eine Zeichenkette im Format<br><strong>E-Mail-Adresse;Nachname;Vorname;Zusatzinformationen</strong> ein MailAdvTargetRecipients=Empfänger (Erweitere Selektion) AdvTgtTitle=Füllen Sie die Eingabefelder zur Vorauswahl der Partner- oder Kontakt- / Adressen - Empänger -AdvTgtSearchTextHelp=Verwenden Sie %% als Platzhalter. Um beispielsweise alle Elemente wie <b> jean, joe, jim </b> zu finden, können Sie auch <b> j%% </b> eingeben. als Trennzeichen für Wert und Verwendung! für außer diesem Wert. Beispiel: <b> jean; joe; jim%%;! Jimo;! Jima% </b> zielt auf alle jean, joe, beginnt mit jim, aber nicht mit jimo und nicht auf alles, was mit jima beginnt +AdvTgtSearchTextHelp=Verwenden Sie %% als Platzhalter. Um beispielsweise alle Elemente wie <b> jean, joe, jim </b> zu finden, können Sie <b> j%% </b> eingeben, außerdem ; als Trennzeichen für Werte verwenden und ! für ohne diesen Wert. Zum Beispiel wird <b> jean; joe; jim%% ;! Jimo ;!jima%%</b> zielt auf alle die mit jean, joe, jim beginnen, aber nicht auf jimo und nicht auf alles, was mit jima beginnt AdvTgtSearchIntHelp=Intervall verwenden um eine Integer oder Fliesskommazahl auszuwählen AdvTgtMinVal=Mindestwert AdvTgtMaxVal=Maximalwert @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Filter erstellen AdvTgtOrCreateNewFilter=Name des neuen Filters NoContactWithCategoryFound=Kein Kontakt/Adresse mit einer Kategorie gefunden NoContactLinkedToThirdpartieWithCategoryFound=Kein Kontakt/Adresse mit einer Kategorie gefunden -OutGoingEmailSetup=Postausgang -InGoingEmailSetup=Posteingang -OutGoingEmailSetupForEmailing=Einrichtung ausgehender E-Mails (für Modul %s) -DefaultOutgoingEmailSetup=Standardeinstellungen für ausgehende E-Mails +OutGoingEmailSetup=Ausgehende E-Mails +InGoingEmailSetup=Eingehende E-Mails +OutGoingEmailSetupForEmailing=Ausgehende E-Mails (für Modul %s) +DefaultOutgoingEmailSetup=Gleiche Konfiguration wie beim globalen Setup für ausgehende E-Mails Information=Information ContactsWithThirdpartyFilter=Kontakte mit Drittanbieter-Filter -Unanswered=Unanswered +Unanswered=Unbeantwortet Answered=Beantwortet -IsNotAnAnswer=Is not answer (initial email) -IsAnAnswer=Is an answer of an initial email +IsNotAnAnswer=Ist keine Antwort (Initial-E-Mail) +IsAnAnswer=Ist eine Antwort auf eine Initial-E-Mail +RecordCreatedByEmailCollector=Datensatz, der vom E-Mail-Sammler %s aus der E-Mail %s erstellt wurde +DefaultBlacklistMailingStatus=Standardkontaktstatus für das Ablehnen von Massen-E-Mails +DefaultStatusEmptyMandatory=Leer aber erforderlich diff --git a/htdocs/langs/de_DE/main.lang b/htdocs/langs/de_DE/main.lang index 3b75f3e7964..f75c58b846a 100644 --- a/htdocs/langs/de_DE/main.lang +++ b/htdocs/langs/de_DE/main.lang @@ -18,7 +18,7 @@ FormatHourShortJQuery=HH:MI FormatHourShort=%H:%M FormatHourShortDuration=%H:%M FormatDateTextShort=%d %b %Y -FormatDateText=%d %B %Y +FormatDateText=%d. %B %Y FormatDateHourShort=%d.%m.%Y %H:%M FormatDateHourSecShort=%d.%m.%Y %H:%M:%S FormatDateHourTextShort=%d %b %Y %H:%M @@ -28,7 +28,9 @@ NoTemplateDefined=Für diesen E-Mail-Typ ist keine Vorlage verfügbar AvailableVariables=verfügbare Variablen NoTranslation=Keine Übersetzung Translation=Übersetzung +CurrentTimeZone=Aktuelle Zeitzone des PHP-Servers EmptySearchString=Keine leeren Suchkriterien eingeben +EnterADateCriteria=Geben Sie ein Datumskriterium ein NoRecordFound=Keinen Eintrag gefunden NoRecordDeleted=Keine Datensätze gelöscht NotEnoughDataYet=nicht genügend Daten @@ -85,6 +87,8 @@ FileWasNotUploaded=Ein Dateianhang wurde gewählt aber noch nicht hochgeladen. K NbOfEntries=Anz. an Einträgen GoToWikiHelpPage=Onlinehilfe lesen (Internetzugang notwendig) GoToHelpPage=Hilfe lesen +DedicatedPageAvailable=Es gibt eine spezielle Hilfeseite, die sich auf Ihren aktuellen Bildschirm bezieht +HomePage=Startseite RecordSaved=Eintrag gespeichert RecordDeleted=Eintrag gelöscht RecordGenerated=Eintrag erzeugt @@ -197,7 +201,7 @@ ReOpen=Wiedereröffnen Upload=Upload ToLink=Link Select=Wählen Sie -SelectAll=Select all +SelectAll=Alle wählen Choose=Wählen Resize=Skalieren ResizeOrCrop=Grösse ändern oder zuschneiden @@ -220,6 +224,7 @@ Value=Wert PersonalValue=Persönlicher Wert NewObject=Neu %s NewValue=Neuer Wert +OldValue=Alter Wert %s CurrentValue=Aktueller Wert Code=Name Type=Typ @@ -258,7 +263,7 @@ Cards=Karten Card=Übersicht Now=Jetzt HourStart=Startzeit -Deadline=Deadline +Deadline=Frist Date=Datum DateAndHour=Datum und Uhrzeit DateToday=heutiges Datum @@ -267,10 +272,10 @@ DateStart=Startdatum DateEnd=Enddatum DateCreation=Erstellungsdatum DateCreationShort=Erstelldatum -IPCreation=Creation IP +IPCreation=Erstellungs-IP DateModification=Änderungsdatum DateModificationShort=Änderungsdatum -IPModification=Modification IP +IPModification=Änderungs-IP DateLastModification=Datum letzte Änderung DateValidation=Freigabedatum DateClosing=Schließungsdatum @@ -324,7 +329,7 @@ Morning=Morgen Afternoon=Nachmittag Quadri=vierfach MonthOfDay=Tag des Monats -DaysOfWeek=Days of week +DaysOfWeek=Wochentage HourShort=H MinuteShort=mn Rate=Rate @@ -375,7 +380,7 @@ MulticurrencyPaymentAmount=Zahlungsbetrag, Originalwährung MulticurrencyAmountHT=Nettobetrag, Originalwährung MulticurrencyAmountTTC=Betrag (Brutto), Originalwährung MulticurrencyAmountVAT=Steuerbetrag, Originalwährung -MulticurrencySubPrice=Amount sub price multi currency +MulticurrencySubPrice=Betrag Unterpreis Mehrfach-Währung AmountLT1=USt.-Betrag 2 AmountLT2=USt.-Betrag 3 AmountLT1ES=RE Betrag @@ -433,6 +438,7 @@ RemainToPay=noch offen Module=Module / Anwendungen Modules=Module / Anwendungen Option=Option +Filters=Filter List=Liste FullList=Vollständige Liste FullConversation=Ganzes Gespräch @@ -494,7 +500,7 @@ By=Durch From=Von FromDate=von FromLocation=von -at=at +at=beim to=An To=An and=und @@ -517,7 +523,7 @@ Draft=Entwurf Drafts=Entwürfe StatusInterInvoiced=Berechnet Validated=Bestätigt -ValidatedToProduce=Validated (To produce) +ValidatedToProduce=Validiert (zu produzieren) Opened=Geöffnet OpenAll=Öffnen (Alle) ClosedAll=Schließen (Alle) @@ -650,6 +656,7 @@ SupplierPreview=Lieferantenvorschau ShowCustomerPreview=Zeige Kundenvorschau ShowSupplierPreview=Zeige Lieferantenvorschau RefCustomer=Ihr Zeichen +InternalRef=Interne Referenz Currency=Währung InfoAdmin=Hinweise für Administratoren Undo=Rückgängig @@ -671,7 +678,7 @@ SendMail=E-Mail versenden Email=E-Mail NoEMail=Keine E-Mail-Adresse(n) vorhanden AlreadyRead=Bereits gelesen -NotRead=Nicht gelesen +NotRead=Ungelesen NoMobilePhone=Kein Handy Owner=Eigentümer FollowingConstantsWillBeSubstituted=Nachfolgende Konstanten werden durch entsprechende Werte ersetzt. @@ -888,8 +895,8 @@ Miscellaneous=Verschiedenes Calendar=Terminkalender GroupBy=Gruppiere nach ... ViewFlatList=Listenansicht zeigen -ViewAccountList=View ledger -ViewSubAccountList=View subaccount ledger +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 @@ -969,28 +976,28 @@ eight=Acht nine=Neun ten=Zehn eleven=Elf -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 +twelve=zwölf +thirteen=dreizehn +fourteen=vierzehn +fifteen=fünfzehn +sixteen=sechszehn +seventeen=siebzehn +eighteen=achtzehn +nineteen=neunzehn +twenty=zwanzig +thirty=dreißig +forty=vierzig +fifty=fünfzig +sixty=sechzig +seventy=siebzig +eighty=achtzig +ninety=neunzig +hundred=hundert +thousand=tausend +million=Million +billion=Milliarde +trillion=Billion +quadrillion=Billiarde SelectMailModel=Wähle E-Mail-Vorlage SetRef=Set Ref Select2ResultFoundUseArrows=Einige Ergebnisse gefunden. Nutzen Sie die Pfeiltasten um auszuwählen. @@ -1021,7 +1028,7 @@ SearchIntoCustomerShipments=Kunden Lieferungen SearchIntoExpenseReports=Spesenabrechnungen SearchIntoLeaves=Urlaub SearchIntoTickets=Tickets -SearchIntoCustomerPayments=Customer payments +SearchIntoCustomerPayments=Kundenzahlungen SearchIntoVendorPayments=Lieferanten Zahlung SearchIntoMiscPayments=Sonstige Zahlungen CommentLink=Kommentare @@ -1092,7 +1099,7 @@ NotUsedForThisCustomer=Wird für diesen Kunden nicht verwendet AmountMustBePositive=Der Betrag muss positiv sein ByStatus=Nach Status InformationMessage=Information -Used=Used +Used=Gebraucht ASAP=So schnell wie möglich CREATEInDolibarr=Datensatz %s erstellt MODIFYInDolibarr=Datensatz %s geändert @@ -1100,10 +1107,16 @@ DELETEInDolibarr=Datensatz %s gelöscht VALIDATEInDolibarr=Datensatz %s bestätigt APPROVEDInDolibarr=Datensatz %s genehmigt DefaultMailModel=Standard E-Mail Modell -PublicVendorName=Public name of vendor +PublicVendorName=Öffentlicher Name des Anbieters DateOfBirth=Geburtsdatum -SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry=Security token has expired, so action has been canceled. Please try again. -UpToDate=Up-to-date -OutOfDate=Out-of-date +SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry=Das Sicherheitstoken ist abgelaufen, sodass die Aktion abgebrochen wurde. Bitte versuche es erneut. +UpToDate=Aktuell +OutOfDate=Veraltet EventReminder=Ereignis-Erinnerung -UpdateForAllLines=Update for all lines +UpdateForAllLines=Aktualisierung für alle Zeilen +OnHold=angehalten +Civility=Anrede/Titel +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 diff --git a/htdocs/langs/de_DE/members.lang b/htdocs/langs/de_DE/members.lang index b7b526b5b12..c11bfa1dff2 100644 --- a/htdocs/langs/de_DE/members.lang +++ b/htdocs/langs/de_DE/members.lang @@ -80,7 +80,7 @@ DeleteType=Löschen VoteAllowed=Stimmrecht Physical=natürliche Person Moral=juristische Person -MorAndPhy=Moral and Physical +MorAndPhy=juristisch und natürlich Reenable=Reaktivieren ResiliateMember=Mitglied deaktivieren ConfirmResiliateMember=Möchten Sie dieses Mitglied wirklich deaktivieren? @@ -177,7 +177,7 @@ MenuMembersStats=Statistik LastMemberDate=Letztes Mitgliedschaftsdatum LatestSubscriptionDate=Letztes Beitragsdatum MemberNature=Art des Mitglieds -MembersNature=Nature of members +MembersNature=Art der Mitglieder Public=Informationen sind öffentlich NewMemberbyWeb=Neues Mitglied hinzugefügt, wartet auf Genehmigung. NewMemberForm=Formular neues Mitglied diff --git a/htdocs/langs/de_DE/modulebuilder.lang b/htdocs/langs/de_DE/modulebuilder.lang index 04d3f86d971..be2bc88b630 100644 --- a/htdocs/langs/de_DE/modulebuilder.lang +++ b/htdocs/langs/de_DE/modulebuilder.lang @@ -40,6 +40,7 @@ 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-Seite für Kontaktregisterkarte PathToModulePackage=Pfad des zu komprimierenden Moduls/Anwendungspakets PathToModuleDocumentation=Pfad zur Datei der Modul- / Anwendungsdokumentation (%s) SpaceOrSpecialCharAreNotAllowed=Leer- oder Sonderzeichen sind nicht erlaubt. @@ -77,7 +78,7 @@ IsAMeasure=Ist eine Maßnahme DirScanned=Verzeichnis gescannt NoTrigger=Kein Trigger NoWidget=Kein Widget -GoToApiExplorer=Gehe zum API Explorer +GoToApiExplorer=API-Explorer ListOfMenusEntries=Liste der Menüeinträge ListOfDictionariesEntries=Liste der Wörterbucheinträge ListOfPermissionsDefined=Liste der definierten Berechtigungen @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=Sind Kenntnisse in SQL und PHP vorhanden, können Sie d SeeTopRightMenu=Siehe <span class="fa fa-bug"></span>im Menü Oben Rechts AddLanguageFile=Sprachdatei hinzufügen YouCanUseTranslationKey=You can use here a key that is the translation key found into language file (see tab "Languages") -DropTableIfEmpty=(Tabelle löschen wenn leer) +DropTableIfEmpty=(Tabelle löschen, wenn leer) TableDoesNotExists=Die Tabelle %s existiert nicht TableDropped=Tabelle %s gelöscht InitStructureFromExistingTable=Erstelle die Struktur-Array-Zeichenfolge einer vorhandenen Tabelle @@ -126,7 +127,6 @@ UseSpecificEditorURL = Verwenden Sie eine bestimmte Editor-URL UseSpecificFamily = Verwenden Sie eine bestimmte Familie UseSpecificAuthor = Verwenden Sie einen bestimmten Autor UseSpecificVersion = Verwenden Sie eine bestimmte Anfangsversion -ModuleMustBeEnabled=Das Modul / die Anwendung muss zuerst aktiviert werden IncludeRefGeneration=Die Objektreferen muss automatisch generiert werden IncludeRefGenerationHelp=Aktivieren Sie diese Option, wenn Sie Code einschließen möchten, um die Generierung der Referenz automatisch zu verwalten IncludeDocGeneration=Ich möchte einige Dokumente aus dem Objekt generieren @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Feldtypen:<br>varchar(99), double(24,8), real, text, html, date AsciiToHtmlConverter=Ascii zu HTML Konverter AsciiToPdfConverter=Ascii zu PDF Konverter TableNotEmptyDropCanceled=Tabelle nicht leer. Löschen wurde abgebrochen. +ModuleBuilderNotAllowed=Der Modul-Generator ist verfügbar, aber für Ihren Benutzer nicht zulässig. diff --git a/htdocs/langs/de_DE/mrp.lang b/htdocs/langs/de_DE/mrp.lang index 731e122fa42..5efda355faf 100644 --- a/htdocs/langs/de_DE/mrp.lang +++ b/htdocs/langs/de_DE/mrp.lang @@ -77,4 +77,28 @@ UnitCost=Kosten pro Einheit TotalCost=Gesamtsumme Kosten BOMTotalCost=Die Herstellungskosten dieser Stückliste, basierend auf den Kosten jeder Menge und jeden verbrauchten Produktes (nutzt den Selbstkostenpreis wenn er definiert ist, ansonsten den Durchschnittspreis sofern definiert oder den besten Einkaufspreis) GoOnTabProductionToProduceFirst=Die Produktion muss begonnen sein, um einen Produktionsauftrag zu schließen (siehe Tab '%s'). Alternativ kann er storniert werden. -ErrorAVirtualProductCantBeUsedIntoABomOrMo=A kit can't be used into a BOM or a MO +ErrorAVirtualProductCantBeUsedIntoABomOrMo=Ein Satz kann nicht in einer Stückliste oder einem Fertigungsauftrag verwendet werden +Workstation=Arbeitsplatz +Workstations=Arbeitsplätze +WorkstationsDescription=Arbeitsplatzverwaltung +WorkstationSetup = Arbeitsplatz einrichten +WorkstationSetupPage = Workstations setup page +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about page +WorkstationList=Liste Arbeitsplätze +WorkstationCreate=neuen Arbeitsplatz hinzufügen +ConfirmEnableWorkstation=Möchten Sie den Arbeitsplatz <b> %s </b> aktivieren? +EnableAWorkstation=einen Arbeitsplatz aktivieren +ConfirmDisableWorkstation=Are you sure you want to disable workstation <b>%s</b> ? +DisableAWorkstation=Disable a workstation +DeleteWorkstation=Supprimer +NbOperatorsRequired=Number of operators required +THMOperatorEstimated=Estimated operator THM +THMMachineEstimated=Estimated machine THM +WorkstationType=Arbeitsplatztyp +Human=Mensch +Machine=Maschine +HumanMachine=Mensch & Maschine +WorkstationArea=Workstation area +Machines=Maschinen +THMEstimatedHelp=This rate makes it possible to define a forecast cost of the item diff --git a/htdocs/langs/de_DE/multicurrency.lang b/htdocs/langs/de_DE/multicurrency.lang index cd4eece06b1..070feed47a3 100644 --- a/htdocs/langs/de_DE/multicurrency.lang +++ b/htdocs/langs/de_DE/multicurrency.lang @@ -20,3 +20,19 @@ MulticurrencyPaymentAmount=Zahlungsbetrag (Originalwährung) AmountToOthercurrency=Betrag (in der Währung des Empfängers) CurrencyRateSyncSucceed=Synchronisation des Währungskurses erfolgreich abgeschlossen MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT=Benutze die Währung des Dokumentes für Online-Zahlungen +TabTitleMulticurrencyRate=Kursliste +ListCurrencyRate=Liste der Wechselkurse für die Währung +CreateRate=Erstellen Sie einen Kurs +FormCreateRate=Kurserstellung +FormUpdateRate=Kursänderung +successRateCreate=Der Kurs für die Währung %s wurde der Datenbank hinzugefügt +ConfirmDeleteLineRate=Möchten Sie den Wechselkurs %s für die Währung %s am Datum %s wirklich entfernen? +DeleteLineRate=Kurs löschen +successRateDelete=Kurs gelöscht +errorRateDelete=Fehler beim Löschen des Kurses +successUpdateRate=Änderung vorgenommen +ErrorUpdateRate=Fehler beim Ändern des Kurses +Codemulticurrency=Währungscode +UpdateRate=Ändern Sie den Kurs +CancelUpdate=stornieren +NoEmptyRate=Das Kursfeld darf nicht leer sein diff --git a/htdocs/langs/de_DE/other.lang b/htdocs/langs/de_DE/other.lang index 49c7e511d24..5ce758eaa4e 100644 --- a/htdocs/langs/de_DE/other.lang +++ b/htdocs/langs/de_DE/other.lang @@ -5,8 +5,6 @@ Tools=Hilfsprogramme TMenuTools=Hilfsprogramme ToolsDesc=Hier finden Sie weitere Hilfsprogramme, die keinem anderem Menüeintrag zugeordnet werden können.<br>Diese Hilfsprogramme können über das linke Menü aufgerufen werden. Birthday=Geburtstag -BirthdayDate=Geburtstag -DateToBirth=Geburtsdatum BirthdayAlertOn=Geburtstagserinnerung EIN BirthdayAlertOff=Geburtstagserinnerung AUS TransKey=Übersetzung des Schlüssels TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Vorangehender Monat (1-12) des Rechnungsdatums TextPreviousMonthOfInvoice=Vorangehender Monat (Text) des Rechnungsdatums NextMonthOfInvoice=Folgender Monat (1-12) des Rechnungsdatums TextNextMonthOfInvoice=Folgender Monat (1-12) des Rechnungsdatum +PreviousMonth=Vorheriger Monat +CurrentMonth=Aktueller Monat ZipFileGeneratedInto=ZIP-Datei erstellt in <b>%s</b>. DocFileGeneratedInto=Doc Datei in <b>%s</b> generiert. JumpToLogin=Abgemeldet. Zur Anmeldeseite... @@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Spesenabrechnung überprüft (Genehmigung aussteh Notify_EXPENSE_REPORT_APPROVE=Spesenabrechnung genehmigt Notify_HOLIDAY_VALIDATE=Urlaubsantrag überprüft (Genehmigung ausstehend) Notify_HOLIDAY_APPROVE=Urlaubsantrag genehmigt +Notify_ACTION_CREATE=Aktion zur Tagesplanung hinzugefügt SeeModuleSetup=Finden Sie im Modul-Setup %s NbOfAttachedFiles=Anzahl der angehängten Dateien/Dokumente TotalSizeOfAttachedFiles=Gesamtgröße der angehängten Dateien/Dokumente @@ -85,8 +86,8 @@ MaxSize=Maximalgröße AttachANewFile=Neue Datei/Dokument anhängen LinkedObject=Verknüpftes Objekt NbOfActiveNotifications=Anzahl der Benachrichtigungen (Anzahl der E-Mail Empfänger) -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__ +PredefinedMailTest=__(Hallo)__\nDies ist eine Testmail, die an __EMAIL__ gesendet wird.\nDie Zeilen sind durch einen Zeilenumbruch getrennt.\n\n__USER_SIGNATURE__ +PredefinedMailTestHtml=__ (Hallo) __ <br> Dies ist eine <b>-Test-</b>-Mail, die an __EMAIL__ gesendet wurde (das Wort test muss fett gedruckt sein). <br> Die Zeilen sind durch einen Zeilenumbruch getrennt. <br> <br> __USER_SIGNATURE__ PredefinedMailContentContract=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendInvoice=__(Hallo)__\n\nDie Rechnung __REF__ finden Sie im Anhang\n\n__ONLINE_PAYMENT_TEXT_AND_URL__\n\n__(Mit freundlichen Grüßen)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendInvoiceReminder=__(Hallo)__\n\nWir möchten Sie daran erinnern, dass die Rechnung __REF__ offenbar nicht bezahlt wurde. Eine Kopie der Rechnung ist als Erinnerung beigefügt.\n\n__ONLINE_PAYMENT_TEXT_AND_URL__\n\n__(Mit freundlichen Grüßen)__\n\n__USER_SIGNATURE__ @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hallo)__\n\nAls Anlage erhalten Sie unsere PredefinedMailContentSendFichInter=__(Hallo)__\n\nBitte finden Sie den Serviceauftrag __REF__ im Anhang\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. DemoDesc=Dolibarr ist eine Management-Software die mehrere Business-Module anbietet. Eine Demo, die alle Module beinhaltet ist nicht sinnvoll , weil der Fall nie existiert (Hunderte von verfügbaren Module). Es stehen auch einige Demo-Profile Typen zur Verfügung. ChooseYourDemoProfil=Bitte wählen Sie das Demo-Profil das Ihrem Anwendgsfall am ehesten entspricht ChooseYourDemoProfilMore=...oder bauen Sie Ihr eigenes Profil <br> (manuelle Auswahl der Module) @@ -214,6 +216,7 @@ EMailTextExpenseReportValidated=Die Spesenabrechnung %s wurde geprüft. EMailTextExpenseReportApproved=Die Spesenabrechnung %s wurde genehmigt. EMailTextHolidayValidated=Urlaubsantrag %s wurde geprüft. EMailTextHolidayApproved=Urlaubsantrag %s wurde genehmigt. +EMailTextActionAdded=Die Aktion %s wurde erfolgreich in die Terminplanung hinzugefügt. ImportedWithSet=Import Datensatz DolibarrNotification=Automatische Benachrichtigung ResizeDesc=Bitte geben Sie eine neue Breite <b>oder</b> Höhe ein. Das Verhältnis wird während des Zuschneidens erhalten... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Kontakt / Adresse durch das Modul E-Mail-Sammler ProjectCreatedByEmailCollector=Projekt durch das Modul E-Mail-Sammler aus der E-Mail erstellt. MSGID %s TicketCreatedByEmailCollector=Ticket durch das Modul E-Mail-Sammler aus der E-Mail erstellt. MSGID %s OpeningHoursFormatDesc=Benutze unterschiedliche von - bis Öffnungs- und Schließzeiten.<br>Leerzeichen trennt unterschiedliche Bereiche.<br>Beispiel: 8-12 14-18 +PrefixSession=Präfix für Sitzungs-ID ##### Export ##### ExportsArea=Exportübersicht @@ -278,9 +282,9 @@ LinesToImport=Positionen zum importieren MemoryUsage=Speichernutzung RequestDuration=Dauer der Anfrage -ProductsPerPopularity=Products/Services by popularity +ProductsPerPopularity=Produkte / Dienstleistungen nach Beliebtheit PopuProp=Produkte / Dienstleistungen nach Beliebtheit in Angeboten PopuCom=Produkte / Dienstleistungen nach Beliebtheit in Bestellungen ProductStatistics=Produkt- / Dienstleistungsstatistik NbOfQtyInOrders=Menge in Bestellungen -SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... +SelectTheTypeOfObjectToAnalyze=Wählen Sie den zu analysierenden Objekttyp aus ... diff --git a/htdocs/langs/de_DE/products.lang b/htdocs/langs/de_DE/products.lang index fca33bebb23..b29a2da4eda 100644 --- a/htdocs/langs/de_DE/products.lang +++ b/htdocs/langs/de_DE/products.lang @@ -104,24 +104,25 @@ SetDefaultBarcodeType=Wählen Sie den standardmäßigen Barcode-Typ BarcodeValue=Barcode-Wert NoteNotVisibleOnBill=Anmerkung (nicht sichtbar auf Rechnungen, Angeboten,...) ServiceLimitedDuration=Ist die Erbringung einer Dienstleistung zeitlich beschränkt: -FillWithLastServiceDates=Fill with last service line dates +FillWithLastServiceDates=Fülle mit Daten der letzten Servicezeile MultiPricesAbility=Mehrere Preissegmente pro Produkt / Dienstleistung (jeder Kunde befindet sich in einem Preissegment) MultiPricesNumPrices=Anzahl Preise -DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual products) -AssociatedProducts=Kits -AssociatedProductsNumber=Number of products composing this kit +DefaultPriceType=Basis der Standardpreise (mit versus ohne Steuern) beim Hinzufügen neuer Verkaufspreise +AssociatedProductsAbility=Aktiviere Kits (Set von mehreren Produkte) +VariantsAbility=Varianten aktivieren (Produktvarianten, z. B. Farbe, Größe) +AssociatedProducts=Sätze +AssociatedProductsNumber=Anzahl der Produkte, aus denen dieser Satz besteht ParentProductsNumber=Anzahl der übergeordneten Produkte ParentProducts=Verwandte Produkte -IfZeroItIsNotAVirtualProduct=If 0, this product is not a kit -IfZeroItIsNotUsedByVirtualProduct=If 0, this product is not used by any kit +IfZeroItIsNotAVirtualProduct=Wenn 0, ist dieses Produkt kein Satz +IfZeroItIsNotUsedByVirtualProduct=Bei 0 wird dieses Produkt von keinem Satz verwendet KeywordFilter=Stichwortfilter CategoryFilter=Kategoriefilter ProductToAddSearch=Suche hinzuzufügendes Produkt NoMatchFound=Kein Eintrag gefunden ListOfProductsServices=Liste der Produkte/Leistungen -ProductAssociationList=List of products/services that are component(s) of this kit -ProductParentList=List of kits with this product as a component +ProductAssociationList=Liste der Produkte / Dienstleistungen, die Bestandteil dieses Satzes sind +ProductParentList=Liste der Sätze mit diesem Produkt als Komponente ErrorAssociationIsFatherOfThis=Eines der ausgewählten Produkte ist Elternteil des aktuellen Produkts DeleteProduct=Produkt/Leistung löschen ConfirmDeleteProduct=Möchten Sie dieses Produkt/Leistung wirklich löschen? @@ -169,6 +170,8 @@ SuppliersPrices=Lieferanten Preise SuppliersPricesOfProductsOrServices=Herstellerpreise (von Produkten oder Dienstleistungen) CustomCode=Zolltarifnummer CountryOrigin=Urspungsland +RegionStateOrigin=Ursprungsregion +StateOrigin=Ursprungs- Staat | Provinz Nature=Produkttyp (Material / Fertig) NatureOfProductShort=Art des Produkts NatureOfProductDesc=Rohstoff oder Fertigprodukt @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Festen Preis nutzen PriceByQuantity=Unterschiedliche Preise nach Menge DisablePriceByQty=Preise nach Menge ausschalten PriceByQuantityRange=Bereich der Menge -MultipriceRules=Regeln der Preisstufen +MultipriceRules=Automatische Preise für Segment UseMultipriceRules=Verwenden Sie die im Produktmodul-Setup definierten Preissegmentregeln, um automatisch die Preise aller anderen Segmente gemäß dem ersten Segment zu berechnen PercentVariationOver=%% Veränderung über %s PercentDiscountOver=%% Nachlass über %s @@ -287,9 +290,9 @@ PriceExpressionEditorHelp5=verfügbare globale Werte: PriceMode=Preisfindungsmethode PriceNumeric=Nummer DefaultPrice=Standardpreis -DefaultPriceLog=Log of previous default prices +DefaultPriceLog=Protokoll der vorherigen Standardpreise ComposedProductIncDecStock=Erhöhen/Verringern des Lagerbestands bei verknüpften Produkten -ComposedProduct=Kinderprodukte +ComposedProduct=Unterprodukte MinSupplierPrice=Minimaler Kaufpreis MinCustomerPrice=Minimaler Verkaufspreis DynamicPriceConfiguration=Dynamische Preis Konfiguration @@ -340,7 +343,7 @@ UseProductFournDesc=Fügen Sie eine Funktion hinzu, um die Beschreibungen der vo ProductSupplierDescription=Lieferantenbeschreibung für das Produkt UseProductSupplierPackaging=Berechne die Verpackung bei Lieferantenpreisen (berechnet neue Mengen / Lieferantenpreise gemäß der eingesetzten Verpackung, wenn Zeilen in den Lieferantendokumenten hinzugefügt / aktualisiert werden). PackagingForThisProduct=Verpackung -PackagingForThisProductDesc=On supplier order, you will automaticly order this quantity (or a multiple of this quantity). Cannot be less than minimum buying quantity +PackagingForThisProductDesc=Bei Lieferantenbestellung bestellen Sie automatisch diese Menge (oder ein Vielfaches dieser Menge). Kann nicht unter der Mindestabnahmemenge liegen QtyRecalculatedWithPackaging=Die Menge der Zeile wurde entsprechend der Lieferantenverpackung neu berechnet #Attributes diff --git a/htdocs/langs/de_DE/projects.lang b/htdocs/langs/de_DE/projects.lang index 9b5ba8768f6..681c0f22f23 100644 --- a/htdocs/langs/de_DE/projects.lang +++ b/htdocs/langs/de_DE/projects.lang @@ -67,7 +67,7 @@ TaskDateEnd=Enddatum der Aufgabe TaskDescription=Aufgaben-Beschreibung NewTask=neue Aufgabe AddTask=Aufgabe erstellen -AddTimeSpent=Erfassen verbrauchte Zeit +AddTimeSpent=Erfasse verwendete Zeit AddHereTimeSpentForDay=Zeitaufwand für diesen Tag/Aufgabe hier erfassen AddHereTimeSpentForWeek=Benötigte Zeit in dieser Woche / für diese Aufgabe Activity=Tätigkeit @@ -76,15 +76,16 @@ MyActivities=Meine Aufgaben/Tätigkeiten MyProjects=Meine Projekte MyProjectsArea=meine Projekte - Übersicht DurationEffective=Effektivdauer -ProgressDeclared=Angegebener Fortschritt +ProgressDeclared=Erklärte echte Fortschritte TaskProgressSummary=Aufgabenfortschritt CurentlyOpenedTasks=Aktuell offene Aufgaben -TheReportedProgressIsLessThanTheCalculatedProgressionByX=Der deklarierte Fortschritt ist %s weniger als der berechnete Fortschritt -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=Der deklarierte Fortschritt ist %s mehr als der berechnete Fortschritt -ProgressCalculated=Kalkulierter Fortschritt +TheReportedProgressIsLessThanTheCalculatedProgressionByX=Der deklarierte reale Fortschritt ist weniger %s als der Fortschritt bei der Nutzung +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=Der deklarierte reale Fortschritt ist mehr %s als der Fortschritt bei der Nutzung +ProgressCalculated=Fortschritte bei der Nutzung WhichIamLinkedTo=mit dem ich verbunden bin WhichIamLinkedToProject=Projekt mit dem ich verbunden bin Time=Zeitaufwand +TimeConsumed=verwendet ListOfTasks=Aufgabenliste GoToListOfTimeConsumed=Liste der verwendeten Zeit aufrufen GanttView=Gantt-Diagramm @@ -211,9 +212,9 @@ ProjectNbProjectByMonth=Anzahl der erstellten Projekte pro Monat ProjectNbTaskByMonth=Anzahl der erstellten Aufgaben pro Monat ProjectOppAmountOfProjectsByMonth=Anzahl der Leads pro Monat ProjectWeightedOppAmountOfProjectsByMonth=Gewichtete Anzahl von Leads pro Monat -ProjectOpenedProjectByOppStatus=Open project|lead by lead status -ProjectsStatistics=Statistics on projects or leads -TasksStatistics=Statistics on tasks of projects or leads +ProjectOpenedProjectByOppStatus=Projekt / Lead nach Leadstatus öffnen +ProjectsStatistics=Statistiken zu Projekten oder Interessenten +TasksStatistics=Statistiken zu Aufgaben von Projekten oder Interessenten TaskAssignedToEnterTime=Aufgabe zugewiesen. Eingabe der Zeit zu diese Aufgabe sollte möglich sein. IdTaskTime=ID Zeit Aufgabe YouCanCompleteRef=Wenn die Referenz mit einem Suffix ergänzt werden soll, ist es empfehlenswert, ein Trennstrich '-' zu verwenden, so dass die automatische Numerierung für weitere Projekte funktioniert. Zum Beispiel %s-MYSUFFIX diff --git a/htdocs/langs/de_DE/propal.lang b/htdocs/langs/de_DE/propal.lang index 0956cf4900f..de5a2e451fa 100644 --- a/htdocs/langs/de_DE/propal.lang +++ b/htdocs/langs/de_DE/propal.lang @@ -29,7 +29,7 @@ PropalsDraft=Entwürfe PropalsOpened=geöffnet PropalStatusDraft=Entwurf (freizugeben) PropalStatusValidated=Freigegeben (Angebot ist offen) -PropalStatusSigned=Unterzeichnet (ist zu verrechnen) +PropalStatusSigned=unterzeichnet (abrechenbar) PropalStatusNotSigned=Nicht unterzeichnet (geschlossen) PropalStatusBilled=Verrechnet PropalStatusDraftShort=Entwurf @@ -47,7 +47,6 @@ SendPropalByMail=Angebot per E-Mail versenden DatePropal=Angebotsdatum DateEndPropal=Gültig bis ValidityDuration=Gültigkeitsdauer -CloseAs=Status ändern in SetAcceptedRefused=Setze beauftragt / abgelehnt ErrorPropalNotFound=Angebot %s nicht gefunden AddToDraftProposals=Zu Angebots-Entwurf hinzufügen @@ -87,5 +86,6 @@ CaseFollowedBy=Fall gefolgt von SignedOnly=nur signiert IdProposal=Angebots-ID IdProduct=Produkt ID -PrParentLine=Übergeordnete Zeile des Vorschlags -LineBuyPriceHT=Kaufpreis Betrag abzüglich Steuern für Linie +PrParentLine=Übergeordnete Zeile des Angebots +LineBuyPriceHT=Betrag Kaufpreis abzüglich Steuern für Zeile + diff --git a/htdocs/langs/de_DE/receiptprinter.lang b/htdocs/langs/de_DE/receiptprinter.lang index dd8f3e068d1..f13265c9d26 100644 --- a/htdocs/langs/de_DE/receiptprinter.lang +++ b/htdocs/langs/de_DE/receiptprinter.lang @@ -54,7 +54,7 @@ DOL_DOUBLE_WIDTH=Doppelte Breite DOL_DEFAULT_HEIGHT_WIDTH=Standard für Höhe und Breite DOL_UNDERLINE=Unterstreichen aktivieren DOL_UNDERLINE_DISABLED=Unterstreichen deaktivieren -DOL_BEEP=Signalton +DOL_BEEP=Piepton DOL_PRINT_TEXT=Text drucken DateInvoiceWithTime=Rechnungsdatum und -zeit YearInvoice=Rechnungsjahr diff --git a/htdocs/langs/de_DE/receptions.lang b/htdocs/langs/de_DE/receptions.lang index 8093f6ed4aa..65e73211e22 100644 --- a/htdocs/langs/de_DE/receptions.lang +++ b/htdocs/langs/de_DE/receptions.lang @@ -43,5 +43,5 @@ ProductQtyInSuppliersReceptionAlreadyRecevied=Bereits erhaltene Produktmenge aus ValidateOrderFirstBeforeReception=Sie müssen zunächst die order validate validieren, bevor Sie Empfänge erstellen können. ReceptionsNumberingModules=Nummerierungsmodul für Empfänge ReceptionsReceiptModel=Dokumentvorlagen für Empfänge -NoMorePredefinedProductToDispatch=No more predefined products to dispatch +NoMorePredefinedProductToDispatch=Keine vordefinierten Produkte mehr zum Versand diff --git a/htdocs/langs/de_DE/recruitment.lang b/htdocs/langs/de_DE/recruitment.lang index f7bd9daa1bd..db4e52b8cbf 100644 --- a/htdocs/langs/de_DE/recruitment.lang +++ b/htdocs/langs/de_DE/recruitment.lang @@ -37,39 +37,40 @@ EnablePublicRecruitmentPages=Öffentliche Seiten von offenen Stellen aktivieren # About = Über RecruitmentAbout = Über Personalbeschaffung -RecruitmentAboutPage = Recruitment about page -NbOfEmployeesExpected=Expected nb of employees +RecruitmentAboutPage = Personalbeschaffung über Seite +NbOfEmployeesExpected=Erwartete Anzahl von Mitarbeitern JobLabel=Bezeichnung der beruflichen Position WorkPlace=Arbeitsplatz DateExpected=Erwartetes Datum FutureManager=Zukünftiger Manager ResponsibleOfRecruitement=Verantwortlich für die Rekrutierung -IfJobIsLocatedAtAPartner=If job is located at a partner place +IfJobIsLocatedAtAPartner=Wenn sich der Job an einem Partnerort befindet PositionToBeFilled=Position PositionsToBeFilled=Berufspositionen -ListOfPositionsToBeFilled=List of job positions -NewPositionToBeFilled=New job positions +ListOfPositionsToBeFilled=Liste der Stellen +NewPositionToBeFilled=Neue Stellen -JobOfferToBeFilled=Job position to be filled +JobOfferToBeFilled=Zu besetzende Stelle ThisIsInformationOnJobPosition=Information über die zu besetzende Position ContactForRecruitment=Kontakt für die Personalbeschaffung EmailRecruiter=Recruiter per E-Mail anschreiben -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 +ToUseAGenericEmail=So verwenden Sie eine generische E-Mail. Falls nicht definiert, wird die E-Mail-Adresse des für die Personalbeschaffung Verantwortlichen verwendet +NewCandidature=Neue Bewerbung +ListOfCandidatures=Liste der Bewerbungen RequestedRemuneration=gewünschtes Gehalt ProposedRemuneration=vorgeschlagenes Gehalt ContractProposed=Vertrag unterbreitet ContractSigned=Vertrag unterschrieben -ContractRefused=Contract refused -RecruitmentCandidature=Application +ContractRefused=Vertrag abgelehnt +RecruitmentCandidature=Bewerbung JobPositions=Berufspositionen -RecruitmentCandidatures=Applications +RecruitmentCandidatures=Bewerbungen InterviewToDo=Bewerbungsgespräch machen -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) +AnswerCandidature=Antwort auf die Bewerbung +YourCandidature=Ihre Bewerbung +YourCandidatureAnswerMessage=Vielen Dank für Ihre Bewerbung. <br> ... +JobClosedTextCandidateFound=Die Stelle ist geschlossen. Die Position wurde besetzt. +JobClosedTextCanceled=Die Stelle ist geschlossen. +ExtrafieldsJobPosition=Ergänzende Attribute (Stellenangebote) +ExtrafieldsCandidatures=Ergänzende Attribute (Bewerbungen) +MakeOffer=Machen Sie ein Angebot diff --git a/htdocs/langs/de_DE/salaries.lang b/htdocs/langs/de_DE/salaries.lang index 4ceaf557fd6..e405e235988 100644 --- a/htdocs/langs/de_DE/salaries.lang +++ b/htdocs/langs/de_DE/salaries.lang @@ -12,10 +12,10 @@ ShowSalaryPayment=Zeige Lohnzahlung THM=Durchschnittlicher Stundensatz TJM=Durchschnittlicher Tagessatz CurrentSalary=aktueller Lohn -THMDescription=Dieser Wert kann verwendet werden, um die Kosten für die verbrauchte Zeit eines Anwender zu berechnen, wenn das Modul Projektverwaltung verwendet wird, +THMDescription=Dieser Wert kann verwendet werden, um die Kosten für die verwendete Zeit eines Anwender zu berechnen, wenn das Modul Projektverwaltung verwendet wird, TJMDescription=Dieser Wert ist aktuell nur zu Informationszwecken und wird nicht für eine Berechnung verwendet LastSalaries=Letzte %s Lohnzahlungen -AllSalaries=Alle Lohnzahlungen +AllSalaries=Alle Gehaltszahlungen SalariesStatistics=Statistik Gehälter # Export -SalariesAndPayments=Salaries and payments +SalariesAndPayments=Gehälter und Gehaltszahlungen diff --git a/htdocs/langs/de_DE/sendings.lang b/htdocs/langs/de_DE/sendings.lang index 71c8092fb07..482de9a27e7 100644 --- a/htdocs/langs/de_DE/sendings.lang +++ b/htdocs/langs/de_DE/sendings.lang @@ -20,7 +20,7 @@ CreateShipment=Auslieferung erstellen QtyShipped=Liefermenge QtyShippedShort=Gelieferte Menge QtyPreparedOrShipped=Menge vorbereitet oder versendet -QtyToShip=Versandmenge +QtyToShip=Liefermenge QtyToReceive=Menge zu erhalten QtyReceived=Erhaltene Menge QtyInOtherShipments=Menge in anderen Lieferungen @@ -30,16 +30,17 @@ OtherSendingsForSameOrder=Weitere Lieferungen zu dieser Bestellung SendingsAndReceivingForSameOrder=Warenerhalt und Versand dieser Bestellung SendingsToValidate=Freizugebende Auslieferungen StatusSendingCanceled=Storniert +StatusSendingCanceledShort=storniert StatusSendingDraft=Entwurf StatusSendingValidated=Freigegeben (Artikel versandfertig oder bereits versandt) -StatusSendingProcessed=Verarbeitete +StatusSendingProcessed=Erledigt StatusSendingDraftShort=Entwurf StatusSendingValidatedShort=Freigegeben -StatusSendingProcessedShort=Fertig +StatusSendingProcessedShort=Erledigt SendingSheet=Lieferschein -ConfirmDeleteSending=Möchten Sie diesen Versand wirklich löschen? -ConfirmValidateSending=Möchten Sie diesen Versand mit der Referenz <b>%s</b> wirklich freigeben? -ConfirmCancelSending=Möchten Sie diesen Versand wirklich abbrechen? +ConfirmDeleteSending=Möchten Sie diese Lieferung wirklich löschen? +ConfirmValidateSending=Möchten Sie die Lieferung mit der Referenz <b>%s</b> wirklich freigeben? +ConfirmCancelSending=Möchten Sie diese Auslieferung wirklich abbrechen? DocumentModelMerou=Merou A5-Modell WarningNoQtyLeftToSend=Achtung, keine weiteren Produkte für den Versand. StatsOnShipmentsOnlyValidated=Versandstatistik (nur freigegebene). Das Datum ist das der Freigabe (geplantes Lieferdatum ist nicht immer bekannt). @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=Sie müssen den Auftrag erst bestätigen bevor # Sending methods # ModelDocument DocumentModelTyphon=Vollständig Dokumentvorlage für die Lieferscheine (Logo, ...) +DocumentModelStorm=Vollständigeres Dokumentmodell für Lieferbelege und Kompatibilität mit Extrafeldern (Logo ...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Konstante EXPEDITION_ADDON_NUMBER nicht definiert SumOfProductVolumes=Summe der Produktvolumen SumOfProductWeights=Summe der Produktgewichte diff --git a/htdocs/langs/de_DE/stocks.lang b/htdocs/langs/de_DE/stocks.lang index 9361b1582d6..6a0685862ae 100644 --- a/htdocs/langs/de_DE/stocks.lang +++ b/htdocs/langs/de_DE/stocks.lang @@ -34,7 +34,7 @@ StockMovementForId=Lagerbewegung Nr. %d ListMouvementStockProject=Lagerbewegungen für Projekt StocksArea=Warenlager - Übersicht AllWarehouses=Alle Warenlager -IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock +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 @@ -62,11 +62,12 @@ 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 WarehouseAskWarehouseDuringOrder=Legen Sie ein Lager für Verkaufsaufträge fest UserDefaultWarehouse=Legen Sie ein Lager für Benutzer fest MainDefaultWarehouse=Standardlager MainDefaultWarehouseUser=Verwenden Sie für jeden Benutzer ein Standardlager -MainDefaultWarehouseUserDesc=By activating this option, during creation of a product, the warehouse assigned to the product will be defined on this one. If no warehouse is defined on the user, the default warehouse is defined. +MainDefaultWarehouseUserDesc=Durch Aktivieren dieser Option wird beim Anlegen eines Produkts das dem Produkt zugeordnete Lager auf dieses definiert. Wenn kein Lager auf dem Benutzer definiert ist, wird das Standardlager definiert. IndependantSubProductStock=Produkt- und Unterproduktbestände sind unabhängig voneinander QtyDispatched=Liefermenge QtyDispatchedShort=Menge versandt @@ -96,15 +97,15 @@ RealStockDesc=Der aktuelle Lagerbestand ist die Stückzahl, die aktuell und phys RealStockWillAutomaticallyWhen=Der reale Bestand wird gemäß dieser Regel geändert (wie im Bestandsmodul definiert): VirtualStock=Theoretischer Lagerbestand VirtualStockAtDate=Virtueller Bestand zum Datum -VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) +VirtualStockAtDateDesc=Virtueller Lagerbestand, sobald alle anstehenden Aufträge, die vor dem Datum erledigt werden sollen, abgeschlossen sind +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.). 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=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=Der eingegebene durchschnittliche Stückpreis, den wir an die Lieferanten zahlen mussten, um das Produkt in unseren Lagerbestand aufzunehmen. SellPriceMin=Verkaufspreis EstimatedStockValueSellShort=Verkaufswert EstimatedStockValueSell=Verkaufswert @@ -122,9 +123,9 @@ DesiredStockDesc=Dieser Lagerbestand wird von der Nachbestellfunktion verwendet. StockToBuy=zu bestellen Replenishment=Nachbestellung ReplenishmentOrders=Nachbestellungen -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=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) UseVirtualStock=Theoretischen Lagerbestand benutzen UsePhysicalStock=Ist-Bestand verwenden CurentSelectionMode=Aktueller Auswahl-Modus @@ -133,18 +134,18 @@ CurentlyUsingPhysicalStock=Aktueller Lagerbestand RuleForStockReplenishment=Regeln für Nachbestellungen SelectProductWithNotNullQty=Wählen Sie mindestens ein Produkt mit einer Bestellmenge größer Null und einen Lieferanten AlertOnly= Nur Warnungen -IncludeProductWithUndefinedAlerts = Include also negative stock for products with no desired quantity defined, to restore them to 0 +IncludeProductWithUndefinedAlerts = Schließe auch negativen Lagerbestand für Produkte ein, für die keine gewünschte Menge definiert ist, um sie auf 0 zurückzusetzen WarehouseForStockDecrease=Das Lager <b>%s</b> wird für Entnahme verwendet WarehouseForStockIncrease=Das Lager <b>%s</b> wird für Wareneingang verwendet ForThisWarehouse=Für dieses Lager ReplenishmentStatusDesc=Dies ist eine Liste aller Produkte mit einem niedrigeren Bestand als gewünscht (oder niedriger als der Warnwert, wenn das Kontrollkästchen "Nur Warnung" aktiviert ist). Mit dem Kontrollkästchen können Sie Bestellungen zum Ausgleichen des Bestands erstellen . -ReplenishmentStatusDescPerWarehouse=If you want a replenishment based on desired quantity defined per warehouse, you must add a filter on the warehouse. +ReplenishmentStatusDescPerWarehouse=Wenn Sie einen Nachschub basierend auf der gewünschten Menge pro Lager wünschen, müssen Sie dem Lager einen Filter hinzufügen. ReplenishmentOrdersDesc=Dies ist eine Liste aller offenen Bestellungen, einschließlich vordefinierter Produkte. Hier werden nur offene Bestellungen mit vordefinierten Produkten angezeigt, dh Bestellungen, die sich auf Lagerbestände auswirken können. 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=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=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". RecordMovement=Umbuchung ReceivingForSameOrder=Verbuchungen zu dieser Bestellung StockMovementRecorded=Lagerbewegungen aufgezeichnet @@ -233,10 +234,11 @@ InventoryForASpecificProduct=Inventar für ein bestimmtes Produkt StockIsRequiredToChooseWhichLotToUse=Ein Lagerbestand ist erforderlich, um das zu verwendende Buch auszuwählen ForceTo=Erzwingen AlwaysShowFullArbo=Anzeige des vollständigen Angebots (Popup des Lager-Links). Warnung: Dies kann die Leistung erheblich beeinträchtigen. -StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past -StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future +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 CurrentStock=Aktueller Lagerbestand -InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove line, to keep unchanged +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 -UpdateByScaningProductBarcode=Update by scan (product barcode) -UpdateByScaningLot=Update by scan (lot|serial barcode) +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. diff --git a/htdocs/langs/de_DE/suppliers.lang b/htdocs/langs/de_DE/suppliers.lang index 6e13202b243..97d31dc4605 100644 --- a/htdocs/langs/de_DE/suppliers.lang +++ b/htdocs/langs/de_DE/suppliers.lang @@ -38,7 +38,7 @@ MenuOrdersSupplierToBill=Bestellungen zu Rechnungen NbDaysToDelivery=Lieferverzug (Tage) DescNbDaysToDelivery=Die längste Lieferverzögerung der Produkte aus dieser Bestellung SupplierReputation=Lieferanten-Reputation -ReferenceReputation=Reference reputation +ReferenceReputation=Referenz Ruf DoNotOrderThisProductToThisSupplier=hier nicht bestellen NotTheGoodQualitySupplier=Geringe Qualität ReputationForThisProduct=Reputation diff --git a/htdocs/langs/de_DE/ticket.lang b/htdocs/langs/de_DE/ticket.lang index 697e9678441..6405e1db2a6 100644 --- a/htdocs/langs/de_DE/ticket.lang +++ b/htdocs/langs/de_DE/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket-Typ TicketDictCategory=Ticket-Kategorien TicketDictSeverity=Ticket-Dringlichkeiten TicketDictResolution=Ticket-Auflösung -TicketTypeShortBUGSOFT=Softwarefehler -TicketTypeShortBUGHARD=Hardwarefehler -TicketTypeShortCOM=Anfrage an Verkauf +TicketTypeShortCOM=Anfrage an Verkauf TicketTypeShortHELP=Erbitte funktionale Hilfestellung TicketTypeShortISSUE=Aspekt, Fehler oder Problem TicketTypeShortREQUEST=Änderungs- oder Erweiterungsanforderung @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Sonstige TicketSeverityShortLOW=Niedrig TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=Hoch -TicketSeverityShortBLOCKING=Kritisch/Blockierend +TicketSeverityShortBLOCKING=Kritisch, blockierend ErrorBadEmailAddress=Feld '%s' ungültig MenuTicketMyAssign=Meine Tickets @@ -60,7 +58,6 @@ OriginEmail=E-Mail Absender Notify_TICKET_SENTBYMAIL=Ticket Nachricht per E-Mail versenden # Status -NotRead=Nicht gelesen Read=Lesen Assigned=Zugewiesen InProgress=in Bearbeitung @@ -126,12 +123,13 @@ TicketsActivatePublicInterfaceHelp=Mit dem öffentlichen Interface können alle TicketsAutoAssignTicket=Den Ersteller automatisch dem Ticket zuweisen TicketsAutoAssignTicketHelp=Wenn ein Ticket erstellt wird, kann der Ersteller automatisch dem Ticket zugewiesen werden. 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 -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) +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=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=Sende E-Mail-Benachrichtigungen über neue Nachrichten an diese Adresse, wenn dem Ticket kein Benutzer zugewiesen ist oder der Benutzer keine E-Mail hat. # # Index & list page # @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status von %s zu %s geändert TicketNotNotifyTiersAtCreate=Firma bei Erstellen nicht Benachrichtigen Unread=Ungelesen TicketNotCreatedFromPublicInterface=Nicht verfügbar. Ticket wurde nicht über die öffentliche Schnittstelle erstellt. -PublicInterfaceNotEnabled=Öffentliche Schnittstelle wurde nicht aktiviert ErrorTicketRefRequired=Ein Ticket-Betreff ist erforderlich # diff --git a/htdocs/langs/de_DE/trips.lang b/htdocs/langs/de_DE/trips.lang index 06914a60f86..12ecdfb6a6a 100644 --- a/htdocs/langs/de_DE/trips.lang +++ b/htdocs/langs/de_DE/trips.lang @@ -110,7 +110,7 @@ ExpenseReportPayment=Spesenabrechnung Zahlung ExpenseReportsToApprove=zu genehmigende Spesenabrechnungen ExpenseReportsToPay=zu zahlende Spesenabrechnungen ConfirmCloneExpenseReport=Möchten Sie den diese Spesenabrechnung wirklich duplizieren? -ExpenseReportsIk=Spesenabrechnung Kilometerstand +ExpenseReportsIk=Konfiguration der Kilometergebühren ExpenseReportsRules=Spesenabrechnungen Regeln ExpenseReportIkDesc=Sie können die Berechnung der Kilometerspensen pro Kategorie und Distanz dort ändern wo sie definiert wurden. <b>d</b> ist die Distanz in Kilometer ExpenseReportRulesDesc=Sie können Berechnungsregeln erstellen oder verändern. Dieser Teil wird verwendet, wenn Benutzer neue Spesenabrechnung erstellen @@ -145,7 +145,7 @@ nolimitbyEX_DAY=pro Tag (keine Beschränkung) nolimitbyEX_MON=pro Monat (keine Beschränkung) nolimitbyEX_YEA=pro Jahr (Nicht Begrenzt) nolimitbyEX_EXP=pro Zeile (Nicht Begrenzt) -CarCategory=Fahrzeug Kategorie +CarCategory=Fahrzeugkategorie ExpenseRangeOffset=Offset Betrag: %s RangeIk=Reichweite AttachTheNewLineToTheDocument=Zeile an hochgeladenes Dokument anhängen diff --git a/htdocs/langs/de_DE/website.lang b/htdocs/langs/de_DE/website.lang index 2170414d12f..8e7ec9d6b08 100644 --- a/htdocs/langs/de_DE/website.lang +++ b/htdocs/langs/de_DE/website.lang @@ -30,7 +30,6 @@ EditInLine=Direktes bearbeiten AddWebsite=Website hinzufügen Webpage=Webseite / Container AddPage=Seite / Container hinzufügen -HomePage=Startseite PageContainer=Seite PreviewOfSiteNotYetAvailable=Vorschau ihrer Webseite <strong>%s</strong> noch nicht verfügbar. Zuerst muss eine '<strong>Webseiten-Vorlage importiert</strong>' oder '<strong>Seite / Container hinzugefügt</strong>' werden. RequestedPageHasNoContentYet=Die Seite mit id %s hat keinen Inhalt oder die Cachedatei .tpl.php wurde gelöscht. Editieren Sie den Inhalt der Seite um das Problem zu lösen. @@ -101,7 +100,7 @@ EmptyPage=Leere Seite ExternalURLMustStartWithHttp=Externe URL muss mit http:// oder https:// beginnen ZipOfWebsitePackageToImport=Laden Sie die Zip-Datei der Websseiten-Vorlage hoch ZipOfWebsitePackageToLoad=oder wählen Sie eine verfügbare eingebettete Webseiten-Vorlage -ShowSubcontainers=Dynamische Inhalte einfügen +ShowSubcontainers=Dynamischen Inhalt anzeigen InternalURLOfPage=Interne URL der Seite ThisPageIsTranslationOf=Diese Seite/Container ist eine Übersetzung von ThisPageHasTranslationPages=Es existieren Übersetzungen dieser Seite/Containers @@ -135,5 +134,6 @@ ReplacementDoneInXPages=Ersetzt in %s Seiten oder Containern RSSFeed=RSS Feed RSSFeedDesc=Über diese URL können Sie einen RSS-Feed mit den neuesten Artikeln vom Typ "Blogpost" abrufen PagesRegenerated=%s Seite(n) / Container neu generiert -RegenerateWebsiteContent=Regenerate web site cache files -AllowedInFrames=Allowed in Frames +RegenerateWebsiteContent=Generieren Sie Website-Cache-Dateien neu +AllowedInFrames=In Frames erlaubt +DefineListOfAltLanguagesInWebsiteProperties=Definiere eine Liste aller verfügbaren Sprachen in den Website-Eigenschaften. diff --git a/htdocs/langs/de_DE/withdrawals.lang b/htdocs/langs/de_DE/withdrawals.lang index 8ed5c2711fc..b434b778de4 100644 --- a/htdocs/langs/de_DE/withdrawals.lang +++ b/htdocs/langs/de_DE/withdrawals.lang @@ -14,23 +14,23 @@ BankTransferReceipts=Überweisungsaufträge BankTransferReceipt=Überweisungsauftrag LatestBankTransferReceipts=Neueste %s Überweisungsaufträge LastWithdrawalReceipts=Letzte %s Abbuchungsbelege -WithdrawalsLine=Direct debit order line +WithdrawalsLine=Bestellposition für Lastschrift CreditTransferLine=Überweisungspositionen WithdrawalsLines=Abbuchungszeilen CreditTransferLines=Überweisungszeilen -RequestStandingOrderToTreat=Requests for direct debit payment order to process -RequestStandingOrderTreated=Requests for direct debit payment order processed -RequestPaymentsByBankTransferToTreat=Requests for credit transfer to process -RequestPaymentsByBankTransferTreated=Requests for credit transfer processed +RequestStandingOrderToTreat=Anfragen zur Bearbeitung des Lastschrift-Zahlungsauftrags +RequestStandingOrderTreated=Anfragen für Lastschrift Zahlungsauftrag bearbeitet +RequestPaymentsByBankTransferToTreat=Anträge auf Überweisung zur Bearbeitung +RequestPaymentsByBankTransferTreated=Anträge auf Überweisung bearbeitet NotPossibleForThisStatusOfWithdrawReceiptORLine=Funktion nicht verfügbar. Der Status des Abbucher muss auf "durchgeführt" gesetzt sein bevor eine Erklärung für die Ablehnung eingetragen werden können. -NbOfInvoiceToWithdraw=No. of qualified customer invoices with waiting direct debit order +NbOfInvoiceToWithdraw=Anzahl qualifizierter Kundenrechnungen mit ausstehendem Lastschriftauftrag NbOfInvoiceToWithdrawWithInfo=Anzahl der Kundenrechnungen mit Lastschriftaufträgen mit vorhandenen Kontoinformationen -NbOfInvoiceToPayByBankTransfer=No. of qualified supplier invoices waiting for a payment by credit transfer -SupplierInvoiceWaitingWithdraw=Vendor invoice waiting for payment by credit transfer +NbOfInvoiceToPayByBankTransfer=Anzahl qualifizierter Lieferantenrechnungen, die auf eine Zahlung per Überweisung warten +SupplierInvoiceWaitingWithdraw=Lieferantenrechnung wartet auf Zahlung per Überweisung InvoiceWaitingWithdraw=Rechnung wartet auf Lastschrifteinzug InvoiceWaitingPaymentByBankTransfer=Rechnung wartet auf Überweisung AmountToWithdraw=Abbuchungsbetrag -NoInvoiceToWithdraw=No invoice open for '%s' is waiting. Go on tab '%s' on invoice card to make a request. +NoInvoiceToWithdraw=Es wartet keine Rechnung für '%s'. Gehen Sie auf der Rechnungskarte auf die Registerkarte '%s', um eine Anfrage zu stellen. NoSupplierInvoiceToWithdraw=Es wartet keine Lieferantenrechnung mit offenen 'Direktgutschriftsanträgen'. Gehen Sie auf die Registerkarte '%s' auf der Rechnungskarte, um eine Anfrage zu stellen. ResponsibleUser=Verantwortlicher Benutzer WithdrawalsSetup=Einstellungen für Lastschriftaufträge @@ -40,8 +40,9 @@ CreditTransferStatistics=Statistiken Überweisungen Rejects=Ablehnungen LastWithdrawalReceipt=Letzte 1%s Einnahmen per Lastschrift MakeWithdrawRequest=Erstelle eine Lastschrift -MakeBankTransferOrder=Make a credit transfer request +MakeBankTransferOrder=Stelle eine Überweisungsanfrage 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>. ClassCredited=Als eingegangen markieren @@ -63,7 +64,7 @@ InvoiceRefused=Rechnung abgelehnt (Abweisung dem Kunden berechnen) StatusDebitCredit=Status Debit/Kredit StatusWaiting=Wartend StatusTrans=Gesendet -StatusDebited=Debited +StatusDebited=Belastet StatusCredited=Eingelöst StatusPaid=Bezahlt StatusRefused=Abgelehnt @@ -79,13 +80,13 @@ StatusMotif8=Andere Gründe CreateForSepaFRST=Lastschriftdatei erstellen (SEPA FRST) CreateForSepaRCUR=Lastschriftdatei erstellen (SEPA RCUR) CreateAll=Lastschriftdatei erstellen (alle) -CreateFileForPaymentByBankTransfer=Create file for credit transfer +CreateFileForPaymentByBankTransfer=Datei für Überweisung erstellen CreateSepaFileForPaymentByBankTransfer=Überweisungsdatei erstellen (SEPA) CreateGuichet=Nur Büro CreateBanque=Nur Bank OrderWaiting=Warte auf Bearbeitung -NotifyTransmision=Record file transmission of order -NotifyCredit=Record credit of order +NotifyTransmision=Datenübertragung der Bestellung aufzeichnen +NotifyCredit=Gutschrift der Bestellung aufzeichnen NumeroNationalEmetter=Nationale Sendernummer WithBankUsingRIB=Bankkonten mit RIB WithBankUsingBANBIC=Bankkonten mit IBAN/BIC @@ -95,12 +96,12 @@ CreditDate=Am WithdrawalFileNotCapable=Abbuchungsformular für Ihr Land %s konnte nicht erstellt werden (Dieses Land wird nicht unterstützt). ShowWithdraw=Zeige Lastschrift IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Wenn auf der Rechnung mindestens ein Lastschrift-Zahlungsauftrag noch nicht verarbeitet wurde, wird dieser nicht als bezahlt festgelegt, um eine vorherige Abhebungsverwaltung zu ermöglichen. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->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 +DoStandingOrdersBeforePayments=Auf dieser Registerkarte können Sie einen Lastschrift-Zahlungsauftrag anfordern. Gehen Sie anschließend in das Menü Bank-> Zahlung per Lastschrift, um den Lastschriftauftrag zu generieren und zu verwalten. Wenn der Lastschriftauftrag geschlossen wird, wird die Zahlung auf Rechnungen automatisch erfasst und die Rechnungen werden geschlossen, wenn der zu zahlende Restbetrag null ist. +DoCreditTransferBeforePayments=Auf dieser Registerkarte können Sie einen Überweisungsauftrag anfordern. Gehen Sie anschließend in das Menü Bank-> Zahlung per Überweisung, um den Überweisungsauftrag zu generieren und zu verwalten. Wenn der Überweisungsauftrag geschlossen wird, wird die Zahlung auf Rechnungen automatisch erfasst und die Rechnungen werden geschlossen, wenn der zu zahlende Restbetrag null ist. +WithdrawalFile=Datei für Lastschrift-Aufträge +CreditTransferFile=Überweisungsdatei SetToStatusSent=Setze in Status "Datei versandt" -ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null +ThisWillAlsoAddPaymentOnInvoice=Hierdurch werden auch Zahlungen auf Rechnungen erfasst und als "Bezahlt" klassifiziert, wenn die verbleibende Zahlung null ist StatisticsByLineStatus=Statistiken nach Statuszeilen RUM=UMR DateRUM=Datum der Unterzeichnung des Mandats @@ -124,14 +125,15 @@ SEPAFrstOrRecur=Zahlungsart ModeRECUR=Wiederkehrende Zahlungen ModeFRST=Einmalzahlung PleaseCheckOne=Bitte prüfen sie nur eine -CreditTransferOrderCreated=Credit transfer order %s created +CreditTransferOrderCreated=Überweisungsauftrag %s erstellt DirectDebitOrderCreated=Lastschrift %s erstellt AmountRequested=angeforderter Betrag SEPARCUR=SEPA CUR SEPAFRST=SEPA FRST ExecutionDate=Ausführungsdatum CreateForSepa=Erstellen Sie eine Lastschriftdatei -ICS=Gläubigeridentifikator CI +ICS=Gläubiger-ID CI für Lastschrift +ICSTransfer=Gläubiger-ID CI für Banküberweisung END_TO_END="Ende-zu-Ende" SEPA-XML-Tag - Eindeutige ID, die pro Transaktion zugewiesen wird USTRD="Unstrukturiertes" SEPA-XML-Tag ADDDAYS=Füge Tage zum Abbuchungsdatum hinzu @@ -145,4 +147,6 @@ InfoTransData=Betrag: %s<br>Verwendungszweck: %s<br>Datum: %s InfoRejectSubject=Lastschriftauftrag abgelehnt InfoRejectMessage=Hallo,<br><br> der Lastschrift-Zahlungsauftrag der Rechnung %s im Zusammenhang mit dem Unternehmen %s, mit einem Betrag von %s wurde von der Bank abgelehnt <br> -- <br> %s ModeWarning=Echtzeit-Modus wurde nicht aktiviert, wir stoppen nach der Simulation. -ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +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 diff --git a/htdocs/langs/de_DE/workflow.lang b/htdocs/langs/de_DE/workflow.lang index 9cde674b9e3..255f578fa39 100644 --- a/htdocs/langs/de_DE/workflow.lang +++ b/htdocs/langs/de_DE/workflow.lang @@ -16,8 +16,10 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Kennzeichne die verknüpften Auftr # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Setzt das verknüpfte Lieferantenangebot auf "abgerechnet", sofern die Lieferanrenrechnung erstellt wurde und sofern der Rechnungsbetrag identisch zur Angebotsumme ist. descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Kennzeichne die verknüpfte Einkaufsbestellung als abgerechnet wenn die Lieferantenrechnung erstellt wurde und wenn die Beträge überein stimmen. -descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +descWORKFLOW_BILL_ON_RECEPTION=Klassifizieren Sie Empfänge als "in Rechnung gestellt", wenn eine verknüpfte Lieferantenbestellung validiert wird # Autoclose intervention -descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Schließen Sie alle mit dem Ticket verknüpften Interaktionen, wenn ein Ticket geschlossen wird AutomaticCreation=automatische Erstellung AutomaticClassification=Automatische Klassifikation +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/de_DE/zapier.lang b/htdocs/langs/de_DE/zapier.lang index 4d874ef8f7f..1051734af8b 100644 --- a/htdocs/langs/de_DE/zapier.lang +++ b/htdocs/langs/de_DE/zapier.lang @@ -26,4 +26,4 @@ ModuleZapierForDolibarrDesc = Modul: Zapier für Dolibarr # Admin page # ZapierForDolibarrSetup = Zapier für Dolibarr einrichten -ZapierDescription=Interface with Zapier +ZapierDescription=Schnittstelle mit Zapier diff --git a/htdocs/langs/el_CY/mrp.lang b/htdocs/langs/el_CY/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/el_CY/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/el_CY/products.lang b/htdocs/langs/el_CY/products.lang deleted file mode 100644 index 6e900475275..00000000000 --- a/htdocs/langs/el_CY/products.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - products -CustomCode=Customs / Commodity / HS code diff --git a/htdocs/langs/el_GR/accountancy.lang b/htdocs/langs/el_GR/accountancy.lang index 1189c759ce7..a3cd1adf61e 100644 --- a/htdocs/langs/el_GR/accountancy.lang +++ b/htdocs/langs/el_GR/accountancy.lang @@ -16,6 +16,8 @@ ThisService=Αυτή η υπηρεσία ThisProduct=Αυτό το προϊόν DefaultForService=Προεπιλογή για υπηρεσία DefaultForProduct=Προεπιλογή για το προϊόν +ProductForThisThirdparty=Product for this thirdparty +ServiceForThisThirdparty=Service for this thirdparty CantSuggest=Δεν μπορώ να προτείνω AccountancySetupDoneFromAccountancyMenu=Η μεγαλύτερη ρύθμιση της λογιστικής γίνεται από το μενού %s ConfigAccountingExpert=Configuration of the module accounting (double entry) @@ -48,6 +50,7 @@ CountriesExceptMe=Όλες οι χώρες εκτός από το %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=Κύριος λογαριασμός λογιστικής για πελάτες που δεν έχουν οριστεί στη ρύθμιση MainAccountForSuppliersNotDefined=Κύριος λογαριασμός λογιστικής για προμηθευτές που δεν καθορίζονται στη ρύθμιση @@ -144,7 +147,7 @@ NotVentilatedinAccount=Δεν δεσμεύεται στον λογαριασμό XLineSuccessfullyBinded=%s προϊόντα / υπηρεσίες με επιτυχία δεσμεύεται σε λογιστικό λογαριασμό XLineFailedToBeBinded=%s προϊόντα / υπηρεσίες δεν δεσμεύονται σε κανένα λογιστικό λογαριασμό -ACCOUNTING_LIMIT_LIST_VENTILATION=Αριθμός στοιχείων που δεσμεύονται με τη σελίδα (μέγιστη συνιστώμενη τιμή: 50) +ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Ξεκινήστε τη διαλογή της σελίδας &quot;Δεσμευτική ενέργεια&quot; από τα πιο πρόσφατα στοιχεία ACCOUNTING_LIST_SORT_VENTILATION_DONE=Ξεκινήστε τη διαλογή της σελίδας &quot;Δεσμευτική πραγματοποίηση&quot; από τα πιο πρόσφατα στοιχεία @@ -198,7 +201,8 @@ Docdate=Ημερομηνία Docref=Παραπομπή LabelAccount=Ετικέτα λογαριασμού LabelOperation=Λειτουργία ετικετών -Sens=Σημασία +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=Γράμματα Codejournal=Ημερολόγιο @@ -206,7 +210,8 @@ JournalLabel=Ετικέτα περιοδικών NumPiece=Αριθμός τεμαχίου TransactionNumShort=Αριθ. συναλλαγή AccountingCategory=Προσωποποιημένες ομάδες -GroupByAccountAccounting=Ομαδοποίηση κατά λογιστικό λογαριασμό +GroupByAccountAccounting=Group by general ledger account +GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=Μπορείτε να ορίσετε εδώ ορισμένες ομάδες λογιστικού λογαριασμού. Θα χρησιμοποιηθούν για εξατομικευμένες λογιστικές εκθέσεις. ByAccounts=Με λογαριασμούς ByPredefinedAccountGroups=Με προκαθορισμένες ομάδες @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Πληρωμή που δεν συνδέεται με OpeningBalance=Opening balance ShowOpeningBalance=Εμφάνιση αρχικού υπολοίπου HideOpeningBalance=Κρύψιμο αρχικού υπολοίπου -ShowSubtotalByGroup=Show subtotal by group +ShowSubtotalByGroup=Show subtotal by level Pcgtype=Ομάδα του λογαριασμού PcgtypeDesc=Η ομάδα λογαριασμού χρησιμοποιείται ως προκαθορισμένα κριτήρια «φίλτρου» και «ομαδοποίησης» για ορισμένες λογιστικές αναφορές. Για παράδειγμα, τα «ΕΙΣΟΔΗΜΑ» ή «ΕΞΟΔΑ» χρησιμοποιούνται ως ομάδες λογιστικών λογαριασμών προϊόντων για τη δημιουργία της αναφοράς εξόδων / εσόδων. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Συμβουλευτείτε εδώ τον κατάλο DescVentilExpenseReportMore=Εάν ρυθμίσετε τον λογαριασμό λογαριασμών σε γραμμές αναφοράς τύπου εξόδων, η εφαρμογή θα είναι σε θέση να κάνει όλη τη δέσμευση μεταξύ των γραμμών αναφοράς δαπανών σας και του λογαριασμού λογιστικής του λογαριασμού σας, με ένα μόνο κλικ με το κουμπί <strong>&quot;%s&quot;</strong> . Εάν ο λογαριασμός δεν έχει οριστεί σε λεξικό τελών ή αν έχετε ακόμα ορισμένες γραμμές που δεν δεσμεύονται σε κανένα λογαριασμό, θα πρέπει να κάνετε μια χειροκίνητη σύνδεση από το μενού &quot; <strong>%s</strong> &quot;. DescVentilDoneExpenseReport=Συμβουλευτείτε εδώ τον κατάλογο των γραμμών των εκθέσεων δαπανών και του λογιστικού λογαριασμού τους +Closure=Annual closure DescClosure=Συμβουλευτείτε εδώ τον αριθμό των κινήσεων ανά μήνα που δεν έχουν επικυρωθεί και τα οικονομικά έτη είναι ήδη ανοιχτά OverviewOfMovementsNotValidated=Βήμα 1 / Επισκόπηση των κινήσεων που δεν έχουν επικυρωθεί. (Είναι απαραίτητο να κλείσετε ένα οικονομικό έτος) +AllMovementsWereRecordedAsValidated=All movements were recorded as validated +NotAllMovementsCouldBeRecordedAsValidated=Not all movements could be recorded as validated ValidateMovements=Επικυρώστε τις κινήσεις DescValidateMovements=Απαγορεύεται οποιαδήποτε τροποποίηση ή διαγραφή γραφής, γράμματος και διαγραφής. Όλες οι καταχωρήσεις για μια άσκηση πρέπει να επικυρωθούν, διαφορετικά το κλείσιμο δεν θα είναι δυνατό -SelectMonthAndValidate=Επιλέξτε μήνα και επικυρώστε τις κινήσεις ValidateHistory=Δεσμεύστε αυτόματα AutomaticBindingDone=Έγινε αυτόματη σύνδεση @@ -293,6 +300,7 @@ Accounted=Πληρώθηκε σε NotYetAccounted=Δεν έχει ακόμη καταλογιστεί στο βιβλίο ShowTutorial=Εμφάνιση εκπαιδευτικού προγράμματος NotReconciled=Δεν ταιριάζουν +WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view ## Admin BindingOptions=Binding options @@ -337,6 +345,7 @@ Modelcsv_LDCompta10=Εξαγωγή για LD Compta (v10 και άνω) Modelcsv_openconcerto=Εξαγωγή για OpenConcerto (Test) Modelcsv_configurable=Εξαγωγή CSV εξαγωγής Modelcsv_FEC=Εξαγωγή FEC +Modelcsv_FEC2=Export FEC (With dates generation writing / document reversed) Modelcsv_Sage50_Swiss=Εξαγωγή για Sage 50 Ελβετία Modelcsv_winfic=Export Winfic - eWinfic - WinSis Compta Modelcsv_Gestinumv3=Export for Gestinum (v3) diff --git a/htdocs/langs/el_GR/admin.lang b/htdocs/langs/el_GR/admin.lang index 9066b5bbf90..32f57690ea4 100644 --- a/htdocs/langs/el_GR/admin.lang +++ b/htdocs/langs/el_GR/admin.lang @@ -56,6 +56,8 @@ GUISetup=Εμφάνιση SetupArea=Ρύθμιση UploadNewTemplate=Μεταφόρτωση νέου(-ων) προτύπου(-ων) FormToTestFileUploadForm=Έντυπο για να ελέγξετε το αρχείο μεταφόρτωσης (ανάλογα με τις ρυθμίσεις) +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled IfModuleEnabled=Σημείωση: ναι, είναι αποτελεσματική μόνο αν το module <b>%s</b> είναι ενεργοποιημένο RemoveLock=Αφαιρέστε/μετονομάστε το αρχείο <b>%s</b>, αν υπάρχει, για να επιτραπεί η χρήση του εργαλείου ενημέρωσης/εγκατάστασης. RestoreLock=Επαναφέρετε το αρχείο <b>%s</b>, με δικαίωμα ανάγνωσης μόνο, για να απενεργοποιηθεί οποιαδήποτε χρήση του εργαλείου ενημέρωσης/εγκατάστασης. @@ -85,7 +87,6 @@ ShowPreview=Εμφάνιση προ επισκόπησης ShowHideDetails=Show-Hide details PreviewNotAvailable=Η προ επισκόπηση δεν είναι διαθέσιμη ThemeCurrentlyActive=Θεματική Επι του Παρόντος Ενεργή -CurrentTimeZone=TimeZone PHP (server) MySQLTimeZone=TimeZone MySql (βάση δεδομένων) TZHasNoEffect=Οι ημερομηνίες αποθηκεύονται και επιστρέφονται από το διακομιστή βάσης δεδομένων σαν να κρατήθηκαν ως υποβληθείσες συμβολοσειρές. Η ζώνη ώρας έχει ισχύ μόνο όταν χρησιμοποιείτε τη συνάρτηση UNIX_TIMESTAMP (η οποία δεν πρέπει να χρησιμοποιείται από τον Dolibarr, ώστε η βάση δεδομένων TZ να μην επηρεαστεί, ακόμη και αν αλλάξει μετά την εισαγωγή των δεδομένων). Space=Κενό @@ -153,8 +154,8 @@ SystemToolsAreaDesc=Αυτή η περιοχή παρέχει λειτουργί Purge=Εκκαθάριση PurgeAreaDesc=Αυτή η σελίδα σας επιτρέπει να διαγράψετε όλα τα αρχεία που κατασκευάζονται ή αποθηκεύονται από την Dolibarr (προσωρινά αρχεία ή όλα τα αρχεία σε <b>%s </ b> directory). Η χρήση αυτής της λειτουργίας δεν είναι απαραίτητη. Παρέχεται για χρήστες των οποίων η Dolibarr φιλοξενείται από πάροχο, που δεν προσφέρει δικαίωμα διαγραφής αρχείων που κατασκευάστηκαν από τον web server. PurgeDeleteLogFile=Διαγράψτε τα αρχεία καταγραφής, συμπεριλαμβανομένων<b>%s</b> που είναι ορισμένα για τη χρήση της μονάδας Syslog (χωρίς κίνδυνο απώλειας δεδομένων) -PurgeDeleteTemporaryFiles=Διαγράψτε όλα τα προσωρινά αρχεία (χωρίς κίνδυνο απώλειας δεδομένων). Σημείωση: η διαγραφή γίνεται μόνο αν ο κατάλογος Temp δημιουργήθηκε πριν από 24 ώρες -PurgeDeleteTemporaryFilesShort=Διαγραφή προσωρινών αρχείων +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 PurgeDeleteAllFilesInDocumentsDir=Διαγράψτε όλα τα αρχεία στον κατάλογο: <b>%s</b> . <br> Αυτό θα διαγράψει όλα τα παραγόμενα έγγραφα που σχετίζονται με στοιχεία (τρίτα μέρη, τιμολόγια κ.λπ.), αρχεία που έχουν φορτωθεί στη μονάδα ECM, αρχεία από αντίγραφα ασφαλείας βάσεων δεδομένων και προσωρινά αρχεία. PurgeRunNow=Διαγραφή τώρα PurgeNothingToDelete=Δεν υπάρχει κατάλογος ή αρχείο για διαγραφή. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Preferred Partners OtherResources=Άλλοι πόροι ExternalResources=Εξωτερικοί πόροι SocialNetworks=Κοινωνικά δίκτυα +SocialNetworkId=Social Network ID ForDocumentationSeeWiki=Για την τεκμηρίωση χρήστη ή προγραμματιστή (Doc, FAQs...),<br>ρίξτε μια ματιά στο Dolibarr Wiki:<br><b><a href="%s" target="_blank">%s</a></b> ForAnswersSeeForum=Για οποιαδήποτε άλλη ερώτηση/βοήθεια, μπορείτε να χρησιμοποιήσετε το forum του Dolibarr:<br><b><a href="%s" target="_blank">%s</a></b> HelpCenterDesc1=Εδώ είναι μερικοί πόροι για να λάβετε βοήθεια και υποστήριξη με τον Dolibarr. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Παραδείγματα με την τρέχουσα ListOfDirectories=Λίστα φακέλων προτύπων OpenDocument ListOfDirectoriesForModelGenODT=Λίστα καταλόγων που περιέχουν αρχεία προτύπων με μορφή OpenDocument. <br><br> Βάλτε εδώ την πλήρη διαδρομή των καταλόγων. <br> Προσθέστε μια επιστροφή μεταφοράς μεταξύ του καταλόγου eah. <br> Για να προσθέσετε έναν κατάλογο της λειτουργικής μονάδας GED, προσθέστε εδώ <b>DOL_DATA_ROOT / ecm / yourdirectoryname</b> . <br><br> Τα αρχεία σε αυτούς τους καταλόγους πρέπει να τελειώνουν με <b>.odt</b> ή <b>.ods</b> . NumberOfModelFilesFound=Αριθμός αρχείων προτύπου ODT / ODS που βρέθηκαν σε αυτούς τους καταλόγους -ExampleOfDirectoriesForModelGen=Παραδείγματα σύνταξης:<br>c:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br>Για να μάθετε πως να δημιουργήσετε τα δικά σας αρχεία προτύπων, πριν τα αποθηκεύσετε σε αυτούς τους φακέλους, διαβάστε την τεκμηρίωση στο wiki: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Θέση ονόματος/επιθέτου @@ -406,7 +408,7 @@ UrlGenerationParameters=Παράμετροι για δημιουργία ασφ SecurityTokenIsUnique=Χρησιμοποιήστε μια μοναδική παράμετρο securekey για κάθε διεύθυνση URL EnterRefToBuildUrl=Εισάγετε αναφοράς για %s αντικείμενο GetSecuredUrl=Πάρτε υπολογιζόμενο URL -ButtonHideUnauthorized=Απόκρυψη κουμπιών για μη χρήστες διαχειριστή για μη εξουσιοδοτημένες ενέργειες αντί να εμφανίζονται κουμπιά απενεργοποιημένου με γκρι +ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) OldVATRates=Παλιός συντελεστής ΦΠΑ NewVATRates=Νέος συντελεστής ΦΠΑ PriceBaseTypeToChange=Τροποποίηση τιμών με βάση την τιμή αναφοράς όπως ρυθμίστηκε στο @@ -668,7 +670,7 @@ Module54000Desc=Άμεση εκτύπωση (χωρίς το άνοιγμα τω Module55000Name=Δημοσκόπηση, έρευνα ή ψηφοφορία Module55000Desc=Δημιουργήστε online δημοσκοπήσεις, έρευνες ή ψηφοφορίες (όπως Doodle, Studs, RDVz κ.λπ. ...) Module59000Name=Περιθώρια -Module59000Desc=Πρόσθετο για την διαχείριση των περιθωρίων +Module59000Desc=Module to follow margins Module60000Name=Προμήθειες Module60000Desc=Ένθεμα για τη διαχείριση των προμηθειών Module62000Name=Διεθνείς Εμπορικοί Όροι @@ -1306,7 +1308,7 @@ YouUseBestDriver=Χρησιμοποιείτε τον οδηγό %s ο οποίο YouDoNotUseBestDriver=Χρησιμοποιείτε τον οδηγό %s αλλά συνιστάται ο οδηγός %s. NbOfObjectIsLowerThanNoPb=Έχετε μόνο %s %s στη βάση δεδομένων. Αυτό δεν απαιτεί ιδιαίτερη βελτιστοποίηση. SearchOptim=Βελτιστοποίηση αναζήτησης -YouHaveXObjectUseSearchOptim=Έχετε %s %s στη βάση δεδομένων. Θα πρέπει να προσθέσετε το σταθερό %s σε 1 στο Home-Setup-Other. Περιορίστε την αναζήτηση στην αρχή των συμβολοσειρών, η οποία επιτρέπει στη βάση δεδομένων να χρησιμοποιεί ευρετήρια και θα πρέπει να πάρετε μια άμεση απάντηση. +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=Έχετε %s %s στη βάση δεδομένων και σταθερή %s έχει οριστεί σε 1 στο Home-Setup-Other. BrowserIsOK=Χρησιμοποιείτε το πρόγραμμα περιήγησης web %s. Αυτό το πρόγραμμα περιήγησης είναι εντάξει για την ασφάλεια και την απόδοση. BrowserIsKO=Χρησιμοποιείτε το πρόγραμμα περιήγησης web %s. Αυτό το πρόγραμμα περιήγησης είναι γνωστό ότι αποτελεί κακή επιλογή για ασφάλεια, απόδοση και αξιοπιστία. Σας συνιστούμε να χρησιμοποιήσετε Firefox, Chrome, Opera ή Safari. @@ -1596,8 +1598,13 @@ ServiceSetup=Υπηρεσίες εγκατάστασης μονάδας ProductServiceSetup=Προϊόντα και Υπηρεσίες εγκατάστασης μονάδων NumberOfProductShowInSelect=Μέγιστος αριθμός προϊόντων που θα εμφανίζονται σε λίστες επιλογών συνδυασμού (0 = κανένα όριο) ViewProductDescInFormAbility=Εμφάνιση περιγραφών προϊόντων σε φόρμες (διαφορετικά εμφανίζεται σε αναδυόμενο παράθυρο εργαλείου) +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=Ενεργοποίηση στην καρτέλα Συνημμένα αρχεία προϊόντος / υπηρεσίας μια επιλογή για τη συγχώνευση προϊόντος PDF σε πρόταση PDF azur εάν το προϊόν / η υπηρεσία περιλαμβάνεται στην πρόταση -ViewProductDescInThirdpartyLanguageAbility=Εμφάνιση των περιγραφών προϊόντων στη γλώσσα του τρίτου μέρους +ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) UseSearchToSelectProductTooltip=Επίσης, αν έχετε μεγάλο αριθμό προϊόντων (&gt; 100.000), μπορείτε να αυξήσετε την ταχύτητα ρυθμίζοντας σταθερά το PRODUCT_DONOTSEARCH_ANYWHERE στο 1 στο Setup-&gt; Other. Η αναζήτηση θα περιορίζεται στην αρχή της συμβολοσειράς. UseSearchToSelectProduct=Περιμένετε έως ότου πιέσετε ένα κλειδί πριν φορτώσετε το περιεχόμενο της λίστας σύνθετων προϊόντων (Αυτό μπορεί να αυξήσει την απόδοση εάν έχετε μεγάλο αριθμό προϊόντων, αλλά είναι λιγότερο βολικό) SetDefaultBarcodeTypeProducts=Προεπιλεγμένος τύπος barcode για χρήση σε προϊόντα @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Εξατομικευμένα μενού που δεν NewMenu=New menu MenuHandler=Χειριστής μενού MenuModule=Source module -HideUnauthorizedMenu= Απόκρυψη μη εξουσιοδοτημένων μενού (γκρι) +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 @@ -1983,11 +1990,12 @@ EMailHost=Υποδοχή διακομιστή IMAP ηλεκτρονικού τα MailboxSourceDirectory=Κατάλογος προέλευσης γραμματοκιβωτίου MailboxTargetDirectory=Κατάλογος προορισμού γραμματοκιβωτίου EmailcollectorOperations=Λειτουργίες από συλλέκτη +EmailcollectorOperationsDesc=Operations are executed from top to bottom order MaxEmailCollectPerCollect=Μέγιστος αριθμός μηνυμάτων ηλεκτρονικού ταχυδρομείου που συλλέγονται ανά συλλογή CollectNow=Συλλέξτε τώρα ConfirmCloneEmailCollector=Είστε βέβαιοι ότι θέλετε να κλωνοποιήσετε τον συλλέκτη e-mail %s? -DateLastCollectResult=Η τελευταία συλλογή δοκιμάστηκε -DateLastcollectResultOk=Ημερομηνία τελευταίας συλλογής επιτυχούς +DateLastCollectResult=Date of latest collect try +DateLastcollectResultOk=Date of latest collect success LastResult=Τελευταίο αποτέλεσμα EmailCollectorConfirmCollectTitle=Το email συλλέγει επιβεβαίωση EmailCollectorConfirmCollect=Θέλετε να εκτελέσετε τη συλλογή για αυτόν τον συλλέκτη τώρα; @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Κωδικός εισόδου μενού (mainmenu) ECMAutoTree=Εμφάνιση αυτόματης δομής ECM @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/el_GR/banks.lang b/htdocs/langs/el_GR/banks.lang index 7cd78ac18a0..5fc0cb30463 100644 --- a/htdocs/langs/el_GR/banks.lang +++ b/htdocs/langs/el_GR/banks.lang @@ -173,10 +173,11 @@ SEPAMandate=Εντολές άμεσης χρέωσης YourSEPAMandate=Οι εντολές άμεσης χρέωσης σας. FindYourSEPAMandate=Αυτή είναι η εντολή ΕΧΠΕ για να εξουσιοδοτήσετε την εταιρεία μας να κάνει άμεση εντολή χρέωσης στην τράπεζά σας. Επιστρέψτε το υπογεγραμμένο (σάρωση του υπογεγραμμένου εγγράφου) ή στείλτε το ταχυδρομικώς η με mail AutoReportLastAccountStatement=Συμπληρώστε αυτόματα το πεδίο ' αριθμός τραπεζικού λογαριασμού ' με τον τελευταίο αριθμό τραπεζικής δήλωσης όταν κάνετε τη συμφωνία. -CashControl=Χρηματοκιβώτιο μετρητών POS -NewCashFence=Νέο φράχτη μετρητών +CashControl=POS cash desk control +NewCashFence=New cash desk 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 diff --git a/htdocs/langs/el_GR/blockedlog.lang b/htdocs/langs/el_GR/blockedlog.lang index 8172e83ec81..10f44bd0947 100644 --- a/htdocs/langs/el_GR/blockedlog.lang +++ b/htdocs/langs/el_GR/blockedlog.lang @@ -8,7 +8,7 @@ BrowseBlockedLog=Μη τροποποιήσιμα κορμούς ShowAllFingerPrintsMightBeTooLong=Εμφάνιση όλων των αρχειοθετημένων αρχείων καταγραφής (μπορεί να είναι μακρά) ShowAllFingerPrintsErrorsMightBeTooLong=Εμφάνιση όλων των μη έγκυρων αρχείων καταγραφής αρχείων (μπορεί να είναι μεγάλο) DownloadBlockChain=Κατεβάστε τα δακτυλικά αποτυπώματα -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=Η καταχώριση αρχειοθετημένου αρχείου καταγραφής δεν είναι έγκυρη. Αυτό σημαίνει ότι κάποιος (ένας εισβολέας;) έχει τροποποιήσει ορισμένα δεδομένα αυτής της εγγραφής μετά την εγγραφή του ή έχει διαγράψει την προηγούμενη αρχειοθετημένη εγγραφή (ελέγξτε τη γραμμή με την προηγούμενη # υπάρχει). OkCheckFingerprintValidity=Η αρχειοθετημένη εγγραφή είναι έγκυρη. Τα δεδομένα αυτής της γραμμής δεν τροποποιήθηκαν και η καταχώριση ακολουθεί την προηγούμενη. OkCheckFingerprintValidityButChainIsKo=Το αρχειοθετημένο ημερολόγιο φαίνεται έγκυρο σε σύγκριση με το προηγούμενο, αλλά η αλυσίδα είχε καταστραφεί προηγουμένως. AddedByAuthority=Αποθηκεύεται σε απομακρυσμένη εξουσία @@ -35,7 +35,7 @@ logDON_DELETE=Δωρεά λογική διαγραφή logMEMBER_SUBSCRIPTION_CREATE=Δημιουργία συνδρομής μέλους logMEMBER_SUBSCRIPTION_MODIFY=Η συνδρομή μέλους τροποποιήθηκε logMEMBER_SUBSCRIPTION_DELETE=Συνδρομή λογικής διαγραφής μέλους -logCASHCONTROL_VALIDATE=Εγγραφή φράχτη μετρητών +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Λήψη τιμολογίου πελατών BlockedLogBillPreview=Προβολή τιμολογίου πελατών BlockedlogInfoDialog=Στοιχεία καταγραφής diff --git a/htdocs/langs/el_GR/boxes.lang b/htdocs/langs/el_GR/boxes.lang index bc59ca654da..40e21765069 100644 --- a/htdocs/langs/el_GR/boxes.lang +++ b/htdocs/langs/el_GR/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=Τελευταία %s τροποποίηση δω BoxTitleLastModifiedExpenses=Τελευταίες αναφορές τροποποιημένων δαπανών %s BoxTitleLatestModifiedBoms=Τα τελευταία %s τροποποιημένα BOMs BoxTitleLatestModifiedMos=Οι τελευταίες %s τροποποιημένες παραγγελίες κατασκευής +BoxTitleLastOutstandingBillReached=Customers with maximum outstanding exceeded BoxGlobalActivity=Η γενική δραστηριότητα για (τιμολόγια, προσφορές, παραγγελίες) BoxGoodCustomers=Καλοί πελάτες BoxTitleGoodCustomers=%s καλών πελατών +BoxScheduledJobs=Προγραμματισμένες εργασίες +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Αποτυχία ανανέωσης ροής RSS. Τελευταία επιτυχημένη ημερομηνία ανανέωσης: %s LastRefreshDate=Ημερομηνία τελευταίας ανανέωσης NoRecordedBookmarks=Δεν υπάρχουν σελιδοδείκτες που ορίζονται. Κάντε κλικ <a href="%s">εδώ</a> για να προσθέσετε σελιδοδείκτες. @@ -92,8 +95,8 @@ LastXMonthRolling=Ο τελευταίος κύλινδρος %s μήνα ChooseBoxToAdd=Προσθέστε widget στον πίνακα ελέγχου BoxAdded=Το Widget προστέθηκε στον πίνακα ελέγχου σας BoxTitleUserBirthdaysOfMonth=Γενέθλια αυτού του μήνα (χρήστες) -BoxLastManualEntries=Τελευταίες μη αυτόματες καταχωρήσεις στη λογιστική -BoxTitleLastManualEntries=%s τελευταίες μη αυτόματες καταχωρήσεις +BoxLastManualEntries=Latest record in accountancy entered manually or without source document +BoxTitleLastManualEntries=%s latest record entered manually or without source document NoRecordedManualEntries=Δεν καταγράφονται μη καταχωρημένα μητρώα στη λογιστική BoxSuspenseAccount=Αρίθμηση λογιστικής λειτουργίας με λογαριασμό αναμονής BoxTitleSuspenseAccount=Αριθμός μη διατεθέντων γραμμών @@ -102,5 +105,7 @@ SuspenseAccountNotDefined=Ο λογαριασμός Suspense δεν έχει ο BoxLastCustomerShipments=Τελευταίες αποστολές πελάτη BoxTitleLastCustomerShipments=Τελευταίες %s αποστολές πελάτη NoRecordedShipments=Καμία καταγεγραμμένη αποστολή πελάτη +BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages AccountancyHome=Λογιστική +ValidatedProjects=Validated projects diff --git a/htdocs/langs/el_GR/cashdesk.lang b/htdocs/langs/el_GR/cashdesk.lang index 53dcd336847..52d5e03abb0 100644 --- a/htdocs/langs/el_GR/cashdesk.lang +++ b/htdocs/langs/el_GR/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Υποσέλιδο AmountAtEndOfPeriod=Ποσό στο τέλος της περιόδου (ημέρα, μήνας ή έτος) TheoricalAmount=Θεωρητικό ποσό RealAmount=Πραγματικό ποσό -CashFence=Φραγή μετρητών -CashFenceDone=Μετρητά φράχτη για την περίοδο +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=Πλήθος τιμολογίων Paymentnumpad=Τύπος πλακέτας για να πληκτρολογήσετε την πληρωμή Numberspad=Αριθμητικό Pad @@ -99,8 +99,9 @@ CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =  <br> <b> {TN} </b> ετικέτα χρησιμοποιείται για την προσθήκη του αριθμού τερματικού TakeposGroupSameProduct=Ομαδοποιήστε τις ίδιες σειρές προϊόντων StartAParallelSale=Ξεκινήστε μια νέα παράλληλη πώληση -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Κλείστε το φράχτη μετρητών +SaleStartedAt=Sale started at %s +ControlCashOpening=Control cash popup at opening POS +CloseCashFence=Close cash desk control CashReport=Έκθεση μετρητών MainPrinterToUse=Κύριος εκτυπωτής προς χρήση OrderPrinterToUse=Παραγγείλετε τον εκτυπωτή για χρήση @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/el_GR/categories.lang b/htdocs/langs/el_GR/categories.lang index 258447b74e0..02ad08d26d6 100644 --- a/htdocs/langs/el_GR/categories.lang +++ b/htdocs/langs/el_GR/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Περιοχή ετικετών / κατηγοριών χρηστών SubCats=Υποκατηγορίες CatList=Λίστα Ετικετών/Κατηγοριών +CatListAll=List of tags/categories (all types) NewCategory=Νέα Ετικέτα/Κατηγορία ModifCat=Τροποποίηση Ετικέτας/Κατηγορίας CatCreated=Ετικέτα/Κατηγορία δημιουργήθηκε @@ -65,16 +66,22 @@ UsersCategoriesShort=Ετικέτες / κατηγορίες χρηστών StockCategoriesShort=Ετικέτες / κατηγορίες αποθήκης ThisCategoryHasNoItems=Αυτή η κατηγορία δεν περιέχει στοιχεία. CategId=Ετικέτα/κατηγορία id -CatSupList=Λίστα ετικετών / κατηγοριών πωλητών -CatCusList=Λίστα πελάτη/προοπτικής ετικέτες/κατηγορίες +ParentCategory=Parent tag/category +ParentCategoryLabel=Label of parent tag/category +CatSupList=List of vendors tags/categories +CatCusList=List of customers/prospects tags/categories CatProdList=Λίστα προϊόντων ετικέτες/κατηγορίες CatMemberList=Λίστα μελών ετικέτες/κατηγορίες -CatContactList=Λίστα ετικετών/κατηγοριών επαφών -CatSupLinks=Συνδέσεις μεταξύ προμηθευτών και ετικετών/κατηγοριών +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=Συνδέσεις μεταξύ πελατών/προοπτικών και ετικετών/κατηγοριών CatContactsLinks=Σύνδεσμοι μεταξύ επαφών / διευθύνσεων και ετικετών / κατηγοριών CatProdLinks=Συνδέσεις μεταξύ προϊόντων/υπηρεσιών και ετικετών/κατηγοριών -CatProJectLinks=Links between projects 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=Αφαίρεση αυτής της ετικέτας/κατηγορίας ExtraFieldsCategories=Συμπληρωματικά χαρακτηριστικά CategoriesSetup=Ρύθμιση ετικετών/κατηγοριών diff --git a/htdocs/langs/el_GR/companies.lang b/htdocs/langs/el_GR/companies.lang index 318aa1d98d3..976e2709e1a 100644 --- a/htdocs/langs/el_GR/companies.lang +++ b/htdocs/langs/el_GR/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Ελέγξτε το ενδοκοινοτικό ανα VATIntraManualCheck=Μπορείτε επίσης να ελέγξετε χειροκίνητα στον ιστότοπο της Ευρωπαϊκής Επιτροπής <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=Check not possible. Check service is not provided by the member state (%s). NorProspectNorCustomer=Δεν προοπτική, ούτε πελάτης -JuridicalStatus=Τύπος νομικού προσώπου +JuridicalStatus=Business entity type Workforce=Workforce Staff=Εργαζόμενοι ProspectLevelShort=Δυναμική diff --git a/htdocs/langs/el_GR/compta.lang b/htdocs/langs/el_GR/compta.lang index 274e8851e74..d814080d930 100644 --- a/htdocs/langs/el_GR/compta.lang +++ b/htdocs/langs/el_GR/compta.lang @@ -111,7 +111,7 @@ Refund=Refund SocialContributionsPayments=Πληρωμές Κοινωνικών/Φορολογικών εισφορών ShowVatPayment=Εμφάνιση πληρωμής φόρου TotalToPay=Σύνολο πληρωμής -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account +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=Κωδικός λογιστικής πελάτη SupplierAccountancyCode=Κωδικός Προμηθευτή CustomerAccountancyCodeShort=Cust. account. code @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Είστε σίγουροι ότι θέλετε ExportDataset_tax_1=Κοινωνικές/Φορολογικές εισφορές και πληρωμές CalcModeVATDebt=Κατάσταση <b>%sΦΠΑ επί των λογιστικών υποχρεώσεων%s</b> CalcModeVATEngagement=Κατάσταση <b>%sΦΠΑ επί των εσόδων-έξοδα%s</b>. -CalcModeDebt=Ανάλυση γνωστών καταγεγραμμένων τιμολογίων, ακόμη και αν δεν έχουν ακόμη καταλογιστεί στο βιβλίο. +CalcModeDebt=Analysis of known recorded documents even if they are not yet accounted in ledger. CalcModeEngagement=Ανάλυση γνωστών καταγεγραμμένων πληρωμών, ακόμη και αν δεν έχουν ακόμη καταλογιστεί στο Ledger. CalcModeBookkeeping=Ανάλυση δεδομένων που έχουν καταχωρηθεί στον πίνακα Λογαριασμού Λογιστηρίου. CalcModeLT1= Λειτουργία <b>%sRE στα τιμολόγια πελατών - τιμολόγια προμηθευτών%s</b> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Υπόλοιπο των εσόδων και εξό AnnualByCompanies=Ισοζύγιο εσόδων και εξόδων, βάσει προκαθορισμένων ομάδων λογαριασμού AnnualByCompaniesDueDebtMode=Ισοζύγιο εσόδων και εξόδων, λεπτομέρεια κατά προκαθορισμένες ομάδες, τρόπος <b>%sClaims-Debts%s</b> δήλωσε τη <b>λογιστική δέσμευσης</b> . AnnualByCompaniesInputOutputMode=Ισοζύγιο εσόδων και εξόδων, λεπτομέρεια κατά προκαθορισμένες ομάδες, τρόπος <b>%sIncomes-Expenses%s</b> δήλωσε <b>ταμειακή λογιστική</b> . -SeeReportInInputOutputMode=Ανατρέξτε στο %sanalysis of payments%s για έναν υπολογισμό σχετικά με τις πραγματικές πληρωμές, ακόμη και αν δεν έχουν ακόμη λογιστικοποιηθεί στο Ledger. -SeeReportInDueDebtMode=Ανατρέξτε στο %sanalysis των τιμολογίων%s για έναν υπολογισμό βασισμένο σε γνωστά καταγεγραμμένα τιμολόγια, ακόμη και αν δεν έχουν ακόμη καταλογιστεί στο Ledger. -SeeReportInBookkeepingMode=Δείτε <b>%sBookeeping report%s</b> για έναν υπολογισμό στον <b>πίνακα &quot;</b> <b>Λογαριασμός Λογιστηρίου&quot;</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=- Περιλαμβάνει εκκρεμή τιμολόγια, έξοδα, ΦΠΑ, δωρεές είτε πληρώνονται είτε όχι. Περιλαμβάνει επίσης πληρωμένους μισθούς. <br> - Βασίζεται στην ημερομηνία χρέωσης των τιμολογίων και στην ημερομηνία λήξης των εξόδων ή των φόρων. Για τους μισθούς που ορίζονται με την ενότητα Μισθός, χρησιμοποιείται η ημερομηνία αξίας πληρωμής. 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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=Εμφανίζει ρεκόρ στο Λογα SeePageForSetup=Δείτε το μενού <a href="%s">%s</a> για τη ρύθμιση DepositsAreNotIncluded=- Δεν συμπεριλαμβάνονται τα τιμολόγια για τις προκαταβολές DepositsAreIncluded=- Down payment invoices are included +LT1ReportByMonth=Tax 2 report by month +LT2ReportByMonth=Tax 3 report by month LT1ReportByCustomers=Αναφέρετε τον φόρο 2 από τρίτους LT2ReportByCustomers=Αναφορά φόρου 3 από τρίτους LT1ReportByCustomersES=Αναφορά Πελ./Προμ. RE LT2ReportByCustomersES=Έκθεση του τρίτου IRPF VATReport=Έκθεση φορολογίας πώλησης VATReportByPeriods=Έκθεση φορολογίας πώλησης ανά περίοδο +VATReportByMonth=Sale tax report by month VATReportByRates=Πώληση φορολογική έκθεση με τιμές VATReportByThirdParties=Έκδοση φορολογικού δελτίου από τρίτους VATReportByCustomers=Πώληση φορολογική έκθεση από τον πελάτη diff --git a/htdocs/langs/el_GR/cron.lang b/htdocs/langs/el_GR/cron.lang index c2fe5100a6a..fcf0424f06d 100644 --- a/htdocs/langs/el_GR/cron.lang +++ b/htdocs/langs/el_GR/cron.lang @@ -6,16 +6,17 @@ Permission23102 = Δημιουργία/ενημέρωση προγραμματι Permission23103 = Διαγραφή προγραμματισμένης εργασίας Permission23104 = Εκτέλεση προγραμματισμένης εργασίας # Admin -CronSetup= Προγραμματισμένη ρύθμιση διαχείρισης των εργασιών -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=Ή να ελέγξετε και να ξεκινήσει μία συγκεκριμένη εργασία +CronSetup=Προγραμματισμένη ρύθμιση διαχείρισης των εργασιών +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=Κλειδί ασφαλείας για το URL για να ξεκινήσει η εργασία cron -FileToLaunchCronJobs=Command line to check and launch qualified cron jobs +FileToLaunchCronJobs=Γραμμή εντολών για έλεγχο και εκκίνηση ειδικών εργασιών cron CronExplainHowToRunUnix=Στο Unix περιβάλλον θα πρέπει να χρησιμοποιήσετε την ακόλουθη καταχώρηση crontab για να τρέχει η γραμμή εντολών καθένα 5 λεπτά -CronExplainHowToRunWin=Σε Microsoft (tm) Windows περιβάλλον μπορείτε να χρησιμοποιήσετε τα εργαλεία Προγραμματισμένη εργασία ώστε να εκτελείτε η γραμμή εντολών καθένα 5 λεπτά +CronExplainHowToRunWin=Στο περιβάλλον Microsoft (tm) των Windows μπορείτε να χρησιμοποιήσετε τα εργαλεία προγραμματισμένης εργασίας για να εκτελέσετε τη γραμμή εντολών κάθε 5 λεπτά CronMethodDoesNotExists=Class %s does not contains any method %s -CronJobDefDesc=Cron job profiles are defined into the module descriptor file. When module is activated, they are loaded and available so you can administer the jobs from the admin tools menu %s. -CronJobProfiles=List of predefined cron job profiles +CronMethodNotAllowed=Method %s of class %s is in blacklist of forbidden methods +CronJobDefDesc=Τα προφίλ εργασίας Cron ορίζονται στο αρχείο περιγραφικής ενότητας. Όταν η ενότητα είναι ενεργοποιημένη, φορτώνεται και είναι διαθέσιμη, ώστε να μπορείτε να διαχειριστείτε τις εργασίες από το μενού εργαλείων admin %s. +CronJobProfiles=Λίστα προκαθορισμένων προφίλ εργασίας cron # Menu EnabledAndDisabled=Ενεργοποίηση και απενεργοποίηση # Page list @@ -42,10 +43,11 @@ CronModule=Module CronNoJobs=Δεν έχουν καταχωρηθεί εργασίες CronPriority=Προτεραιότητα CronLabel=Ετικέτα -CronNbRun=Nb. έναρξης -CronMaxRun=Max number launch +CronNbRun=Αριθμός εκτοξεύσεων +CronMaxRun=Μέγιστος αριθμός εκτοξεύσεων CronEach=Κάθε JobFinished=Ξεκίνησε και τελείωσε +Scheduled=Scheduled #Page card CronAdd= Προσθήκη εργασίας CronEvery=Execute job each @@ -55,29 +57,35 @@ CronSaveSucess=Επιτυχής αποθήκευση CronNote=Σχόλιο CronFieldMandatory=Τα πεδία %s είναι υποχρεωτικά CronErrEndDateStartDt=Η ημερομηνία λήξης δεν μπορεί να είναι πριν από την ημερομηνία έναρξης -StatusAtInstall=Status at module installation -CronStatusActiveBtn=Ενεργοποίηση +StatusAtInstall=Κατάσταση κατά την εγκατάσταση της μονάδας +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Απενεργοποίηση CronTaskInactive=Αυτή η εργασία είναι απενεργοποιημένη CronId=Id CronClassFile=Filename with class -CronModuleHelp=Name of Dolibarr module directory (also work with external Dolibarr module). <BR> For exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +CronModuleHelp=Όνομα του καταλόγου μονάδων Dolibarr (επίσης λειτουργούν με εξωτερική μονάδα Dolibarr). <BR> Για παράδειγμα, για να καλέσουμε τη μέθοδο fetch του προϊόντος Dolibarr Product / htdocs / <u>product</u> / class / product.class.php, η τιμή για την ενότητα είναι <br> <i>προϊόν</i> +CronClassFileHelp=Η σχετική διαδρομή και το όνομα του αρχείου για φόρτωση (η διαδρομή είναι σχετική με τον κεντρικό κατάλογο διακομιστή ιστού). <BR> Για παράδειγμα, για να καλέσετε τη μέθοδο λήψης του προϊόντος Dolibarr Product htdocs / product / class / <u>product.class.php</u> , η τιμή για το όνομα αρχείου κλάσης είναι <br> <i>προϊόν / κλάση / product.class.php</i> +CronObjectHelp=Το όνομα αντικειμένου που θα φορτωθεί. <BR> Για παράδειγμα, για να καλέσετε τη μέθοδο λήψης του προϊόντος Dolibarr Product /htdocs/product/class/product.class.php, η τιμή για το όνομα του αρχείου κλάσης είναι <br> <i>Προϊόν</i> +CronMethodHelp=Η μέθοδος αντικειμένου για την εκκίνηση. <BR> Για παράδειγμα, για να καλέσετε τη μέθοδο λήψης του προϊόντος Dolibarr Product /htdocs/product/class/product.class.php, η τιμή για τη μέθοδο είναι <br> <i>φέρω</i> +CronArgsHelp=Τα επιχειρήματα της μεθόδου. <BR> Για παράδειγμα, για να καλέσετε τη μέθοδο λήψης του προϊόντος Dolibarr Product /htdocs/product/class/product.class.php, η τιμή για τους paramters μπορεί να είναι <br> <i>0, ProductRef</i> CronCommandHelp=Γραμμή εντολών του συστήματος προς εκτέλεση. CronCreateJob=Create new Scheduled Job CronFrom=Από # Info # Common CronType=Είδος εργασίας -CronType_method=Call method of a PHP Class +CronType_method=Μέθοδος κλήσης μιας κλάσης PHP CronType_command=Εντολή Shell -CronCannotLoadClass=Cannot load class file %s (to use class %s) -CronCannotLoadObject=Class file %s was loaded, but object %s was not found into it -UseMenuModuleToolsToAddCronJobs=Go into menu "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +CronCannotLoadClass=Δεν είναι δυνατή η φόρτωση του αρχείου κλάσης %s (για χρήση της κλάσης %s) +CronCannotLoadObject=Το αρχείο κλάσης %s φορτώθηκε, αλλά το αντικείμενο %s δεν βρέθηκε σε αυτό +UseMenuModuleToolsToAddCronJobs=Μεταβείτε στο μενού &quot; <a href="%s">Αρχική σελίδα - Εργαλεία διαχειριστή - Προγραμματισμένες εργασίες</a> &quot; για να δείτε και να επεξεργαστείτε προγραμματισμένες εργασίες. JobDisabled=Job disabled MakeLocalDatabaseDumpShort=Αντίγραφο ασφαλείας τοπικής βάσης δεδομένων -MakeLocalDatabaseDump=Create a local database dump. Parameters are: compression ('gz' or 'bz' or 'none'), backup type ('mysql' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +MakeLocalDatabaseDump=Δημιουργήστε μια τοπική χωματερή βάση δεδομένων. Οι παράμετροι είναι: συμπίεση (&#39;gz&#39; ή &#39;bz&#39; ή &#39;none&#39;), backup type (&#39;mysql&#39;, &#39;pgsql&#39;, &#39;auto&#39;), 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=Cleaner δεδομένων και ανώνυμος +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/el_GR/errors.lang b/htdocs/langs/el_GR/errors.lang index 393b97c7174..0cdb22a79d6 100644 --- a/htdocs/langs/el_GR/errors.lang +++ b/htdocs/langs/el_GR/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=Κανένα σφάλμα # Errors ErrorButCommitIsDone=Σφάλματα που διαπιστώθηκαν αλλά παρόλα αυτά επικυρώνει ErrorBadEMail=Το μήνυμα ηλεκτρονικού ταχυδρομείου %s είναι λάθος +ErrorBadMXDomain=Email %s seems wrong (domain has no valid MX record) ErrorBadUrl=%s url είναι λάθος ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=Είσοδος %s υπάρχει ήδη. ErrorGroupAlreadyExists=Ομάδα %s υπάρχει ήδη. ErrorRecordNotFound=Εγγραφή δεν βρέθηκε. @@ -48,6 +50,7 @@ ErrorFieldsRequired=Ορισμένα από τα απαιτούμενα πεδί ErrorSubjectIsRequired=The email topic is required ErrorFailedToCreateDir=Αποτυχία δημιουργίας φακέλου. Βεβαιωθείτε ότι ο Web server χρήστης έχει δικαιώματα να γράψει στο φάκελο εγγράφων του Dolibarr. Αν η <b>safe_mode</b> παράμετρος είναι ενεργοποιημένη για την PHP, ελέγξτε ότι τα αρχεία php του Dolibarr ανήκουν στον web server χρήστη (ή ομάδα). ErrorNoMailDefinedForThisUser=Δεν έχει οριστεί mail για αυτόν το χρήστη +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=Αυτό το χαρακτηριστικό χρειάζεται ενεργοποιημένη την javascript. Αλλάξτε την ρύθμιση στο Ρυθμίσεις - Εμφάνιση. ErrorTopMenuMustHaveAParentWithId0=Ένα μενού του «Top» τύπου δεν μπορεί να έχει ένα μενού γονέα. Βάλτε 0 στο μενού του γονέα ή να επιλέξετε ένα μενού του τύπου «αριστερά». ErrorLeftMenuMustHaveAParentId=Ένα μενού της «Αριστεράς» τύπου πρέπει να έχει ένα id γονέα. @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=Αυτό το όνομα προφίλ υπάρχει ErrorLDAPSetupNotComplete=Η αντιστοίχιση Dolibarr-LDAP δεν είναι πλήρης. ErrorLDAPMakeManualTest=Ένα αρχείο. Ldif έχει δημιουργηθεί στον φάκελο %s. Προσπαθήστε να το φορτώσετε χειροκίνητα από την γραμμή εντολών για να έχετε περισσότερες πληροφορίες σχετικά με τα σφάλματα. ErrorCantSaveADoneUserWithZeroPercentage=Δεν είναι δυνατή η αποθήκευση μιας ενέργειας με &quot;κατάσταση δεν έχει ξεκινήσει&quot; εάν συμπληρώνεται επίσης το πεδίο &quot;done by&quot;. -ErrorRefAlreadyExists=Κωδικός που χρησιμοποιείται για τη δημιουργία ήδη υπάρχει. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorPleaseTypeBankTransactionReportName=Παρακαλούμε εισάγετε το όνομα του τραπεζικού λογαριασμού όπου πρέπει να αναφέρεται η καταχώρηση (Format YYYYMM ή YYYYMMDD) ErrorRecordHasChildren=Δεν ήταν δυνατή η διαγραφή της εγγραφής, δεδομένου ότι έχει ορισμένα αρχεία παιδιών. ErrorRecordHasAtLeastOneChildOfType=Το αντικείμενο έχει τουλάχιστον ένα παιδί τύπου %s @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=Πρέπει να επιλέξε ErrorDiscountLargerThanRemainToPaySplitItBefore=Η έκπτωση που προσπαθείτε να εφαρμόσετε είναι μεγαλύτερη από την αποπληρωμή. Διαχωρίστε την έκπτωση σε 2 μικρότερες εκπτώσεις πριν. ErrorFileNotFoundWithSharedLink=Το αρχείο δεν βρέθηκε. Μπορεί να τροποποιηθεί το κλειδί κοινής χρήσης ή να καταργηθεί πρόσφατα το αρχείο. ErrorProductBarCodeAlreadyExists=Ο γραμμωτός κώδικας προϊόντος %s υπάρχει ήδη σε άλλη αναφορά προϊόντος. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Σημειώστε επίσης ότι η χρήση εικονικού προϊόντος για την αυτόματη αύξηση / μείωση υποπροϊόντων δεν είναι δυνατή όταν τουλάχιστον ένα υποπροϊόν (ή υποπροϊόν των υποπροϊόντων) χρειάζεται έναν αριθμό σειράς / παρτίδας. +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=Η περιγραφή είναι υποχρεωτική για γραμμές με δωρεάν προϊόν ErrorAPageWithThisNameOrAliasAlreadyExists=Η σελίδα / κοντέινερ <strong>%s</strong> έχει το ίδιο όνομα ή εναλλακτικό ψευδώνυμο με εκείνο που προσπαθείτε να χρησιμοποιήσετε ErrorDuringChartLoad=Σφάλμα κατά τη φόρτωση του γραφήματος λογαριασμών. Εάν δεν έχουν φορτωθεί μερικοί λογαριασμοί, μπορείτε να τις εισαγάγετε με μη αυτόματο τρόπο. @@ -243,6 +246,16 @@ ErrorReplaceStringEmpty=Σφάλμα, η συμβολοσειρά για αντ 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 + # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Η παράμετρος PHP upload_max_filesize (%s) είναι υψηλότερη από την παράμετρο PHP post_max_size (%s). Αυτό δεν είναι μια σταθερή ρύθμιση. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur WarningAnEntryAlreadyExistForTransKey=An entry already exists for the translation key for this language WarningNumberOfRecipientIsRestrictedInMassAction=Προειδοποίηση, ο αριθμός διαφορετικών παραληπτών περιορίζεται στο <b>%s</b> όταν χρησιμοποιείτε τις μαζικές ενέργειες σε λίστες WarningDateOfLineMustBeInExpenseReportRange=Προειδοποίηση, η ημερομηνία της γραμμής δεν βρίσκεται στο εύρος της έκθεσης δαπανών +WarningProjectDraft=Project is still in draft mode. Don't forget to validate it if you plan to use tasks. WarningProjectClosed=Το έργο είναι κλειστό. Πρέπει πρώτα να το ανοίξετε ξανά. WarningSomeBankTransactionByChequeWereRemovedAfter=Ορισμένες τραπεζικές συναλλαγές καταργήθηκαν μετά την ενσωμάτωσής τους εκεί οπου δημιουργήθηκαν. Επομένως, οι έλεγχοι και το σύνολο της απόδειξης μπορεί να διαφέρουν από τον αριθμό και το σύνολο της λίστας. -WarningFailedToAddFileIntoDatabaseIndex=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/el_GR/exports.lang b/htdocs/langs/el_GR/exports.lang index bf03b366fa0..28459f2238d 100644 --- a/htdocs/langs/el_GR/exports.lang +++ b/htdocs/langs/el_GR/exports.lang @@ -26,6 +26,8 @@ FieldTitle=Field title NowClickToGenerateToBuildExportFile=Τώρα, επιλέξτε τη μορφή αρχείου στο σύνθετο πλαίσιο και κάντε κλικ στο &quot;Δημιουργία&quot; για να δημιουργήσετε το αρχείο εξαγωγής ... AvailableFormats=Διαθέσιμες μορφές LibraryShort=Library +ExportCsvSeparator=Csv διαχωριστικό χαρακτήρων +ImportCsvSeparator=Csv διαχωριστικό χαρακτήρων Step=Step FormatedImport=Βοηθός εισαγωγής FormatedImportDesc1=Αυτή η ενότητα σάς επιτρέπει να ενημερώσετε υπάρχοντα δεδομένα ή να προσθέσετε νέα αντικείμενα στη βάση δεδομένων από ένα αρχείο χωρίς τεχνικές γνώσεις, χρησιμοποιώντας έναν βοηθό. @@ -131,3 +133,4 @@ KeysToUseForUpdates=Πλήκτρο (στήλη) που χρησιμοποιεί 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/el_GR/mails.lang b/htdocs/langs/el_GR/mails.lang index cd95cc106e2..42009943751 100644 --- a/htdocs/langs/el_GR/mails.lang +++ b/htdocs/langs/el_GR/mails.lang @@ -92,6 +92,7 @@ MailingModuleDescEmailsFromUser=Εισαγωγή μηνυμάτων ηλεκτρ MailingModuleDescDolibarrUsers=Χρήστες με μηνύματα ηλεκτρονικού ταχυδρομείου MailingModuleDescThirdPartiesByCategories=Τρίτα μέρη (κατά κατηγορίες) SendingFromWebInterfaceIsNotAllowed=Η αποστολή από τη διεπαφή ιστού δεν επιτρέπεται. +EmailCollectorFilterDesc=All filters must match to have an email being collected # Libelle des modules de liste de destinataires mailing LineInFile=Σειρά %s στο αρχείο @@ -125,12 +126,13 @@ TagMailtoEmail=E-mail παραλήπτη (συμπεριλαμβανομένου NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Notifications -NoNotificationsWillBeSent=Δεν υπάρχουν ειδοποιήσεις μέσω ηλεκτρονικού ταχυδρομείου που έχουν προγραμματιστεί για αυτό το συμβάν και την εταιρεία -ANotificationsWillBeSent=1 ειδοποίηση θα σταλεί μέσω e-mail -SomeNotificationsWillBeSent=%s Θα αποστέλλονται ειδοποιήσεις μέσω e-mail -AddNewNotification=Ενεργοποιήστε ένα νέο στόχο ειδοποίησης μέσω ηλεκτρονικού ταχυδρομείου -ListOfActiveNotifications=List all active targets for email notification -ListOfNotificationsDone=Λίστα όλων των ειδοποιήσεων ηλεκτρονικού ταχυδρομείου που αποστέλλονται +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=Διαμόρφωση αποστολή email έχει ρυθμιστεί σε '%s'. Αυτή η λειτουργία δεν μπορεί να χρησιμοποιηθεί για να σταλθούν μαζικά μηνύματα ηλεκτρονικού ταχυδρομείου. MailSendSetupIs2=Θα πρέπει πρώτα να πάτε, με έναν λογαριασμό διαχειριστή, στο μενού %s Αρχική - Ρύθμιση - Emails %s για να αλλάξετε την παράμετρο <strong>'%s'</strong> για να χρησιμοποιήσετε τη λειτουργία '%s'. Με αυτόν τον τρόπο, μπορείτε να μεταβείτε στις ρυθμίσεις του διακομιστή SMTP παρέχεται από τον Internet Service Provider και να χρησιμοποιήσετε τη Μαζική αποστολή ηλεκτρονικού ταχυδρομείου. MailSendSetupIs3=Αν έχετε οποιαδήποτε απορία σχετικά με το πώς να ρυθμίσετε το διακομιστή SMTP σας, μπορείτε να ζητήσετε στο %s. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir UseFormatInputEmailToTarget=Enter a string with format <strong>email;name;firstname;other</strong> MailAdvTargetRecipients=Recipients (advanced selection) AdvTgtTitle=Συμπληρώστε τα πεδία εισαγωγής για να επιλέξετε εκ των προτέρων τα τρίτα μέρη ή τις επαφές / διευθύνσεις που θέλετε να στοχεύσετε -AdvTgtSearchTextHelp=Χρησιμοποιήστε %% ως μπαλαντέρ. Για παράδειγμα, για να βρείτε όλα τα στοιχεία όπως το <b>jean, joe, jim</b> , μπορείτε να εισάγετε το <b>j%%</b> , μπορείτε επίσης να χρησιμοποιήσετε. ως διαχωριστικό για αξία και χρήση! για εκτός αυτής της τιμής. Για παράδειγμα, το <b>jean, joe, jim%%;! Jimo;! Jima%</b> θα στοχεύσει όλους τους Jean, joe, ξεκινήστε με τον Jim αλλά όχι το jimo και όχι με όλα όσα αρχίζουν με jima +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=Ελάχιστη τιμή AdvTgtMaxVal=Μέγιστη τιμή @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Εγκατάσταση εξερχόμενου email (για ενότητα %s) -DefaultOutgoingEmailSetup=Προεπιλεγμένη ρύθμιση εξερχόμενων email +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=Πληροφορίες ContactsWithThirdpartyFilter=Επαφές με φίλτρο τρίτου μέρους 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/el_GR/main.lang b/htdocs/langs/el_GR/main.lang index 420fc166108..e889ec49edd 100644 --- a/htdocs/langs/el_GR/main.lang +++ b/htdocs/langs/el_GR/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=Δεν υπάρχει διαθέσιμο πρότυπο για AvailableVariables=Διαθέσιμες μεταβλητές αντικατάστασης NoTranslation=Δεν μεταφράστηκε Translation=Μετάφραση +CurrentTimeZone=TimeZone PHP (server) EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria NoRecordFound=Δεν υπάρχουν καταχωρημένα στοιχεία NoRecordDeleted=Δεν διαγράφηκε εγγραφή NotEnoughDataYet=Τα δεδομένα δεν είναι επαρκή @@ -85,6 +87,8 @@ FileWasNotUploaded=Επιλέχθηκε ένα αρχείο για επισύν NbOfEntries=Αριθ. Εγγραφών GoToWikiHelpPage=Online βοήθεια (απαιτείται σύνδεση στο internet) GoToHelpPage=Βοήθεια +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Home Page RecordSaved=Η εγγραφή αποθηκεύτηκε RecordDeleted=Η εγγραφή διγραφηκε RecordGenerated=Η εγγραφή δημιουργήθηκε @@ -220,6 +224,7 @@ Value=Τιμή PersonalValue=Προσωπική Τιμή NewObject=Νέο %s NewValue=Νέα Τιμή +OldValue=Old value %s CurrentValue=Τρέχουσα Τιμή Code=Κωδικός Type=Τύπος @@ -433,6 +438,7 @@ RemainToPay=Πληρώστε Module=Ενότητα / Εφαρμογή Modules=Ενότητες / Εφαρμογές Option=Επιλογή +Filters=Filters List=Λίστα FullList=Πλήρης Λίστα FullConversation=Full conversation @@ -650,6 +656,7 @@ SupplierPreview=Προβολή προμηθευτή ShowCustomerPreview=Εμφάνιση Προεπισκόπησης Πελάτη ShowSupplierPreview=Εμφάνιση προεπισκόπησης προμηθευτή RefCustomer=Κωδ. Πελάτη +InternalRef=Internal ref. Currency=Νόμισμα InfoAdmin=Πληροφορία για τους διαχειριστές Undo=Αναίρεση @@ -671,7 +678,7 @@ SendMail=Αποστολή email Email=Email NoEMail=Χωρίς email AlreadyRead=Διαβάσατε ήδη -NotRead=Δεν διαβάζεται +NotRead=Unread NoMobilePhone=Χωρείς κινητό τηλέφωνο Owner=Ιδιοκτήτης FollowingConstantsWillBeSubstituted=Οι ακόλουθες σταθερές θα αντικαταστασθούν με τις αντίστοιχες τιμές @@ -1107,3 +1114,9 @@ UpToDate=Up-to-date OutOfDate=Out-of-date EventReminder=Υπενθύμιση συμβάντος UpdateForAllLines=Update for all lines +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 diff --git a/htdocs/langs/el_GR/modulebuilder.lang b/htdocs/langs/el_GR/modulebuilder.lang index 6f8f201d666..0c97a5a3b30 100644 --- a/htdocs/langs/el_GR/modulebuilder.lang +++ b/htdocs/langs/el_GR/modulebuilder.lang @@ -40,6 +40,7 @@ PageForCreateEditView=Σελίδα PHP για δημιουργία / επεξε PageForAgendaTab=Σελίδα PHP για καρτέλα συμβάντος PageForDocumentTab=PHP σελίδα για καρτέλα έγγραφο PageForNoteTab=Σελίδα PHP για την καρτέλα σημείωσης +PageForContactTab=PHP page for contact tab PathToModulePackage=Διαδρομή προς φερμουάρ του πακέτου ενότητας / εφαρμογής PathToModuleDocumentation=Διαδρομή αρχείου τεκμηρίωσης ενότητας / εφαρμογής (%s) SpaceOrSpecialCharAreNotAllowed=Δεν επιτρέπονται χώροι ή ειδικοί χαρακτήρες. @@ -77,7 +78,7 @@ IsAMeasure=Είναι ένα μέτρο DirScanned=Κατάλογος σάρωση NoTrigger=Δεν ενεργοποιείται NoWidget=Δεν γραφικό στοιχείο -GoToApiExplorer=Μεταβείτε στον εξερευνητή API +GoToApiExplorer=API explorer ListOfMenusEntries=Λίστα καταχωρήσεων μενού ListOfDictionariesEntries=Λίστα καταχωρήσεων λεξικών ListOfPermissionsDefined=Λίστα καθορισμένων δικαιωμάτων @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=Αν έχετε γνώσεις SQL και PHP, μπορ SeeTopRightMenu=Βλέπω <span class="fa fa-bug"></span> στο πάνω δεξιό μενού AddLanguageFile=Προσθήκη αρχείου γλώσσας YouCanUseTranslationKey=Μπορείτε να χρησιμοποιήσετε εδώ ένα κλειδί που είναι το κλειδί μετάφρασης που βρίσκεται στο αρχείο γλώσσας (δείτε την καρτέλα &quot;Γλώσσες&quot;) -DropTableIfEmpty=(Διαγραφή πίνακα εάν είναι κενή) +DropTableIfEmpty=(Destroy table if empty) TableDoesNotExists=Ο πίνακας %s δεν υπάρχει TableDropped=Ο πίνακας %s διαγράφηκε InitStructureFromExistingTable=Δημιουργήστε τη συμβολοσειρά συστοιχιών δομής ενός υπάρχοντος πίνακα @@ -126,7 +127,6 @@ UseSpecificEditorURL = Χρησιμοποιήστε μια συγκεκριμέ UseSpecificFamily = Χρησιμοποιήστε μια συγκεκριμένη οικογένεια UseSpecificAuthor = Χρησιμοποιήστε έναν συγκεκριμένο συντάκτη UseSpecificVersion = Χρησιμοποιήστε μια συγκεκριμένη αρχική έκδοση -ModuleMustBeEnabled=Η μονάδα / εφαρμογή πρέπει πρώτα να ενεργοποιηθεί IncludeRefGeneration=Η αναφορά του αντικειμένου πρέπει να δημιουργείται αυτόματα IncludeRefGenerationHelp=Ελέγξτε αν θέλετε να συμπεριλάβετε κώδικα για να διαχειριστείτε την αυτόματη παραγωγή της αναφοράς IncludeDocGeneration=Θέλω να δημιουργήσω κάποια έγγραφα από το αντικείμενο @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Τύπος πεδίων: <br> varchar (99), διπλό (24,8), AsciiToHtmlConverter=Μεταροπέας από Ascii σε HTML AsciiToPdfConverter=Μεταροπέας από Ascii σε PDF 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/el_GR/mrp.lang b/htdocs/langs/el_GR/mrp.lang index 25e91a2a182..898842cfab0 100644 --- a/htdocs/langs/el_GR/mrp.lang +++ b/htdocs/langs/el_GR/mrp.lang @@ -78,3 +78,27 @@ TotalCost=Συνολικό κόστος 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/el_GR/other.lang b/htdocs/langs/el_GR/other.lang index 28a0f808756..83a5818fdcc 100644 --- a/htdocs/langs/el_GR/other.lang +++ b/htdocs/langs/el_GR/other.lang @@ -5,8 +5,6 @@ Tools=Εργαλεία TMenuTools=Εργαλεία ToolsDesc=Όλα τα εργαλεία που δεν περιλαμβάνονται σε άλλες καταχωρίσεις μενού ομαδοποιούνται εδώ. <br> Όλα τα εργαλεία μπορούν να προσπελαστούν μέσω του αριστερού μενού. Birthday=Γενέθλια -BirthdayDate=Ημερομηνία γενέθλια -DateToBirth=Ημερομηνία γέννησης BirthdayAlertOn=Ειδοποίηση γενεθλίων ενεργή BirthdayAlertOff=Ειδοποίηση γενεθλίων ανενεργή TransKey=Μετάφραση του κλειδιού TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Προηγούμενος μήνας (αριθμός 1-12) TextPreviousMonthOfInvoice=Προηγούμενος μήνας (κείμενο) της ημερομηνίας του τιμολογίου NextMonthOfInvoice=Μετά τον μήνα (αριθμός 1-12) της ημερομηνίας του τιμολογίου TextNextMonthOfInvoice=Μετά τον μήνα (κείμενο) της ημερομηνίας του τιμολογίου +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Το αρχείο Zip δημιουργήθηκε σε <b>%s</b> . DocFileGeneratedInto=Το αρχείο Doc δημιουργήθηκε σε <b>%s</b> . JumpToLogin=Ασύνδετος. Μετάβαση στη σελίδα σύνδεσης ... @@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Έκθεση εξόδων επικυρωμένη Notify_EXPENSE_REPORT_APPROVE=Η έκθεση εξόδων εγκρίθηκε Notify_HOLIDAY_VALIDATE=Ακύρωση αίτησης επικυρωμένου (απαιτείται έγκριση) Notify_HOLIDAY_APPROVE=Αφήστε την αίτηση να εγκριθεί +Notify_ACTION_CREATE=Added action to Agenda SeeModuleSetup=Δείτε την ρύθμιση του module %s NbOfAttachedFiles=Πλήθος επισυναπτώμενων αρχείων/εγγράφων TotalSizeOfAttachedFiles=Συνολικό μέγεθος επισυναπτώμενων αρχείων/εγγράφων @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__ (Γεια σας) __ Παρακαλούμε PredefinedMailContentSendFichInter=__ (Γεια σας) __ Βρείτε την παρέμβαση __REF__ επισυνάπτεται __ (ειλικρινά) __ __USER_SIGNATURE__ PredefinedMailContentLink=Μπορείτε να κάνετε κλικ στον παρακάτω σύνδεσμο για να πραγματοποιήσετε την πληρωμή σας, αν δεν έχει γίνει ήδη. %s PredefinedMailContentGeneric=__ (Γεια σας) __ __ (ειλικρινά) __ __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 είναι ένα συμπαγές ERP / CRM που υποστηρίζει διάφορες λειτουργικές μονάδες. Ένα demo που παρουσιάζει όλες τις μονάδες δεν έχει νόημα καθώς το σενάριο αυτό δεν εμφανίζεται ποτέ (αρκετές εκατοντάδες διαθέσιμες). Έτσι, πολλά προφίλ επίδειξης είναι διαθέσιμα. ChooseYourDemoProfil=Επιλέξτε το προφίλ επίδειξης που ταιριάζει καλύτερα στις ανάγκες σας ... ChooseYourDemoProfilMore=... ή να δημιουργήσετε το δικό σας προφίλ <br> (επιλογή χειροκίνητης μονάδας) @@ -137,7 +139,7 @@ Right=Δικαίωμα CalculatedWeight=Υπολογισμένο βάρος CalculatedVolume=Υπολογισμένος όγκος Weight=Βάρος -WeightUnitton=τόνο +WeightUnitton=τόνος WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,7 @@ EMailTextExpenseReportValidated=Η έκθεση δαπανών %s έχει επ EMailTextExpenseReportApproved=Η έκθεση δαπανών %s έχει εγκριθεί. EMailTextHolidayValidated=Ακύρωση αίτησης %s έχει επικυρωθεί. EMailTextHolidayApproved=Το αίτημα άδειας %s έχει εγκριθεί. +EMailTextActionAdded=The action %s has been added to the Agenda. ImportedWithSet=Η εισαγωγή των δεδομένων που DolibarrNotification=Αυτόματη ειδοποίηση ResizeDesc=Εισάγετε το νέο πλάτος <b>ή το</b> νέο ύψος. Λόγος θα διατηρηθούν κατά τη διάρκεια της αλλαγής μεγέθους ... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Επαφή / διεύθυνση που δημιο ProjectCreatedByEmailCollector=Έργο που δημιουργήθηκε από τον συλλέκτη ηλεκτρονικού ταχυδρομείου από το ηλεκτρονικό ταχυδρομείο MSGID %s TicketCreatedByEmailCollector=Εισιτήριο που δημιουργήθηκε από τον συλλέκτη ηλεκτρονικού ταχυδρομείου από το ηλεκτρονικό ταχυδρομείο MSGID %s OpeningHoursFormatDesc=Χρησιμοποιήστε το "-" για να διαχωρίσετε τις ώρες ανοίγματος και κλεισίματος. <br> Χρησιμοποιήστε "κενό" για να εισάγετε διαφορετικές περιοχές. <br> Παράδειγμα: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/el_GR/products.lang b/htdocs/langs/el_GR/products.lang index 6570f5f1b60..60cfc0b3233 100644 --- a/htdocs/langs/el_GR/products.lang +++ b/htdocs/langs/el_GR/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Πολλαπλά τμήματα τιμών ανά προϊόν / υπηρεσία (κάθε πελάτης βρίσκεται σε ένα τμήμα τιμών) MultiPricesNumPrices=Αριθμός τιμής DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=Αριθμός μητρικής συσκευασίας προϊόντος @@ -167,8 +168,10 @@ BuyingPrices=Τιμές Αγοράς CustomerPrices=Τιμές Πελατών SuppliersPrices=Τιμές πωλητών SuppliersPricesOfProductsOrServices=Τιμές πωλητών (προϊόντων ή υπηρεσιών) -CustomCode=Τελωνείο / εμπορεύματα / κωδικός ΕΣ +CustomCode=Customs|Commodity|HS code CountryOrigin=Χώρα προέλευσης +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Φύση προϊόντος (υλικό / τελικό) NatureOfProductShort=Nature of product NatureOfProductDesc=Raw material or finished product @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Διαφορετικές τιμές από την ποσότητα DisablePriceByQty=Απενεργοποιήστε τις τιμές ανά ποσότητα PriceByQuantityRange=Quantity range -MultipriceRules=Κανόνες τμήματος τιμών +MultipriceRules=Automatic prices for segment UseMultipriceRules=Χρησιμοποιήστε κανόνες για το τμήμα των τιμών (που ορίζονται στην εγκατάσταση μονάδας προϊόντος) για να υπολογίσετε αυτόματα τις τιμές όλων των άλλων τμημάτων σύμφωνα με τον πρώτο τομέα PercentVariationOver=Παραλλαγή %% μέσω %s PercentDiscountOver=%% έκπτωση πάνω από %s diff --git a/htdocs/langs/el_GR/projects.lang b/htdocs/langs/el_GR/projects.lang index de4fe4901f7..f63a0fbc3e6 100644 --- a/htdocs/langs/el_GR/projects.lang +++ b/htdocs/langs/el_GR/projects.lang @@ -76,15 +76,16 @@ MyActivities=Οι εργασίες/δραστηρ. μου MyProjects=Τα έργα μου MyProjectsArea=Τα έργα μου Περιοχή DurationEffective=Αποτελεσματική διάρκεια -ProgressDeclared=Χαρακτηρίστηκε σε εξέλιξη +ProgressDeclared=Declared real progress TaskProgressSummary=Πρόοδος εργασιών CurentlyOpenedTasks=Ανοιχτές εργασίες -TheReportedProgressIsLessThanTheCalculatedProgressionByX=Η δηλωμένη πρόοδος είναι μικρότερη %s από την υπολογισμένη εξέλιξη -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=Η δηλωμένη πρόοδος είναι περισσότερο %s από την υπολογισμένη εξέλιξη -ProgressCalculated=Υπολογιζόμενη πρόοδος +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=με το οποίο είμαι συνδεδεμένος WhichIamLinkedToProject=που είμαι συνδεδεμένος με το έργο Time=Χρόνος +TimeConsumed=Consumed ListOfTasks=Κατάλογος εργασιών GoToListOfTimeConsumed=Μεταβείτε στη λίστα του χρόνου που καταναλώνετε GanttView=Gantt View diff --git a/htdocs/langs/el_GR/recruitment.lang b/htdocs/langs/el_GR/recruitment.lang index 979cbd02335..6bd34b116f7 100644 --- a/htdocs/langs/el_GR/recruitment.lang +++ b/htdocs/langs/el_GR/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/el_GR/sendings.lang b/htdocs/langs/el_GR/sendings.lang index d72b07464cb..d4bf5fdbe92 100644 --- a/htdocs/langs/el_GR/sendings.lang +++ b/htdocs/langs/el_GR/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Άλλες αποστολές για αυτό το σ SendingsAndReceivingForSameOrder=Αποστολές και αποδείξεις για αυτήν την παραγγελία SendingsToValidate=Αποστολές για επικύρωση StatusSendingCanceled=Ακυρώθηκε +StatusSendingCanceledShort=Ακυρώθηκε StatusSendingDraft=Σχέδιο StatusSendingValidated=Επικυρωμένη (προϊόντα για αποστολή ή που έχουν ήδη αποσταλεί) StatusSendingProcessed=Επεξεργασμένα @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=Θα πρέπει πρώτα να επικυρ # Sending methods # ModelDocument DocumentModelTyphon=Πληρέστερο πρότυπο έγγραφο για αποδεικτικά παράδοσης (logo. ..) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Σταθερή EXPEDITION_ADDON_NUMBER δεν ορίζεται SumOfProductVolumes=Άθροισμα όγκου του προϊόντος SumOfProductWeights=Άθροισμα το βάρος των προϊόντων diff --git a/htdocs/langs/el_GR/stocks.lang b/htdocs/langs/el_GR/stocks.lang index 50808768598..454db71ae7c 100644 --- a/htdocs/langs/el_GR/stocks.lang +++ b/htdocs/langs/el_GR/stocks.lang @@ -62,6 +62,7 @@ EnhancedValueOfWarehouses=Αποθήκες αξία UserWarehouseAutoCreate=Δημιουργήστε αυτόματα μια αποθήκη χρήστη κατά τη δημιουργία ενός χρήστη AllowAddLimitStockByWarehouse=Διαχειριστείτε επίσης την τιμή για το ελάχιστο και το επιθυμητό απόθεμα ανά ζεύγος (αποθήκη προϊόντων) επιπλέον της τιμής για το ελάχιστο και το επιθυμητό απόθεμα ανά προϊόν RuleForWarehouse=Rule for warehouses +WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/el_GR/ticket.lang b/htdocs/langs/el_GR/ticket.lang index 67327d94483..65f2b2d8d39 100644 --- a/htdocs/langs/el_GR/ticket.lang +++ b/htdocs/langs/el_GR/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Τύπος εισιτηρίου TicketDictCategory=Εισιτήριο - Ομαδοποιεί TicketDictSeverity=Εισιτήριο - Βαρύτητα TicketDictResolution=Εισιτήριο - Ανάλυση -TicketTypeShortBUGSOFT=Λογική δυσλειτουργίας -TicketTypeShortBUGHARD=Dysfonctionnement υλικά -TicketTypeShortCOM=Εμπορική ερώτηση +TicketTypeShortCOM=Εμπορική ερώτηση TicketTypeShortHELP=Αίτημα για λειτουργική βοήθεια TicketTypeShortISSUE=Θέμα, σφάλμα ή πρόβλημα TicketTypeShortREQUEST=Αίτημα αλλαγής ή βελτίωσης @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Άλλο TicketSeverityShortLOW=Χαμηλή TicketSeverityShortNORMAL=Κανονικός TicketSeverityShortHIGH=Υψηλή -TicketSeverityShortBLOCKING=Κρίσιμη / Αποκλεισμός +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Το πεδίο &#39;%s&#39; είναι εσφαλμένο MenuTicketMyAssign=Τα εισιτήριά μου @@ -60,7 +58,6 @@ OriginEmail=Πηγή ηλεκτρονικού ταχυδρομείου Notify_TICKET_SENTBYMAIL=Στείλτε μήνυμα εισιτηρίου μέσω ηλεκτρονικού ταχυδρομείου # Status -NotRead=Δεν διαβάζεται Read=Ανάγνωση Assigned=Ανατεθεί InProgress=Σε εξέλιξη @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Η δημόσια διεπαφή επιτρέ TicketsAutoAssignTicket=Ορίστε αυτόματα τον χρήστη που δημιούργησε το εισιτήριο TicketsAutoAssignTicketHelp=Κατά τη δημιουργία ενός εισιτηρίου, ο χρήστης μπορεί να αντιστοιχιστεί αυτόματα στο εισιτήριο. TicketNumberingModules=Μονάδα αρίθμησης εισιτηρίων +TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=Ειδοποιήστε τρίτο μέρος στη δημιουργία TicketsDisableCustomerEmail=Πάντα να απενεργοποιείτε τα μηνύματα ηλεκτρονικού ταχυδρομείου όταν δημιουργείται ένα εισιτήριο από τη δημόσια διασύνδεση TicketsPublicNotificationNewMessage=Send email(s) when a new message is added @@ -233,7 +231,6 @@ TicketLogStatusChanged=Η κατάσταση άλλαξε: %s to %s TicketNotNotifyTiersAtCreate=Μην ειδοποιείτε την εταιρεία στη δημιουργία Unread=Αδιάβαστος TicketNotCreatedFromPublicInterface=Μη διαθέσιμος. Το εισιτήριο δεν δημιουργήθηκε από το δημόσιο περιβάλλον. -PublicInterfaceNotEnabled=Η δημόσια διεπαφή δεν ήταν ενεργοποιημένη ErrorTicketRefRequired=Το όνομα αναφοράς Eισιτηρίου είναι υποχρεωτικό # diff --git a/htdocs/langs/el_GR/website.lang b/htdocs/langs/el_GR/website.lang index 50dd8e48759..7ed1f8aab8f 100644 --- a/htdocs/langs/el_GR/website.lang +++ b/htdocs/langs/el_GR/website.lang @@ -30,7 +30,6 @@ EditInLine=Επεξεργασία εν σειρά AddWebsite=Προσθήκη ιστοτόπου Webpage=Ιστοσελίδα / δοχείο AddPage=Προσθήκη σελίδας / δοχείου -HomePage=Αρχική σελίδα PageContainer=Σελίδα PreviewOfSiteNotYetAvailable=<strong>Δεν</strong> είναι ακόμα διαθέσιμη η προεπισκόπηση του ιστοτόπου σας <strong>%s</strong> . Πρέπει πρώτα να <strong>εισαγάγετε ένα πλήρες πρότυπο ιστότοπου</strong> ή απλά να <strong>προσθέσετε μια σελίδα / κοντέινερ</strong> . RequestedPageHasNoContentYet=Η σελίδα που ζητήθηκε με id %s δεν έχει ακόμα περιεχόμενο, ή το αρχείο cache .tpl.php καταργήθηκε. Επεξεργαστείτε το περιεχόμενο της σελίδας για να το επιλύσετε. @@ -101,7 +100,7 @@ EmptyPage=Κενή σελίδα ExternalURLMustStartWithHttp=Η εξωτερική διεύθυνση URL πρέπει να ξεκινά με http: // ή https: // ZipOfWebsitePackageToImport=Μεταφορτώστε το αρχείο Zip του πακέτου πρότυπου ιστότοπου ZipOfWebsitePackageToLoad=ή Επιλέξτε ένα διαθέσιμο πακέτο πρότυπου ιστότοπου -ShowSubcontainers=Συμπεριλάβετε δυναμικό περιεχόμενο +ShowSubcontainers=Show dynamic content InternalURLOfPage=Εσωτερική διεύθυνση URL της σελίδας ThisPageIsTranslationOf=Αυτή η σελίδα / δοχείο είναι μια μετάφραση του ThisPageHasTranslationPages=Αυτή η σελίδα / κοντέινερ έχει μετάφραση @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/el_GR/withdrawals.lang b/htdocs/langs/el_GR/withdrawals.lang index b4cebd19f0c..69377126e89 100644 --- a/htdocs/langs/el_GR/withdrawals.lang +++ b/htdocs/langs/el_GR/withdrawals.lang @@ -42,6 +42,7 @@ LastWithdrawalReceipt=Τελευταίες εισπράξεις άμεσης χ MakeWithdrawRequest=Πραγματοποιήστε αίτημα πληρωμής με άμεση χρέωση MakeBankTransferOrder=Make a credit transfer request WithdrawRequestsDone=%s καταγράφονται τα αιτήματα πληρωμής άμεσης χρέωσης +BankTransferRequestsDone=%s credit transfer requests recorded ThirdPartyBankCode=Τραπεζικός κωδικός τρίτου μέρους NoInvoiceCouldBeWithdrawed=Κανένα τιμολόγιο δεν χρεώθηκε με επιτυχία. Βεβαιωθείτε ότι τα τιμολόγια είναι σε εταιρείες με έγκυρο αριθμό IBAN και ότι ο IBAN έχει UMR (Unique Mandate Reference) με τον τρόπο <strong>%s</strong> . ClassCredited=Ταξινομήστε πιστώνεται @@ -131,7 +132,8 @@ SEPARCUR=SEPA CUR SEPAFRST=SEPA FRST ExecutionDate=Ημερομηνία εκτέλεσης CreateForSepa=Δημιουργήστε αρχείο άμεσης χρέωσης -ICS=Αναγνωριστικό πιστωτή CI +ICS=Creditor Identifier CI for direct debit +ICSTransfer=Creditor Identifier CI for bank transfer END_TO_END=&quot;EndToEndId&quot; Ετικέτα XML SEPA - Μοναδική ταυτότητα που αντιστοιχεί σε κάθε συναλλαγή USTRD=&quot;Μη δομημένη&quot; ετικέτα XML SEPA ADDDAYS=Προσθήκη ημερών στην Ημερομηνία Εκτέλεσης @@ -146,3 +148,5 @@ InfoRejectSubject=Η εντολή πληρωμής άμεσης χρέωσης InfoRejectMessage=Γεια σας, <br><br> η εντολή πληρωμής άμεσης χρέωσης του τιμολογίου %s σχετικά με την εταιρεία %s, με το ποσό %s απορρίφθηκε από την τράπεζα. <br><br> - <br> %s ModeWarning=Επιλογή για την πραγματική κατάσταση, δεν είχε καθοριστεί, σταματάμε μετά από αυτή την προσομοίωση 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/el_GR/workflow.lang b/htdocs/langs/el_GR/workflow.lang index 0c31b6ae167..bfad87b4b66 100644 --- a/htdocs/langs/el_GR/workflow.lang +++ b/htdocs/langs/el_GR/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=Αυτόματη δημιουργία AutomaticClassification=Αυτόματη ταξινόμηση +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/en_AU/accountancy.lang b/htdocs/langs/en_AU/accountancy.lang new file mode 100644 index 00000000000..552865118f1 --- /dev/null +++ b/htdocs/langs/en_AU/accountancy.lang @@ -0,0 +1,2 @@ +# 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 0980facb414..fd46f1407d3 100644 --- a/htdocs/langs/en_AU/admin.lang +++ b/htdocs/langs/en_AU/admin.lang @@ -1,7 +1,9 @@ # 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) 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/mrp.lang b/htdocs/langs/en_AU/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/en_AU/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/en_AU/products.lang b/htdocs/langs/en_AU/products.lang index 6e900475275..2a38b9b0181 100644 --- a/htdocs/langs/en_AU/products.lang +++ b/htdocs/langs/en_AU/products.lang @@ -1,2 +1,2 @@ # Dolibarr language file - Source file is en_US - products -CustomCode=Customs / Commodity / HS code +AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/en_AU/withdrawals.lang b/htdocs/langs/en_AU/withdrawals.lang new file mode 100644 index 00000000000..facdefc082f --- /dev/null +++ b/htdocs/langs/en_AU/withdrawals.lang @@ -0,0 +1,2 @@ +# 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 new file mode 100644 index 00000000000..552865118f1 --- /dev/null +++ b/htdocs/langs/en_CA/accountancy.lang @@ -0,0 +1,2 @@ +# 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 62dd510c5e0..a5226efb4db 100644 --- a/htdocs/langs/en_CA/admin.lang +++ b/htdocs/langs/en_CA/admin.lang @@ -1,7 +1,9 @@ # Dolibarr language file - Source file is en_US - admin +Module59000Desc=Module to follow margins LocalTax1Management=PST Management CompanyZip=Postal code 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/compta.lang b/htdocs/langs/en_CA/compta.lang deleted file mode 100644 index c7c41488180..00000000000 --- a/htdocs/langs/en_CA/compta.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - compta -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account diff --git a/htdocs/langs/en_CA/mrp.lang b/htdocs/langs/en_CA/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/en_CA/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/en_CA/products.lang b/htdocs/langs/en_CA/products.lang index 6e900475275..2a38b9b0181 100644 --- a/htdocs/langs/en_CA/products.lang +++ b/htdocs/langs/en_CA/products.lang @@ -1,2 +1,2 @@ # Dolibarr language file - Source file is en_US - products -CustomCode=Customs / Commodity / HS code +AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/en_CA/withdrawals.lang b/htdocs/langs/en_CA/withdrawals.lang new file mode 100644 index 00000000000..facdefc082f --- /dev/null +++ b/htdocs/langs/en_CA/withdrawals.lang @@ -0,0 +1,2 @@ +# 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 9a42aff0270..d759a22f0c6 100644 --- a/htdocs/langs/en_GB/accountancy.lang +++ b/htdocs/langs/en_GB/accountancy.lang @@ -49,6 +49,7 @@ 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) @@ -61,10 +62,8 @@ ACCOUNTING_SERVICE_BUY_ACCOUNT=Default services purchase account (used if not de ACCOUNTING_SERVICE_SOLD_ACCOUNT=Default services sales account (used if not defined in the service sheet) LabelAccount=Account name LabelOperation=Account operation -Sens=Meaning NumPiece=Item number AccountingCategory=Personalised groups -GroupByAccountAccounting=Group by finance account 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 11a52c3a368..6d8b2831bb3 100644 --- a/htdocs/langs/en_GB/admin.lang +++ b/htdocs/langs/en_GB/admin.lang @@ -42,9 +42,11 @@ 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 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/mrp.lang b/htdocs/langs/en_GB/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/en_GB/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/en_GB/products.lang b/htdocs/langs/en_GB/products.lang index 844ae30d7c1..757f0c2e880 100644 --- a/htdocs/langs/en_GB/products.lang +++ b/htdocs/langs/en_GB/products.lang @@ -1,3 +1,3 @@ # Dolibarr language file - Source file is en_US - products -CustomCode=Customs / Commodity / HS code +AssociatedProductsAbility=Enable Kits (set of several products) PrintsheetForOneBarCode=Print several labels for one barcode diff --git a/htdocs/langs/en_GB/sendings.lang b/htdocs/langs/en_GB/sendings.lang index ed103dc3a4b..61058b10825 100644 --- a/htdocs/langs/en_GB/sendings.lang +++ b/htdocs/langs/en_GB/sendings.lang @@ -1,2 +1,3 @@ # Dolibarr language file - Source file is en_US - sendings StatusSendingCanceled=Cancelled +StatusSendingCanceledShort=Cancelled diff --git a/htdocs/langs/en_GB/withdrawals.lang b/htdocs/langs/en_GB/withdrawals.lang index b1d58194878..3ec4f7ab0ec 100644 --- a/htdocs/langs/en_GB/withdrawals.lang +++ b/htdocs/langs/en_GB/withdrawals.lang @@ -13,4 +13,5 @@ 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 new file mode 100644 index 00000000000..552865118f1 --- /dev/null +++ b/htdocs/langs/en_IN/accountancy.lang @@ -0,0 +1,2 @@ +# 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 4b3c42b80b1..cf746fd99b8 100644 --- a/htdocs/langs/en_IN/admin.lang +++ b/htdocs/langs/en_IN/admin.lang @@ -1,6 +1,7 @@ # 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 @@ -13,6 +14,7 @@ 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/mrp.lang b/htdocs/langs/en_IN/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/en_IN/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/en_IN/products.lang b/htdocs/langs/en_IN/products.lang index 6e900475275..2a38b9b0181 100644 --- a/htdocs/langs/en_IN/products.lang +++ b/htdocs/langs/en_IN/products.lang @@ -1,2 +1,2 @@ # Dolibarr language file - Source file is en_US - products -CustomCode=Customs / Commodity / HS code +AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/en_IN/withdrawals.lang b/htdocs/langs/en_IN/withdrawals.lang new file mode 100644 index 00000000000..facdefc082f --- /dev/null +++ b/htdocs/langs/en_IN/withdrawals.lang @@ -0,0 +1,2 @@ +# 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 new file mode 100644 index 00000000000..552865118f1 --- /dev/null +++ b/htdocs/langs/en_SG/accountancy.lang @@ -0,0 +1,2 @@ +# 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 c1d306ec390..b68a0680537 100644 --- a/htdocs/langs/en_SG/admin.lang +++ b/htdocs/langs/en_SG/admin.lang @@ -1,3 +1,5 @@ # 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) 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/compta.lang b/htdocs/langs/en_SG/compta.lang deleted file mode 100644 index c7c41488180..00000000000 --- a/htdocs/langs/en_SG/compta.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - compta -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account diff --git a/htdocs/langs/en_SG/mrp.lang b/htdocs/langs/en_SG/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/en_SG/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/en_SG/products.lang b/htdocs/langs/en_SG/products.lang index 6e900475275..2a38b9b0181 100644 --- a/htdocs/langs/en_SG/products.lang +++ b/htdocs/langs/en_SG/products.lang @@ -1,2 +1,2 @@ # Dolibarr language file - Source file is en_US - products -CustomCode=Customs / Commodity / HS code +AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/en_SG/withdrawals.lang b/htdocs/langs/en_SG/withdrawals.lang new file mode 100644 index 00000000000..facdefc082f --- /dev/null +++ b/htdocs/langs/en_SG/withdrawals.lang @@ -0,0 +1,2 @@ +# 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 d4233dc4d82..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 @@ -207,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. @@ -251,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -274,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -398,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 6b05b594711..b103d0082ba 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> @@ -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 @@ -670,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 @@ -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) @@ -1308,7 +1318,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -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 @@ -1598,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 @@ -1731,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 @@ -1874,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 @@ -1961,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) @@ -1977,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 @@ -1989,8 +2007,8 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2044,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 @@ -2069,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 @@ -2084,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 \ No newline at end of file +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 \ No newline at end of file diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang index 8971e80a8f8..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 @@ -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=Document templates for event DateActionStart=Start date @@ -130,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/assets.lang b/htdocs/langs/en_US/assets.lang index ef04723c6c2..afafc98503f 100644 --- a/htdocs/langs/en_US/assets.lang +++ b/htdocs/langs/en_US/assets.lang @@ -61,5 +61,7 @@ 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/en_US/banks.lang b/htdocs/langs/en_US/banks.lang index a0dc27f86c4..8e2d828c12a 100644 --- a/htdocs/langs/en_US/banks.lang +++ b/htdocs/langs/en_US/banks.lang @@ -174,9 +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/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 b8ba5073d03..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 @@ -95,8 +100,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -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 8e529fe92f2..a24109fa3d0 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -56,7 +56,8 @@ Paymentnumpad=Type of Pad to enter payment Numberspad=Numbers Pad BillsCoinsPad=Coins and banknotes Pad DolistorePosCategory=TakePOS modules and other POS solutions for Dolibarr -TakeposNeedsCategories=TakePOS needs product categories to work +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 @@ -99,7 +100,8 @@ 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 -ControlCashOpening=Control cash desk at opening POS +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 @@ -122,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 99bed13179f..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 @@ -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/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index 18ee01eb3bb..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,13 +138,21 @@ 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>. -CalcModeDebt=Analysis of known recorded invoices even if they are not yet accounted in ledger. +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> @@ -154,15 +166,16 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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> @@ -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/dict.lang b/htdocs/langs/en_US/dict.lang index ec315d97142..0524cf1ca18 100644 --- a/htdocs/langs/en_US/dict.lang +++ b/htdocs/langs/en_US/dict.lang @@ -21,7 +21,7 @@ CountryNL=Netherlands CountryHU=Hungary CountryRU=Russia CountrySE=Sweden -CountryCI=Ivoiry Coast +CountryCI=Ivory Coast CountrySN=Senegal CountryAR=Argentina CountryCM=Cameroon diff --git a/htdocs/langs/en_US/donations.lang b/htdocs/langs/en_US/donations.lang index de4bdf68f03..d512abb2eea 100644 --- a/htdocs/langs/en_US/donations.lang +++ b/htdocs/langs/en_US/donations.lang @@ -32,3 +32,4 @@ 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/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 5634905da6e..002aa63fa62 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/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. @@ -286,4 +292,7 @@ WarningSomeBankTransactionByChequeWereRemovedAfter=Some bank transaction were re 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. \ No newline at end of file +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/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 7075df90783..dc2a83f2015 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -224,6 +224,7 @@ Value=Value PersonalValue=Personal value NewObject=New %s NewValue=New value +OldValue=Old value %s CurrentValue=Current value Code=Code Type=Type @@ -277,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 @@ -360,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 @@ -388,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 @@ -655,6 +659,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 @@ -722,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 @@ -897,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 @@ -1011,6 +1018,7 @@ SearchIntoContacts=Contacts SearchIntoMembers=Members SearchIntoUsers=Users SearchIntoProductsOrServices=Products or services +SearchIntoBatch=Lots / Serials SearchIntoProjects=Projects SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks @@ -1047,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 @@ -1112,4 +1121,11 @@ UpToDate=Up-to-date OutOfDate=Out-of-date EventReminder=Event Reminder UpdateForAllLines=Update for all lines -OnHold=On hold \ No newline at end of file +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/margins.lang b/htdocs/langs/en_US/margins.lang index 76ea8ad5c4d..ad5406409b4 100644 --- a/htdocs/langs/en_US/margins.lang +++ b/htdocs/langs/en_US/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/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 6f8fdcad996..19afb9d95ab 100644 --- a/htdocs/langs/en_US/modulebuilder.lang +++ b/htdocs/langs/en_US/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -132,10 +133,13 @@ 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) AsciiToHtmlConverter=Ascii to HTML converter AsciiToPdfConverter=Ascii to PDF converter -TableNotEmptyDropCanceled=Table not empty. Drop has been canceled. \ No newline at end of file +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/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang index 902f167d819..fceeb1a15f1 100644 --- a/htdocs/langs/en_US/mrp.lang +++ b/htdocs/langs/en_US/mrp.lang @@ -8,11 +8,11 @@ MenuBOM=Bills of material LatestBOMModified=Latest %s Bills of materials modified LatestMOModified=Latest %s Manufacturing Orders modified Bom=Bills of Material -BillOfMaterials=Bill of Material +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 material +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 @@ -22,7 +22,7 @@ FreeLegalTextOnBOMs=Free text on document of BOM WatermarkOnDraftBOMs=Watermark on draft BOM FreeLegalTextOnMOs=Free text on document of MO WatermarkOnDraftMOs=Watermark on draft MO -ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +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 @@ -30,8 +30,8 @@ ValueOfMeansLoss=Value of 0.95 means an average of 5%% of loss during the produc ValueOfMeansLossForProductProduced=Value of 0.95 means an average of 5%% of loss of produced product DeleteBillOfMaterials=Delete Bill Of Materials DeleteMo=Delete Manufacturing Order -ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? -ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? +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 @@ -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..4414b6ad8d8 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 +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/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 f5f6bf3dd9d..d14e52d14e8 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -85,9 +85,11 @@ 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 @@ -266,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/supplier_proposal.lang b/htdocs/langs/en_US/supplier_proposal.lang index ca75eddb7df..a68319fb2df 100644 --- a/htdocs/langs/en_US/supplier_proposal.lang +++ b/htdocs/langs/en_US/supplier_proposal.lang @@ -53,3 +53,6 @@ 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/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..727773a9606 100644 --- a/htdocs/langs/en_US/users.lang +++ b/htdocs/langs/en_US/users.lang @@ -72,7 +72,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 diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index 7793fa5dead..7e0f057e253 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 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 553e3ac0eaa..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,8 +42,10 @@ 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 @@ -131,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 @@ -145,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 96c58aaf400..ab876d97846 100644 --- a/htdocs/langs/es_AR/accountancy.lang +++ b/htdocs/langs/es_AR/accountancy.lang @@ -16,3 +16,4 @@ 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 6b938db0388..38c1f9272dd 100644 --- a/htdocs/langs/es_AR/admin.lang +++ b/htdocs/langs/es_AR/admin.lang @@ -61,7 +61,6 @@ AllowToSelectProjectFromOtherCompany=En el documento de un tercero, puede elegir JavascriptDisabled=JavaScript desactivado UsePreviewTabs=Usar pestañas de vista previa ShowPreview=Mostrar vista previa -CurrentTimeZone=TimeZone PHP (servidor) MySQLTimeZone=TimeZone MySql (base de datos) TZHasNoEffect=Las fechas son almacenadas y devueltas por el servidor de base de datos como si se mantuvieran como una cadena enviada. La zona horaria solo tiene efecto cuando se usa la función UNIX_TIMESTAMP (que Dolibarr no debe usar, por lo que la base de datos TZ no debería tener ningún efecto, incluso si se cambia después de ingresar los datos). Space=Espacio @@ -112,8 +111,6 @@ SystemToolsArea=Área de herramientas del sistema SystemToolsAreaDesc=Esta área proporciona funciones de administración. Utilice el menú para elegir la función requerida. PurgeAreaDesc=Esta página le permite eliminar todos los archivos generados o almacenados por Dolibarr (archivos temporales o todos los archivos en el directorio <b> %s </b>). Usando esta característica normalmente no es necesario. Se proporciona como una solución para los usuarios cuyo Dolibarr está alojado por un proveedor que no ofrece permisos para eliminar archivos generados por el servidor web. PurgeDeleteLogFile=Elimine los archivos de registro, incluido el <b> %s </b> definido para el módulo Syslog (sin riesgo de perder datos) -PurgeDeleteTemporaryFiles=Eliminar todos los archivos temporales (no hay risgo de perder información), Nota: La eliminación se realizará sólo si la carpeta temporal sólo fue creada hace 24 horas. -PurgeDeleteTemporaryFilesShort=Borrar archivos temporales PurgeDeleteAllFilesInDocumentsDir=Elimine todos los archivos en el directorio: <b> %s </b>. <br> Esto eliminará todos los documentos generados relacionados con elementos (terceros, facturas, etc.), archivos cargados en el módulo ECM, volcados de copia de seguridad de la base de datos y archivos temporales. archivos. PurgeRunNow=Purga ahora PurgeNothingToDelete=No hay directorio o archivos para eliminar. @@ -254,7 +251,6 @@ LastActivationIP=IP de última activación UpdateServerOffline=Actualizar servidor fuera de línea WithCounter=Administrar un contador AddCRIfTooLong=No hay ajuste de texto automático. El texto que es demasiado largo no será mostrado en el documento. Por favor agregar saltos de línea en el área de texto si es necesario. -ExampleOfDirectoriesForModelGen=Ejemplo de sintaxis:<br>c:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir String=Cuerda Module30Name=Facturas Module40Desc=Gestión de proveedores y compras (órdenes de compra y facturas de proveedores) @@ -264,6 +260,7 @@ 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 @@ -527,7 +524,7 @@ 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=Mostrar descripciones de productos en el lenguaje del tercero +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 diff --git a/htdocs/langs/es_AR/blockedlog.lang b/htdocs/langs/es_AR/blockedlog.lang index 5b0a4d9d1b5..080e82c85c5 100644 --- a/htdocs/langs/es_AR/blockedlog.lang +++ b/htdocs/langs/es_AR/blockedlog.lang @@ -24,7 +24,6 @@ logBILL_SENTBYMAIL=Factura de cliente enviada por corre logBILL_DELETE=Borrado lógico de una factura de cliente logDON_DELETE=Borrado lógico de una donación logMEMBER_SUBSCRIPTION_DELETE=Borrado lógico de una suscripción de miembro -logCASHCONTROL_VALIDATE=Registro de flujo de efectivo ListOfTrackedEvents=Lista de eventos rastreados logDOC_DOWNLOAD=Descarga de un documento validado para imprimir o enviar DataOfArchivedEvent=Datos completos del evento archivado diff --git a/htdocs/langs/es_AR/boxes.lang b/htdocs/langs/es_AR/boxes.lang index a76803696e3..398b7e343ee 100644 --- a/htdocs/langs/es_AR/boxes.lang +++ b/htdocs/langs/es_AR/boxes.lang @@ -62,7 +62,6 @@ ForCustomersOrders=Órdenes de Clientes LastXMonthRolling=Los últimos %s meses consecutivo s ChooseBoxToAdd=Agregar widget a su dashboard BoxAdded=El widget fue agregado a su tablero -BoxLastManualEntries=Últimas entradas contables NoRecordedManualEntries=No hay registros contables manuales BoxSuspenseAccount=Operación de cuenta contable con cuenta temporal BoxTitleSuspenseAccount=Número de líneas no sin asignar diff --git a/htdocs/langs/es_AR/companies.lang b/htdocs/langs/es_AR/companies.lang index 5e7e576b77f..3dd71f9bcdc 100644 --- a/htdocs/langs/es_AR/companies.lang +++ b/htdocs/langs/es_AR/companies.lang @@ -209,7 +209,6 @@ VATIntraCheckableOnEUSite=Consulte el ID de IVA intracomunitario en el sitio web VATIntraManualCheck=También puedes consultar manualmente en el sitio web de la Comisión Europea <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=No es posible comprobar. El servicio de verificación no lo proporciona el estado del miembro (%s). NorProspectNorCustomer=Ni cliente ni cliente potencial -JuridicalStatus=Tipo de entidad legal ProspectLevel=Cliente potencia OthersNotLinkedToThirdParty=Otros, no vinculados a un tercero ProspectStatus=Estado del cliente potencial diff --git a/htdocs/langs/es_AR/cron.lang b/htdocs/langs/es_AR/cron.lang index f3f72b8cb2f..e9709b188f5 100644 --- a/htdocs/langs/es_AR/cron.lang +++ b/htdocs/langs/es_AR/cron.lang @@ -4,8 +4,6 @@ Permission23102 =Crear/actualizar tarea programada Permission23103 =Eliminar tarea programada Permission23104 =Ejecutar tarea programada CronSetup=Configuración para administración de tareas programadas -URLToLaunchCronJobs=URL para verificar y ejecutar tareas programadas calificadas -OrToLaunchASpecificJob=O para verificar y ejecutar una tarea específica KeyForCronAccess=Clave de seguridad para la URL para ejecutar tareas programadas FileToLaunchCronJobs=Línea de comandos para verificar y ejecutar tareas programadas calificadas CronExplainHowToRunUnix=O el ambiente de Unix que deberías utilizar para una entrada programada para ejecutar el comando cada 5 minutos @@ -37,7 +35,6 @@ CronNote=Comentar CronFieldMandatory=Los campos %s son obligatorios CronErrEndDateStartDt=La fecha de finalización no puede ser anterior a la fecha de inicio StatusAtInstall=Estado de la instalación del módulo -CronStatusActiveBtn=Habilitar CronStatusInactiveBtn=Deshabilitar CronTaskInactive=Esta tarea está deshabilitada CronClassFile=Nombre de archivo y clase diff --git a/htdocs/langs/es_AR/mails.lang b/htdocs/langs/es_AR/mails.lang index 02b4225c64c..13fbbbe92c7 100644 --- a/htdocs/langs/es_AR/mails.lang +++ b/htdocs/langs/es_AR/mails.lang @@ -99,12 +99,6 @@ TagSignature=Firma del emisor EMailRecipient=Correo del destinatario TagMailtoEmail=Correo del destinatario (incluyendo el enlace htm "mailto:") NoEmailSentBadSenderOrRecipientEmail=No se han enviado correos. El correo del emisor o destinatario están incorrectos. Verifique el perfil del usuario. -NoNotificationsWillBeSent=No se han planificado notificaciones por correo para este evento y compañía -ANotificationsWillBeSent=1 notificación werá enviada por correo -SomeNotificationsWillBeSent=%s notificaciones serán enviadas por correo -AddNewNotification=Activar una nueva notificación por mail para ese objetivo/evento -ListOfActiveNotifications=Listar todos los objetivos/eventos activos para la notificación por correo -ListOfNotificationsDone=Listar todas las notificaciones enviadas por correo MailSendSetupIs=La configuración de envío de correo ha sido establecida a '%s'. Este modo no puede ser utilizado para envío masivo de correos. MailSendSetupIs2=Debes dirigirte primero, utilizando una cuenta de administrador, al menú %s Inicio - Configuración - Correos%s para cambiar el parámetro <strong>'%s'</strong> para utilizar el modo '%s'. Con este modo, podrás entrar en la configuración del servidor SMTP provisto por tu proveedor de internet y utilizar la funcionalidad de envío masivo de correos. MailSendSetupIs3=Si tienes alguna consulta acerca de cómo configurar tu servidor SMTP, puedes preguntarle a %s. @@ -113,7 +107,6 @@ NbOfTargetedContacts=Cantidad de contactos de correo objetivo UseFormatFileEmailToTarget=El archivo importado debe tener el formato <strong>correo;nombre;primer nombre;otro</strong> UseFormatInputEmailToTarget=Ingrese una cadena con el formato <strong>correo;nombre;primer nombre;otro</strong> AdvTgtTitle=Complete los campos para agregar los terceros o contactos/direcciones de correo al objetivo -AdvTgtSearchTextHelp=Utilice %% como comodines. Por ejemplo para encontrar todos los item como <b>jean, joe, jim</b>, puedes ingresar <b>j%%</b>, también puedes usar ; como separador de valores, y usar ! para exceptuarlo. Por ejemplo <b>jean;joe;jim%%;!jimo;!jima%</b> para ubicar a todos los jean, joe, comenzando con jim pero no jimo ni nada que comience con jima AdvTgtSearchIntHelp=Utilice el intervalo para seleccionar entero o valor decimal AdvTgtMaxVal=Valor máximo AdvTgtSearchDtHelp=Utilice intervalos para seleccionar el valor de fecha @@ -128,7 +121,4 @@ AdvTgtAddContact=Agregar correos acorde al criterio AdvTgtOrCreateNewFilter=Nombre del filtro nuevo NoContactWithCategoryFound=No se encontraron contactos/direcciones con la categoría buscada NoContactLinkedToThirdpartieWithCategoryFound=No se encontraron contactos/direcciones con la categoría buscada -OutGoingEmailSetup=Configuración de correo saliente -InGoingEmailSetup=Configuración de correo entrante -DefaultOutgoingEmailSetup=Configuración de correo saliente por defecto ContactsWithThirdpartyFilter=Contactos con filtro de terceros diff --git a/htdocs/langs/es_AR/mrp.lang b/htdocs/langs/es_AR/mrp.lang index 0fcf28a866f..5c5780af355 100644 --- a/htdocs/langs/es_AR/mrp.lang +++ b/htdocs/langs/es_AR/mrp.lang @@ -13,4 +13,7 @@ BOMsSetup=Configuración de módulo de BOM ListOfBOMs=Lista de Listas de materiales - BOM ListOfManufacturingOrders=Lista de Ordenes de Fabricación NewBOM=Nueva Lista de materiales +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? MenuMRP=Ordenes de Fabricación diff --git a/htdocs/langs/es_AR/products.lang b/htdocs/langs/es_AR/products.lang index 1b8705686ca..32aef2d5d67 100644 --- a/htdocs/langs/es_AR/products.lang +++ b/htdocs/langs/es_AR/products.lang @@ -63,6 +63,7 @@ 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 @@ -73,4 +74,3 @@ PriceQtyMin=Precio para cantidad mín. PriceQtyMinCurrency=Precio (moneda) para esta cant. (sin descuento) PredefinedProductsToSell=Producto Predefinido SuppliersPrices=Precio de Proveedor -CustomCode=Customs / Commodity / HS code diff --git a/htdocs/langs/es_AR/sendings.lang b/htdocs/langs/es_AR/sendings.lang index 0fab9dbcf71..d573200cc64 100644 --- a/htdocs/langs/es_AR/sendings.lang +++ b/htdocs/langs/es_AR/sendings.lang @@ -1,48 +1,41 @@ # Dolibarr language file - Source file is en_US - sendings -RefSending=Ref. viaje -Sending=Viaje -Sendings=Viajes -AllSendings=Todos los viajes -Shipment=Viaje -Shipments=Viajes -ShowSending=Mostrar viajes +AllSendings=Todos los Envíos +ShowSending=Mostrar Envíos Receivings=Comprobantes de entrega SendingsArea=Área de envíos -ListOfSendings=Lista de viajes -LastSendings=Últimos %s viajes -NbOfSendings=Cantidad de viajes -NumberOfShipmentsByMonth=Cantidad de viajes por mes -SendingCard=Ficha del viaje -NewSending=Nuevo viaje -CreateShipment=Crear viaje +ListOfSendings=Lista de envíos +NbOfSendings=Cantidad de envíos +NumberOfShipmentsByMonth=Cantidad de envíos por mes +SendingCard=Ficha del envío QtyShipped=Cantidad enviada QtyShippedShort=Cantidad enviada QtyPreparedOrShipped=Cantidad preparada o enviada QtyToShip=Cantidad para enviar QtyToReceive=Cantidad para recibir QtyReceived=Cantidad recibida -QtyInOtherShipments=Cantidad en otros viajes +QtyInOtherShipments=Cantidad en otros envíos KeepToShip=Pendiente de enviar -OtherSendingsForSameOrder=Otros viajes para esta orden +OtherSendingsForSameOrder=Otros envíos para este pedido SendingsAndReceivingForSameOrder=Viajes y recepciones de esta orden -SendingsToValidate=Viajes para validar +SendingsToValidate=Envíos para validar StatusSendingCanceled=Cancelado +StatusSendingCanceledShort=Cancelada StatusSendingValidated=Validado (productos para enviar o ya enviados) -SendingSheet=Hoja de viaje -ConfirmDeleteSending=¿Estás seguro que quieres eliminar este viaje? -ConfirmValidateSending=¿Estás seguro que quieres validar este viaje con referencia <b>%s</b>? -ConfirmCancelSending=¿Estás seguro que quieres cancelar este viaje? +SendingSheet=Remito +ConfirmDeleteSending=¿Estás seguro que quieres eliminar este envío? +ConfirmValidateSending=¿Estás seguro que quiere validar este envío con referencia <b>%s</b>? +ConfirmCancelSending=¿Estás seguro que quieres cancelar este envío? WarningNoQtyLeftToSend=Advertencia, no hay productos esperando para ser enviados. StatsOnShipmentsOnlyValidated=Estadísticas realizadas sólo sobre viajes validados. La fecha utilizada es la de validación del viaje (la fecha de entrega prevista no siempre se conoce). RefDeliveryReceipt=Ref. comprobante de entrega StatusReceipt=Estado del comprobante de entrega DateReceived=Fecha de entrega -SendShippingByEMail=Enviar detalles del viaje por correo +SendShippingByEMail=Enviar detalles del envío por correo SendShippingRef=Enviar el viaje %s ActionsOnShipping=Eventos del viaje LinkToTrackYourPackage=Vínculo al seguimiento del envío ShipmentCreationIsDoneFromOrder=Por el momento, la creación de un nuevo viaje se realiza desde la ficha de la orden. -ShipmentLine=Línea del viaje +ShipmentLine=Línea del envío ProductQtyInCustomersOrdersRunning=Cantidad de productos de órdenes de venta abiertas ProductQtyInSuppliersOrdersRunning=Cantidad de productos de órdenes de compra abiertas ProductQtyInShipmentAlreadySent=Cantidad de productos enviados de órdenes de venta abiertas diff --git a/htdocs/langs/es_AR/ticket.lang b/htdocs/langs/es_AR/ticket.lang index 20fc88f15a7..c608fa6569c 100644 --- a/htdocs/langs/es_AR/ticket.lang +++ b/htdocs/langs/es_AR/ticket.lang @@ -1,6 +1,5 @@ # Dolibarr language file - Source file is en_US - ticket TicketTypeShortPROJET=Projecto -NotRead=Sin leer Read=Leído Waiting=Esperando Type=Tipo diff --git a/htdocs/langs/es_AR/withdrawals.lang b/htdocs/langs/es_AR/withdrawals.lang index 7c806c8b5f3..5e623914282 100644 --- a/htdocs/langs/es_AR/withdrawals.lang +++ b/htdocs/langs/es_AR/withdrawals.lang @@ -76,7 +76,7 @@ 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=Identificador CI de acreedor +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_BO/accountancy.lang b/htdocs/langs/es_BO/accountancy.lang new file mode 100644 index 00000000000..552865118f1 --- /dev/null +++ b/htdocs/langs/es_BO/accountancy.lang @@ -0,0 +1,2 @@ +# 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 c1d306ec390..b68a0680537 100644 --- a/htdocs/langs/es_BO/admin.lang +++ b/htdocs/langs/es_BO/admin.lang @@ -1,3 +1,5 @@ # 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) 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/compta.lang b/htdocs/langs/es_BO/compta.lang deleted file mode 100644 index c7c41488180..00000000000 --- a/htdocs/langs/es_BO/compta.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - compta -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account diff --git a/htdocs/langs/es_BO/mrp.lang b/htdocs/langs/es_BO/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/es_BO/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/es_BO/products.lang b/htdocs/langs/es_BO/products.lang index 6e900475275..2a38b9b0181 100644 --- a/htdocs/langs/es_BO/products.lang +++ b/htdocs/langs/es_BO/products.lang @@ -1,2 +1,2 @@ # Dolibarr language file - Source file is en_US - products -CustomCode=Customs / Commodity / HS code +AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/es_BO/withdrawals.lang b/htdocs/langs/es_BO/withdrawals.lang new file mode 100644 index 00000000000..facdefc082f --- /dev/null +++ b/htdocs/langs/es_BO/withdrawals.lang @@ -0,0 +1,2 @@ +# 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 764defc64a4..cdb95b2da16 100644 --- a/htdocs/langs/es_CL/accountancy.lang +++ b/htdocs/langs/es_CL/accountancy.lang @@ -92,7 +92,7 @@ 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=Número de elementos a enlazar mostrados por página (máximo recomendado: 50) +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) @@ -122,7 +122,6 @@ ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT=Cuenta contable por defecto para los servi ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT=Cuenta contable por defecto para los servicios vendidos y exportados fuera de la EEC (usado si no está definido en la hoja de servicios) LabelAccount=Cuenta LabelOperation=Operación de etiqueta -Sens=Significado LetteringCode=Codigo de letras JournalLabel=Etiqueta de revista NumPiece=Pieza número diff --git a/htdocs/langs/es_CL/admin.lang b/htdocs/langs/es_CL/admin.lang index 71fb8fe9887..4c3bf933e4f 100644 --- a/htdocs/langs/es_CL/admin.lang +++ b/htdocs/langs/es_CL/admin.lang @@ -60,7 +60,6 @@ AllowToSelectProjectFromOtherCompany=En el documento de un tercero, puede elegir JavascriptDisabled=JavaScript deshabilitado UsePreviewTabs=Usa pestañas de vista previa ShowPreview=Mostrar vista previa -CurrentTimeZone=TimeZone PHP (servidor) MySQLTimeZone=TimeZone MySql (base de datos) TZHasNoEffect=Las fechas son almacenadas y devueltas por el servidor de bases de datos como si se mantuvieran como una cadena enviada. La zona horaria tiene efecto solo cuando se usa la función UNIX_TIMESTAMP (que no debe ser utilizada por Dolibarr, por lo que la base de datos TZ no debería tener ningún efecto, incluso si se cambia después de ingresar los datos). Space=Espacio @@ -290,7 +289,6 @@ 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=Ocultar botones para usuarios no administradores para acciones no autorizadas en lugar de mostrar botones deshabilitados en gris OldVATRates=Tasa de IVA anterior NewVATRates=Nueva tasa de IVA PriceBaseTypeToChange=Modificar en precios con el valor de referencia base definido en @@ -457,7 +455,7 @@ 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=Módulo para administrar márgenes +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. @@ -885,7 +883,6 @@ ConditionIsCurrently=La condición es actualmente %s YouUseBestDriver=Utiliza el controlador %s, que es el mejor controlador disponible en la actualidad. YouDoNotUseBestDriver=Utiliza el controlador %s, pero se recomienda el controlador %s. SearchOptim=Optimización de búsqueda -YouHaveXObjectUseSearchOptim=Tiene %s %s en la base de datos. Debe agregar la constante %s a 1 en Home-Setup-Other. Limite la búsqueda al comienzo de las cadenas, lo que hace posible que la base de datos use índices y debería obtener una respuesta inmediata. YouHaveXObjectAndSearchOptimOn=Tiene %s %s en la base de datos y la constante %s se establece en 1 en Home-Setup-Other. BrowserIsOK=Está utilizando el navegador web %s. Este navegador está bien para la seguridad y el rendimiento. BrowserIsKO=Está utilizando el navegador web %s. Se sabe que este navegador es una mala elección para la seguridad, el rendimiento y la confiabilidad. Recomendamos usar Firefox, Chrome, Opera o Safari. @@ -1088,7 +1085,7 @@ 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=Mostrar descripciones de los productos en el idioma del tercero. +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 @@ -1153,7 +1150,6 @@ MenuDeleted=Menú borrado NotTopTreeMenuPersonalized=Menús personalizados no vinculados a una entrada del menú superior MenuHandler=Controlador de menú MenuModule=Módulo fuente -HideUnauthorizedMenu=Ocultar menús no autorizados (gris) DetailId=Menú Id DetailMenuHandler=Manejador de menú donde mostrar el nuevo menú DetailMenuModule=Nombre del módulo si la entrada del menú proviene de un módulo @@ -1365,8 +1361,6 @@ EMailHost=Host del servidor de correo electrónico IMAP EmailcollectorOperations=Operaciones a realizar por coleccionista. MaxEmailCollectPerCollect=Número máximo de correos electrónicos recogidos por cobro ConfirmCloneEmailCollector=¿Está seguro de que desea clonar el recopilador de correo electrónico %s? -DateLastCollectResult=Fecha de última recopilación probada -DateLastcollectResultOk=Fecha última recogida exitosa EmailCollectorConfirmCollectTitle=Correo electrónico recoger confirmación EmailCollectorConfirmCollect=¿Quieres ejecutar la colección para este coleccionista ahora? NoNewEmailToProcess=No hay correo electrónico nuevo (filtros coincidentes) para procesar diff --git a/htdocs/langs/es_CL/banks.lang b/htdocs/langs/es_CL/banks.lang index 851975f9121..5c4a24c2f6d 100644 --- a/htdocs/langs/es_CL/banks.lang +++ b/htdocs/langs/es_CL/banks.lang @@ -125,6 +125,4 @@ SEPAMandate=Mandato de la SEPA YourSEPAMandate=Su mandato de SEPA FindYourSEPAMandate=Este es su mandato de SEPA para autorizar a nuestra empresa a realizar un pedido de débito directo a su banco. Devuélvalo firmado (escaneo del documento firmado) o envíelo por correo a AutoReportLastAccountStatement=Rellene automáticamente el campo &#39;número de extracto bancario&#39; con el último número de extracto al realizar la conciliación -CashControl=Cerca de efectivo POS -NewCashFence=Nueva valla de efectivo BankColorizeMovementDesc=Si esta función está habilitada, puede elegir un color de fondo específico para los movimientos de débito o crédito diff --git a/htdocs/langs/es_CL/blockedlog.lang b/htdocs/langs/es_CL/blockedlog.lang index 49d3348ac1a..c97c5e815d6 100644 --- a/htdocs/langs/es_CL/blockedlog.lang +++ b/htdocs/langs/es_CL/blockedlog.lang @@ -10,7 +10,6 @@ logBILL_UNPAYED=Factura del cliente fijada sin pagar logBILL_VALIDATE=Factura del cliente validada logBILL_SENTBYMAIL=Factura del cliente enviar por correo logMEMBER_SUBSCRIPTION_DELETE=Suscripción de miembros de eliminación lógica -logCASHCONTROL_VALIDATE=Grabación de la cerca de efectivo ListOfTrackedEvents=Lista de eventos rastreados logDOC_PREVIEW=Vista previa de un documento validado para imprimir o descargar. ImpossibleToReloadObject=Objeto original (escriba %s, id %s) no vinculado (consulte la columna &#39;Datos completos&#39; para obtener datos guardados inalterables) diff --git a/htdocs/langs/es_CL/boxes.lang b/htdocs/langs/es_CL/boxes.lang index e8b72e33d75..f59f9eb19a8 100644 --- a/htdocs/langs/es_CL/boxes.lang +++ b/htdocs/langs/es_CL/boxes.lang @@ -31,6 +31,7 @@ BoxTitleLatestModifiedBoms=Ultimas %s Listas de Materiales modificadas BoxTitleLatestModifiedMos=Últimas %s Ordenes de Fabricación modificadas BoxGlobalActivity=Actividad global (facturas, propuestas, pedidos) BoxTitleGoodCustomers=%s Buenos clientes +BoxScheduledJobs=Trabajos programados FailedToRefreshDataInfoNotUpToDate=Error al actualizar el flujo de RSS. Última fecha de actualización correcta: %s LastRefreshDate=Última fecha de actualización NoRecordedBookmarks=No hay marcadores definidos diff --git a/htdocs/langs/es_CL/cashdesk.lang b/htdocs/langs/es_CL/cashdesk.lang index 2d9ac0386f3..c81210b6a0b 100644 --- a/htdocs/langs/es_CL/cashdesk.lang +++ b/htdocs/langs/es_CL/cashdesk.lang @@ -30,7 +30,6 @@ Header=Encabezamiento Footer=Pie de página TheoricalAmount=Cantidad teórica RealAmount=Cantidad real -CashFenceDone=Cerca de efectivo hecha para el período. NbOfInvoices=N° de facturas OrderNotes=pedidos CashDeskBankAccountFor=Cuenta predeterminada para usar para pagos en diff --git a/htdocs/langs/es_CL/categories.lang b/htdocs/langs/es_CL/categories.lang index e6f54ab9caa..8a54c49822d 100644 --- a/htdocs/langs/es_CL/categories.lang +++ b/htdocs/langs/es_CL/categories.lang @@ -58,15 +58,10 @@ ProjectsCategoriesShort=Etiquetas / categorías de proyectos UsersCategoriesShort=Etiquetas / categorías de usuarios StockCategoriesShort=Etiquetas / categorías de almacén CategId=ID de etiqueta / categoría -CatSupList=Lista de etiquetas / categorías de proveedores -CatCusList=Lista de etiquetas / categorías de clientes / prospectos CatProdList=Lista de etiquetas / categorías de productos CatMemberList=Lista de etiquetas / categorías de miembros -CatContactList=Lista de etiquetas / categorías de contacto -CatSupLinks=Enlaces entre proveedores y etiquetas / categorías CatCusLinks=Enlaces entre clientes / prospectos y etiquetas / categorías CatProdLinks=Enlaces entre productos / servicios y etiquetas / categorías -CatProJectLinks=Enlaces entre proyectos y etiquetas / categorías ExtraFieldsCategories=Atributos complementarios CategoriesSetup=Configuración de etiquetas / categorías CategorieRecursiv=Enlace con la etiqueta / categoría principal automáticamente diff --git a/htdocs/langs/es_CL/companies.lang b/htdocs/langs/es_CL/companies.lang index a1b385f9d95..6b70cfe2d00 100644 --- a/htdocs/langs/es_CL/companies.lang +++ b/htdocs/langs/es_CL/companies.lang @@ -156,7 +156,6 @@ VATIntraCheckableOnEUSite=Compruebe la identificación del IVA intracomunitaria VATIntraManualCheck=También puede consultar manualmente en el sitio web de la Comisión Europea <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=No es posible comprobar. El servicio de verificación no proporcionado por el estado miembro (%s). NorProspectNorCustomer=No prospecto, ni cliente -JuridicalStatus=Tipo de entidad jurídica ProspectLevel=Potencial prospectivo OthersNotLinkedToThirdParty=Otros, no vinculados a un tercero ProspectStatus=Estado de la perspectiva diff --git a/htdocs/langs/es_CL/compta.lang b/htdocs/langs/es_CL/compta.lang index 4a4fb6fe85e..0f7a9f7764c 100644 --- a/htdocs/langs/es_CL/compta.lang +++ b/htdocs/langs/es_CL/compta.lang @@ -91,7 +91,6 @@ NewLocalTaxPayment=Nuevo impuesto %s pago Refund=Reembolso SocialContributionsPayments=Pagos de impuestos sociales/fiscales ShowVatPayment=Mostrar el pago del IVA -BalanceVisibilityDependsOnSortAndFilters=El saldo es visible en esta lista solo si la tabla se ordena de forma ascendente en %s y se filtra para 1 cuenta bancaria CustomerAccountancyCode=Código de contabilidad del cliente SupplierAccountancyCode=Código contable del proveedor CustomerAccountancyCodeShort=Cust. cuenta. código @@ -117,7 +116,6 @@ ConfirmDeleteSocialContribution=¿Estás seguro de que deseas eliminar este pago 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>. -CalcModeDebt=Análisis de facturas registradas conocidas incluso si aún no se contabilizan en el libro mayor. CalcModeEngagement=Análisis de los pagos registrados conocidos, incluso si aún no se contabilizan en el Libro mayor. CalcModeBookkeeping=Análisis de los datos registrados en la tabla de Contabilidad. CalcModeLT1=Modo<b> %sRE en facturas de clientes - facturas de proveedores %s</b> @@ -130,9 +128,6 @@ AnnualSummaryInputOutputMode=Balance de ingresos y gastos, resumen anual AnnualByCompanies=Saldo de ingresos y gastos, por grupos predefinidos de cuenta AnnualByCompaniesDueDebtMode=Saldo de ingresos y gastos, detalle por grupos predefinidos, modo <b>%sReclamaciones-Deudas%s</b> escrito en <b>compromiso contable</b> AnnualByCompaniesInputOutputMode=Balance de ingresos y gastos, detalle por grupos predefinidos, modo <b>%sIngresos-Gastos%s</b> escrito en <b>contabilidad de efectivo</b>. -SeeReportInInputOutputMode=Consulte %sanálisis de pagos%s para obtener un cálculo de los pagos efectuados, incluso si aún no se contabilizaron en el Libro mayor. -SeeReportInDueDebtMode=Consulte %sanálisis de facturas %s para un cálculo basado en facturas registradas conocidas, incluso si aún no se contabilizaron en Libro mayor. -SeeReportInBookkeepingMode=Consulte <b>%sInforme de facturación%s</b> para realizar un cálculo en <b>Tabla Libro mayor contable</b> RulesAmountWithTaxIncluded=- Las cantidades que se muestran son con todos los impuestos incluidos RulesResultInOut=- Incluye los pagos reales realizados en facturas, gastos, IVA y salarios. <br> - Se basa en las fechas de pago de las facturas, gastos, IVA y salarios. La fecha de donación para la donación. RulesCAIn=- Incluye todos los pagos efectivos de las facturas recibidas de los clientes. <br> - Se basa en la fecha de pago de estas facturas. <br> diff --git a/htdocs/langs/es_CL/cron.lang b/htdocs/langs/es_CL/cron.lang index 2e5a82e0aca..cd31d44645c 100644 --- a/htdocs/langs/es_CL/cron.lang +++ b/htdocs/langs/es_CL/cron.lang @@ -4,8 +4,6 @@ Permission23102 =Crear / actualizar trabajo programado Permission23103 =Eliminar trabajo programado Permission23104 =Ejecutar trabajo programado CronSetup=Configuración programada de gestión de trabajos -URLToLaunchCronJobs=URL para verificar e iniciar trabajos cron calificados -OrToLaunchASpecificJob=O para verificar e iniciar un trabajo específico KeyForCronAccess=Clave de seguridad para URL para iniciar trabajos cron FileToLaunchCronJobs=Línea de comando para verificar e iniciar trabajos cron calificados CronExplainHowToRunUnix=En el entorno Unix, debe usar la siguiente entrada crontab para ejecutar la línea de comando cada 5 minutos @@ -40,7 +38,6 @@ CronArgs=Parámetros CronSaveSucess=Guardado exitosamente CronFieldMandatory=Fields %s es obligatorio CronErrEndDateStartDt=La fecha de finalización no puede ser anterior a la fecha de inicio -CronStatusActiveBtn=Habilitar CronStatusInactiveBtn=Inhabilitar CronTaskInactive=Este trabajo está deshabilitado CronId=Carné de identidad diff --git a/htdocs/langs/es_CL/errors.lang b/htdocs/langs/es_CL/errors.lang index f5567607900..5eb96141ab7 100644 --- a/htdocs/langs/es_CL/errors.lang +++ b/htdocs/langs/es_CL/errors.lang @@ -63,7 +63,6 @@ ErrorExportDuplicateProfil=Este nombre de perfil ya existe para este conjunto de ErrorLDAPSetupNotComplete=La coincidencia Dolibarr-LDAP no está completa. ErrorLDAPMakeManualTest=Se ha generado un archivo .ldif en el directorio %s. Intente cargarlo manualmente desde la línea de comando para tener más información sobre los errores. ErrorCantSaveADoneUserWithZeroPercentage=No se puede guardar una acción con &quot;estado no iniciado&quot; si el campo &quot;hecho por&quot; también se llena. -ErrorRefAlreadyExists=La referencia utilizada para la creación ya existe. ErrorPleaseTypeBankTransactionReportName=Ingrese el nombre del extracto bancario donde se debe informar la entrada (Formato AAAAMM o AAAAMMDD) ErrorRecordHasChildren=Error al eliminar el registro ya que tiene algunos registros secundarios. ErrorRecordIsUsedCantDelete=No se puede borrar el registro. Ya está usado o incluido en otro objeto. @@ -177,7 +176,6 @@ ErrorOnlyInvoiceValidatedCanBeSentInMassAction=Solo se pueden enviar facturas va ErrorDiscountLargerThanRemainToPaySplitItBefore=El descuento que intentas aplicar es más grande que el que queda por pagar. Divida el descuento en 2 descuentos más pequeños antes. ErrorFileNotFoundWithSharedLink=Archivo no fue encontrado. Puede ser que la clave compartida se haya modificado o que el archivo se haya eliminado recientemente. ErrorProductBarCodeAlreadyExists=El código de barras del producto %s ya existe en otra referencia del producto. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Tenga en cuenta también que no es posible utilizar productos virtuales para aumentar / disminuir automáticamente subproductos cuando al menos un subproducto (o subproducto de subproductos) necesita un número de serie / lote. ErrorDescRequiredForFreeProductLines=La descripción es obligatoria para líneas con producto gratis ErrorAPageWithThisNameOrAliasAlreadyExists=La página / contenedor <strong>%s</strong> tiene el mismo nombre o alias alternativo que el que intenta utilizar ErrorDuringChartLoad=Error al cargar el cuadro de cuentas. Si algunas cuentas no se cargaron, aún puede ingresarlas manualmente. diff --git a/htdocs/langs/es_CL/mails.lang b/htdocs/langs/es_CL/mails.lang index 381e5510788..a65acf18f23 100644 --- a/htdocs/langs/es_CL/mails.lang +++ b/htdocs/langs/es_CL/mails.lang @@ -98,12 +98,6 @@ TagUnsubscribe=Darse de baja enlace EMailRecipient=Receptor de E-mail TagMailtoEmail=Correo electrónico del destinatario (incluido el enlace html &quot;mailto:&quot;) NoEmailSentBadSenderOrRecipientEmail=Sin correo electrónico enviado Correo electrónico malo del remitente o del destinatario. Verificar el perfil del usuario. -NoNotificationsWillBeSent=No se planean notificaciones por correo electrónico para este evento y compañía -ANotificationsWillBeSent=1 notificación será enviada por correo electrónico -SomeNotificationsWillBeSent=%s notificaciones serán enviadas por correo electrónico -AddNewNotification=Activar un nuevo objetivo / evento de notificación por correo electrónico -ListOfActiveNotifications=Enumerar todos los objetivos / eventos activos para recibir notificaciones por correo electrónico -ListOfNotificationsDone=Enumerar todas las notificaciones de correo electrónico enviadas MailSendSetupIs=La configuración del envío de correo electrónico se ha configurado en '%s'. Este modo no se puede usar para enviar correos masivos. MailSendSetupIs2=Primero debe ir, con una cuenta de administrador, al menú %sHome-Configuración - EMails%s para cambiar el parámetro <strong>'%s'</strong> para usar el modo '%s'. Con este modo, puede ingresar a la configuración del servidor SMTP proporcionado por su Proveedor de servicios de Internet y usar la función de envío masivo de correos electrónicos. MailSendSetupIs3=Si tiene alguna pregunta sobre cómo configurar su servidor SMTP, puede solicitarlo al %s. @@ -112,7 +106,6 @@ NbOfTargetedContacts=Número actual de correos electrónicos de contacto dirigid UseFormatFileEmailToTarget=El archivo importado debe tener formato <strong> correo electrónico; nombre; nombre; otro </ strong> UseFormatInputEmailToTarget=Ingrese una cadena con formato <strong> correo electrónico; nombre; nombre; otro </ strong> AdvTgtTitle=Rellene los campos de entrada para preseleccionar los terceros o contactos / direcciones para orientar -AdvTgtSearchTextHelp=Utilice %% como comodines. Por ejemplo, para encontrar todos los elementos como <b>jean, joe, jim</b> , puede ingresar <b>j%%</b> , también puede usar; como separador de valor, y uso! Para excepto este valor. Por ejemplo, <b>jean; joe; jim%%;! Jimo;! Jima%</b> apuntará a todos los jean, joe, comienza con jim pero no jimo y no todo lo que comienza con jima AdvTgtSearchIntHelp=Use intervalo para seleccionar el valor int o float AdvTgtMaxVal=Valor máximo AdvTgtSearchDtHelp=Usar intervalo para seleccionar el valor de la fecha @@ -126,6 +119,3 @@ AdvTgtAddContact=Añadir emails según criterio AdvTgtLoadFilter=Filtro de carga NoContactWithCategoryFound=Sin contacto / dirección con una categoría encontrada NoContactLinkedToThirdpartieWithCategoryFound=Sin contacto / dirección con una categoría encontrada -OutGoingEmailSetup=Configuración de correo electrónico saliente -InGoingEmailSetup=Configuración de correo electrónico entrante -DefaultOutgoingEmailSetup=Configuración predeterminada de correo electrónico saliente diff --git a/htdocs/langs/es_CL/modulebuilder.lang b/htdocs/langs/es_CL/modulebuilder.lang index b1a0f954a41..062d82e135d 100644 --- a/htdocs/langs/es_CL/modulebuilder.lang +++ b/htdocs/langs/es_CL/modulebuilder.lang @@ -88,7 +88,6 @@ UseSpecificEditorName =Usa un nombre de editor específico UseSpecificEditorURL =Usa un editor URL específico UseSpecificFamily =Usa una familia específica UseSpecificVersion =Usa una versión inicial específica -ModuleMustBeEnabled=El módulo / aplicación debe ser habilitado primero IncludeDocGenerationHelp=Si marca esto, se generará algún código para agregar un cuadro "Generar documento" en el registro. ShowOnCombobox=Mostrar valor en el cuadro combinado KeyForTooltip=Clave para información sobre herramientas diff --git a/htdocs/langs/es_CL/products.lang b/htdocs/langs/es_CL/products.lang index 5619277c9d4..ddb4957ee49 100644 --- a/htdocs/langs/es_CL/products.lang +++ b/htdocs/langs/es_CL/products.lang @@ -61,6 +61,7 @@ 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 @@ -99,7 +100,6 @@ NewRefForClone=Referencia de nuevo producto/servicio CustomerPrices=Precios de cliente SuppliersPrices=Precios del proveedor SuppliersPricesOfProductsOrServices=Precios de venta (de productos o servicios). -CustomCode=Código de Aduanas / Productos / HS ProductCodeModel=Plantilla de referencia de producto ServiceCodeModel=Plantilla de referencia de servicio AlwaysUseNewPrice=Utilice siempre el precio actual del producto/servicio @@ -107,7 +107,6 @@ AlwaysUseFixedPrice=Usa el precio fijo PriceByQuantity=Diferentes precios por cantidad DisablePriceByQty=Deshabilitar precios por cantidad PriceByQuantityRange=Rango Cantidad -MultipriceRules=Reglas del segmento de precios UseMultipriceRules=Utilice las reglas de segmento de precios (definidas en la configuración del módulo del producto) para calcular automáticamente los precios de todos los demás segmentos de acuerdo con el primer segmento KeepEmptyForAutoCalculation=Manténgase vacío para que esto se calcule automáticamente a partir del peso o volumen de productos VariantRefExample=Ejemplos: COL, SIZE diff --git a/htdocs/langs/es_CL/projects.lang b/htdocs/langs/es_CL/projects.lang index fd50392c8ea..7ef9525fbda 100644 --- a/htdocs/langs/es_CL/projects.lang +++ b/htdocs/langs/es_CL/projects.lang @@ -43,10 +43,6 @@ AddHereTimeSpentForDay=Agregue aquí el tiempo dedicado a este día / tarea Activities=Tareas / actividades MyActivities=Mis tareas / actividades MyProjectsArea=Mi área de proyectos -ProgressDeclared=Progreso declarado -TheReportedProgressIsLessThanTheCalculatedProgressionByX=El progreso declarado es menos %s que la progresión calculada -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=El progreso declarado es más %s que la progresión calculada -ProgressCalculated=Progreso calculado Time=Hora ListOfTasks=Lista de tareas GoToListOfTimeConsumed=Ir a la lista de tiempo consumido diff --git a/htdocs/langs/es_CL/sendings.lang b/htdocs/langs/es_CL/sendings.lang index f250e751edb..b09b9b53d2d 100644 --- a/htdocs/langs/es_CL/sendings.lang +++ b/htdocs/langs/es_CL/sendings.lang @@ -18,6 +18,7 @@ OtherSendingsForSameOrder=Otros envíos para esta orden SendingsAndReceivingForSameOrder=Envíos y recibos para esta orden SendingsToValidate=Envíos para validar StatusSendingCanceled=Cancelado +StatusSendingCanceledShort=Cancelado StatusSendingValidated=Validado (productos para enviar o ya enviados) StatusSendingProcessed=Procesada StatusSendingProcessedShort=Procesada diff --git a/htdocs/langs/es_CL/ticket.lang b/htdocs/langs/es_CL/ticket.lang index 7e8bb612452..f0511ad43e0 100644 --- a/htdocs/langs/es_CL/ticket.lang +++ b/htdocs/langs/es_CL/ticket.lang @@ -14,7 +14,6 @@ TypeContact_ticket_internal_CONTRIBUTOR=Colaborador TypeContact_ticket_external_SUPPORTCLI=Contacto con el cliente / seguimiento de incidentes OriginEmail=Fuente de correo electrónico Notify_TICKET_SENTBYMAIL=Enviar mensaje de Ticket por correo electrónico -NotRead=No leer Read=Leer NeedMoreInformation=Esperando informacion Waiting=Esperando diff --git a/htdocs/langs/es_CL/withdrawals.lang b/htdocs/langs/es_CL/withdrawals.lang index ae95201deba..a205a30add6 100644 --- a/htdocs/langs/es_CL/withdrawals.lang +++ b/htdocs/langs/es_CL/withdrawals.lang @@ -79,6 +79,7 @@ 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 ccd905cc761..08958e517aa 100644 --- a/htdocs/langs/es_CO/accountancy.lang +++ b/htdocs/langs/es_CO/accountancy.lang @@ -83,6 +83,7 @@ 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) @@ -107,7 +108,6 @@ LetteringCode=Codigo de letras Codejournal=diario NumPiece=Número de pieza TransactionNumShort=Num. transacción -GroupByAccountAccounting=Grupo por cuenta contable AccountingAccountGroupsDesc=Puede definir aquí algunos grupos de cuentas contables. Serán utilizados para informes contables personalizados. ByPredefinedAccountGroups=Por grupos predefinidos. DelYear=Año para borrar diff --git a/htdocs/langs/es_CO/admin.lang b/htdocs/langs/es_CO/admin.lang index f9161cc6931..b8ca38f6387 100644 --- a/htdocs/langs/es_CO/admin.lang +++ b/htdocs/langs/es_CO/admin.lang @@ -51,7 +51,6 @@ JavascriptDisabled=JavaScript desactivado UsePreviewTabs=Use las pestañas de vista previa ShowPreview=Mostrar vista previa ThemeCurrentlyActive=Tema activo actualmente -CurrentTimeZone=Zona horaria de PHP (servidor) MySQLTimeZone=TimeZone MySql (base de datos) TZHasNoEffect=Las fechas son almacenadas y devueltas por el servidor de base de datos como si se mantuvieran como una cadena enviada. La zona horaria tiene efecto solo cuando se usa la función UNIX_TIMESTAMP (que Dolibarr no debe usar, por lo que la base de datos TZ no debería tener ningún efecto, incluso si se cambia después de ingresar los datos). Space=Espacio @@ -99,7 +98,6 @@ MenuForUsers=Menú para usuarios. SystemInfo=Información del sistema SystemToolsArea=Área de herramientas del sistema PurgeDeleteLogFile=Elimine los archivos de registro, incluido el <b> %s </b> definido para el módulo Syslog (sin riesgo de perder datos) -PurgeDeleteTemporaryFilesShort=Borrar archivos temporales PurgeRunNow=Purga ahora PurgeNothingToDelete=No hay directorio o archivos para eliminar. PurgeNDirectoriesDeleted=Se eliminaron los archivos o directorios de <b> %s </b>. @@ -242,7 +240,6 @@ LanguageFilesCachedIntoShmopSharedMemory=Archivos .lang cargados en memoria comp ListOfDirectories=Lista de directorios de plantillas de OpenDocument ListOfDirectoriesForModelGenODT=Lista de directorios que contienen archivos de plantillas con formato OpenDocument. <br> <br> Ruta aquí completa de los directorios. 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>. 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: \\ mydir <br> / home / mydir <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 de la wiki: FirstnameNamePosition=Posición del nombre / apellido KeyForWebServicesAccess=Clave para usar servicios web (parámetro "dolibarrkey" en servicios web) @@ -260,7 +257,6 @@ UrlGenerationParameters=Parámetros para proteger las URL SecurityTokenIsUnique=Utilice un parámetro de clave segura único para cada URL EnterRefToBuildUrl=Introduzca la referencia para el objeto %s GetSecuredUrl=Obtener URL calculada -ButtonHideUnauthorized=Ocultar botones para usuarios no administradores para acciones no autorizadas en lugar de mostrar botones deshabilitados en gris OldVATRates=Vieja tasa de IVA NewVATRates=Nueva tasa de IVA PriceBaseTypeToChange=Modificar en precios con valor de referencia base definido en @@ -372,7 +368,7 @@ 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=Módulo para gestionar márgenes. +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. @@ -863,7 +859,7 @@ 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=Mostrar las descripciones de los productos en el idioma del tercero. +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 @@ -925,7 +921,6 @@ NotTopTreeMenuPersonalized=Menús personalizados no vinculados a una entrada del NewMenu=Nuevo menu MenuHandler=Manejador de menú MenuModule=Módulo fuente -HideUnauthorizedMenu=Ocultar menús no autorizados (gris) DetailId=Menú de identificación DetailMenuHandler=Manejador de menú donde mostrar nuevo menú. DetailMenuModule=Nombre del módulo si la entrada del menú proviene de un módulo diff --git a/htdocs/langs/es_CO/boxes.lang b/htdocs/langs/es_CO/boxes.lang index 6a5f709d318..1253f30ed1a 100644 --- a/htdocs/langs/es_CO/boxes.lang +++ b/htdocs/langs/es_CO/boxes.lang @@ -1,3 +1,4 @@ # Dolibarr language file - Source file is en_US - boxes +BoxScheduledJobs=Trabajos programados ForCustomersInvoices=Facturas de clientes ForProposals=Propuestas diff --git a/htdocs/langs/es_CO/compta.lang b/htdocs/langs/es_CO/compta.lang index a8bd33a6a73..0466a9ef875 100644 --- a/htdocs/langs/es_CO/compta.lang +++ b/htdocs/langs/es_CO/compta.lang @@ -10,6 +10,7 @@ FeatureIsSupportedInInOutModeOnly=Función solo disponible en el modo de contabi VATReportBuildWithOptionDefinedInModule=Las cantidades que se muestran aquí se calculan utilizando las reglas definidas por la configuración del módulo de impuestos. LTReportBuildWithOptionDefinedInModule=Las cantidades que se muestran aquí se calculan utilizando las reglas definidas por la configuración de la Compañía. Param=Configuración +RemainingAmountPayment=Cantidad del pago restante: Accountparent=Cuenta para padres Accountsparent=Cuentas de los padres MenuReportInOut=Ingresos / Gastos @@ -66,6 +67,7 @@ AddSocialContribution=Añadir impuesto social / fiscal ContributionsToPay=Impuestos sociales / fiscales a pagar. AccountancyTreasuryArea=Área de facturación y pago. PaymentCustomerInvoice=Pago factura a cliente +PaymentSupplierInvoice=pago de factura del proveedor PaymentSocialContribution=Pago de impuestos sociales / fiscales PaymentVat=Pago del IVA ListPayment=Lista de pagos @@ -91,8 +93,8 @@ NewLocalTaxPayment=Nuevo pago de impuestos %s Refund=Reembolso SocialContributionsPayments=Pago de impuestos sociales / fiscales ShowVatPayment=Mostrar pago del IVA -BalanceVisibilityDependsOnSortAndFilters=El saldo es visible en esta lista solo si la tabla está ordenada en forma ascendente en %s y se filtra para 1 cuenta bancaria CustomerAccountancyCode=Código de contabilidad del cliente +SupplierAccountancyCode=Código contable del proveedor CustomerAccountancyCodeShort=Cust. cuenta. código SupplierAccountancyCodeShort=Cenar. cuenta. código Turnover=Facturación facturada @@ -117,7 +119,6 @@ ConfirmDeleteSocialContribution=¿Está seguro de que desea eliminar este pago f 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>. -CalcModeDebt=Análisis de facturas registradas conocidas incluso si aún no se han contabilizado en el libro de contabilidad. CalcModeEngagement=Análisis de pagos registrados conocidos, incluso si aún no se han contabilizado en el Libro mayor. CalcModeBookkeeping=Análisis de los datos registrados en la tabla de Contabilidad. CalcModeLT1=Modo <b> %sRE en facturas de clientes: facturas de proveedores%s </b> @@ -131,11 +132,11 @@ AnnualSummaryInputOutputMode=Balance de ingresos y gastos, resumen anual. AnnualByCompanies=Saldo de ingresos y gastos, por grupos de cuentas predefinidos. AnnualByCompaniesDueDebtMode=Balance de ingresos y gastos, detalle por grupos predefinidos, modo <b> %sClaims-Debts%s </b> dijo <b> Contabilidad de compromisos </b>. AnnualByCompaniesInputOutputMode=Balance de ingresos y gastos, detalle por grupos predefinidos, modo <b> %sIncomes-Expenses%s </b>, dijo <b> contabilidad de caja </b>. -SeeReportInInputOutputMode=Consulte %sanálisis de pagos%s para obtener un cálculo de los pagos reales realizados incluso si aún no se han contabilizado en el Libro mayor. -SeeReportInDueDebtMode=Consulte %sanálisis de facturas%s para un cálculo basado en facturas registradas conocidas, incluso si aún no se han contabilizado en el Libro mayor. -SeeReportInBookkeepingMode=Consulte <b> %sRestauración report%s </b> para obtener un cálculo de la <b> tabla del Libro mayor de contabilidad </b> RulesAmountWithTaxIncluded=- Las cantidades mostradas están con todos los impuestos incluidos. +RulesResultDue=- Incluye facturas pendientes, gastos, IVA, donaciones ya sean pagadas o no. También incluye salarios pagados. <br> - Se basa en la fecha de facturación de las facturas y en la fecha de vencimiento de los gastos o pagos de impuestos. Para los salarios definidos con el módulo Salario, se utiliza la fecha de pago del valor. RulesResultInOut=- Incluye los pagos reales realizados en facturas, gastos, IVA y salarios. <br> - Se basa en las fechas de pago de las facturas, gastos, IVA y salarios. La fecha de donación para la donación. +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 todos los pagos efectivos de las facturas recibidas de los clientes. <br> - Se basa en la fecha de pago de estas facturas <br> RulesCATotalSaleJournal=Incluye todas las líneas de crédito del diario Sale. RulesAmountOnInOutBookkeepingRecord=Incluye el registro en su Libro mayor con cuentas contables que tiene el grupo "GASTOS" o "INGRESOS" RulesResultBookkeepingPredefined=Incluye el registro en su Libro mayor con cuentas contables que tiene el grupo "GASTOS" o "INGRESOS" @@ -186,6 +187,7 @@ 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. TurnoverPerProductInCommitmentAccountingNotRelevant=El informe del volumen de negocios recogido por producto no está disponible. Este informe solo está disponible para facturación facturada. TurnoverPerSaleTaxRateInCommitmentAccountingNotRelevant=El informe del volumen de negocios recaudado por tasa de impuesto de venta no está disponible. Este informe solo está disponible para facturación facturada. AccountancyJournal=Diario de código contable @@ -195,6 +197,7 @@ ACCOUNTING_VAT_PAY_ACCOUNT=Cuenta contable por defecto para el pago del IVA. ACCOUNTING_ACCOUNT_CUSTOMER=Cuenta contable utilizada para terceros clientes. ACCOUNTING_ACCOUNT_CUSTOMER_Desc=La cuenta contable dedicada definida en la tarjeta de terceros se utilizará solo para la contabilidad de Libro mayor auxiliar. Este se usará para el Libro mayor general y como valor predeterminado de la contabilidad del Libro mayor auxiliar si no se define una cuenta de cuenta del cliente dedicada a un tercero. ACCOUNTING_ACCOUNT_SUPPLIER=Cuenta contable utilizada para terceros proveedores. +ACCOUNTING_ACCOUNT_SUPPLIER_Desc=La cuenta de contabilidad dedicada definida en la tarjeta de un tercero se usará solo para la contabilidad del Libro auxiliar. Este se usará para el Libro mayor y como valor predeterminado de la contabilidad del libro auxiliar si no se define la cuenta de contabilidad del proveedor dedicada en un tercero. ConfirmCloneTax=Confirmar el clon de un impuesto social / fiscal. CloneTaxForNextMonth=Clonala para el mes que viene. SimpleReport=Informe simple @@ -216,3 +219,7 @@ ByVatRate=Por impuesto de venta TurnoverbyVatrate=Facturación facturada por impuesto de venta TurnoverCollectedbyVatrate=Volumen de negocios recaudado por tasa de impuesto de venta PurchasebyVatrate=Tasa de impuesto de compra por venta +PurchaseTurnoverCollected=Volumen de compras recogido +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 efectivos de facturas hechas a proveedores. <br> - Se basa en la fecha de pago de estas facturas <br> +ReportPurchaseTurnoverCollected=Volumen de compras recogido diff --git a/htdocs/langs/es_CO/cron.lang b/htdocs/langs/es_CO/cron.lang index 5ef1f0eb645..0c30b974b96 100644 --- a/htdocs/langs/es_CO/cron.lang +++ b/htdocs/langs/es_CO/cron.lang @@ -1,4 +1,9 @@ # Dolibarr language file - Source file is en_US - cron +Permission23101 =Leer trabajo programado +Permission23102 =Crear / actualizar trabajo programado +Permission23103 =Eliminar trabajo programado +Permission23104 =Ejecutar trabajo programado +CronList=Trabajos programados CronMethod=Método CronModule=Módulo CronArgs=Parámetros diff --git a/htdocs/langs/es_CO/main.lang b/htdocs/langs/es_CO/main.lang index f4a6163ecd8..cf729c5dde4 100644 --- a/htdocs/langs/es_CO/main.lang +++ b/htdocs/langs/es_CO/main.lang @@ -21,6 +21,7 @@ FormatDateHourTextShort=%d %b %Y %H:%M FormatDateHourText=%d %B %Y %H:%M NoTemplateDefined=No hay plantilla disponible para este tipo de correo electrónico. AvailableVariables=Variables de sustitución disponibles +CurrentTimeZone=Zona horaria de PHP (servidor) NoRecordFound=No se encontraron registros NoRecordDeleted=Ningún registro eliminado Errors=Los errores diff --git a/htdocs/langs/es_CO/mrp.lang b/htdocs/langs/es_CO/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/es_CO/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/es_CO/products.lang b/htdocs/langs/es_CO/products.lang index 2493b627165..19e7fb865c4 100644 --- a/htdocs/langs/es_CO/products.lang +++ b/htdocs/langs/es_CO/products.lang @@ -54,6 +54,7 @@ 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 @@ -85,7 +86,6 @@ CloneCombinationsProduct=Variantes de productos clonados. ProductIsUsed=Este producto es usado NewRefForClone=Árbitro. de nuevo producto / servicio CustomerPrices=Precios al cliente -CustomCode=Aduanas / productos / código HS p=u d=re g=sol @@ -98,7 +98,6 @@ AlwaysUseFixedPrice=Usar el precio fijo PriceByQuantity=Diferentes precios por cantidad. DisablePriceByQty=Desactivar precios por cantidad. PriceByQuantityRange=Rango Cantidad -MultipriceRules=Reglas del segmento de precios UseMultipriceRules=Utilice reglas de segmento de precios (definidas en la configuración del módulo del producto) para calcular automáticamente los precios de todos los demás segmentos de acuerdo con el primer segmento PercentVariationOver=variación %% sobre %s KeepEmptyForAutoCalculation=Manténgalo vacío para que esto se calcule automáticamente por peso o volumen de productos diff --git a/htdocs/langs/es_CO/projects.lang b/htdocs/langs/es_CO/projects.lang index 5bb088ffa15..9fff1ff1340 100644 --- a/htdocs/langs/es_CO/projects.lang +++ b/htdocs/langs/es_CO/projects.lang @@ -45,8 +45,6 @@ AddHereTimeSpentForDay=Agregue aquí el tiempo dedicado a este día / tarea Activities=Tareas / actividades MyActivities=Mis tareas / actividades MyProjectsArea=Mis proyectos area -ProgressDeclared=Progreso declarado -ProgressCalculated=Progreso calculado Time=Hora ListOfTasks=Lista de tareas GoToListOfTimeConsumed=Ir a la lista de tiempo consumido diff --git a/htdocs/langs/es_CO/sendings.lang b/htdocs/langs/es_CO/sendings.lang index 96689e2c322..ea9f35bd5dd 100644 --- a/htdocs/langs/es_CO/sendings.lang +++ b/htdocs/langs/es_CO/sendings.lang @@ -1,2 +1,3 @@ # Dolibarr language file - Source file is en_US - sendings StatusSendingCanceled=Cancelado +StatusSendingCanceledShort=Cancelado diff --git a/htdocs/langs/es_CO/ticket.lang b/htdocs/langs/es_CO/ticket.lang index 05339775ed1..e0099d503d0 100644 --- a/htdocs/langs/es_CO/ticket.lang +++ b/htdocs/langs/es_CO/ticket.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - ticket TypeContact_ticket_internal_CONTRIBUTOR=Contribuyente -NotRead=No leer Type=Tipo Subject=Tema diff --git a/htdocs/langs/es_CO/withdrawals.lang b/htdocs/langs/es_CO/withdrawals.lang index 33ea339dcd8..4c73e87c98e 100644 --- a/htdocs/langs/es_CO/withdrawals.lang +++ b/htdocs/langs/es_CO/withdrawals.lang @@ -4,3 +4,4 @@ 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 new file mode 100644 index 00000000000..552865118f1 --- /dev/null +++ b/htdocs/langs/es_DO/accountancy.lang @@ -0,0 +1,2 @@ +# 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 6dbaf311a2a..5284148aebb 100644 --- a/htdocs/langs/es_DO/admin.lang +++ b/htdocs/langs/es_DO/admin.lang @@ -1,11 +1,13 @@ # 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) 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/compta.lang b/htdocs/langs/es_DO/compta.lang deleted file mode 100644 index c7c41488180..00000000000 --- a/htdocs/langs/es_DO/compta.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - compta -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account diff --git a/htdocs/langs/es_DO/mrp.lang b/htdocs/langs/es_DO/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/es_DO/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/es_DO/products.lang b/htdocs/langs/es_DO/products.lang index 6e900475275..2a38b9b0181 100644 --- a/htdocs/langs/es_DO/products.lang +++ b/htdocs/langs/es_DO/products.lang @@ -1,2 +1,2 @@ # Dolibarr language file - Source file is en_US - products -CustomCode=Customs / Commodity / HS code +AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/es_DO/withdrawals.lang b/htdocs/langs/es_DO/withdrawals.lang new file mode 100644 index 00000000000..facdefc082f --- /dev/null +++ b/htdocs/langs/es_DO/withdrawals.lang @@ -0,0 +1,2 @@ +# 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 ffe1b3a23e6..828b60ac54e 100644 --- a/htdocs/langs/es_EC/accountancy.lang +++ b/htdocs/langs/es_EC/accountancy.lang @@ -90,7 +90,7 @@ 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=Número de elementos a unir mostrados por página (máximo recomendado: 50) +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 @@ -112,11 +112,14 @@ TransitionalAccount=Cuenta de transferencia bancaria transitoria ACCOUNTING_ACCOUNT_SUSPENSE=Cuenta de cuenta de espera ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Cuenta contable para registrar suscripciones ACCOUNTING_PRODUCT_BUY_ACCOUNT=Cuenta contable por defecto para los productos comprados (se usa si no se define en la hoja de productos) +ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=Cuenta contable por defecto para los productos comprados en EEC (se usa si no se define en la hoja de productos) ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT=Cuenta contable por defecto para los productos comprados e importados fuera de la CEE (usado si no está definido en la hoja de productos) ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Cuenta contable por defecto para los productos vendidos (utilizada si no se define en la hoja del producto) ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT=Cuenta contable por defecto para los productos vendidos en la CEE (utilizada si no se define en la hoja de producto) ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT=Cuenta contable por defecto para los productos vendidos y exportados fuera de la CEE (usado si no está definido en la hoja de producto) ACCOUNTING_SERVICE_BUY_ACCOUNT=Cuenta contable por defecto para los servicios comprados (utilizado si no se define en la hoja de servicio) +ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT=Cuenta contable por defecto para los servicios comprados en EEC (utilizada si no está definida en la hoja de servicios) +ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT=Cuenta contable por defecto para los servicios comprados e importados fuera de la CEE (se usa si no se define en la hoja de servicios) ACCOUNTING_SERVICE_SOLD_ACCOUNT=Contabilidad por defecto para los servicios vendidos (utilizado si no se define en la hoja de servicio) ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT=Cuenta contable por defecto para los servicios vendidos en la CEE (utilizada si no se define en la hoja de servicios) ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT=Cuenta contable por defecto para los servicios vendidos y exportados fuera de la CEE (usado si no está definido en la hoja de servicios) @@ -126,7 +129,6 @@ LetteringCode=Codigo de letras Codejournal=diario NumPiece=Número de pieza TransactionNumShort=Num. transacción -GroupByAccountAccounting=Grupo por cuenta contable AccountingAccountGroupsDesc=Puede definir aquí algunos grupos de cuentas contables. Se usarán para informes de contabilidad personalizados. DelMonth=Mes para borrar DelJournal=Diario para borrar @@ -211,6 +213,7 @@ Modelcsv_openconcerto=Exportar para OpenConcerto (prueba) Modelcsv_configurable=Exportar CSV Configurable Modelcsv_FEC=Exportar FEC Modelcsv_Sage50_Swiss=Exportación para Sage 50 Suiza +Modelcsv_winfic=Exportar Winfic - eWinfic - WinSis Compta ChartofaccountsId=ID de la cuenta de cuentas InitAccountancy=Contabilidad inicial InitAccountancyDesc=Esta página se puede utilizar para inicializar una cuenta de contabilidad en productos y servicios que no tiene definida una cuenta de contabilidad para ventas y compras. diff --git a/htdocs/langs/es_EC/admin.lang b/htdocs/langs/es_EC/admin.lang index 63854f4450c..61e86a47149 100644 --- a/htdocs/langs/es_EC/admin.lang +++ b/htdocs/langs/es_EC/admin.lang @@ -60,7 +60,6 @@ AllowToSelectProjectFromOtherCompany=En el documento de un cliente, puede elegir JavascriptDisabled=JavaScript desactivado UsePreviewTabs=Usar pestañas de vista previa ShowPreview=Mostrar vista previa -CurrentTimeZone=Zona horaria PHP (servidor) MySQLTimeZone=Zona horaria MySQL (base de datos) TZHasNoEffect=Las fechas son almacenadas y devueltas por el servidor de base de datos como si se mantuvieran como una cadena enviada. La zona horaria tiene efecto solo cuando se usa la función UNIX_TIMESTAMP (que no debe ser utilizada por Dolibarr, por lo que la base de datos TZ no debería tener ningún efecto, incluso si se cambia después de ingresar los datos) Space=Espacio @@ -112,7 +111,6 @@ SystemToolsAreaDesc=Esta área proporciona funciones de administración. Utilice Purge=Purgar PurgeAreaDesc=Esta página le permite eliminar todos los archivos generados o almacenados por Dolibarr (archivos temporales o todos los archivos en el directorio <b>%s</b>). Usando esta característica normalmente no es necesario. Se proporciona como una solución para los usuarios cuyo Dolibarr está alojado por un proveedor que no ofrece permisos para eliminar archivos generados por el servidor web. PurgeDeleteLogFile=Eliminar archivo de registro <b>%s</b> definido para el módulo de Registro del Sistema (Syslog) (sin riesgo de perder datos) -PurgeDeleteTemporaryFiles=Elimine todos los archivos temporales (sin riesgo de perder datos). Nota: La eliminación se realiza solo si el directorio temporal se creó hace 24 horas. PurgeDeleteAllFilesInDocumentsDir=Eliminar todos los archivos en el directorio: <b>%s</b>. <br> Esto eliminará todos los documentos generados relacionados con los elementos (terceros, facturas, etc.), los archivos cargados en el módulo ECM, los volcados de respaldo de la base de datos y archivos temporales. PurgeRunNow=Purgar ahora PurgeNothingToDelete=Sin directorio o archivos que desea eliminar. @@ -285,7 +283,6 @@ LanguageFilesCachedIntoShmopSharedMemory=Archivos .lang cargados en la memoria c ListOfDirectories=Lista de directorios de plantillas OpenDocument ListOfDirectoriesForModelGenODT=Open to Document. <br> <br> Ponga aquí la ruta completa de los directorios. <br> Para un directorio del módulo GED, añádalo aquí <b> DOL_DATA_ROOT / ecm / yourdirectoryname </b>. <br> <br> Los archivos de esos deben ser eliminados 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:\\mydir <br> / home / mydir <br> DOL_DATA_ROOT / ecm / ecmdir FollowingSubstitutionKeysCanBeUsed=<br> Para saber cómo crear sus plantillas de documentos ODT, antes de guardarlos en esos directorios, leer 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: @@ -310,7 +307,6 @@ UrlGenerationParameters=Parámetros para asegurar URL SecurityTokenIsUnique=Use un parámetro de SecureKey único para cada URL EnterRefToBuildUrl=Insertar la referencia del objeto %s GetSecuredUrl=Obtener URL calculada -ButtonHideUnauthorized=Ocultar botones para usuarios no administradores para acciones no autorizadas en lugar de mostrar botones deshabilitados en gris OldVATRates=Antigua tasa de IVA NewVATRates=Nueva tasa de IVA PriceBaseTypeToChange=Modificar los precios con el valor base de referencia definida en @@ -495,7 +491,7 @@ 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=Módulo para administración los márgenes +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. @@ -945,7 +941,6 @@ ConditionIsCurrently=Condición actual %s YouUseBestDriver=Utiliza el controlador %s, que es el mejor controlador actualmente disponible. YouDoNotUseBestDriver=Utiliza el controlador %s, pero se recomienda el controlador %s. SearchOptim=Optimización de la búsqueda -YouHaveXObjectUseSearchOptim=Tiene %s %s en la base de datos. Debe agregar la constante %s a 1 en Home-Setup-Other. Limite la búsqueda al comienzo de las cadenas, lo que hace posible que la base de datos use índices y debería obtener una respuesta inmediata. YouHaveXObjectAndSearchOptimOn=Tiene %s %s en la base de datos y la constante %s se establece en 1 en Home-Setup-Other. BrowserIsOK=Está utilizando el navegador web %s. Este navegador está bien para la seguridad y el rendimiento. BrowserIsKO=Está utilizando el navegador web %s. Se sabe que este navegador es una mala elección para la seguridad, el rendimiento y la confiabilidad. Recomendamos utilizar Firefox, Chrome, Opera o Safari. @@ -1162,7 +1157,7 @@ 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=Mostrar descripciones de productos en el idioma del tercero. +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 @@ -1227,7 +1222,6 @@ IfYouUsePointOfSaleCheckModule=Si utiliza el módulo de Punto de Venta (POS) pro NotTopTreeMenuPersonalized=Menús personalizados no vinculados a una entrada de menú superior MenuHandler=Manejador de menús MenuModule=Módulo fuente -HideUnauthorizedMenu= Ocultar menús no autorizados DetailId=Identificación del menú DetailMenuHandler=Manejador de menús donde mostrar el nuevo menú DetailMenuModule=Nombre del módulo @@ -1452,8 +1446,6 @@ EMailHost=Host de correo electrónico del servidor IMAP EmailcollectorOperations=Operaciones a realizar por coleccionista. MaxEmailCollectPerCollect=Número máximo de correos electrónicos recopilados por recopilación ConfirmCloneEmailCollector=¿Está seguro de que desea clonar el recopilador de correo electrónico %s? -DateLastCollectResult=Fecha de último cobro probado -DateLastcollectResultOk=Fecha más reciente de cobrar exitosamente EmailCollectorConfirmCollectTitle=Correo electrónico recoger confirmación EmailCollectorConfirmCollect=¿Quieres ejecutar la colección para este coleccionista ahora? NoNewEmailToProcess=No hay correo electrónico nuevo (filtros coincidentes) para procesar @@ -1501,4 +1493,5 @@ RESTRICT_ON_IP=Permitir el acceso a alguna IP de host solamente (comodín no per MakeAnonymousPing=Realice un Ping anónimo '+1' al servidor de la base Dolibarr (hecho 1 vez solo después de la instalación) para permitir que la base cuente la cantidad de instalación de Dolibarr. FeatureNotAvailableWithReceptionModule=Función no disponible cuando la recepción del módulo está habilitada EmailTemplate=Plantilla para correo electrónico +EMailsWillHaveMessageID=Los correos electrónicos tendrán una etiqueta 'Referencias' que coincida con esta sintaxis JumpToBoxes=Vaya a Configuración -> Widgets diff --git a/htdocs/langs/es_EC/banks.lang b/htdocs/langs/es_EC/banks.lang index e9526d449e9..94929d9f3b4 100644 --- a/htdocs/langs/es_EC/banks.lang +++ b/htdocs/langs/es_EC/banks.lang @@ -117,6 +117,4 @@ ShowVariousPayment=Mostrar pago misceláneo AddVariousPayment=Agregar pago misceláneo FindYourSEPAMandate=Este es su mandato de SEPA para autorizar a nuestra empresa a realizar un pedido de débito directo a su banco. Devuélvalo firmado (escaneo del documento firmado) o envíelo por correo a AutoReportLastAccountStatement=Rellene automáticamente el campo 'número de extracto bancario' con el último número de extracto al realizar la conciliación -CashControl=POS Limite de efectivo -NewCashFence=Nuevo limite de efectivo BankColorizeMovementDesc=Si esta función está habilitada, puede elegir un color de fondo específico para los movimientos de débito o crédito diff --git a/htdocs/langs/es_EC/blockedlog.lang b/htdocs/langs/es_EC/blockedlog.lang index ffd95d6e203..4f7bb9a99a4 100644 --- a/htdocs/langs/es_EC/blockedlog.lang +++ b/htdocs/langs/es_EC/blockedlog.lang @@ -1,7 +1,13 @@ # Dolibarr language file - Source file is en_US - blockedlog +BlockedLogDesc=Este módulo rastrea algunos eventos en un registro inalterable (que no puede modificar una vez registrado) en una cadena de bloques, en tiempo real. Este módulo proporciona compatibilidad con los requisitos de las leyes de algunos países (como Francia con la ley Finanzas 2016 - Norma NF525). FingerprintsDesc=Esta es la herramienta para navegar o extraer los registros inalterables. Los registros inalterables se generan y archivan localmente en una tabla dedicada, en tiempo real cuando registra un evento de negocios. Puede usar esta herramienta para exportar este archivo y guardarlo en un soporte externo (algunos países, como Francia, le piden que lo haga todos los años). Tenga en cuenta que no hay ninguna función para limpiar este registro y que todos los cambios que se intentaron realizar directamente en este registro (por ejemplo, un pirata informático) se informarán con una huella digital no válida. Si realmente necesita purgar esta tabla porque usó su aplicación para una demostración / propósito de prueba y desea limpiar sus datos para comenzar su producción, puede solicitar a su revendedor o integrador que reinicie su base de datos (se eliminarán todos sus datos). +KoCheckFingerprintValidity=La entrada de registro archivada no es válida. Significa que alguien (¿un pirata informático?) Ha modificado algunos datos de este registro después de que fue grabado, o ha borrado el registro archivado anterior (verifique que exista esa línea con # anterior). +OkCheckFingerprintValidity=El registro de registro archivado es válido. Los datos en esta línea no se modificaron y la entrada sigue a la anterior. AddedByAuthority=Almacenado en sitio remoto NotAddedByAuthorityYet=Aún no almacenado en sitio remoto +logPAYMENT_VARIOUS_CREATE=Pago (no asignado a una factura) creado +logPAYMENT_VARIOUS_MODIFY=Pago (no asignado a una factura) modificado +logPAYMENT_VARIOUS_DELETE=Pago (no asignado a una factura) eliminación lógica logPAYMENT_ADD_TO_BANK=Pago agregado al banco logDONATION_PAYMENT_DELETE=Eliminación lógica del pago de donaciones. logBILL_UNPAYED=Factura del cliente sin pagar diff --git a/htdocs/langs/es_EC/boxes.lang b/htdocs/langs/es_EC/boxes.lang index 68072918006..6ae463eaff3 100644 --- a/htdocs/langs/es_EC/boxes.lang +++ b/htdocs/langs/es_EC/boxes.lang @@ -34,6 +34,7 @@ BoxTitleLatestModifiedBoms=Últimas BOMs modificadas %s BoxTitleLatestModifiedMos=Últimas órdenes de fabricación modificadas %s BoxGlobalActivity=Actividad global (facturas, propuestas, pedidos) BoxTitleGoodCustomers=%s Buenos clientes +BoxScheduledJobs=Trabajos programados FailedToRefreshDataInfoNotUpToDate=Error al actualizar el flujo de RSS. Última fecha de actualización exitosa: %s LastRefreshDate=Fecha de actualización más reciente NoRecordedBookmarks=No se han definido marcadores. diff --git a/htdocs/langs/es_EC/cashdesk.lang b/htdocs/langs/es_EC/cashdesk.lang index 3361d257dc5..91bfc85b052 100644 --- a/htdocs/langs/es_EC/cashdesk.lang +++ b/htdocs/langs/es_EC/cashdesk.lang @@ -31,8 +31,6 @@ Footer=Pie de página AmountAtEndOfPeriod=Cantidad al final del período (día, mes o año) TheoricalAmount=Cantidad teórica RealAmount=Cantidad real -CashFence=Valla de efectivo -CashFenceDone=Cerca de efectivo hecha para el período. NbOfInvoices=Nb de facturas Paymentnumpad=Tipo de Pad para ingresar el pago Numberspad=Pad de números @@ -56,7 +54,6 @@ CashDeskRefNumberingModules=Módulo de numeración para ventas POS CashDeskGenericMaskCodes6 =<br><b>{TN} </b>la etiqueta se usa para agregar el número de terminal TakeposGroupSameProduct=Agrupar las mismas líneas de productos StartAParallelSale=Comience una nueva venta paralela -CloseCashFence=Cerca de efectivo CashReport=Informe de caja MainPrinterToUse=Impresora principal para usar OrderPrinterToUse=Solicitar impresora para usar diff --git a/htdocs/langs/es_EC/categories.lang b/htdocs/langs/es_EC/categories.lang index 48cdc8b6202..3545e7ba532 100644 --- a/htdocs/langs/es_EC/categories.lang +++ b/htdocs/langs/es_EC/categories.lang @@ -46,11 +46,8 @@ UsersCategoriesShort=Etiquetas/categorías de usuarios StockCategoriesShort=Etiquetas / categorías de almacén ThisCategoryHasNoItems=Esta categoría no contiene ningún artículo. CategId=ID de etiqueta/categoría -CatSupList=Lista de etiquetas / categorías de proveedores -CatCusList=Lista de etiquetas/categorías de cliente/prospecto CatProdList=Lista de productos etiquetas/categorías CatMemberList=Lista de miembros tags/categories -CatContactList=Lista de etiquetas/categorías de contacto CatCusLinks=Enlaces entre clientes/prospectos y etiquetas/categorías CatContactsLinks=Enlaces entre contactos / direcciones y etiquetas / categorías ExtraFieldsCategories=Atributos complementarios diff --git a/htdocs/langs/es_EC/companies.lang b/htdocs/langs/es_EC/companies.lang index 398cf5448d1..8a15891b3f1 100644 --- a/htdocs/langs/es_EC/companies.lang +++ b/htdocs/langs/es_EC/companies.lang @@ -207,7 +207,6 @@ VATIntraCheckableOnEUSite=Consulte el ID de IVA intracomunitario en el sitio web VATIntraManualCheck=También puede consultar manualmente en el sitio web de la Comisión Europea. <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=No es posible el chequeo. El servicio de chequeo no es proporcionado por el estado miembro (%s). NorProspectNorCustomer=No prospecto, ni cliente -JuridicalStatus=Tipo de entidad jurídica ProspectLevel=Prospecto potencial OthersNotLinkedToThirdParty=Otros, no vinculados a cliente/proveedor ProspectStatus=Estado del prospecto diff --git a/htdocs/langs/es_EC/compta.lang b/htdocs/langs/es_EC/compta.lang index e77516e0630..5933896e5b7 100644 --- a/htdocs/langs/es_EC/compta.lang +++ b/htdocs/langs/es_EC/compta.lang @@ -94,7 +94,6 @@ NewLocalTaxPayment=Nuevo pago de impuestos %s Refund=Reembolso SocialContributionsPayments=Pagos de impuestos sociales y fiscales ShowVatPayment=Mostrar pago de IVA -BalanceVisibilityDependsOnSortAndFilters=El equilibrio es visible en esta lista sólo si la tabla está ordenada ascendiendo en%s y filtrada para una cuenta bancaria CustomerAccountancyCode=Código de contabilidad del cliente SupplierAccountancyCode=Código contable del proveedor CustomerAccountancyCodeShort=Cuenta de cliente. código @@ -120,7 +119,6 @@ ConfirmDeleteSocialContribution=¿Seguro que desea eliminar este pago de impuest 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>. -CalcModeDebt=Análisis de facturas registradas conocidas incluso si aún no se contabilizan en el libro mayor. CalcModeEngagement=Análisis de los pagos registrados conocidos, incluso si aún no se contabilizan en el Libro mayor. CalcModeBookkeeping=Análisis de los datos registrados en la tabla de Contabilidad. CalcModeLT1= Modo <b>%sRE en facturas de clientes - facturas de proveedores%s </b> @@ -133,9 +131,6 @@ AnnualSummaryDueDebtMode=Balance de ingresos y gastos, resumen anual AnnualSummaryInputOutputMode=Balance de ingresos y gastos, resumen anual AnnualByCompaniesDueDebtMode=Balance de ingresos y gastos, detalle por grupos predefinidos, modo <b>%sClaims-Deudas%s </b> dicho <b> Compromiso de contabilidad </b>. AnnualByCompaniesInputOutputMode=Balance de ingresos y gastos, detalle por grupos predefinidos, modo <b>%sIngresos-Gastos%s </b> dicho <b> contabilidad de caja </b>. -SeeReportInInputOutputMode=Vea %s el análisis de pagos %s para cálcular los pagos efectuados, incluso si aún no se contabilizaron en el Libro mayor. -SeeReportInDueDebtMode=Vea %s el análisis de facturas %s para un cálculo basado en facturas registradas conocidas, incluso si aún no se contabilizaron en el Libro mayor. -SeeReportInBookkeepingMode=Consulte el informe <b>%s Libro Mayor %s </b> para un cálculo en <b> la tabla contable del Libro Mayor </b> RulesAmountWithTaxIncluded=Los importes mostrados son con todos los impuestos incluidos RulesResultDue=- Incluye facturas pendientes, gastos, IVA, donaciones ya sean pagadas o no. También incluye salarios pagados. <br>- se basa en la fecha de facturación de las facturas y en la fecha de vencimiento de los gastos o pagos de impuestos. Para los salarios definidos con el módulo Salario, se utiliza la fecha de pago del valor. RulesResultInOut=Incluye los pagos reales realizados en facturas, gastos, IVA y sueldos. <br> - Se basa en las fechas de pago de las facturas, gastos, IVA y salarios. la fecha de donación para la donación. diff --git a/htdocs/langs/es_EC/cron.lang b/htdocs/langs/es_EC/cron.lang index 1bcb97a8f7b..7dbff235dc7 100644 --- a/htdocs/langs/es_EC/cron.lang +++ b/htdocs/langs/es_EC/cron.lang @@ -4,8 +4,6 @@ Permission23102 =Crear / actualizar trabajo programado Permission23103 =Eliminar trabajo programado Permission23104 =Ejecutar trabajo programado CronSetup=Configuración de administración de trabajos programada -URLToLaunchCronJobs=URL para verificar e iniciar trabajos calificados de cron -OrToLaunchASpecificJob=O para comprobar y lanzar un trabajo específico KeyForCronAccess=Clave de seguridad para la URL para iniciar trabajos cron FileToLaunchCronJobs=Línea de comandos para comprobar y poner en marcha trabajos calificados de cron CronExplainHowToRunUnix=En el entorno Unix, debe utilizar la siguiente entrada crontab para ejecutar la línea de comandos cada 5 minutos @@ -41,7 +39,6 @@ CronArgs=Parámetros CronSaveSucess=Guardado exitosamente CronFieldMandatory=Los campos%s son obligatorios CronErrEndDateStartDt=La fecha de finalización no puede ser anterior a la fecha de inicio -CronStatusActiveBtn=Habilitar CronStatusInactiveBtn=En rehabilitación CronTaskInactive=Este trabajo está deshabilitado CronId=Carné de identidad diff --git a/htdocs/langs/es_EC/errors.lang b/htdocs/langs/es_EC/errors.lang index d857d9acdeb..50196eff061 100644 --- a/htdocs/langs/es_EC/errors.lang +++ b/htdocs/langs/es_EC/errors.lang @@ -59,7 +59,6 @@ ErrorExportDuplicateProfil=Este nombre de perfil ya existe para este conjunto de ErrorLDAPSetupNotComplete=Dolibarr-LDAP no está completo. ErrorLDAPMakeManualTest=Se ha generado un archivo .ldif en el directorio%s. Trate de cargarlo manualmente desde la línea de comandos para obtener más información sobre los errores. ErrorCantSaveADoneUserWithZeroPercentage=No se puede guardar una acción con "estado no iniciado" si el campo "hecho por" también se llena. -ErrorRefAlreadyExists=La referencia usada para la creación ya existe. ErrorPleaseTypeBankTransactionReportName=Ingrese el nombre del extracto bancario donde se debe informar la entrada (Formato AAAAMM o AAAAMMDD) ErrorRecordHasChildren=Error al eliminar el registro ya que tiene algunos registros secundarios. ErrorRecordHasAtLeastOneChildOfType=El objeto tiene al menos un hijo del tipo%s @@ -178,7 +177,6 @@ ErrorObjectMustHaveLinesToBeValidated=El objeto%s debe tener líneas a validar. ErrorOnlyInvoiceValidatedCanBeSentInMassAction=Sólo se pueden enviar facturas validadas mediante la acción masiva "Enviar por correo electrónico". ErrorDiscountLargerThanRemainToPaySplitItBefore=El descuento que usted intenta aplicar es más grande que permanecer para pagar. Divida el descuento en 2 descuentos más pequeños antes. ErrorFileNotFoundWithSharedLink=Archivo no fue encontrado. Puede ser que la clave compartida se haya modificado o que el archivo se haya eliminado recientemente. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Tenga en cuenta que no es posible utilizar productos virtuales para aumentar/disminuir automáticamente subproductos cuando al menos un subproducto (o subproducto de subproductos) necesita un número de serie/lote. ErrorDescRequiredForFreeProductLines=La descripción es obligatoria para campos con producto gratis ErrorDuringChartLoad=Error al cargar el plan de cuentas. Si no se cargaron algunas cuentas, aún puede ingresarlas manualmente. ErrorBadSyntaxForParamKeyForContent=Mala sintaxis para param keyforcontent. Debe tener un valor que comience con %s o %s diff --git a/htdocs/langs/es_EC/mails.lang b/htdocs/langs/es_EC/mails.lang index b24a2b0d5f6..d726c01c4b9 100644 --- a/htdocs/langs/es_EC/mails.lang +++ b/htdocs/langs/es_EC/mails.lang @@ -95,12 +95,6 @@ TagSignature=Firma del usuario enviado EMailRecipient=Receptor de E-mail TagMailtoEmail=Correo electrónico del destinatario (incluido el enlace html "mailto:") NoEmailSentBadSenderOrRecipientEmail=No hay correo electrónico enviado. Correo electrónico incorrecto del remitente o del destinatario. Verifique el perfil de usuario. -NoNotificationsWillBeSent=No hay notificaciones por correo electrónico para este evento y la empresa -ANotificationsWillBeSent=Se enviará una notificación por correo electrónico -SomeNotificationsWillBeSent=Las notificaciones de %s se enviarán por correo electrónico -AddNewNotification=Activar un nuevo destino / evento de notificación por correo electrónico -ListOfActiveNotifications=Lista todos los destinos / eventos activos para la notificación por correo electrónico -ListOfNotificationsDone=Lista todas las notificaciones por correo electrónico enviadas MailSendSetupIs=La configuración del envío de correo electrónico se ha configurado en '%s'. Este modo no se puede utilizar para enviar correos electrónicos masivos. MailSendSetupIs2=Primero debe ir, con una cuenta de administrador, al menú %s Home - Setup - EMails%s para cambiar el parámetro <strong> '%s' </strong> para usar el modo '%s'. Con este modo, puede ingresar la configuración del servidor SMTP proporcionado por su proveedor de servicios de Internet y usar la función de correo electrónico masivo. MailSendSetupIs3=Si tiene alguna pregunta sobre cómo configurar su servidor SMTP, puede preguntar a %s. @@ -109,7 +103,6 @@ NbOfTargetedContacts=Número actual de correos electrónicos de contacto UseFormatFileEmailToTarget=El archivo importado debe tener formato <strong> correo electrónico; nombre; nombre; otro </ strong> UseFormatInputEmailToTarget=Introduzca una cadena con formato <strong> correo electrónico; nombre; nombre; otro </strong> AdvTgtTitle=Rellene los campos de entrada para preseleccionar los clientes/proveedores o contactos/direcciones de destino -AdvTgtSearchTextHelp=Utilizar como comodines %%. Por ejemplo, para encontrar todos los elementos como <b>jean, joe, jim</b>, puede ingresar <b>j%%</b>, también puede usar ; como separador de valor, y uso ! para excepto este valor. Por ejemplo, <b>jean;joe;jim%%;!Jimo;!Jima%</b> apuntará a todos los jean, joe, comienza con jim pero no jimo y no todo lo que comienza con jima AdvTgtSearchIntHelp=Utilice el intervalo para seleccionar el valor int o float AdvTgtMaxVal=Valor máximo AdvTgtSearchDtHelp=Usar el intervalo para seleccionar el valor de fecha @@ -123,7 +116,5 @@ AdvTgtAddContact=Añadir emails según criterio. AdvTgtLoadFilter=Filtro de carga NoContactWithCategoryFound=No hay contacto/dirección con una categoría encontrada NoContactLinkedToThirdpartieWithCategoryFound=No hay contacto/dirección con una categoría encontrada -OutGoingEmailSetup=Configuración de correo saliente -InGoingEmailSetup=Configuración de correo entrante ContactsWithThirdpartyFilter=Contactos con filtro de terceros Answered=Contestada diff --git a/htdocs/langs/es_EC/main.lang b/htdocs/langs/es_EC/main.lang index f7bc16c0fc9..8452c16f0ec 100644 --- a/htdocs/langs/es_EC/main.lang +++ b/htdocs/langs/es_EC/main.lang @@ -22,6 +22,7 @@ FormatDateHourText=%d %B %Y %H:%M DatabaseConnection=Conexión con la base de datos NoTemplateDefined=No hay plantilla disponible para este tipo de correo electrónico AvailableVariables=Variables de sustitución disponibles +CurrentTimeZone=Zona horaria PHP (servidor) NoRecordFound=Ningún registro encontrado NoRecordDeleted=Ningún registro eliminado NoError=No hay error @@ -64,6 +65,7 @@ FileWasNotUploaded=Se ha seleccionado un archivo para adjuntarlo, pero todavía NbOfEntries=Numero de entradas GoToWikiHelpPage=Lea la ayuda en línea (acceso a Internet es necesario) GoToHelpPage=Leer la ayuda +HomePage=Página Principal DolibarrInHttpAuthenticationSoPasswordUseless=El modo de autenticación Dolibarr está configurado en <b>%s</b> en el archivo de configuración <b>conf.php</b>. <br> Esto significa que la base de datos de contraseñas es externa a Dolibarr, por lo que cambiar este campo puede no tener efecto. Undefined=Indefinido PasswordForgotten=¿Contraseña olvidada? @@ -102,6 +104,7 @@ RemoveLink=Retire enlace AddToDraft=Añadir a redactar Update=Actualizar Close=Cerrado +CloseAs=Establecer el estado en CloseBox=Retire widget desde su panel de control ConfirmSendCardByMail=¿Realmente desea enviar el contenido de esta tarjeta por correo a <b>%s</b>? Delete=Borrar diff --git a/htdocs/langs/es_EC/modulebuilder.lang b/htdocs/langs/es_EC/modulebuilder.lang index ffad475bff9..3c61371c2a3 100644 --- a/htdocs/langs/es_EC/modulebuilder.lang +++ b/htdocs/langs/es_EC/modulebuilder.lang @@ -48,7 +48,6 @@ SqlFileKey=Archivo SQL para las claves SqlFileKeyExtraFields=Archivo SQL para claves de atributos complementarios UseAsciiDocFormat=Puede usar el formato Markdown, pero se recomienda usar el formato Asciidoc (omparison entre .md y .asciidoc: http://asciidoctor.org/docs/user-manual/#compared-to-markdown) NoTrigger=Sin disparador -GoToApiExplorer=Ir a explorador de API ListOfDictionariesEntries=Lista de entradas de diccionarios ListOfPermissionsDefined=Lista de permisos definidos SeeExamples=Ver ejemplos aquí @@ -83,7 +82,6 @@ UseSpecificEditorURL =Use una URL de editor específica UseSpecificFamily =Use una familia específica UseSpecificAuthor =Use un autor específico UseSpecificVersion =Use una versión inicial específica -ModuleMustBeEnabled=El módulo / aplicación debe habilitarse primero IncludeDocGenerationHelp=Si marca esto, se generará algún código para agregar un cuadro "Generar documento" en el registro. ShowOnCombobox=Mostrar valor en el cuadro combinado KeyForTooltip=Clave para información sobre herramientas diff --git a/htdocs/langs/es_EC/products.lang b/htdocs/langs/es_EC/products.lang index 59bf558386b..c75401d2e14 100644 --- a/htdocs/langs/es_EC/products.lang +++ b/htdocs/langs/es_EC/products.lang @@ -61,6 +61,7 @@ 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 @@ -102,7 +103,6 @@ NewRefForClone=Árbitro. de nuevo producto/servicio CustomerPrices=Precios de los clientes SuppliersPrices=Precios del proveedor SuppliersPricesOfProductsOrServices=Precios de proveedor (de productos o servicios) -CustomCode=Código de Aduanas / Productos / HS Nature=Naturaleza del producto (material / acabado) g=gramo m=metro @@ -116,7 +116,6 @@ AlwaysUseFixedPrice=Utilizar el precio fijo PriceByQuantity=Diferentes precios por cantidad DisablePriceByQty=Deshabilitar precios por cantidad PriceByQuantityRange=Rango Cantidad -MultipriceRules=Reglas del segmento de precios UseMultipriceRules=Utilice las reglas de segmento de precios (definidas en la configuración del módulo del producto) para calcular automáticamente los precios de todos los demás segmentos de acuerdo con el primer segmento KeepEmptyForAutoCalculation=Manténgase vacío para que esto se calcule automáticamente de peso o volumen de productos VariantRefExample=Ejemplos: COL, TAMAÑO diff --git a/htdocs/langs/es_EC/projects.lang b/htdocs/langs/es_EC/projects.lang index ec9d4afe521..593d95f821b 100644 --- a/htdocs/langs/es_EC/projects.lang +++ b/htdocs/langs/es_EC/projects.lang @@ -46,10 +46,6 @@ AddTimeSpent=Crear tiempo AddHereTimeSpentForDay=Añadir aquí el tiempo dedicado a este día/tarea Activities=Tareas / actividades MyProjectsArea=Mis proyectos -ProgressDeclared=Progreso declarado -TheReportedProgressIsLessThanTheCalculatedProgressionByX=El progreso declarado es menos %s que la progresión calculada -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=El progreso declarado es más %s que la progresión calculada -ProgressCalculated=Progreso calculado Time=Hora ListOfTasks=Lista de tareas GoToListOfTimeConsumed=Ir a la lista de tiempo consumido @@ -116,6 +112,7 @@ OpportunityProbability=Probabilidad de clientes potenciales OpportunityProbabilityShort=Probabilidad de plomo. OpportunityAmount=Cantidad de clientes potenciales OpportunityAmountShort=Cantidad de clientes potenciales +OpportunityWeightedAmountShort=Opp. cantidad ponderada OpportunityAmountAverageShort=Cantidad de plomo promedio OpportunityAmountWeigthedShort=Cantidad de plomo ponderada WonLostExcluded=Ganado/perdido excluido diff --git a/htdocs/langs/es_EC/sendings.lang b/htdocs/langs/es_EC/sendings.lang index 08d25169ac0..db824ebf01e 100644 --- a/htdocs/langs/es_EC/sendings.lang +++ b/htdocs/langs/es_EC/sendings.lang @@ -17,6 +17,7 @@ OtherSendingsForSameOrder=Otros envíos para este pedido SendingsAndReceivingForSameOrder=Envíos y recibos para este pedido SendingsToValidate=Envíos para validar StatusSendingCanceled=Cancelado +StatusSendingCanceledShort=Cancelado StatusSendingValidated=Validado (productos para enviar o ya enviar) StatusSendingProcessed=Procesada StatusSendingValidatedShort=validado diff --git a/htdocs/langs/es_EC/ticket.lang b/htdocs/langs/es_EC/ticket.lang index 1b7ecded84a..ae99f099a88 100644 --- a/htdocs/langs/es_EC/ticket.lang +++ b/htdocs/langs/es_EC/ticket.lang @@ -5,14 +5,12 @@ TicketDictType=Tipos - Tickets TicketDictCategory=Ticket - Grupos TicketDictSeverity=Ticket - Prioridades TicketTypeShortISSUE=Problema o Error -TicketSeverityShortBLOCKING=Crítico/Bloqueo ErrorBadEmailAddress=Campo '%s' incorrecto MenuListNonClosed=Tikests abiertos TypeContact_ticket_internal_CONTRIBUTOR=Contribuyente TypeContact_ticket_external_SUPPORTCLI=Contacto con el cliente / seguimiento de incidentes OriginEmail=Origen del correo electrónico Notify_TICKET_SENTBYMAIL=Enviar mensaje del ticket por correo electrónico -NotRead=No leer Read=Leer NeedMoreInformation=Esperando información Waiting=Esperando diff --git a/htdocs/langs/es_EC/withdrawals.lang b/htdocs/langs/es_EC/withdrawals.lang index ba83f5af30c..baadc69e3b1 100644 --- a/htdocs/langs/es_EC/withdrawals.lang +++ b/htdocs/langs/es_EC/withdrawals.lang @@ -77,6 +77,7 @@ 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 62560e80262..cdfb3c7cb51 100644 --- a/htdocs/langs/es_ES/accountancy.lang +++ b/htdocs/langs/es_ES/accountancy.lang @@ -16,9 +16,11 @@ ThisService=Este servicio ThisProduct=Este producto DefaultForService=Predeterminado para el servicio DefaultForProduct=Predeterminado para el producto +ProductForThisThirdparty=Producto para este tercero +ServiceForThisThirdparty=Servicio para este tercero CantSuggest=No se puede sugerir AccountancySetupDoneFromAccountancyMenu=La mayor parte de la configuración de la contabilidad se realiza desde el menú %s -ConfigAccountingExpert=Configuración de la contabilidad del módulo (doble entrada) +ConfigAccountingExpert=Configuración del módulo contable (doble partida) Journalization=Procesar diarios Journals=Diarios JournalFinancial=Diarios financieros @@ -48,6 +50,7 @@ CountriesExceptMe=Todos los países excepto %s AccountantFiles=Exportar documentos de origen ExportAccountingSourceDocHelp=Con esta herramienta, puede exportar los eventos de origen (lista y PDF) que se utilizaron para generar su contabilidad. Para exportar sus diarios, use la entrada de menú %s - %s. VueByAccountAccounting=Ver por cuenta contable +VueBySubAccountAccounting=Ver por subcuenta contable MainAccountForCustomersNotDefined=Cuenta contable para clientes no definida en la configuración MainAccountForSuppliersNotDefined=Cuenta contable para proveedores no definida en la configuración @@ -144,7 +147,7 @@ NotVentilatedinAccount=Cuenta sin contabilización en la contabilidad XLineSuccessfullyBinded=%s productos/servicios relacionada correctamente a una cuenta contable XLineFailedToBeBinded=%s productos/servicios sin cuenta contable -ACCOUNTING_LIMIT_LIST_VENTILATION=Número de elementos a contabilizar que se muestran por página (máximo recomendado: 50) +ACCOUNTING_LIMIT_LIST_VENTILATION=Número máximo de líneas en la lista y la página de enlace (recomendado: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Ordenar las páginas de contabilización "A contabilizar" por los elementos más recientes ACCOUNTING_LIST_SORT_VENTILATION_DONE=Ordenar las páginas de contabilización "Contabilizadas" por los elementos más recientes @@ -177,28 +180,29 @@ ACCOUNTING_ACCOUNT_SUSPENSE=Cuenta operaciones pendientes de asignar DONATION_ACCOUNTINGACCOUNT=Cuenta contable para registrar donaciones ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Cuenta contable para registrar subscripciones -ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT=Cuenta contable por defecto para registrar el depósito del cliente +ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT=Cuenta contable por defecto para registrar el anticipo del cliente -ACCOUNTING_PRODUCT_BUY_ACCOUNT=Cuenta contable predeterminada para los productos comprados (si no se define en el producto) -ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=Cuenta contable por defecto para los productos comprados en EEC (se usa si no se define en la hoja de productos) -ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT=Cuenta contable por defecto para los productos comprados e importados fuera de la EEC (usado si no está definido en la hoja de productos) -ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Cuenta contable predeterminada para los productos vendidos (si no se define en el producto) -ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT=Cuenta contable predeterminada para los productos vendidos en la CEE (si no se define en el producto) -ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT=Cuenta contable predeterminada para los productos vendidos fuera de la CEE (si no se define en el producto) +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Cuenta contable predeterminada para los productos comprados (usada si no se define en el producto) +ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=Cuenta contable por defecto para los productos comprados en CEE (usada si no se define en el producto) +ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT=Cuenta contable por defecto para los productos comprados e importados fuera de la CEE (usada si no se define en el producto) +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Cuenta contable predeterminada para los productos vendidos (usada si no se define en el producto) +ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT=Cuenta contable predeterminada para los productos vendidos en la CEE (usada si no se define en el producto) +ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT=Cuenta contable predeterminada para los productos vendidos fuera de la CEE (usada si no se define en el producto) -ACCOUNTING_SERVICE_BUY_ACCOUNT=Cuenta contable predeterminada para los servicios comprados (si no se define en el servicio) -ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT=Cuenta contable por defecto para los servicios comprados en EEC (utilizada si no está definida en la hoja de servicios) -ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT=Cuenta contable por defecto para los servicios comprados e importados fuera de la CEE (se usa si no se define en la hoja de servicios) -ACCOUNTING_SERVICE_SOLD_ACCOUNT=Cuenta contable predeterminada para los servicios vendidos (si no se define en el servico) -ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT=Cuenta contable predeterminada para los servicios vendidos en la CEE (si no se define en el servico) -ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT=Cuenta contable predeterminada para los servicios vendidos fuera de la CEE (si no se define en el producto) +ACCOUNTING_SERVICE_BUY_ACCOUNT=Cuenta contable predeterminada para los servicios comprados (usada si no se define en el servicio) +ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT=Cuenta contable por defecto para los servicios comprados en CEE (usada si no se define en el servicio) +ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT=Cuenta contable por defecto para los servicios comprados e importados fuera de la CEE (usada si no se define en el servicio) +ACCOUNTING_SERVICE_SOLD_ACCOUNT=Cuenta contable predeterminada para los servicios vendidos (usada si no se define en el servicio) +ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT=Cuenta contable predeterminada para los servicios vendidos en la CEE (usada si no se define en el servicio) +ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT=Cuenta contable predeterminada para los servicios vendidos fuera de la CEE (usada si no se define en el producto) Doctype=Tipo de documento Docdate=Fecha Docref=Referencia LabelAccount=Descripción LabelOperation=Etiqueta operación -Sens=Sentido +Sens=Dirección +AccountingDirectionHelp=Para una cuenta contable de un cliente, use Crédito para registrar un pago que recibió <br> Para una cuenta contable de un proveedor, use Débito para registrar un pago que usted realice LetteringCode=Cogido de letras Lettering=Letras Codejournal=Diario @@ -206,7 +210,8 @@ JournalLabel=Etiqueta del diario NumPiece=Apunte TransactionNumShort=Núm. transacción AccountingCategory=Grupos personalizados -GroupByAccountAccounting=Agrupar por cuenta contable +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. ByAccounts=Por cuentas ByPredefinedAccountGroups=Por grupos predefinidos @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Pagos no vinculados a un producto/servicio OpeningBalance=Saldo inicial ShowOpeningBalance=Mostrar saldo inicial HideOpeningBalance=Ocultar saldo inicial -ShowSubtotalByGroup=Mostrar subtotal por grupo +ShowSubtotalByGroup=Mostrar subtotal por nivel Pcgtype=Grupo de cuenta PcgtypeDesc=Los grupos de cuentas se utilizan como criterios predefinidos de "filtro" y "agrupación" para algunos informes contables. Por ejemplo, 'INGRESOS' o 'GASTOS' se utilizan como grupos para las cuentas contables de productos para construir el informe de gastos / ingresos. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consulte aquí la lista de líneas de informes de gastos DescVentilExpenseReportMore=Si configura la cuentas contables de los tipos de informes de gastos, la aplicación será capaz de hacer el enlace entre sus líneas de informes de gastos y las cuentas contables, simplemente con un clic en el botón <strong>"%s"</strong> , Si no se ha establecido la cuenta contable en el diccionario o si todavía tiene algunas líneas no contabilizadas a alguna cuenta, tendrá que hacer una contabilización manual desde el menú "<strong>%s</strong>". DescVentilDoneExpenseReport=Consulte aquí las líneas de informes de gastos y sus cuentas contables +Closure=Cierre anual DescClosure=Consulte aquí el número de movimientos por mes que no están validados y los años fiscales ya abiertos OverviewOfMovementsNotValidated=Paso 1 / Resumen de movimientos no validados. (Necesario para cerrar un año fiscal) +AllMovementsWereRecordedAsValidated=Todos los movimientos se registraron como validados +NotAllMovementsCouldBeRecordedAsValidated=No todos los movimientos pueden registrarse como validados ValidateMovements=Validar movimientos DescValidateMovements=Se prohíbe cualquier modificación o eliminación de registros. Todas las entradas para un ejercicio deben validarse; de lo contrario, no será posible cerrarlo -SelectMonthAndValidate=Seleccionar mes y validar movimientos ValidateHistory=Vincular automáticamente AutomaticBindingDone=Vinculación automática finalizada @@ -293,6 +300,7 @@ Accounted=Contabilizada en el Libro Mayor NotYetAccounted=Aún no contabilizada en el Libro Mayor ShowTutorial=Ver Tutorial NotReconciled=No reconciliado +WarningRecordWithoutSubledgerAreExcluded=Advertencia, todas las operaciones sin una cuenta de libro mayor auxiliar definida se filtran y excluyen de esta vista ## Admin BindingOptions=Opciones de enlace @@ -332,15 +340,16 @@ Modelcsv_quadratus=Exportar a Quadratus QuadraCompta Modelcsv_ebp=Exportar a EBP Modelcsv_cogilog=Eportar a Cogilog Modelcsv_agiris=Exportar a Agiris -Modelcsv_LDCompta=Exportar para LD Compta (v9 y superior) (En pruebas) -Modelcsv_LDCompta10=Exportar para LD Compta (v10 & superior) +Modelcsv_LDCompta=Exportar a LD Compta (v9 y superior) (En pruebas) +Modelcsv_LDCompta10=Exportar a LD Compta (v10 & superior) Modelcsv_openconcerto=Exportar a OpenConcerto (En pruebas) Modelcsv_configurable=Exportación CSV Configurable Modelcsv_FEC=Exportación FEC +Modelcsv_FEC2=Exportar a FEC (con escritura de generación de fechas / documento invertido) Modelcsv_Sage50_Swiss=Exportación a Sage 50 Suiza -Modelcsv_winfic=Exportar Winfic - eWinfic - WinSis Compta -Modelcsv_Gestinumv3=Export for Gestinum (v3) -Modelcsv_Gestinumv5Export for Gestinum (v5) +Modelcsv_winfic=Exportar a Winfic - eWinfic - WinSis Compta +Modelcsv_Gestinumv3=Exportar a Gestinum (v3) +Modelcsv_Gestinumv5Export para Gestinum (v5) ChartofaccountsId=Id plan contable ## Tools - Init accounting account on product / service diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index 12d860d8ecc..81056fb58e1 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -56,6 +56,8 @@ GUISetup=Entorno SetupArea=Configuración UploadNewTemplate=Nueva(s) plantilla(s) actualizada(s) FormToTestFileUploadForm=Formulario de prueba de subida de archivo (según opciones elegidas) +ModuleMustBeEnabled=El módulo / aplicación <b> %s </b> debe estar habilitado +ModuleIsEnabled=Se ha habilitado el módulo / aplicación <b> %s </b> 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. @@ -73,7 +75,7 @@ DisableJavascriptNote=Nota: Para propósitos de prueba o depuración. Para la op UseSearchToSelectCompanyTooltip=También si tiene un gran número de terceros (> 100 000), puede aumentar la velocidad mediante el establecimiento COMPANY_DONOTSEARCH_ANYWHERE constante a 1 en Configuración-> Otros. La búsqueda será limitada a la creación de cadena. UseSearchToSelectContactTooltip=También si usted tiene un gran número de terceros (> 100 000), puede aumentar la velocidad mediante el establecimiento CONTACT_DONOTSEARCH_ANYWHERE constante a 1 en Configuración-> Otros. La búsqueda será limitada a la creación de cadena. DelaiedFullListToSelectCompany=Esperar a que presione una tecla antes de cargar el contenido de la lista combinada de terceros <br>Esto puede incrementar el rendimiento si tiene un gran número de terceros, pero es menos conveniente. -DelaiedFullListToSelectContact=Espera a que presione una tecla antes de cargar el contenido de la lista de contactos. <br> Esto puede incrementar el rendimiento si tiene un gran número de contactos, pero es menos conveniente. +DelaiedFullListToSelectContact=Esperar a que presione una tecla antes de cargar el contenido de la lista de contactos. <br> Esto puede incrementar el rendimiento si tiene un gran número de contactos, pero es menos conveniente. NumberOfKeyToSearch=Número de caracteres para desencadenar la búsqueda: %s NumberOfBytes=Número de Bytes SearchString=Buscar cadena @@ -85,7 +87,6 @@ ShowPreview=Ver vista previa ShowHideDetails=Mostrar-Ocultar detalles PreviewNotAvailable=Vista previa no disponible ThemeCurrentlyActive=Tema actualmente activo -CurrentTimeZone=Zona horaria PHP (Servidor) MySQLTimeZone=Zona horaria MySql (base de datos) TZHasNoEffect=Las fechas se guardan y devueltas por el servidor de base de datos tal y como si se las hubieran enviado como una cadena. La zona horaria solamente tiene efecto si se usa la función UNIX_TIMESTAMP (que no debe ser usada por Dolibarr, por lo que la zona horaria de la base de datos no debe tener efecto, aunque se haya cambiado después de introducir los datos). Space=Área @@ -103,7 +104,7 @@ NoMaxSizeByPHPLimit=Ninguna limitación interna en su servidor PHP MaxSizeForUploadedFiles=Tamaño máximo de los documentos a subir (0 para prohibir la subida) UseCaptchaCode=Utilización de código gráfico (CAPTCHA) en la página de inicio de sesión AntiVirusCommand=Ruta completa hacia el comando del antivirus -AntiVirusCommandExample=Ejemplo para ClamAv Daemon (requiere clamav-daemon): //usr/bin/clamdscan<br> Ejemplo para ClamWin (muy lento): c:\\Progra~1\\ClamWin\\bin\\clamscan.exe\n  +AntiVirusCommandExample=Ejemplo para ClamAv Daemon (requiere clamav-daemon): /usr/bin/clamdscan<br> Ejemplo para ClamWin (muy lento): c:\\Progra~1\\ClamWin\\bin\\clamscan.exe\n  AntiVirusParam= Parámetros complementarios en la línea de comandos AntiVirusParamExample=Ejemplo para ClamAv Daemon: --fdpass<br>Ejemplo para ClamWin: -- database="CC:\\Program Files (x86)\\ClamWin\\lib" ComptaSetup=Configuración del módulo Contabilidad @@ -153,8 +154,8 @@ 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 temporales (sin riesgo de perder datos). Nota: la eliminación se realiza solo si el directorio temporal se creó hace 24 horas. -PurgeDeleteTemporaryFilesShort=Eliminar archivos temporales +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. +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 PurgeNothingToDelete=Sin directorios o archivos a eliminar. @@ -203,7 +204,7 @@ FeatureDisabledInDemo=Opción deshabilitada en demo FeatureAvailableOnlyOnStable=Funcionaliad disponible únicamente en versiones oficiales estables BoxesDesc=Los paneles son componentes que muestran algunos datos que pueden añadirse para personalizar algunas páginas. Puede elegir entre mostrar o no el panel mediante la selección de la página de destino y haciendo clic en 'Activar', o haciendo clic en la papelera para desactivarlo. OnlyActiveElementsAreShown=Sólo los elementos de <a href="%s">módulos activados</a> son mostrados. -ModulesDesc=Los módulos/aplicaciones definen qué funcionalidad está habilitada en el software. Algunos módulos requieren permisos que se deben conceder a los usuarios después de activar el módulo. Haga clic en el botón de on/off <span class="small valignmiddle">%s</span>de cada módulo para habilitar o deshabilitar un módulo / aplicación. +ModulesDesc=Los módulos/aplicaciones definen qué funcionalidad está habilitada en el software. Algunos módulos requieren permisos que se deben conceder a los usuarios después de activar el módulo. Haga clic en el botón de on/off <span class="small valignmiddle">%s</span>de cada módulo para habilitar o deshabilitar un módulo/aplicación. ModulesMarketPlaceDesc=Puede encontrar más módulos para descargar en sitios web externos en Internet ... ModulesDeployDesc=Si los permisos en su sistema de archivos lo permiten, puede utilizar esta herramienta para instalar un módulo externo. El módulo estará entonces visible en la pestaña <strong>%s</strong>. ModulesMarketPlaces=Buscar módulos externos... @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Preferred Partners OtherResources=Otros recursos ExternalResources=Recursos externos SocialNetworks=Redes sociales +SocialNetworkId=ID de red social ForDocumentationSeeWiki=Para la documentación de usuario, desarrollador o Preguntas Frecuentes (FAQ), consulte el wiki Dolibarr: <br><b><a href="%s" target="_blank">%s</a></b> ForAnswersSeeForum=Para otras cuestiones o realizar sus propias consultas, puede utilizar el foro Dolibarr: <br><b><a href="%s" target="_blank">%s</a></b> HelpCenterDesc1=Aquí hay algunos recursos para obtener ayuda y soporte de Dolibarr @@ -274,7 +276,7 @@ NoticePeriod=Plazo de aviso NewByMonth=Nuevo por mes Emails=E-Mails EMailsSetup=Configuración e-mails -EMailsDesc=Esta página le permite definir las opciones para enviar e-mails. +EMailsDesc=Esta página le permite definir los parámetros u opciones para enviar e-mails. EmailSenderProfiles=Perfiles de remitentes de e-mails EMailsSenderProfileDesc=Puede mantener esta sección vacía. Si indica algunos e-mails aquí, se agregarán a la lista de posibles remitentes en el combobox cuando escriba un nuevo e-mail MAIN_MAIL_SMTP_PORT=Puerto del servidor SMTP (Por defecto en php.ini: <b>%s</b>) @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Ejemplos con la configuración actual ListOfDirectories=Listado de directorios de plantillas OpenDocument ListOfDirectoriesForModelGenODT=Listado de directorios que contienen las plantillas de archivos con el formato OpenDocument.<br>Ponga aquí la ruta completa de directorios.<br>Añada un retorno de carro entre cada directorio<br> Para agregar un directorio del módulo GED, agregue aquí <b>DOL_DATA_ROOT/ecm/sunombrededirectorio.</b><br><br>Los archivos de esos directorios deben terminar con <b>.odt</b> o <b>.ods</b>. NumberOfModelFilesFound=Número de archivos de plantillas ODT/ODS encontrados en estos directorios -ExampleOfDirectoriesForModelGen=Ejemplos de sintaxis:<br>c:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +ExampleOfDirectoriesForModelGen=Ejemplos de sintaxis: <br>c:\\myapp\\mydocumentdir\\mysubdir<br> /home/myapp/mydocumentdir/mysubdir <br> DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=Colocando los siguientes tags en la plantilla, obtendrá una sustitución con el valor personalizado al generar el documento: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Crear_un_modelo_de_documento_ODT FirstnameNamePosition=Orden visualización nombre/apellidos @@ -406,7 +408,7 @@ UrlGenerationParameters=Seguridad de las URLs SecurityTokenIsUnique=¿Usar un parámetro securekey único para cada URL? EnterRefToBuildUrl=Introduzca la referencia del objeto %s GetSecuredUrl=Obtener la URL calculada -ButtonHideUnauthorized=Ocultar botones de acciones no autorizadas a los usuarios no administradores en vez de mostrarlos atenuados +ButtonHideUnauthorized=Ocultar los botones de acción no autorizados también para los usuarios internos (solo en gris de lo contrario) OldVATRates=Tasa de IVA antigua NewVATRates=Tasa de IVA nueva PriceBaseTypeToChange=Cambiar el precio cuya referencia de base es @@ -668,7 +670,7 @@ Module54000Desc=La impresión directa (sin abrir los documentos) usa el interfaz Module55000Name=Encuesta o Voto Module55000Desc=Crea encuestas en línea, encuestas o votos (como Doodle, Studs, RDVz, etc.) Module59000Name=Márgenes -Module59000Desc=Módulo para gestionar los márgenes de beneficio +Module59000Desc=Módulo para seguir márgenes Module60000Name=Comisiones Module60000Desc=Módulo para gestionar las comisiones de venta Module62000Name=Incoterms @@ -1306,7 +1308,7 @@ YouUseBestDriver=Está usando el driver %s, actualmente es el mejor driver dispo YouDoNotUseBestDriver=Usa el driver %s aunque se recomienda usar el driver %s. NbOfObjectIsLowerThanNoPb=Solo tiene %s %s en la base de datos. Esto no requiere ninguna optimización particular. SearchOptim=Buscar optimización -YouHaveXObjectUseSearchOptim=Tiene %s %s en su base de datos. Debería añadir la constante %s a 1 en Inicio-Configuración-Varios, limitando la búsqueda al principio de la cadena lo que hace posible que la base de datos use el índice y se obtenga una respuesta inmediata. +YouHaveXObjectUseSearchOptim=Tiene %s %s en la base de datos. Puede agregar la constante %s a 1 en Inicio-Configuración-Otros. Limite la búsqueda al comienzo de las cadenas, lo que hace posible que la base de datos use índices y debería obtener una respuesta inmediata. YouHaveXObjectAndSearchOptimOn=Tiene %s %s en su base de datos y la constante %s configurada como 1 en Inicio-Configuración-Varios BrowserIsOK=Usa el navegador web %s. Este navegador está optimizado para la seguridad y el rendimiento. BrowserIsKO=Usa el navegador web %s. Este navegador es una mala opción para la seguridad, rendimiento y fiabilidad. Aconsejamos utilizar Firefox, Chrome, Opera o Safari. @@ -1314,7 +1316,7 @@ PHPModuleLoaded=El componente PHP %s está cargado PreloadOPCode=Se utiliza OPCode precargado AddRefInList=Mostrar código de cliente/proveedor en los listados (y selectores) y enlaces.<br>Los terceros aparecerán con el nombre "CC12345 - SC45678 - The big company coorp", en lugar de "The big company coorp". AddAdressInList=Mostrar la dirección del cliente/proveedor en los listados (y selectores) <br>Los terceros aparecerán con el nombre "The big company coorp - 21 jump street 123456 Big town - USA ", en lugar de "The big company coorp". -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=Mostrar e-mail de contacto (o teléfonos si no están definidos) y lista de información de la ciudad (lista de selección o cuadro combinado) <br> Los contactos aparecerán con un formato de nombre de "Dupond Durand - dupond.durand@email.com - Paris" o "Dupond Durand - 06 07 59 65 66 - Paris "en lugar de" Dupond Durand ". AskForPreferredShippingMethod=Consultar por el método preferido de envío a terceros. FieldEdition=Edición del campo %s FillThisOnlyIfRequired=Ejemplo: +2 (Complete sólo si se registra una desviación del tiempo en la exportación) @@ -1421,7 +1423,7 @@ AdherentMailRequired=E-Mail obligatorio para crear un miembro nuevo MemberSendInformationByMailByDefault=Casilla de verificación para enviar el correo de confirmación (validación ó nueva cotización) a los miembros es por defecto "sí" VisitorCanChooseItsPaymentMode=El visitante puede elegir entre los modos de pago disponibles MEMBER_REMINDER_EMAIL=Habilitar recordatorio de eventos <b>por e-mail</b> de suscripciones expiradas. Nota: El módulo <strong>%s</strong> debe estar habilitado y configurado correctamente para que el recordatorio se envíe. -MembersDocModules=Document templates for documents generated from member record +MembersDocModules=Plantillas de documentos para documentos generados a partir de registros de miembros ##### LDAP setup ##### LDAPSetup=Configuración del módulo LDAP LDAPGlobalParameters=Parámetros globales @@ -1596,8 +1598,13 @@ ServiceSetup=Configuración del módulo Servicios ProductServiceSetup=Configuración de los módulos Productos y Servicios NumberOfProductShowInSelect=Nº de productos máx. en las listas (0=sin límite) ViewProductDescInFormAbility=Visualización de las descripciones de los productos en los formularios (en caso contrario como tooltip) +DoNotAddProductDescAtAddLines=No agregue la descripción del producto (de la tarjeta del producto) al enviar, agregue líneas en los formularios +OnProductSelectAddProductDesc=Cómo utilizar la descripción de los productos al agregar un producto como una línea de un documento +AutoFillFormFieldBeforeSubmit=Autocompletar el campo de entrada de descripción con la descripción del producto +DoNotAutofillButAutoConcat=No autocompletar el campo de entrada con la descripción del producto. La descripción del producto se concatenará a la descripción ingresada automáticamente. +DoNotUseDescriptionOfProdut=La descripción del producto nunca se incluirá en la descripción de líneas de documentos. MergePropalProductCard=Activar en el producto/servicio la pestaña Documentos una opción para fusionar documentos PDF de productos al presupuesto PDF azur si el producto/servicio se encuentra en el presupuesto -ViewProductDescInThirdpartyLanguageAbility=Visualización de las descripciones de productos en el idioma del tercero +ViewProductDescInThirdpartyLanguageAbility=Mostrar descripciones de productos en formularios en el idioma del tercero (de lo contrario, en el idioma del usuario) UseSearchToSelectProductTooltip=También si usted tiene una gran cantidad de producto (> 100 000), puede aumentar la velocidad mediante el establecimiento PRODUCT_DONOTSEARCH_ANYWHERE constante a 1 en Configuración-> Otros. La búsqueda será limitada al inicio de la cadena. UseSearchToSelectProduct=Esperar a que presione una tecla antes de cargar el contenido de la lista combinada de productos (Esto puede incrementar el rendimiento si tiene un gran número de productos, pero es menos conveniente) SetDefaultBarcodeTypeProducts=Tipo de código de barras utilizado por defecto para los productos @@ -1672,7 +1679,7 @@ AdvancedEditor=Editor avanzado ActivateFCKeditor=Activar editor avanzado para : FCKeditorForCompany=Creación/edición WYSIWIG de la descripción y notas de los terceros FCKeditorForProduct=Creación/edición WYSIWIG de la descripción y notas de los productos/servicios -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=creación/edición WYSIWIG de líneas de detalle de productos para todas las entidades (propuestas, pedidos, facturas, etc ...). <span class="warning"> Advertencia: El uso de esta opción para este caso no se recomienda seriamente, ya que puede crear problemas con caracteres especiales y formato de página al crear archivos PDF. </span> FCKeditorForMailing= Creación/edición WYSIWIG de los E-Mails (Utilidades->E-Mailings) FCKeditorForUserSignature=Creación/edición WYSIWIG de la firma de usuarios FCKeditorForMail=Creación/edición WYSIWIG de todos los e-mails ( excepto Utilidades->E-Mailings) @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Menús personalizados no enlazados a un menú superio NewMenu=Nuevo menú MenuHandler=Gestor de menús MenuModule=Módulo origen -HideUnauthorizedMenu= Ocultar también los menús no autorizados a usuarios internos (si no sólo atenuados) +HideUnauthorizedMenu=Ocultar menús no autorizados también para usuarios internos (solo en gris de lo contrario) DetailId=Identificador del menú DetailMenuHandler=Nombre del gestor de menús DetailMenuModule=Nombre del módulo si la entrada del menú es resultante de un módulo @@ -1738,10 +1745,10 @@ AGENDA_USE_EVENT_TYPE_DEFAULT=Establecer automáticamente este valor por defecto AGENDA_DEFAULT_FILTER_TYPE=Establecer por defecto este tipo de evento en el filtro de búsqueda en la vista de la agenda AGENDA_DEFAULT_FILTER_STATUS=Establecer por defecto este estado de eventos en el filtro de búsqueda en la vista de la agenda AGENDA_DEFAULT_VIEW=Establecer la vista por defecto al seleccionar el menú 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=Habilitar el recordatorio de eventos <b> en el navegador del usuario </b> (Cuando se alcanza la fecha de recordatorio, el navegador muestra una ventana emergente. Cada usuario puede deshabilitar dichas notificaciones desde la configuración de notificaciones del navegador). AGENDA_REMINDER_BROWSER_SOUND=Activar sonido de notificación -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=Habilitar el recordatorio de eventos <b> por correo electrónico </b> (la opción de recordatorio/retraso se puede definir en cada evento). +AGENDA_REMINDER_EMAIL_NOTE=Nota: La frecuencia de la tarea %s debe ser suficiente para asegurarse de que los recordatorios se envíen en el momento correcto. AGENDA_SHOW_LINKED_OBJECT=Mostrar el link en la agenda ##### Clicktodial ##### ClickToDialSetup=Configuración del módulo Click To Dial @@ -1763,7 +1770,7 @@ StockDecreaseForPointOfSaleDisabled=Decremento de stock desde TPV desactivado StockDecreaseForPointOfSaleDisabledbyBatch=El decremento de stock en TPV no es compatible con la gestión de lotes (actualmente activado), por lo que el decremento de stock está desactivado. CashDeskYouDidNotDisableStockDecease=Usted no ha desactivado el decremento de stock al hacer una venta desde TPV. Así que se requiere un almacén. CashDeskForceDecreaseStockLabel=La disminución de existencias para productos por lotes fue forzada. -CashDeskForceDecreaseStockDesc=Disminuir primero lo más antiguo en las fechas de compra y venta. +CashDeskForceDecreaseStockDesc=Disminuir primero por las fechas más antiguas de caducidad y venta. CashDeskReaderKeyCodeForEnter=Código de clave para "Enter" definido en el lector de código de barras (Ejemplo: 13) ##### Bookmark ##### BookmarkSetup=Configuración del módulo Marcadores @@ -1983,11 +1990,12 @@ EMailHost=Host del servidor de e-mail IMAP MailboxSourceDirectory=Directorio fuente del buzón MailboxTargetDirectory=Directorio de destino del buzón EmailcollectorOperations=Operaciones a realizar por el colector +EmailcollectorOperationsDesc=Las operaciones se ejecutan de arriba hacia abajo. MaxEmailCollectPerCollect=Número máximo de e-mails recolectados por la recolección CollectNow=Recoger ahora ConfirmCloneEmailCollector=¿Está seguro de que desea clonar el recolector de e-mails %s? -DateLastCollectResult=Fecha de última recolección probada -DateLastcollectResultOk=Fecha última recolección exitosa +DateLastCollectResult=Fecha del último intento de recopilación +DateLastcollectResultOk=Fecha del último éxito de recopilación LastResult=Último resultado EmailCollectorConfirmCollectTitle=Confirmación recolección e-mail EmailCollectorConfirmCollect=¿Desea ejecutar la recolección de este recolector ahora? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Mensaje de una conversación iniciada por un primer e-mail env WithoutDolTrackingID=Mensaje de una conversación iniciada por un primer e-mail NO enviado desde Dolibarr WithDolTrackingIDInMsgId=Mensaje enviado desde Dolibarr WithoutDolTrackingIDInMsgId=Mensaje NO enviado desde Dolibarr -CreateCandidature=Crear candidatura +CreateCandidature=Crear solicitud de empleo FormatZip=Código postal MainMenuCode=Código de entrada del menú (menú principal) ECMAutoTree=Mostrar arbol automático GED @@ -2065,7 +2073,7 @@ NotAPublicIp=No es una IP pública MakeAnonymousPing=Realice un Ping anónimo '+1' al servidor de la base Dolibarr (realizado 1 vez tras la instalación) para permitir que la base cuente la cantidad de instalación de Dolibarr. FeatureNotAvailableWithReceptionModule=Función no disponible cuando el módulo Recepción está activado EmailTemplate=Plantilla para e-mail -EMailsWillHaveMessageID=Los correos electrónicos tendrán una etiqueta 'Referencias' que coincida con esta sintaxis +EMailsWillHaveMessageID=Los e-mais tendrán una etiqueta 'Referencias' que coincida con esta sintaxis 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 @@ -2076,10 +2084,14 @@ MeasuringScaleDesc=La escala es el número de lugares que tiene que mover la par TemplateAdded=Plantilla añadida TemplateUpdated=Plantilla actualizada TemplateDeleted=Plantilla eliminada -MailToSendEventPush=Correo electrónico de recordatorio de evento +MailToSendEventPush=E-mail de recordatorio de evento SwitchThisForABetterSecurity=Cambiar el valor a %s es lo recomendado para una mayor seguridad 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. 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 diff --git a/htdocs/langs/es_ES/agenda.lang b/htdocs/langs/es_ES/agenda.lang index ecf2af5c4f4..ecf81d8bad2 100644 --- a/htdocs/langs/es_ES/agenda.lang +++ b/htdocs/langs/es_ES/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Número de eventos ListOfActions=Listado de eventos EventReports=Informes de eventos Location=Localización -ToUserOfGroup=Event assigned to any user in group +ToUserOfGroup=Evento asignado a cualquier usuario del grupo EventOnFullDay=Evento para todo el día MenuToDoActions=Eventos incompletos MenuDoneActions=Eventos terminados @@ -63,7 +63,7 @@ ShipmentClassifyClosedInDolibarr=Expedición %s clasificada como pagada ShipmentUnClassifyCloseddInDolibarr=Envío %s clasificado como reabierto ShipmentBackToDraftInDolibarr=Envío %s ha sido devuelto al estado de borrador ShipmentDeletedInDolibarr=Expedición %s eliminada -ReceptionValidatedInDolibarr=Reception %s validated +ReceptionValidatedInDolibarr=Recepción %s validada OrderCreatedInDolibarr=Pedido %s creado OrderValidatedInDolibarr=Pedido %s validado OrderDeliveredInDolibarr=Pedido %s clasificado como enviado @@ -86,8 +86,8 @@ ProposalDeleted=Presupuesto eliminado OrderDeleted=Pedido eliminado InvoiceDeleted=Factura eliminada DraftInvoiceDeleted=Borrador de factura eliminado -CONTACT_CREATEInDolibarr=Contact %s created -CONTACT_DELETEInDolibarr=Contact %s deleted +CONTACT_CREATEInDolibarr=Contacto %s creado +CONTACT_DELETEInDolibarr=Contacto %s eliminado PRODUCT_CREATEInDolibarr=Producto %s creado PRODUCT_MODIFYInDolibarr=Producto %s modificado PRODUCT_DELETEInDolibarr=Producto %s eliminado @@ -152,6 +152,7 @@ ActionType=Tipo de evento DateActionBegin=Fecha de inicio del evento ConfirmCloneEvent=¿Esta seguro de querer clonar el evento <b>%s</b>? RepeatEvent=Repetir evento +OnceOnly=Una sola vez EveryWeek=Cada semana EveryMonth=Cada mes DayOfMonth=Día del mes @@ -160,9 +161,9 @@ DateStartPlusOne=Fecha inicio +1 hora SetAllEventsToTodo=Establecer todos los eventos para hacer SetAllEventsToInProgress=Establecer todos los eventos en progreso SetAllEventsToFinished=Establecer todos los eventos para finalizar -ReminderTime=Reminder period before the event -TimeType=Duration type -ReminderType=Callback type -AddReminder=Create an automatic reminder notification for this event -ErrorReminderActionCommCreation=Error creating the reminder notification for this event -BrowserPush=Browser Notification +ReminderTime=Período de recordatorio antes del evento +TimeType=Tipo de duración +ReminderType=Tipo de devolución de llamada +AddReminder=Crea una notificación de recordatorio automática para este evento +ErrorReminderActionCommCreation=Error al crear la notificación de recordatorio para este evento +BrowserPush=Notificación emergente del navegador diff --git a/htdocs/langs/es_ES/banks.lang b/htdocs/langs/es_ES/banks.lang index 38c78945dc7..748edda9c76 100644 --- a/htdocs/langs/es_ES/banks.lang +++ b/htdocs/langs/es_ES/banks.lang @@ -173,10 +173,11 @@ SEPAMandate=Mandato SEPA 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=Caja de efectivo POS -NewCashFence=Nueva Caja de efectivo +CashControl=Cierre de caja del POS +NewCashFence=Nuevo cierre de 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=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. +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 diff --git a/htdocs/langs/es_ES/blockedlog.lang b/htdocs/langs/es_ES/blockedlog.lang index 3e23cf955d5..576218090d6 100644 --- a/htdocs/langs/es_ES/blockedlog.lang +++ b/htdocs/langs/es_ES/blockedlog.lang @@ -35,7 +35,7 @@ logDON_DELETE=Supresión lógica de la donación. logMEMBER_SUBSCRIPTION_CREATE=Suscripción de miembro creada logMEMBER_SUBSCRIPTION_MODIFY=Suscripción de miembro modificada logMEMBER_SUBSCRIPTION_DELETE=Suscripción miembro eliminación lógica -logCASHCONTROL_VALIDATE=Registro de la caja de efectivo +logCASHCONTROL_VALIDATE=Registro de cierres de caja BlockedLogBillDownload=Descarga de factura de cliente BlockedLogBillPreview=Vista previa de la factura del cliente BlockedlogInfoDialog=Detalles del registro diff --git a/htdocs/langs/es_ES/boxes.lang b/htdocs/langs/es_ES/boxes.lang index c5871f7db00..cc519ff040a 100644 --- a/htdocs/langs/es_ES/boxes.lang +++ b/htdocs/langs/es_ES/boxes.lang @@ -27,7 +27,7 @@ BoxTitleLastSuppliers=Últimos %s proveedores registrados BoxTitleLastModifiedSuppliers=Últimos %sproveedores modificados BoxTitleLastModifiedCustomers=Últimos %s clientes modificados BoxTitleLastCustomersOrProspects=Últimos %s clientes o clientes potenciales -BoxTitleLastCustomerBills=Últimas %s facturas de clientes modificadas +BoxTitleLastCustomerBills=Últimas %s facturas a clientes modificadas BoxTitleLastSupplierBills=Últimas %s facturas de proveedor modificadas BoxTitleLastModifiedProspects=Últimos %s presupuestos modificados BoxTitleLastModifiedMembers=Últimos %s miembros @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=Últimas %s donaciones modificadas BoxTitleLastModifiedExpenses=Últimos %s informes de gastos modificados BoxTitleLatestModifiedBoms=Últimas %s Listas de materiales modificadas BoxTitleLatestModifiedMos=Últimas %s Órdenes de Fabricación modificadas +BoxTitleLastOutstandingBillReached=Clientes con máximo pendiente superado BoxGlobalActivity=Actividad global BoxGoodCustomers=Buenos clientes BoxTitleGoodCustomers=%s buenos clientes +BoxScheduledJobs=Tareas programadas +BoxTitleFunnelOfProspection=Embudo de oportunidad FailedToRefreshDataInfoNotUpToDate=Error al actualizar el RSS. Último refresco correcto: %s LastRefreshDate=Último refresco NoRecordedBookmarks=No hay marcadores personales. @@ -83,8 +86,8 @@ BoxTitleLatestModifiedSupplierOrders=Últimos %s pedidos de clientes modificados BoxTitleLastModifiedCustomerBills=Últimas %s facturas a clientes modificadas BoxTitleLastModifiedCustomerOrders=Últimos %s pedidos de clientes modificados BoxTitleLastModifiedPropals=Últimos %s presupuestos modificados -BoxTitleLatestModifiedJobPositions=Latest %s modified jobs -BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures +BoxTitleLatestModifiedJobPositions=Últimos %s trabajos modificados +BoxTitleLatestModifiedCandidatures=Últimas %s candidaturas modificadas ForCustomersInvoices=Facturas a clientes ForCustomersOrders=Pedidos de clientes ForProposals=Presupuestos @@ -92,8 +95,8 @@ LastXMonthRolling=Los últimos %s meses consecutivos ChooseBoxToAdd=Añadir panel a su tablero BoxAdded=El widget fué agregado a su panel de control BoxTitleUserBirthdaysOfMonth=Cumpleaños de este mes (usuarios) -BoxLastManualEntries=Últimas entradas manuales en contabilidad -BoxTitleLastManualEntries=%s últimas entradas manuales +BoxLastManualEntries=Último registro contable introducido manualmente o sin documento fuente +BoxTitleLastManualEntries=%s último registro ingresado manualmente o sin documento fuente NoRecordedManualEntries=Sin registros de entradas manuales en contabilidad BoxSuspenseAccount=Cuenta contable operación con cuenta suspendida BoxTitleSuspenseAccount=Número de líneas no asignadas @@ -102,5 +105,7 @@ SuspenseAccountNotDefined=La cuenta de suspenso no está definida BoxLastCustomerShipments=Últimos envíos a clientes BoxTitleLastCustomerShipments=Últimos %s envíos a clientes NoRecordedShipments=Ningún envío a clientes registrado +BoxCustomersOutstandingBillReached=Clientes con límite pendiente alcanzado # Pages AccountancyHome=Contabilidad +ValidatedProjects=Proyectos validados diff --git a/htdocs/langs/es_ES/cashdesk.lang b/htdocs/langs/es_ES/cashdesk.lang index bf0b61bff10..d9501021ef0 100644 --- a/htdocs/langs/es_ES/cashdesk.lang +++ b/htdocs/langs/es_ES/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=Módulo POS BasicPhoneLayout=Utilizar diseño básico para teléfonos. SetupOfTerminalNotComplete=La configuración del terminal %s no está completa DirectPayment=Pago directo -DirectPaymentButton=Add a "Direct cash payment" button +DirectPaymentButton=Añadir un botón "Pago directo en efectivo" InvoiceIsAlreadyValidated=La factura ya está validada NoLinesToBill=No hay líneas para facturar CustomReceipt=Recibo personalizado @@ -94,31 +94,33 @@ TakeposConnectorMethodDescription=Módulo externo para impresión directa. PrintMethod=Método de impresión ReceiptPrinterMethodDescription=Método potente con muchos parámetros. Completamente personalizable con plantillas. No se puede imprimir desde la nube. ByTerminal=Por terminal -TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad +TakeposNumpadUsePaymentIcon=Usar icono de pago en lugar del texto en los botones de pago del teclado numérico CashDeskRefNumberingModules=Módulo de numeración para el TPV CashDeskGenericMaskCodes6 = <br><b>{TN}</b> tag es usado para añadir el número de terminal TakeposGroupSameProduct=Agrupar mismas líneas de producto StartAParallelSale=Nueva venta simultánea  -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Cierre de caja +SaleStartedAt=Oferta comenzada en %s +ControlCashOpening=Controle la ventana emergente de efectivo al abrir POS +CloseCashFence=Control de cierre de caja CashReport=Arqueo MainPrinterToUse=Impresora principal OrderPrinterToUse=Impresora de pedido MainTemplateToUse=Plantilla de impresión OrderTemplateToUse=Plantilla de impresión para pedidos BarRestaurant=Bar Restaurante -AutoOrder=Order by the customer himself +AutoOrder=Auto pedido RestaurantMenu=Carta CustomerMenu=Carta de cliente -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 +ScanToMenu=Escanee el código QR para ver el menú +ScanToOrder=Escanee el código QR para realizar un pedido +Appearance=Apariencia +HideCategoryImages=Ocultar imágenes de categoría +HideProductImages=Ocultar imágenes de productos +NumberOfLinesToShow=Número de líneas de imágenes para mostrar +DefineTablePlan=Definir plan de tablas +GiftReceiptButton=Agregar un botón "Ticket regalo" +GiftReceipt=Ticket regalo +ModuleReceiptPrinterMustBeEnabled=Debe activarse primero el módulo de impresora de tickets +AllowDelayedPayment=Permitir pago aplazado +PrintPaymentMethodOnReceipts=Imprimir método de pago en tickets|recibos +WeighingScale=Balanza diff --git a/htdocs/langs/es_ES/categories.lang b/htdocs/langs/es_ES/categories.lang index a48a95c6da2..b50d6c93e65 100644 --- a/htdocs/langs/es_ES/categories.lang +++ b/htdocs/langs/es_ES/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=Área etiquetas/categorías Proyectos UsersCategoriesArea=Área etiquetas/categorías Usuarios SubCats=Subcategorías CatList=Listado de etiquetas/categorías +CatListAll=Lista de etiquetas / categorías (todos los tipos) NewCategory=Nueva etiqueta/categoría ModifCat=Modificar etiqueta/categoría CatCreated=Etiqueta/categoría creada @@ -65,24 +66,30 @@ UsersCategoriesShort=Área etiquetas/categorías Usuarios StockCategoriesShort=Etiquetas/categorías almacenes ThisCategoryHasNoItems=Esta categoría no contiene ningún objeto CategId=Id etiqueta/categoría +ParentCategory=Etiqueta/categoría principal +ParentCategoryLabel=Etiqueta de etiqueta/categoría principal CatSupList=Listado de etiquetas/categorías de proveedores -CatCusList=Listado de etiquetas/categorías de clientes +CatCusList=Listado de etiquetas/categorías de clientes/potenciales CatProdList=Listado de etiquetas/categorías de productos CatMemberList=Listado de etiquetas/categorías de miembros CatContactList=Listado de etiquetas/categorías de contactos -CatSupLinks=Enlaces entre proveedores y etiquetas/categorías +CatProjectsList=Listado de etiquetas/categorías de proyectos +CatUsersList=Listado de etiquetas/categorías de usuarios +CatSupLinks=Vínculos entre proveedores y etiquetas/categorías CatCusLinks=Enlaces entre clientes/clientes potenciales y etiquetas/categorías CatContactsLinks=Enlaces entre contactos/direcciones y etiquetas/categorías CatProdLinks=Enlaces entre productos/servicios y etiquetas/categorías -CatProJectLinks=Enlaces entre proyectos y etiquetas/categorías +CatMembersLinks=Enlace entre miembros y etiquetas/categorías +CatProjectsLinks=Enlaces entre proyectos y etiquetas/categorías +CatUsersLinks=Vínculos entre usuarios y etiquetas/categorías DeleteFromCat=Eliminar de la etiqueta/categoría ExtraFieldsCategories=Campos adicionales CategoriesSetup=Configuración de etiquetas/categorías CategorieRecursiv=Enlazar con la etiqueta/categoría automáticamente CategorieRecursivHelp=Si la opción está activada, cuando agrega un producto a una subcategoría, el producto también se agregará a la categoría principal. AddProductServiceIntoCategory=Añadir el siguiente producto/servicio -AddCustomerIntoCategory=Assign category to customer -AddSupplierIntoCategory=Assign category to supplier +AddCustomerIntoCategory=Asignar categoría al cliente +AddSupplierIntoCategory=Asignar categoría a proveedor ShowCategory=Mostrar etiqueta/categoría ByDefaultInList=Por defecto en lista ChooseCategory=Elija una categoría diff --git a/htdocs/langs/es_ES/companies.lang b/htdocs/langs/es_ES/companies.lang index 6a1e2a35020..3a99ea2432b 100644 --- a/htdocs/langs/es_ES/companies.lang +++ b/htdocs/langs/es_ES/companies.lang @@ -124,7 +124,7 @@ ProfId1AT=Prof Id 1 (USt.-IdNr) ProfId2AT=Prof Id 2 (USt.-Nr) ProfId3AT=Prof Id 3 (Handelsregister-Nr.) ProfId4AT=- -ProfId5AT=EORI number +ProfId5AT=Número EORI ProfId6AT=- ProfId1AU=ABN ProfId2AU=- @@ -136,7 +136,7 @@ ProfId1BE=N° colegiado ProfId2BE=- ProfId3BE=- ProfId4BE=- -ProfId5BE=EORI number +ProfId5BE=Número EORI ProfId6BE=- ProfId1BR=- ProfId2BR=IE (Inscricao Estadual) @@ -144,11 +144,11 @@ ProfId3BR=IM (Inscricao Municipal) ProfId4BR=CPF #ProfId5BR=CNAE #ProfId6BR=INSS -ProfId1CH=UID-Nummer +ProfId1CH=Número UID ProfId2CH=- ProfId3CH=Número federado ProfId4CH=Num registro de comercio -ProfId5CH=EORI number +ProfId5CH=Número EORI ProfId6CH=- ProfId1CL=R.U.T. ProfId2CL=- @@ -166,19 +166,19 @@ ProfId1DE=Id prof. 1 (USt.-IdNr) ProfId2DE=Id prof. 2 (USt.-Nr) ProfId3DE=Id prof. 3 (Handelsregister-Nr.) ProfId4DE=- -ProfId5DE=EORI number +ProfId5DE=Número EORI ProfId6DE=- ProfId1ES=CIF/NIF ProfId2ES=Núm. seguridad social ProfId3ES=CNAE ProfId4ES=Núm. colegiado -ProfId5ES=EORI number +ProfId5ES=Número EORI ProfId6ES=- ProfId1FR=SIREN ProfId2FR=SIRET ProfId3FR=NAF (Ex APE) ProfId4FR=RCS/RM -ProfId5FR=EORI number +ProfId5FR=Número EORI ProfId6FR=- ProfId1GB=Número registro ProfId2GB=- @@ -202,12 +202,12 @@ ProfId1IT=- ProfId2IT=- ProfId3IT=- ProfId4IT=- -ProfId5IT=EORI number +ProfId5IT=Número EORI ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- ProfId4LU=- -ProfId5LU=EORI number +ProfId5LU=Número EORI ProfId6LU=- ProfId1MA=Id prof. 1 (R.C.) ProfId2MA=Id prof. 2 (Patente) @@ -225,13 +225,13 @@ ProfId1NL=Número KVK ProfId2NL=- ProfId3NL=- ProfId4NL=- -ProfId5NL=EORI number +ProfId5NL=Número EORI ProfId6NL=- ProfId1PT=NIPC ProfId2PT=Núm. seguridad social ProfId3PT=Num reg. comercial ProfId4PT=Conservatorio -ProfId5PT=EORI number +ProfId5PT=Número EORI ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +255,7 @@ ProfId1RO=CUI ProfId2RO=Prof ID 2 (Numero de registro) ProfId3RO=CAEN ProfId4RO=EUID -ProfId5RO=EORI number +ProfId5RO=Número EORI ProfId6RO=- ProfId1RU=OGRN ProfId2RU=INN @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Verificar el CIF/NIF intracomunitario en la web de la VATIntraManualCheck=Puede también realizar una verificación manual en la web de la comisión europea <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=Comprobación imposible. El servicio de comprobación no es prestado por el país país miembro (%s). NorProspectNorCustomer=Ni cliente, ni cliente potencial -JuridicalStatus=Forma jurídica +JuridicalStatus=Tipo de entidad comercial Workforce=Personal Staff=Empleados ProspectLevelShort=Potencial diff --git a/htdocs/langs/es_ES/compta.lang b/htdocs/langs/es_ES/compta.lang index b0b4b087cb1..2fd8288fc12 100644 --- a/htdocs/langs/es_ES/compta.lang +++ b/htdocs/langs/es_ES/compta.lang @@ -69,7 +69,7 @@ SocialContribution=Impuestos sociales o fiscales SocialContributions=Impuestos sociales o fiscales SocialContributionsDeductibles=Impuestos sociales o fiscales deducibles SocialContributionsNondeductibles=Impuestos sociales o fiscales no deducibles -DateOfSocialContribution=Date of social or fiscal tax +DateOfSocialContribution=Fecha del impuesto social o fiscal LabelContrib=Etiqueta TypeContrib=Tipo MenuSpecialExpenses=Pagos especiales @@ -111,7 +111,7 @@ Refund=Devolución SocialContributionsPayments=Pagos tasas sociales/fiscales ShowVatPayment=Ver pagos IVA TotalToPay=Total a pagar -BalanceVisibilityDependsOnSortAndFilters=El balance es visible en esta lista sólo si la tabla está ordenada ascendente en %s y se filtra para 1 cuenta bancaria +BalanceVisibilityDependsOnSortAndFilters=El saldo es visible en esta lista solo si la tabla se ordena en %s y se filtra en 1 cuenta bancaria (sin otros filtros) CustomerAccountancyCode=Código contable cliente SupplierAccountancyCode=Código contable proveedor CustomerAccountancyCodeShort=Cód. cuenta cliente @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=¿Está seguro de querer eliminar este pago de t 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>. -CalcModeDebt=Análisis de facturas registradas conocidas incluso si aún no se encuentran contabilizadas en el libro mayor. +CalcModeDebt=Análisis de documentos registrados conocidos incluso si aún no están contabilizados en el libro mayor. CalcModeEngagement=Análisis de los pagos registrados conocidos, incluso si aún no se encuentran contabilizados en el Libro mayor. CalcModeBookkeeping=Análisis de los datos registrados en el Libro mayor CalcModeLT1= Modo <b>%sRE facturas a clientes - facturas de proveedores%s</b> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Resumen anual del balance de ingresos y gastos AnnualByCompanies=Balance de ingresos y gastos, por grupos de cuenta predefinidos AnnualByCompaniesDueDebtMode=Balance de ingresos y gastos, desglosado por terceros, en modo<b>%sCréditos-Deudas%s</b> llamada <b>contabilidad de compromiso</b>. AnnualByCompaniesInputOutputMode=Balance de ingresos y gastos, desglosado por terceros, en modo <b>%sIngresos-Gastos%s</b> llamada <b>contabilidad de caja</b>. -SeeReportInInputOutputMode=Consulte %sanálisis de pagos%s para obtener un cálculo de los pagos efectuados, incluso si aún no se han contabilizado en el Libro mayor. -SeeReportInDueDebtMode=Consulte %sanálisis de facturas %s para un cálculo basado en facturas registradas conocidas, incluso si aún no se han contabilizado en Libro mayor. -SeeReportInBookkeepingMode=Consulte el <b>%sInforme de facturación%s</b> para realizar un cálculo en la <b>Tabla Libro mayor</b> +SeeReportInInputOutputMode=Consulte <b> %sanálisis de pagos%s </b> para obtener un cálculo basado en <b> pagos registrados </b> realizados incluso si aún no están contabilizados en el Libro Mayor +SeeReportInDueDebtMode=Consulte <b> %sanálisis de documentos registrados %s </b> para un cálculo basado en <b> documentos registrados conocidos </b> incluso si aún no están contabilizados en el Libro Mayor +SeeReportInBookkeepingMode=Consulte <b> %sanálisis de la tabla de contabilidad %s </b> para obtener un informe basado en <b> Tabla de Libro Mayor </b> RulesAmountWithTaxIncluded=- Los importes mostrados son con todos los impuestos incluídos. RulesResultDue=- Incluye facturas pendientes, gastos, IVA, donaciones ya sean pagadas o no. También incluye salarios pagados.<br>- Se basa en la fecha de facturación de las facturas y en la fecha de vencimiento de los gastos o pagos de impuestos. Para los salarios definidos con el módulo Salario, se utiliza el valor de la fecha de pago. RulesResultInOut=- Incluye los pagos realizados sobre las facturas, las gastos y el IVA. <br>- Se basa en las fechas de pago de las facturas, gastos e IVA. La fecha de donación para las donaciones @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=Muestra un registro en su libro mayor con cue SeePageForSetup=Vea el menú <a href="%s">%s</a> para configurarlo DepositsAreNotIncluded=- Las facturas de anticipo no están incluidas DepositsAreIncluded=- Las facturas de anticipo están incluidas +LT1ReportByMonth=Informe de impuestos 2 por mes +LT2ReportByMonth=Informe de impuestos 3 por mes LT1ReportByCustomers=Informe por tercero del RE LT2ReportByCustomers=Informe por tercero del IRPF LT1ReportByCustomersES=Informe de RE por tercero LT2ReportByCustomersES=Informe de IRPF por tercero del VATReport=Informe IVA VATReportByPeriods=Informe de IVA por período +VATReportByMonth=Informe de impuestos de venta por mes VATReportByRates=Informe de impuestos por tasa VATReportByThirdParties=Informe de impuestos por terceros VATReportByCustomers=Informe IVA por cliente diff --git a/htdocs/langs/es_ES/contracts.lang b/htdocs/langs/es_ES/contracts.lang index caf7a7d363b..7e663f919a8 100644 --- a/htdocs/langs/es_ES/contracts.lang +++ b/htdocs/langs/es_ES/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Servicios activos MenuExpiredServices=Servicios expirados MenuClosedServices=Servicios cerrados NewContract=Nuevo contrato -NewContractSubscription=New contract or subscription +NewContractSubscription=Nuevo contrato o suscripción AddContract=Crear contrato DeleteAContract=Eliminar un contrato ActivateAllOnContract=Activar todos los servicios @@ -99,6 +99,6 @@ TypeContact_contrat_internal_SALESREPFOLL=Comercial seguimiento del contrato TypeContact_contrat_external_BILLING=Contacto cliente de facturación del contrato TypeContact_contrat_external_CUSTOMER=Contacto cliente seguimiento del contrato TypeContact_contrat_external_SALESREPSIGN=Contacto cliente firmante del contrato -HideClosedServiceByDefault=Hide closed services by default -ShowClosedServices=Show Closed Services -HideClosedServices=Hide Closed Services +HideClosedServiceByDefault=Ocultar servicios cerrados por defecto +ShowClosedServices=Mostrar servicios cerrados +HideClosedServices=Ocultar servicios cerrados diff --git a/htdocs/langs/es_ES/cron.lang b/htdocs/langs/es_ES/cron.lang index 27dcaa7e9e9..bc2036a769d 100644 --- a/htdocs/langs/es_ES/cron.lang +++ b/htdocs/langs/es_ES/cron.lang @@ -7,13 +7,14 @@ Permission23103 = Borrar Tarea Programada Permission23104 = Ejecutar Taraea programada # Admin CronSetup=Configuración del módulo Programador -URLToLaunchCronJobs=URL para combrobar y ejecutar tareas -OrToLaunchASpecificJob=O para ejecutar una tarea en concreto +URLToLaunchCronJobs=URL para verificar e iniciar tareas cron calificados desde un navegador +OrToLaunchASpecificJob=O para verificar e iniciar una tarea específica desde un navegador KeyForCronAccess=Clave para la URL para ejecutar tareas Cron FileToLaunchCronJobs=Comando para ejecutar tareas Cron CronExplainHowToRunUnix=En entornos Unix se debe utilizar la siguiente entrada crontab para ejecutar el comando cada 5 minutos CronExplainHowToRunWin=En entornos Microsoft (tm) Windows, puede utilizar las herramienta tareas programadas para ejecutar el comando cada 5 minutos CronMethodDoesNotExists=La clase %s no contiene ningún método %s +CronMethodNotAllowed=El método %s de la clase %s está en la lista negra de métodos prohibidos CronJobDefDesc=Los perfiles de trabajo de Cron se definen en el archivo descriptor del módulo. Cuando el módulo está activado, se cargan y están disponibles para que pueda administrar los trabajos desde el menú de herramientas de administración %s. CronJobProfiles=Lista de perfiles de trabajos cron predefinidos # Menu @@ -46,6 +47,7 @@ CronNbRun=Número de ejecuciones CronMaxRun=Número máximo ejecuciones CronEach=Toda(s) JobFinished=Tareas lanzadas y finalizadas +Scheduled=Programada #Page card CronAdd= Tarea Nueva CronEvery=Ejecutar la tarea cada @@ -56,7 +58,7 @@ CronNote=Comentario CronFieldMandatory=campos %s son obligatorios CronErrEndDateStartDt=La fecha de finalizacion no puede ser anterior a la fecha de inicio StatusAtInstall=Estado en la instalación del módulo -CronStatusActiveBtn=Activo +CronStatusActiveBtn=Calendario CronStatusInactiveBtn=Inactivo CronTaskInactive=Esta tarea esta inactiva CronId=Id @@ -82,3 +84,8 @@ MakeLocalDatabaseDumpShort=Copia local de la base de datos MakeLocalDatabaseDump=Crear una copia local de la base de datos. Los parámetros son: compresión ('gz' o 'bz' o 'ninguno'), tipo de copia de seguridad ('mysql' o 'pgsql'), 1, 'auto' o nombre de archivo para construir, nº de archivos de copia de seguridad a mantener WarningCronDelayed=Atención: para mejorar el rendimiento, cualquiera que sea la próxima fecha de ejecución de las tareas activas, sus tareas pueden retrasarse un máximo de %s horas antes de ejecutarse DATAPOLICYJob=Limpiador de datos y anonimizador +JobXMustBeEnabled=La tarea %s debe estar habilitada +# Cron Boxes +LastExecutedScheduledJob=Última tarea programada ejecutada +NextScheduledJobExecute=Siguiente tarea programada para ejecutar +NumberScheduledJobError=Número de tareas programadas con error diff --git a/htdocs/langs/es_ES/deliveries.lang b/htdocs/langs/es_ES/deliveries.lang index 3bd711bdeea..f766e2d6734 100644 --- a/htdocs/langs/es_ES/deliveries.lang +++ b/htdocs/langs/es_ES/deliveries.lang @@ -27,5 +27,6 @@ Recipient=Destinatario ErrorStockIsNotEnough=No hay suficiente stock Shippable=Enviable NonShippable=No enviable +ShowShippableStatus=Mostrar estado del envío ShowReceiving=Mostrar nota de recepción NonExistentOrder=Pedido inexistente diff --git a/htdocs/langs/es_ES/ecm.lang b/htdocs/langs/es_ES/ecm.lang index 54ec4c75ac9..6a4b189771f 100644 --- a/htdocs/langs/es_ES/ecm.lang +++ b/htdocs/langs/es_ES/ecm.lang @@ -23,7 +23,7 @@ ECMSearchByKeywords=Buscar por palabras clave ECMSearchByEntity=Buscar por objeto ECMSectionOfDocuments=Directorios de documentos ECMTypeAuto=Automático -ECMDocsBy=Documents linked to %s +ECMDocsBy=Documentos vinculados a %s ECMNoDirectoryYet=No se ha creado el directorio ShowECMSection=Mostrar directorio DeleteSection=Eliminación directorio @@ -38,6 +38,6 @@ ReSyncListOfDir=Resincronizar la lista de directorios HashOfFileContent=Hash de contenido de archivo NoDirectoriesFound=No se encontraron directorios FileNotYetIndexedInDatabase=Archivo aún no indexado en la base de datos (intente volver a cargarlo) -ExtraFieldsEcmFiles=Archivos Ecm de campos extra -ExtraFieldsEcmDirectories=Directorios Ecm de campos extra -ECMSetup=Configuración de ECM +ExtraFieldsEcmFiles=campos adicionales de archivos GED +ExtraFieldsEcmDirectories=Campos adicionales de Directorios GED +ECMSetup=Configuración de GED diff --git a/htdocs/langs/es_ES/errors.lang b/htdocs/langs/es_ES/errors.lang index 2bc9c1698ef..a25529bdd52 100644 --- a/htdocs/langs/es_ES/errors.lang +++ b/htdocs/langs/es_ES/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=Sin errores, es válido # Errors ErrorButCommitIsDone=Errores encontrados, pero es válido a pesar de todo ErrorBadEMail=E-mail %s incorrecto +ErrorBadMXDomain=El e-mail %s parece incorrecto (el dominio no tiene un registro MX válido) ErrorBadUrl=Url %s inválida ErrorBadValueForParamNotAString=Valor incorrecto para su parámetro. Generalmente aparece cuando no existe traducción. +ErrorRefAlreadyExists=La referencia <b>%s</b> ya existe. ErrorLoginAlreadyExists=El login %s ya existe. ErrorGroupAlreadyExists=El grupo %s ya existe. ErrorRecordNotFound=Registro no encontrado @@ -36,7 +38,7 @@ ErrorBadSupplierCodeSyntax=La sintaxis del código proveedor es incorrecta ErrorSupplierCodeRequired=Código proveedor obligatorio ErrorSupplierCodeAlreadyUsed=Código de proveedor ya utilizado ErrorBadParameters=Parámetros incorrectos -ErrorWrongParameters=Wrong or missing parameters +ErrorWrongParameters=Parámetros inválidos o faltantes ErrorBadValueForParameter=valor '%s' incorrecto para el parámetro '%s' ErrorBadImageFormat=El archivo de imagen es de un formato no soportado (Su PHP no soporta las funciones de conversión de este formato de imagen) ErrorBadDateFormat=El valor '%s' tiene un formato de fecha no reconocido @@ -48,6 +50,7 @@ ErrorFieldsRequired=No se indicaron algunos campos obligatorios ErrorSubjectIsRequired=El asunto del e-mail es obligatorio ErrorFailedToCreateDir=Error en la creación de un directorio. Compruebe que el usuario del servidor Web tiene derechos de escritura en los directorios de documentos de Dolibarr. Si el parámetro <b>safe_mode</b> está activo en este PHP, Compruebe que los archivos php Dolibarr pertenecen al usuario del servidor Web. ErrorNoMailDefinedForThisUser=E-Mail no definido para este usuario +ErrorSetupOfEmailsNotComplete=La configuración de los e-mailss no está completa ErrorFeatureNeedJavascript=Esta funcionalidad precisa de javascript activo para funcionar. Modifique en configuración->entorno. ErrorTopMenuMustHaveAParentWithId0=Un menú del tipo 'Superior' no puede tener un menú padre. Ponga 0 en el ID padre o busque un menú del tipo 'Izquierdo' ErrorLeftMenuMustHaveAParentId=Un menú del tipo 'Izquierdo' debe de tener un ID de padre @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=El nombre de este perfil ya existe para este conjunto ErrorLDAPSetupNotComplete=La configuración Dolibarr-LDAP es incompleta. ErrorLDAPMakeManualTest=Se ha creado unn archivo .ldif en el directorio %s. Trate de cargar manualmente este archivo desde la línea de comandos para obtener más detalles acerca del error. ErrorCantSaveADoneUserWithZeroPercentage=No se puede cambiar una acción al estado no comenzada si tiene un usuario realizante de la acción. -ErrorRefAlreadyExists=La referencia utilizada para la creación ya existe +ErrorRefAlreadyExists=La referencia <b>%s</b> ya existe. ErrorPleaseTypeBankTransactionReportName=Por favor escriba el nombre del extracto bancario donde se informa del registro (Formato AAAAMM o AAAAMMDD) ErrorRecordHasChildren=No se puede eliminar el registro porque tiene registros hijos. ErrorRecordHasAtLeastOneChildOfType=El objeto tiene al menos un hijo del tipo %s @@ -120,7 +123,7 @@ ErrorLoginHasNoEmail=Este usuario no tiene e-mail. Imposible continuar. ErrorBadValueForCode=Valor incorrecto para el código. Vuelva a intentar con un nuevo valor... ErrorBothFieldCantBeNegative=Los campos %s y %s no pueden ser negativos ErrorFieldCantBeNegativeOnInvoice=El campo <strong>%s</strong> no puede ser negativo en este tipo de factura. Si necesita agregar una línea de descuento, simplemente cree el descuento primero (desde el campo '%s' en la ficha de terceros) y aplíquelo a la factura. -ErrorLinesCantBeNegativeForOneVATRate=Total of lines (net of tax) can't be negative for a given not null VAT rate (Found a negative total for VAT rate <b>%s</b>%%). +ErrorLinesCantBeNegativeForOneVATRate=El total de líneas (neto de impuestos) no puede ser negativo para un IVA no nulo (se encontró un total negativo para el IVA <b> %s </b> %%). ErrorLinesCantBeNegativeOnDeposits=Las líneas no pueden ser negativas en un depósito. Si lo hace, tendrá problemas para consumir el depósito en la factura final. ErrorQtyForCustomerInvoiceCantBeNegative=Las cantidades en las líneas de facturas a clientes no pueden ser negativas ErrorWebServerUserHasNotPermission=La cuenta de ejecución del servidor web <b>%s</b> no dispone de los permisos para esto @@ -136,8 +139,8 @@ ErrorNewValueCantMatchOldValue=El nuevo valor no puede ser igual al antiguo ErrorFailedToValidatePasswordReset=No se ha podido restablecer la contraseña. Es posible que este enlace ya se haya utilizado (este enlace sólo puede usarse una vez). Si no es el caso, trate de reiniciar el proceso de restablecimiento de contraseña desde el principio. ErrorToConnectToMysqlCheckInstance=Error de conexión con la base de datos. Compruebe que el servidor de base de datos está en marcha (por ejemplo, con mysql/maríadb, pudes lanzarlo con la línea de comando 'sudo service mysql start'). ErrorFailedToAddContact=Error en la adición del contacto -ErrorDateMustBeBeforeToday=The date must be lower than today -ErrorDateMustBeInFuture=The date must be greater than today +ErrorDateMustBeBeforeToday=La fecha debe ser anterior a la de hoy +ErrorDateMustBeInFuture=La fecha debe ser posterior a hoy ErrorPaymentModeDefinedToWithoutSetup=Se ha establecido el modo de pago al tipo %s pero en la configuración del módulo de facturas no se ha indicado la información para mostrar de este modo de pago. ErrorPHPNeedModule=Error, su PHP debe tener instalado el módulo <b>%s</b> para usar esta funcionalidad. ErrorOpenIDSetupNotComplete=Ha configurado Dolibarr para aceptar la autentificación OpenID, pero la URL del servicio OpenID no se encuentra definida en la constante %s @@ -185,7 +188,7 @@ ErrorBadDefinitionOfMenuArrayInModuleDescriptor=Definición incorrecta de la mat ErrorSavingChanges=Ha ocurrido un error al guardar los cambios ErrorWarehouseRequiredIntoShipmentLine=El almacén es obligatorio en la línea a enviar ErrorFileMustHaveFormat=El archivo debe tener el formato %s -ErrorFilenameCantStartWithDot=Filename can't start with a '.' +ErrorFilenameCantStartWithDot=El nombre de archivo no puede comenzar con '.' ErrorSupplierCountryIsNotDefined=El país de este proveedor no está definido, corríjalo en su ficha ErrorsThirdpartyMerge=No se han podido fusionar los dos registros. Petición cancelada. ErrorStockIsNotEnoughToAddProductOnOrder=No hay stock suficiente del producto %s para añadirlo a un nuevo pedido. @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=Debe elegir si el artículo es un ErrorDiscountLargerThanRemainToPaySplitItBefore=El descuento que usted intenta aplicar es más grande que el resto a pagar. Divida el descuento en 2 descuentos más pequeños antes. ErrorFileNotFoundWithSharedLink=Archivo no encontrado. Puede ser que la clave compartida se haya modificado o que el archivo se haya eliminado recientemente. ErrorProductBarCodeAlreadyExists=El código de barras del producto %s ya existe en otra referencia de producto. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Tenga en cuenta también que no es posible utilizar productos virtuales para aumentar/disminuir automáticamente subproductos cuando al menos un subproducto (o subproducto de subproductos) necesita un número de serie/lote. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Tenga en cuenta también que el uso de kits para aumentar / disminuir automáticamente los subproductos no es posible cuando al menos un subproducto (o subproducto de subproductos) necesita un número de serie / lote. ErrorDescRequiredForFreeProductLines=La descripción es obligatoria para las líneas libres ErrorAPageWithThisNameOrAliasAlreadyExists=La página/contenedor <strong>%s</strong> tiene el mismo nombre o alias alternativo que el que intenta utilizar ErrorDuringChartLoad=Error al cargar plan contable. Si no se cargaron algunas cuentas, aún puede introducirlas manualmente. @@ -240,9 +243,19 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No hay suficiente cantidad ErrorOnlyOneFieldForGroupByIsPossible=Solo es posible un campo para 'Agrupar por' (otros se descartan) ErrorTooManyDifferentValueForSelectedGroupBy=Se encontraron demasiados valores diferentes (más de <b>%s</b>) para el campo '<b>%s</b>', así que no podemos usarlo como 'Agrupar por' para gráficos. El campo 'Agrupar por' ha sido eliminado. ¿Puede ser que quieras usarlo como un eje X? ErrorReplaceStringEmpty=Error, la cadena para reemplazar está vacía -ErrorProductNeedBatchNumber=Error, product '<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> +ErrorProductNeedBatchNumber=Error, el producto '<b> %s </b>' necesita un lote/número de serie +ErrorProductDoesNotNeedBatchNumber=Error, el producto '<b> %s </b>' no acepta un número de serie/lote +ErrorFailedToReadObject=Error, no se pudo leer el objeto de tipo <b> %s </b> +ErrorParameterMustBeEnabledToAllwoThisFeature=Error, el parámetro <b> %s </b> debe estar habilitado en <b> conf / conf.php <b> para permitir el uso de la interfaz de línea de comandos por parte del programador de trabajos interno +ErrorLoginDateValidity=Error, este inicio de sesión está fuera del rango de fechas de validez +ErrorValueLength=Longitud del campo '<b>%s</b>' debe ser superior a '<b>%s</b>' +ErrorReservedKeyword=La palabra '<b>%s</b>' es una palabra reservada +ErrorNotAvailableWithThisDistribution=No disponible con esta distribución +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. + # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=El parámetro PHP upload_max_filesize (%s) es más alto que el parámetro PHP post_max_size (%s). Esta no es una configuración consistente. WarningPasswordSetWithNoAccount=Se fijó una contraseña para este miembro. Sin embargo, no se ha creado ninguna cuenta de usuario. Así que esta contraseña no se puede utilizar para acceder a Dolibarr. Puede ser utilizada por un módulo/interfaz externo, pero si no necesitar definir accesos de un miembro, puede desactivar la opción "Administrar un inicio de sesión para cada miembro" en la configuración del módulo miembros. Si necesita administrar un inicio de sesión, pero no necesita ninguna contraseña, puede dejar este campo vacío para evitar esta advertencia. Nota: También puede usarse el correo electrónico como inicio de sesión si el miembro está vinculada a un usuario. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Su cuenta de acceso ha sido modificada. P WarningAnEntryAlreadyExistForTransKey=Ya existe una entrada para la clave de traducción para este idioma WarningNumberOfRecipientIsRestrictedInMassAction=Atención, el número de destinatarios diferentes está limitado a <b>%s</b>cuando se usan las acciones masivas en las listas WarningDateOfLineMustBeInExpenseReportRange=Advertencia, la fecha de la línea no está en el rango del informe de gastos +WarningProjectDraft=El proyecto todavía está en modo borrador. No olvide validarlo si planea usar tareas. WarningProjectClosed=El proyecto está cerrado. Debe volver a abrirlo primero. WarningSomeBankTransactionByChequeWereRemovedAfter=Algunas transacciones bancarias se eliminaron después de que se generó el recibo. Por lo tanto, el número de cheques y el total del recibo pueden diferir del número y el total en el listado. -WarningFailedToAddFileIntoDatabaseIndex=Atención, no se pudo agregar la entrada del archivo en la tabla de índice de la base de datos ECM +WarningFailedToAddFileIntoDatabaseIndex=Advertencia, no se pudo agregar la entrada de archivo en la tabla de índice de la base de datos de GED +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. diff --git a/htdocs/langs/es_ES/exports.lang b/htdocs/langs/es_ES/exports.lang index 056236382aa..9a0e7decd49 100644 --- a/htdocs/langs/es_ES/exports.lang +++ b/htdocs/langs/es_ES/exports.lang @@ -133,3 +133,4 @@ KeysToUseForUpdates=Clave (columna) a usar para <b>actualizar</b> datos existent NbInsert=Número de líneas añadidas: %s NbUpdate=Número de líneas actualizadas: %s MultipleRecordFoundWithTheseFilters=Se han encontrado varios registros con estos filtros: %s +StocksWithBatch=Existencias y ubicación (almacén) de productos con número de lote / serie diff --git a/htdocs/langs/es_ES/ftp.lang b/htdocs/langs/es_ES/ftp.lang index c363097056f..4dcb9e6c0ce 100644 --- a/htdocs/langs/es_ES/ftp.lang +++ b/htdocs/langs/es_ES/ftp.lang @@ -1,14 +1,14 @@ # Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Configuración del módulo cliente FTP -NewFTPClient=Nueva conexión cliente FTP -FTPArea=Área FTP -FTPAreaDesc=Esta pantalla presenta una vista de servidor FTP -SetupOfFTPClientModuleNotComplete=La configuración del módulo de cliente FTP parece incompleta -FTPFeatureNotSupportedByYourPHP=Su PHP no soporta las funciones FTP -FailedToConnectToFTPServer=No se pudo conectar con el servidor FTP (servidor: %s, puerto %s) -FailedToConnectToFTPServerWithCredentials=No se pudo conectar con el login/contraseña FTP configurados +FTPClientSetup=Configuración del módulo de cliente FTP o SFTP +NewFTPClient=Nueva configuración de conexión FTP / FTPS +FTPArea=Área FTP / FTPS +FTPAreaDesc=Esta pantalla muestra una vista de un servidor FTP y SFTP. +SetupOfFTPClientModuleNotComplete=La configuración del módulo de cliente FTP o SFTP parece estar incompleta +FTPFeatureNotSupportedByYourPHP=Su PHP no admite funciones FTP o SFTP +FailedToConnectToFTPServer=No se pudo conectar al servidor (servidor %s, puerto %s) +FailedToConnectToFTPServerWithCredentials=Error al iniciar sesión en el servidor con inicio de sesión/contraseña definidos FTPFailedToRemoveFile=No se pudo eliminar el archivo <b>%s</b>. FTPFailedToRemoveDir=No se pudo eliminar el directorio <b>%s</b> (Compruebe los permisos y que el directorio está vacío). FTPPassiveMode=Modo pasivo -ChooseAFTPEntryIntoMenu=Elija una entrada de FTP en el menú ... +ChooseAFTPEntryIntoMenu=Elija un sitio FTP / SFTP del menú ... FailedToGetFile=No se pudieron obtener los archivos %s diff --git a/htdocs/langs/es_ES/install.lang b/htdocs/langs/es_ES/install.lang index cf53fbdae48..db506fac1b6 100644 --- a/htdocs/langs/es_ES/install.lang +++ b/htdocs/langs/es_ES/install.lang @@ -87,7 +87,7 @@ GoToSetupArea=Acceso a Dolibarr (área de configuración) MigrationNotFinished=La versión de la base de datos no está completamente actualizada: vuelva a ejecutar el proceso de actualización. GoToUpgradePage=Acceder a la página de migración de nuevo WithNoSlashAtTheEnd=Sin el signo "/" al final -DirectoryRecommendation= <span class="warning"> IMPORTANTE </span>: debe usar un directorio que esté fuera de las páginas web (por lo tanto, no use un subdirectorio del parámetro anterior). +DirectoryRecommendation=<span class="warning"> IMPORTANTE </span>: debe usar un directorio que esté fuera de las páginas web (por lo tanto, no use un subdirectorio del parámetro anterior). LoginAlreadyExists=Ya existe DolibarrAdminLogin=Login del usuario administrador de Dolibarr AdminLoginAlreadyExists=La cuenta de administrador Dolibarr '<b>%s</b>' ya existe. Vuelva atrás si desea crear otra. diff --git a/htdocs/langs/es_ES/interventions.lang b/htdocs/langs/es_ES/interventions.lang index b2e1eb7e66f..3a655b6a95e 100644 --- a/htdocs/langs/es_ES/interventions.lang +++ b/htdocs/langs/es_ES/interventions.lang @@ -64,3 +64,5 @@ InterLineDuration=Duración línea intervención InterLineDesc=Descripción línea intervención RepeatableIntervention=Plantilla de intervención ToCreateAPredefinedIntervention=Para crear una intervención predefinida o recurrente, cree una intervención común y conviértala en plantilla de intervención +Reopen=Reabrir +ConfirmReopenIntervention=¿Está seguro de querer volver a abrir la intervención <b> %s </b>? diff --git a/htdocs/langs/es_ES/intracommreport.lang b/htdocs/langs/es_ES/intracommreport.lang index 6931efda553..5e0a87e64ee 100644 --- a/htdocs/langs/es_ES/intracommreport.lang +++ b/htdocs/langs/es_ES/intracommreport.lang @@ -1,5 +1,5 @@ Module68000Name = Informe intracomunitario -Module68000Desc = Gestión de informes intracomm (soporte para formato francés DEB / DES) +Module68000Desc = Gestión de informe intracomunitario (soporte para formato francés DEB / DES) IntracommReportSetup = Configuración del módulo de intracommreport IntracommReportAbout = Acerca de intracommreport @@ -32,7 +32,7 @@ IntracommReportTitle=Preparación de un archivo XML en formato ProDouane # List IntracommReportList=Lista de declaraciones generadas IntracommReportNumber=Número de declaración -IntracommReportPeriod=Período de análisis +IntracommReportPeriod=Periodo de análisis IntracommReportTypeDeclaration=Tipo de declaración IntracommReportDownload=descargar archivo XML diff --git a/htdocs/langs/es_ES/languages.lang b/htdocs/langs/es_ES/languages.lang index d8a30708395..2bfc571a284 100644 --- a/htdocs/langs/es_ES/languages.lang +++ b/htdocs/langs/es_ES/languages.lang @@ -40,7 +40,7 @@ Language_es_PA=Español (Panamá) Language_es_PY=Español (Paraguay) Language_es_PE=Español (Perú) Language_es_PR=Español (Puerto Rico) -Language_es_US=Spanish (USA) +Language_es_US=Español (EE. UU.) Language_es_UY=Español (Uruguay) Language_es_GT=Español (Guatemala) Language_es_VE=Español (Venezuela) diff --git a/htdocs/langs/es_ES/loan.lang b/htdocs/langs/es_ES/loan.lang index 6d864af06fd..45cadda49d5 100644 --- a/htdocs/langs/es_ES/loan.lang +++ b/htdocs/langs/es_ES/loan.lang @@ -23,9 +23,9 @@ AddLoan=Crear crédito FinancialCommitment=Prestamo InterestAmount=Interés CapitalRemain=Capital restante -TermPaidAllreadyPaid = This term is allready paid -CantUseScheduleWithLoanStartedToPaid = Can't use scheduler for a loan with payment started -CantModifyInterestIfScheduleIsUsed = You can't modify interest if you use schedule +TermPaidAllreadyPaid = Este plazo ya está pagado +CantUseScheduleWithLoanStartedToPaid = No se puede usar el programador para un préstamo con el pago iniciado +CantModifyInterestIfScheduleIsUsed = No puede modificar el interés si usa el programador # Admin ConfigLoan=Configuración del módulo préstamos LOAN_ACCOUNTING_ACCOUNT_CAPITAL=Cuenta contable por defecto para el capital diff --git a/htdocs/langs/es_ES/mails.lang b/htdocs/langs/es_ES/mails.lang index 947cb08fdef..a992897cd19 100644 --- a/htdocs/langs/es_ES/mails.lang +++ b/htdocs/langs/es_ES/mails.lang @@ -92,6 +92,7 @@ MailingModuleDescEmailsFromUser=E-mails enviados por usuario MailingModuleDescDolibarrUsers=Usuarios con e-mails MailingModuleDescThirdPartiesByCategories=Terceros (por categoría) SendingFromWebInterfaceIsNotAllowed=El envío desde la interfaz web no está permitido. +EmailCollectorFilterDesc=Todos los filtros deben coincidir para que se recopile un e-mail # Libelle des modules de liste de destinataires mailing LineInFile=Línea %s en archivo @@ -125,12 +126,13 @@ TagMailtoEmail=Email del destinatario (incluyendo el enlace html "mailto:") NoEmailSentBadSenderOrRecipientEmail=No se ha enviado el e-mail. El remitente o destinatario es incorrecto. Compruebe los datos del usuario. # Module Notifications Notifications=Notificaciones -NoNotificationsWillBeSent=Ninguna notificación por e-mail está prevista para este evento y empresa -ANotificationsWillBeSent=1 notificación va a ser enviada por e-mail -SomeNotificationsWillBeSent=%s notificaciones van a ser enviadas por e-mail -AddNewNotification=Activar un nuevo destinatario de notificaciones -ListOfActiveNotifications=Listado de destinatarios activos para notifiaciones por e-mail -ListOfNotificationsDone=Listado de notificaciones enviadas +NotificationsAuto=Notificaciones automáticas. +NoNotificationsWillBeSent=No se planean notificaciones automáticas por e-mail para este tipo de evento y empresa. +ANotificationsWillBeSent=Se enviará 1 notificación automática por e-mail +SomeNotificationsWillBeSent=%s se enviarán notificaciones automáticas por e-mail +AddNewNotification=Suscríbase a una nueva notificación automática por e-mail (destinatario/evento) +ListOfActiveNotifications=Lista de todas las suscripciones activas (destinatarios/eventos) para la notificación automática por e-mail +ListOfNotificationsDone=Lista de todas las notificaciones automáticas enviadas por e-mail MailSendSetupIs=La configuración de e-mailings está a '%s'. Este modo no puede ser usado para enviar e-mails masivos. MailSendSetupIs2=Antes debe, con una cuenta de administrador, en el menú %sInicio - Configuración - E-Mails%s, cambiar el parámetro <strong>'%s'</strong> para usar el modo '%s'. Con este modo puede configurar un servidor SMTP de su proveedor de servicios de internet. MailSendSetupIs3=Si tiene preguntas de como configurar su servidor SMTP, puede contactar con %s. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Los ficheros importados deben tener el formato <stron UseFormatInputEmailToTarget=Entra una cadena con el formato <strong>email;nombre;apellido;otros</strong> MailAdvTargetRecipients=Destinatarios (selección avanzada) AdvTgtTitle=Rellene los campos para preseleccionar los terceros o contactos/direcciones a enviar -AdvTgtSearchTextHelp=Use %% como comodín. Por ejemplo para encontrar todos los elementos como <b>juan, jose,jorge</b>, puede indicar <b>j%%</b>, también puede usar ; como separador de valor y usar ! para omitir el valor. Por ejemplo <b>juan;jose;jor%%!jimo;!jima%</b> hará como destinatarios todos los juan, jose, los que empiecen por jor pero no jimo o jima. +AdvTgtSearchTextHelp=Utilice %% como comodines. Por ejemplo, para encontrar todos los elementos como <b> jean, joe, jim </b>, puede ingresar <b> j%% </b>, también puede usar; como separador de valor y uso! para excepto este valor. Por ejemplo, <b> jean; joe; jim%%;! Jimo;! Jima%% </b> apuntará a todos jean, joe, comience con jim pero no jimo y no todo lo que comience con jima AdvTgtSearchIntHelp=Use un intervaldo para seleccionar valor int o float AdvTgtMinVal=Valor mínimo AdvTgtMaxVal=Valor máxio @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Crear filtro AdvTgtOrCreateNewFilter=Nombre del nuevo filtro NoContactWithCategoryFound=No se han encontrado contactos/direcciones con alguna categoría NoContactLinkedToThirdpartieWithCategoryFound=No se han encontrado contactos/direcciones con alguna categoría -OutGoingEmailSetup=Configuración del correo saliente -InGoingEmailSetup=Configuración del correo entrante -OutGoingEmailSetupForEmailing=Configuración del correo electrónico saliente (para el módulo %s) -DefaultOutgoingEmailSetup=Configuración de correo saliente predeterminada +OutGoingEmailSetup=E-mails salientes +InGoingEmailSetup=E-mails entrantes +OutGoingEmailSetupForEmailing=E-mails salientes (para el módulo %s) +DefaultOutgoingEmailSetup=Misma configuración que la configuración global de e-mail saliente Information=Información ContactsWithThirdpartyFilter=Contactos con filtro de terceros. -Unanswered=Unanswered +Unanswered=Sin respuesta Answered=Contestado -IsNotAnAnswer=Is not answer (initial email) -IsAnAnswer=Is an answer of an initial email +IsNotAnAnswer=No responde (e-mail inicial) +IsAnAnswer=Es una respuesta de un e-mail inicial. +RecordCreatedByEmailCollector=Registro creado por el Recopilador de E-Mails %s del e-mail %s +DefaultBlacklistMailingStatus=Estado de contacto predeterminado para rechazar el envío masivo de correos electrónicos +DefaultStatusEmptyMandatory=Vacío pero obligatorio diff --git a/htdocs/langs/es_ES/main.lang b/htdocs/langs/es_ES/main.lang index e60664f5d0f..bdc22f9fe03 100644 --- a/htdocs/langs/es_ES/main.lang +++ b/htdocs/langs/es_ES/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=Sin plantilla definida para este tipo de e-mail AvailableVariables=Variables de substitución disponibles NoTranslation=Sin traducción Translation=Traducción +CurrentTimeZone=Zona horaria PHP (Servidor) EmptySearchString=Ingrese una cadena de búsqueda no vacía +EnterADateCriteria=Ingrese un criterio de fecha NoRecordFound=No se han encontrado registros NoRecordDeleted=No se ha eliminado el registro NotEnoughDataYet=No hay suficientes datos @@ -85,6 +87,8 @@ FileWasNotUploaded=Un archivo ha sido seleccionado para adjuntarlo, pero aún no NbOfEntries=Nº de entradas GoToWikiHelpPage=Leer la ayuda en línea (es necesario acceso a Internet ) GoToHelpPage=Consultar la ayuda +DedicatedPageAvailable=Hay una página de ayuda dedicada relacionada con su pantalla actual +HomePage=Página de inicio RecordSaved=Registro guardado RecordDeleted=Registro eliminado RecordGenerated=Registro generado @@ -175,7 +179,7 @@ SaveAndStay=Guardar y permanecer SaveAndNew=Guardar y nuevo TestConnection=Probar la conexión ToClone=Copiar -ConfirmCloneAsk=¿Estás seguro de que quieres clonar el objeto <b>%s</b>? +ConfirmCloneAsk=¿Está seguro de que quieres clonar el objeto <b>%s</b>? ConfirmClone=Seleccione los datos que desea copiar: NoCloneOptionsSpecified=No hay datos definidos para copiar Of=de @@ -197,7 +201,7 @@ ReOpen=Reabrir Upload=Enviar archivo ToLink=Enlace Select=Seleccionar -SelectAll=Select all +SelectAll=Seleccionar todo Choose=Elegir Resize=Redimensionar ResizeOrCrop=Cambiar el tamaño o cortar @@ -220,6 +224,7 @@ Value=Valor PersonalValue=Valor personalizado NewObject=Nuevo %s NewValue=Nuevo valor +OldValue=Valor antiguo %s CurrentValue=Valor actual Code=Código Type=Tipo @@ -258,7 +263,7 @@ Cards=Fichas Card=Ficha Now=Ahora HourStart=Hora de inicio -Deadline=Deadline +Deadline=Fecha límite Date=Fecha DateAndHour=Fecha y hora DateToday=Fecha de hoy @@ -267,10 +272,10 @@ DateStart=Fecha de inicio DateEnd=Fecha de fin DateCreation=Fecha de creación DateCreationShort=Fecha creación -IPCreation=Creation IP +IPCreation=IP de creación DateModification=Fecha de modificación DateModificationShort=Fecha modif. -IPModification=Modification IP +IPModification=IP de modificación DateLastModification=Última fecha de modificación DateValidation=Fecha de validación DateClosing=Fecha de cierre @@ -433,6 +438,7 @@ RemainToPay=Queda por pagar Module=Módulo Modules=Módulos Option=Opción +Filters=Filtros List=Listado FullList=Listado completo FullConversation=Conversación completa @@ -650,6 +656,7 @@ SupplierPreview=Historial proveedor ShowCustomerPreview=Ver historial cliente ShowSupplierPreview=Ver historial proveedor RefCustomer=Ref. cliente +InternalRef=Ref. Interna Currency=Divisa InfoAdmin=Información para los administradores Undo=Anular @@ -671,7 +678,7 @@ SendMail=Enviar e-mail Email=Correo NoEMail=Sin e-mail AlreadyRead=Ya leído -NotRead=No lleído +NotRead=No leído NoMobilePhone=Sin teléfono móvil Owner=Propietario FollowingConstantsWillBeSubstituted=Las siguientes constantes serán substituidas por su valor correspondiente. @@ -1099,11 +1106,17 @@ MODIFYInDolibarr=Registro %s modificado DELETEInDolibarr=Registro %s eliminado VALIDATEInDolibarr=Registro %s validado APPROVEDInDolibarr=Registro %s aprobado -DefaultMailModel=Model de email por defecto +DefaultMailModel=Modelo de email por defecto PublicVendorName=Nombre público del proveedor DateOfBirth=Fecha de nacimiento SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry=El token de seguridad ha expirado, así que la acción ha sido cancelada. Por favor, vuelve a intentarlo. UpToDate=A hoy OutOfDate=Fuera de plazo EventReminder=Recordatorio evento -UpdateForAllLines=Update for all lines +UpdateForAllLines=Actualización para todas las líneas +OnHold=En espera +Civility=Civilidad +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 diff --git a/htdocs/langs/es_ES/members.lang b/htdocs/langs/es_ES/members.lang index abe80887b89..726d56b3bb8 100644 --- a/htdocs/langs/es_ES/members.lang +++ b/htdocs/langs/es_ES/members.lang @@ -19,8 +19,8 @@ MembersCards=Carnés de miembros MembersList=Listado de miembros MembersListToValid=Listado de miembros borrador (a validar) MembersListValid=Listado de miembros validados -MembersListUpToDate=Lista de miembros válidos con suscripción actualizada -MembersListNotUpToDate=Lista de miembros válidos con suscripción desactualizada +MembersListUpToDate=Listado de miembros válidos con suscripción actualizada +MembersListNotUpToDate=Listado de miembros válidos con suscripción caducada MembersListResiliated=Listado de los miembros dados de baja MembersListQualified=Listado de los miembros cualificados MenuMembersToValidate=Miembros borrador diff --git a/htdocs/langs/es_ES/modulebuilder.lang b/htdocs/langs/es_ES/modulebuilder.lang index a2a857957a9..7f8008aa4cd 100644 --- a/htdocs/langs/es_ES/modulebuilder.lang +++ b/htdocs/langs/es_ES/modulebuilder.lang @@ -40,6 +40,7 @@ PageForCreateEditView=Página PHP para crear/editar/ver un registro PageForAgendaTab=Página de PHP para la pestaña de eventos PageForDocumentTab=Página de PHP para la pestaña de documento PageForNoteTab=Página de PHP para la pestaña de notas +PageForContactTab=Página PHP para la pestaña de contacto PathToModulePackage=Ruta al zip del módulo/aplicación PathToModuleDocumentation=Ruta a la documentación del módulo/aplicación (%s) SpaceOrSpecialCharAreNotAllowed=Espacios o caracteres especiales no son permitidos. @@ -77,13 +78,13 @@ IsAMeasure=Es una medida DirScanned=Directorio analizado NoTrigger=No hay trigger NoWidget=No hay widget -GoToApiExplorer=Ir al Explorador de API +GoToApiExplorer=Explorador de API ListOfMenusEntries=Lista de entradas de menú ListOfDictionariesEntries=Listado de entradas de diccionarios ListOfPermissionsDefined=Listado de permisos definidos SeeExamples=Vea ejemplos aquí EnabledDesc=Condición para tener este campo activo (Ejemplos: 1 o $conf->global->MYMODULE_MYOPTION) -VisibleDesc=¿Es visible el campo? (Ejemplos: 0 = Nunca visible, 1 = Visible en la lista y crear / actualizar / ver formularios, 2 = Visible solo en la lista, 3 = Visible solo en el formulario crear / actualizar / ver (no en la lista), 4 = Visible en la lista y solo actualizar / ver formulario (no crear), 5 = Visible solo en el formulario de vista final de la lista (no crear, no actualizar)<br><br>El uso de un valor negativo significa que el campo no se muestra de forma predeterminada en la lista, pero se puede seleccionar para verlo).<br><br>Puede ser una expresión, por ejemplo:<br>preg_match('/public/', $_SERVER['PHP_SELF'])?0:1<br>($user->rights->holiday->define_holiday ? 1 : 0) +VisibleDesc=¿Es visible el campo? (Ejemplos: 0 = Nunca visible, 1 = Visible en la lista y crear/actualizar/ver formularios, 2 = Visible solo en la lista, 3 = Visible solo en el formulario crear/actualizar/ver (no en la lista), 4 = Visible en la lista y solo actualizar/ver formulario (no crear), 5 = Visible solo en el formulario de vista final de la lista (no crear, no actualizar)<br><br>El uso de un valor negativo significa que el campo no se muestra de forma predeterminada en la lista, pero se puede seleccionar para verlo).<br><br>Puede ser una expresión, por ejemplo:<br>preg_match('/public/', $_SERVER['PHP_SELF'])?0:1<br>($user->rights->holiday->define_holiday ? 1 : 0) DisplayOnPdfDesc=Muestre este campo en documentos PDF compatibles, puede administrar la posición con el campo "Posición". <br/> Actualmente, conocidos modelos compatibles PDF son: eratosthene (pedidos), espadon (notas de envios), sponge (facturas), cyan (presupuesto), cornas (pedido a proveedor) <br/> <br/> <strong> Para documento: </strong> <br/> 0 = No se ven las <br/> 1 = mostrar <br/> 2 = mostrar sólo si no está vacío <br/> <br/> <strong> Para las líneas de documentos: </strong> <br/> 0 = no mostradas <br/> 1 = se muestran en una columna <br/> 3 = se muestra en la columna de descripción de línea después de la descripción <br/> 4 = se muestra en la columna de descripción después de la descripción solo si no está vacía DisplayOnPdf=Mostrar en PDF IsAMeasureDesc=¿Se puede acumular el valor del campo para obtener un total en el listado? (Ejemplos: 1 o 0) @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=Si tiene conocimientos de SQL y PHP, puede usar el asis SeeTopRightMenu=Ver <span class="fa fa-bug"></span> en el menú superior derecho AddLanguageFile=Añadir archivo de idioma YouCanUseTranslationKey=Aquí puede usar una clave que es la clave de traducción encontrada en el archivo de idioma (ver pestaña "Idiomas") -DropTableIfEmpty=(Eliminar tabla si está vacía) +DropTableIfEmpty=(Destruya la tabla si está vacía) TableDoesNotExists=La tabla %s no existe TableDropped=Tabla %s eliminada InitStructureFromExistingTable=Construir la estructura de array de una tabla existente @@ -126,7 +127,6 @@ UseSpecificEditorURL = Usar un editor específico URL UseSpecificFamily = Usar una familia específica UseSpecificAuthor = Usar un autor especifico UseSpecificVersion = Usar una versión inicial específica -ModuleMustBeEnabled=El módulo debe ser activado primero IncludeRefGeneration=La referencia del objeto debe generarse automáticamente IncludeRefGenerationHelp=Marque esto si desea incluir código para gestionar la generación automática de la referencia IncludeDocGeneration=Quiero generar algunos documentos del objeto. @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Tipo de campos: <br> varchar(99), double(24,8), real, text, htm AsciiToHtmlConverter=Conversor de ASCII a HTML AsciiToPdfConverter=Conversor de ASCII a PDF TableNotEmptyDropCanceled=La tabla no está vacía. La eliminación ha sido cancelada. +ModuleBuilderNotAllowed=El constructor de módulos está disponible pero no permitido para su usuario. diff --git a/htdocs/langs/es_ES/mrp.lang b/htdocs/langs/es_ES/mrp.lang index 34538f681bb..d0eb0a49644 100644 --- a/htdocs/langs/es_ES/mrp.lang +++ b/htdocs/langs/es_ES/mrp.lang @@ -77,4 +77,28 @@ UnitCost=Costo unitario TotalCost=Coste total BOMTotalCost=El costo para producir esta Lista de Materiales en función del costo de cada cantidad y producto a consumir (use el precio de costo si está definido, de lo contrario, el precio promedio ponderado si está definido, o el mejor precio de compra) GoOnTabProductionToProduceFirst=Primero debe haber iniciado la producción para cerrar una orden de fabricación (consulte la pestaña '%s'). Pero puedes cancelarlo. -ErrorAVirtualProductCantBeUsedIntoABomOrMo=A kit can't be used into a BOM or a MO +ErrorAVirtualProductCantBeUsedIntoABomOrMo=Un kit no se puede usar en una Lista de Materiales (BOM) o una Orden de Fabricación (MO) +Workstation=Puesto de trabajo +Workstations=Estaciones de trabajo +WorkstationsDescription=Gestión de estaciones de trabajo +WorkstationSetup = Configuración de estaciones de trabajo +WorkstationSetupPage = Página de configuración de estaciones de trabajo +WorkstationAbout = Acerca de la estación de trabajo +WorkstationAboutPage = Estaciones de trabajo sobre la página +WorkstationList=Lista de estaciones de trabajo +WorkstationCreate=Agregar nueva estación de trabajo +ConfirmEnableWorkstation=¿Está seguro de que desea habilitar la estación de trabajo <b> %s </b>? +EnableAWorkstation=Habilitar una estación de trabajo +ConfirmDisableWorkstation=¿Está seguro de que desea desactivar la estación de trabajo <b> %s </b>? +DisableAWorkstation=Deshabilitar una estación de trabajo +DeleteWorkstation=SuprimIr +NbOperatorsRequired=Número de operadores necesarios +THMOperatorEstimated=THM estimado del operador +THMMachineEstimated=THM estimado de la máquina +WorkstationType=Tipo de estación de trabajo +Human=Humano +Machine=Máquina +HumanMachine=Humano / Máquina +WorkstationArea=Área de la estación de trabajo +Machines=Máquinas +THMEstimatedHelp=Esta tarifa permite definir un costo de previsión del artículo. diff --git a/htdocs/langs/es_ES/multicurrency.lang b/htdocs/langs/es_ES/multicurrency.lang index 858b5a9a695..976d9b08fd8 100644 --- a/htdocs/langs/es_ES/multicurrency.lang +++ b/htdocs/langs/es_ES/multicurrency.lang @@ -20,8 +20,8 @@ MulticurrencyPaymentAmount=Importe total, divisa original AmountToOthercurrency=Cantidad a (en moneda de la cuenta receptora) CurrencyRateSyncSucceed=La sincronización de la tasa de cambio se realizó con éxito MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT=Use la moneda del documento para pagos en línea -TabTitleMulticurrencyRate=Lista de tarifas -ListCurrencyRate=Lista de tipos de cambio de la moneda +TabTitleMulticurrencyRate=Listado de tarifas +ListCurrencyRate=Listado de tipos de cambio de la moneda CreateRate=Crea una tarifa FormCreateRate=Tasa de creación FormUpdateRate=Modificación de tarifas diff --git a/htdocs/langs/es_ES/orders.lang b/htdocs/langs/es_ES/orders.lang index 12b15246da7..14aa5ba7ccc 100644 --- a/htdocs/langs/es_ES/orders.lang +++ b/htdocs/langs/es_ES/orders.lang @@ -141,11 +141,12 @@ OrderByEMail=Correo OrderByWWW=En línea OrderByPhone=Teléfono # Documents models -PDFEinsteinDescription=Una plantilla de orden completo -PDFEratostheneDescription=Una plantilla de orden completa +PDFEinsteinDescription=Un modelo de pedido completo (implementación anterior de la plantilla Eratosthene) +PDFEratostheneDescription=Un modelo de pedido completo PDFEdisonDescription=Modelo de pedido simple -PDFProformaDescription=Una plantilla de factura Proforma completa +PDFProformaDescription=Un modelo de factura Proforma completo CreateInvoiceForThisCustomer=Facturar pedidos +CreateInvoiceForThisSupplier=Facturar pedidos NoOrdersToInvoice=Sin pedidos facturables CloseProcessedOrdersAutomatically=Clasificar automáticamente como "Procesados" los pedidos seleccionados. OrderCreation=Creación pedido diff --git a/htdocs/langs/es_ES/other.lang b/htdocs/langs/es_ES/other.lang index dcaaa909282..0e4f2c2c4e6 100644 --- a/htdocs/langs/es_ES/other.lang +++ b/htdocs/langs/es_ES/other.lang @@ -5,8 +5,6 @@ Tools=Utilidades TMenuTools=Utilidades ToolsDesc=Todas las utilidades que no están incluidas en otras entradas del menú se encuentran aquí.<br>Están disponibles en el menú de la izquierda. Birthday=Aniversario -BirthdayDate=Fecha de cumpleaños -DateToBirth=Fecha de nacimiento BirthdayAlertOn=alerta aniversario activada BirthdayAlertOff=alerta aniversario desactivada TransKey=Traducción de la clave TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Mes anterior (texto) de la fecha de la factura TextPreviousMonthOfInvoice=Mes anterior (texto) de la fecha de la factura NextMonthOfInvoice=Mes siguiente (número 1-12) de la fecha de la factura TextNextMonthOfInvoice=Mes siguiente (texto) de la fecha de la factura +PreviousMonth=Mes anterior +CurrentMonth=Mes actual ZipFileGeneratedInto=Archivo zip generado en <b>%s</b>. DocFileGeneratedInto=Fichero documentación generado en <b>%s</b>. JumpToLogin=Desconectado. Ir a la página de inicio de sesión ... @@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Informe de gastos validado (se requiere aprobaci Notify_EXPENSE_REPORT_APPROVE=Informe de gastos aprobado Notify_HOLIDAY_VALIDATE=Petición días libres validada (se requiere aprobación) Notify_HOLIDAY_APPROVE=Petición días libres aprobada +Notify_ACTION_CREATE=Acción agregada a la agenda SeeModuleSetup=Vea la configuración del módulo %s NbOfAttachedFiles=Número archivos/documentos adjuntos TotalSizeOfAttachedFiles=Tamaño total de los archivos/documentos adjuntos @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nNos ponemos en contacto con ust PredefinedMailContentSendFichInter=__(Hello)__\n\nNos ponemos en contacto con usted para facilitarle la intervención __REF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Puede hacer clic en el siguiente enlace para realizar su pago, si aún no lo ha hecho.\n\n%s\n\n PredefinedMailContentGeneric=__(Hola)__\n\n\n__(Sinceramente)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendActionComm=Recordatorio de evento "__EVENT_LABEL__" el __EVENT_DATE__ a las __EVENT_TIME__ <br> <br> Este es un mensaje automático, no responda. DemoDesc=Dolibarr es un ERP/CRM para la gestión de negocios (profesionales o asociaciones), compuesto de módulos funcionales independientes y opcionales. Una demostración que incluya todos estos módulos no tiene sentido porque no utilizará todos los módulos. Además, tiene disponibles varios tipos de perfiles de demostración. ChooseYourDemoProfil=Elija el perfil de demostración que mejor se adapte a sus necesidades ... ChooseYourDemoProfilMore=... o construya su perfil<br>(modo de selección manual) @@ -214,6 +216,7 @@ EMailTextExpenseReportValidated=El informe de gastos %s ha sido validado. EMailTextExpenseReportApproved=El informe de gastos %s ha sido aprobado. EMailTextHolidayValidated=La petición de lías libres %s ha sido validada. EMailTextHolidayApproved=La petición de lías libres %s ha sido aprobada. +EMailTextActionAdded=La acción %s se ha agregado a la Agenda. ImportedWithSet=Lote de importación (import key) DolibarrNotification=Notificación automática ResizeDesc=Introduzca el nuevo ancho <b>O</b> la nueva altura. La relación se conserva al cambiar el tamaño ... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contacto/dirección creada por el recolector de e ProjectCreatedByEmailCollector=Proyecto creado por el recolector de e-mails del MSGID de e-mail %s TicketCreatedByEmailCollector=Ticket creado por el recolector de e-mails del MSGID de e-mail %s OpeningHoursFormatDesc=Use un - para separar las horas de apertura y cierre. <br> Use un espacio para ingresar diferentes rangos. <br> Ejemplo: 8-12 14-18 +PrefixSession=Prefijo para ID de sesión ##### Export ##### ExportsArea=Área de exportaciones @@ -278,9 +282,9 @@ LinesToImport=Líneas a importar MemoryUsage=Uso de memoria RequestDuration=Duración de la solicitud -ProductsPerPopularity=Products/Services by popularity +ProductsPerPopularity=Productos/Servicios por popularidad PopuProp=Productos/Servicios por popularidad en Presupuestos PopuCom=Productos/Servicios por popularidad en Pedidos ProductStatistics=Estadísticas de productos/servicios NbOfQtyInOrders=Cantidad en pedidos -SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... +SelectTheTypeOfObjectToAnalyze=Seleccione el tipo de objeto a analizar... diff --git a/htdocs/langs/es_ES/products.lang b/htdocs/langs/es_ES/products.lang index 340ead2edf3..6511c425686 100644 --- a/htdocs/langs/es_ES/products.lang +++ b/htdocs/langs/es_ES/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Complete con las fechas de la última línea de servici MultiPricesAbility=Varios segmentos de precios por producto/servicio (cada cliente está en un segmento) MultiPricesNumPrices=Nº de precios DefaultPriceType=Base de precios por defecto (con versus sin impuestos) al agregar nuevos precios de venta -AssociatedProductsAbility=Activar kits (productos virtuales) +AssociatedProductsAbility=Habilitar kits (conjunto de varios productos) +VariantsAbility=Habilitar variantes (variaciones de productos, por ejemplo, color, tamaño) AssociatedProducts=Kits AssociatedProductsNumber=Número de productos que componen este kit ParentProductsNumber=Nº de productos que este producto compone @@ -120,8 +121,8 @@ CategoryFilter=Filtro por categoría ProductToAddSearch=Buscar productos a adjuntar NoMatchFound=No se han encontrado resultados ListOfProductsServices=Listado de productos/servicios -ProductAssociationList=Lista de productos / servicios que son componentes de este kit -ProductParentList=Lista de kits con este producto como componente +ProductAssociationList=Listado de productos/servicios que son componentes de este kit +ProductParentList=Listado de kits con este producto como componente ErrorAssociationIsFatherOfThis=Uno de los productos seleccionados es padre del producto en curso DeleteProduct=Eliminar un producto/servicio ConfirmDeleteProduct=¿Está seguro de querer eliminar este producto/servicio? @@ -167,8 +168,10 @@ BuyingPrices=Precios de compra CustomerPrices=Precios a clientes SuppliersPrices=Precios de proveedores SuppliersPricesOfProductsOrServices=Precios de proveedores (productos o servicios) -CustomCode=Código aduanero +CustomCode=Aduanas|Producto|Código HS CountryOrigin=País de origen +RegionStateOrigin=Región de origen +StateOrigin=Estado|Provincia de origen Nature=Naturaleza del producto (materia prima/producto acabado) NatureOfProductShort=Naturaleza del producto NatureOfProductDesc=Materia prima o producto terminado @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Usar el precio fijado PriceByQuantity=Precios diferentes por cantidad DisablePriceByQty=Desactivar precios por cantidad PriceByQuantityRange=Rango cantidad -MultipriceRules=Reglas para segmento de precios +MultipriceRules=Precios automáticos por segmento UseMultipriceRules=Use las reglas de segmentación de precios (definidas en la configuración de módulo de productos) para autocalcular los precios de todos los demás segmentos de acuerdo con el primer segmento PercentVariationOver=%% variación sobre %s PercentDiscountOver=%% descuento sobre %s diff --git a/htdocs/langs/es_ES/projects.lang b/htdocs/langs/es_ES/projects.lang index 2adccf038e2..31513b0cd20 100644 --- a/htdocs/langs/es_ES/projects.lang +++ b/htdocs/langs/es_ES/projects.lang @@ -7,7 +7,7 @@ ProjectsArea=Área Proyectos ProjectStatus=Estado del proyecto SharedProject=Proyecto compartido PrivateProject=Contactos proyecto -ProjectsImContactFor=Projects for which I am explicitly a contact +ProjectsImContactFor=Proyectos de los que soy contacto explícito AllAllowedProjects=Todos los proyectos que puedo leer (míos + públicos) AllProjects=Todos los proyectos MyProjectsDesc=Esta vista está limitada a aquellos proyectos en los que usted es un contacto @@ -76,15 +76,16 @@ MyActivities=Mis tareas/actividades MyProjects=Mis proyectos MyProjectsArea=Mi Área de proyectos DurationEffective=Duración efectiva -ProgressDeclared=Progresión declarada +ProgressDeclared=Progreso real declarado TaskProgressSummary=Progreso de la tarea CurentlyOpenedTasks=Tareas actualmente abiertas -TheReportedProgressIsLessThanTheCalculatedProgressionByX=El progreso declarado es menos de %s de la progresión calculada -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=El progreso declarado es más de %s que la progresión calculada -ProgressCalculated=Progresión calculada +TheReportedProgressIsLessThanTheCalculatedProgressionByX=El progreso real declarado es menor %s que el progreso en el consumo +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=El progreso real declarado es más %s que el progreso en el consumo +ProgressCalculated=Avances en el consumo WhichIamLinkedTo=que estoy vinculado a WhichIamLinkedToProject=que estoy vinculado al proyecto Time=Tiempo +TimeConsumed=Consumido ListOfTasks=Listado de tareas GoToListOfTimeConsumed=Ir al listado de tiempos consumidos GanttView=Vista de Gantt @@ -163,7 +164,7 @@ OpportunityProbabilityShort=Prob. Opor. OpportunityAmount=Importe oportunidad OpportunityAmountShort=Importe oportunidad OpportunityWeightedAmount=Cantidad ponderada de oportunidad -OpportunityWeightedAmountShort=Opp. cantidad ponderada +OpportunityWeightedAmountShort=Cantidad ponderada op. OpportunityAmountAverageShort=Importe medio oportunidad OpportunityAmountWeigthedShort=Importe ponderado oportunidad WonLostExcluded=Excluidos Ganados/Perdidos @@ -211,9 +212,9 @@ ProjectNbProjectByMonth=Nº de proyectos creados por mes ProjectNbTaskByMonth=Nº de tareas creadas por mes ProjectOppAmountOfProjectsByMonth=Importe de oportunidades por mes ProjectWeightedOppAmountOfProjectsByMonth=Importe medio oportinidades por mes -ProjectOpenedProjectByOppStatus=Open project|lead by lead status -ProjectsStatistics=Statistics on projects or leads -TasksStatistics=Statistics on tasks of projects or leads +ProjectOpenedProjectByOppStatus=Proyecto abierto|Oportunidad por estado de lead +ProjectsStatistics=Estadísticas de proyectos o leads +TasksStatistics=Estadísticas sobre tareas de proyectos o leads TaskAssignedToEnterTime=Tarea asignada. Debería poder introducir tiempos en esta tarea. IdTaskTime=Id YouCanCompleteRef=Si desea completar la referencia con alguna información (para usarlo como filtros de búsqueda), se recomienda añadir un carácter - para separarlo, la numeración automática seguirá funcionando correctamente para los próximos proyectos. Por ejemplo %s-ABC. @@ -266,4 +267,4 @@ NewInvoice=Nueva factura OneLinePerTask=Una línea por tarea OneLinePerPeriod=Una línea por período RefTaskParent=Ref. Tarea principal -ProfitIsCalculatedWith=Profit is calculated using +ProfitIsCalculatedWith=El beneficio se calcula usando diff --git a/htdocs/langs/es_ES/propal.lang b/htdocs/langs/es_ES/propal.lang index 37119bea66f..b0d6536d10d 100644 --- a/htdocs/langs/es_ES/propal.lang +++ b/htdocs/langs/es_ES/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Enviar presupuesto por e-mail DatePropal=Fecha presupuesto DateEndPropal=Fecha fin de validez ValidityDuration=Duración de validez -CloseAs=Establecer estado a SetAcceptedRefused=Establecer aceptado/rechazado ErrorPropalNotFound=Presupuesto %s inexistente AddToDraftProposals=Añadir a presupuesto borrador @@ -76,12 +75,17 @@ TypeContact_propal_external_BILLING=Contacto cliente de facturación presupuesto TypeContact_propal_external_CUSTOMER=Contacto cliente seguimiento presupuesto TypeContact_propal_external_SHIPPING=Contacto cliente para envíos # Document models -DocModelAzurDescription=Una plantilla de propuesta completa (implementación anterior de la plantilla Cyan) -DocModelCyanDescription=Una plantilla de propuesta completa +DocModelAzurDescription=Un modelo de presupuesto completa (implementación anterior de la plantilla Cyan) +DocModelCyanDescription=Un modelo de presupuesto completo DefaultModelPropalCreate=Modelo por defecto DefaultModelPropalToBill=Modelo por defecto al cerrar un presupuesto (a facturar) DefaultModelPropalClosed=Modelo por defecto al cerrar un presupuesto (no facturado) ProposalCustomerSignature=Aceptación por escrito, sello de la empresa, fecha y firma ProposalsStatisticsSuppliers=Estadísticas presupuestos de proveedores CaseFollowedBy=Caso seguido por -SignedOnly=Signed only +SignedOnly=Solo firmado +IdProposal=ID de Presupuesto +IdProduct=ID del Producto +PrParentLine=Presupuesto de línea principal +LineBuyPriceHT=Precio de compra Importe neto de impuestos por línea + diff --git a/htdocs/langs/es_ES/receiptprinter.lang b/htdocs/langs/es_ES/receiptprinter.lang index b14d6f8d5ec..1908b68dc31 100644 --- a/htdocs/langs/es_ES/receiptprinter.lang +++ b/htdocs/langs/es_ES/receiptprinter.lang @@ -54,7 +54,7 @@ DOL_DOUBLE_WIDTH=Tamaño de doble ancho DOL_DEFAULT_HEIGHT_WIDTH=Altura y ancho predeterminados DOL_UNDERLINE=Habilitar subrayado DOL_UNDERLINE_DISABLED=Desactivar subrayado -DOL_BEEP=Sonido beep +DOL_BEEP=Pitido DOL_PRINT_TEXT=Imprimir texto DateInvoiceWithTime=Fecha y hora de factura YearInvoice=Año de factura @@ -77,6 +77,6 @@ DOL_VALUE_CUSTOMER_ACCOUNT_BALANCE=Saldo de cuenta del cliente DOL_VALUE_MYSOC_NAME=Nombre de la empresa VendorLastname=Apellidos del vendedor VendorFirstname=Nombre del vendedor -VendorEmail=Vendor email +VendorEmail=E-mail del proveedor DOL_VALUE_CUSTOMER_POINTS=Puntos del cliente DOL_VALUE_OBJECT_POINTS=Puntos de objetos diff --git a/htdocs/langs/es_ES/receptions.lang b/htdocs/langs/es_ES/receptions.lang index 7fe1143884d..72efe825bb6 100644 --- a/htdocs/langs/es_ES/receptions.lang +++ b/htdocs/langs/es_ES/receptions.lang @@ -43,5 +43,5 @@ ProductQtyInSuppliersReceptionAlreadyRecevied=Cantidad en pedidos a proveedores ValidateOrderFirstBeforeReception=Antes de poder realizar recepciones debe validar el pedido. ReceptionsNumberingModules=Módulo de numeración para recepciones ReceptionsReceiptModel=Modelos de documentos para recepciones. -NoMorePredefinedProductToDispatch=No more predefined products to dispatch +NoMorePredefinedProductToDispatch=No hay más productos predefinidos para enviar diff --git a/htdocs/langs/es_ES/recruitment.lang b/htdocs/langs/es_ES/recruitment.lang index e542b1ec190..26cacddf8cc 100644 --- a/htdocs/langs/es_ES/recruitment.lang +++ b/htdocs/langs/es_ES/recruitment.lang @@ -71,5 +71,6 @@ YourCandidature=Su aplicación YourCandidatureAnswerMessage=Gracias por su aplicación. <br> ... JobClosedTextCandidateFound=El puesto de trabajo esta cerrado. El puesto ha sido ocupado. JobClosedTextCanceled=El puesto de trabajo esta cerrado -ExtrafieldsJobPosition=Complementary attributes (job positions) -ExtrafieldsCandidatures=Complementary attributes (job applications) +ExtrafieldsJobPosition=Campos adicionales (puestos de trabajo) +ExtrafieldsCandidatures=Campos adicionales (solicitudes de empleo) +MakeOffer=Realizar un presupuesto diff --git a/htdocs/langs/es_ES/sendings.lang b/htdocs/langs/es_ES/sendings.lang index 92f5556b279..f45396f7142 100644 --- a/htdocs/langs/es_ES/sendings.lang +++ b/htdocs/langs/es_ES/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Otros envíos de este pedido SendingsAndReceivingForSameOrder=Envíos y recepciones de este pedido SendingsToValidate=Envíos a validar StatusSendingCanceled=Anulado +StatusSendingCanceledShort=Anulado StatusSendingDraft=Borrador StatusSendingValidated=Validado (productos a enviar o enviados) StatusSendingProcessed=Procesado @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=Antes de poder realizar envíos debe validar el # Sending methods # ModelDocument DocumentModelTyphon=Modelo completo de nota de entrega / recepción (logo...) +DocumentModelStorm=Modelo de documento más completo para recibos de entrega y compatibilidad de campos adicionales (logotipo ...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constante EXPEDITION_ADDON_NUMBER no definida SumOfProductVolumes=Suma del volumen de los productos SumOfProductWeights=Suma del peso de los productos diff --git a/htdocs/langs/es_ES/stocks.lang b/htdocs/langs/es_ES/stocks.lang index 75b1e30418d..c40c86b03c9 100644 --- a/htdocs/langs/es_ES/stocks.lang +++ b/htdocs/langs/es_ES/stocks.lang @@ -34,7 +34,7 @@ StockMovementForId=ID movimiento %d ListMouvementStockProject=Listado de movimientos de stock asociados al proyecto StocksArea=Área almacenes AllWarehouses=Todos los almacenes -IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock +IncludeEmptyDesiredStock=Incluir también stock negativo con stock deseado indefinido IncludeAlsoDraftOrders=Incluir también pedidos borrador Location=Lugar LocationSummary=Nombre corto del lugar @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Indicar un almacén en pedidos de clientes UserDefaultWarehouse=Indicar un almacén en usuarios MainDefaultWarehouse=Almacén por defecto @@ -122,9 +123,9 @@ DesiredStockDesc=Esta cantidad será el valor que se utilizará para llenar el s StockToBuy=A pedir Replenishment=Reaprovisionamiento ReplenishmentOrders=Ordenes de reaprovisionamiento -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=Según las opciones de aumento/disminución, el stock físico y virtual (stock físico + pedidos en curso) puede diferir +UseRealStockByDefault=Usar stock real, en lugar de stock virtual, para la función de reaprovisionamiento +ReplenishmentCalculation=La cantidad a ordenar será (cantidad deseada - stock real) en lugar de (cantidad deseada - stock virtual) UseVirtualStock=Usar stock virtual UsePhysicalStock=Usar stock físico CurentSelectionMode=Modo de selección actual @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Establezca el valor en 0 para restablecer la cantidad <br> UpdateByScaning=Actualizar 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. diff --git a/htdocs/langs/es_ES/stripe.lang b/htdocs/langs/es_ES/stripe.lang index 14579cc11a6..cf8d22d6a15 100644 --- a/htdocs/langs/es_ES/stripe.lang +++ b/htdocs/langs/es_ES/stripe.lang @@ -28,7 +28,6 @@ AccountParameter=Parámetros de la cuenta UsageParameter=Parámetros de uso InformationToFindParameters=Información para encontrar a su configuración de cuenta %s STRIPE_CGI_URL_V2=URL CGI del módulo Stripe para el pago -VendorName=Nombre del vendedor CSSUrlForPaymentForm=Url de la hoja de estilo CSS para el formulario de pago NewStripePaymentReceived=Nuevo pago de Stripe recibido NewStripePaymentFailed=Nuevo pago de Stripe intentado, pero ha fallado diff --git a/htdocs/langs/es_ES/supplier_proposal.lang b/htdocs/langs/es_ES/supplier_proposal.lang index 14c74f9721c..4fea43e5c77 100644 --- a/htdocs/langs/es_ES/supplier_proposal.lang +++ b/htdocs/langs/es_ES/supplier_proposal.lang @@ -13,6 +13,7 @@ SupplierProposalArea=Área presupuestos de proveedores SupplierProposalShort=Presupuesto de proveedor SupplierProposals=Presupuestos de proveedor SupplierProposalsShort=Presupuestos de proveedor +AskPrice=Presupuesto NewAskPrice=Nuevo presupuesto ShowSupplierProposal=Mostrar presupuesto AddSupplierProposal=Crear un presupuesto diff --git a/htdocs/langs/es_ES/suppliers.lang b/htdocs/langs/es_ES/suppliers.lang index 17b9bc3a831..d66117c0ab4 100644 --- a/htdocs/langs/es_ES/suppliers.lang +++ b/htdocs/langs/es_ES/suppliers.lang @@ -38,7 +38,7 @@ MenuOrdersSupplierToBill=Pedidos a proveedor a facturar NbDaysToDelivery=Tiempo de entrega en días DescNbDaysToDelivery=El mayor retraso en las entregas de productos de este pedido SupplierReputation=Reputación del proveedor -ReferenceReputation=Reference reputation +ReferenceReputation=Referencias de reputación DoNotOrderThisProductToThisSupplier=No realizar pedidos NotTheGoodQualitySupplier=Mala calidad ReputationForThisProduct=Reputación diff --git a/htdocs/langs/es_ES/ticket.lang b/htdocs/langs/es_ES/ticket.lang index ccc27036015..2ff65db0cfc 100644 --- a/htdocs/langs/es_ES/ticket.lang +++ b/htdocs/langs/es_ES/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Tipo de tickets TicketDictCategory=Categorías de tickets TicketDictSeverity=Gravedad de los tickets TicketDictResolution=Ticket - Resolución -TicketTypeShortBUGSOFT=Mal funcionamiento del software -TicketTypeShortBUGHARD=Mal funcionamiento del hardware -TicketTypeShortCOM=Pregunta comercial +TicketTypeShortCOM=Pregunta comercial TicketTypeShortHELP=Solicitud de ayuda funcional TicketTypeShortISSUE=Asunto, error o problema TicketTypeShortREQUEST=Solicitud de cambio o mejora @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Otro TicketSeverityShortLOW=Bajo TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=Alto -TicketSeverityShortBLOCKING=Crítico / Bloqueo +TicketSeverityShortBLOCKING=Crítico, Bloqueo ErrorBadEmailAddress=El campo '%s' es incorrecto MenuTicketMyAssign=Mis tickets @@ -60,7 +58,6 @@ OriginEmail=Origen E-Mail Notify_TICKET_SENTBYMAIL=Enviar mensaje de ticket por e-mail # Status -NotRead=No lleído Read=Leido Assigned=Asignado InProgress=En progreso @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=La interfaz pública permite a cualquier visi TicketsAutoAssignTicket=Asignar automáticamente al usuario que creó el ticket TicketsAutoAssignTicketHelp=Al crear un ticket, el usuario puede asignarse automáticamente al ticket. TicketNumberingModules=Módulo de numeración de tickets +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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Estado cambiado: %s a %s TicketNotNotifyTiersAtCreate=No notificar a la compañía al crear Unread=No leído TicketNotCreatedFromPublicInterface=No disponible. El ticket no se creó desde la interfaz pública. -PublicInterfaceNotEnabled=La interfaz pública no estaba habilitada ErrorTicketRefRequired=La referencia del ticket es obligatoria # diff --git a/htdocs/langs/es_ES/trips.lang b/htdocs/langs/es_ES/trips.lang index 9a5520922fe..af2e038dd94 100644 --- a/htdocs/langs/es_ES/trips.lang +++ b/htdocs/langs/es_ES/trips.lang @@ -110,7 +110,7 @@ ExpenseReportPayment=Informe de pagos de gastos ExpenseReportsToApprove=Informe de gastos a aprobar ExpenseReportsToPay=Informe de gastos a pagar ConfirmCloneExpenseReport=¿Está seguro de querer eliminar este informe de gastos? -ExpenseReportsIk=Índice de kilometraje de informes de gastos +ExpenseReportsIk=Configuración de cargos por kilometraje ExpenseReportsRules=Reglas del informe de gastos ExpenseReportIkDesc=Se puede modificar el cálculo de los kilómetros de gasto por categoría y por rango que se definen previamente. <b>d</b> es la distancia en kilómetros ExpenseReportRulesDesc=Puede crear o actualizar cualquier regla de cálculo. Esta parte se utilizará cuando el usuario cree un nuevo informe de gastos @@ -145,7 +145,7 @@ nolimitbyEX_DAY=por día (sin limitación) nolimitbyEX_MON=por mes (sin limitación) nolimitbyEX_YEA=por año (sin limitación) nolimitbyEX_EXP=por línea (sin limitación) -CarCategory=Categoría del coche +CarCategory=Categoría de vehículo ExpenseRangeOffset=Importe compensado: %s RangeIk=Rango de kilometraje AttachTheNewLineToTheDocument=Adjuntar la línea a un documento subido diff --git a/htdocs/langs/es_ES/users.lang b/htdocs/langs/es_ES/users.lang index 900c65e6201..bfc709a9e2f 100644 --- a/htdocs/langs/es_ES/users.lang +++ b/htdocs/langs/es_ES/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Eliminar del grupo PasswordChangedAndSentTo=Contraseña cambiada y enviada a <b>%s</b>. PasswordChangeRequest=Solicitud para cambiar la contraseña de <b>%s</b> PasswordChangeRequestSent=Petición de cambio de contraseña para <b>%s</b> enviada a <b>%s</b>. +IfLoginExistPasswordRequestSent=Si este inicio de sesión es una cuenta válida, se ha enviado un e-mail para restablecer la contraseña. +IfEmailExistPasswordRequestSent=Si este correo electrónico es una cuenta válida, se ha enviado un correo electrónico para restablecer la contraseña. ConfirmPasswordReset=Confirmar restablecimiento de contraseña MenuUsersAndGroups=Usuarios y grupos LastGroupsCreated=Últimos %s grupos creados @@ -73,6 +75,7 @@ CreateInternalUserDesc=Este formulario le permite crear un usuario interno para 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) PermissionInheritedFromAGroup=El permiso se concede ya que lo hereda de un grupo al cual pertenece el usuario. Inherited=Heredado +UserWillBe=El usuario creado será UserWillBeInternalUser=El usuario creado será un usuario interno (ya que no está ligado a un tercero en particular) UserWillBeExternalUser=El usuario creado será un usuario externo (ya que está ligado a un tercero en particular) IdPhoneCaller=ID llamante (teléfono) @@ -108,13 +111,15 @@ DisabledInMonoUserMode=Desactivado en modo mantenimiento UserAccountancyCode=Código contable usuario UserLogoff=Usuario desconectado UserLogged=Usuario conectado -DateOfEmployment=Employment date -DateEmployment=Fecha de inicio de empleo +DateOfEmployment=Fecha empleo +DateEmployment=Empleo +DateEmploymentstart=Fecha de inicio de empleo DateEmploymentEnd=Fecha de finalización de empleo +RangeOfLoginValidity=Rango de fechas de validez de inicio de sesión CantDisableYourself=No puede deshabilitar su propio registro de usuario ForceUserExpenseValidator=Forzar validador de informes de gastos ForceUserHolidayValidator=Forzar validador de solicitud de días libres ValidatorIsSupervisorByDefault=Por defecto, el validador es el supervisor del usuario. Mantener vacío para mantener este comportamiento. UserPersonalEmail=Email personal UserPersonalMobile=Teléfono móvil personal -WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s +WarningNotLangOfInterface=Atención, este es el idioma principal que habla el usuario, no el idioma del entorno que eligió ver. Para cambiar el idioma del entorno visible por este usuario, vaya a la pestaña %s diff --git a/htdocs/langs/es_ES/website.lang b/htdocs/langs/es_ES/website.lang index 56cb631183f..7ea28bc2c96 100644 --- a/htdocs/langs/es_ES/website.lang +++ b/htdocs/langs/es_ES/website.lang @@ -30,7 +30,6 @@ EditInLine=Editar en línea AddWebsite=Añadir sitio web Webpage=Página web/Contenedor AddPage=Añadir página/contenedor -HomePage=Página de inicio PageContainer=Página PreviewOfSiteNotYetAvailable=La vista previa de su sitio web <strong>%s</strong> aún no está disponible. Primero debe '<strong>Importar una plantilla de sitio web completa</strong>' o simplemente '<strong>Agregar una página/contenedor</strong>'. RequestedPageHasNoContentYet=La página pedida con id %s todavía no tiene contenido, o cache file.tpl.php ha sido eliminado. Editar el contenido de la página para resolverlo. @@ -101,7 +100,7 @@ EmptyPage=Página vacía ExternalURLMustStartWithHttp=La URL externa debe comenzar con http:// o https:// ZipOfWebsitePackageToImport=Cargue el archivo Zip del paquete de plantilla del sitio web ZipOfWebsitePackageToLoad=o Elija un paquete de plantilla de sitio web incorporado disponible -ShowSubcontainers=Incluir contenido dinámico +ShowSubcontainers=Mostrar contenido dinámico InternalURLOfPage=URL interna de la página ThisPageIsTranslationOf=Esta página/contenedor es traducción de ThisPageHasTranslationPages=Esta página/contenedor tiene traducción @@ -136,4 +135,5 @@ RSSFeed=Hilos RSS RSSFeedDesc=Puede obtener una fuente RSS de los últimos artículos con el tipo 'blogpost' usando esta URL PagesRegenerated=%s página(s)/contenedor(s) regenerados RegenerateWebsiteContent=Regenerar archivos de caché del sitio web -AllowedInFrames=Allowed in Frames +AllowedInFrames=Permitido en marcos +DefineListOfAltLanguagesInWebsiteProperties=Defina la lista de todos los idiomas disponibles en las propiedades del sitio web. diff --git a/htdocs/langs/es_ES/withdrawals.lang b/htdocs/langs/es_ES/withdrawals.lang index b2e4eeb7439..e6f1c0de0f9 100644 --- a/htdocs/langs/es_ES/withdrawals.lang +++ b/htdocs/langs/es_ES/withdrawals.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - withdrawals -CustomersStandingOrdersArea=Payments by Direct debit orders -SuppliersStandingOrdersArea=Payments by Credit transfer +CustomersStandingOrdersArea=Pagos por domiciliación bancaria +SuppliersStandingOrdersArea=Pagos por transferencia bancaria StandingOrdersPayment=Domiciliaciones StandingOrderPayment=Domiciliación NewStandingOrder=Nueva domiciliación @@ -11,37 +11,38 @@ PaymentByBankTransferLines=Líneas de orden de transferencia bancaria WithdrawalsReceipts=Domiciliaciones WithdrawalReceipt=Domiciliación BankTransferReceipts=Órdenes de transferencia bancaria -BankTransferReceipt=Credit transfer order +BankTransferReceipt=Orden de transferencia bancaria LatestBankTransferReceipts=Últimas %s órdenes de transferencia bancaria LastWithdrawalReceipts=Últimas %s domiciliaciones -WithdrawalsLine=Direct debit order line -CreditTransferLine=Credit transfer line +WithdrawalsLine=Línea de domiciliación bancaria +CreditTransferLine=Línea de transferencia bancaria WithdrawalsLines=Lineas de domiciliación -CreditTransferLines=Credit transfer lines -RequestStandingOrderToTreat=Requests for direct debit payment order to process -RequestStandingOrderTreated=Requests for direct debit payment order processed -RequestPaymentsByBankTransferToTreat=Requests for credit transfer to process -RequestPaymentsByBankTransferTreated=Requests for credit transfer processed +CreditTransferLines=Líneas de transferencia bancaria +RequestStandingOrderToTreat=Órdenes de domiciliaciones a procesar +RequestStandingOrderTreated=Órdenes de domiciliaciones procesadas +RequestPaymentsByBankTransferToTreat=Órdenes de transferencias bancarias a procesar +RequestPaymentsByBankTransferTreated=Órdenes de transferencias bancarias procesadas NotPossibleForThisStatusOfWithdrawReceiptORLine=Todavía no es posible. El estado de la domiciliación debe ser 'abonada' antes de poder realizar devoluciones a sus líneas NbOfInvoiceToWithdraw=Nº de facturas pendientes de domiciliación NbOfInvoiceToWithdrawWithInfo=Número de facturas en espera de domiciliación para clientes que tienen su número de cuenta definida NbOfInvoiceToPayByBankTransfer=Nº de facturas de proveedores pendientes de transferencia bancaria SupplierInvoiceWaitingWithdraw=Factura de proveedor pendiente de transferencia bancaria InvoiceWaitingWithdraw=Facturas en espera de domiciliación -InvoiceWaitingPaymentByBankTransfer=Invoice waiting for credit transfer +InvoiceWaitingPaymentByBankTransfer=Factura en espera de transferencia bancaria AmountToWithdraw=Cantidad a domiciliar -NoInvoiceToWithdraw=No invoice open for '%s' is waiting. Go on tab '%s' on invoice card to make a request. +NoInvoiceToWithdraw=No hay niguna factura abierta esperando para '%s' . Vaya a la pestaña '%s' de la factura para realizar una solicitud. NoSupplierInvoiceToWithdraw=No hay ninguna factura de proveedor con 'Solicitudes de crédito directas' pendientes. Vaya a la pestaña '%s' en la pestaña de factura para hacer una solicitud. ResponsibleUser=Usuario responsable de las domiciliaciones WithdrawalsSetup=Configuración de las domiciliaciones -CreditTransferSetup=Credit transfer setup +CreditTransferSetup=Configuración de transferencias bancarias WithdrawStatistics=Estadísticas de domiciliaciones -CreditTransferStatistics=Credit transfer statistics +CreditTransferStatistics=Estadísticas de transferencias bancarias Rejects=Devoluciones LastWithdrawalReceipt=Las %s últimas domiciliaciones MakeWithdrawRequest=Realizar una petición de domiciliación -MakeBankTransferOrder=Make a credit transfer request +MakeBankTransferOrder=Realizar una solicitud de transferencia bancaria WithdrawRequestsDone=%s domiciliaciones registradas +BankTransferRequestsDone=%s solicitudes de transferencia de crédito registradas ThirdPartyBankCode=Código banco del tercero NoInvoiceCouldBeWithdrawed=No se ha podido realizar la petición de domiciliación de ninguna factura. Compruebe que los terceros de las facturas relacionadas tienen una cuenta IBAN válida y dicho IBAN tiene un RUM con modo <strong>%s</strong>. ClassCredited=Clasificar como "Abonada" @@ -53,7 +54,7 @@ Lines=Líneas StandingOrderReject=Emitir una devolución WithdrawsRefused=Domiciliaciones devueltas WithdrawalRefused=Devolución de domiciliación -CreditTransfersRefused=Credit transfers refused +CreditTransfersRefused=Transferencias bancarias rechazadas WithdrawalRefusedConfirm=¿Está seguro de querer crear una devolución de domiciliación para la empresa RefusedData=Fecha de devolución RefusedReason=Motivo de devolución @@ -63,7 +64,7 @@ InvoiceRefused=Factura rechazada (Cargar los gastos al cliente) StatusDebitCredit=Estado de débito/crédito StatusWaiting=En espera StatusTrans=Enviada -StatusDebited=Debited +StatusDebited=Abonada StatusCredited=Abonada StatusPaid=Tratada StatusRefused=Devuelta @@ -79,13 +80,13 @@ StatusMotif8=Otro motivo CreateForSepaFRST=Domiciliar (SEPA FRST) CreateForSepaRCUR=Domiciliar (SEPA RCUR) CreateAll=Domiciliar todas -CreateFileForPaymentByBankTransfer=Create file for credit transfer -CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) +CreateFileForPaymentByBankTransfer=Crear archivo para transferencia bancaria +CreateSepaFileForPaymentByBankTransfer=Crear archivo de transferencia bancaria (SEPA) CreateGuichet=Sólo oficina CreateBanque=Sólo banco OrderWaiting=En espera de proceso -NotifyTransmision=Record file transmission of order -NotifyCredit=Record credit of order +NotifyTransmision=Registro de envio del archivo de la orden +NotifyCredit=Registro de abono de la orden NumeroNationalEmetter=Número Nacional del Emisor WithBankUsingRIB=Para las cuentas bancarias que utilizan CCC WithBankUsingBANBIC=Para las cuentas bancarias que utilizan el código BAN/BIC/SWIFT @@ -95,12 +96,12 @@ CreditDate=Abonada el WithdrawalFileNotCapable=No es posible generar el fichero bancario de domiciliación para el país %s (El país no está soportado) ShowWithdraw=Mostrar domiciliación IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Sin embargo, si la factura tiene pendiente algún pago por domiciliación no procesado, no será marcada como pagada para permitir la gestión de la domiciliación. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->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 +DoStandingOrdersBeforePayments=Esta pestaña le permite realizar una petición de domiciliación. Una vez realizadas las peticiones, vaya al menú Bancos->Pagos para gestionar la domiciliación. Al cerrar una domiciliación, los pagos de las facturas se registrarán automáticamente, y las facturas completamente pagadas serán cerradas. +DoCreditTransferBeforePayments=Esta pestaña le permite realizar una petición de transferencia bancaria. Una vez realizadas las peticiones, vaya al menú Bancos->Pagos para gestionar la petición. Al cerrar una petición, los pagos de las facturas se registrarán automáticamente, y las facturas completamente pagadas serán cerradas. +WithdrawalFile=Archivo de domiciliación +CreditTransferFile=Archivo de transferencia bancaria SetToStatusSent=Clasificar como "Archivo enviado" -ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null +ThisWillAlsoAddPaymentOnInvoice=Se crearán los pagos de las facturas y las clasificarán como pagadas si el resto a pagar es 0 StatisticsByLineStatus=Estadísticas por estados de líneas RUM=RUM DateRUM=Fecha de firma del mandato @@ -108,7 +109,7 @@ RUMLong=Referencia Única de Mandato RUMWillBeGenerated=Si está vacío,se generará un número RUM (Referencia Unica de Mandato) una vez que se guarde la información de la cuenta bancaria WithdrawMode=Modo domiciliación (FRST o RECUR) WithdrawRequestAmount=Importe de la domiciliación -BankTransferAmount=Amount of Credit Transfer request: +BankTransferAmount=Importe de transferencia bancaria: WithdrawRequestErrorNilAmount=No es posible crear una domiciliación sin importe SepaMandate=Mandato SEPA SepaMandateShort=Mandato SEPA @@ -124,18 +125,19 @@ SEPAFrstOrRecur=Tipo de pago ModeRECUR=Pago recurrente ModeFRST=Pago único PleaseCheckOne=Escoja solamente uno -CreditTransferOrderCreated=Credit transfer order %s created +CreditTransferOrderCreated=Orden de transferencia bancaria %s creada DirectDebitOrderCreated=Domiciliación %s creada AmountRequested=Importe solicitado SEPARCUR=SEPA CUR SEPAFRST=SEPA FRST ExecutionDate=Fecha de ejecución CreateForSepa=Crear archivo SEPA -ICS=Identificador de acreedor CI +ICS=Identificador de acreedor CI para domiciliación bancaria +ICSTransfer=Identificador de acreedor CI para transferencia bancaria END_TO_END=Etiqueta XML SEPA "EndToEndId" - ID única asignada por transacción USTRD=Etiqueta SEPA XML "Unstructured" ADDDAYS=Añadir días a la fecha de ejecución -NoDefaultIBANFound=No default IBAN found for this third party +NoDefaultIBANFound=No se encontró ningún IBAN predeterminado para este tercero ### Notifications InfoCreditSubject=Abono de domiciliación %s por el banco InfoCreditMessage=La orden de domiciliación %s ha sido abonada por el banco<br>Fecha de abono: %s @@ -145,4 +147,6 @@ InfoTransData=Importe: %s<br>Método: %s<br>Fecha: %s InfoRejectSubject=Domiciliación devuelta InfoRejectMessage=Buenos días:<br><br>la domiciliación de la factura %s por cuenta de la empresa %s, con un importe de %s ha sido devuelta por el banco.<br><br>--<br>%s ModeWarning=No se ha establecido la opción de modo real, nos detendremos después de esta simulación -ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorCompanyHasDuplicateDefaultBAN=La empresa con id %s tiene más de una cuenta bancaria predeterminada. No hay forma de saber cuál usar. +ErrorICSmissing=Falta ICS en la cuenta bancaria %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=El monto total de la orden de domiciliación bancaria difiere de la suma de líneas diff --git a/htdocs/langs/es_ES/workflow.lang b/htdocs/langs/es_ES/workflow.lang index b5f9ba0ffd8..3a3f6b2fa6d 100644 --- a/htdocs/langs/es_ES/workflow.lang +++ b/htdocs/langs/es_ES/workflow.lang @@ -16,8 +16,10 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Clasificar automáticamente el pedi # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Clasificar automáticamente el presupuestos de proveedor como facturado cuando la factura se valide (y si el importe de la factura sea la misma que el total del presupuesto) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Clasificar automáticamente el pedido a proveedor como facturado cuando la factura se valide (y si el importe de la factura sea la misma que el total del pedido enlazado) -descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +descWORKFLOW_BILL_ON_RECEPTION=Clasificar las recepciones como "facturadas" cuando se valida un pedido de proveedor vinculado # Autoclose intervention -descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Cerrar todas las intervenciones vinculadas al ticket cuando se cierra un ticket AutomaticCreation=Creación automática AutomaticClassification=Clasificación automática +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Clasificar el envío vinculado como cerrado cuando se valida la factura del cliente diff --git a/htdocs/langs/es_ES/zapier.lang b/htdocs/langs/es_ES/zapier.lang index 0a2286c8401..cc63194a91e 100644 --- a/htdocs/langs/es_ES/zapier.lang +++ b/htdocs/langs/es_ES/zapier.lang @@ -26,4 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier para el módulo Dolibarr # Admin page # ZapierForDolibarrSetup = Configuración de Zapier para Dolibarr -ZapierDescription=Interface with Zapier +ZapierDescription=Interfaz con Zapier diff --git a/htdocs/langs/es_GT/accountancy.lang b/htdocs/langs/es_GT/accountancy.lang new file mode 100644 index 00000000000..552865118f1 --- /dev/null +++ b/htdocs/langs/es_GT/accountancy.lang @@ -0,0 +1,2 @@ +# 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 c1d306ec390..b68a0680537 100644 --- a/htdocs/langs/es_GT/admin.lang +++ b/htdocs/langs/es_GT/admin.lang @@ -1,3 +1,5 @@ # 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) 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/compta.lang b/htdocs/langs/es_GT/compta.lang deleted file mode 100644 index c7c41488180..00000000000 --- a/htdocs/langs/es_GT/compta.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - compta -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account diff --git a/htdocs/langs/es_GT/mrp.lang b/htdocs/langs/es_GT/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/es_GT/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/es_GT/products.lang b/htdocs/langs/es_GT/products.lang index 6e900475275..2a38b9b0181 100644 --- a/htdocs/langs/es_GT/products.lang +++ b/htdocs/langs/es_GT/products.lang @@ -1,2 +1,2 @@ # Dolibarr language file - Source file is en_US - products -CustomCode=Customs / Commodity / HS code +AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/es_GT/withdrawals.lang b/htdocs/langs/es_GT/withdrawals.lang new file mode 100644 index 00000000000..facdefc082f --- /dev/null +++ b/htdocs/langs/es_GT/withdrawals.lang @@ -0,0 +1,2 @@ +# 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 new file mode 100644 index 00000000000..552865118f1 --- /dev/null +++ b/htdocs/langs/es_HN/accountancy.lang @@ -0,0 +1,2 @@ +# 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 c1d306ec390..b68a0680537 100644 --- a/htdocs/langs/es_HN/admin.lang +++ b/htdocs/langs/es_HN/admin.lang @@ -1,3 +1,5 @@ # 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) 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/compta.lang b/htdocs/langs/es_HN/compta.lang deleted file mode 100644 index c7c41488180..00000000000 --- a/htdocs/langs/es_HN/compta.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - compta -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account diff --git a/htdocs/langs/es_HN/mrp.lang b/htdocs/langs/es_HN/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/es_HN/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/es_HN/products.lang b/htdocs/langs/es_HN/products.lang index 6e900475275..2a38b9b0181 100644 --- a/htdocs/langs/es_HN/products.lang +++ b/htdocs/langs/es_HN/products.lang @@ -1,2 +1,2 @@ # Dolibarr language file - Source file is en_US - products -CustomCode=Customs / Commodity / HS code +AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/es_HN/withdrawals.lang b/htdocs/langs/es_HN/withdrawals.lang new file mode 100644 index 00000000000..facdefc082f --- /dev/null +++ b/htdocs/langs/es_HN/withdrawals.lang @@ -0,0 +1,2 @@ +# 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 073d5f060b7..d6c90c3b1ce 100644 --- a/htdocs/langs/es_MX/accountancy.lang +++ b/htdocs/langs/es_MX/accountancy.lang @@ -79,7 +79,7 @@ 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=Número de elementos a unir mostrados por página (máximo recomendado: 50) +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 @@ -95,13 +95,14 @@ TransitionalAccount=Cuenta de transferencia bancaria transitoria ACCOUNTING_ACCOUNT_SUSPENSE=Cuenta contable de espera ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Cuenta contable para registrar suscripciones ACCOUNTING_PRODUCT_BUY_ACCOUNT=Cuenta contable por defecto para los productos comprados (se usa si no se define en la hoja de productos) +ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=Cuenta contable por defecto para los productos comprados en EEC (se usa si no se define en la hoja de productos) +ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT=Cuenta contable por defecto para los productos comprados e importados fuera de la EEC (usado si no está definido en la hoja de productos) ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Cuenta contable por defecto para los productos vendidos (si no ha sido definida en la hoja \nproducto) ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT=Cuenta contable por defecto para los productos vendidos en la EEC (utilizada si no se define en la hoja de producto) ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT=Cuenta contable por defecto para los productos vendidos y exportados fuera de la EEC (usado si no está definido en la hoja de producto) ACCOUNTING_SERVICE_BUY_ACCOUNT=Cuenta contable por defecto para los servicios comprados (si no ha sido definida en la hoja \nservicio) ACCOUNTING_SERVICE_SOLD_ACCOUNT=Cuenta contable por defecto para los servicios vendidos (si no ha sido definida en la hoja servicio) LabelAccount=Descripción de la cuenta -Sens=Significado DelYear=Año a borrar DelJournal=Diario a borrar DescFinanceJournal=Diario financiero incluyendo todos los tipos de pagos por cuenta bancaria diff --git a/htdocs/langs/es_MX/admin.lang b/htdocs/langs/es_MX/admin.lang index 522f487bfb6..2f40f90a92a 100644 --- a/htdocs/langs/es_MX/admin.lang +++ b/htdocs/langs/es_MX/admin.lang @@ -1,7 +1,7 @@ # Dolibarr language file - Source file is en_US - admin VersionProgram=Versión del programa VersionLastInstall=Instalar la versión inicial -VersionLastUpgrade=Actualizar a la Versión mâs reciente +VersionLastUpgrade=Actualizar a la versión más reciente FileCheck=Comprobación de integridad del conjunto de archivos FileCheckDesc=Esta herramienta te permite comprobar la integridad de los archivos y la configuración de tu aplicación, comparando cada archivo con el archivo oficial. El valor de algunas constantes de la configuración también podria ser comprobado. Tu puedes usar esta herramienta para determinar si cualquiera de los archivos a sido modificado (ejem. por un hacker). FileIntegrityIsStrictlyConformedWithReference=La integridad de los archivos está estrictamente conformada con la referencia. @@ -20,11 +20,11 @@ SessionSavePath=Ubicación para guardar la sesión PurgeSessions=Depuración de sesiones ConfirmPurgeSessions=¿Realmente desea depurar todas las sesiónes? Esto desconectara a todos los usuarios (excepto usted). NoSessionListWithThisHandler=El gestor para guardar la sesión configurado en tu PHP no permite enumerar todas las sesiones que se estan ejecutando. -ConfirmLockNewSessions=¿Estas seguro de querer restringir cualquier nueva conexión Dolibarr? Unicamente el usuario <b>%s</b> podra conectarse posteriormente. +ConfirmLockNewSessions=¿Estás seguro de querer restringir cualquier nueva conexión a Dolibarr? Únicamente el usuario <b>%s</b> podrá conectarse posteriormente. UnlockNewSessions=Remover bloqueo de conexión YourSession=Tu sesión WebUserGroup=Usuario/Grupo del servidor web -NoSessionFound=La configuración de tu PHP parece no permitir listar las sesiones activas. El directorio usado para guardar las sesiones (<b>%s</b>) podria estar protegido (Por ejemplo, por permisos del SO o por la directiva PHP open_basedir). +NoSessionFound=Tu configuración PHP no parece permitir listar sesiones activas. El directorio usado para guardar sesiones (<b>%s</b>) podría estar protegido (Por ejemplo, por permisos del SO o por la directiva PHP open_basedir). DBStoringCharset=Charset de la base de datos para almacenar información DBSortingCharset=Charset de la base de datos para clasificar información ClientCharset=Conjunto de caracteres del cliente @@ -56,7 +56,6 @@ AllowToSelectProjectFromOtherCompany=En documento de un tercero, puede seleccion JavascriptDisabled=JavaScript desactivado UsePreviewTabs=Utilizar pestañas de vista previa ShowPreview=Mostrar previsualización -CurrentTimeZone=Zona horaria PHP (servidor) TZHasNoEffect=Las fechas son guardadas y retornadas por el servidor de base de datos como si fueran guardadas como cadenas sometidas. La zona horaria tiene efecto solo cuando usamos la función UNIX_TIMESTAMP (que no debe ser usada por Dolibarr, ya que TZ no debe tener efecto, incluso si cambió despues de que datos fueron ingresados). Space=Espacio NextValue=Valor siguiente @@ -107,7 +106,6 @@ SystemToolsArea=Área de herramientas del sistema SystemToolsAreaDesc=Esta área provee funciones administrativas. Usar el menú para seleccionar la característica requerida. PurgeAreaDesc=Esta página te permite eliminar todos los archivos generados o guardados por Dolibarr (archivos temporales o todos los archivos en <b>%s</b> el directorio). Usar esta característica no es normalmente necesario. Esta es proporcionada como una solución alternativa para usuarios cuyo Dolibarr es hospedado por un proveedor que no ofrece permisos de borrado de archivos generados por el servidor web. PurgeDeleteLogFile=Eliminar archivos log, incluyendo <b>%s</b> definido por módulo Syslog (sin riesgo de perdida de datos) -PurgeDeleteTemporaryFiles=Eliminar todos los archivos temporales (sin riesgo de perdida de datos). Nota: La eliminación es hecha solo si el directorio temporal fue creado 24 horas antes. PurgeDeleteAllFilesInDocumentsDir=Eliminar todos los archivos en el directorio: <b>%s</b>.<br>Esto borrara todos los documentos generados relacionados a elementos (terceras partes, facturas etc...), archivos subidos a el módulo ECM, volcados de respaldo de base de datos y archivos temporales. PurgeRunNow=Purgar ahora PurgeNothingToDelete=Ningún directorio o archivos que desee eliminar. @@ -226,10 +224,12 @@ Module20Name=Propuestas Module25Name=Ordenes de venta Module30Name=Facturas Module40Name=Vendedores +Module59000Desc=Module to follow margins DictionaryAccountancyJournal=Diarios de contabilidad DictionarySocialNetworks=Redes Sociales Upgrade=Actualizar 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 diff --git a/htdocs/langs/es_MX/bills.lang b/htdocs/langs/es_MX/bills.lang index 2eca7855931..4ea66beab2f 100644 --- a/htdocs/langs/es_MX/bills.lang +++ b/htdocs/langs/es_MX/bills.lang @@ -42,6 +42,8 @@ CustomerBillsUnpaid=Facturas de clientes no pagadas Billed=Facturada CreditNote=Nota de crédito ReasonDiscount=Razón +PaymentConditionShortPT_ORDER=Pedido PaymentTypeCB=Tarjeta de crédito PaymentTypeShortCB=Tarjeta de crédito +PayedByThisPayment=Liquidado en este pago situationInvoiceShortcode_S=D diff --git a/htdocs/langs/es_MX/companies.lang b/htdocs/langs/es_MX/companies.lang index 94d7e8f6bd4..811526bc5ac 100644 --- a/htdocs/langs/es_MX/companies.lang +++ b/htdocs/langs/es_MX/companies.lang @@ -167,7 +167,6 @@ VATIntraCheckableOnEUSite=Verificar el numero de control de IVA intracomunitario VATIntraManualCheck=También puedes verificar manualmente desde el sitio web de la comision europea <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=No es posible realizar la verificación. El servicio de comprobación no es prestado por el país miembro (%s). NorProspectNorCustomer=No es cliente potencial, ni cliente -JuridicalStatus=Tipo de entidad legal OthersNotLinkedToThirdParty=Otros, no vinculado a un tercero ProspectStatus=Estatus del cliente potencial TE_MEDIUM=Mediana empresa diff --git a/htdocs/langs/es_MX/compta.lang b/htdocs/langs/es_MX/compta.lang index 9c1cd218356..b8c48cab211 100644 --- a/htdocs/langs/es_MX/compta.lang +++ b/htdocs/langs/es_MX/compta.lang @@ -1,4 +1,9 @@ # Dolibarr language file - Source file is en_US - compta +MenuFinancial=Facturación | Pago +TaxModuleSetupToModifyRules=Vaya a la configuración del módulo de impuestos <a href="%s"> </a> para modificar las reglas de cálculo +TaxModuleSetupToModifyRulesLT=Vaya a <a href="%s"> Configuración de la empresa </a> para modificar las reglas de cálculo +OptionMode=Opción de contabilidad +OptionModeVirtual=Opción Reclamaciones-Deudas Param=Configuración PaymentSocialContribution=Pago de impuesto social/fiscal ByThirdParties=Por terceros diff --git a/htdocs/langs/es_MX/main.lang b/htdocs/langs/es_MX/main.lang index d2d2407adfe..b2b9ca9f0e5 100644 --- a/htdocs/langs/es_MX/main.lang +++ b/htdocs/langs/es_MX/main.lang @@ -20,6 +20,7 @@ FormatDateHourSecShort=%I:%M:%S %p %d/%m/%Y FormatDateHourTextShort=%I:%M %p, %d %b %Y FormatDateHourText=%I:%M %p, %d %B %Y AvailableVariables=Variables de sustitución disponibles +CurrentTimeZone=Zona horaria PHP (servidor) NoRecordFound=Ningún registro fue encontrado NoError=No hay error ErrorFieldFormat=El campo '%s' contiene un valor incorrecto @@ -40,6 +41,7 @@ SetDate=Ajustar fecha SeeHere=Mira aquí BackgroundColorByDefault=Color de fondo por defecto FileWasNotUploaded=Un archivo fue seleccionado para adjuntar, sin embargo, no ha sido cargado aún. De clic en "Adjuntar archivo" para éllo. +HomePage=Página Principal LevelOfFeature=Nivel de características NotDefined=No definido ConnectedOnMultiCompany=Conectado a la entidad diff --git a/htdocs/langs/es_MX/mrp.lang b/htdocs/langs/es_MX/mrp.lang index 300d0969e7e..afe7a7f1d75 100644 --- a/htdocs/langs/es_MX/mrp.lang +++ b/htdocs/langs/es_MX/mrp.lang @@ -1,2 +1,7 @@ # Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material BOMsSetup=configuración del módulo BOM +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/es_MX/products.lang b/htdocs/langs/es_MX/products.lang index 8bd908672b5..af9eb0e2ac2 100644 --- a/htdocs/langs/es_MX/products.lang +++ b/htdocs/langs/es_MX/products.lang @@ -5,12 +5,12 @@ 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 ExportDataset_produit_1=Productos ImportDataset_produit_1=productos -CustomCode=Customs / Commodity / HS code BarCodePrintsheet=Imprimir código de barras GlobalVariableUpdaterType0=Datos JSON GlobalVariableUpdaterHelp0=Analiza los datos JSON de la URL especificada, VALUE especifica la ubicación del valor relevante, diff --git a/htdocs/langs/es_MX/receptions.lang b/htdocs/langs/es_MX/receptions.lang index 0356d61254c..55b566fd826 100644 --- a/htdocs/langs/es_MX/receptions.lang +++ b/htdocs/langs/es_MX/receptions.lang @@ -1,2 +1,5 @@ # Dolibarr language file - Source file is en_US - receptions StatusReceptionCanceled=Cancelado +StatusReceptionProcessed=Procesada +StatusReceptionProcessedShort=Procesada +NoMorePredefinedProductToDispatch=No hay más productos solicitados pendientes por recibir diff --git a/htdocs/langs/es_MX/sendings.lang b/htdocs/langs/es_MX/sendings.lang index 96689e2c322..96ffc6ab5ff 100644 --- a/htdocs/langs/es_MX/sendings.lang +++ b/htdocs/langs/es_MX/sendings.lang @@ -1,2 +1,5 @@ # Dolibarr language file - Source file is en_US - sendings StatusSendingCanceled=Cancelado +StatusSendingCanceledShort=Cancelado +StatusSendingProcessed=Procesada +StatusSendingProcessedShort=Procesada diff --git a/htdocs/langs/es_MX/withdrawals.lang b/htdocs/langs/es_MX/withdrawals.lang index 52a15f0786e..2f810c0c725 100644 --- a/htdocs/langs/es_MX/withdrawals.lang +++ b/htdocs/langs/es_MX/withdrawals.lang @@ -1,5 +1,8 @@ # Dolibarr language file - Source file is en_US - withdrawals +StandingOrderToProcess=Procesar WithdrawalReceipt=Orden de domiciliación bancaria 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 new file mode 100644 index 00000000000..552865118f1 --- /dev/null +++ b/htdocs/langs/es_PA/accountancy.lang @@ -0,0 +1,2 @@ +# 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 f0c05a924c9..eb11d0d5c6f 100644 --- a/htdocs/langs/es_PA/admin.lang +++ b/htdocs/langs/es_PA/admin.lang @@ -1,4 +1,6 @@ # 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) 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/compta.lang b/htdocs/langs/es_PA/compta.lang deleted file mode 100644 index c7c41488180..00000000000 --- a/htdocs/langs/es_PA/compta.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - compta -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account diff --git a/htdocs/langs/es_PA/mrp.lang b/htdocs/langs/es_PA/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/es_PA/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/es_PA/products.lang b/htdocs/langs/es_PA/products.lang index 6e900475275..2a38b9b0181 100644 --- a/htdocs/langs/es_PA/products.lang +++ b/htdocs/langs/es_PA/products.lang @@ -1,2 +1,2 @@ # Dolibarr language file - Source file is en_US - products -CustomCode=Customs / Commodity / HS code +AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/es_PA/withdrawals.lang b/htdocs/langs/es_PA/withdrawals.lang new file mode 100644 index 00000000000..facdefc082f --- /dev/null +++ b/htdocs/langs/es_PA/withdrawals.lang @@ -0,0 +1,2 @@ +# 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 3fa654ee77c..94dd1838fd8 100644 --- a/htdocs/langs/es_PE/accountancy.lang +++ b/htdocs/langs/es_PE/accountancy.lang @@ -27,6 +27,7 @@ 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) @@ -38,7 +39,6 @@ ACCOUNTING_MISCELLANEOUS_JOURNAL=Diario diverso ACCOUNTING_EXPENSEREPORT_JOURNAL=Informe de Gastos Diario ACCOUNTING_SOCIAL_JOURNAL=Diario Social ACCOUNTING_ACCOUNT_SUSPENSE=Cuenta contable de espera -Sens=Significado Codejournal=Periódico FinanceJournal=Periodo Financiero TotalMarge=Margen total de ventas diff --git a/htdocs/langs/es_PE/admin.lang b/htdocs/langs/es_PE/admin.lang index 6c8dc0a38a9..2e7678563b1 100644 --- a/htdocs/langs/es_PE/admin.lang +++ b/htdocs/langs/es_PE/admin.lang @@ -1,13 +1,14 @@ # Dolibarr language file - Source file is en_US - admin VersionProgram=Versión del programa VersionLastInstall=Instalar versión inicial -ExampleOfDirectoriesForModelGen=Ejemplo de sintaxis:<br>c:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir 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 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/cron.lang b/htdocs/langs/es_PE/cron.lang index 96e3d29ed2c..bde4921afff 100644 --- a/htdocs/langs/es_PE/cron.lang +++ b/htdocs/langs/es_PE/cron.lang @@ -1,3 +1,2 @@ # Dolibarr language file - Source file is en_US - cron -CronStatusActiveBtn=Activado CronStatusInactiveBtn=Inhabilitar diff --git a/htdocs/langs/es_PE/products.lang b/htdocs/langs/es_PE/products.lang index 2e576f6187d..59238285ddf 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) ExportDataset_produit_1=Productos -CustomCode=Customs / Commodity / HS code diff --git a/htdocs/langs/es_PE/ticket.lang b/htdocs/langs/es_PE/ticket.lang index 363410255e5..9b8429210d8 100644 --- a/htdocs/langs/es_PE/ticket.lang +++ b/htdocs/langs/es_PE/ticket.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - ticket -NotRead=Sin leer Read=Leer Type=Tipo TicketNewEmailBodyInfosTrackUrl=Puedes ver la progresión del ticket haciendo click sobre el seguimiento del ticket. diff --git a/htdocs/langs/es_PE/withdrawals.lang b/htdocs/langs/es_PE/withdrawals.lang new file mode 100644 index 00000000000..facdefc082f --- /dev/null +++ b/htdocs/langs/es_PE/withdrawals.lang @@ -0,0 +1,2 @@ +# 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 new file mode 100644 index 00000000000..552865118f1 --- /dev/null +++ b/htdocs/langs/es_PY/accountancy.lang @@ -0,0 +1,2 @@ +# 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 c1d306ec390..b68a0680537 100644 --- a/htdocs/langs/es_PY/admin.lang +++ b/htdocs/langs/es_PY/admin.lang @@ -1,3 +1,5 @@ # 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) 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/compta.lang b/htdocs/langs/es_PY/compta.lang deleted file mode 100644 index c7c41488180..00000000000 --- a/htdocs/langs/es_PY/compta.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - compta -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account diff --git a/htdocs/langs/es_PY/mrp.lang b/htdocs/langs/es_PY/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/es_PY/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/es_PY/products.lang b/htdocs/langs/es_PY/products.lang index 6e900475275..2a38b9b0181 100644 --- a/htdocs/langs/es_PY/products.lang +++ b/htdocs/langs/es_PY/products.lang @@ -1,2 +1,2 @@ # Dolibarr language file - Source file is en_US - products -CustomCode=Customs / Commodity / HS code +AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/es_PY/withdrawals.lang b/htdocs/langs/es_PY/withdrawals.lang new file mode 100644 index 00000000000..facdefc082f --- /dev/null +++ b/htdocs/langs/es_PY/withdrawals.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - withdrawals +ICS=Creditor Identifier CI for direct debit diff --git a/htdocs/langs/es_US/accountancy.lang b/htdocs/langs/es_US/accountancy.lang new file mode 100644 index 00000000000..552865118f1 --- /dev/null +++ b/htdocs/langs/es_US/accountancy.lang @@ -0,0 +1,2 @@ +# 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 c1d306ec390..b68a0680537 100644 --- a/htdocs/langs/es_US/admin.lang +++ b/htdocs/langs/es_US/admin.lang @@ -1,3 +1,5 @@ # 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) 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/compta.lang b/htdocs/langs/es_US/compta.lang deleted file mode 100644 index c7c41488180..00000000000 --- a/htdocs/langs/es_US/compta.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - compta -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account diff --git a/htdocs/langs/es_US/mrp.lang b/htdocs/langs/es_US/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/es_US/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/es_US/products.lang b/htdocs/langs/es_US/products.lang index 6e900475275..2a38b9b0181 100644 --- a/htdocs/langs/es_US/products.lang +++ b/htdocs/langs/es_US/products.lang @@ -1,2 +1,2 @@ # Dolibarr language file - Source file is en_US - products -CustomCode=Customs / Commodity / HS code +AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/es_US/withdrawals.lang b/htdocs/langs/es_US/withdrawals.lang new file mode 100644 index 00000000000..facdefc082f --- /dev/null +++ b/htdocs/langs/es_US/withdrawals.lang @@ -0,0 +1,2 @@ +# 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 new file mode 100644 index 00000000000..552865118f1 --- /dev/null +++ b/htdocs/langs/es_UY/accountancy.lang @@ -0,0 +1,2 @@ +# 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 c1d306ec390..b68a0680537 100644 --- a/htdocs/langs/es_UY/admin.lang +++ b/htdocs/langs/es_UY/admin.lang @@ -1,3 +1,5 @@ # 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) 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/compta.lang b/htdocs/langs/es_UY/compta.lang deleted file mode 100644 index c7c41488180..00000000000 --- a/htdocs/langs/es_UY/compta.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - compta -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account diff --git a/htdocs/langs/es_UY/mrp.lang b/htdocs/langs/es_UY/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/es_UY/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/es_UY/products.lang b/htdocs/langs/es_UY/products.lang index 6e900475275..2a38b9b0181 100644 --- a/htdocs/langs/es_UY/products.lang +++ b/htdocs/langs/es_UY/products.lang @@ -1,2 +1,2 @@ # Dolibarr language file - Source file is en_US - products -CustomCode=Customs / Commodity / HS code +AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/es_UY/withdrawals.lang b/htdocs/langs/es_UY/withdrawals.lang new file mode 100644 index 00000000000..facdefc082f --- /dev/null +++ b/htdocs/langs/es_UY/withdrawals.lang @@ -0,0 +1,2 @@ +# 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 new file mode 100644 index 00000000000..552865118f1 --- /dev/null +++ b/htdocs/langs/es_VE/accountancy.lang @@ -0,0 +1,2 @@ +# 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 74b465f966a..d395e4cecd0 100644 --- a/htdocs/langs/es_VE/admin.lang +++ b/htdocs/langs/es_VE/admin.lang @@ -4,6 +4,7 @@ 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 @@ -29,5 +30,6 @@ 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/mrp.lang b/htdocs/langs/es_VE/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/es_VE/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/es_VE/products.lang b/htdocs/langs/es_VE/products.lang index 7347e866031..53eae0774e3 100644 --- a/htdocs/langs/es_VE/products.lang +++ b/htdocs/langs/es_VE/products.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - products TMenuProducts=Productos y servicios ProductStatusNotOnBuyShort=Fuera compra -CustomCode=Customs / Commodity / HS code +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/withdrawals.lang b/htdocs/langs/es_VE/withdrawals.lang index fb9616a1788..0512b713a32 100644 --- a/htdocs/langs/es_VE/withdrawals.lang +++ b/htdocs/langs/es_VE/withdrawals.lang @@ -1,2 +1,3 @@ # 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 682433c526e..170d73a6bac 100644 --- a/htdocs/langs/et_EE/accountancy.lang +++ b/htdocs/langs/et_EE/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Kuupäev Docref=Viide LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/et_EE/admin.lang b/htdocs/langs/et_EE/admin.lang index 268ecfbe48e..abc17b9297f 100644 --- a/htdocs/langs/et_EE/admin.lang +++ b/htdocs/langs/et_EE/admin.lang @@ -56,6 +56,8 @@ GUISetup=Kuva SetupArea=Seadistamine UploadNewTemplate=Upload new template(s) FormToTestFileUploadForm=Failide üleslaadimise teistimiseks kasutatav vorm (vastavalt seadistustele) +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled IfModuleEnabled=Märkus: jah töötab vaid siis, kui moodul <b>%s</b> on sisse lülitatud. 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. @@ -85,7 +87,6 @@ ShowPreview=Kuva eelvaade ShowHideDetails=Show-Hide details PreviewNotAvailable=Eelvaade pole saadaval ThemeCurrentlyActive=Hetkel kasutatav teema -CurrentTimeZone=PHP ajavöönd (serveri ajavöönd) MySQLTimeZone=MySQLi (andmebaasi) ajavöönd 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=Ruum @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Kustuta ajutised failid +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 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 PurgeNothingToDelete=Pole ühtki faili ega kausta, mida kustutada. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Eelistatud partnerid OtherResources=Muud ressursid ExternalResources=Välised ressursid SocialNetworks=Sotsiaalvõrgud +SocialNetworkId=Social Network ID ForDocumentationSeeWiki=Kasutaja või arendaja dokumentatsiooni (KKK jms) võid leida<br>ametlikust Dolibarri Wikist:<br><a href="%s" target="_blank"><b>%s</b></a> ForAnswersSeeForum=Muude küsimuste või abi küsimise tarbeks saab kasutada Dolibarri foorumit:<br><a href="%s" target="_blank"><b>%s</b></a> HelpCenterDesc1=Here are some resources for getting help and support with Dolibarr. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Praeguse konfiguratsiooniga näited ListOfDirectories=OpenDocument mallide kaustad 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=Nendes kataloogides leiduvate ODT / ODS-malli failide arv -ExampleOfDirectoriesForModelGen=Süntaksi näited:<br>c:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br>Enne dokumendimallide loomist loe wikis olevat dokumentatsiooni: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Nimi/perekonnanimi ametikoht @@ -406,7 +408,7 @@ UrlGenerationParameters=URLide turvamise parameetrid SecurityTokenIsUnique=Kasuta iga URLi jaoks unikaalset turvalise võtme parameetrit EnterRefToBuildUrl=Sisesta viide objektile %s GetSecuredUrl=Saada arvutatud URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) OldVATRates=Vana käibemaksumäär NewVATRates=Uus käibemaksumäär PriceBaseTypeToChange=Muuda hindadel, mille baasväärtus on defineeritud kui @@ -668,7 +670,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=Marginaalid -Module59000Desc=Marginaalide haldamise moodu +Module59000Desc=Module to follow margins Module60000Name=Komisjonitasu Module60000Desc=Komisjonitasude haldamise moodu Module62000Name=Incoterms @@ -1306,7 +1308,7 @@ 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=Otsingu optimeerimine -YouHaveXObjectUseSearchOptim=You have %s %s in the database. You should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,13 @@ ServiceSetup=Teenuste mooduli seadistamine ProductServiceSetup=Toodete ja teenuste mooduli seadistamine 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=Vaikimisi vöötkoodi tüüp toodetel @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=Uus menüü MenuHandler=Menüü töötleja MenuModule=Lähtekoodi moodul -HideUnauthorizedMenu= Peida volitamata menüüd (hall) +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=ID menüü DetailMenuHandler=Menüü töötleja uue menüü asukoha jaoks DetailMenuModule=Mooduli nimi, kui menüükanne tuleb moodulist @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Postiindeks MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/et_EE/banks.lang b/htdocs/langs/et_EE/banks.lang index 60e4f3457b4..2838587c4c8 100644 --- a/htdocs/langs/et_EE/banks.lang +++ b/htdocs/langs/et_EE/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/et_EE/blockedlog.lang b/htdocs/langs/et_EE/blockedlog.lang index ac567943c5c..7b3480de3b1 100644 --- a/htdocs/langs/et_EE/blockedlog.lang +++ b/htdocs/langs/et_EE/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/et_EE/boxes.lang b/htdocs/langs/et_EE/boxes.lang index 7c9fca21f40..3212c908291 100644 --- a/htdocs/langs/et_EE/boxes.lang +++ b/htdocs/langs/et_EE/boxes.lang @@ -46,9 +46,12 @@ 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=Üldine tegevus (arved, pakkumised, tellimused) BoxGoodCustomers=Good customers BoxTitleGoodCustomers=%s Good customers +BoxScheduledJobs=Plaanitud käivitused +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Failed to refresh RSS flux. Latest successful refresh date: %s LastRefreshDate=Latest refresh date NoRecordedBookmarks=Järjehoidjaid pole määratletud. @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Raamatupidamine +ValidatedProjects=Validated projects diff --git a/htdocs/langs/et_EE/cashdesk.lang b/htdocs/langs/et_EE/cashdesk.lang index ce7e0354ab2..0f87e95779e 100644 --- a/htdocs/langs/et_EE/cashdesk.lang +++ b/htdocs/langs/et_EE/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=Arveid Paymentnumpad=Type of Pad to enter payment Numberspad=Numbers Pad @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/et_EE/categories.lang b/htdocs/langs/et_EE/categories.lang index ac9524d0f0d..f288163f0d9 100644 --- a/htdocs/langs/et_EE/categories.lang +++ b/htdocs/langs/et_EE/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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 diff --git a/htdocs/langs/et_EE/companies.lang b/htdocs/langs/et_EE/companies.lang index 7689d22553b..6bafeb504b3 100644 --- a/htdocs/langs/et_EE/companies.lang +++ b/htdocs/langs/et_EE/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi VATIntraManualCheck=You can also check manually on the European Commission website <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=Kontrollida pole võimalik. Kontrolli, et liikmesriik (%s) võimaldab teenust kasutada. NorProspectNorCustomer=Not prospect, nor customer -JuridicalStatus=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Töötajad ProspectLevelShort=Potentsiaalne diff --git a/htdocs/langs/et_EE/compta.lang b/htdocs/langs/et_EE/compta.lang index 5be099381a7..35f06da633f 100644 --- a/htdocs/langs/et_EE/compta.lang +++ b/htdocs/langs/et_EE/compta.lang @@ -111,7 +111,7 @@ Refund=Tagasimakse SocialContributionsPayments=Social/fiscal taxes payments ShowVatPayment=Näita käibemaksu makset TotalToPay=Kokku maksta -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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>. -CalcModeDebt=Analysis of known recorded invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Tulude ja kulude saldo, aasta kokkuvõte 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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=- Näidatud summad sisaldavad kõiki makse 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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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=Kolmandate isikute IRPFi aruanne VATReport=Sale tax report VATReportByPeriods=Sale tax report by period +VATReportByMonth=Sale tax report by month VATReportByRates=Sale tax report by rates VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer diff --git a/htdocs/langs/et_EE/cron.lang b/htdocs/langs/et_EE/cron.lang index edf8cd714cf..f727eb118fc 100644 --- a/htdocs/langs/et_EE/cron.lang +++ b/htdocs/langs/et_EE/cron.lang @@ -6,14 +6,15 @@ Permission23102 = Create/update Scheduled job Permission23103 = Delete Scheduled job Permission23104 = Execute Scheduled job # Admin -CronSetup= Plaanitavata programmide haldamise seadistamine -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=Või mõne kindla programmi kontrollimiseks ja käivitamiseks +CronSetup=Plaanitavata programmide haldamise seadistamine +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=Croni käivitatavate programmide URLile ligipääsu turvavõti 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 environement you can use Scheduled task tools 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 @@ -42,10 +43,11 @@ CronModule=Moodul CronNoJobs=Pole ühtki registreeritud programm CronPriority=Prioriteet CronLabel=Nimi -CronNbRun=Käivituste arv -CronMaxRun=Max number launch +CronNbRun=Number of launches +CronMaxRun=Maximum number of launches CronEach=Iga JobFinished=Tegevus käivitatud ja lõpetatud +Scheduled=Scheduled #Page card CronAdd= Lisa programme CronEvery=Execute job each @@ -56,16 +58,16 @@ CronNote=Kommentaar CronFieldMandatory=Välja %s täitmine on nõutud CronErrEndDateStartDt=Lõppkuupäev ei saa olla alguskuupäevast varasem StatusAtInstall=Status at module installation -CronStatusActiveBtn=Lülita sisse +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Lülita välja CronTaskInactive=See tegevus on välja lülitatud CronId=ID CronClassFile=Filename with class -CronModuleHelp=Name of Dolibarr module directory (also work with external Dolibarr module). <BR> For exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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=Käivitatav süsteemi käsk. CronCreateJob=Create new Scheduled Job CronFrom=Kellelt @@ -76,8 +78,14 @@ CronType_method=Call method of a PHP Class CronType_command=Käsurea käsk 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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +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' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/et_EE/errors.lang b/htdocs/langs/et_EE/errors.lang index 11b82753a43..4d3ae37fabc 100644 --- a/htdocs/langs/et_EE/errors.lang +++ b/htdocs/langs/et_EE/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=Ühtegi viga ei ole, teostame # Errors ErrorButCommitIsDone=Esines vigu, kuid kinnitame sellest hoolimata ErrorBadEMail=Email %s is wrong +ErrorBadMXDomain=Email %s seems wrong (domain has no valid MX record) ErrorBadUrl=URL %s on vale ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=Kasutajanimi %s on juba olemas. ErrorGroupAlreadyExists=Grupp %s on juba olemas. ErrorRecordNotFound=Kirjet ei leitud. @@ -48,6 +50,7 @@ ErrorFieldsRequired=Mõned nõutud väljad on täitmata. ErrorSubjectIsRequired=The email topic is required ErrorFailedToCreateDir=Kausta loomine ebaõnnestus. Kontrolli, et veebiserveri kasutajal on piisavalt õigusi Dolibarri dokumentide kausta kirjutamiseks. Kui PHP <b>safe_mode</b> parameeter on sisse lülitatud, siis kontrolli, et veebiserveri kasutaja (või grupp) on Dolibarri PHP failide omanik. ErrorNoMailDefinedForThisUser=Antud kasutaja e-posti aadressi pole määratletud +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=See funktsioon vajab töötamiseks JavaScripti sisse lülitamist. Muuda seadeid Seadistamine->Kuva menüüs. ErrorTopMenuMustHaveAParentWithId0='Ülemine' tüüpi menüül ei saa olla emamenüüd. Sisesta emamenüü lahtrisse 0 või vali menüütüübiks 'Vasakul'. ErrorLeftMenuMustHaveAParentId='Vasak' tüüpi menüül peab olema ema ID. @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=This profile name already exists for this export set. ErrorLDAPSetupNotComplete=Dolibarr-LDAP sobitamine ei ole täielik. ErrorLDAPMakeManualTest=Kausta %s on loodud .ldif fail. Vigade kohta lisainfo saamiseks proovi selle käsitsi käsurealt laadimist. ErrorCantSaveADoneUserWithZeroPercentage=Can't save an action with "status not started" if field "done by" is also filled. -ErrorRefAlreadyExists=Loomiseks kasutatav viide on juba olemas. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/et_EE/exports.lang b/htdocs/langs/et_EE/exports.lang index 516ee5c69c2..ed1048c18f3 100644 --- a/htdocs/langs/et_EE/exports.lang +++ b/htdocs/langs/et_EE/exports.lang @@ -26,6 +26,8 @@ FieldTitle=Välja nimi NowClickToGenerateToBuildExportFile=Now, select the file format in the combo box and click on "Generate" to build the export file... AvailableFormats=Available Formats LibraryShort=Teek +ExportCsvSeparator=Csv caracter separator +ImportCsvSeparator=Csv caracter separator Step=Samm 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. @@ -131,3 +133,4 @@ 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/et_EE/mails.lang b/htdocs/langs/et_EE/mails.lang index bd62e283b06..45d64d5f642 100644 --- a/htdocs/langs/et_EE/mails.lang +++ b/htdocs/langs/et_EE/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Rida %s failis @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Teated -NoNotificationsWillBeSent=Selle tegevuse ja ettevõttega ei ole plaanis saata ühtki e-kirja teadet -ANotificationsWillBeSent=E-posti teel saadetakse 1 teade -SomeNotificationsWillBeSent=E-posti teel saadetakse %s teadet -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=Loetle kõik saadetud e-posti teated +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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=Informatsioon ContactsWithThirdpartyFilter=Contacts with third-party filter Unanswered=Unanswered Answered=Answered IsNotAnAnswer=Is not answer (initial email) IsAnAnswer=Is an answer of an initial email +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/et_EE/main.lang b/htdocs/langs/et_EE/main.lang index 813ad00b669..c8174781715 100644 --- a/htdocs/langs/et_EE/main.lang +++ b/htdocs/langs/et_EE/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=No template available for this email type AvailableVariables=Available substitution variables NoTranslation=Tõlge puudub Translation=Tõlge +CurrentTimeZone=PHP ajavöönd (serveri ajavöönd) EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria NoRecordFound=Kirjet ei leitud NoRecordDeleted=No record deleted NotEnoughDataYet=Pole piisavalt andmeid @@ -85,6 +87,8 @@ FileWasNotUploaded=Fail on valitud manustamiseks, kuid on veel üles laadimata. NbOfEntries=No. of entries GoToWikiHelpPage=Read online help (Internet access needed) GoToHelpPage=Loe abi +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Home Page RecordSaved=Kirje salvestatud RecordDeleted=Kirje kustutatud RecordGenerated=Record generated @@ -220,6 +224,7 @@ Value=Väärtus PersonalValue=Isiklik väärtus NewObject=Uus %s NewValue=Uus väärtus +OldValue=Old value %s CurrentValue=Praegune väärtus Code=Kood Type=Liik @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Valik +Filters=Filters List=Nimekiri FullList=Täielik nimekiri FullConversation=Full conversation @@ -650,6 +656,7 @@ SupplierPreview=Vendor preview ShowCustomerPreview=Näita kliendi eelvaadet ShowSupplierPreview=Show vendor preview RefCustomer=Kliendi viide +InternalRef=Internal ref. Currency=Valuuta InfoAdmin=Administraatoritele vajalik informatsioon Undo=Tühista @@ -671,7 +678,7 @@ SendMail=Saada e-kiri Email=E-post NoEMail=E-posti aadress puudub AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=Mobiiltelefon puudub Owner=Omanik FollowingConstantsWillBeSubstituted=Järgnevad konstandid asendatakse vastavate väärtustega. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/et_EE/modulebuilder.lang b/htdocs/langs/et_EE/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/et_EE/modulebuilder.lang +++ b/htdocs/langs/et_EE/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/et_EE/mrp.lang b/htdocs/langs/et_EE/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/et_EE/mrp.lang +++ b/htdocs/langs/et_EE/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/et_EE/other.lang b/htdocs/langs/et_EE/other.lang index a1aa2f9a67b..3183083b1aa 100644 --- a/htdocs/langs/et_EE/other.lang +++ b/htdocs/langs/et_EE/other.lang @@ -5,8 +5,6 @@ Tools=Tööriistad TMenuTools=Tööriistad ToolsDesc=All tools not included in other menu entries are grouped here.<br>All the tools can be accessed via the left menu. Birthday=Sünnipäev -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=sünnipäeva hoiatus aktiivne BirthdayAlertOff=sünnipäeva hoiatus mitteaktiivne TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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=Manusena lisatud faile/dokumente TotalSizeOfAttachedFiles=Manusena lisatud failide/dokumentide kogusuurus @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Parem CalculatedWeight=Arvutuslik kaal CalculatedVolume=Arvutuslik ruumala Weight=Kaal -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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=Andmekogu import DolibarrNotification=Automaatne teavitamine ResizeDesc=Sisesta uus laius <b>VÕI</b> uus kõrgus. Suuruse muutmise käigus säilitatakse kõrguse ja laiuse suhe... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Ekspordi ala diff --git a/htdocs/langs/et_EE/products.lang b/htdocs/langs/et_EE/products.lang index 9cd6afef593..8554d961291 100644 --- a/htdocs/langs/et_EE/products.lang +++ b/htdocs/langs/et_EE/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Hindasid DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +CustomCode=Customs|Commodity|HS code CountryOrigin=Päritolumaa +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Nature of product (material/finished) NatureOfProductShort=Nature of product NatureOfProductDesc=Raw material or finished product @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Kasuta fikseeritud hinda PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Koguse ulatus -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/et_EE/projects.lang b/htdocs/langs/et_EE/projects.lang index d9f635dd8a5..c739c5c289f 100644 --- a/htdocs/langs/et_EE/projects.lang +++ b/htdocs/langs/et_EE/projects.lang @@ -76,15 +76,16 @@ MyActivities=Minu ülesanded/aktiivsused MyProjects=Minu projektid MyProjectsArea=My projects Area DurationEffective=Efektiivne kestus -ProgressDeclared=Deklareeritud progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Arvutatud progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Aeg +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/et_EE/recruitment.lang b/htdocs/langs/et_EE/recruitment.lang index 8f3197e0311..1f6dab3f416 100644 --- a/htdocs/langs/et_EE/recruitment.lang +++ b/htdocs/langs/et_EE/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/et_EE/sendings.lang b/htdocs/langs/et_EE/sendings.lang index ec6b68fa3ea..92c76b98f03 100644 --- a/htdocs/langs/et_EE/sendings.lang +++ b/htdocs/langs/et_EE/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Tellimusega seotud teised saadetised SendingsAndReceivingForSameOrder=Shipments and receipts for this order SendingsToValidate=Kinnitamast vajavad saadetised StatusSendingCanceled=Tühistatud +StatusSendingCanceledShort=Tühistatud StatusSendingDraft=Mustand StatusSendingValidated=Kinnitatud (väljastamisele minevad või juba väljastatud kaubad) StatusSendingProcessed=Töödeldud @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=Täiuslikum saatelehtede dokumendi mudel (logo jne) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Konstant EXPEDITION_ADDON_NUMBER on määratlemata SumOfProductVolumes=Toodete ruumala summa SumOfProductWeights=Toodete kaalude summa diff --git a/htdocs/langs/et_EE/stocks.lang b/htdocs/langs/et_EE/stocks.lang index 51bb0035e42..760b0f0dbbc 100644 --- a/htdocs/langs/et_EE/stocks.lang +++ b/htdocs/langs/et_EE/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/et_EE/ticket.lang b/htdocs/langs/et_EE/ticket.lang index 6ebd80a96c2..fd7ed8ea019 100644 --- a/htdocs/langs/et_EE/ticket.lang +++ b/htdocs/langs/et_EE/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Muu TicketSeverityShortLOW=Madal TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=Kõrge -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Loe Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/et_EE/website.lang b/htdocs/langs/et_EE/website.lang index b1d332fe020..780b74ae7da 100644 --- a/htdocs/langs/et_EE/website.lang +++ b/htdocs/langs/et_EE/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page PageContainer=Lehekülg 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/et_EE/withdrawals.lang b/htdocs/langs/et_EE/withdrawals.lang index f1edf12b9b0..fc31c53b37e 100644 --- a/htdocs/langs/et_EE/withdrawals.lang +++ b/htdocs/langs/et_EE/withdrawals.lang @@ -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>. ClassCredited=Määra krediteerituks @@ -131,7 +132,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,3 +148,5 @@ 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=Tootmisrežiim ei olnud seadistatud, pärast seda peatatakse simulatsioon ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorICSmissing=Missing ICS in Bank account %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/et_EE/workflow.lang b/htdocs/langs/et_EE/workflow.lang index 03c55985b03..46396afb83e 100644 --- a/htdocs/langs/et_EE/workflow.lang +++ b/htdocs/langs/et_EE/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 diff --git a/htdocs/langs/eu_ES/accountancy.lang b/htdocs/langs/eu_ES/accountancy.lang index 3211a0b62df..9e084932477 100644 --- a/htdocs/langs/eu_ES/accountancy.lang +++ b/htdocs/langs/eu_ES/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Date Docref=Reference LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/eu_ES/admin.lang b/htdocs/langs/eu_ES/admin.lang index 4e1e3f4f917..5f99e070cd3 100644 --- a/htdocs/langs/eu_ES/admin.lang +++ b/htdocs/langs/eu_ES/admin.lang @@ -56,6 +56,8 @@ GUISetup=Itxura SetupArea=Konfigurazioa 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. @@ -85,7 +87,6 @@ ShowPreview=Aurreikuspena aurkeztu ShowHideDetails=Show-Hide details PreviewNotAvailable=Aurreikuspena ez dago eskuragarri ThemeCurrentlyActive=Aktibatuta dagoen gaia -CurrentTimeZone=TimeZone PHP (zerbitzaria) 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 @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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 PurgeNothingToDelete=No directory or files to delete. @@ -256,6 +257,7 @@ 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. @@ -375,7 +377,7 @@ 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:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +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=Izena/Abizena-ren kokapena @@ -406,7 +408,7 @@ UrlGenerationParameters=Parameters to secure URLs SecurityTokenIsUnique=Use a unique securekey parameter for each URL EnterRefToBuildUrl=%s objektuen erreferentzia sartu GetSecuredUrl=Kalkulatutako URL-a hartu -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +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 @@ -668,7 +670,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=Marjinak -Module59000Desc=Marjinak kudeatzeko modulua +Module59000Desc=Module to follow margins Module60000Name=Commissions Module60000Desc=Module to manage commissions Module62000Name=Incoterms @@ -1306,7 +1308,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,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 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=New menu MenuHandler=Menu handler MenuModule=Source module -HideUnauthorizedMenu= Hide unauthorized menus (gray) +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 @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/eu_ES/banks.lang b/htdocs/langs/eu_ES/banks.lang index cd868f74239..bac80483712 100644 --- a/htdocs/langs/eu_ES/banks.lang +++ b/htdocs/langs/eu_ES/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/eu_ES/blockedlog.lang b/htdocs/langs/eu_ES/blockedlog.lang index 5afae6e9e53..0bba5605d0f 100644 --- a/htdocs/langs/eu_ES/blockedlog.lang +++ b/htdocs/langs/eu_ES/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/eu_ES/boxes.lang b/htdocs/langs/eu_ES/boxes.lang index ebe7ba3d683..42d5a977df9 100644 --- a/htdocs/langs/eu_ES/boxes.lang +++ b/htdocs/langs/eu_ES/boxes.lang @@ -46,9 +46,12 @@ 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. @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Accountancy +ValidatedProjects=Validated projects diff --git a/htdocs/langs/eu_ES/cashdesk.lang b/htdocs/langs/eu_ES/cashdesk.lang index c671c19b97e..e108028d9cb 100644 --- a/htdocs/langs/eu_ES/cashdesk.lang +++ b/htdocs/langs/eu_ES/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +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 @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/eu_ES/categories.lang b/htdocs/langs/eu_ES/categories.lang index ba37a43b4ec..4ddf0d6093f 100644 --- a/htdocs/langs/eu_ES/categories.lang +++ b/htdocs/langs/eu_ES/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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 diff --git a/htdocs/langs/eu_ES/companies.lang b/htdocs/langs/eu_ES/companies.lang index 50a8223fe7c..4318ea805b7 100644 --- a/htdocs/langs/eu_ES/companies.lang +++ b/htdocs/langs/eu_ES/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi 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=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=Potential diff --git a/htdocs/langs/eu_ES/compta.lang b/htdocs/langs/eu_ES/compta.lang index 9aca33839a6..af1267b60ab 100644 --- a/htdocs/langs/eu_ES/compta.lang +++ b/htdocs/langs/eu_ES/compta.lang @@ -111,7 +111,7 @@ 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 ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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 diff --git a/htdocs/langs/eu_ES/cron.lang b/htdocs/langs/eu_ES/cron.lang index d2da7ded67e..2ebdda1e685 100644 --- a/htdocs/langs/eu_ES/cron.lang +++ b/htdocs/langs/eu_ES/cron.lang @@ -6,14 +6,15 @@ 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 -OrToLaunchASpecificJob=Or to check and launch a specific job +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 environement you can use Scheduled task tools 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 @@ -42,10 +43,11 @@ CronModule=Module CronNoJobs=No jobs registered CronPriority=Priority CronLabel=Label -CronNbRun=Nb. launch -CronMaxRun=Max number launch +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 @@ -56,16 +58,16 @@ CronNote=Comment CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Enable +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 exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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 @@ -76,8 +78,14 @@ 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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +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' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/eu_ES/errors.lang b/htdocs/langs/eu_ES/errors.lang index 893f4a35b65..5b26be724d9 100644 --- a/htdocs/langs/eu_ES/errors.lang +++ b/htdocs/langs/eu_ES/errors.lang @@ -5,8 +5,10 @@ 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. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ 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=Ref used for creation already exists. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/eu_ES/exports.lang b/htdocs/langs/eu_ES/exports.lang index 45b56224b30..bcb14df4934 100644 --- a/htdocs/langs/eu_ES/exports.lang +++ b/htdocs/langs/eu_ES/exports.lang @@ -26,6 +26,8 @@ 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=Liburutegia +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. @@ -131,3 +133,4 @@ 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/eu_ES/mails.lang b/htdocs/langs/eu_ES/mails.lang index 1f26534ddc7..b124f83e85d 100644 --- a/htdocs/langs/eu_ES/mails.lang +++ b/htdocs/langs/eu_ES/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Jakinarazpenak -NoNotificationsWillBeSent=No email notifications are planned for this event and company -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent +NotificationsAuto=Notifications Auto. +NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company +ANotificationsWillBeSent=1 automatic notification will be sent by email +SomeNotificationsWillBeSent=%s automatic notifications will be sent by email +AddNewNotification=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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=Informazioa ContactsWithThirdpartyFilter=Contacts with third-party filter Unanswered=Unanswered Answered=Answered IsNotAnAnswer=Is not answer (initial email) IsAnAnswer=Is an answer of an initial email +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/eu_ES/main.lang b/htdocs/langs/eu_ES/main.lang index ce139e4fb15..b048eaf318c 100644 --- a/htdocs/langs/eu_ES/main.lang +++ b/htdocs/langs/eu_ES/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=No template available for this email type AvailableVariables=Available substitution variables NoTranslation=No translation Translation=Translation +CurrentTimeZone=TimeZone PHP (zerbitzaria) EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria NoRecordFound=No record found NoRecordDeleted=No record deleted NotEnoughDataYet=Not enough data @@ -85,6 +87,8 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C 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 @@ -220,6 +224,7 @@ Value=Balioa PersonalValue=Personal value NewObject=New %s NewValue=Balio berria +OldValue=Old value %s CurrentValue=Current value Code=Kodea Type=Mota @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Option +Filters=Filters List=List FullList=Full list FullConversation=Full conversation @@ -650,6 +656,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 @@ -671,7 +678,7 @@ SendMail=e-posta bidali Email=E-posta NoEMail=No email AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=No mobile phone Owner=Owner FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/eu_ES/modulebuilder.lang b/htdocs/langs/eu_ES/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/eu_ES/modulebuilder.lang +++ b/htdocs/langs/eu_ES/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/eu_ES/mrp.lang b/htdocs/langs/eu_ES/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/eu_ES/mrp.lang +++ b/htdocs/langs/eu_ES/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/eu_ES/other.lang b/htdocs/langs/eu_ES/other.lang index f855300b038..8b1593d5f6c 100644 --- a/htdocs/langs/eu_ES/other.lang +++ b/htdocs/langs/eu_ES/other.lang @@ -5,8 +5,6 @@ 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 -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Right CalculatedWeight=Calculated weight CalculatedVolume=Calculated volume Weight=Weight -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/eu_ES/products.lang b/htdocs/langs/eu_ES/products.lang index 63ff9381818..0827f43bd6d 100644 --- a/htdocs/langs/eu_ES/products.lang +++ b/htdocs/langs/eu_ES/products.lang @@ -108,7 +108,8 @@ 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=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +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 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/eu_ES/projects.lang b/htdocs/langs/eu_ES/projects.lang index 4ec830cce10..71a1ed5245a 100644 --- a/htdocs/langs/eu_ES/projects.lang +++ b/htdocs/langs/eu_ES/projects.lang @@ -76,15 +76,16 @@ MyActivities=My tasks/activities MyProjects=My projects MyProjectsArea=My projects Area DurationEffective=Effective duration -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Time +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/eu_ES/recruitment.lang b/htdocs/langs/eu_ES/recruitment.lang index b775e78552e..437445f25dc 100644 --- a/htdocs/langs/eu_ES/recruitment.lang +++ b/htdocs/langs/eu_ES/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/eu_ES/sendings.lang b/htdocs/langs/eu_ES/sendings.lang index 52467f47a81..079b2533513 100644 --- a/htdocs/langs/eu_ES/sendings.lang +++ b/htdocs/langs/eu_ES/sendings.lang @@ -30,6 +30,7 @@ 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 @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=More complete document model for delivery receipts (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/eu_ES/stocks.lang b/htdocs/langs/eu_ES/stocks.lang index d709920da07..fa21c48cb73 100644 --- a/htdocs/langs/eu_ES/stocks.lang +++ b/htdocs/langs/eu_ES/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/eu_ES/ticket.lang b/htdocs/langs/eu_ES/ticket.lang index d03e28f558d..086d398b0a1 100644 --- a/htdocs/langs/eu_ES/ticket.lang +++ b/htdocs/langs/eu_ES/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Besteak TicketSeverityShortLOW=Low TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=High -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Read Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/eu_ES/website.lang b/htdocs/langs/eu_ES/website.lang index f00254a6c66..921f6edf20f 100644 --- a/htdocs/langs/eu_ES/website.lang +++ b/htdocs/langs/eu_ES/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/eu_ES/withdrawals.lang b/htdocs/langs/eu_ES/withdrawals.lang index 114a8d9dd6c..059b3451c11 100644 --- a/htdocs/langs/eu_ES/withdrawals.lang +++ b/htdocs/langs/eu_ES/withdrawals.lang @@ -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>. ClassCredited=Classify credited @@ -131,7 +132,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,3 +148,5 @@ 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/eu_ES/workflow.lang b/htdocs/langs/eu_ES/workflow.lang index 299be277e1d..494a0424a75 100644 --- a/htdocs/langs/eu_ES/workflow.lang +++ b/htdocs/langs/eu_ES/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 diff --git a/htdocs/langs/fa_IR/accountancy.lang b/htdocs/langs/fa_IR/accountancy.lang index be45e5ff3ed..794149d01cf 100644 --- a/htdocs/langs/fa_IR/accountancy.lang +++ b/htdocs/langs/fa_IR/accountancy.lang @@ -16,6 +16,8 @@ ThisService=این خدمت ThisProduct=این محصول DefaultForService=پیش‌فرض برای خدمات DefaultForProduct=پیش‌فرض برای محصول +ProductForThisThirdparty=Product for this thirdparty +ServiceForThisThirdparty=Service for this thirdparty CantSuggest=امکان پیش‌نهاد نیست AccountancySetupDoneFromAccountancyMenu=اکثر برپاسازی حساب‌داری برای فهرست %s انجام شده است ConfigAccountingExpert=Configuration of the module accounting (double entry) @@ -48,6 +50,7 @@ CountriesExceptMe=همۀ کشورها باستثناء %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=در برپاسازی برای مشتریان حساب حساب‌داری اصلی تعریف نشده است MainAccountForSuppliersNotDefined=در برپاسازی برای تامین کنندگان حساب حساب‌داری اصلی تعریف نشده است @@ -144,7 +147,7 @@ NotVentilatedinAccount=به حساب حسابداری بند نشد XLineSuccessfullyBinded=محصول/خدمت %s‌ با موفقیت به حساب حساب‌داری بند شد XLineFailedToBeBinded=محصول/خدمت %s به حساب حساب‌داری بند نشد -ACCOUNTING_LIMIT_LIST_VENTILATION=تعداد عناصری که باید بند بشوند و در صفحه نمایش داده شوند (حداکثر پیشنهادی: 50 مورد) +ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=آغاز مرتب‌کردن صفحۀ "بندکردن برای انجام" بواسطۀ عناصر اخیر ACCOUNTING_LIST_SORT_VENTILATION_DONE=آغاز مرتب‌کردن صفحۀ "بندکردن انجام شد" بواسطۀ عناصر اخیر @@ -198,7 +201,8 @@ Docdate=تاریخ Docref=مرجع LabelAccount=برچسب حساب LabelOperation=عملیات برچسب -Sens=Sens +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=حروف‌بندی Codejournal=دفتر @@ -206,7 +210,8 @@ JournalLabel=برچسب دفتر NumPiece=شمارۀ بخش TransactionNumShort=تعداد تراکنش‌ها AccountingCategory=گروه‌های دل‌خواه -GroupByAccountAccounting=گروه‌بندی با حساب حساب‌داری +GroupByAccountAccounting=Group by general ledger account +GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=در این قسمت می‌توانید گروه‌های متشکل از حساب‌حساب‌داری بسازید. این گروه‌ها برای گزارش‌های دل‌خواه حساب‌داری استفاده می‌شود. ByAccounts=به واسطۀ حساب‌ها ByPredefinedAccountGroups=به واسطۀ گروه‌های از پیش‌تعریف شده @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=پرداخت به هیچ محصول/خدمتی وصل OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +ShowSubtotalByGroup=Show subtotal by level Pcgtype=گروه حساب 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. @@ -271,11 +276,13 @@ 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=بندکردن خودکار AutomaticBindingDone=بندکردن خودکار انجام شد @@ -293,6 +300,7 @@ Accounted=در دفترکل حساب‌شده است NotYetAccounted=هنوز در دفترکل حساب نشده‌است ShowTutorial=Show Tutorial NotReconciled=وفق داده نشده +WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view ## Admin BindingOptions=Binding options @@ -337,6 +345,7 @@ Modelcsv_LDCompta10=Export for LD Compta (v10 & higher) Modelcsv_openconcerto=صادرکردن برای OpenConcerto  (آزمایشی) Modelcsv_configurable= صدور قابل پیکربندی CSV Modelcsv_FEC=Export FEC +Modelcsv_FEC2=Export FEC (With dates generation writing / document reversed) Modelcsv_Sage50_Swiss=صادرکردن برای Sage 50 Switzerland Modelcsv_winfic=Export Winfic - eWinfic - WinSis Compta Modelcsv_Gestinumv3=Export for Gestinum (v3) diff --git a/htdocs/langs/fa_IR/admin.lang b/htdocs/langs/fa_IR/admin.lang index 047c4802f96..44b56b29436 100644 --- a/htdocs/langs/fa_IR/admin.lang +++ b/htdocs/langs/fa_IR/admin.lang @@ -56,6 +56,8 @@ GUISetup=نمایش SetupArea=برپاسازی UploadNewTemplate=بارگذاری قالب‌(های) جدید FormToTestFileUploadForm=برگه آزمایش بارگذاری فایل (با توجه به برپاسازی) +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled IfModuleEnabled=توجه: «بله» تنها در صورتی مؤثر است که واحد <b>%s</b> فعال باشد RemoveLock=فایل <b>%s</b> را در صورت موجود بودن تغییر دهید تا امکان استفاده از ابزار نصب/روزآمدسازی وجود داشته باشد. RestoreLock=فایل <b>%s</b> را با مجوز فقط خواندنی بازیابی کنید تا امکان استفاده از ابزار نصب/روزآمدسازی را غیرفعال کنید. @@ -85,7 +87,6 @@ ShowPreview=نمایش پیش‌نمایش ShowHideDetails=Show-Hide details PreviewNotAvailable=پیش‌نمایش در دسترس نیست ThemeCurrentlyActive=محیطی که اکنون فعال است -CurrentTimeZone=منطقه زمانی PHP (سرور) MySQLTimeZone=منطقه زمانی MySql (پایگاه داده) TZHasNoEffect=در صورتی که تاریخ‌ها به‌عنوان رشتۀ ارسال شده حفظ شوند، توسط سرویس‌دهندۀ بانک‌داده ذخیره شده و ارائه می‌شود. ناحیه‌های زمانی تنها در صورتی مؤثرند که از تابع UNIX_TIMESTAMP استفاده شده باشد ( در Dolibarr نباید استفاده شود، بنابراین ناحیۀ زمانی بانک داده نباید تاثیر داشته باشد، حتی اگر بعد از درج داده تغییر داده شود). Space=فضا @@ -153,8 +154,8 @@ SystemToolsAreaDesc=این واحد دربردارندۀ عوامل مربوط Purge=پاک‌کردن PurgeAreaDesc=این صفحه به شما امکان حذف همۀ فایل‌های تولید شده و ذخیره شده با Dolibarr  را می‌دهد (فایل‌های موقت یا همۀ فایلهای داخل پوشۀ <b>%s</b>). استفاده از این قابلیت در شرایط عادی ضرورتی ندارد. این قابلیت برای کاربرانی ایجاد شده است که میزبانی وبگاه آن‌ها امکان حذف فایل‌هائی که توسط سرویس‌دهندۀ وب ایجاد شده‌اند را نداده است. PurgeDeleteLogFile=حذف فایل‌های گزارش‌کار، شامل تعریف <b>%s</b> برای واحد گزارش‌کار سامانه Syslog (خطری برای از دست دادن داده‌ها نیست) -PurgeDeleteTemporaryFiles=حذف همۀ فایل‌های موقت (خطری برای از دست دادن داده نیست). توجه: حذف تها در صورتی انجام خواهد شد که پوشۀ موقتی حداقل 24 ساعت قبل ساخته شده باشد. -PurgeDeleteTemporaryFilesShort=حذف فایل‌های موقتی +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 PurgeDeleteAllFilesInDocumentsDir=حذف همۀ فایل‌های موجود در پوشۀ: <b>%s</b>. <br> این باعث حذف همۀ مستنداتی که به عناصر مربوطند ( اشخاص سوم، صورت‌حساب و غیره ...)، فایل‌هائی که به واحد ECM ارسال شده‌اند، نسخه‌برداری‌های پشتیبان بانک‌داده و فایل‌های موقت خواهد شد. PurgeRunNow=شروع پاک‌سازی PurgeNothingToDelete=هیچ فایل یا پوشه‌ای برای حذف وجود ندارد. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=هم‌کاران پیش‌نهادی OtherResources=سایر منابع ExternalResources=منابع بیرونی SocialNetworks=شبکه‌های اجتماعی +SocialNetworkId=Social Network 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> HelpCenterDesc1=در این‌جا منابعی برای دریافت کمک و پشتیبانی در خصوص Dolibarr می‌یابید: @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=مثال‌هائی با پیکربندی کنونی ListOfDirectories=فهرست پوشه‌های قالب‌های OpenDocument ListOfDirectoriesForModelGenODT=فهرست پوشه‌هائی که دربردارندۀ قالب‌های به شکل OpenDocument هستند. <br><br>مسیر کامل پوشه‌ها را قرار دهید.<br>بین هر پوشه یک ارجاع به اول سطر قرار دهید.<br>برای افزودن پوشۀ واحد GED، اینجا قرار دهید <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b>.<br><br>فایل‌های موجود در آن پوشه باشید با <b>.odt</b> یا <b>.ods</b> خاتمه یابند. NumberOfModelFilesFound=تعداد فایل‌های قالب ODT/ODS پیدا شده در این پوشه‌ها -ExampleOfDirectoriesForModelGen=نمونه‌های روش نوشتاری:<br>c:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br> برای اطلاع از طرز ساخت مستندات قالب ODT دلخواه، قبل از این‌که آن‌ها را در این پوشه‌ها ذخیره کنید، مستندات راهنمای ویکی را بخوانید: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=مکان نام/نام‌خانوادگی @@ -406,7 +408,7 @@ UrlGenerationParameters=مقادیر امن‌سازی نشانی‌های ای SecurityTokenIsUnique=استفاده از یک مقدار securekey منحصربه‌فرد برای هر نشانی اینترنتی EnterRefToBuildUrl=مرجع را برای شیء %s وارد کنید GetSecuredUrl=نشانی اینترنتی محاسبه شده را دریافت کنید -ButtonHideUnauthorized=پنهان کردن کلیدهای مربوط به فعالیت‌های غیرمجاز برای کاربران غیرمدیر به جای نمایش کلیدهای خاکستری غیرفعال +ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) OldVATRates=نرخ قدیمی مالیات‌بر‌ارزش‌افزوده NewVATRates=نرخ جدید قدیمی مالیات‌بر‌ارزش‌افزوده PriceBaseTypeToChange=تغییر قیمت‌ها بر پایۀ مقدار مرجع تعریف شده در @@ -668,7 +670,7 @@ Module54000Desc=چاپ مستقیم (بدون باز کردن مستندات) ب Module55000Name=رای‌گیری و نظرسنجی Module55000Desc=ساخت نظرسنجی و رای‌گیری برخط (همانند Doodle، Studs, RDVz و غیره). Module59000Name=حاشیه‌ها -Module59000Desc=واحد مدیریت حاشیه‌ها +Module59000Desc=Module to follow margins Module60000Name=کمیسیون Module60000Desc=واحد مدیریت کمیسیون‌ها Module62000Name=Incoterms @@ -1306,7 +1308,7 @@ YouUseBestDriver=شما از راه‌انداز %s استفاده می‌کنی YouDoNotUseBestDriver=شما از راه‌انداز %s استفاده می‌کنید اما پیشنهاد ما استفادهاز %s است. NbOfObjectIsLowerThanNoPb=شما در پایگاه داده فقط %s%s دارید. این الزاما نیازمند بهینه سازی نیست. SearchOptim=بهینه‌سازی جستجو -YouHaveXObjectUseSearchOptim=شما در پایگاه‌داده %s%s دارید. شما باید مقدار ثابت %s را به 1 در خانه-برپاسازی-سایر اضافه کنید. جستجو را محدود به ابتدا نمائید تا به پایگاه‌داده امکان دهید از شاخص‌ها استفاده کند تا بتوانید واکنش فوری داشته باشید. +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=شما در پایگاه داده %s دارید و مقدار ثابت %s %sدر خانه-برپاسازی-سایر به 1 تنظیم شده است. BrowserIsOK=شما از مرورگر وب %s استفاده می‌نمائید. این مرورگر برای کارائی و امنیت مناسب است. BrowserIsKO=شما از مرورگر وب %s استفاده می‌نمائید. این مرورگر به‌عنوان یک انتخاب بد به نسبت امنیت، کارائی و اعتمادپذیری شناخته شده است. ما به شما پیشنهاد می‌کنیم از Firefox، Chrome، Opera و Safari استفاده نمائید. @@ -1596,8 +1598,13 @@ ServiceSetup=برپاسازی واحد خدمات ProductServiceSetup=برپاسازی واحد محصولات و خدمات NumberOfProductShowInSelect=حداکثر تعداد قابل نمایش در فهرست ترکیبی انتخاب‌گر (0=بدون محدودیت) ViewProductDescInFormAbility=نمایش توضیحات محصول در برگه‌ها (در غیر این‌صورت طی یک‌نکتۀ در کادر کوچک توضیح نمایش داده خواهد شد) +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=فعال‌سازی یک گزینه در محصول/خدمات زبانۀ فایل‌های پیوست برای ترکیب یک سند PDF به سند پیشنهاد در صورتی‌که محصول/خدمات در پیشنهاد وجود داشته باشد -ViewProductDescInThirdpartyLanguageAbility=نمایش توضیحات محصولات با زبان شخص‌سوم +ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) UseSearchToSelectProductTooltip=در صورتی که شما تعداد بسیار زیادی محصول داشته باشید (>100000)، شما می‌توانید با استنفاده از تنظیم مقدار ثابت PRODUCT_DONOTSEARCH_ANYWHERE  به مقدار 1 در برپاسازی->سایر سرعت را افزایش دهید. جستجو در این حالت از شروع عبارت انجام خواهد شد. UseSearchToSelectProduct=قبل از این‌که شما کلیدی بفشارید محتوای محصول در فهرست ترکیبی بارگذاری نخواهد شد (در صورتی که شما تعداد زیادی محصول داشته باشید، این باعث افزایش کارآمدی خواهد شد، اما از راحتی کم‌تری برخوردار است) SetDefaultBarcodeTypeProducts=نوع بارکد پیش‌فرض برای استفادۀ محصولات @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=فهرست‌های شخصی که به یکی از ق NewMenu=فهرست جدید MenuHandler=اداره‌کنندۀ فهرست MenuModule=واحد منبع -HideUnauthorizedMenu= پنهان کردن فهرست‌های غیرمجاز (خاکستری) +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=فهرست شناسه DetailMenuHandler=اداره کنندۀ فهرست برای تعیین مکان نمایش فهرست جدید DetailMenuModule=نام واحد در صورتی که یک قسمت از فهرست از یک واحد می‌آید @@ -1983,11 +1990,12 @@ EMailHost=میزبان سرور IMAP رایانامه MailboxSourceDirectory=پوشۀ منبع صندوق‌پستی MailboxTargetDirectory=پوشۀ مقصد صندوق‌پستی EmailcollectorOperations=عملیات قابل انجام جمع‌کننده +EmailcollectorOperationsDesc=Operations are executed from top to bottom order MaxEmailCollectPerCollect=حداکثر تعداد رایانامه‌های جمع‌آوری شده در یک جمع‌آوری CollectNow=الآن جمع‌آوری شود ConfirmCloneEmailCollector=آیا مطمئن هستید می‌خواهد جمع‌آورندۀ رایانامۀ %s را نسخه‌برداری کنید؟ -DateLastCollectResult=آخرین تاریخ تلاش برای جمع‌‌آوری -DateLastcollectResultOk=آخرین تلاش جمع‌آوری موفق +DateLastCollectResult=Date of latest collect try +DateLastcollectResultOk=Date of latest collect success LastResult=آخرین نتیجه EmailCollectorConfirmCollectTitle=تائید جمع‌آوری رایانامه EmailCollectorConfirmCollect=آیا می‌خواهید عملیات جمع‌آوری این جمع‌آورنده را حالا اجرا کنید؟ @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=کدپستی MainMenuCode=کد ورودی فهرست (فهرست اصلی) ECMAutoTree=نمایش ساختاردرختی خودکار ECM @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/fa_IR/banks.lang b/htdocs/langs/fa_IR/banks.lang index b2492377312..74e84caae12 100644 --- a/htdocs/langs/fa_IR/banks.lang +++ b/htdocs/langs/fa_IR/banks.lang @@ -173,10 +173,11 @@ SEPAMandate=تعهدنامۀ SEPA YourSEPAMandate=تعهدنامۀ SEPAی شما FindYourSEPAMandate=این تعهدنامۀ SEPAی شماست تا شرکت ما را مجاز کند سفارش پرداخت مستقیم از بانک داشته باشد. آن را امضا شده بازگردانید (نسخۀ اسکن‌شدۀ برگۀ امضا شده) یا آن را توسط رایانامه ارسال کنید: AutoReportLastAccountStatement=پرکردن خودکار بخش "شمارۀ شرح کار بانک" با آخرین شمارۀ شرح کار در هنگام وفق دادن -CashControl=محدودۀ مبلغ‌نقدی صندوق-نقطۀ فروش- -NewCashFence=محدودۀ جدید مبلغ‌نقدی +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 diff --git a/htdocs/langs/fa_IR/blockedlog.lang b/htdocs/langs/fa_IR/blockedlog.lang index 116a6acbb42..f5999b78250 100644 --- a/htdocs/langs/fa_IR/blockedlog.lang +++ b/htdocs/langs/fa_IR/blockedlog.lang @@ -35,7 +35,7 @@ logDON_DELETE=حذف منطقی کمک‌مالی logMEMBER_SUBSCRIPTION_CREATE=عضویت برای عضو ساخت شده logMEMBER_SUBSCRIPTION_MODIFY=عضویت برای عضو ویرایش شد logMEMBER_SUBSCRIPTION_DELETE=حذف منطقی عضویت برای عضیو -logCASHCONTROL_VALIDATE=ثبت محدودۀ پول‌نقد +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=دریافت صورت‌حساب مشتری BlockedLogBillPreview=پیش‌نمایش صورت‌حساب مشتری BlockedlogInfoDialog=جزئیات گزارش‌کار diff --git a/htdocs/langs/fa_IR/boxes.lang b/htdocs/langs/fa_IR/boxes.lang index 3ee603aee83..644922a4949 100644 --- a/htdocs/langs/fa_IR/boxes.lang +++ b/htdocs/langs/fa_IR/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=آخرین %s کمکِ تغییریافته BoxTitleLastModifiedExpenses=آخرین %s گزارش هزینۀ تغییریافته BoxTitleLatestModifiedBoms=Latest %s modified BOMs BoxTitleLatestModifiedMos=Latest %s modified Manufacturing Orders +BoxTitleLastOutstandingBillReached=Customers with maximum outstanding exceeded BoxGlobalActivity=فعالیت‌های سراسری (صورت‌حساب‌ها، پیشنهادها، سفارشات) BoxGoodCustomers=مشتریان خوب BoxTitleGoodCustomers=%s مشتری خوب +BoxScheduledJobs=وظایف برنامه‌ریزی‌شده +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=باسازی واکشی RSS ناموفق بود، آخرین تاریخ باسازی موفق: %s LastRefreshDate=آخرین تاریخ نوسازی NoRecordedBookmarks=هیچ نشانه‌ای تعریف نشده است @@ -92,8 +95,8 @@ LastXMonthRolling=طومار آخرین %s ماه ChooseBoxToAdd=اضافه کردن وسیله به پیشخوان شم BoxAdded=این وسیله به پیشخوان شما اضافه شد BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users) -BoxLastManualEntries=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=حسابداری +ValidatedProjects=Validated projects diff --git a/htdocs/langs/fa_IR/cashdesk.lang b/htdocs/langs/fa_IR/cashdesk.lang index 40313762c8d..2c4889740bb 100644 --- a/htdocs/langs/fa_IR/cashdesk.lang +++ b/htdocs/langs/fa_IR/cashdesk.lang @@ -49,8 +49,8 @@ Footer=پاورقی AmountAtEndOfPeriod=مبلغ در انتهای دوره (روز، ماه یا سال) TheoricalAmount=مبلغ نظری RealAmount=مقدار واقعی -CashFence=Cash fence -CashFenceDone=حصار نقدی برای دوره تعیین شده +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=Nb و از فاکتورها Paymentnumpad=نوع بخش‌کناری Numberspad=بخش‌کناری عددی @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/fa_IR/categories.lang b/htdocs/langs/fa_IR/categories.lang index adc3e73cfdb..5c7ca6a0f2e 100644 --- a/htdocs/langs/fa_IR/categories.lang +++ b/htdocs/langs/fa_IR/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=بخش کلیدواژه‌ها/دسته‌بندی‌ها UsersCategoriesArea=بخش کلیدواژه‌ها/دسته‌بندی‌های کاربران SubCats=زیردسته‌ها CatList=فهرست کلیدواژه‌ها/دسته‌بندی‌ها +CatListAll=List of tags/categories (all types) NewCategory=کلیدواژه/دسته‌بندی جدید ModifCat=ویرایش کلیدواژه/دسته‌بندی  CatCreated=کلیدواژه/دسته‌بندی ساخته شد @@ -65,16 +66,22 @@ UsersCategoriesShort=کلیدواژه/دسته‌بندی‌های کاربرا StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=شناسۀ کلیدواژه/دسته‌بندی -CatSupList=فهرست کلیدواژه/دسته‌بندی‌های فروشندگان -CatCusList=فهرست کلیدواژه/دسته‌بندی‌های مشتریان/احتمالی‌ها +ParentCategory=Parent tag/category +ParentCategoryLabel=Label of parent tag/category +CatSupList=List of vendors tags/categories +CatCusList=List of customers/prospects tags/categories CatProdList=فهرست گروه‌بندی‌ها/برچسب‌های محصولات CatMemberList=فهرست کلیدواژه/دسته‌بندی‌های اعضا -CatContactList=فهرست کلیدواژه/دسته‌بندی‌های طرف‌های تماس -CatSupLinks=پیوندهای میان تامین‌کنندگان و کلیدواژه/دسته‌بندی‌ها +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=پیوندهای میان مشتریان/احتمالی‌ها و کلیدواژه/دسته‌بندی‌ها CatContactsLinks=Links between contacts/addresses and tags/categories CatProdLinks=پیوندهای میان محصولات/خدمات و کلیدواژه/دسته‌بندی‌ها -CatProJectLinks=پیوندهای میان طرح‌ها و کلیدواژه/دسته‌بندی‌ها +CatMembersLinks=Links between members and tags/categories +CatProjectsLinks=پیوندهای میان طرح‌ها و کلیدواژه/دسته‌بندی‌ها +CatUsersLinks=Links between users and tags/categories DeleteFromCat=حذف از کلیدواژه/دسته‌بندی ExtraFieldsCategories=ویژگی های مکمل CategoriesSetup=برپاسازی کلیدواژه/دسته‌بندی‌ diff --git a/htdocs/langs/fa_IR/companies.lang b/htdocs/langs/fa_IR/companies.lang index 9a4bc483b57..ab78f11dd02 100644 --- a/htdocs/langs/fa_IR/companies.lang +++ b/htdocs/langs/fa_IR/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=بررسی شناسۀ م.ب.ا.ا. داخل جامعه VATIntraManualCheck=همچنین می‌توانید به‌طور دستی روی وبگاه کمیسیون اروپا بررسی کنید <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=بررسی مقدور نبود. خدمات بررسی برای کشور عضو (%s) ارائه نمی‌شود. NorProspectNorCustomer=مشتری‌احتمالی نیست/مشتری نیست -JuridicalStatus=نوع موجودیت قانونی +JuridicalStatus=Business entity type Workforce=Workforce Staff=کارمندان ProspectLevelShort=توان‌بالقوه-پتانسیل diff --git a/htdocs/langs/fa_IR/compta.lang b/htdocs/langs/fa_IR/compta.lang index cdf21783347..5e300643567 100644 --- a/htdocs/langs/fa_IR/compta.lang +++ b/htdocs/langs/fa_IR/compta.lang @@ -111,7 +111,7 @@ Refund=بازپس‌گیری SocialContributionsPayments=پرداخت‌های مالیات اجتماعی/ساختاری ShowVatPayment=نمایش پرداخت م.ب.ا.ا TotalToPay=مجموع قابل پرداخت -BalanceVisibilityDependsOnSortAndFilters=موجودی در این فهرست تنها در صورتی قابل مشاهده خواهد بود که جدول به صورت صعودی برای %s انجام شده باشد و صافی برای 1 حساب بانکی تنظیم شده باشد +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=کد حسابداری مشتری SupplierAccountancyCode=Vendor accounting code CustomerAccountancyCodeShort=کد حساب‌داری مشتری @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=آیا مطمئن هستید می‌خواهید ExportDataset_tax_1=مالیات‌های اجتماعی و ساختاری و پرداخت‌ها CalcModeVATDebt=حالت <b>%sحساب‌داری مالیات‌بر‌ارزش افزوده تعهدی%s</b>. CalcModeVATEngagement=حالت <b>%sمالیات بر ارزش افزوده در ازای درآمد-هزینه%s</b>. -CalcModeDebt=تحلیل صورت‌حساب‌های معلوم و ثبت شده حتی در صورتی که هنوز در دفترکل حساب نشده باشند. +CalcModeDebt=Analysis of known recorded documents even if they are not yet accounted in ledger. CalcModeEngagement=تحلیل پرداخت‌های معلوم و ثبت شده حتی در صورتی که هنوز در دفترکل حساب نشده باشند. CalcModeBookkeeping=تحلیل داده‌های ثبت شده در دفتر روزنامه در جدول دفترداری دفترکل CalcModeLT1= حالت <b>%sRE بر حسب صورت‌حساب مشتری - صورت‌حساب تامین کننده%s</b> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=ماندۀ درآمدها و هزینه‌ها، ج AnnualByCompanies=ماندۀ درآمدها و هزینه‌ها، بر حسب حساب‌های از گروه‌بندی شده AnnualByCompaniesDueDebtMode=ماندۀ درآمدها و هزینه‌ها، جزئیات بر حسب گروه‌های از قبل تعیین شده، حالت <b>%s طلب‌ها-بدهی‌ها%s</b> یا <b>حساب‌داری تعهدی</b> AnnualByCompaniesInputOutputMode=ماندۀ درآمدها و هزینه‌ها، جزئیات بر حسب گروه‌های از قبل تعیین شده، حالت <b>%sدرآمدها-هزینه‌ها%s</b> یا <b>حساب‌داری نقدی</b>. -SeeReportInInputOutputMode=برای محاسبۀ پرداخت‌های حقیقی که حتی هنوز در دفترکل حساب نشده‌اند به %sتحلیل پرداخت‌ها%s نگاه کنید. -SeeReportInDueDebtMode=برای محاسبۀ صورت‌حساب‌های ثبت شده که حتی هنوز در دفترکل حساب نشده‌اند به %sتحلیل صورت‌حساب‌ها %s نگاه کنید. -SeeReportInBookkeepingMode=برای محاسبه‌ای بر روی <b>جدول حساب‌داری دفترکل</b> به <b>%sگزارش حساب‌داری%s</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=- تمام مالیات‌ها در مقادیر نمایش داده شده، گنجانده شده‌اند 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=- این شامل همۀ پرداخت‌های واقعی صورت‌حساب‌ها، هزینه‌ها، مالیات بر ارزش افزوده و حقوق‌ها است. <br>- بر حسب تاریخ پرداخت صورت‌حساب‌ها، هزینه‌ها، مالیات بر ارزش افزوده و حقوق‌ها می‌باشد. تاریخ کمک‌مالی برای کمک‌های مالی @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=نمایش دهندۀ ردیف دفترکل SeePageForSetup=برای برپاسازی فهرست <a href="%s">%s</a> را ببینید DepositsAreNotIncluded=- صورت‌حساب‌های پیش‌پرداخت شامل نشده‌اند DepositsAreIncluded=- صورت‌حساب‌های پیش‌پرداخت شامل شده‌اند +LT1ReportByMonth=Tax 2 report by month +LT2ReportByMonth=Tax 3 report by month LT1ReportByCustomers=گزارش مالیات 2 توسط شخص سوم LT2ReportByCustomers=گزارش مالیات 3 توسط شخص سوم LT1ReportByCustomersES=گزارش توسط شخص سوم RE LT2ReportByCustomersES=گزارش توسط شخص سوم IRPF VATReport=گزارش مالیات‌برفروش VATReportByPeriods=گزارش مالیات‌برفروش بر حسب دورۀ زمانی +VATReportByMonth=Sale tax report by month VATReportByRates=گزارش مالیات‌برفروش بر حسب نرخ‌ها VATReportByThirdParties=گزارش مالیات‌برفروش بر حسب شخص‌سوم‌ها VATReportByCustomers=گزارش مالیات‌برفروش بر حسب مشتری diff --git a/htdocs/langs/fa_IR/cron.lang b/htdocs/langs/fa_IR/cron.lang index 0302013fc26..b88af91c016 100644 --- a/htdocs/langs/fa_IR/cron.lang +++ b/htdocs/langs/fa_IR/cron.lang @@ -7,13 +7,14 @@ Permission23103 = حذف وظایف زمان‌بندی‌شده Permission23104 = اجرای وظایف زمان‌بندی‌شده # Admin CronSetup=برپاسازی مدیریت وظایف زمان‌بندی‌شده -URLToLaunchCronJobs=نشانی برای بررسی و اجرای وظایف‌زمان‌بندی‌شدۀ واجدشرایط -OrToLaunchASpecificJob=یا برای بررسی و اجرای یک وظیفۀ خاص +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=کلیدامنیتی نشانی برای اجرای وظایف‌زمان‌بندی‌شده FileToLaunchCronJobs=خطفرمان برای بررسی و اجرای وظایف‌زمانی واجد شرایط CronExplainHowToRunUnix=در فضای لینوکس شما باید ورودی crontab زیر را استفاده کنید تا در هر 5 دقیقه فرمان اجرا شود CronExplainHowToRunWin=در فضای مایکروسافت ویندوز شما می‌توانید از ابزارهای وظایف زمان‌بندی شده استفاده کنید تا در هر 5 دقیقه دستور را اجرا کنید CronMethodDoesNotExists=کلاس %s دربردارندۀ هیچ متد %s نیست +CronMethodNotAllowed=Method %s of class %s is in blacklist of forbidden methods CronJobDefDesc=نمایه‌های وظایف زمانی‌بندی شده در فایل توضیح واحد مربوطه تعریف می‌شوند. در هنگامی که این واحد فعال شد، این فایل‌ها بارگذاری شده و در دسترس خواهند بود و در نتیجه شما می‌توانید واظیف را از فهرست ابزارهای مدیر %s مدیریت کنید. CronJobProfiles=نمایه‌های از پیش تعیین شدۀ وظایف‌زمان‌بندی‌شده # Menu @@ -46,6 +47,7 @@ CronNbRun=تعداد اجراها CronMaxRun=حداکثر تعداد اجراها CronEach=هر JobFinished=وظیفه اجرا شده و به سرانجام رسید +Scheduled=Scheduled #Page card CronAdd= اضافه‌کردن وظیفه CronEvery=اجرای وظیفه در هر @@ -56,7 +58,7 @@ CronNote=توضیح CronFieldMandatory=بخش %s الزامی است CronErrEndDateStartDt=تاریخ پایان نمی‌تواند قبل از تاریخ شروع باشد StatusAtInstall=وضعیت نصب واحد -CronStatusActiveBtn=فعال‌کردن +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=غیرفعال‌کردن CronTaskInactive=این وظیفه غیرفعال است CronId=شناسه @@ -76,8 +78,14 @@ CronType_method=روش-متد فراخوان یک کلاس PHP CronType_command=فرمان شل CronCannotLoadClass=امکان بارگذاری فایل کلاس %s (برای بارگذاری کلاس %s) CronCannotLoadObject=فایل کلاس %s بارگذاری شد، اما شیء %s درون آن پیدا نشد -UseMenuModuleToolsToAddCronJobs=به فهرست "خانه-ابزارهای مدیر-وظایف زمان‌بندی شده" رفته تا این وظایف را مشاهده کرده یا ویرایش کنید. +UseMenuModuleToolsToAddCronJobs=Go into menu "<a href="%s">Home - Admin tools - Scheduled jobs</a>" to see and edit scheduled jobs. JobDisabled=وظیفه غیرفعال است MakeLocalDatabaseDumpShort=پشتیبان‌گیری از پایگاه داده محلی MakeLocalDatabaseDump=نسخه‌برداری-dump از پایگاه دادۀ محلی. مؤلفه‌های مربوطه از قرار: فشرده‌سازی ('gz' یا 'bz' یا 'none')، نوع پشتیبان‌گیری ('mysql', 'pgsql', 'auto'), 1, 'auto' یا نام فایلی که ساخته می‌شود, تعداد فایل‌هائی که نگه‌داری می‌شود است WarningCronDelayed=توجه، برای مقاصد بهینه‌سازی، زمان اجرای بعدی وظایف فعال، وظایف شما ممکن است حداکثر %s ساعت قبل از اجرا تاخیر داشته باشد. +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/fa_IR/errors.lang b/htdocs/langs/fa_IR/errors.lang index 3547d8ea6cb..43ad72288b6 100644 --- a/htdocs/langs/fa_IR/errors.lang +++ b/htdocs/langs/fa_IR/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=خطائی نیست، حرکت می‌کنیم # Errors ErrorButCommitIsDone=علیرغم وجود خطا، تائید می‌شود ErrorBadEMail=رایانامۀ %s غلط است +ErrorBadMXDomain=Email %s seems wrong (domain has no valid MX record) ErrorBadUrl=نشانی‌اینترنتی %s اشتباه است ErrorBadValueForParamNotAString=برای مؤلفۀ موردنظر مقدار خطائی وارد شده است. عموما در هنگام فقدان ترجمه، الحاق می‌شود. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=نام‌کاربری %s قبلا وجود داشته است. ErrorGroupAlreadyExists=گروه %s قبلا وجود داشته است. ErrorRecordNotFound=ردیف موجود نیست. @@ -48,6 +50,7 @@ ErrorFieldsRequired=برخی از بخش‌های الزامی، پر نشده ErrorSubjectIsRequired=موضوع رایانامه الزامی است. ErrorFailedToCreateDir=ایجاد یک پوشه با شکست مواجه شد. بررسی کنید، کاربر سرور وب، دارای مجوزهای نوشتاری بر روی پوشۀ documents مربوط به Dolibarr باشد در صورتی که مؤلفۀ <b>safe_mode</b> روی این نسخه از PHP فعال باشد، بررسی کنید فایل‌های PHP مربوط به Dolibarr متعلق به کاربر سرور وب (یا گروه مربوطه) باشد. ErrorNoMailDefinedForThisUser=نشانی رایانامه برای این کاربر تعریف نشده است +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=این قابلیت برای کار کردن نیاز به فعال بودن جاوااسکریپت دارد. این گزینه را در بخش برپاسازی-نمایش فعال کنید. ErrorTopMenuMustHaveAParentWithId0=فهرست‌هائی از نوع "بالا" می‌توانند دارای فهرست مادر باشند. برای این‌که فهرست "کنار" داشته باشید، عدد 0 را وارد کنید. ErrorLeftMenuMustHaveAParentId=فهرست‌های "کنار" باید یک شناسۀ مادر داشته باشند @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=این نام نمایه برای این مجموعۀ ErrorLDAPSetupNotComplete=تطبیق Dolibarr-LDAP کامل نیست. ErrorLDAPMakeManualTest=یک فایل .ldif در پوشۀ %s تولید شد. تلاش کنید آن را از خط فرمان به شکل دستی اجرا کنید تا اطلاعات بیشتری در مورد خطاها داشته باشید. ErrorCantSaveADoneUserWithZeroPercentage=در صورتی که بخش "انجام شده توسط" هم پر شده باشد، امکان ذخیرۀ یک کنش با "وضعیت شروع نشده" نیست. -ErrorRefAlreadyExists=ارجاعی که برای مورد ساخته شده استفاده شده قبلا وجود داشته است. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorPleaseTypeBankTransactionReportName=لطفا نام اطلاعیۀ بانک را در خصوص چگونگی گزارش ورودی وارد کنید (حالت YYYYMM  یا YYYYMMDD) ErrorRecordHasChildren=هنگامی که یک ردیف دارای زیرمجموعه است، امکان حذف آن وجود ندارد. ErrorRecordHasAtLeastOneChildOfType=این شیء حداقل یک فرزند از نوع %s دارد @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=شما باید تعیین کنی ErrorDiscountLargerThanRemainToPaySplitItBefore=تخفیفی که می‌دهید بزرگتر از مقدار قابل پرداخت است. قبل از این کار تخفیف را به 2 تخفیف کوچکتر تقسیم کنید. ErrorFileNotFoundWithSharedLink=فایل پیدا نشد. ممکن است کلید به‌اشتراک‌گذاری ویرایش شده یا فایل حذف شده باشد ErrorProductBarCodeAlreadyExists=بارکد محصول %s در یک ارجاع محصول دیگر قبلا وجود داشته است -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=همچنین توجه داشته باشید در هنگامی که حداقل یک زیرمحصول (یا زیرمحصولی از زیرمحصول) به یک شمارۀ سری‌ساخت/شماره سریال احتیاج داشته باشد، استفاده از محصول مجازی برای افزایش/کاهش خودکار زیرمحصولات ممکن نیست. +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=برای سطوری که محصول مجانی دارند، توضیحات الزامی است ErrorAPageWithThisNameOrAliasAlreadyExists=صفحه/دربردارندۀ <strong>%s</strong> نام مشابه یا نام‌مستعار جایگزین مشابه ورودی مورد استفادۀ شما دارد ErrorDuringChartLoad=خطا در هنگام بارگذاری نمودار حساب‌ها. در صورتی برخی حساب‌ها بارگذاری نشوند، همچنان می‌توانید به طور دستی آن‌ها را وارد کنید @@ -243,6 +246,16 @@ 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 + # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=یک گذرواژه برای این عضو تنظیم شده است. با این‌حال هیچ حساب کاربری‌ای ساخته نشده است. بنابراین این گذرواژه برای ورود به Dolibarr قابل استفاده نیست. ممکن است برای یک رابط/واحد بیرونی قابل استفاده باشد، اما اگر شما نخواهید هیچ نام کاربری ورود و گذرواژه‌ای برای یک عضو استفاده کنید، شما می‌توانید گزینۀ "ایجاد یک نام‌ورد برای هر عضو" را از برپاسازی واحد اعضاء غیرفعال کنید. در صورتی که نیاز دارید که نام‌ورود داشته باشید اما گذرواژه نداشته باشید، می‌توانید این بخش را خالی گذاشته تا از این هشدار بر حذر باشید. نکته: همچنین نشانی رایانامه می‌تواند در صورتی که عضو به یک‌کاربر متصل باشد، می‌‌تواند مورد استفاده قرار گیرد @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=نام‌ورود شما تغییر پی WarningAnEntryAlreadyExistForTransKey=یک ورودی برای این کلید ترجمه برای این زبان قبلا وجود داشته است WarningNumberOfRecipientIsRestrictedInMassAction=هشدار، در هنگام انجام عملیات انبوده روی فهرست‌ها، تعداد دریافت‌کنندگان مختلف به <b>%s</b> محدود است. WarningDateOfLineMustBeInExpenseReportRange=هشدار، تاریخ مربوط به سطر در بازۀ گزارش هزینه‌ها نیست +WarningProjectDraft=Project is still in draft mode. Don't forget to validate it if you plan to use tasks. WarningProjectClosed=طرح بسته است. ابتدا باید آن را باز کنید WarningSomeBankTransactionByChequeWereRemovedAfter=Some bank transaction were removed after that the receipt including them were generated. So nb of cheques and total of receipt may differ from number and total in list. -WarningFailedToAddFileIntoDatabaseIndex=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/fa_IR/exports.lang b/htdocs/langs/fa_IR/exports.lang index 87e543c7259..c514c0638f1 100644 --- a/htdocs/langs/fa_IR/exports.lang +++ b/htdocs/langs/fa_IR/exports.lang @@ -26,6 +26,8 @@ FieldTitle=عنوان بخش NowClickToGenerateToBuildExportFile=حالا نوع فایل را در کادرترکیبی وارد کرده و کلید "تولید" را برای ساخت فایل صادرات کلیک کنید.. AvailableFormats=انواع‌فایل ممکن LibraryShort=کتابخانه +ExportCsvSeparator=Csv caracter separator +ImportCsvSeparator=Csv caracter separator Step=گام FormatedImport=دستیار واردات FormatedImportDesc1=این واحد به شما امکان می‌دهد با استفاده از فایل و بدون دانش فنی، با استفاده از یک دستیار داده‌های موجود را روزآمد کرده یا اشیاء جدید به پایگاه‌داده اضافه کنید. @@ -131,3 +133,4 @@ KeysToUseForUpdates=کلید (ستون) برای استفاده در <b>به‌ NbInsert=تعدا سطور درج شده: %s NbUpdate=تعداد سطور روزآمد شده: %s MultipleRecordFoundWithTheseFilters=ردیف‌های متعددی با این صافی پیدا شد: %s +StocksWithBatch=Stocks and location (warehouse) of products with batch/serial number diff --git a/htdocs/langs/fa_IR/mails.lang b/htdocs/langs/fa_IR/mails.lang index 75df4395c03..159d2a5d314 100644 --- a/htdocs/langs/fa_IR/mails.lang +++ b/htdocs/langs/fa_IR/mails.lang @@ -92,6 +92,7 @@ MailingModuleDescEmailsFromUser=ورودی رایانامه کاربر MailingModuleDescDolibarrUsers=کاربران دارای رایانامه MailingModuleDescThirdPartiesByCategories=شخص‌سوم‌ها (بر حسب دسته‌بندی) SendingFromWebInterfaceIsNotAllowed=ارسال از رابط وب مجاز نیست. +EmailCollectorFilterDesc=All filters must match to have an email being collected # Libelle des modules de liste de destinataires mailing LineInFile=خط٪ در فایل @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=اطلاعیه ها -NoNotificationsWillBeSent=بدون اطلاعیه ها ایمیل ها برای این رویداد و شرکت برنامه ریزی -ANotificationsWillBeSent=1 اطلاع رسانی خواهد شد از طریق ایمیل ارسال می شود -SomeNotificationsWillBeSent=اطلاعیه٪ خواهد شد از طریق ایمیل ارسال می شود -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=لیست همه اطلاعیه ها ایمیل فرستاده شده +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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=اطلاعات ContactsWithThirdpartyFilter=Contacts with third-party filter Unanswered=Unanswered Answered=پاسخ داده شده IsNotAnAnswer=Is not answer (initial email) IsAnAnswer=Is an answer of an initial email +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/fa_IR/main.lang b/htdocs/langs/fa_IR/main.lang index c53d9860524..e24969fbdf7 100644 --- a/htdocs/langs/fa_IR/main.lang +++ b/htdocs/langs/fa_IR/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=برای این نوع رایانامه قالبی وجود ن AvailableVariables=متغیرهای موجود برای جایگزینی NoTranslation=بدون ترجمه Translation=ترجمه +CurrentTimeZone=منطقه زمانی PHP (سرور) EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria NoRecordFound=هیچ ردیفی پیدا نشد NoRecordDeleted=هیچ ردیفی حذف نشد NotEnoughDataYet=دادۀ کافی وجود ندارد @@ -85,6 +87,8 @@ FileWasNotUploaded=یک فایل برای پیوست کردن انتخاب شد NbOfEntries=تعداد ورودی‌ه GoToWikiHelpPage=مطالعۀ راهنمای برخط (دسترسی به اینترنت نیاز است) GoToHelpPage=مطالعۀ راهنما +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Home Page RecordSaved=ردیف، ذخیره شد RecordDeleted=ردیف، حذف شد RecordGenerated=ردیف، تولید شد @@ -220,6 +224,7 @@ Value=مقدار PersonalValue=مقدار شخصی NewObject=%s جدید NewValue=مقدار جدید +OldValue=Old value %s CurrentValue=مقدار کنونی Code=کد Type=نوع @@ -433,6 +438,7 @@ RemainToPay=در انتظار پرداخت Module=واحد/برنامه Modules=واحد/برنامه Option=گزینه +Filters=Filters List=فهرست FullList=فهرست کامل FullConversation=Full conversation @@ -650,6 +656,7 @@ SupplierPreview=پیش‌نمایش فروشنده ShowCustomerPreview=نمایش پیش‌نمایش مشتری ShowSupplierPreview=نمایش پیش‌نمایش فروشنده RefCustomer=ارجاع مشتری +InternalRef=Internal ref. Currency=واحدپولی InfoAdmin=اطلاعات مربوط به مدیران Undo=واگرادنی @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/fa_IR/modulebuilder.lang b/htdocs/langs/fa_IR/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/fa_IR/modulebuilder.lang +++ b/htdocs/langs/fa_IR/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/fa_IR/mrp.lang b/htdocs/langs/fa_IR/mrp.lang index 5edbad940c2..33de4aff092 100644 --- a/htdocs/langs/fa_IR/mrp.lang +++ b/htdocs/langs/fa_IR/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/fa_IR/other.lang b/htdocs/langs/fa_IR/other.lang index 8bd88a5db5d..a52e9a0dee7 100644 --- a/htdocs/langs/fa_IR/other.lang +++ b/htdocs/langs/fa_IR/other.lang @@ -5,8 +5,6 @@ Tools=ابزار TMenuTools=ابزارها ToolsDesc=همۀ ابزارهائی که در سایر فهرست‌ها نیامده‌اند این‌جا گروه‌بندی شده‌اند. <br> همۀ ابزارها از فهرست سمت راست در دسترس هستند Birthday=تولد -BirthdayDate=تاریخ تولد -DateToBirth=Birth date BirthdayAlertOn=اعلان تولد فعال است BirthdayAlertOff=اعلان تولد غیرفعال است TransKey=ترجمۀ کلیدواژۀ TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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=تعداد فایل های پیوست / اسناد TotalSizeOfAttachedFiles=اندازه کل فایل های پیوست / اسناد @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=راست CalculatedWeight=وزن محاسبه شده CalculatedVolume=حجم محاسبه شده Weight=وزن -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=کیلوگرم WeightUnitg=گرم WeightUnitmg=میلی گرم @@ -214,6 +216,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=واردات مجموعه داده DolibarrNotification=اطلاع رسانی به صورت خودکار ResizeDesc=عرض جدید <b>OR</b> ارتفاع جدید را وارد کنید. نسبت در طول تغییر اندازه نگه داشته ... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=منطقه صادرات diff --git a/htdocs/langs/fa_IR/products.lang b/htdocs/langs/fa_IR/products.lang index 2a07d19a11f..ff7edf92df5 100644 --- a/htdocs/langs/fa_IR/products.lang +++ b/htdocs/langs/fa_IR/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=چند قسمت قیمتی در هر محصول/خدمات (هر مشتری در یک قسمت قیمتی است) MultiPricesNumPrices=تعداد قیمت‌ها DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=تعداد محصولات بسته‌بندی مادر @@ -167,8 +168,10 @@ BuyingPrices=قیمت‌های خرید CustomerPrices=قیمت‌های مشتری SuppliersPrices=قیمت‌های فروشنده SuppliersPricesOfProductsOrServices=قیمت‌های فروشنده (مربوط به محصولات و خدمات) -CustomCode=گمرک / کالا / کدبندی هماهنگ کالا +CustomCode=Customs|Commodity|HS code CountryOrigin=کشور مبدا +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Nature of product (material/finished) NatureOfProductShort=Nature of product NatureOfProductDesc=Raw material or finished product @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=استفاده از قیمت ثابت PriceByQuantity=استفاده از قیمت‌ بر حسب تعداد DisablePriceByQty=غیرفعال کردن استفاده از قیمت برحسب تعداد PriceByQuantityRange=بازۀ تعدا -MultipriceRules=مقررات قسمت‌بندی قیمت +MultipriceRules=Automatic prices for segment UseMultipriceRules=استفاده از مقررات قسمت‌بندی قیمت (که در برپاسازی واحد محصولات آمده است) برای محاسبۀ خودکار قیمت سایر قسمت‌ها بر حسب اولین قسمت PercentVariationOver=%% انواع بر حسب%s PercentDiscountOver=%% تخفیف بر حسب%s diff --git a/htdocs/langs/fa_IR/projects.lang b/htdocs/langs/fa_IR/projects.lang index 4f56d44dcf4..ab3c12c4568 100644 --- a/htdocs/langs/fa_IR/projects.lang +++ b/htdocs/langs/fa_IR/projects.lang @@ -76,15 +76,16 @@ MyActivities=وظایف/فعالیت‌های من MyProjects=طرح‌های من MyProjectsArea=بخش طرح‌های مربوط به من DurationEffective=مدت‌زمان مفید -ProgressDeclared=پیشرفت اظهار شده +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=پیشرفت محاسبه شده +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=زمان +TimeConsumed=Consumed ListOfTasks=فهرست وظایف GoToListOfTimeConsumed=رجوع به فهرست زمان صرف شده GanttView=نمای گانت diff --git a/htdocs/langs/fa_IR/recruitment.lang b/htdocs/langs/fa_IR/recruitment.lang index 082b58f6499..3647b8204d5 100644 --- a/htdocs/langs/fa_IR/recruitment.lang +++ b/htdocs/langs/fa_IR/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/fa_IR/sendings.lang b/htdocs/langs/fa_IR/sendings.lang index 4365e45f340..a042ba09638 100644 --- a/htdocs/langs/fa_IR/sendings.lang +++ b/htdocs/langs/fa_IR/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=دیگر محموله برای این منظور SendingsAndReceivingForSameOrder=Shipments and receipts for this order SendingsToValidate=حمل و نقل به اعتبار StatusSendingCanceled=لغو شد +StatusSendingCanceledShort=لغو ظده StatusSendingDraft=پیش نویس StatusSendingValidated=اعتبار (محصولات به کشتی و یا در حال حمل می شود) StatusSendingProcessed=پردازش @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=مدل سند کامل بیشتر برای رسید تحویل (logo. ..) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=EXPEDITION_ADDON_NUMBER ثابت تعریف نشده SumOfProductVolumes=مجموع حجم محصول SumOfProductWeights=مجموع وزن محصول diff --git a/htdocs/langs/fa_IR/stocks.lang b/htdocs/langs/fa_IR/stocks.lang index 2ebf520b14e..c41e21fe88c 100644 --- a/htdocs/langs/fa_IR/stocks.lang +++ b/htdocs/langs/fa_IR/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=انبار پیش‌فرض @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/fa_IR/ticket.lang b/htdocs/langs/fa_IR/ticket.lang index a1ad4eacc4e..8f525262ab5 100644 --- a/htdocs/langs/fa_IR/ticket.lang +++ b/htdocs/langs/fa_IR/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=برگه‌ها - انواع TicketDictCategory=برگه‌ها - دسته‌بندی‌ها TicketDictSeverity=برگه‌ها - سطح اهمیت TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=اشکال نرم‌افزاری -TicketTypeShortBUGHARD=اشکال نرم‌افزاری -TicketTypeShortCOM=سوال تجاری +TicketTypeShortCOM=سوال تجاری TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=سایر TicketSeverityShortLOW=کم TicketSeverityShortNORMAL=عادی TicketSeverityShortHIGH=زیاد -TicketSeverityShortBLOCKING=انتقادی/مسدودی +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=بخش '%s' نادرست است MenuTicketMyAssign=برگه‌ها من @@ -60,7 +58,6 @@ OriginEmail=منبع رایانامه Notify_TICKET_SENTBYMAIL=ارسال پیام برگه با رایانامه # Status -NotRead=خوانده نشده Read=خوانده‌شده Assigned=نسبت‌داده شده InProgress=در حال انجام @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=رابط عمومی به کاربران ام TicketsAutoAssignTicket=نسبت دادن خودکار کاربری که برگۀ‌پشتیبانی را ساخته است TicketsAutoAssignTicketHelp=در هنگام ساخت برگۀ‌پشتیبانی، کاربر می‌تواند به شکل خودکار به برگه نسبت داده شود TicketNumberingModules=واحد شماره‌دهی برگه‌های پشتیبانی +TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=اطلاع‌رسانی به شخص‌سوم در هنگام ساخت TicketsDisableCustomerEmail=همواره در هنگامی که یک برگۀ‌پشتیبانی از طریق رابط عمومی ساخته می‌شود، قابلیت رایانامه غیرفعال شود TicketsPublicNotificationNewMessage=Send email(s) when a new message is added @@ -233,7 +231,6 @@ TicketLogStatusChanged=وضعیت تغییر پیدا کرد: %s به %s TicketNotNotifyTiersAtCreate=عدم اطلاع‌رسانی به شرکت در هنگام ساخت Unread=خوانده نشده TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/fa_IR/website.lang b/htdocs/langs/fa_IR/website.lang index 3c1ada31ac4..5c5a464d39c 100644 --- a/htdocs/langs/fa_IR/website.lang +++ b/htdocs/langs/fa_IR/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page PageContainer=صفحه 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/fa_IR/withdrawals.lang b/htdocs/langs/fa_IR/withdrawals.lang index 5c0b517c19a..ec6d23c2c6b 100644 --- a/htdocs/langs/fa_IR/withdrawals.lang +++ b/htdocs/langs/fa_IR/withdrawals.lang @@ -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>. ClassCredited=طبقه بندی اعتبار @@ -131,7 +132,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,3 +148,5 @@ 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=انتخاب برای حالت واقعی تنظیم نشده بود، ما بعد از این شبیه سازی را متوقف کند 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/fa_IR/workflow.lang b/htdocs/langs/fa_IR/workflow.lang index d3fc0934cf1..83ce4b446e4 100644 --- a/htdocs/langs/fa_IR/workflow.lang +++ b/htdocs/langs/fa_IR/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 diff --git a/htdocs/langs/fi_FI/accountancy.lang b/htdocs/langs/fi_FI/accountancy.lang index 2e529b15833..9b30fe43792 100644 --- a/htdocs/langs/fi_FI/accountancy.lang +++ b/htdocs/langs/fi_FI/accountancy.lang @@ -16,6 +16,8 @@ ThisService=Tämä palvelu ThisProduct=Tämä tuote DefaultForService=Oletusarvo palvelulle DefaultForProduct=Oletusarvo tuotteelle +ProductForThisThirdparty=Product for this thirdparty +ServiceForThisThirdparty=Service for this thirdparty CantSuggest=Ei ehdotuksia AccountancySetupDoneFromAccountancyMenu=Kirjanpidon asetukset tehdään pääasiassa valikosta %s ConfigAccountingExpert=Configuration of the module accounting (double entry) @@ -48,6 +50,7 @@ CountriesExceptMe=Kaikki maat, poislukien %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 @@ -144,7 +147,7 @@ NotVentilatedinAccount=Ei sidottu kirjanpitotilille 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 @@ -198,7 +201,8 @@ Docdate=Päiväys Docref=Viite LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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=Päiväkirja @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ Accounted=Kirjattu pääkirjanpitoon NotYetAccounted=Not yet accounted in ledger ShowTutorial=Show Tutorial NotReconciled=Täsmäyttämätön +WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view ## Admin BindingOptions=Binding options @@ -309,7 +317,7 @@ AccountingJournalType2=Myynti AccountingJournalType3=Ostot AccountingJournalType4=Pankki AccountingJournalType5=Expenses report -AccountingJournalType8=Inventory +AccountingJournalType8=Varasto 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> @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/fi_FI/admin.lang b/htdocs/langs/fi_FI/admin.lang index 59cee45e755..1eda1356201 100644 --- a/htdocs/langs/fi_FI/admin.lang +++ b/htdocs/langs/fi_FI/admin.lang @@ -16,15 +16,15 @@ FileIntegrityIsOkButFilesWereAdded=Tiedostot ovat yhteneväisiä alkuperäisten FileIntegritySomeFilesWereRemovedOrModified=Asennus poikkeaa tavallisesta asennuksesta. Tiedostoja on muutettu/poistettu/lisätty. GlobalChecksum=Tarkistussumma MakeIntegrityAnalysisFrom=Tee eheysanalyysi sovellustiedostoista -LocalSignature=Embedded local signature (less reliable) -RemoteSignature=Remote distant signature (more reliable) +LocalSignature=Upotettu paikallinen allekirjoitus (vähemmän luotettava) +RemoteSignature=Etäkauko-allekirjoitus (luotettavampi) FilesMissing=Puuttuvat Tiedostot FilesUpdated=Päivitetyt Tiedostot FilesModified=Muokatut Tiedostot FilesAdded=Lisätyt Tiedostot FileCheckDolibarr=Tarkasta sovellustiedostojen eheys -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=Paikallinen tiedosto eheystarkastusta varten on käytettävissä vain, kun sovellus on asennettu virallisesta paketista +XmlNotFound=Xml eheystiedostoa sovellukselle ei löydy SessionId=Istunnon tunniste SessionSaveHandler=Istunnot tallentava käsittelijä SessionSavePath=Istuntojen tallennuskohde @@ -37,12 +37,12 @@ UnlockNewSessions=Poista yhteyksien esto YourSession=Istuntosi Sessions=Käyttäjien istunnot WebUserGroup=Web-palvelimen käyttäjä / ryhmä -PermissionsOnFilesInWebRoot=Permissions on files in web root directory -PermissionsOnFile=Permissions on file %s +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). DBStoringCharset=Tietokannan merkistö tietojen tallennukseen DBSortingCharset=Tietokannan merkistö tietojen lajitteluun -HostCharset=Host charset +HostCharset=Isännän merkistö ClientCharset=Clientin merkistö ClientSortingCharset=Clientin ulkoasu WarningModuleNotActive=<b>Moduuli %s</b> on oltava käytössä @@ -56,6 +56,8 @@ GUISetup=Näyttö SetupArea=Asetukset UploadNewTemplate=Päivitä uusi pohja(t) FormToTestFileUploadForm=Lomake tiedostonlähetyksen testaamiseen (asetusten mukainen) +ModuleMustBeEnabled=Moduulin / sovelluksen <b> %s </b> on oltava käytössä +ModuleIsEnabled=Moduuli / sovellus <b> %s </b> on otettu käyttöön IfModuleEnabled=Huomaa: kyllä on tehokas vain, jos <b>moduuli %s</b> on käytössä 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 @@ -69,23 +71,22 @@ Dictionary=Sanakirjat ErrorReservedTypeSystemSystemAuto=Arvot 'system' ja 'systemauto' ovat varattuja. Voit käyttää 'user' arvona lisääksesi sinun omaa recordia ErrorCodeCantContainZero=Koodi ei voi sisältää arvoa 0 DisableJavascript=Poista JavaScript-ja Ajax toiminnot -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. +DisableJavascriptNote=Huomaa: Testaamista tai virheenkorjausta varten. Sokeiden tai tekstiselaimien optimoimiseksi saatat haluta käyttää käyttäjän profiilin asetuksia +UseSearchToSelectCompanyTooltip=Myös jos sinulla on paljon kolmansia osapuolia (> 100 000), voit lisätä nopeutta asettamalla vakion COMPANY_DONOTSEARCH_ANYWHERE arvoksi 1 kohdassa Asetukset->Muut. Haku rajoitetaan sitten merkkijonon alkuun. +UseSearchToSelectContactTooltip=Myös jos sinulla on paljon kolmansia osapuolia (> 100 000), voit lisätä nopeutta asettamalla vakion CONTACT_DONOTSEARCH_ANYWHERE arvoksi 1 kohdassa Asetukset-> Muut. Haku rajoitetaan sitten merkkijonon alkuun. +DelaiedFullListToSelectCompany=Odota, kunnes näppäintä painetaan, ennen kuin lataat kolmansien osapuolten yhdistelmäluettelon sisällön. <br> Tämä voi parantaa suorituskykyä, jos sinulla on paljon kolmansia osapuolia, mutta se ei ole yhtä kätevää. +DelaiedFullListToSelectContact=Odota, kunnes näppäintä painetaan, ennen kuin lataat yhteystietojen yhdistelmäluettelon sisältöä. <br> Tämä voi parantaa suorituskykyä, jos sinulla on paljon yhteystietoja, mutta se on vähemmän kätevää. NumberOfKeyToSearch=Haun aloittamiseksi tarvittavien merkkien määrä: %s NumberOfBytes=Tavujen lukumäärä SearchString=Haettava merkkijono NotAvailableWhenAjaxDisabled=Ei käytössä, kun Ajax poistettu käytöstä -AllowToSelectProjectFromOtherCompany=On document of a third party, can choose a project linked to another third party +AllowToSelectProjectFromOtherCompany=Kolmannen osapuolen asiakirjalla voi valita toiseen kolmanteen osapuoleen linkitetyn projektin JavascriptDisabled=JavaScript ei käytössä UsePreviewTabs=Käytä esikatselu - välilehtiä ShowPreview=Näytä esikatselu -ShowHideDetails=Show-Hide details +ShowHideDetails=Näytä-piilota yksityiskohdat PreviewNotAvailable=Esikatselu ei ole käytettävissä ThemeCurrentlyActive=Aktiivinen teema -CurrentTimeZone=Aikavyöhyke PHP (palvelin) MySQLTimeZone=Aikavyöhyke MySql (tietokanta) TZHasNoEffect=Päivämäärät talletetaan ja palautetaan siinä muodossa kuin ne on syötetty. Aikavyöhykkeellä on merkitystä ainoastaan käytettäessä UNIX_TIMESTAMP - funktiota. (Dolibarr ei käytä tätä, joten tietokannan aikavyöhykeellä ei ole vaikutusta vaikka se muuttuisi tietojen tallentamisen jälkeen) Space=Space @@ -97,15 +98,15 @@ NextValue=Seuraava arvo NextValueForInvoices=Seuraava arvo (laskut) NextValueForCreditNotes=Seuraava arvo (hyvityslaskut) NextValueForDeposit=Seuraava arvo (osamaksu) -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 +NextValueForReplacements=Seuraava arvo (korvaavat) +MustBeLowerThanPHPLimit=Huomaa: PHP-kokoonpanosi rajoittaa tällä hetkellä lähetettävien tiedostojen enimmäiskokoa <b> %s </b> %s tämän parametrin arvosta riippumatta. NoMaxSizeByPHPLimit=Huom: Rajaa ei ole asetettu PHP-asetuksissa MaxSizeForUploadedFiles=Lähetettävien tiedostojen enimmäiskoko (0 estää lähetykset) UseCaptchaCode=Käytä graafista koodia (CAPTCHA) kirjautumissivulla AntiVirusCommand=Virustorjuntaohjelman polku -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 +AntiVirusCommandExample=Esimerkki ClamAv-daemonille (vaatii clamav-daemonin): /usr/bin/clamdscan <br> Esimerkki ClamWinille (erittäin hidas): c:\\Progra~1\\ClamWin\\bin\\clamscan.exe AntiVirusParam= Lisää parametreja komentorivillä -AntiVirusParamExample=Example for ClamAv Daemon: --fdpass<br>Example for ClamWin: --database="C:\\Program Files (x86)\\ClamWin\\lib" +AntiVirusParamExample=Esimerkki ClamAv-daemonille: --fdpass <br> Esimerkki ClamWinille: --database="C:\\Program Files (x86)\\ClamWin\\lib" ComptaSetup=Kirjanpitomoduulin asetukset UserSetup=Käyttäjien hallinta-asetukset MultiCurrencySetup=Multi-valuutta asetukset @@ -123,7 +124,7 @@ CurrentValueSeparatorDecimal=Desimaalierotin CurrentValueSeparatorThousand=Tuhatluvun erotin Destination=Kohde IdModule=Moduulin ID -IdPermissions=Permissions ID +IdPermissions=Käyttöoikeustunnus LanguageBrowserParameter=Parametri %s LocalisationDolibarrParameters=Lokalisaation parametrit ClientTZ=Asiakasohjelman aikavyöhyke (käyttäjä) @@ -133,16 +134,16 @@ PHPTZ=PHP-palvelimen aikavyöhyke DaylingSavingTime=Kesäaika (käyttäjä) CurrentHour=PHP aika (palvelin) CurrentSessionTimeOut=Nykyisen istunnon aikakatkaisu -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=Voit asettaa toisen PHP-aikavyöhykkeen (ei vaadita) lisäämällä .htaccess-tiedostoon rivi esim. "SetEnv TZ Europe / Paris" +HoursOnThisPageAreOnServerTZ=Varoitus, toisin kuin muilla näytöillä lukee, tämän sivun aukioloajat eivät ole paikallista aikavyöhykettäsi, vaan palvelimen aikavyöhykettä. Box=Widget Boxes=Widgetit MaxNbOfLinesForBoxes=Maksimi rivimäärä Widgeteille AllWidgetsWereEnabled=Kaikki saatavilla olevat Widgetit on aktivoitu PositionByDefault=Oletusjärjestys Position=Sijainti -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. +MenusDesc=Valikkohallinnasta asetetaan kahden valikkorivin (vaaka- ja pystysuora) sisältö. +MenusEditorDesc=Valikkomuokkaimen avulla voit määrittää mukautetut valikkomerkinnät. Käytä sitä varoen, jotta vältät epävakauden ja pysyvästi tavoittamattomissa olevat valikkomerkinnät. <br> Jotkut moduulit lisäävät valikkomerkinnät (valikossa <b> Kaikki </b> enimmäkseen). Jos poistat osan näistä merkinnöistä vahingossa, voit palauttaa ne poistamalla moduulin käytöstä ja ottamalla sen uudelleen käyttöön. MenuForUsers=Valikko käyttäjille LangFile=.lang - tiedosto Language_en_US_es_MX_etc=Kieliasetukset (en_US, fi_FI,...) @@ -151,15 +152,15 @@ SystemInfo=Järjestelmän tiedot SystemToolsArea=Järjestelmätyökalut SystemToolsAreaDesc=Pääkäyttäjien toiminnot. Valitse valikosta haluttu ominaisuus Purge=Poista -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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Poista väliaikaiset tiedostot -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. +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. +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 PurgeNothingToDelete=Ei poistettavia hakemistoja tai tiedostoja. PurgeNDirectoriesDeleted=<b> %s</b> tiedostoa tai hakemistoa poistettu. -PurgeNDirectoriesFailed=Failed to delete <b>%s</b> files or directories. +PurgeNDirectoriesFailed=<b> %s </b> -tiedostojen tai hakemistojen poistaminen epäonnistui. PurgeAuditEvents=Poista kaikki tietoturvatapahtumat ConfirmPurgeAuditEvents=Haluatko varmasti poistaa kaikki tietoturvatapahtumat? Kaikki tietoturvalokit tyhjennetään, muuta dataa ei poisteta. GenerateBackup=Luo varmuuskopio @@ -173,20 +174,20 @@ NoBackupFileAvailable=Varmuuskopioita ei saatavilla ExportMethod=Viennin menetelmä ImportMethod=Tuonnin menetelmä ToBuildBackupFileClickHere=Varmuuskopion luonti, paina <a href="%s">tästä</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: +ImportMySqlDesc=Jos haluat tuoda MySQL-varmuuskopiotiedoston, voit käyttää phpMyAdminia isännän kautta tai käyttää mysql-komentoa komentoriviltä. <br> Esimerkiksi: ImportPostgreSqlDesc=Tuodaksesi varmuuskopio-tiedoston, sinun täytyy käyttää pg_restore komentoa komentoriviltä: ImportMySqlCommand=%s %s < mybackupfile.sql ImportPostgreSqlCommand=%s %s mybackupfile.sql FileNameToGenerate=Varmuuskopion tiedostonimi: Compression=Pakkaus -CommandsToDisableForeignKeysForImport=Command to disable foreign keys on import -CommandsToDisableForeignKeysForImportWarning=Mandatory if you want to be able to restore your sql dump later +CommandsToDisableForeignKeysForImport=Komento, jolla estetään vieraiden avainten tuonti +CommandsToDisableForeignKeysForImportWarning=Pakollinen, jos haluat pystyä palauttamaan sql-dumpin myöhemmin ExportCompatibility=Luodun vientitiedoston yhteensopivuus -ExportUseMySQLQuickParameter=Use the --quick parameter -ExportUseMySQLQuickParameterHelp=The '--quick' parameter helps limit RAM consumption for large tables. +ExportUseMySQLQuickParameter=Käytä parametria --quick +ExportUseMySQLQuickParameterHelp=Parametri '--quick' auttaa rajoittamaan RAM-muistin kulutusta suurissa tauluissa. MySqlExportParameters=MySQL-viennin parametrit PostgreSqlExportParameters= PostgreSQL-viennin parametrit -UseTransactionnalMode=Use transactional mode +UseTransactionnalMode=Käytä transaktiotilaa FullPathToMysqldumpCommand=mysqldump-komennon polku FullPathToPostgreSQLdumpCommand=pg_dump-komennon polku AddDropDatabase=Lisää 'DROP DATABASE' - komento @@ -194,39 +195,39 @@ AddDropTable=Lisää 'DROP TABLE' - komento ExportStructure=Rakenne NameColumn=Nimisarakkeet ExtendedInsert=Laajennettu INSERT -NoLockBeforeInsert=No lock commands around INSERT +NoLockBeforeInsert=INSERT-alueella ei ole lukituskomentoja DelayedInsert=Viivästetty lisäys EncodeBinariesInHexa=Koodaa binääridata heksadesimaaleina IgnoreDuplicateRecords=Ohita duplikaattitietuevirheet (INSERT IGNORE) AutoDetectLang=Automaattitunnistus (selaimen kieli) FeatureDisabledInDemo=Ominaisuus on poistettu käytöstä demossa FeatureAvailableOnlyOnStable=Ominaisuus käytettävissä vain virallisissa vakaissa versioissa -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>. +BoxesDesc=Widgetit ovat komponentteja, jotka näyttävät joitain tietoja, jotka voit lisätä joidenkin sivujen mukauttamiseksi. Voit valita, näytetäänkö widget vai ei, valitsemalla kohdesivun ja napsauttamalla Aktivoi tai napsauttamalla roskakoria poistaaksesi sen käytöstä. +OnlyActiveElementsAreShown=Vain <a href="%s">-yhteensopivien moduulien </a> elementit näytetään. +ModulesDesc=Moduulit / sovellukset määrittävät ohjelmistossa käytettävissä olevat ominaisuudet. Jotkut moduulit edellyttävät oikeuksien myöntämistä käyttäjille moduulin aktivoinnin jälkeen. Napsauta kunkin moduulin virtapainiketta <span class="small valignmiddle"> %s </span>, jos haluat ottaa moduulin / sovelluksen käyttöön tai poistaa sen käytöstä. +ModulesMarketPlaceDesc=Löydät lisää moduuleja ladattavaksi ulkoisilta verkkosivustoilta Internetistä ... +ModulesDeployDesc=Jos tiedostojärjestelmän käyttöoikeudet sen sallivat, voit käyttää tätä työkalua ulkoisen moduulin asentamiseen. Moduuli on tämän jälkeen näkyvissä välilehdellä <strong> %s </strong>. ModulesMarketPlaces=Etsi ulkoisia sovelluksia/moduuleja ModulesDevelopYourModule=Luo oma sovellus/moduuli -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 +ModulesDevelopDesc=Voit myös kehittää oman moduulin tai etsiä kumppanin kehittämään sinulle. +DOLISTOREdescriptionLong=Sen sijaan, että ottaisit ulkoisen moduulin käyttöön, <a href="https://www.dolistore.com"> www.dolistore.com </a> -sivustosta, voit käyttää tätä sulautettua työkalua, joka suorittaa haun ulkoisella kauppapaikalla (saattaa olla hidasta, tarvitsee Internet-yhteyden) ... +NewModule=Uusi moduuli FreeModule=Ilmainen CompatibleUpTo=Yhteensopiva version %s kanssa NotCompatible=Moduuli ei ole yhteensopiva Dolibarr - version %s kanssa. (Min %s - Max %s) CompatibleAfterUpdate=Moduuli vaatii Dolibarr - version %s päivittämisen. (Min %s - Max %s) -SeeInMarkerPlace=See in Market place -SeeSetupOfModule=See setup of module %s +SeeInMarkerPlace=Katso kauppapaikalla +SeeSetupOfModule=Katso moduulin %s asetukset Updated=Päivitetty -Nouveauté=Novelty +Nouveauté=Uutuus AchatTelechargement=Osta / Lataa -GoModuleSetupArea=To deploy/install a new module, go to the Module setup area: <a href="%s">%s</a>. +GoModuleSetupArea=Voit ottaa uuden moduulin käyttöön tai asentaa sen siirtymällä moduulin asennusalueelle: <a href="%s"> %s </a>. DoliStoreDesc=DoliStore, virallinen markkinapaikka Dolibarr ERP / CRM lisäosille -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... +DoliPartnersDesc=Luettelo yrityksistä, jotka tarjoavat räätälöityjä moduuleja tai ominaisuuksia. <br> Huomaa: Koska Dolibarr on avoimen lähdekoodin sovellus, <i> kenen tahansa </i>: lla, jolla on kokemusta PHP-ohjelmoinnista, pitäisi pystyä kehittämään moduuli. +WebSiteDesc=Ulkoiset verkkosivustot, joista löytyy lisää moduuleja (ei ydin) ... +DevelopYourModuleDesc=Joitakin ratkaisuja oman moduulin kehittämiseen ... URL=Osoite -RelativeURL=Relative URL +RelativeURL=Suhteellinen URL BoxesAvailable=Widgetit saatavilla BoxesActivated=Widget aktivoitu ActivateOn=Aktivoi @@ -237,65 +238,66 @@ Required=Vaadittu UsedOnlyWithTypeOption=Käytössä vain jossain Kalenterin asetuksissa Security=Turvallisuus Passwords=Salasanat -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. +DoNotStoreClearPassword=Salaa tietokantaan tallennetut salasanat (EI pelkkänä tekstinä). On erittäin suositeltavaa aktivoida tämä vaihtoehto. +MainDbPasswordFileConfEncrypted=Salaa conf.php-tiedostoon tallennettu tietokannan salasana. On erittäin suositeltavaa aktivoida tämä vaihtoehto. +InstrucToEncodePass=Jos haluat salasanan koodatuksi <b> conf.php </b> -tiedostoon, korvaa rivi <br> <b> $ dolibarr_main_db_pass = "..."; </b> <br> seuraavalla: <br> <b> $ dolibarr_main_db_pass = "crypted: %s"; </b> +InstrucToClearPass=Jos haluat salasanan purettuna (selkeäkielisenä) <b> conf.php </b> -tiedostoon, korvaa rivi <br> <b> $ dolibarr_main_db_pass = "crypted: ..."; </b> <br> seuraavalla: <br> <b> $ dolibarr_main_db_pass = "%s"; </b> +ProtectAndEncryptPdfFiles=Suojaa luotuja PDF-tiedostoja. Tätä EI suositella, koska se rikkoo PDF-tiedostojen joukkotuotannon. +ProtectAndEncryptPdfFilesDesc=PDF-asiakirjan suojaus pitää sen saatavilla lukemista ja tulostusta varten millä tahansa PDF-selaimella. Muokkaus ja kopiointi ei kuitenkaan ole enää mahdollista. Huomaa, että tämän ominaisuuden käyttäminen ei tue globaalien yhdistettyjen PDF-tiedostojen luomista. Feature=Ominaisuus DolibarrLicense=Lisenssi Developpers=Kehittäjät/vapaaehtoiset OfficialWebSite=Dolibarr: in virallinen www-sivu -OfficialWebSiteLocal=Local web site (%s) +OfficialWebSiteLocal=Paikallinen verkkosivusto (%s) OfficialWiki=Dolibarr:in dokumentit / Wiki OfficialDemo=Dolibarr online-demo OfficialMarketPlace=Ulkoisten moduulien/lisäosien kauppa -OfficialWebHostingService=Referenced web hosting services (Cloud hosting) -ReferencedPreferredPartners=Preferred Partners +OfficialWebHostingService=Viitatut verkkopalvelut (pilvipalvelut) +ReferencedPreferredPartners=Ensisijaiset kumppanit OtherResources=Muut resurssit ExternalResources=Ulkoiset resurssit SocialNetworks=Sosiaaliset verkostot +SocialNetworkId=Sosiaalisen verkoston tunnus ForDocumentationSeeWiki=Käyttäjälle tai kehittäjän dokumentaatio (doc, FAQs ...), <br> katsoa, että Dolibarr Wiki: <br> <a href="%s" target="_blank"><b> %s</b></a> ForAnswersSeeForum=Muita kysymyksiä / apua, voit käyttää Dolibarr foorumilla: <br> <a href="%s" target="_blank"><b> %s</b></a> -HelpCenterDesc1=Here are some resources for getting help and support with Dolibarr. -HelpCenterDesc2=Some of these resources are only available in <b>english</b>. +HelpCenterDesc1=Tässä on joitain resursseja, joilla saat apua ja tukea Dolibarrin kanssa. +HelpCenterDesc2=Osa näistä resursseista on saatavana vain <b> englanniksi </b>. CurrentMenuHandler=Nykyinen valikko handler MeasuringUnit=Mittayksikkö LeftMargin=Vasen marginaali TopMargin=Ylämarginaali PaperSize=Paperin koko Orientation=Orientaatio -SpaceX=Space X -SpaceY=Space Y +SpaceX=Tila X +SpaceY=Tila Y FontSize=Fontin koko Content=Sisällys -NoticePeriod=Notice period -NewByMonth=New by month +NoticePeriod=Huomautusaika +NewByMonth=Uusi kuukausittain Emails=Sähköpostit EMailsSetup=Sähköpostien asetukset -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>) +EMailsDesc=Tällä sivulla voit asettaa parametreja tai vaihtoehtoja sähköpostin lähettämiselle. +EmailSenderProfiles=Sähköpostin lähettäjien profiilit +EMailsSenderProfileDesc=Voit pitää tämän osan tyhjänä. Jos kirjoitat joitain sähköposteja tähän, ne lisätään mahdollisten lähettäjien luetteloon yhdistelmäruutuun, kun kirjoitat uutta sähköpostia. +MAIN_MAIL_SMTP_PORT=SMTP / SMTPS-portti (oletusarvo php.ini-tiedostossa: <b> %s </b>) +MAIN_MAIL_SMTP_SERVER=SMTP / SMTPS-isäntä (oletusarvo php.ini-tiedostossa: <b> %s </b>) MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike=SMTP/SMTPS Portti (Ei määritelty PHP:hen Unix-tyyppisissä järjestelmissä) -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_SMTP_SERVER_NotAvailableOnLinuxLike=SMTP / SMTPS-isäntä (ei määritelty PHP:ssa Unix-tyyppisissä järjestelmissä) +MAIN_MAIL_EMAIL_FROM=Lähettäjän sähköposti automaattisia sähköposteja varten (oletusarvo php.ini: <b> %s </b>) +MAIN_MAIL_ERRORS_TO=Sähköpostiosoite, jota käytetään virheellisten sähköpostien palautusosoitteena (kentät Errors-To lähetetyissä sähköposteissa) +MAIN_MAIL_AUTOCOPY_TO= Kopioi (piilokopio) kaikki lähetetyt sähköpostit osoitteeseen +MAIN_DISABLE_ALL_MAILS=Poista kaikki sähköpostin lähettäminen käytöstä (testitarkoituksia tai esittelyjä varten) +MAIN_MAIL_FORCE_SENDTO=Lähetä kaikki sähköpostit (todellisten vastaanottajien sijasta testitarkoituksiin) +MAIN_MAIL_ENABLED_USER_DEST_SELECT=Ehdota työntekijöiden sähköposteja (jos määritelty) ennalta määritettyjen vastaanottajien luetteloon uutta sähköpostia kirjoittaessasi MAIN_MAIL_SENDMODE=Sähköpostin lähetystapa -MAIN_MAIL_SMTPS_ID=SMTP ID (if sending server requires authentication) -MAIN_MAIL_SMTPS_PW=SMTP Password (if sending server requires authentication) +MAIN_MAIL_SMTPS_ID=SMTP-tunnus (jos lähettävä palvelin vaatii todennuksen) +MAIN_MAIL_SMTPS_PW=SMTP-salasana (jos lähettävä palvelin vaatii todennuksen) MAIN_MAIL_EMAIL_TLS=TLS (SSL) - salaus MAIN_MAIL_EMAIL_STARTTLS=TLS (STARTTLS) - salaus MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED=Authorise les certificats auto-signés MAIN_MAIL_EMAIL_DKIM_ENABLED=Käytä DKIM:iä sähköpostin allekirjoituksen luontiin MAIN_MAIL_EMAIL_DKIM_DOMAIN=DKIM:in kanssa käytetty sähköpostidomain -MAIN_MAIL_EMAIL_DKIM_SELECTOR=Name of dkim selector +MAIN_MAIL_EMAIL_DKIM_SELECTOR=Dkim-valitsimen nimi MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY=Henkilökohtainen avain DKIM-allekirjoitukseen MAIN_DISABLE_ALL_SMS=Poista SMS-viestit käytöstä (testitarkoituksessa tai demossa) MAIN_SMS_SENDMODE=SMS-viestien lähetystapa @@ -304,9 +306,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Oletussähköpostiosoite käsin lähetettäessä (Kä UserEmail=Käyttäjän sähköposti CompanyEmail=Yrityksen sähköposti FeatureNotAvailableOnLinux=Ominaisuus ei ole Unix-koneissa. Testaa sendmail ohjelmaa paikallisesti. -FixOnTransifex=Fix the translation on the online translation platform of project -SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory <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 +FixOnTransifex=Korjaa käännös projektin online-käännösalustalla +SubmitTranslation=Jos tämän kielen käännös ei ole täydellinen tai löydät virheitä, voit korjata tämän muokkaamalla tiedostoja hakemistossa <b> langs / %s </b> ja lähettämällä muutoksesi osoitteeseen www.transifex.com/dolibarr-association/dolibarr/ +SubmitTranslationENUS=Jos tämän kielen käännös ei ole täydellinen tai löydät virheitä, voit korjata tämän muokkaamalla tiedostoja hakemistoon <b> langs / %s </b> ja lähettämällä muokatut tiedostot osoitteeseen dolibarr.org/forum tai, jos olet kehittäjä, PR:llä osoitteessa github.com/Dolibarr/dolibarr ModuleSetup=Moduuli asetukset ModulesSetup=Moduulit/Applikaatio asetukset ModuleFamilyBase=Järjestelmä @@ -326,22 +328,22 @@ MenuHandlers=Valikko käsitteleville MenuAdmin=Valikkoeditori DoNotUseInProduction=Älä käytä tuotannossa ThisIsProcessToFollow=Päivitysmenetelmä: -ThisIsAlternativeProcessToFollow=This is an alternative setup to process manually: +ThisIsAlternativeProcessToFollow=Tämä on vaihtoehtoinen asetus manuaaliseen käsittelyyn: StepNb=Vaihe %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: +FindPackageFromWebSite=Etsi paketti, joka tarjoaa tarvittavat ominaisuudet (esimerkiksi virallisella verkkosivustolla %s). +DownloadPackageFromWebSite=Lataa paketti (esimerkiksi viralliselta verkkosivustolta %s). +UnpackPackageInDolibarrRoot=Pura pakatut tiedostot Dolibarr-palvelinhakemistoon: <b> %s </b> +UnpackPackageInModulesRoot=Ulkoisen moduulin käyttöönottoon/asentamiseksi pura pakatut tiedostot ulkoisille moduuleille tarkoitettuun palvelinhakemistoon: <br> <b> %s </b> +SetupIsReadyForUse=Moduulin käyttöönotto on valmis. Sinun on kuitenkin otettava käyttöön ja määriteltävä moduuli sovelluksessasi siirtymällä sivun asetusmoduuleihin: <a href="%s"> %s </a>. +NotExistsDirect=Vaihtoehtoista juurihakemistoa ei ole määritelty olemassa olevalle hakemistolle. <br> +InfDirAlt=Versiosta 3 lähtien on mahdollista määrittää vaihtoehtoinen juurihakemisto. Tämän avulla voit tallentaa erilliseen hakemistoon laajennuksia ja mukautettuja malleja. <br> Luo vain hakemisto Dolibarrin juurelle (esim. mukautettu). <br> +InfDirExample= <br> Sitten määrittele se tiedostossa <strong> conf.php </strong> <br> $dolibarr_main_url_root_alt='/custom' <br> $dolibarr_main_document_root_alt='/asennuspolun/sijainti/Dolibarr/htdocs/custom' <br> Jos nämä rivit on kommentoitu "#"-merkillä, ottaaksesi nämä käyttöön, poista kommentti poistamalla "#"-merkki rivin alusta. +YouCanSubmitFile=Voit ladata moduulipaketin .zip-tiedoston täältä: CurrentVersion=Dolibarr nykyinen versio -CallUpdatePage=Browse to the page that updates the database structure and data: %s. +CallUpdatePage=Siirry sivulle, joka päivittää tietokannan rakenteen ja tiedot: %s. LastStableVersion=Viimeisin vakaa versio -LastActivationDate=Latest activation date -LastActivationAuthor=Latest activation author +LastActivationDate=Viimeisin aktivointipäivä +LastActivationAuthor=Viimeisin taho, joka on suorittanut aktivoinnin LastActivationIP=Viimeinen aktiivinen IP UpdateServerOffline=Palvelimen offline-päivitys WithCounter=Laskurin hallinta @@ -358,7 +360,7 @@ ServerNotAvailableOnIPOrPort=Palvelin ei ole käytettävissä <b>osoitteessa %s DoTestServerAvailability=Testaa palvelinyhteys DoTestSend=Testaa lähetys DoTestSendHTML=Testaa HTML:n lähettäminen -ErrorCantUseRazIfNoYearInMask=Error, can't use option @ to reset counter each year if sequence {yy} or {yyyy} is not in mask. +ErrorCantUseRazIfNoYearInMask=Virhe, ei voi käyttää vaihtoehtoa @ laskurin nollaamiseen vuosittain, jos jaksoa {yy} tai {yyyy} ei ole maskissa. ErrorCantUseRazInStartedYearIfNoYearMonthInMask=Virhe ei voi käyttäjä vaihtoehto @ jos SEQUENCE (yy) (mm) tai (vvvv) (mm) ei mask. UMask=UMask parametri uusia tiedostoja Unix / Linux / BSD-tiedostojärjestelmää. UMaskExplanation=Tämän parametrin avulla voit määrittää käyttöoikeudet asettaa oletuksena tiedostoja luotu Dolibarr palvelimelle (aikana ladata esimerkiksi). <br> Se on oktaali-arvo (esim. 0666 tarkoittaa, lukea ja kirjoittaa kaikki). <br> Ce paramtre ne Sert pas sous un serveur Windows. @@ -366,56 +368,56 @@ SeeWikiForAllTeam=Take a look at the Wiki page for a list of contributors and th UseACacheDelay= Viive cashing vienti vastehuippu sekuntia (0 tai tyhjä ei välimuisti) DisableLinkToHelpCenter=Piilota linkki <b>"Tarvitsetko apua tai tukea"</b> on kirjautumissivulla DisableLinkToHelp=Piilota linkki online apuun "<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...). +AddCRIfTooLong=Automaattista tekstin rivitystä ei ole, liian pitkä teksti ei näy asiakirjoissa. Lisää tarvittaessa teksti-alueelle rivinvaihto. +ConfirmPurge=Haluatko varmasti suorittaa tämän puhdistuksen? <br> Tämä poistaa kaikki datatiedostosi pysyvästi, eikä niitä voi palauttaa (ECM-tiedostot, liitetyt tiedostot ...). MinLength=Vähimmäispituus LanguageFilesCachedIntoShmopSharedMemory=.lang - tiedostot ladattu muistiin LanguageFile=Kielitiedosto -ExamplesWithCurrentSetup=Examples with current configuration +ExamplesWithCurrentSetup=Esimerkkejä nykyisestä kokoonpanosta ListOfDirectories=Luettelo OpenDocument malleja hakemistoja -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=Esimerkkejä syntaksin: <br> c: \\ mydir <br> / Home / mydir <br> DOL_DATA_ROOT / ECM / ecmdir +ListOfDirectoriesForModelGenODT=Luettelo hakemistoista, jotka sisältävät mallitiedostoja OpenDocument-muodossa. <br> <br> Laita tähän hakemistojen täydellinen polku. <br> Lisää rivinvaihto eah-hakemiston välillä. <br> Jos haluat lisätä GED-moduulin hakemiston, lisää tähän <b> DOL_DATA_ROOT/ecm/sinunhakemistonnimi </b>. <br> <br> Näissä hakemistoissa olevien tiedostojen on lopputtava <b> .odt </b> tai <b> .ods </b>. +NumberOfModelFilesFound=Näistä hakemistoista löydettyjen ODT / ODS-mallitiedostojen määrä +ExampleOfDirectoriesForModelGen=Esimerkkejä syntaksista: <br> c:\\myapp\\mydocumentdir\\mysubdir <br> /home/myapp/mydocumentdir/mysubdir <br> DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br> Jos haluat tietää, miten voit luoda odt asiakirjamalleja, ennen kuin laitat ne näistä hakemistoista, lue wiki dokumentaatio: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Etunimi/Sukunimi - sijainti DescWeather=The following images will be shown on the dashboard when the number of late actions reach the following values: KeyForWebServicesAccess=Avain käyttää Web Services (parametri &quot;dolibarrkey&quot; in WebServices) TestSubmitForm=Tulo testi lomake -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=Tämän valikkohallinnan käyttäminen käyttää myös omaa teemaansa käyttäjän valinnasta riippumatta. Tämä älypuhelimille tarkoitettu valikkohallinta ei välttämättä toimi kaikissa älypuhelimissa. Käytä toista valikonhallintaohjelmaa, jos sinulla on ongelmia omasi kanssa. ThemeDir=Skins hakemisto ConnectionTimeout=Yhteyden aikakatkaisu ResponseTimeout=Vastauksen aikakatkaisu SmsTestMessage=Test viesti __ PHONEFROM__ ja __ PHONETO__ -ModuleMustBeEnabledFirst=Module <b>%s</b> must be enabled first if you need this feature. +ModuleMustBeEnabledFirst=Moduuli <b> %s </b> on ensin otettava käyttöön, jos tarvitset tätä ominaisuutta. SecurityToken=Avain turvallinen URL -NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s +NoSmsEngine=Ei tekstiviestien lähettäjien hallintaa. Tekstiviestien lähettäjien hallintaa ei ole asennettu oletusjakelun kanssa, koska ne riippuvat ulkoisesta toimittajasta, mutta joitain löydät osoitteesta %s PDF=PDF -PDFDesc=Global options for PDF generation -PDFAddressForging=Rules for address section +PDFDesc=Globaalit vaihtoehdot PDF-tiedostojen luomista varten +PDFAddressForging=Osoiteosuuden säännöt HideAnyVATInformationOnPDF=Piilota kaikki myyntiveroihin/ALViin liittyvä tieto -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 +PDFRulesForSalesTax=Myyntiveron / alv:n säännöt +PDFLocaltax=Säännöt %s: lle +HideLocalTaxOnPDF=Piilota %s-taksa sarakkeessa Myyntivero / ALV +HideDescOnPDF=Piilota tuotekuvaus +HideRefOnPDF=Piilota tuotteiden viite +HideDetailsOnPDF=Piilota tuoterivien tiedot +PlaceCustomerAddressToIsoLocation=Käytä ranskan vakioasemaa (La Poste) asiakasosoitteen sijaintiin Library=Kirjasto UrlGenerationParameters=Parametrit turvata URL SecurityTokenIsUnique=Käytä ainutlaatuinen securekey parametri jokaiselle URL EnterRefToBuildUrl=Kirjoita viittaus objektin %s GetSecuredUrl=Hanki lasketaan URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +ButtonHideUnauthorized=Piilota luvattomat toimintopainikkeet myös sisäisille käyttäjille (muuten harmaat) OldVATRates=Vanha ALV-prosentti NewVATRates=Uusi ALV-prosentti -PriceBaseTypeToChange=Modify on prices with base reference value defined on +PriceBaseTypeToChange=Muuta hintoja, joiden perusviitearvo on määritelty MassConvert=Käynnistä massamuutos -PriceFormatInCurrentLanguage=Price Format In Current Language +PriceFormatInCurrentLanguage=Hintamuoto nykyisellä kielellä String=Merkkijono -String1Line=String (1 line) +String1Line=Merkkijono (1 rivi) TextLong=Pitkä teksti -TextLongNLines=Long text (n lines) +TextLongNLines=Pitkä teksti (n riviä) HtmlText=Html teksti Int=Kokonaisluku Float=Liukuluku @@ -430,18 +432,18 @@ ExtrafieldSelect = Valitse lista ExtrafieldSelectList = Valitse taulusta ExtrafieldSeparator=Erotin (ei kenttä) ExtrafieldPassword=Salasana -ExtrafieldRadio=Radio buttons (one choice only) +ExtrafieldRadio=Radiopainikkeet (vain yksi valinta) ExtrafieldCheckBox=Valintaruudut -ExtrafieldCheckBoxFromList=Checkboxes from table -ExtrafieldLink=Link to an object -ComputedFormula=Computed field +ExtrafieldCheckBoxFromList=Valintaruudut taulusta +ExtrafieldLink=Linkki objektiin +ComputedFormula=Laskettu kenttä 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) +Computedpersistent=Tallenna laskettu kenttä +ComputedpersistentDesc=Lasketut ylimääräiset kentät tallennetaan tietokantaan, mutta arvo lasketaan uudelleen vasta, kun tämän kentän kohdetta muutetaan. Jos laskettu kenttä riippuu muista kohteista tai globaaleista tiedoista, tämä arvo saattaa olla väärä!! +ExtrafieldParamHelpPassword=Jos jätät tämän kentän tyhjäksi, tämä arvo tallennetaan ilman salausta (kenttä on piilotettava vain tähdellä näytöllä). <br> Aseta 'auto' käyttämään oletussalaussääntöä salasanan tallentamiseksi tietokantaan (silloin luettu arvo on vain hash, ei mitään tapaa hakea alkuperäistä arvoa) 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>... +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 ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath @@ -449,34 +451,34 @@ ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 LibraryToBuildPDF=Käytettävä kirjasto PDF:n luomiseen 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=Tekstiviesti -LinkToTestClickToDial=Enter a phone number to call to show a link to test the ClickToDial url for user <strong>%s</strong> +LinkToTestClickToDial=Anna puhelinnumero, johon haluat soittaa, jotta saat linkin testata käyttäjän ClickToDial-URL-osoitetta <strong> %s </strong> RefreshPhoneLink=Päivitä linkki -LinkToTest=Clickable link generated for user <strong>%s</strong> (click phone number to test) +LinkToTest=Napsautettava linkki luotu käyttäjälle <strong> %s </strong> (testaa napsauttamalla puhelinnumeroa) KeepEmptyToUseDefault=Pidä tyhjänä käyttääksesi oletusarvoa -KeepThisEmptyInMostCases=In most cases, you can keep this field empy. +KeepThisEmptyInMostCases=Useimmissa tapauksissa voit pitää tämän kentän tyhjänä. DefaultLink=Oletuslinkki SetAsDefault=Aseta oletukseksi -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 +ValueOverwrittenByUserSetup=Varoitus, käyttäjäkohtainen asennus voi korvata tämän arvon (jokainen käyttäjä voi asettaa oman clicktodial-URL-osoitteen) +ExternalModule=Ulkoinen moduuli +InstalledInto=Asennettu hakemistoon %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=Poista kaikki nykyiset viivakoodi arvot -ConfirmEraseAllCurrentBarCode=Are you sure you want to erase all current barcode values? +ConfirmEraseAllCurrentBarCode=Haluatko varmasti poistaa kaikki nykyiset viivakoodiarvot? AllBarcodeReset=Kaikki viivakoodi arvot on poistettu -NoBarcodeNumberingTemplateDefined=No numbering barcode template enabled in the Barcode module setup. +NoBarcodeNumberingTemplateDefined=Viivakoodimallin numerointia ei ole otettu käyttöön viivakoodimoduulin asetuksissa. 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 +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 -DisplayCompanyManagers=Display manager names +DisplayCompanyManagers=Näytä managerien nimet DisplayCompanyInfoAndManagers=Näytä yrityksen osoite ja päälliköiden nimet 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. +ModuleCompanyCodePanicum=Palauta tyhjä kirjanpitokoodi. 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. @@ -491,26 +493,26 @@ WarningPHPMail2=If your email SMTP provider need to restrict email client to som 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=Klikkaa näyttääksesi kuvaus DependsOn=Tämä moduuli tarvitsee moduulit -RequiredBy=This module is required by module(s) +RequiredBy=Moduuli (t) vaativat tämän moduulin 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=Ota käyttöön oletusarvojen mukauttaminen +EnableOverwriteTranslation=Salli ylikirjoitettujen käännösten käyttäminen 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=Kenttä -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) +ProductDocumentTemplates=Asiakirjamallit tuotedokumentin luomiseksi +FreeLegalTextOnExpenseReports=Ilmainen lakiteksti kuluraporteissa +WatermarkOnDraftExpenseReports=Vesileima kuluraporttiluonnoksissa +AttachMainDocByDefault=Määritä tämä arvoksi 1, jos haluat liittää pääasiakirjan oletuksena sähköpostiin (jos käytettävissä) FilesAttachedToEmail=Liitä tiedosto SendEmailsReminders=Lähetä asialista muistutus sähköpostilla davDescription=WebDAV-palvelimen asetukset DAVSetup=DAV-moduulin asetukset -DAV_ALLOW_PRIVATE_DIR=Enable the generic private directory (WebDAV dedicated directory named "private" - login required) +DAV_ALLOW_PRIVATE_DIR=Ota käyttöön yleinen yksityinen hakemisto (WebDAV: n oma hakemisto nimeltä "yksityinen" - vaaditaan sisäänkirjautuminen) 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). @@ -519,26 +521,26 @@ DAV_ALLOW_ECM_DIRTooltip=The root directory where all files are manually uploade # Modules Module0Name=Käyttäjät & ryhmät Module0Desc=Käyttäjien / Työntekijöiden ja ryhmien hallinta -Module1Name=Third Parties -Module1Desc=Companies and contacts management (customers, prospects...) +Module1Name=Kolmannet osapuolet +Module1Desc=Yritysten ja kontaktien hallinta (asiakkaat, potentiaaliset asiakkaat ...) Module2Name=Kaupalliset Module2Desc=Kaupallinen hallinnointi Module10Name=Kirjanpito (yksinkertainen) -Module10Desc=Simple accounting reports (journals, turnover) based on database content. Does not use any ledger table. +Module10Desc=Yksinkertaiset kirjanpitoraportit (päiväkirjat, liikevaihto) tietokannan sisällön perusteella. Ei käytä mitään kirjanpitotaulukkoa. Module20Name=Ehdotukset Module20Desc=Kaupalliset ehdotuksia hallinto - -Module22Name=Mass Emailings +Module22Name=Joukkoviestit Module22Desc=Manage bulk emailing Module23Name=Energia Module23Desc=Energiakulutuksen seuranta Module25Name=Myyntitilaukset Module25Desc=Asiakastilausten hallinnointi Module30Name=Laskut -Module30Desc=Management of invoices and credit notes for customers. Management of invoices and credit notes for suppliers +Module30Desc=Asiakkaiden laskujen ja hyvityslaskujen hallinta. Tavarantoimittajien laskujen ja hyvityslaskujen hallinta Module40Name=Toimittajat -Module40Desc=Vendors and purchase management (purchase orders and billing of supplier invoices) +Module40Desc=Toimittajien ja ostojen hallinta (ostotilaukset ja toimittajien laskutus) Module42Name=Debug Logit -Module42Desc=Logging facilities (file, syslog, ...). Such logs are for technical/debug purposes. +Module42Desc=Kirjaustoiminnot (tiedosto, syslog, ...). Tällaiset lokit ovat teknisiä/virheenkorjaustarkoituksia varten. Module49Name=Toimitus Module49Desc=Editors' hallinta Module50Name=Tuotteet @@ -550,27 +552,27 @@ Module52Desc=Varastonhallinta Module53Name=Palvelut Module53Desc=Palvelunhallinta Module54Name=Sopimukset/Tilaukset -Module54Desc=Management of contracts (services or recurring subscriptions) +Module54Desc=Sopimusten hallinta (palvelut tai toistuvat tilaukset) Module55Name=Viivakoodit Module55Desc=Viivakoodien hallinta -Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Payments by Direct Debit -Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. +Module56Name=Maksu tilisiirrolla +Module56Desc=Toimittajien maksujen hallinta tilisiirtotilauksilla. Se sisältää SEPA-tiedoston luomisen Euroopan maille. +Module57Name=Maksut suoraveloituksella +Module57Desc=Suoraveloitusmääräysten hallinta. Se sisältää SEPA-tiedoston luomisen Euroopan maille. Module58Name=ClickToDial Module58Desc=ClickToDial yhdentyminen -Module60Name=Stickers -Module60Desc=Management of stickers +Module60Name=Tarrat +Module60Desc=Tarrojen hallinta Module70Name=Interventions Module70Desc=Interventions hallinto Module75Name=Kulut ja matka muistiinpanot Module75Desc=Kulut ja matkat muistiinpanojen hallinnointi Module80Name=Lähetykset -Module80Desc=Shipments and delivery note management +Module80Desc=Lähetykset ja lähetysluetteloiden hallinta Module85Name=Pankkitilit ja käteisvarat Module85Desc=Pankkitilien ja käteistilien hallinnointi Module100Name=Ulkoinen sivusto -Module100Desc=Add a link to an external website as a main menu icon. Website is shown in a frame under the top menu. +Module100Desc=Lisää linkki ulkoiseen verkkosivustoon päävalikkokuvakkeena. Verkkosivusto näkyy kehyksessä ylävalikossa. Module105Name=Mailman ja SIP Module105Desc=Mailman tai spip liitäntä jäsen moduuli Module200Name=LDAP @@ -578,20 +580,20 @@ Module200Desc=LDAP-hakemiston synkronointi Module210Name=PostNuke Module210Desc=PostNuke yhdentyminen Module240Name=Tietojen vienti -Module240Desc=Tool to export Dolibarr data (with assistance) +Module240Desc=Työkalu Dolibarr-tietojen viemiseen (avustuksella) Module250Name=Tietojen tuonti -Module250Desc=Tool to import data into Dolibarr (with assistance) +Module250Desc=Työkalu tietojen tuomiseen Dolibarriin (avustuksella) Module310Name=Jäsenet Module310Desc=Säätiön jäsenten hallintaan Module320Name=RSS-syöte -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 +Module320Desc=Lisää RSS-syöte Dolibarr-sivuille +Module330Name=Kirjanmerkit ja pikavalinnat +Module330Desc=Luo aina käytettävissä olevia pikakuvakkeita sisäisille tai ulkoisille sivuille, joilla käyt usein +Module400Name=Projektit tai liidit 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 yhdentyminen -Module500Name=Taxes & Special Expenses +Module500Name=Verot ja erityiskustannukset Module500Desc=Management of other expenses (sale taxes, social or fiscal taxes, dividends, ...) Module510Name=Palkat Module510Desc=Record and track employee payments @@ -600,14 +602,14 @@ 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=Product Variants +Module610Name=Tuotevaihtoehdot Module610Desc=Creation of product variants (color, size etc.) Module700Name=Lahjoitukset Module700Desc=Lahjoituksien hallinnointi -Module770Name=Expense Reports +Module770Name=Kuluraportit Module770Desc=Manage expense reports claims (transportation, meal, ...) -Module1120Name=Vendor Commercial Proposals -Module1120Desc=Request vendor commercial proposal and prices +Module1120Name=Toimittajan kaupalliset ehdotukset +Module1120Desc=Pyydä myyjän kaupallista ehdotusta ja hintoja Module1200Name=Mantis Module1200Desc=Mantis yhdentyminen Module1520Name=Dokumentin luonti @@ -615,7 +617,7 @@ Module1520Desc=Mass email document generation Module1780Name=Merkit/Kategoriat Module1780Desc=Luo merkki/kategoria (tuotteet, asiakkaat, toimittajat, kontaktit tai jäsenet) Module2000Name=FCKeditor -Module2000Desc=Allow text fields to be edited/formatted using CKEditor (html) +Module2000Desc=Salli tekstikenttien muokkaaminen / alustaminen CKEditorilla (html) Module2200Name=Dynaamiset Hinnat Module2200Desc=Use maths expressions for auto-generation of prices Module2300Name=Ajastetut työt @@ -624,11 +626,11 @@ 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) +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.) Module2700Name=Gravatar Module2700Desc=Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Needs Internet access @@ -645,8 +647,8 @@ Module6000Name=Työtehtävät Module6000Desc=Workflow management (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=Leave Request Management -Module20000Desc=Define and track employee leave requests +Module20000Name=Poissaolopyyntöjen hallinta +Module20000Desc=Määrittele ja seuraa työntekijöiden poissaolopyyntöjä Module39000Name=Product Lots Module39000Desc=Lots, serial numbers, eat-by/sell-by date management for products Module40000Name=Multicurrency @@ -668,7 +670,7 @@ Module54000Desc=Direct print (without opening the documents) using Cups IPP inte Module55000Name=Vaalit, Kysely vai Äänestys Module55000Desc=Create online polls, surveys or votes (like Doodle, Studs, RDVz etc...) Module59000Name=Katteet -Module59000Desc=Moduuli katteiden hallintaan +Module59000Desc=Module to follow margins Module60000Name=Komissiot Module60000Desc=Moduuli komissioiden hallintaan Module62000Name=Incoterm-ehdot @@ -747,17 +749,17 @@ Permission142=Create/modify all projects and tasks (also private projects for wh Permission144=Delete all projects and tasks (also private projects i am not contact for) Permission146=Lue tarjoajien Permission147=Lue stats -Permission151=Read direct debit payment orders -Permission152=Create/modify a direct debit payment orders -Permission153=Send/Transmit direct debit payment orders +Permission151=Lue suoraveloitusmaksumääräykset +Permission152=Luo / muokkaa suoraveloituksen maksumääräyksiä +Permission153=Lähetä / välitä suoraveloitusmaksumääräyksiä 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 +Permission161=Lue sopimukset / tilaukset +Permission162=Luo / muokkaa sopimuksia / tilauksia +Permission163=Aktivoi palvelu / tilaus sopimukselle +Permission164=Poista palvelu / tilaus sopimukselta käytöstä +Permission165=Poista sopimuksia / tilauksia Permission167=Vie Sopimukset -Permission171=Read trips and expenses (yours and your subordinates) +Permission171=Lue matkat ja kulut (omat ja alaisten) Permission172=Luo/muuta matkat ja kulut Permission173=Poista matkat ja kulut Permission174=Lue kaikki Matkat ja kulut @@ -765,12 +767,12 @@ Permission178=Vie matkat ja kulut Permission180=Lue toimittajat Permission181=Lue ostotilaukset Permission182=Luo/Muokkaa ostotilauksia -Permission183=Validate purchase orders +Permission183=Vahvista ostotilaukset Permission184=Hyväksy ostotilaukset -Permission185=Order or cancel purchase orders -Permission186=Receive purchase orders -Permission187=Close purchase orders -Permission188=Cancel purchase orders +Permission185=Tilaa tai peruuta ostotilaukset +Permission186=Vastaanota ostotilauksia +Permission187=Sulje ostotilaukset +Permission188=Peruuta ostotilaukset Permission192=Luo rivit Permission193=Peruuta rivit Permission194=Read the bandwidth lines @@ -788,7 +790,7 @@ Permission221=Lue emailings Permission222=Luoda / muuttaa emailings (aihe, vastaanottajat ...) Permission223=Validate emailings (avulla lähetys) Permission229=Poista emailings -Permission237=View recipients and info +Permission237=Näytä vastaanottajat ja tiedot Permission238=Manuaalinen viestien lähetys Permission239=Delete mailings after validation or sent Permission241=Lue tuoteryhmät @@ -818,7 +820,7 @@ Permission300=Lue viivakoodit Permission301=Luo/Muokkaa viivakoodeja Permission302=Poista viivakoodeja Permission311=Lue palvelut -Permission312=Assign service/subscription to contract +Permission312=Määritä palvelu / tilaus sopimukseen Permission331=Lue kirjanmerkit Permission332=Luoda / muuttaa kirjanmerkkejä Permission333=Poista kirjanmerkkien @@ -835,11 +837,11 @@ Permission401=Lue alennukset Permission402=Luoda / muuttaa alennukset Permission403=Validate alennukset Permission404=Poista alennukset -Permission430=Use Debug Bar -Permission511=Read payments of salaries (yours and subordinates) +Permission430=Käytä virheenkorjauspalkkia +Permission511=Lue palkkamaksut (omat ja alaisten) Permission512=Luo/Muokkaa palkanmaksuja Permission514=Poista palkanmaksuja -Permission517=Read payments of salaries of everybody +Permission517=Lue kaikkien palkkamaksut Permission519=Vie palkat Permission520=Lue Lainat Permission522=Luo/muokkaa Lainat @@ -861,9 +863,9 @@ Permission609=Delete stickers Permission650=Lue materiaaliluettelo Permission651=Luo/päivitä materiaaliluettelo Permission652=Poista materiaaliluettelo -Permission660=Read Manufacturing Order (MO) -Permission661=Create/Update Manufacturing Order (MO) -Permission662=Delete Manufacturing Order (MO) +Permission660=Lue valmistustilaus (MO) +Permission661=Luo / päivitä valmistustilaus (MO) +Permission662=Poista valmistustilaus (MO) Permission701=Lue lahjoitukset Permission702=Luoda / muuttaa lahjoitusten Permission703=Poista lahjoitukset @@ -873,40 +875,40 @@ Permission773=Poista kuluraportit Permission774=Read all expense reports (even for user not subordinates) Permission775=Hyväksy kuluraportit Permission776=Maksa kuluraportit -Permission777=Read expense reports of everybody -Permission778=Create/modify expense reports of everybody +Permission777=Lue kaikkien kuluraportit +Permission778=Luo / muokkaa kaikkien kuluraportteja Permission779=Kuluraporttien vienti Permission1001=Lue varastot Permission1002=Luo/muuta varastoja Permission1003=Poista varastoja Permission1004=Lue varastossa liikkeitä Permission1005=Luoda / muuttaa varastossa liikkeitä -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=Lue toimituskuitit +Permission1102=Luo / muokkaa toimituskuitteja +Permission1104=Vahvista toimituskuitit +Permission1109=Poista toimituskuitit +Permission1121=Lue toimittajan ehdotukset +Permission1122=Luo / muokkaa toimittajan ehdotuksia +Permission1123=Vahvista toimittajan ehdotukset +Permission1124=Lähetä toimittajan ehdotuksia +Permission1125=Poista toimittajan ehdotukset +Permission1126=Sulje toimittajan hintapyynnöt Permission1181=Lue toimittajat Permission1182=Lue ostotilaukset Permission1183=Luo/Muokkaa ostotilauksia -Permission1184=Validate purchase orders +Permission1184=Vahvista ostotilaukset Permission1185=Hyväksy ostotilaukset Permission1186=Lähetä ostotilaukset Permission1187=Tilausvahvistus Permission1188=Poista ostotilaus -Permission1189=Check/Uncheck a purchase order reception +Permission1189=Valitse / poista valinta ostotilauksen vastaanotolta Permission1190=Hyväksy (toinen vaihe) ostotilaukset -Permission1191=Export supplier orders and their attributes +Permission1191=Vie toimittajan tilaukset ja niiden määritteet Permission1201=Hanki seurauksena vienti Permission1202=Luo / Muuta vienti Permission1231=Lue toimittajien laskut Permission1232=Luo/Muokkaa toimittajien laskuja -Permission1233=Validate vendor invoices +Permission1233=Vahvista myyjän laskut Permission1234=Poista toimittajien laskuja Permission1235=Lähetä toimittajien laskut sähköpostilla Permission1236=Export vendor invoices, attributes and payments @@ -915,8 +917,8 @@ Permission1251=Suorita massa tuonnin ulkoisten tiedot tietokantaan (tiedot kuorm Permission1321=Vienti asiakkaan laskut, ominaisuudet ja maksut Permission1322=Avaa uudelleen maksettu lasku Permission1421=Export sales orders and attributes -Permission1521=Read documents -Permission1522=Delete documents +Permission1521=Lue asiakirjat +Permission1522=Poista asiakirjat 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) @@ -931,41 +933,41 @@ Permission2515=Asiakirjojen hakemistoasetukset Permission2801=Käytä FTP ohjelmaa lukutilassa (vain selain ja lataukset) Permission2802=Käytä FTP ohjelmaa kirjoitustilassa (poista tai päivitä tiedostot) Permission3200=Read archived events and fingerprints -Permission3301=Generate new modules +Permission3301=Luo uusia moduuleja Permission4001=Selaa työntekijöitä Permission4002=Luo työntekijä Permission4003=Poista työntekijöitä Permission4004=Työntekijän tietojen vienti -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) +Permission10001=Lue verkkosivuston sisältö +Permission10002=Luo / muokkaa verkkosivuston sisältöä (HTML- ja Javascript-sisältö) +Permission10003=Luo / muokkaa verkkosivuston sisältöä (dynaaminen php-koodi). Vaarallinen, on varattava rajoitetuille kehittäjille. +Permission10005=Poista verkkosivuston sisältö +Permission20001=Lue poissaolopyynnöt (omat ja alaisten poissaolot) +Permission20002=Luo / muokkaa poissaolopyyntöjäsi (omat ja alaisten poissaolot) Permission20003=Poista poissaolopyynnöt -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) +Permission20004=Lue kaikki poissaolopyynnöt (myös käyttäjien, jotka eivät ole alaisiasi) +Permission20005=Luo / muokkaa kaikkien poissaolopyyntöjä (myös käyttäjien, jotka eivät ole alaisiasi) +Permission20006=Poissaolopyyntöjen hallinnointi (saldojen määritys ja päivitys) Permission20007=Hyväksy poissaolopyynnöt Permission23001=Selaa ajastetut työt Permission23002=Luo/päivitä Ajastettu työ Permission23003=Poista Ajastettu työ Permission23004=Suorita Ajastettu työ -Permission50101=Use Point of Sale (SimplePOS) -Permission50151=Use Point of Sale (TakePOS) +Permission50101=Käytä myyntipistettä (SimplePOS) +Permission50151=Käytä myyntipistettä (TakePOS) Permission50201=Lue liiketoimet Permission50202=Tuo liiketoimet -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 +Permission50330=Lue Zapier-kohteet +Permission50331=Luo / päivitä Zapier-kohteita +Permission50332=Poista Zapier-kohteita +Permission50401=Liitä tuotteet ja laskut kirjanpitotileihin +Permission50411=Lue toiminnot tilikirjasta +Permission50412=Kirjoitus- / muokkaustoiminnot tilikirjaan +Permission50414=Poista toiminnot tilikirjasta +Permission50415=Poista kaikki toiminnot vuoden ja päiväkirjan mukaan tilikirjasta 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. +Permission50430=Määritä tilikaudet. Vahvista liiketoimet ja sulje tilikaudet. Permission50440=Manage chart of accounts, setup of accountancy Permission51001=Read assets Permission51002=Create/Update assets @@ -977,21 +979,21 @@ Permission55002=Luo/muokkaa äänestys Permission59001=Read commercial margins Permission59002=Define commercial margins Permission59003=Read every user margin -Permission63001=Read resources -Permission63002=Create/modify resources -Permission63003=Delete resources +Permission63001=Lue resursseja +Permission63002=Luo / muokkaa resursseja +Permission63003=Poista resurssit Permission63004=Link resources to agenda events -Permission64001=Allow direct printing -Permission67000=Allow printing of receipts +Permission64001=Salli suora tulostus +Permission67000=Salli kuittien tulostus 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 +Permission941601=Lue kuitit +Permission941602=Luo ja muokkaa kuitteja +Permission941603=Vahvista kuitit +Permission941604=Lähetä kuitit sähköpostitse +Permission941605=Vie kuitit +Permission941606=Poista kuitit DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities DictionaryProspectLevel=Prospect potential level for companies @@ -1225,17 +1227,17 @@ SeeLocalSendMailSetup=Katso paikallisen 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. +BackupDescX=Arkistoitu hakemisto tulisi tallentaa turvalliseen paikkaan. BackupDescY=Luotu dump tiedosto on säilytettävä turvallisessa paikassa. -BackupPHPWarning=Backup cannot be guaranteed with this method. Previous one recommended. -RestoreDesc=To restore a Dolibarr backup, two steps are required. +BackupPHPWarning=Varmuuskopiointia ei voida taata tällä menetelmällä. Edellinen suositeltava. +RestoreDesc=Dolibarr-varmuuskopion palauttaminen edellyttää kahta vaihetta. 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 vienti ForcedToByAModule=Tämä sääntö on <b>pakko %s</b> on aktivoitu moduuli -ValueIsForcedBySystem=This value is forced by the system. You can't change it. +ValueIsForcedBySystem=Järjestelmä pakottaa tämän arvon. Et voi muuttaa sitä. PreviousDumpFiles=Olemassa olevat varmuuskopiot -PreviousArchiveFiles=Existing archive files +PreviousArchiveFiles=Olemassa olevat arkistotiedostot WeekStartOnDay=Ensimmäinen viikonpäivä RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be required (Program version %s differs from Database version %s) YouMustRunCommandFromCommandLineAfterLoginToUser=Sinun on suoritettava tämä komento komentoriviltä jälkeen kirjautua kuori käyttäjän <b>%s.</b> @@ -1253,8 +1255,8 @@ 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. -ExternalAccess=External/Internet Access -MAIN_PROXY_USE=Use a proxy server (otherwise access is direct to the internet) +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 @@ -1294,11 +1296,11 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo 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> +TitleNumberOfActivatedModules=Aktivoidut moduulit +TotalNumberOfActivatedModules=Aktivoidut moduulit: <b> %s </b> / <b> %s </b> YouMustEnableOneModule=Sinulla pitää olla ainakin 1 moduuli käytössä -ClassNotFoundIntoPathWarning=Class %s not found in PHP path -YesInSummer=Yes in summer +ClassNotFoundIntoPathWarning=Luokkaa %s ei löydy PHP-polusta +YesInSummer=Kyllä kesällä 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 @@ -1306,12 +1308,12 @@ 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=Hakuoptimointi -YouHaveXObjectUseSearchOptim=You have %s %s in the database. You should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. +BrowserIsOK=Käytät verkkoselainta %s. Tämä selain on turvallisuuden ja suorituskyvyn kannalta ok. +BrowserIsKO=Käytät verkkoselainta %s. Tämän selaimen tiedetään olevan huono valinta turvallisuden, suorituskyvyn ja luotettavuuden kannalta. Suosittelemme Firefoxin, Chromen, Operan tai Safarin käyttöä. PHPModuleLoaded=PHP:n laajennus %sladattu -PreloadOPCode=Preloaded OPCode is used +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". @@ -1319,21 +1321,21 @@ AskForPreferredShippingMethod=Ask for preferred shipping method for Third Partie FieldEdition=Alalla painos %s FillThisOnlyIfRequired=Example: +2 (fill only if timezone offset problems are experienced) GetBarCode=Hanki viivakoodi -NumberingModules=Numbering models -DocumentModules=Document models +NumberingModules=Numerointimallit +DocumentModules=Asiakirjamallit ##### 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 +PasswordGenerationNone=Älä ehdota luotua salasanaa. Salasana on kirjoitettava manuaalisesti. +PasswordGenerationPerso=Palauta salasana henkilökohtaisesti määrittämäsi kokoonpanon mukaan. +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 UsersSetup=Käyttäjät moduuli 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 +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) +UsersDocModules=Asiakirjamallit käyttäjän tietueesta luotuihin asiakirjoihin GroupsDocModules=Document templates for documents generated from a group record ##### HRM setup ##### HRMSetup=Henkilöstöhallinta moduulin asetukset @@ -1342,13 +1344,13 @@ CompanySetup=Yritykset moduulin asetukset 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,...) +NotificationsDescUser=* käyttäjää kohden, yksi käyttäjä kerrallaan. +NotificationsDescContact=* kolmansien osapuolten yhteystietoja (asiakkaita tai toimittajia) kohti, yksi yhteyshenkilö kerrallaan. +NotificationsDescGlobal=* tai asettamalla yleiset sähköpostiosoitteet tälle asetussivulle. +ModelModules=Asiakirjamallit +DocumentModelOdt=Luo asiakirjoja OpenDocument-malleista (.ODT / .ODS-tiedostot LibreOffice, OpenOffice, KOffice, TextEdit, ...) WatermarkOnDraft=Vesileima asiakirjaluonnos -JSOnPaimentBill=Activate feature to autofill payment lines on payment form +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) ? @@ -1389,7 +1391,7 @@ 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 +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 ##### Orders ##### @@ -1500,23 +1502,23 @@ LDAPSetupForVersion2=LDAP-palvelin määritetty versio 2 LDAPDolibarrMapping=Dolibarr Mapping LDAPLdapMapping=LDAP Mapping LDAPFieldLoginUnix=Login (unix) -LDAPFieldLoginExample=Example: uid +LDAPFieldLoginExample=Esimerkki: uid LDAPFilterConnection=Hakusuodatin -LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPFilterConnectionExample=Esimerkki: &(objectClass=inetOrgPerson) LDAPFieldLoginSamba=Login (samba, activedirectory) -LDAPFieldLoginSambaExample=Example: samaccountname +LDAPFieldLoginSambaExample=Esimerkki: samaccountname LDAPFieldFullname=Koko nimi -LDAPFieldFullnameExample=Example: cn +LDAPFieldFullnameExample=Esimerkki: cn LDAPFieldPasswordNotCrypted=Salaamaton salasana LDAPFieldPasswordCrypted=Salattu salasana -LDAPFieldPasswordExample=Example: userPassword -LDAPFieldCommonNameExample=Example: cn +LDAPFieldPasswordExample=Esimerkki: userPassword +LDAPFieldCommonNameExample=Esimerkki: cn LDAPFieldName=Nimi -LDAPFieldNameExample=Example: sn +LDAPFieldNameExample=Esimerkki: sn LDAPFieldFirstName=Etunimi -LDAPFieldFirstNameExample=Example: givenName +LDAPFieldFirstNameExample=Esimerkki: givenName LDAPFieldMail=Sähköpostiosoite -LDAPFieldMailExample=Example: mail +LDAPFieldMailExample=Esimerkki: mail LDAPFieldPhone=Työpuhelin LDAPFieldPhoneExample=Example: telephonenumber LDAPFieldHomePhone=Henkilökohtainen puhelin @@ -1585,26 +1587,31 @@ 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) +DefaultCreateForm=Oletusarvot (käytettäväksi lomakkeissa) DefaultSearchFilters=Oletus hakusuodattimet DefaultSortOrder=Default sort orders DefaultFocus=Default focus fields -DefaultMandatory=Mandatory form fields +DefaultMandatory=Pakolliset lomakekentät ##### Products ##### ProductSetup=Tuotteet Moduuli setup ServiceSetup=Services-moduuli asennus ProductServiceSetup=Tuotteet ja palvelut moduulien asennus -NumberOfProductShowInSelect=Maximum number of products to show in combo select lists (0=no limit) +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 +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=Tuotteissa käytetty viivakoodin tyyppi SetDefaultBarcodeTypeThirdParties=Kolmansien osapuolien käyttämä viivakoodityyppi (oletus) 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 +ProductOtherConf= Tuotteen / palvelun kokoonpano IsNotADir=ei ole hakemisto! ##### Syslog ##### SyslogSetup=Syslog-moduulin asetukset @@ -1682,14 +1689,14 @@ 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. ##### Menu ##### MenuDeleted=Valikko poistettu -Menu=Menu +Menu=Valikko Menus=Valikot TreeMenuPersonalized=Henkikökohtaiset valikot NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=Uusi valikko MenuHandler=Valikko huolitsijan MenuModule=Lähde moduuli -HideUnauthorizedMenu= Piilota luvaton valikot (harmaa) +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=Id-valikosta DetailMenuHandler=Valikko huolitsijan missä osoittavat uuden valikon DetailMenuModule=Moduulin nimi, jos Valikosta kotoisin moduuli @@ -1780,8 +1787,8 @@ ApiDesc=By enabling this module, Dolibarr become a REST server to provide miscel ApiProductionMode=Enable production mode (this will activate use of a cache for services management) ApiExporerIs=Voit selata ja testata APIs URL-osoitteesta 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. +ApiKey=API-avain +WarningAPIExplorerDisabled=API-selain on poistettu käytöstä. API-selainta ei tarvita API-palvelujen käyttämiseksi. Se on kehittäjän työkalu etsiä / testata REST API-rajapintaa. Jos tarvitset tätä työkalua, siirry moduulin API REST -asetuksiin aktivoidaksesi sen. ##### Bank ##### BankSetupModule=Pankki-moduulin asetukset FreeLegalTextOnChequeReceipts=Free text on check receipts @@ -1901,7 +1908,7 @@ MailToSendShipment=Lähetykset MailToSendIntervention=Interventions MailToSendSupplierRequestForQuotation=Tarjouspyyntö MailToSendSupplierOrder=Ostotilaukset -MailToSendSupplierInvoice=Vendor invoices +MailToSendSupplierInvoice=Toimittajan laskut MailToSendContract=Sopimukset MailToSendReception=Receptions MailToThirdparty=Sidosryhmät @@ -1981,44 +1988,45 @@ EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly NewEmailCollector=Uusi postinkerääjä EMailHost=IMAP-palvelin MailboxSourceDirectory=Sähköpostin lähdehakemisto -MailboxTargetDirectory=Mailbox target directory -EmailcollectorOperations=Operations to do by collector +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 -CollectNow=Collect now +CollectNow=Kerää nyt ConfirmCloneEmailCollector=Are you sure you want to clone the Email collector %s ? -DateLastCollectResult=Date latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 +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 -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 candidature +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) +WithDolTrackingID=Viesti keskustelusta, jonka aloitti ensimmäinen sähköposti, lähetetty Dolibarrista +WithoutDolTrackingID=Viesti keskustelusta, jonka aloitti ensimmäinen sähköposti, EI lähetetty Dolibarrista +WithDolTrackingIDInMsgId=Viesti lähetetty Dolibarrista +WithoutDolTrackingIDInMsgId=Viestiä EI lähetetty Dolibarrista +CreateCandidature=Luo työhakemus FormatZip=Postinumero -MainMenuCode=Menu entry code (mainmenu) -ECMAutoTree=Show automatic ECM tree +MainMenuCode=Valikkokoodi (päävalikko) +ECMAutoTree=Näytä automaattinen ECM-puu 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=Aukioloajat OpeningHoursDesc=Yrityksen tavalliset aukioloajat -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 +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 -ConfirmUnactivation=Confirm module reset -OnMobileOnly=On small screen (smartphone) only +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. @@ -2032,17 +2040,17 @@ 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 +DebugBar=Virheenkorjauspalkki DebugBarDesc=Toolbar that comes with a plenty of tools to simplify debugging -DebugBarSetup=DebugBar Setup -GeneralOptions=General Options +DebugBarSetup=Virheenkorjauspalkin asetukset +GeneralOptions=Yleiset asetukset LogsLinesNumber=Number of lines to show on logs tab -UseDebugBar=Use the debug bar +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 -IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. -AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +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 ExportSetup=Vienti-moduulin asetukset ImportSetup=Setup of module Import @@ -2070,16 +2078,20 @@ PDF_USE_ALSO_LANGUAGE_CODE=If you want to have some texts in your PDF duplicated 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 RssNote=Note: Each RSS feed definition provides a widget that you must enable to have it available in dashboard -JumpToBoxes=Jump to Setup -> Widgets +JumpToBoxes=Siirry kohtaan Asetukset -> Widgetit 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=Malli lisätty +TemplateUpdated=Malli päivitetty +TemplateDeleted=Malli poistettu MailToSendEventPush=Event reminder email -SwitchThisForABetterSecurity=Switching this value to %s is recommended for more security +SwitchThisForABetterSecurity=Tämän arvon vaihtamista arvoon %s suositellaan turvallisuuden lisäämiseksi 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. +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ä. +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 diff --git a/htdocs/langs/fi_FI/banks.lang b/htdocs/langs/fi_FI/banks.lang index ef24faa1c72..7d3b78bdd23 100644 --- a/htdocs/langs/fi_FI/banks.lang +++ b/htdocs/langs/fi_FI/banks.lang @@ -39,7 +39,7 @@ StandingOrders=Direct debit orders StandingOrder=Suoraveloitus tilaus PaymentByDirectDebit=Payment by direct debit PaymentByBankTransfers=Payments by credit transfer -PaymentByBankTransfer=Payment by credit transfer +PaymentByBankTransfer=Maksu tilisiirrolla AccountStatement=Tiliote AccountStatementShort=Laskelma AccountStatements=Tiliotteet @@ -173,10 +173,11 @@ SEPAMandate=SEPA mandate 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/fi_FI/bills.lang b/htdocs/langs/fi_FI/bills.lang index 398c7d7aae4..765ef285f83 100644 --- a/htdocs/langs/fi_FI/bills.lang +++ b/htdocs/langs/fi_FI/bills.lang @@ -3,7 +3,7 @@ Bill=Lasku Bills=Laskut BillsCustomers=Asiakkaiden laskut BillsCustomer=Asiakas lasku -BillsSuppliers=Vendor invoices +BillsSuppliers=Toimittajan laskut BillsCustomersUnpaid=Asiakkaiden maksamattomat laskut BillsCustomersUnpaidForCompany=Asiakkaiden maksamattomat laskut %s BillsSuppliersUnpaid=Maksamattomat toimittajien laskut @@ -469,7 +469,7 @@ LawApplicationPart2=tavaroiden omistusoikeus säilyy LawApplicationPart3=the seller until full payment of LawApplicationPart4=niiden hinta. LimitedLiabilityCompanyCapital=SARL, pääoma -UseLine=Apply +UseLine=Käytä UseDiscount=Käytä edullisista UseCredit=Käytä luotto UseCreditNoteInInvoicePayment=Vähentää maksua tämän menoilmoitus @@ -531,6 +531,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) @@ -575,3 +576,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/fi_FI/blockedlog.lang b/htdocs/langs/fi_FI/blockedlog.lang index f9a07298706..6e6393f5cd1 100644 --- a/htdocs/langs/fi_FI/blockedlog.lang +++ b/htdocs/langs/fi_FI/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/fi_FI/boxes.lang b/htdocs/langs/fi_FI/boxes.lang index a63ed303fb5..896e6895a4f 100644 --- a/htdocs/langs/fi_FI/boxes.lang +++ b/htdocs/langs/fi_FI/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=Latest %s modified donations BoxTitleLastModifiedExpenses=Viimeisimmät %s muokatut matka- ja kuluraportit BoxTitleLatestModifiedBoms=Latest %s modified BOMs BoxTitleLatestModifiedMos=Latest %s modified Manufacturing Orders +BoxTitleLastOutstandingBillReached=Customers with maximum outstanding exceeded BoxGlobalActivity=Yleisaktiviteetit (laskut, ehdotukset, tilaukset) BoxGoodCustomers=Hyvät asiakkaat BoxTitleGoodCustomers=%s Hyvät asiakkaat +BoxScheduledJobs=Ajastetut työt +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Failed to refresh RSS flux. Latest successful refresh date: %s LastRefreshDate=Latest refresh date NoRecordedBookmarks=Kirjanmerkkejä ei ole määritelty. @@ -92,8 +95,8 @@ LastXMonthRolling=The latest %s month rolling ChooseBoxToAdd=Lisää dashboardiin BoxAdded=Lisätty dashboardiin BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users) -BoxLastManualEntries=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Viimeisimmät asiakastoimitukset BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages AccountancyHome=Kirjanpito +ValidatedProjects=Validated projects diff --git a/htdocs/langs/fi_FI/cashdesk.lang b/htdocs/langs/fi_FI/cashdesk.lang index 3cb4a43d36f..a00a6ea22e5 100644 --- a/htdocs/langs/fi_FI/cashdesk.lang +++ b/htdocs/langs/fi_FI/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=Nb laskuista Paymentnumpad=Type of Pad to enter payment Numberspad=Numbers Pad @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -108,7 +109,7 @@ MainTemplateToUse=Main template to use OrderTemplateToUse=Order template to use BarRestaurant=Bar Restaurant AutoOrder=Order by the customer himself -RestaurantMenu=Menu +RestaurantMenu=Valikko CustomerMenu=Customer menu ScanToMenu=Scan QR code to see the menu ScanToOrder=Scan QR code to order @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/fi_FI/categories.lang b/htdocs/langs/fi_FI/categories.lang index 371a1c6cbb7..8738530c575 100644 --- a/htdocs/langs/fi_FI/categories.lang +++ b/htdocs/langs/fi_FI/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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=Täydentävät ominaisuudet CategoriesSetup=Tags/categories setup diff --git a/htdocs/langs/fi_FI/companies.lang b/htdocs/langs/fi_FI/companies.lang index a542eed8fcc..9501c740d2c 100644 --- a/htdocs/langs/fi_FI/companies.lang +++ b/htdocs/langs/fi_FI/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Tarkasta ALV-tunnus E.U: n sivuilta VATIntraManualCheck=Voit tehdä tarkastuksen myös käsin E.U: n sivuilla <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=Tarkistaminen ei mahdollista. Jäsenvaltio ei toimita tarkastuspalvelua ( %s). NorProspectNorCustomer=Ei mahdollinen asiakas eikä asiakas -JuridicalStatus=Yritysmuoto +JuridicalStatus=Business entity type Workforce=Workforce Staff=Työntekijät ProspectLevelShort=Potenttiaali diff --git a/htdocs/langs/fi_FI/compta.lang b/htdocs/langs/fi_FI/compta.lang index a4dbebfc263..d75596e0a5b 100644 --- a/htdocs/langs/fi_FI/compta.lang +++ b/htdocs/langs/fi_FI/compta.lang @@ -111,7 +111,7 @@ Refund=Refund SocialContributionsPayments=Social/fiscal taxes payments ShowVatPayment=Näytä arvonlisäveron maksaminen TotalToPay=Yhteensä maksaa -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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=Raportti kolmannen osapuolen IRPF VATReport=Sale tax report VATReportByPeriods=Sale tax report by period +VATReportByMonth=Sale tax report by month VATReportByRates=Sale tax report by rates VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer diff --git a/htdocs/langs/fi_FI/cron.lang b/htdocs/langs/fi_FI/cron.lang index beaef6c9fe0..289befd89cd 100644 --- a/htdocs/langs/fi_FI/cron.lang +++ b/htdocs/langs/fi_FI/cron.lang @@ -6,14 +6,15 @@ Permission23102 = Create/update Scheduled job Permission23103 = Poista Ajastettu työ Permission23104 = Suorita Ajastettu työ # Admin -CronSetup= Ajastettujen tehtävien asetusten hallinta -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=Tai tietyn tehtävän tarkistamiseen ja ajamiseen +CronSetup=Ajastettujen tehtävien asetusten hallinta +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=Turva avain ajastettujen tehtävien ajamiseen URL-sta 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 environement you can use Scheduled task tools 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 @@ -42,10 +43,11 @@ CronModule=Moduuli CronNoJobs=No jobs registered CronPriority=Prioriteetti CronLabel=Etiketti -CronNbRun=Nb. launch -CronMaxRun=Max number launch +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 @@ -56,16 +58,16 @@ CronNote=Kommentti CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Enable +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Poistaa käytöstä 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 exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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=Mistä @@ -76,8 +78,14 @@ 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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +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' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/fi_FI/errors.lang b/htdocs/langs/fi_FI/errors.lang index 90dc974eeeb..df9826daae0 100644 --- a/htdocs/langs/fi_FI/errors.lang +++ b/htdocs/langs/fi_FI/errors.lang @@ -5,8 +5,10 @@ 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 on väärä ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=Kirjaudu %s on jo olemassa. ErrorGroupAlreadyExists=Ryhmän %s on jo olemassa. ErrorRecordNotFound=Levykauppa ei löytynyt. @@ -48,6 +50,7 @@ ErrorFieldsRequired=Jotkin vaaditut kentät eivät ole täytetty. ErrorSubjectIsRequired=The email topic is required ErrorFailedToCreateDir=Luominen epäonnistui hakemiston. Tarkista, että Web-palvelin käyttäjällä on oikeudet kirjoittaa Dolibarr asiakirjat hakemistoon. Jos parametri <b>safe_mode</b> on käytössä tämän PHP, tarkista, että Dolibarr php tiedostot omistaa web-palvelimen käyttäjä (tai ryhmä). ErrorNoMailDefinedForThisUser=Ei postia määritelty tälle käyttäjälle +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=Tätä ominaisuutta tarvitaan JavaScript on aktivoitu työstä. Muuta tämän setup - näyttö. ErrorTopMenuMustHaveAParentWithId0=A-valikosta tyyppi "Alkuun" ei voi olla emo-valikosta. Laita 0 vanhemman valikosta tai valita valikosta tyyppi "vasemmisto". ErrorLeftMenuMustHaveAParentId=A-valikosta tyyppi "vasemmisto" on oltava vanhemman id. @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=This profile name already exists for this export set. ErrorLDAPSetupNotComplete=Dolibarr-LDAP yhteensovitus ei ole täydellinen. ErrorLDAPMakeManualTest=A. LDIF tiedosto on luotu hakemistoon %s. Yritä ladata se manuaalisesti komentoriviltä on enemmän tietoa virheitä. ErrorCantSaveADoneUserWithZeroPercentage=Can't save an action with "status not started" if field "done by" is also filled. -ErrorRefAlreadyExists=Ref käytetään luomista jo olemassa. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/fi_FI/exports.lang b/htdocs/langs/fi_FI/exports.lang index 038bf61ce23..446bb468010 100644 --- a/htdocs/langs/fi_FI/exports.lang +++ b/htdocs/langs/fi_FI/exports.lang @@ -26,6 +26,8 @@ FieldTitle=Kentän nimi NowClickToGenerateToBuildExportFile=Now, select the file format in the combo box and click on "Generate" to build the export file... AvailableFormats=Available Formats LibraryShort=Kirjasto +ExportCsvSeparator=Csv caracter separator +ImportCsvSeparator=Csv caracter separator Step=Vaihe FormatedImport=Import Assistant FormatedImportDesc1=This module allows you to update existing data or add new objects into the database from a file without technical knowledge, using an assistant. @@ -120,7 +122,7 @@ SelectPrimaryColumnsForUpdateAttempt=Select column(s) to use as primary key for UpdateNotYetSupportedForThisImport=Update is not supported for this type of import (only insert) NoUpdateAttempt=No update attempt was performed, only insert ImportDataset_user_1=Users (employees or not) and properties -ComputedField=Computed field +ComputedField=Laskettu kenttä ## filters SelectFilterFields=If you want to filter on some values, just input values here. FilteredFields=Filtered fields @@ -131,3 +133,4 @@ 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/fi_FI/holiday.lang b/htdocs/langs/fi_FI/holiday.lang index 4aaf4300284..960f0f94b94 100644 --- a/htdocs/langs/fi_FI/holiday.lang +++ b/htdocs/langs/fi_FI/holiday.lang @@ -1,7 +1,7 @@ # Dolibarr language file - Source file is en_US - holiday HRM=Henkilöstöhallinta -Holidays=Leave -CPTitreMenu=Leave +Holidays=Poissaolot +CPTitreMenu=Poissaolot MenuReportMonth=Monthly statement MenuAddCP=New leave request NotActiveModCP=You must enable the module Leave to view this page. @@ -110,7 +110,7 @@ UpdateConfCPOK=Updated successfully. Module27130Name= Management of leave requests Module27130Desc= Management of leave requests ErrorMailNotSend=An error occurred while sending email: -NoticePeriod=Notice period +NoticePeriod=Huomautusaika #Messages HolidaysToValidate=Validate leave requests HolidaysToValidateBody=Below is a leave request to validate diff --git a/htdocs/langs/fi_FI/mails.lang b/htdocs/langs/fi_FI/mails.lang index c327a9bc3c9..d0a460d3df8 100644 --- a/htdocs/langs/fi_FI/mails.lang +++ b/htdocs/langs/fi_FI/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Rivi %s tiedosto @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Ilmoitukset -NoNotificationsWillBeSent=Ei sähköposti-ilmoituksia on suunniteltu tähän tapahtumaan ja yritys -ANotificationsWillBeSent=1 ilmoituksesta lähetetään sähköpostitse -SomeNotificationsWillBeSent=%s ilmoitukset lähetetään sähköpostitse -AddNewNotification=Aktivoi uusi sähköposti ilmoitus tavoittelle/tapahtumalle -ListOfActiveNotifications=Luettelo kaikista aktiivisista kohteista / tapahtumista sähköpostin ilmoittamiselle -ListOfNotificationsDone=Listaa kaikki sähköposti-ilmoitukset lähetetään +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=Sähköpostin lähettämisen määritys on asetettu "%s": ksi. Tätä tilaa ei voi käyttää massapostitusten lähettämiseen. MailSendSetupIs2=Sinun on ensin siirryttävä admin-tilillä valikkoon %sHome - Setup - EMails%s parametrin <strong> '%s' </strong> muuttamiseksi käytettäväksi tilassa "%s". Tässä tilassa voit syöttää Internet-palveluntarjoajan antaman SMTP-palvelimen vaatimat asetukset ja käyttää Massa-sähköpostitoimintoa. MailSendSetupIs3=Jos sinulla on kysyttävää SMTP-palvelimen määrittämisestä, voit kysyä osoitteesta %s. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup -Information=Information +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup +Information=Tiedot 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/fi_FI/main.lang b/htdocs/langs/fi_FI/main.lang index a9649731ddb..edbfc59d018 100644 --- a/htdocs/langs/fi_FI/main.lang +++ b/htdocs/langs/fi_FI/main.lang @@ -25,10 +25,12 @@ FormatDateHourTextShort=%d. %b %Y %H.%M FormatDateHourText=%d. %B %Y %H.%M DatabaseConnection=Tietokantayhteys NoTemplateDefined=Tämän tyyliselle sähköpostille ei ole pohjaa saatavilla -AvailableVariables=Available substitution variables +AvailableVariables=Käytettävissä olevat korvaavat muuttujat NoTranslation=Ei käännöstä Translation=Käännös +CurrentTimeZone=Aikavyöhyke PHP (palvelin) EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria NoRecordFound=Tietueita ei löytynyt NoRecordDeleted=Tallennuksia ei poistettu NotEnoughDataYet=Ei tarpeeksi tietoja @@ -52,7 +54,7 @@ ErrorFileNotUploaded=Tiedosto ei ole ladattu. Tarkista, että koko ei ylitä suu ErrorInternalErrorDetected=Virhe havaittu ErrorWrongHostParameter=Väärä vastaanottavan parametri ErrorYourCountryIsNotDefined=Maata ei ole määritetty. Mene Koti-Asetukset-Muokkaa - valikkoon ja lähetä lomake uudestaan -ErrorRecordIsUsedByChild=Failed to delete this record. This record is used by at least one child record. +ErrorRecordIsUsedByChild=Tämän tietueen poistaminen epäonnistui. Tätä tietuetta käyttää ainakin yksi lapsitietue. ErrorWrongValue=Väärä arvo ErrorWrongValueForParameterX=Väärä arvo parametri %s ErrorNoRequestInError=N: o pyynnöstä virhe @@ -65,7 +67,7 @@ ErrorNoVATRateDefinedForSellerCountry=Virhe ei alv määritellään maa ' %s'. ErrorNoSocialContributionForSellerCountry=Virhe, ei sosiaalisia tai fiskaalisia verotyyppejä, jotka on määritelty maata "%s" varten. ErrorFailedToSaveFile=Virhe, ei tallenna tiedosto. 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 +MaxNbOfRecordPerPage=Maks. tietueiden määrä sivua kohden NotAuthorized=Oikeutesi ei riitä tähän toimintoon SetDate=Aseta päivä SelectDate=Valitse päivä @@ -73,32 +75,34 @@ SeeAlso=Katso myös %s SeeHere=Katso täältä ClickHere=Klikkaa tästä Here=Here -Apply=Apply +Apply=Käytä BackgroundColorByDefault=Default taustaväri FileRenamed=Tiedosto on uudelleen nimetty onnistuneesti FileGenerated=Tiedosto luotiin onnistuneesti FileSaved=Tiedosto tallennettiin onnistuneesti FileUploaded=Tiedosto on siirretty onnistuneesti -FileTransferComplete=File(s) uploaded successfully +FileTransferComplete=Tiedosto (t) lähetetty onnistuneesti FilesDeleted=Tiedosto(t) poistettiin onnistuneesti FileWasNotUploaded=Tiedosto on valittu liite mutta ei ollut vielä ladattu. Klikkaa "Liitä tiedosto" tätä. -NbOfEntries=No. of entries +NbOfEntries=Merkintöjen määrä GoToWikiHelpPage=Lue online-ohjeet (tarvitaan Internet-yhteys) GoToHelpPage=Lue auttaa +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Kotisivu RecordSaved=Record tallennettu RecordDeleted=Tallennus poistettu -RecordGenerated=Record generated +RecordGenerated=Tietue luotu LevelOfFeature=Taso ominaisuuksia NotDefined=Ei määritelty DolibarrInHttpAuthenticationSoPasswordUseless=Dolibarrin todennusmoodi on <b> %s </b> konfigurointitiedostossa <b> conf.php </b>. <br> Tämä tarkoittaa, että salasanatietokanta on Dolibarrin ulkopuolinen, joten tämän kentän muuttaminen ei välttämättä vaikuta. Administrator=Administrator Undefined=Määrittelemätön PasswordForgotten=Unohditko salasanasi? -NoAccount=No account? +NoAccount=Ei tiliä? SeeAbove=Katso edellä HomeArea=Koti -LastConnexion=Last login -PreviousConnexion=Previous login +LastConnexion=Viimeisin kirjautuminen +PreviousConnexion=Edellinen kirjautuminen PreviousValue=Edellinen arvo ConnectedOnMultiCompany=Connected on kokonaisuus ConnectedSince=Sidossuhteessa koska @@ -109,7 +113,7 @@ RequestLastAccessInError=Virhe viimeisimmästä tietokannan pääsypyynnöstä ReturnCodeLastAccessInError=Viimeisin tietokannan käyttöoikeuspyyntövirheen palautekoodi InformationLastAccessInError=Tiedot viimeisimmän tietokannan käyttöoikeuspyynnön virheestä DolibarrHasDetectedError=Dolibarr on havaittu tekninen virhe -YouCanSetOptionDolibarrMainProdToZero=You can read log file or set option $dolibarr_main_prod to '0' in your config file to get more information. +YouCanSetOptionDolibarrMainProdToZero=Voit lukea lokitiedoston tai asettaa asetustiedoston $ dolibarr_main_prod arvoksi '0' saadaksesi lisätietoja. InformationToHelpDiagnose=Nämä tiedot voivat olla hyödyllisiä vianmääritystarkoituksiin (voit asettaa vaihtoehdon $ dolibarr_main_prod arvoon '1' poistamaan tällaiset ilmoitukset) MoreInformation=Lisätietoa TechnicalInformation=Tekniset tiedot @@ -121,7 +125,7 @@ PrecisionUnitIsLimitedToXDecimals=Dolibarr oli asetettu raja tarkkuus <b>yksikk DoTest=Testi ToFilter=Suodata NoFilter=Ei suodatinta -WarningYouHaveAtLeastOneTaskLate=Warning, you have at least one element that has exceeded the tolerance time. +WarningYouHaveAtLeastOneTaskLate=Varoitus, sinulla on ainakin yksi elementti, joka on ylittänyt toleranssin ajan. yes=kyllä Yes=Kyllä no=ei @@ -131,7 +135,7 @@ Home=Koti Help=Apu OnlineHelp=Online-ohje PageWiki=Wiki-sivulla -MediaBrowser=Media browser +MediaBrowser=Mediaselain Always=Aina Never=Ei koskaan Under=alle @@ -143,16 +147,16 @@ Activate=Aktivoi Activated=Aktiivihiili Closed=Suljettu Closed2=Suljettu -NotClosed=Not closed +NotClosed=Ei suljettu Enabled=Enabled -Enable=Enable +Enable=Ota käyttöön Deprecated=Käytöstä poistettu Disable=Poistaa käytöstä Disabled=Disabled Add=Lisää AddLink=Lisää linkki RemoveLink=Poista linkki -AddToDraft=Add to draft +AddToDraft=Lisää luonnokseen Update=Päivittää Close=Sulje CloseAs=Aseta tilaksi @@ -161,22 +165,22 @@ Confirm=Vahvista ConfirmSendCardByMail=Do you really want to send the content of this card by mail to <b>%s</b>? Delete=Poistaa Remove=Poista -Resiliate=Terminate +Resiliate=Lopeta Cancel=Peruuta Modify=Muokkaa Edit=Muokkaa Validate=Vahvista ValidateAndApprove=Vahvista ja hyväksy ToValidate=Validoida -NotValidated=Not validated +NotValidated=Ei vahvistettu Save=Tallenna SaveAs=Tallenna nimellä -SaveAndStay=Save and stay -SaveAndNew=Save and new +SaveAndStay=Tallenna ja pysy sivulla +SaveAndNew=Tallenna ja luo uusi TestConnection=Testaa yhteys ToClone=Klooni -ConfirmCloneAsk=Are you sure you want to clone the object <b>%s</b>? -ConfirmClone=Choose data you want to clone: +ConfirmCloneAsk=Haluatko varmasti kloonata objektin <b> %s </b>? +ConfirmClone=Valitse kloonattavat tiedot: NoCloneOptionsSpecified=Ei tietoja kloonata määritelty. Of=ja Go=Mene @@ -194,13 +198,13 @@ Valid=Voimassa Approve=Hyväksy Disapprove=Poista hyväksyntä ReOpen=Avaa uudelleen -Upload=Upload +Upload=Lähetä ToLink=Linkki Select=Valitse -SelectAll=Select all +SelectAll=Valitse kaikki Choose=Valitse Resize=Muuta kokoa -ResizeOrCrop=Resize or Crop +ResizeOrCrop=Muuta kokoa tai rajaa Recenter=Keskitä Author=Laatija User=Käyttäjä @@ -212,7 +216,7 @@ Password=Salasana PasswordRetype=Kirjoitta salasana uudelleen NoteSomeFeaturesAreDisabled=Huomaa, että monet piirteet / modules on poistettu käytöstä tämän esittelyn. Name=Nimi -NameSlashCompany=Name / Company +NameSlashCompany=Nimi / yritys Person=Henkilö Parameter=Parametri Parameters=Parametrit @@ -220,6 +224,7 @@ Value=Arvo PersonalValue=Henkilökohtainen arvo NewObject=Uusi %s NewValue=Uusi arvo +OldValue=Vanha arvo %s CurrentValue=Nykyinen arvo Code=Koodi Type=Tyyppi @@ -258,7 +263,7 @@ Cards=Kortit Card=Kortti Now=Nyt HourStart=Aloitus tunti -Deadline=Deadline +Deadline=Takaraja Date=Päivä DateAndHour=Päivämäärä ja tunti DateToday=Päivämäärä tänään @@ -267,11 +272,11 @@ DateStart=Aloituspäivämäärä DateEnd=Lopetuspäivä DateCreation=Luotu DateCreationShort=Luonti päivämäärä -IPCreation=Creation IP +IPCreation=Luoneen IP DateModification=Muokattu DateModificationShort=Muokattu -IPModification=Modification IP -DateLastModification=Latest modification date +IPModification=Muokkaajan IP +DateLastModification=Viimeisimmän muokkauksen päivämäärä DateValidation=Vahvistettu DateClosing=Suljettu DateDue=Eräpäivä @@ -287,9 +292,9 @@ DatePayment=Maksupäivä DateApprove=Hyväksytään päivämäärä DateApprove2=Hyväksytään päivämäärä (toinen hyväksyntä) RegistrationDate=Rekisteröinti päivämäärä -UserCreation=Creation user -UserModification=Modification user -UserValidation=Validation user +UserCreation=Luonut käyttäjä +UserModification=Muokannut käyttäjä +UserValidation=Vahvistanut käyttäjä UserCreationShort=Creat. user UserModificationShort=Modif. user UserValidationShort=Valid. user @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Moduuli/Applikaatio Modules=Moduulit/Applikaatiot Option=Vaihtoehto +Filters=Filters List=Luettelo FullList=Täydellinen luettelo FullConversation=Full conversation @@ -519,8 +525,8 @@ StatusInterInvoiced=Laskutettu Validated=Vahvistetut ValidatedToProduce=Validated (To produce) Opened=Avoinna -OpenAll=Open (All) -ClosedAll=Closed (All) +OpenAll=Avoimet (kaikki) +ClosedAll=Suljetut (kaikki) New=Uusi Discount=Alennus Unknown=Tuntematon @@ -650,6 +656,7 @@ SupplierPreview=Vendor preview ShowCustomerPreview=Näytä asiakkaan esikatselu ShowSupplierPreview=Show vendor preview RefCustomer=Asiakasviite +InternalRef=Internal ref. Currency=Valuutta InfoAdmin=Tietoja järjestelmänvalvojille Undo=Kumoa @@ -671,13 +678,13 @@ SendMail=Lähetä sähköpostia Email=Sähköposti NoEMail=Ei sähköpostia AlreadyRead=Already read -NotRead=Not read +NotRead=Lukematon NoMobilePhone=Ei matkapuhelinta Owner=Omistaja FollowingConstantsWillBeSubstituted=Seuraavat vakiot voidaan korvata ja vastaava arvo. Refresh=Päivitä BackToList=Palaa luetteloon -BackToTree=Back to tree +BackToTree=Takaisin puuhun GoBack=Mene takaisin CanBeModifiedIfOk=Voidaan muuttaa, jos voimassa CanBeModifiedIfKo=Voidaan muuttaa, jos ei kelpaa @@ -685,9 +692,9 @@ ValueIsValid=Arvo on voimassa ValueIsNotValid=Arvo ei kelpaa RecordCreatedSuccessfully=Tallennus luotiin onnistuneesti RecordModifiedSuccessfully=Tietue muunnettu onnistuneesti -RecordsModified=%s record(s) modified -RecordsDeleted=%s record(s) deleted -RecordsGenerated=%s record(s) generated +RecordsModified=%s-tietuetta muokattu +RecordsDeleted=%s tietuetta poistettu +RecordsGenerated=%s tietuetta luotu AutomaticCode=Automaattinen koodi FeatureDisabled=Ominaisuus pois päältä MoveBox=Siirrä widget @@ -698,7 +705,7 @@ Method=Menetelmä Receive=Vastaanota CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Odotettu Arvo -ExpectedQty=Expected Qty +ExpectedQty=Odotettu määrä PartialWoman=Osittainen TotalWoman=Yhteensä NeverReceived=Ei ole saapunut @@ -722,7 +729,7 @@ CurrentUserLanguage=Nykyinen kieli CurrentTheme=Nykyinen teema CurrentMenuManager=Nykyinen valikkohallinta Browser=Selain -Layout=Layout +Layout=Asettelu Screen=Näyttö DisabledModules=Ei käytössä olevat moduulit For=Saat @@ -733,7 +740,7 @@ HidePassword=Näytä komento salasana piilotettuna UnHidePassword=Näytä todellinen komento salasana näkyen Root=Juuri RootOfMedias=Root of public medias (/medias) -Informations=Information +Informations=Tiedot Page=Sivu Notes=Huomiot AddNewLine=Lisää uusi rivi @@ -752,7 +759,7 @@ CoreErrorTitle=Järjestelmävirhe CoreErrorMessage=Sorry, an error occurred. Contact your system administrator to check the logs or disable $dolibarr_main_prod=1 to get more information. CreditCard=Luottokortti ValidatePayment=Vahvista maksu -CreditOrDebitCard=Credit or debit card +CreditOrDebitCard=Luotto- tai maksukortti FieldsWithAreMandatory=Tähdellä <b>%s</b> ovat pakollisia 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) @@ -761,7 +768,7 @@ NotSupported=Ei tuettu RequiredField=Pakollinen kenttä Result=Tulos ToTest=Testi -ValidateBefore=Item must be validated before using this feature +ValidateBefore=Kohde on vahvistettava ennen tämän ominaisuuden käyttöä Visibility=Näkyvyys Totalizable=Totalizable TotalizableDesc=This field is totalizable in list @@ -783,20 +790,20 @@ LinkTo=Linkki LinkToProposal=Linkki Tarjoukseen LinkToOrder=Linkki Tilauksiin LinkToInvoice=Linkki Laskuihin -LinkToTemplateInvoice=Link to template invoice -LinkToSupplierOrder=Link to purchase order -LinkToSupplierProposal=Link to vendor proposal -LinkToSupplierInvoice=Link to vendor invoice +LinkToTemplateInvoice=Linkki mallilaskuun +LinkToSupplierOrder=Linkki ostotilaukseen +LinkToSupplierProposal=Linkki toimittajan ehdotukseen +LinkToSupplierInvoice=Linkki toimittajan laskuun LinkToContract=Linkki Sopimuksiin LinkToIntervention=Link to intervention -LinkToTicket=Link to ticket +LinkToTicket=Linkki tikettiin CreateDraft=Luo luonnos SetToDraft=Palaa luonnokseen ClickToEdit=Klikkaa muokataksesi -ClickToRefresh=Click to refresh -EditWithEditor=Edit with CKEditor -EditWithTextEditor=Edit with Text editor -EditHTMLSource=Edit HTML Source +ClickToRefresh=Napsauta päivittääksesi +EditWithEditor=Muokkaa CKEditorilla +EditWithTextEditor=Muokkaa tekstieditorilla +EditHTMLSource=Muokkaa HTML-lähdekoodia ObjectDeleted=Kohde %s poistettu ByCountry=Maittain ByTown=Postitoimipaikoittain @@ -808,7 +815,7 @@ ByDay=Päivän mukaan BySalesRepresentative=Myyntiedustajittain LinkedToSpecificUsers=Linkitetty käyttäjätietoon NoResults=Ei tuloksia -AdminTools=Admin Tools +AdminTools=Järjestelmänvalvojan työkalut SystemTools=Kehitysresurssit ModulesSystemTools=Moduuli työkalut Test=Testi @@ -958,42 +965,42 @@ ShortThursday=TO ShortFriday=PE ShortSaturday=LA ShortSunday=SU -one=one -two=two -three=three -four=four -five=five -six=six -seven=seven -eight=eight -nine=nine -ten=ten -eleven=eleven -twelve=twelve -thirteen=thirdteen -fourteen=fourteen -fifteen=fifteen -sixteen=sixteen -seventeen=seventeen -eighteen=eighteen -nineteen=nineteen -twenty=twenty -thirty=thirty -forty=forty -fifty=fifty -sixty=sixty -seventy=seventy -eighty=eighty -ninety=ninety -hundred=hundred -thousand=thousand -million=million -billion=billion -trillion=trillion -quadrillion=quadrillion +one=yksi +two=kaksi +three=kolme +four=neljä +five=viisi +six=kuusi +seven=seitsemän +eight=kahdeksan +nine=yhdeksän +ten=kymmenen +eleven=yksitoista +twelve=kaksitoista +thirteen=kolmetoista +fourteen=neljätoista +fifteen=viisitoista +sixteen=kuusitoista +seventeen=seitsemäntoista +eighteen=kahdeksantoista +nineteen=yhdeksäntoista +twenty=kaksikymmentä +thirty=kolmekymmentä +forty=neljäkymmentä +fifty=viisikymmentä +sixty=kuusikymmentä +seventy=seitsemänkymmentä +eighty=kahdeksankymmentä +ninety=yhdeksänkymmentä +hundred=sata +thousand=tuhat +million=miljoona +billion=miljardi +trillion=biljoona +quadrillion=kvadriljoona SelectMailModel=Valitse sähköpostipohja SetRef=Aseta viite -Select2ResultFoundUseArrows=Some results found. Use arrows to select. +Select2ResultFoundUseArrows=Joitakin tuloksia löytyi. Käytä nuolia valitaksesi. Select2NotFound=Tuloksia ei löytynyt Select2Enter=Syötä Select2MoreCharacter=tai useampi merkki @@ -1007,103 +1014,109 @@ SearchIntoMembers=Jäsenet SearchIntoUsers=Käyttäjät SearchIntoProductsOrServices=Tuotteet tai palvelut SearchIntoProjects=Projektit -SearchIntoMO=Manufacturing Orders +SearchIntoMO=Valmistustilaukset SearchIntoTasks=Tehtävät SearchIntoCustomerInvoices=Asiakkaiden laskut -SearchIntoSupplierInvoices=Vendor invoices +SearchIntoSupplierInvoices=Toimittajan laskut SearchIntoCustomerOrders=Asiakkaan tilaukset SearchIntoSupplierOrders=Ostotilaukset SearchIntoCustomerProposals=Tarjoukset -SearchIntoSupplierProposals=Vendor proposals +SearchIntoSupplierProposals=Toimittajan ehdotukset SearchIntoInterventions=Interventions SearchIntoContracts=Sopimukset SearchIntoCustomerShipments=Asiakas lähetykset SearchIntoExpenseReports=Kuluraportit -SearchIntoLeaves=Leave +SearchIntoLeaves=Poissaolot SearchIntoTickets=Tiketit -SearchIntoCustomerPayments=Customer payments +SearchIntoCustomerPayments=Asiakasmaksut SearchIntoVendorPayments=Toimittajien maksut SearchIntoMiscPayments=Muut maksut CommentLink=Kommentit NbComments=Kommenttien määrä -CommentPage=Comments space +CommentPage=Kommenttitila CommentAdded=Kommentti lisätty CommentDeleted=Kommentti poistettu Everybody=Yhteiset hanke PayedBy=Maksettu toimesta -PayedTo=Paid to -Monthly=Monthly -Quarterly=Quarterly -Annual=Annual -Local=Local -Remote=Remote -LocalAndRemote=Local and Remote -KeyboardShortcut=Keyboard shortcut +PayedTo=Maksettu +Monthly=Kuukausittain +Quarterly=Neljännesvuosittain +Annual=Vuosittain +Local=Paikallinen +Remote=Etä +LocalAndRemote=Paikallinen ja etä +KeyboardShortcut=Pikanäppäin AssignedTo=Vaikuttaa -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 +Deletedraft=Poista luonnos +ConfirmMassDraftDeletion=Luonnosten massapoistamisen vahvistus +FileSharedViaALink=Tiedosto jaettu linkin kautta +SelectAThirdPartyFirst=Valitse ensin kolmas osapuoli ... +YouAreCurrentlyInSandboxMode=Olet tällä hetkellä %s "sandbox" -tilassa +Inventory=Varasto +AnalyticCode=Analyyttinen koodi TMenuMRP=MRP -ShowMoreInfos=Show More Infos -NoFilesUploadedYet=Please upload a document first -SeePrivateNote=See private note -PaymentInformation=Payment information -ValidFrom=Valid from -ValidUntil=Valid until -NoRecordedUsers=No users -ToClose=To close +ShowMoreInfos=Näytä lisää tietoja +NoFilesUploadedYet=Lataa ensin asiakirja +SeePrivateNote=Katso yksityinen huomautus +PaymentInformation=Maksutiedot +ValidFrom=Voimassa alkaen +ValidUntil=Voimassa asti +NoRecordedUsers=Ei käyttäjiä +ToClose=Sulkeaksesi ToProcess=Jotta prosessi -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=Hyväksyäksesi +GlobalOpenedElemView=Globaali näkymä +NoArticlesFoundForTheKeyword=Avainsanalle '<strong> %s </strong>' ei löytynyt artikkelia +NoArticlesFoundForTheCategory=Luokalle ei löytynyt artikkelia +ToAcceptRefuse=Hyväksyä | kieltäytyä ContactDefault_agenda=Tapahtuma ContactDefault_commande=Tilaus ContactDefault_contrat=Sopimus ContactDefault_facture=Lasku ContactDefault_fichinter=Väliintulo -ContactDefault_invoice_supplier=Supplier Invoice -ContactDefault_order_supplier=Purchase Order +ContactDefault_invoice_supplier=Toimittajalasku +ContactDefault_order_supplier=Ostotilaus ContactDefault_project=Hanke ContactDefault_project_task=Tehtävä ContactDefault_propal=Tarjous -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 +ContactDefault_supplier_proposal=Toimittajan ehdotus +ContactDefault_ticket=Tiketti +ContactAddedAutomatically=Yhteys lisätty yhteyshenkilön kolmannen osapuolen rooleista +More=Lisää +ShowDetails=Näytä yksityiskohdat +CustomReports=Mukautetut raportit +StatisticsOn=Tilastot aiheesta +SelectYourGraphOptionsFirst=Valitse kaavion asetukset, jotta voit luoda kaavion 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 +XAxis=X-akseli +YAxis=Y-akseli +StatusOfRefMustBe= %s tilan on oltava %s +DeleteFileHeader=Vahvista tiedoston poisto +DeleteFileText=Haluatko todella poistaa tämän tiedoston? +ShowOtherLanguages=Näytä muut kielet +SwitchInEditModeToAddTranslation=Vaihda muokkaustilaan lisätäksesi käännöksiä tälle kielelle +NotUsedForThisCustomer=Ei käytössä tälle asiakkaalle +AmountMustBePositive=Summan on oltava positiivinen +ByStatus=Tilan mukaan +InformationMessage=Tiedot +Used=Käytetty +ASAP=Niin pian kuin mahdollista +CREATEInDolibarr=Tietue %s luotu +MODIFYInDolibarr=Tietuetta %s muokattu +DELETEInDolibarr=Tietue %s poistettu +VALIDATEInDolibarr=Tietue %s on vahvistettu +APPROVEDInDolibarr=Tietue %s hyväksytty +DefaultMailModel=Oletuspostimalli +PublicVendorName=Myyjän julkinen nimi DateOfBirth=Päiväys syntyvyyden -SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry=Security token has expired, so action has been canceled. Please try again. -UpToDate=Up-to-date -OutOfDate=Out-of-date +SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry=Suojaustunnus on vanhentunut, joten toiminto on peruutettu. Yritä uudelleen. +UpToDate=Ajantasalla +OutOfDate=Vanhentunut EventReminder=Event Reminder -UpdateForAllLines=Update for all lines +UpdateForAllLines=Päivitys kaikille riveille +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 diff --git a/htdocs/langs/fi_FI/modulebuilder.lang b/htdocs/langs/fi_FI/modulebuilder.lang index 460aef8103b..0e6dd72354d 100644 --- a/htdocs/langs/fi_FI/modulebuilder.lang +++ b/htdocs/langs/fi_FI/modulebuilder.lang @@ -5,7 +5,7 @@ EnterNameOfObjectDesc=Enter name of the object to create with no spaces. Use upp ModuleBuilderDesc2=Path where modules are generated/edited (first directory for external modules defined into %s): <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 +NewModule=Uusi moduuli NewObjectInModulebuilder=New object ModuleKey=Module key ObjectKey=Object key @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/fi_FI/mrp.lang b/htdocs/langs/fi_FI/mrp.lang index f018be890cc..c6e8061c790 100644 --- a/htdocs/langs/fi_FI/mrp.lang +++ b/htdocs/langs/fi_FI/mrp.lang @@ -1,4 +1,4 @@ -Mrp=Manufacturing Orders +Mrp=Valmistustilaukset MOs=Manufacturing orders ManufacturingOrder=Manufacturing Order MRPDescription=Module to manage production and Manufacturing Orders (MO). @@ -32,7 +32,7 @@ DeleteBillOfMaterials=Delete Bill Of Materials DeleteMo=Delete Manufacturing Order ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? -MenuMRP=Manufacturing Orders +MenuMRP=Valmistustilaukset NewMO=New Manufacturing Order QtyToProduce=Qty to produce DateStartPlannedMo=Date start planned @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/fi_FI/other.lang b/htdocs/langs/fi_FI/other.lang index 4a6a9b8c6c6..d3b6219e6db 100644 --- a/htdocs/langs/fi_FI/other.lang +++ b/htdocs/langs/fi_FI/other.lang @@ -5,8 +5,6 @@ Tools=Työkalut 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=Syntymäpäivä -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=syntymäpäivä hälytys aktiivinen BirthdayAlertOff=syntymäpäivä varoituskynnysten inaktiivinen TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -78,7 +78,8 @@ Notify_EXPENSE_REPORT_VALIDATE=Expense report validated (approval required) Notify_EXPENSE_REPORT_APPROVE=Expense report approved Notify_HOLIDAY_VALIDATE=Leave request validated (approval required) Notify_HOLIDAY_APPROVE=Leave request approved -SeeModuleSetup=See setup of module %s +Notify_ACTION_CREATE=Added action to Agenda +SeeModuleSetup=Katso moduulin %s asetukset NbOfAttachedFiles=Numero liitettyjen tiedostojen / asiakirjat TotalSizeOfAttachedFiles=Kokonaiskoosta liitettyjen tiedostojen / asiakirjat MaxSize=Enimmäiskoko @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Oikeus CalculatedWeight=Laskettu paino CalculatedVolume=Laskettu määrä Weight=Paino -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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=Tuonti tietokokonaisuutta DolibarrNotification=Automaattinen ilmoitus ResizeDesc=Kirjoita uusi leveys <b>tai</b> uusien korkeus. Suhde pidetään ajan kokoa ... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Vienti alueen diff --git a/htdocs/langs/fi_FI/products.lang b/htdocs/langs/fi_FI/products.lang index fb19101c1ee..ba1a344683f 100644 --- a/htdocs/langs/fi_FI/products.lang +++ b/htdocs/langs/fi_FI/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Hintojen lukumäärä DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Ostohinnat CustomerPrices=Asiakas hinnat SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +CustomCode=Customs|Commodity|HS code CountryOrigin=Alkuperämaa +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Nature of product (material/finished) NatureOfProductShort=Nature of product NatureOfProductDesc=Raw material or finished product @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Poista käytöstä hinnat kappalemäärän mukaan PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/fi_FI/projects.lang b/htdocs/langs/fi_FI/projects.lang index 36d5e4a6d8b..3f9f197f844 100644 --- a/htdocs/langs/fi_FI/projects.lang +++ b/htdocs/langs/fi_FI/projects.lang @@ -76,15 +76,16 @@ MyActivities=Omat tehtävät / toiminnot MyProjects=Omat projektit MyProjectsArea=Omat projektit - alue DurationEffective=Todellisen kesto -ProgressDeclared=Julkaistu eteneminen +ProgressDeclared=Declared real progress TaskProgressSummary=Tehtien eteneminen CurentlyOpenedTasks=Avoimet tehtävät -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Lasketut projektit +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=Aika +TimeConsumed=Consumed ListOfTasks=Tehtävälista GoToListOfTimeConsumed=Go to list of time consumed GanttView=GANTT näkymä diff --git a/htdocs/langs/fi_FI/recruitment.lang b/htdocs/langs/fi_FI/recruitment.lang index eb65908493a..9702bc62631 100644 --- a/htdocs/langs/fi_FI/recruitment.lang +++ b/htdocs/langs/fi_FI/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/fi_FI/sendings.lang b/htdocs/langs/fi_FI/sendings.lang index f45dd858ab4..7c6e6c9e98e 100644 --- a/htdocs/langs/fi_FI/sendings.lang +++ b/htdocs/langs/fi_FI/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Tämän tilauksen muut toimitukset SendingsAndReceivingForSameOrder=Tämän tilauksen toimitukset ja kuittaukset SendingsToValidate=Toimitu StatusSendingCanceled=Peruttu +StatusSendingCanceledShort=Peruttu StatusSendingDraft=Vedos StatusSendingValidated=Validoidut (lähetettävät tai lähetetyt tuotteet) StatusSendingProcessed=Jalostettu @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=Täydellisempi mallin toimitusten kuitit (logo. ..) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Jatkuva EXPEDITION_ADDON_NUMBER ei määritelty SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/fi_FI/stocks.lang b/htdocs/langs/fi_FI/stocks.lang index 3bd141f559b..d244c5578d0 100644 --- a/htdocs/langs/fi_FI/stocks.lang +++ b/htdocs/langs/fi_FI/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -182,7 +183,7 @@ inventoryCreatePermission=Create new inventory inventoryReadPermission=View inventories inventoryWritePermission=Update inventories inventoryValidatePermission=Validate inventory -inventoryTitle=Inventory +inventoryTitle=Varasto inventoryListTitle=Inventories inventoryListEmpty=No inventory in progress inventoryCreateDelete=Create/Delete inventory @@ -198,7 +199,7 @@ inventoryMvtStock=By inventory inventoryWarningProductAlreadyExists=This product is already into list SelectCategory=Luokka suodatin SelectFournisseur=Vendor filter -inventoryOnDate=Inventory +inventoryOnDate=Varasto 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 @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/fi_FI/supplier_proposal.lang b/htdocs/langs/fi_FI/supplier_proposal.lang index 5777af85414..1612b16d93b 100644 --- a/htdocs/langs/fi_FI/supplier_proposal.lang +++ b/htdocs/langs/fi_FI/supplier_proposal.lang @@ -11,8 +11,9 @@ LastModifiedRequests=Latest %s modified price requests RequestsOpened=Open price requests SupplierProposalArea=Vendor proposals area SupplierProposalShort=Vendor proposal -SupplierProposals=Vendor proposals -SupplierProposalsShort=Vendor proposals +SupplierProposals=Toimittajan ehdotukset +SupplierProposalsShort=Toimittajan ehdotukset +AskPrice=Price request NewAskPrice=New price request ShowSupplierProposal=Show price request AddSupplierProposal=Create a price request @@ -32,7 +33,7 @@ SupplierProposalStatusValidatedShort=Vahvistetut SupplierProposalStatusClosedShort=Suljettu SupplierProposalStatusSignedShort=Accepted SupplierProposalStatusNotSignedShort=Refused -CopyAskFrom=Create price request by copying existing a request +CopyAskFrom=Create a price request by copying an existing request CreateEmptyAsk=Create blank request ConfirmCloneAsk=Are you sure you want to clone the price request <b>%s</b>? ConfirmReOpenAsk=Are you sure you want to open back the price request <b>%s</b>? diff --git a/htdocs/langs/fi_FI/ticket.lang b/htdocs/langs/fi_FI/ticket.lang index d25c38981fc..ff13c391829 100644 --- a/htdocs/langs/fi_FI/ticket.lang +++ b/htdocs/langs/fi_FI/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Kaupallinen kysymys +TicketTypeShortCOM=Kaupallinen kysymys TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Muu TicketSeverityShortLOW=Matala TicketSeverityShortNORMAL=Normaali TicketSeverityShortHIGH=Korkea -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Kohta '%s' on väärin MenuTicketMyAssign=Minun tiketit @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Luettu Assigned=Assigned InProgress=Käsittelyssä @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -151,7 +149,7 @@ MessageListViewType=Show as table list # # Ticket card # -Ticket=Ticket +Ticket=Tiketti TicketCard=Ticket card CreateTicket=Create ticket EditTicket=Muokkaa tikettiä @@ -231,9 +229,8 @@ TicketChangeStatus=Vaihda tila TicketConfirmChangeStatus=Confirm the status change: %s ? TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create -Unread=Unread +Unread=Lukematon TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/fi_FI/website.lang b/htdocs/langs/fi_FI/website.lang index 5ecbd8e3ca4..218d9313551 100644 --- a/htdocs/langs/fi_FI/website.lang +++ b/htdocs/langs/fi_FI/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Lisää sivusto Webpage=Web page/container AddPage=Add page/container -HomePage=Kotisivu PageContainer=Sivu 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. @@ -101,7 +100,7 @@ EmptyPage=Tyhjä sivu ExternalURLMustStartWithHttp=Ulkoisen osoitteen on oltava muotoa http:// tai https:// ZipOfWebsitePackageToImport=Upload the Zip file of the website template package ZipOfWebsitePackageToLoad=or Choose an available embedded website template package -ShowSubcontainers=Sisällytä dynaaminen sisältö +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/fi_FI/withdrawals.lang b/htdocs/langs/fi_FI/withdrawals.lang index aba0cc2a0cc..66f62048c71 100644 --- a/htdocs/langs/fi_FI/withdrawals.lang +++ b/htdocs/langs/fi_FI/withdrawals.lang @@ -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>. ClassCredited=Luokittele hyvitetyksi @@ -131,7 +132,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,3 +148,5 @@ 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=Vaihtoehto todellista tilaa ei ole asetettu, pysähdymme jälkeen simulointi ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorICSmissing=Missing ICS in Bank account %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/fi_FI/workflow.lang b/htdocs/langs/fi_FI/workflow.lang index 6fe6bba4b8b..5f7718dc168 100644 --- a/htdocs/langs/fi_FI/workflow.lang +++ b/htdocs/langs/fi_FI/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=Automaattinen luonti AutomaticClassification=Automaattinen luokitus +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/fr_BE/accountancy.lang b/htdocs/langs/fr_BE/accountancy.lang index 11b91eb3db3..5f291cc8cb7 100644 --- a/htdocs/langs/fr_BE/accountancy.lang +++ b/htdocs/langs/fr_BE/accountancy.lang @@ -1,6 +1,7 @@ # 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 5d24a311ccd..a497b785c93 100644 --- a/htdocs/langs/fr_BE/admin.lang +++ b/htdocs/langs/fr_BE/admin.lang @@ -16,6 +16,8 @@ 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) 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/mrp.lang b/htdocs/langs/fr_BE/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/fr_BE/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/fr_BE/products.lang b/htdocs/langs/fr_BE/products.lang index 6e900475275..2a38b9b0181 100644 --- a/htdocs/langs/fr_BE/products.lang +++ b/htdocs/langs/fr_BE/products.lang @@ -1,2 +1,2 @@ # Dolibarr language file - Source file is en_US - products -CustomCode=Customs / Commodity / HS code +AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/fr_BE/withdrawals.lang b/htdocs/langs/fr_BE/withdrawals.lang index eb336cadcc0..76b150a8eb2 100644 --- a/htdocs/langs/fr_BE/withdrawals.lang +++ b/htdocs/langs/fr_BE/withdrawals.lang @@ -1,2 +1,3 @@ # 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 c34f7d4c7ad..62afd3dc49d 100644 --- a/htdocs/langs/fr_CA/accountancy.lang +++ b/htdocs/langs/fr_CA/accountancy.lang @@ -87,6 +87,7 @@ 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) @@ -97,7 +98,6 @@ ACCOUNTING_EXPENSEREPORT_JOURNAL=Note de frais DONATION_ACCOUNTINGACCOUNT=Compte comptable pour enregistrer des dons ACCOUNTING_SERVICE_BUY_ACCOUNT=Compte comptable par défaut pour les services achetés (utilisé si non défini dans la fiche de service) ACCOUNTING_SERVICE_SOLD_ACCOUNT=Compte comptable par défaut pour les services vendus (utilisé si non défini dans la fiche de service) -GroupByAccountAccounting=Groupe par compte comptable NotMatch=Pas encore défini FinanceJournal=Journal des finances ExpenseReportsJournal=Journal des rapports de dépenses diff --git a/htdocs/langs/fr_CA/admin.lang b/htdocs/langs/fr_CA/admin.lang index a0f940824b8..ab2f51e65eb 100644 --- a/htdocs/langs/fr_CA/admin.lang +++ b/htdocs/langs/fr_CA/admin.lang @@ -25,7 +25,6 @@ AllWidgetsWereEnabled=Tous les widgets disponibles sont activés MenusDesc=Les gestionnaires de menu définissent le contenu des deux barres de menus (horizontales et verticales). MenusEditorDesc=L'éditeur de menu vous permet de définir des entrées de menu personnalisées. Utilisez-le soigneusement pour éviter l'instabilité et les entrées de menu inaccessibles en permanence. <br>Certains modules ajoutent des entrées de menu (dans le menu<b> principal </b>principalement). Si vous supprimez certaines de ces entrées par erreur, vous pouvez les restaurer en désactivant et en réactivant le module. PurgeDeleteLogFile=Supprimer les fichiers journaux, y compris ceux<b>%s</b> définis pour le module Syslog (pas de risque de perte de données) -PurgeDeleteTemporaryFilesShort=Supprimer les fichiers temporaires PurgeNothingToDelete=Pas de répertoire ou de fichiers à supprimer. PurgeNDirectoriesFailed=Impossible de supprimer <b>%s</b> fichiers ou les répertoires. ConfirmPurgeAuditEvents=Êtes-vous sûr de vouloir purger tous les événements de sécurité? Tous les journaux de sécurité seront supprimés, aucune autre donnée ne sera supprimée. @@ -98,6 +97,7 @@ 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 @@ -164,6 +164,7 @@ LDAPFieldTitle=Poste 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 diff --git a/htdocs/langs/fr_CA/categories.lang b/htdocs/langs/fr_CA/categories.lang index 71116b8842c..ce7287abbe9 100644 --- a/htdocs/langs/fr_CA/categories.lang +++ b/htdocs/langs/fr_CA/categories.lang @@ -22,4 +22,4 @@ ProductsCategoriesShort=Tags/catégories de produits MembersCategoriesShort=Tags/catégories de membres AccountsCategoriesShort=Étiquettes / catégories de comptes ProjectsCategoriesShort=Projets Tags / catégories -CatProJectLinks=Liens entre projets et tags / catégories +CatMembersLinks=Liens entre membres et libellés/catégories diff --git a/htdocs/langs/fr_CA/compta.lang b/htdocs/langs/fr_CA/compta.lang index 9426cca9d08..67522c477f0 100644 --- a/htdocs/langs/fr_CA/compta.lang +++ b/htdocs/langs/fr_CA/compta.lang @@ -32,7 +32,6 @@ VATPayments=Paiements d'impôt sur les ventes VATRefund=Remboursement de la taxe de vente SocialContributionsPayments=Règlements charges sociales ShowVatPayment=Affiche paiement TPS/TVH -BalanceVisibilityDependsOnSortAndFilters=La balance est visible dans cette liste uniquement si la table est triée en ascendant sur %s et filtrée pour 1 compte bancaire CustomerAccountancyCodeShort=Cust. Compte. code SupplierAccountancyCodeShort=Souper. Compte. code ByExpenseIncome=Par dépenses et revenus diff --git a/htdocs/langs/fr_CA/cron.lang b/htdocs/langs/fr_CA/cron.lang index d4a1f4689f9..c0ac78610c3 100644 --- a/htdocs/langs/fr_CA/cron.lang +++ b/htdocs/langs/fr_CA/cron.lang @@ -4,11 +4,8 @@ Permission23102 =Créer/Modifier des travaux planifiées Permission23103 =Effacer travail planifié Permission23104 =Exécuté Travail planifié CronSetup=Configuration programmée de la gestion des tâches -URLToLaunchCronJobs=URL pour vérifier et lancer des emplois qualifiés cron -OrToLaunchASpecificJob=Ou pour vérifier et lancer un travail spécifique KeyForCronAccess=Clé de sécurité pour URL pour lancer des travaux de cron CronExplainHowToRunUnix=Sur l'environnement Unix, vous devez utiliser l'entrée crontab suivante pour exécuter la ligne de commande toutes les 5 minutes -CronExplainHowToRunWin=Sur Microsoft (tm) environnement Windows, vous pouvez utiliser les outils de tâches planifiés pour exécuter la ligne de commande toutes les 5 minutes EnabledAndDisabled=Activé et désactivé CronLastOutput=Dernier résultat d'exécution CronLastResult=Le dernier code de résultat @@ -24,7 +21,6 @@ CronNone=Aucune CronDtLastLaunch=Date de début de la dernière exécution CronDtLastResult=Date de fin de la dernière exécution CronNoJobs=Aucun emploi enregistré -CronNbRun=Nb. lancement CronEach=Chaque CronAdd=Ajouter des emplois CronEvery=Exécuter le travail chaque @@ -39,6 +35,5 @@ CronCreateJob=Créer un nouvel emploi planifié CronFrom=De CronType=Type d'emploi CronType_command=Commande Shell -UseMenuModuleToolsToAddCronJobs=Accédez au menu «Accueil - Outils d'administration - Emplois programmés» pour voir et modifier les tâches planifiées. MakeLocalDatabaseDumpShort=Sauvegarde de la base de données locale WarningCronDelayed=Attention, à des fins de performance, quelle que soit la prochaine date d'exécution des travaux activés, vos travaux peuvent être retardés jusqu'à un maximum de %s heures avant d'être exécutés. diff --git a/htdocs/langs/fr_CA/errors.lang b/htdocs/langs/fr_CA/errors.lang index 967bf583d1c..be3f8df0eb9 100644 --- a/htdocs/langs/fr_CA/errors.lang +++ b/htdocs/langs/fr_CA/errors.lang @@ -51,7 +51,6 @@ ErrorBadFormatValueList=La valeur de la liste ne peut pas contenir plus d'une vi ErrorExportDuplicateProfil=Ce nom de profil existe déjà pour ce jeu d'exportation. ErrorLDAPSetupNotComplete=La correspondance Dolibarr-LDAP n'est pas complète. ErrorLDAPMakeManualTest=Un fichier .ldif a été généré dans le répertoire %s. Essayez de le charger manuellement à partir de la ligne de commande pour avoir plus d'informations sur les erreurs. -ErrorRefAlreadyExists=La référence utilisée pour la création existe déjà. ErrorModuleRequireJavascript=Javascript ne doit pas être désactivé pour que cette fonction fonctionne. Pour activer / désactiver Javascript, accédez au menu Accueil-> Configuration-> Affichage. ErrorPasswordsMustMatch=Les deux mots de passe dactylographiés doivent correspondre les uns aux autres ErrorFileIsInfectedWithAVirus=Le programme antivirus n'a pas pu valider le fichier (le fichier peut être infecté par un virus) diff --git a/htdocs/langs/fr_CA/mails.lang b/htdocs/langs/fr_CA/mails.lang index 9661c2d4ed1..cd12fe65172 100644 --- a/htdocs/langs/fr_CA/mails.lang +++ b/htdocs/langs/fr_CA/mails.lang @@ -76,12 +76,6 @@ YouCanUseCommaSeparatorForSeveralRecipients=Vous pouvez utiliser le séparateur TagCheckMail=Suivre l'ouverture du courrier TagUnsubscribe=Désinscription lien NoEmailSentBadSenderOrRecipientEmail=Aucun courriel envoyé. Mauvais expéditeur ou courrier électronique du destinataire. Vérifiez le profil de l'utilisateur. -NoNotificationsWillBeSent=Aucune notification par courrier électronique n'est prévue pour cet événement et cette entreprise -ANotificationsWillBeSent=1 notification sera envoyée par courrier électronique -SomeNotificationsWillBeSent=%s les notifications seront envoyées par courrier électronique -AddNewNotification=Activer un nouvel objectif / événement de notification par courrier électronique -ListOfActiveNotifications=Liste tous les cibles / événements actifs pour la notification par courrier électronique -ListOfNotificationsDone=Liste toutes les notifications par courrier électronique envoyées MailSendSetupIs=La configuration de l'envoi de courrier électronique a été configurée sur '%s'. Ce mode ne peut pas être utilisé pour envoyer des messages électroniques de masse. MailSendSetupIs2=Vous devez d'abord aller, avec un compte admin, dans le menu %sHome - Configuration - EMails%s pour modifier le paramètre <strong> '%s' </strong>pour utiliser le mode '%s'. Avec ce mode, vous pouvez entrer dans la configuration du serveur SMTP fourni par votre fournisseur de services Internet et utiliser la fonctionnalité de messagerie en masse. MailSendSetupIs3=Si vous avez des questions sur la configuration de votre serveur SMTP, vous pouvez demander à %s. @@ -104,5 +98,3 @@ AdvTgtDeleteFilter=Supprimer le filtre AdvTgtCreateFilter=Créer un filtre NoContactWithCategoryFound=Aucun contact / adresse avec une catégorie trouvée NoContactLinkedToThirdpartieWithCategoryFound=Aucun contact / adresse avec une catégorie trouvée -OutGoingEmailSetup=Configuration de messagerie sortante -InGoingEmailSetup=Configuration de messagerie entrante diff --git a/htdocs/langs/fr_CA/mrp.lang b/htdocs/langs/fr_CA/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/fr_CA/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/fr_CA/other.lang b/htdocs/langs/fr_CA/other.lang index 23fbaaa759a..f9ca31c6f78 100644 --- a/htdocs/langs/fr_CA/other.lang +++ b/htdocs/langs/fr_CA/other.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - other +SecurityCode=Code de sécurité NumberingShort=N ° BirthdayAlertOn=Alerte d'anniversaire active BirthdayAlertOff=Alerte d'anniversaire inactive diff --git a/htdocs/langs/fr_CA/products.lang b/htdocs/langs/fr_CA/products.lang index 313aab6abb2..c438e57c302 100644 --- a/htdocs/langs/fr_CA/products.lang +++ b/htdocs/langs/fr_CA/products.lang @@ -53,6 +53,7 @@ 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 @@ -80,7 +81,6 @@ NewRefForClone=Réf. De nouveau produit / service SellingPrices=Prix ​​de vente BuyingPrices=Prix ​​d'achat CustomerPrices=Prix ​​client -CustomCode=Customs / Commodity / HS code ShortLabel=Étiquette courte p=U. s=S @@ -100,7 +100,6 @@ AlwaysUseNewPrice=Toujours utiliser le prix actuel du produit / service AlwaysUseFixedPrice=Utilisez le prix fixe PriceByQuantity=Différents prix par quantité PriceByQuantityRange=Gamme de quantité -MultipriceRules=Règles du segment des prix PercentVariationOver=%% variation par rapport à %s PercentDiscountOver=%% discount sur %s KeepEmptyForAutoCalculation=Restez vide pour que ceci soit calculé automatiquement à partir du poids ou du volume de produits diff --git a/htdocs/langs/fr_CA/projects.lang b/htdocs/langs/fr_CA/projects.lang index d1497e026ec..edb3ebdf924 100644 --- a/htdocs/langs/fr_CA/projects.lang +++ b/htdocs/langs/fr_CA/projects.lang @@ -39,7 +39,6 @@ AddHereTimeSpentForDay=Ajouter ici le temps passé pour cette journée / tâche Activities=Tâches / activités MyActivities=Mes tâches / activités MyProjectsArea=Zone de mes projets -ProgressDeclared=Progrès déclaré ListOfTasks=Liste des tâches ListTaskTimeUserProject=Liste des temps consacrés aux tâches du projet ActivityOnProjectToday=Activité sur le projet aujourd'hui diff --git a/htdocs/langs/fr_CA/sendings.lang b/htdocs/langs/fr_CA/sendings.lang index 1886150f850..9cf4c3906c4 100644 --- a/htdocs/langs/fr_CA/sendings.lang +++ b/htdocs/langs/fr_CA/sendings.lang @@ -19,6 +19,7 @@ OtherSendingsForSameOrder=Autres envois pour cette commande SendingsAndReceivingForSameOrder=Livraisons et recettes pour cet ordre SendingsToValidate=Livraisons à valider StatusSendingCanceled=Annulé +StatusSendingCanceledShort=Annulé StatusSendingValidated=Validé (produits à expédier ou déjà expédiés) StatusSendingProcessed=Traité StatusSendingProcessedShort=Traité diff --git a/htdocs/langs/fr_CA/withdrawals.lang b/htdocs/langs/fr_CA/withdrawals.lang index d1c2577c8d4..75020c6fcaf 100644 --- a/htdocs/langs/fr_CA/withdrawals.lang +++ b/htdocs/langs/fr_CA/withdrawals.lang @@ -56,6 +56,7 @@ 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 new file mode 100644 index 00000000000..552865118f1 --- /dev/null +++ b/htdocs/langs/fr_CH/accountancy.lang @@ -0,0 +1,2 @@ +# 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 c1d306ec390..b68a0680537 100644 --- a/htdocs/langs/fr_CH/admin.lang +++ b/htdocs/langs/fr_CH/admin.lang @@ -1,3 +1,5 @@ # 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) 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/compta.lang b/htdocs/langs/fr_CH/compta.lang deleted file mode 100644 index c7c41488180..00000000000 --- a/htdocs/langs/fr_CH/compta.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - compta -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account diff --git a/htdocs/langs/fr_CH/mrp.lang b/htdocs/langs/fr_CH/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/fr_CH/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/fr_CH/products.lang b/htdocs/langs/fr_CH/products.lang index 6e900475275..2a38b9b0181 100644 --- a/htdocs/langs/fr_CH/products.lang +++ b/htdocs/langs/fr_CH/products.lang @@ -1,2 +1,2 @@ # Dolibarr language file - Source file is en_US - products -CustomCode=Customs / Commodity / HS code +AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/fr_CH/withdrawals.lang b/htdocs/langs/fr_CH/withdrawals.lang new file mode 100644 index 00000000000..facdefc082f --- /dev/null +++ b/htdocs/langs/fr_CH/withdrawals.lang @@ -0,0 +1,2 @@ +# 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 new file mode 100644 index 00000000000..552865118f1 --- /dev/null +++ b/htdocs/langs/fr_CI/accountancy.lang @@ -0,0 +1,2 @@ +# 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 c1d306ec390..b68a0680537 100644 --- a/htdocs/langs/fr_CI/admin.lang +++ b/htdocs/langs/fr_CI/admin.lang @@ -1,3 +1,5 @@ # 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) 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/compta.lang b/htdocs/langs/fr_CI/compta.lang deleted file mode 100644 index c7c41488180..00000000000 --- a/htdocs/langs/fr_CI/compta.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - compta -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account diff --git a/htdocs/langs/fr_CI/mrp.lang b/htdocs/langs/fr_CI/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/fr_CI/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/fr_CI/products.lang b/htdocs/langs/fr_CI/products.lang index 6e900475275..2a38b9b0181 100644 --- a/htdocs/langs/fr_CI/products.lang +++ b/htdocs/langs/fr_CI/products.lang @@ -1,2 +1,2 @@ # Dolibarr language file - Source file is en_US - products -CustomCode=Customs / Commodity / HS code +AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/fr_CI/withdrawals.lang b/htdocs/langs/fr_CI/withdrawals.lang new file mode 100644 index 00000000000..facdefc082f --- /dev/null +++ b/htdocs/langs/fr_CI/withdrawals.lang @@ -0,0 +1,2 @@ +# 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 new file mode 100644 index 00000000000..552865118f1 --- /dev/null +++ b/htdocs/langs/fr_CM/accountancy.lang @@ -0,0 +1,2 @@ +# 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 c1d306ec390..b68a0680537 100644 --- a/htdocs/langs/fr_CM/admin.lang +++ b/htdocs/langs/fr_CM/admin.lang @@ -1,3 +1,5 @@ # 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) 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/compta.lang b/htdocs/langs/fr_CM/compta.lang deleted file mode 100644 index c7c41488180..00000000000 --- a/htdocs/langs/fr_CM/compta.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - compta -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account diff --git a/htdocs/langs/fr_CM/mrp.lang b/htdocs/langs/fr_CM/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/fr_CM/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/fr_CM/products.lang b/htdocs/langs/fr_CM/products.lang index 6e900475275..2a38b9b0181 100644 --- a/htdocs/langs/fr_CM/products.lang +++ b/htdocs/langs/fr_CM/products.lang @@ -1,2 +1,2 @@ # Dolibarr language file - Source file is en_US - products -CustomCode=Customs / Commodity / HS code +AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/fr_CM/withdrawals.lang b/htdocs/langs/fr_CM/withdrawals.lang new file mode 100644 index 00000000000..facdefc082f --- /dev/null +++ b/htdocs/langs/fr_CM/withdrawals.lang @@ -0,0 +1,2 @@ +# 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 7937bfcebbf..3b2fc290352 100644 --- a/htdocs/langs/fr_FR/accountancy.lang +++ b/htdocs/langs/fr_FR/accountancy.lang @@ -16,6 +16,8 @@ ThisService=Ce service ThisProduct=Ce produit DefaultForService=Défaut pour les services DefaultForProduct=Défaut pour les produits +ProductForThisThirdparty=Produit pour ce tiers +ServiceForThisThirdparty=Service pour ce tiers CantSuggest=Suggestion no possible AccountancySetupDoneFromAccountancyMenu=La partie principale de la configuration de la comptabilité se fait depuis le menu %s ConfigAccountingExpert=Configuration du module de comptabilité (partie double) @@ -48,6 +50,7 @@ CountriesExceptMe=Tous les pays sauf %s AccountantFiles=Exporter les documents sources ExportAccountingSourceDocHelp=Avec cet outil, vous pouvez exporter les événements sources (liste et PDF) qui ont été utilisés pour générer votre comptabilité. Pour exporter vos journaux, utilisez l'entrée de menu %s - %s. VueByAccountAccounting=Vue par comptes comptables +VueBySubAccountAccounting=Affichage par compte auxiliaire MainAccountForCustomersNotDefined=Compte comptable général pour les clients non défini dans la configuration MainAccountForSuppliersNotDefined=Compte comptable général pour les fournisseurs non défini dans la configuration @@ -62,16 +65,16 @@ AccountancyAreaDescActionOnceBis=Les prochaines étapes doivent être faites pou AccountancyAreaDescActionFreq=Les actions suivantes sont habituellement exécutées chaque mois, semaine, ou jour pour les très grandes entreprises ... AccountancyAreaDescJournalSetup=Étape %s : Créer ou vérifier le contenu de la liste des journaux depuis le menu %s -AccountancyAreaDescChartModel=ÉTAPE %s: Vérifiez qu'il existe un modèle de plan comptable ou créez-en un à partir du menu %s -AccountancyAreaDescChart=ÉTAPE %s: Sélectionnez et | ou complétez votre plan de compte dans le menu %s +AccountancyAreaDescChartModel=Étape %s : Vérifiez qu'il existe un modèle de plan comptable ou créez-en un à partir du menu %s +AccountancyAreaDescChart=Étape %s : Sélectionnez et | ou complétez votre plan de compte dans le menu %s AccountancyAreaDescVat=Étape %s : Définissez les comptes comptables de chaque taux de TVA utilisé. Pour cela, suivez le menu suivant %s. -AccountancyAreaDescDefault=Étape %s: Définir les comptes de comptabilité par défaut. Pour cela, utilisez l'entrée de menu %s. +AccountancyAreaDescDefault=Étape %s : Définir les comptes de comptabilité par défaut. Pour cela, utilisez l'entrée de menu %s. AccountancyAreaDescExpenseReport=Étape %s : Définissez les comptes comptables par défaut des dépenses des notes de frais. Pour cela, suivez le menu suivant %s. AccountancyAreaDescSal=Étape %s : Définissez les comptes comptables de paiements de salaires. Pour cela, suivez le menu suivant %s. AccountancyAreaDescContrib=Étape %s : Définissez les comptes comptables des dépenses spéciales (taxes diverses). Pour cela, suivez le menu suivant %s. AccountancyAreaDescDonation=Étape %s : Définissez le compte comptable par défaut des dons. Pour cela, suivez le menu suivant %s. -AccountancyAreaDescSubscription=ÉTAPE %s: définissez les comptes de comptabilité par défaut pour les abonnements des membres. Pour cela, utilisez l’entrée de menu %s. +AccountancyAreaDescSubscription=Étape %s : définissez les comptes de comptabilité par défaut pour les abonnements des membres. Pour cela, utilisez l’entrée de menu %s. AccountancyAreaDescMisc=Étape %s : Définissez le compte par défaut obligatoire et les comptes comptables par défaut pour les transactions diverses. Pour cela, utilisez l'entrée du menu suivant %s. AccountancyAreaDescLoan=Étape %s : Définissez les comptes comptables par défaut des emprunts. Pour cela, suivez le menu suivant %s. AccountancyAreaDescBank=Étape %s : Définissez les comptes comptables et les codes des journaux de chaque compte bancaire et financier. Vous pouvez commencer à partir de la page %s. @@ -128,7 +131,7 @@ InvoiceLinesDone=Lignes de factures liées ExpenseReportLines=Lignes de notes de frais à lier ExpenseReportLinesDone=Lignes de notes de frais liées IntoAccount=Lier ligne avec le compte comptable -TotalForAccount=Total pour le compte comptable +TotalForAccount=Total compte comptable Ventilate=Lier @@ -144,7 +147,7 @@ NotVentilatedinAccount=Non lié au compte comptable XLineSuccessfullyBinded=%s produits/service correctement liés à un compte comptable XLineFailedToBeBinded=%s produits/services n'ont pu être liés à un compte comptable -ACCOUNTING_LIMIT_LIST_VENTILATION=Nombre d'éléments à lier représentés par page (maximum recommandé: 50) +ACCOUNTING_LIMIT_LIST_VENTILATION=Nombre maximum de lignes pour les listes et les pages de liaison comptable (recommandé : 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Commencez le tri de la page "Lien à réaliser" par les éléments les plus récents ACCOUNTING_LIST_SORT_VENTILATION_DONE=Commencez le tri de la page "Liens réalisés" par les éléments les plus récents @@ -199,6 +202,7 @@ Docref=Référence LabelAccount=Libellé du compte LabelOperation=Libellé opération Sens=Sens +AccountingDirectionHelp=Pour le compte comptable d'un client, utilisez Crédit pour enregistrer un règlement reçu.<br>Pour le compte comptable d'un fournisseur, utilisez Débit pour enregistrer un règlement reçu. LetteringCode=Code de lettrage Lettering=Lettrage Codejournal=Journal @@ -206,7 +210,8 @@ JournalLabel=Libellé journal NumPiece=Numéro de pièce TransactionNumShort=Num. transaction AccountingCategory=Groupes personnalisés -GroupByAccountAccounting=Grouper par compte comptable +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 ByAccounts=Par compte comptable ByPredefinedAccountGroups=Par groupes prédéfinis @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Paiement non lié à un produit / service OpeningBalance=Solde d'ouverture ShowOpeningBalance=Afficher balance d'ouverture HideOpeningBalance=Cacher balance d'ouverture -ShowSubtotalByGroup=Afficher le sous-total par groupe +ShowSubtotalByGroup=Afficher le sous-total par niveau Pcgtype=Groupe de comptes comptables PcgtypeDesc=Les groupes de comptes sont utilisés comme critères de filtre et de regroupement prédéfinis pour certains rapports de comptabilité. Par exemple, «INCOME» ou «EXPENSE» sont utilisés en tant que groupes pour la comptabilité afin de générer le rapport dépenses / revenus. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consultez ici la liste des lignes de notes de frais lié DescVentilExpenseReportMore=Si vous avez défini des comptes comptables au niveau des types de lignes notes de frais, l'application sera capable de faire l'association automatiquement entre les lignes de notes de frais et le compte comptable de votre plan comptable, en un simple clic sur le bouton <strong>"%s"</strong>. Si aucun compte n'a été défini au niveau du dictionnaire de types de lignes de notes de frais ou si vous avez toujours des lignes de notes de frais non liables automatiquement à un compte comptable, vous devez faire l'association manuellement depuis le menu "<strong>%s</strong>". DescVentilDoneExpenseReport=Consultez ici la liste des lignes des notes de frais et leur compte comptable +Closure=Clôture annuelle DescClosure=Consultez ici le nombre de mouvements par mois non validés et les périodes fiscales déjà ouvertes OverviewOfMovementsNotValidated=Etape 1/ Aperçu des mouvements non validés. (Nécessaire pour clôturer un exercice comptable) +AllMovementsWereRecordedAsValidated=Tous les mouvements ont été enregistrés et validés +NotAllMovementsCouldBeRecordedAsValidated=Tous les mouvements n'ont pas pu être enregistrés et validés ValidateMovements=Valider les mouvements DescValidateMovements=Toute modification ou suppression d'écriture, de lettrage et de suppression sera interdite. Toutes les entrées pour un exercice doivent être validées, sinon la fermeture ne sera pas possible -SelectMonthAndValidate=Sélectionnez le mois et validez les mouvements ValidateHistory=Lier automatiquement AutomaticBindingDone=Liaison automatique faite @@ -293,6 +300,7 @@ Accounted=En comptabilité NotYetAccounted=Pas encore en comptabilité ShowTutorial=Afficher le tutoriel NotReconciled=Non rapproché +WarningRecordWithoutSubledgerAreExcluded=Attention : toutes les opérations sans compte auxiliaire défini sont filtrées et exclues de cet écran ## Admin BindingOptions=Options de liaisons avec les codes comptables @@ -337,6 +345,7 @@ Modelcsv_LDCompta10=Export pour LD Compta (v10 et supérieure) Modelcsv_openconcerto=Export pour OpenConcerto (Test) Modelcsv_configurable=Export configurable Modelcsv_FEC=Export FEC +Modelcsv_FEC2=Export FEC (avec dates enregistrement et document inversées) Modelcsv_Sage50_Swiss=Export pour Sage 50 Suisse Modelcsv_winfic=Export pour Winfic - eWinfic - WinSis Compta Modelcsv_Gestinumv3=Export vers Gestinum (v3) diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 601ed14f0c1..ef48fc0a82d 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -56,6 +56,8 @@ GUISetup=Affichage 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é 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. @@ -85,7 +87,6 @@ ShowPreview=Afficher aperçu ShowHideDetails=Afficher/masquer les détails PreviewNotAvailable=Aperçu non disponible ThemeCurrentlyActive=Thème actif actuellement -CurrentTimeZone=Fuseau horaire PHP (serveur) MySQLTimeZone=Fuseau horaire MySQL (serveur) TZHasNoEffect=Les dates sont stockées et retournées par le serveur de base de données comme si elles étaient conservées sous forme de chaîne. Le fuseau horaire n'a d'effet que lorsque vous utilisez la fonction UNIX_TIMESTAMP (qui ne devrait pas être utilisé par Dolibarr, aussi le TZ de la base de données ne devrait avoir aucun effet, même si changé après que les données aient été saisies). Space=Espace @@ -153,8 +154,8 @@ 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 temporaires (pas de risque de perte de données). Note: L'effacement n'est réalisé que si le répertoire temp a été créé depuis plus de 24h. -PurgeDeleteTemporaryFilesShort=Effacer les fichiers temporaires +PurgeDeleteTemporaryFiles=Effacer tous les fichiers de log et fichiers temporaires (pas de risque de perte de données). Le paramètre peut être 'tempfilesold', 'logfiles' ou les 2 'tempfilesold+logfiles'. Note : La suppression s'applique aux fichiers supprimés depuis 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 PurgeNothingToDelete=Aucun dossier ou fichier à supprimer. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Preferred Partners OtherResources=Autres ressources ExternalResources=Ressources externes SocialNetworks=Réseaux sociaux +SocialNetworkId=ID du réseau social ForDocumentationSeeWiki=Pour la documentation utilisateur, développeur ou les FAQs,<br>consultez le wiki Dolibarr:<br><b><a href="%s" target="_blank">%s</a></b> ForAnswersSeeForum=Pour tout autre question/aide, vous pouvez utiliser le forum Dolibarr:<br><b><a href="%s" target="_blank">%s</a></b> HelpCenterDesc1=Voici quelques ressources pour obtenir de l’aide et du support avec Dolibarr. @@ -347,7 +349,7 @@ UpdateServerOffline=Serveur de mise à jour hors ligne 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> +GenericMaskCodes3=Tout autre caractère dans le masque sera laissé inchangé (sauf * ou ? en 13ème position en EAN13).<br>Les espaces ne sont pas permis.<br>En EAN13 le dernier caractère après la dernière } se plaçant en 13ème position<br>devra ê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> @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Exemples avec la configuration actuelle ListOfDirectories=Liste des répertoires des modèles OpenDocument ListOfDirectoriesForModelGenODT=Liste des répertoires contenant des documents modèles au format OpenDocument.<br><br>Indiquer ici les chemins complets de répertoire.<br>Ajouter un retour à la ligne entre chaque répertoire.<br>Pour indiquer un répertoire du module GED, mettre ici <b>DOL_DATA_ROOT/ecm/nomdurepertoireged</b><br><br>Les fichiers modèles dans ces répertoires doivent se terminer par <b>.odt</b> ou <b>.ods</b>. NumberOfModelFilesFound=Nombre de fichiers modèles ODT/ODS trouvés dans ce(s) répertoire(s) -ExampleOfDirectoriesForModelGen=Exemple de syntaxe :<br>c:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +ExampleOfDirectoriesForModelGen=Exemples de syntaxe : <br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br>Pour savoir comment rédiger des modèles de document odt avant de les placer dans un de ces répertoires, consulter la documentation du wiki : FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Créer_un_modèle_de_document_ODT FirstnameNamePosition=Ordre d'affichage prénom/nom @@ -406,7 +408,7 @@ UrlGenerationParameters=Sécurisation des URLs SecurityTokenIsUnique=Utiliser un paramètre securekey unique pour chaque URL ? EnterRefToBuildUrl=Entrer la référence pour l'objet %s GetSecuredUrl=Obtenir l'URL calculée -ButtonHideUnauthorized=Cacher les boutons non autorisés, pour les utilisateurs non admin, au lieu de les voir grisés +ButtonHideUnauthorized=Cacher les boutons non autorisés pour les utilisateurs internes également (sinon, il seront seulement grisés) OldVATRates=Ancien taux de TVA NewVATRates=Nouveau taux de TVA PriceBaseTypeToChange=Modifier sur les prix dont la référence de base est le @@ -1306,7 +1308,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=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. +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=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. @@ -1596,8 +1598,13 @@ ServiceSetup=Configuration du module Services 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 +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. +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=Visualisation des descriptions de produits dans la langue du tiers +ViewProductDescInThirdpartyLanguageAbility=Afficher la description des produits sur les formulaires dans la langue du tiers (sinon dans la langue de l'utilisateur) UseSearchToSelectProductTooltip=Si vous avez un nombre important de produits (>100 000), vous pourrez améliorer les performances en positionnant la constante PRODUCT_DONOTSEARCH_ANYWHERE à 1 dans Configuration->Divers. La recherche sera alors limité au début des chaines. UseSearchToSelectProduct=Attendre que vous ayez appuyé sur une touche avant de charger le contenu de la liste déroulante des produits (Cela peut augmenter les performances si vous avez un grand nombre de produits, mais cela est moins convivial) SetDefaultBarcodeTypeProducts=Type de code-barre utilisé par défaut pour les produits @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Menus personalisés non liés à un menu haut NewMenu=Nouveau menu MenuHandler=Gestionnaire de menu MenuModule=Module source -HideUnauthorizedMenu= Masquer les menus non autorisés aussi pour les utilisateurs internes (sinon juste grisés) +HideUnauthorizedMenu=Cacher les menus non autorisés aussi pour les utilisateurs internes également (sinon, il seront seulement grisés) DetailId=Identifiant du menu DetailMenuHandler=Nom du gestionnaire menu dans lequel faire apparaitre le nouveau menu DetailMenuModule=Nom du module si l'entrée menu est issue d'un module @@ -1779,6 +1786,7 @@ ApiSetup=Configuration du module API REST ApiDesc=En activant ce module, Dolibarr devient aussi serveur de services API de type REST ApiProductionMode=Activer le mode « production » (ceci activera l'utilisation du cache pour la gestion des services) ApiExporerIs=Vous pouvez explorer et tester les API par l'URL +SwaggerDescriptionFile=Swagger JSON description file of APIs OnlyActiveElementsAreExposed=Seuls les éléments en rapport avec un module actif sont présentés. ApiKey=Clé pour l'API WarningAPIExplorerDisabled=L'explorateur d'API est désactivé. L'explorateur d'API n'est pas nécessaire pour le fonctionnement des API. il s'agit d'un outil pour les développeurs pour en tester les services. Si cet outil vous est nécessaire, activez le module API REST dans la liste des modules. @@ -1983,11 +1991,12 @@ EMailHost=Hôte du serveur de messagerie IMAP MailboxSourceDirectory=Répertoire source de la boîte aux lettres MailboxTargetDirectory=Répertoire cible de la boîte aux lettres EmailcollectorOperations=Opérations à effectuer par le collecteur +EmailcollectorOperationsDesc=Les opérations sont exécutées de haut en bas MaxEmailCollectPerCollect=Nombre maximum d'emails collectés par collecte CollectNow=Collecter maintenant ConfirmCloneEmailCollector=Êtes-vous sûr de vouloir cloner ce collecteur de courrier électronique %s? -DateLastCollectResult=Date de dernière collecte essayée -DateLastcollectResultOk=Date de dernière collecte réussie +DateLastCollectResult=Date de la dernière tentative de collecte +DateLastcollectResultOk=Date de la dernière collecte réussie LastResult=Dernier résultat EmailCollectorConfirmCollectTitle=Confirmation de la collecte Email EmailCollectorConfirmCollect=Voulez-vous exécuter la collecte pour ce collecteur maintenant ? @@ -2083,3 +2092,7 @@ 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. 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 diff --git a/htdocs/langs/fr_FR/agenda.lang b/htdocs/langs/fr_FR/agenda.lang index 3b7a9f0e8c0..7ecd5800861 100644 --- a/htdocs/langs/fr_FR/agenda.lang +++ b/htdocs/langs/fr_FR/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Nombre d'événements ListOfActions=Liste des événements EventReports=Rapport des évènements Location=Lieu -ToUserOfGroup=Assigné à tout utilisateur du groupe +ToUserOfGroup=Événement assigné à tout utilisateur du groupe EventOnFullDay=Événement sur la(les) journée(s) MenuToDoActions=Événements incomplets MenuDoneActions=Événements terminés @@ -130,7 +130,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 de contacts AgendaHideBirthdayEvents=Masquer les anniversaires de contacts Busy=Occupé ExportDataset_event1=Liste des événements de l'agenda @@ -152,6 +152,7 @@ ActionType=Type événement DateActionBegin=Date début événément ConfirmCloneEvent=Êtes-vous sûr de vouloir cloner cet événement <b>%s</b> ? RepeatEvent=Evénement répétitif +OnceOnly=Une seule fois EveryWeek=Chaque semaine EveryMonth=Chaque mois DayOfMonth=Jour du mois @@ -160,10 +161,9 @@ DateStartPlusOne=Date de début + 1 heure SetAllEventsToTodo=Réglez tous les événements à "A faire" SetAllEventsToInProgress=Définir tous les événements à "En cours" SetAllEventsToFinished=Définir tous les événements sur "Terminés" -ReminderTime=Délai de rappel avant l'événement +ReminderTime=Période de rappel avant l'événement TimeType=Type de durée ReminderType=Type de rappel -AddReminder=Créer une notification de rappel automatique pour cet évènement -ErrorReminderActionCommCreation=Erreur lors de la création de la notification de rappel de cet événement -BrowserPush=Notification navigateur -EventReminder=Rappel événement +AddReminder=Créer une notification de rappel automatique pour cet événement +ErrorReminderActionCommCreation=Erreur lors de la création de la notification de rappel pour cet événement +BrowserPush=Notification par Popup navigateur diff --git a/htdocs/langs/fr_FR/banks.lang b/htdocs/langs/fr_FR/banks.lang index 17a6d56823f..b6ccc999c82 100644 --- a/htdocs/langs/fr_FR/banks.lang +++ b/htdocs/langs/fr_FR/banks.lang @@ -173,10 +173,11 @@ SEPAMandate=Mandat SEPA 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=Clôture de caisse +CashControl=Contrôle de caisse POS NewCashFence=Nouvelle 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 diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang index b5588c21df3..342924e1680 100644 --- a/htdocs/langs/fr_FR/bills.lang +++ b/htdocs/langs/fr_FR/bills.lang @@ -464,6 +464,7 @@ PaymentByChequeOrderedToShort=Règlement TTC par chèque à l'ordre de SendTo=envoyé à PaymentByTransferOnThisBankAccount=Règlement par virement sur le compte bancaire suivant VATIsNotUsedForInvoice=* TVA non applicable art-293B du CGI +VATIsNotUsedForInvoiceAsso=* TVA non applicable art-261-7 du CGI LawApplicationPart1=Par application de la loi 80.335 du 12/05/80 LawApplicationPart2=les marchandises demeurent la propriété du LawApplicationPart3=vendeur jusqu'à complet encaissement de diff --git a/htdocs/langs/fr_FR/blockedlog.lang b/htdocs/langs/fr_FR/blockedlog.lang index c0619d33371..be1cefc6ef7 100644 --- a/htdocs/langs/fr_FR/blockedlog.lang +++ b/htdocs/langs/fr_FR/blockedlog.lang @@ -8,7 +8,7 @@ BrowseBlockedLog=Logs inaltérables ShowAllFingerPrintsMightBeTooLong=Afficher tous les journaux archivés (peut être long) ShowAllFingerPrintsErrorsMightBeTooLong=Afficher tous les journaux d'archives non valides (peut être long) DownloadBlockChain=Télécharger les empreintes -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=Le journal archivé n'est pas valide. Cela signifie que quelqu'un (un pirate informatique ?) a modifié certaines données de ce journal archivé après son enregistrement ou a effacé l'enregistrement archivé précédent (vérifiez que la ligne avec le numéro précédent existe). OkCheckFingerprintValidity=Le journal archivé est valide. Les données de cette ligne n'ont pas été modifiées et l'enregistrement suit le précédent. OkCheckFingerprintValidityButChainIsKo=Le journal archivé semble valide par rapport au précédent mais la chaîne était corrompue auparavant. AddedByAuthority=Stocké dans une autorité distante diff --git a/htdocs/langs/fr_FR/boxes.lang b/htdocs/langs/fr_FR/boxes.lang index e2964afd6a3..7fd402af050 100644 --- a/htdocs/langs/fr_FR/boxes.lang +++ b/htdocs/langs/fr_FR/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=Les %s derniers dons modifiés BoxTitleLastModifiedExpenses=Les %s dernières notes de frais modifiées BoxTitleLatestModifiedBoms=Les %s dernières nomenclatures modifiées BoxTitleLatestModifiedMos=Les %s dernières Ordres de Fabrication modifiées +BoxTitleLastOutstandingBillReached=Clients dont l'en-cours autorisé est dépassé BoxGlobalActivity=Activité globale (factures, propositions, commandes) BoxGoodCustomers=Bons clients BoxTitleGoodCustomers=%s bons clients +BoxScheduledJobs=Travaux planifiés +BoxTitleFunnelOfProspection=Tunnel de prospection FailedToRefreshDataInfoNotUpToDate=Échec du rafraichissement du flux RSS. Date du dernier rafraichissement : %s LastRefreshDate=Date dernier rafraichissement NoRecordedBookmarks=Pas de marques-pages personnels. @@ -92,8 +95,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=Dernières entrées manuelles en comptabilité -BoxTitleLastManualEntries=%s dernières entrées manuelles +BoxLastManualEntries=Latest record in accountancy entered manually or without source document +BoxTitleLastManualEntries=%s latest record entered manually or without source document 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 @@ -102,5 +105,7 @@ SuspenseAccountNotDefined=Le compte d'attente n'est pas défini BoxLastCustomerShipments=Dernières expéditions clients BoxTitleLastCustomerShipments=Les %s dernières expéditions clients NoRecordedShipments=Aucune expédition client +BoxCustomersOutstandingBillReached=Clients dont l'en-cours de facturation est dépassé # Pages AccountancyHome=Comptabilité +ValidatedProjects=Projets validés diff --git a/htdocs/langs/fr_FR/cashdesk.lang b/htdocs/langs/fr_FR/cashdesk.lang index 525062f1f32..5e292b0b637 100644 --- a/htdocs/langs/fr_FR/cashdesk.lang +++ b/htdocs/langs/fr_FR/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Bas de page AmountAtEndOfPeriod=Montant en fin de période (jour, mois ou année) TheoricalAmount=Montant théorique RealAmount=Montant réel -CashFence=Clôture de caisse -CashFenceDone=Clôture de caisse faite pour la période +CashFence=Fermeture de caisse +CashFenceDone=Clôture de caisse effectuée pour la période NbOfInvoices=Nb de factures Paymentnumpad=Type de pavé pour entrer le paiement Numberspad=Pavé numérique @@ -99,7 +99,8 @@ 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 -ControlCashOpening=Fenêtre de contrôle de caisse à l'ouverture du PDV +SaleStartedAt=Ventes démarrées le %s +ControlCashOpening=Pop-up de contrôle de caisse à l'ouverture du POS CloseCashFence=Clôturer la caisse CashReport=Rapport de caisse MainPrinterToUse=Imprimante principale à utiliser @@ -121,4 +122,5 @@ GiftReceiptButton=Ajouter un bouton "Reçu cadeau" GiftReceipt=Reçu cadeau ModuleReceiptPrinterMustBeEnabled=Le module Imprimante de reçus doit d'abord avoir été activée AllowDelayedPayment=Autoriser le paiement différé -PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts +PrintPaymentMethodOnReceipts=Imprimer le mode de paiement sur les tickets | reçus +WeighingScale=échelle de poids diff --git a/htdocs/langs/fr_FR/categories.lang b/htdocs/langs/fr_FR/categories.lang index f69d8573827..a28bf476eeb 100644 --- a/htdocs/langs/fr_FR/categories.lang +++ b/htdocs/langs/fr_FR/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=Zone des tags/catégories des projets UsersCategoriesArea=Espace tags/catégories des utlisateurs SubCats=Sous-catégories CatList=Liste des tags/catégories +CatListAll=Liste de toutes les catégories (de tous types) NewCategory=Nouveau tag/catégorie ModifCat=Modifier tag/catégorie CatCreated=Tags/catégorie créé(e) @@ -65,22 +66,22 @@ UsersCategoriesShort=Tags utlisateurs StockCategoriesShort=Tags/catégories d’entrepôt ThisCategoryHasNoItems=Cette catégorie ne contient aucun élément. CategId=ID du(de la) tag/catégorie -ParentCategory=Tag/catégorie parent -ParentCategoryLabel=Libellé du/de la tag/catégorie parent -CatSupList=Liste des tags/catégories de fournisseurs -CatCusList=Liste des tags/catégories de clients/prospects +ParentCategory=Catégorie parente +ParentCategoryLabel=Libellé du tag/catégorie parent +CatSupList=Liste des tags/catégories des fournisseurs +CatCusList=Liste des tags/catégories des clients/prospects CatProdList=Liste des tags/catégories de produits/services CatMemberList=Liste des tags/catégories de membres -CatContactList=Liste des tags/catégories de contacts -CatProjectsList=Liste des tags/catégories de projets -CatUsersList=Liste des tags/catégories d'utilisateurs +CatContactList=Liste des tags/catégories des contacts +CatProjectsList=Liste des tags/catégories des projets +CatUsersList=Liste des tags/catégories des utilisateurs CatSupLinks=Liens entre fournisseurs et tags/catégories CatCusLinks=Liens entre clients/prospects et tags/catégories CatContactsLinks=Liens entre contacts/adresses et tags/catégories CatProdLinks=Liens entre produits/services et tags/catégories CatMembersLinks=Liens entre membres et tags/catégories CatProjectsLinks=Liens entre projets et tags/catégories -CatUsersLinks=Liens entre utilisateurs et tags/catégories +CatUsersLinks=Liaisons entre les utilisateurs et les tags/catégories DeleteFromCat=Enlever des tags/catégories ExtraFieldsCategories=Attributs supplémentaires CategoriesSetup=Configuration des tags/catégories diff --git a/htdocs/langs/fr_FR/commercial.lang b/htdocs/langs/fr_FR/commercial.lang index 9b5721326d1..badec05e8c2 100644 --- a/htdocs/langs/fr_FR/commercial.lang +++ b/htdocs/langs/fr_FR/commercial.lang @@ -64,10 +64,10 @@ 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 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 1fc19440a1c..c07b5c4611f 100644 --- a/htdocs/langs/fr_FR/companies.lang +++ b/htdocs/langs/fr_FR/companies.lang @@ -213,7 +213,7 @@ 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=Identifiant Commun de l’Entreprise (ICE) +ProfId5MA=Identifiant Commun d’Entreprise (ICE) ProfId6MA=- ProfId1MX=Id. prof. 1 (R.F.C). ProfId2MX=ID. prof. 2 (R..P. IMSS) diff --git a/htdocs/langs/fr_FR/compta.lang b/htdocs/langs/fr_FR/compta.lang index bc79d32d709..648d8541d28 100644 --- a/htdocs/langs/fr_FR/compta.lang +++ b/htdocs/langs/fr_FR/compta.lang @@ -111,7 +111,7 @@ Refund=Rembourser SocialContributionsPayments=Paiements de charges fiscales/sociales ShowVatPayment=Affiche paiement TVA TotalToPay=Total à payer -BalanceVisibilityDependsOnSortAndFilters=Le solde est visible dans cette liste que si la table est triée en ordre croissant sur %s et filtré pour 1 compte bancaire +BalanceVisibilityDependsOnSortAndFilters=Le solde est visible dans cette liste que si la table est triée sur %s et filtré sur 1 compte bancaire (sans autres filtres) CustomerAccountancyCode=Code comptable client SupplierAccountancyCode=Code comptable fournisseur CustomerAccountancyCodeShort=Compte comptable client @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Bilan des recettes et dépenses, résumé annuel AnnualByCompanies=Balance revenus et dépenses, par groupes prédéfinis de comptes AnnualByCompaniesDueDebtMode=Bilan des recettes et dépenses, détaillé par regroupements prédéfinis, mode <b>%sCréances-Dettes%s</b> dit <b>comptabilité d'engagement</b>. AnnualByCompaniesInputOutputMode=Bilan des recettes et dépenses, détaillé par regroupements prédéfinis, mode <b>%sRecettes-Dépenses%s</b> dit <b>comptabilité de caisse</b>. -SeeReportInInputOutputMode=Voir %sanalyse des paiements%s pour un calcul sur les paiements réels effectués même s'ils ne sont pas encore comptabilisés dans le Grand Livre. -SeeReportInDueDebtMode=Voir %sanalyse des factures%s pour un calcul basé sur les factures enregistrées connues même si elles ne sont pas encore comptabilisées dans le Grand Livre. -SeeReportInBookkeepingMode=Voir le <b> %sRapport sur le Grand Livre%s </b> pour un calcul sur les <b> tables du Grand Livre</b> +SeeReportInInputOutputMode=Voir <b>%sanalyse des paiements%s</b> pour un calcul sur les <b>paiements réels effectués</b> même s'ils ne sont pas encore comptabilisés dans le grand livre. +SeeReportInDueDebtMode=Voir <b>%sanalyse des documents enregistrés%s </b>pour un calcul basé sur les <b>documents enregistrées</b> même s'ils ne sont pas encore comptabilisés dans le Grand Livre. +SeeReportInBookkeepingMode=Voir <b> %sanalyse du grand livre%s </b> pour un rapport basé sur la <b>comptabilité</b> RulesAmountWithTaxIncluded=- Les montants affichés sont les montants taxe incluse RulesResultDue=- Il comprend les factures impayées, les dépenses, la TVA, les dons, qu'ils soient payées ou non. Il comprend également les salaires versés. <br> - Il est basé sur la date de facturation des factures et sur la date des dépenses et paiement des taxes. Pour les salaires définis avec le module Salaire, la date de valeur du paiement est utilisée. RulesResultInOut=- Il comprend les paiements réels effectués sur les factures, les dépenses, la TVA et les salaires. <br> - Il est basé sur les dates de paiement des factures, les dépenses, la TVA et les salaires. La date du don pour le don. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=Cela inclut les enregistrements dans votre Gr SeePageForSetup=Voir le menu <a href="%s"> %s </a> pour la configuration DepositsAreNotIncluded=- Les factures d'acomptes ne sont pas incluses DepositsAreIncluded=- Les factures d'acomptes sont incluses +LT1ReportByMonth=Rapport de taxe 2 par mois +LT2ReportByMonth=Rapport de taxe 3 par mois LT1ReportByCustomers=Rapport Tax 2 par Tiers LT2ReportByCustomers=Rapport Tax 3 par Tiers LT1ReportByCustomersES=Rapport par tiers des RE LT2ReportByCustomersES=Rapport par client des IRPF VATReport=Rapport TVA VATReportByPeriods=Rapport de TVA par période +VATReportByMonth=Rapport de TVA par mois VATReportByRates=Rapport TVA par taux VATReportByThirdParties=Rapport TVA par Tiers VATReportByCustomers=Rapport par client diff --git a/htdocs/langs/fr_FR/cron.lang b/htdocs/langs/fr_FR/cron.lang index b154c5de72c..5d7b0fc7462 100644 --- a/htdocs/langs/fr_FR/cron.lang +++ b/htdocs/langs/fr_FR/cron.lang @@ -84,4 +84,8 @@ MakeLocalDatabaseDumpShort=Sauvegarde locale de base MakeLocalDatabaseDump=Créez un fichier dump de base local. Les paramètres sont: compression ('gz' ou 'bz' ou 'none'), type de sauvegarde ('mysql', 'pgsql', 'auto'), 1, 'auto' ou nom du fichier à générer, nombre de fichiers de sauvegarde à garder WarningCronDelayed=Attention, à des fins de performance, quelle que soit la prochaine date d'exécution des travaux activés, vos travaux peuvent être retardés jusqu'à %s heures avant d'être exécutés. DATAPOLICYJob=Nettoyeur de données et anonymiseur -JobXMustBeEnabled=Le poste %s doit être activé +JobXMustBeEnabled=La tâche planifiée %s doit être activée +# Cron Boxes +LastExecutedScheduledJob=Dernier travail planifié exécuté +NextScheduledJobExecute=Prochaine travail planifié à exécuter +NumberScheduledJobError=Nombre de travaux planifiées en erreur diff --git a/htdocs/langs/fr_FR/deliveries.lang b/htdocs/langs/fr_FR/deliveries.lang index 29cbd5736cf..bd13cce814c 100644 --- a/htdocs/langs/fr_FR/deliveries.lang +++ b/htdocs/langs/fr_FR/deliveries.lang @@ -27,6 +27,6 @@ Recipient=Destinataire ErrorStockIsNotEnough=Le stock est insuffisant Shippable=Expédiable NonShippable=Non expédiable -ShowShippableCommand=Afficher statut expédiabilité +ShowShippableStatus=Afficher le statut Expédiable ShowReceiving=Afficher le bon de réception NonExistentOrder=Commande inexistante diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang index abd1c6ec9f9..f2e046506f7 100644 --- a/htdocs/langs/fr_FR/errors.lang +++ b/htdocs/langs/fr_FR/errors.lang @@ -5,9 +5,10 @@ NoErrorCommitIsDone=Pas d'erreur, on valide # Errors ErrorButCommitIsDone=Erreurs trouvées mais on valide malgré tout 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 %s existe déjà. +ErrorRefAlreadyExists=La 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é. @@ -49,6 +50,7 @@ ErrorFieldsRequired=Des champs obligatoires n'ont pas été renseignés ErrorSubjectIsRequired=Le sujet du mail est obligatoire ErrorFailedToCreateDir=Echec à la création d'un répertoire. Vérifiez que le user du serveur Web ait bien les droits d'écriture dans les répertoires documents de Dolibarr. Si le paramètre <b>safe_mode</b> a été activé sur ce PHP, vérifiez que les fichiers php dolibarr appartiennent à l'utilisateur du serveur Web. ErrorNoMailDefinedForThisUser=Email non défini pour cet utilisateur +ErrorSetupOfEmailsNotComplete=La configuration de l'envoi des e-mails n'est pas terminée ErrorFeatureNeedJavascript=Cette fonctionnalité a besoin de javascript activé pour fonctionner. Modifiez dans configuration - affichage. ErrorTopMenuMustHaveAParentWithId0=Un menu de type 'Top' ne peut avoir de menu père. Mettre 0 dans l'id père ou choisir un menu de type 'Left'. ErrorLeftMenuMustHaveAParentId=Un menu de type 'Left' doit avoir un id de père. @@ -76,7 +78,7 @@ ErrorExportDuplicateProfil=Ce nom de profil existe déjà pour ce lot d'export. ErrorLDAPSetupNotComplete=Le matching Dolibarr-LDAP est incomplet. ErrorLDAPMakeManualTest=Un fichier .ldif a été généré dans le répertoire %s. Essayez de charger ce fichier manuellement depuis la ligne de commande pour plus de détail sur l'erreur. ErrorCantSaveADoneUserWithZeroPercentage=Impossible de sauver une action à l'état "non commencé" si le champ "réalisé par" est aussi défini. -ErrorRefAlreadyExists=La référence utilisée pour la création existe déjà +ErrorRefAlreadyExists=Le référence <b>%s</b> existe déjà. ErrorPleaseTypeBankTransactionReportName=Choisissez le nom du relevé bancaire sur lequel la ligne est rapportées (Format AAAAMM ou AAAAMMJJ) ErrorRecordHasChildren=Impossible de supprimer l'enregistrement car il possède des enregistrements fils. ErrorRecordHasAtLeastOneChildOfType=L'objet a au moins un enfant de type %s @@ -217,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=Vous devez choisir si l'article e ErrorDiscountLargerThanRemainToPaySplitItBefore=La réduction que vous essayez d'appliquer est supérieure au montant du paiement. Auparavant, divisez le rabais en 2 rabais plus petits. ErrorFileNotFoundWithSharedLink=Fichier non trouvé. Peut être que la clé de partage a été modifiée ou le fichier a été récemment supprimé. ErrorProductBarCodeAlreadyExists=Le code-barre du produit %s existe déjà sur une autre référence de produit -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Notez également que l'utilisation d'un produit virtuel pour augmenter ou réduire automatiquement les sous-produits n'est pas possible lorsqu'au moins un sous-produit (ou sous-produit de sous-produits) a besoin d'un numéro de série/lot. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Notez également que l'utilisation d'un kit pour augmenter ou réduire automatiquement les sous-produits n'est pas possible lorsqu'au moins un sous-produit (ou sous-produit de sous-produits) a besoin d'un numéro de série/lot. ErrorDescRequiredForFreeProductLines=La description est obligatoire pour les lignes avec un produit non prédéfini ErrorAPageWithThisNameOrAliasAlreadyExists=La page / container <strong> %s </strong> a le même nom ou un autre alias que celui que vous tentez d'utiliser. ErrorDuringChartLoad=Erreur lors du chargement du tableau de compte. Si certains comptes n'ont pas été chargés, vous pouvez toujours les entrer manuellement. @@ -244,6 +246,16 @@ ErrorReplaceStringEmpty=Erreur, la chaîne à remplacer est vide ErrorProductNeedBatchNumber=Erreur, le produit '<b> %s </b>' a besoin d'un numéro de lot/série ErrorProductDoesNotNeedBatchNumber=Erreur, le produit '<b> %s </b>' n'accepte pas un numéro de lot/série ErrorFailedToReadObject=Erreur, échec de la lecture de l'objet de type <b> %s </b> +ErrorParameterMustBeEnabledToAllwoThisFeature=Erreur, le paramètre <b> %s </b> doit être activé dans <b> conf/conf.php <b> pour permettre l'utilisation de l'interface de ligne de commande par le planificateur de travaux interne +ErrorLoginDateValidity=Erreur, cet identifiant est hors de la plage de date de validité +ErrorValueLength=La longueur du champ <b>%s</b> doit être supérieure à <b>%s</b> +ErrorReservedKeyword=Le terme '<b>%s</b>' est un mot clé réservé +ErrorNotAvailableWithThisDistribution=Non disponible dans cette distribution +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 + # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Votre paramètre PHP upload_max_filesize (%s) est supérieur au paramètre PHP post_max_size (%s). Ceci n'est pas une configuration cohérente. WarningPasswordSetWithNoAccount=Un mot de passe a été fixé pour cet adhérent. Cependant, aucun compte d'utilisateur n'a été créé. Donc, ce mot de passe est stocké, mais ne peut être utilisé pour accéder à Dolibarr. Il peut être utilisé par un module/interface externe, mais si vous n'avez pas besoin de définir ni login ni mot de passe pour un adhérent, vous pouvez désactiver l'option «Gérer un login pour chaque adhérent" depuis la configuration du module Adhérents. Si vous avez besoin de gérer un login, mais pas de mot de passe, vous pouvez laisser ce champ vide pour éviter cet avertissement. Remarque: L'email peut également être utilisé comme login si l'adhérent est lié à un utilisateur. @@ -268,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Votre identifiant a été modifié. Par s WarningAnEntryAlreadyExistForTransKey=Une donnée identique existe déjà pour la traduction du code dans cette langue WarningNumberOfRecipientIsRestrictedInMassAction=Attention, le nombre de destinataires différents est limité à <b>%s</b> lorsque vous utilisez les actions en masse sur les listes WarningDateOfLineMustBeInExpenseReportRange=Attention, la date de la ligne n'est pas dans la plage de la note de frais +WarningProjectDraft=Le projet est au statut brouillon. Validez-le pour utiliser les tâches WarningProjectClosed=Le projet est fermé. Vous devez d'abord le rouvrir. WarningSomeBankTransactionByChequeWereRemovedAfter=Certaines transactions bancaires ont été supprimées après que le relevé les incluant ait été généré. Aussi, le nombre de chèques et le total des encaissements peuvent différer du nombre et du total dans la liste. WarningFailedToAddFileIntoDatabaseIndex=Avertissement, échec de l’ajout d’une entrée de fichier dans le tableau d’index de la base de données GED +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 diff --git a/htdocs/langs/fr_FR/exports.lang b/htdocs/langs/fr_FR/exports.lang index 3de20e83d20..c3c426daf4e 100644 --- a/htdocs/langs/fr_FR/exports.lang +++ b/htdocs/langs/fr_FR/exports.lang @@ -133,4 +133,4 @@ KeysToUseForUpdates=Clé à utiliser pour mettre à jour les données NbInsert=Nombre de lignes insérées: %s NbUpdate=Nombre de lignes mises à jour: %s MultipleRecordFoundWithTheseFilters=Plusieurs enregistrements ont été trouvés avec ces filtres: %s -StocksWithBatch=Stocks et emplacements (entrepôts) des produits avec numéros de lots/séries \ No newline at end of file +StocksWithBatch=Stocks et entrepôts des produits avec numéro de lot/série diff --git a/htdocs/langs/fr_FR/install.lang b/htdocs/langs/fr_FR/install.lang index 29d8c39b8b3..f696c06c241 100644 --- a/htdocs/langs/fr_FR/install.lang +++ b/htdocs/langs/fr_FR/install.lang @@ -133,7 +133,7 @@ MigrationCustomerOrderShipping=Mise à jour stockage des expéditions des comman MigrationShippingDelivery=Mise à jour stockage des expéditions MigrationShippingDelivery2=Mise à jour stockage des expéditions 2 MigrationFinished=Migration terminée -LastStepDesc=<strong> Dernière étape </strong>: définissez ici le nom d'utilisateur et le mot de passe que vous souhaitez utiliser pour vous connecter à Dolibarr. <b> Ne perdez pas cette information, car il s’agit du compte principal pour administrer tous les comptes d’utilisateurs supplémentaires / supplémentaires. </b> +LastStepDesc=<strong> Dernière étape </strong>: définissez ici le nom d'utilisateur et le mot de passe que vous souhaitez utiliser pour vous connecter à Dolibarr. <b> Ne perdez pas cette information, car il s’agit du compte principal pour administrer tous les comptes d’utilisateurs autres / supplémentaires. </b> ActivateModule=Activation du module %s ShowEditTechnicalParameters=Cliquer ici pour afficher/éditer les paramètres techniques (mode expert) WarningUpgrade=Attention:\nAvez-vous d'abord effectué une sauvegarde de base de données?\nCeci est hautement recommandé. Une perte de données (due par exemple à des bogues dans mysql version 5.5.40/41/42/43) peut être possible au cours de ce processus. Il est donc essentiel de réaliser un vidage complet de votre base de données avant de commencer toute migration.\n\nCliquez sur OK pour démarrer le processus de migration ... diff --git a/htdocs/langs/fr_FR/mails.lang b/htdocs/langs/fr_FR/mails.lang index 66bc8728cd4..3788acb53c4 100644 --- a/htdocs/langs/fr_FR/mails.lang +++ b/htdocs/langs/fr_FR/mails.lang @@ -92,6 +92,7 @@ MailingModuleDescEmailsFromUser=E-mails entrés par l'utilisateur MailingModuleDescDolibarrUsers=Utilisateurs avec e-mail MailingModuleDescThirdPartiesByCategories=Tiers (par catégories/tags) SendingFromWebInterfaceIsNotAllowed=L'envoyer depuis l'interface Web n'est pas autorisé. +EmailCollectorFilterDesc=Tous les filtres doivent correspondre pour qu'un e-mail soit collecté # Libelle des modules de liste de destinataires mailing LineInFile=Ligne %s du fichier @@ -125,12 +126,13 @@ TagMailtoEmail=Email destinataire (incluant le lien "mailto:" html) NoEmailSentBadSenderOrRecipientEmail=Aucune email envoyé. Mauvais email expéditeur ou le destinataire. Vérifiez le profil de l'utilisateur. # Module Notifications Notifications=Notifications -NoNotificationsWillBeSent=Aucune notification par email n'est prévue pour cet événement et société -ANotificationsWillBeSent=1 notification va être envoyée par email -SomeNotificationsWillBeSent=%s notifications vont être envoyées par email -AddNewNotification=Activer un nouveau couple cible/évènement pour notification email -ListOfActiveNotifications=Liste des cibles/évènements actifs pour notification par emails -ListOfNotificationsDone=Liste des notifications emails envoyées +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 +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 MailSendSetupIs=La configuration d'envoi d'emails a été définir sur '%s'. Ce mode ne peut pas être utilisé pour envoyer des e-mailing en masse. MailSendSetupIs2=Vous devez d'abord aller, avec un compte d'administrateur, dans le menu %sAccueil - Configuration - EMails%s pour changer le paramètre <strong>'%s'</strong> pour utiliser le mode '%s'. Avec ce mode, vous pouvez entrer le paramétrage du serveur SMTP fourni par votre fournisseur de services Internet et utiliser la fonction d'envoi d'email en masse. MailSendSetupIs3=Si vous avez des questions sur la façon de configurer votre serveur SMTP, vous pouvez demander à %s. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Le fichier d'import doit être au format <strong>emai UseFormatInputEmailToTarget=Saisissez une chaîne de caractères au format <strong>email;nom;prénom;autre</strong> MailAdvTargetRecipients=Destinataires (sélection avancée) AdvTgtTitle=Remplissez les champs de saisie pour pré-sélectionner les tiers ou contacts/adresses cibles -AdvTgtSearchTextHelp=Utilisez %% comme caractères génériques. Par exemple, pour rechercher tous les éléments tels que <b> jean, joe, jim </b>, vous pouvez saisir <b>j%%</b>, vous pouvez également utiliser ; comme séparateur de valeur et utiliser ! pour exclure cette valeur. Par exemple, <b> jean; joe; jim%%;! jimo;!jima%</b> ciblera tous les jean, joe, commence par jim mais pas jimo et pas tout ce qui commence par jima. +AdvTgtSearchTextHelp=Utilisez %% comme caractères génériques. Par exemple, pour rechercher tous les éléments tels que <b> jean, joe, jim </b>, vous pouvez saisir <b>j%%</b>, vous pouvez également utiliser ; comme séparateur de valeur et utiliser ! pour exclure cette valeur. Par exemple, <b> jean; joe; jim%%;! jimo;!jima%%</b> ciblera tous les jean, joe, ce qui commence par jim mais pas jimo et pas tout ce qui commence par jima. AdvTgtSearchIntHelp=Utiliser un intervalle pour sélectionner un entier ou décimal AdvTgtMinVal=Valeur minimum AdvTgtMaxVal=Valeur maximum @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Créer filtre AdvTgtOrCreateNewFilter=Nom du nouveau filtre NoContactWithCategoryFound=Pas de contact/adresses avec cette catégorie NoContactLinkedToThirdpartieWithCategoryFound=Pas de contact/adresses associés à un ters avec cette catégorie -OutGoingEmailSetup=Configuration email sortant -InGoingEmailSetup=Configuration email entrant -OutGoingEmailSetupForEmailing=Configuration des e-mails sortants (pour le module %s) -DefaultOutgoingEmailSetup=Configuration des emails sortant +OutGoingEmailSetup=E-mails sortants +InGoingEmailSetup=E-mails entrants +OutGoingEmailSetupForEmailing=E-mails sortants (module %s) +DefaultOutgoingEmailSetup=Même configuration que la configuration globale des e-mails sortants Information=Information ContactsWithThirdpartyFilter=Contacts ayant pour tiers Unanswered=Sans réponse Answered=Répondu IsNotAnAnswer=N'est pas une réponse (e-mail initial) IsAnAnswer=Est une réponse à un e-mail initial +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 +DefaultStatusEmptyMandatory=Vide mais obligatoire diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index 3f1076eb335..a8b13c7e914 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=Pas de modèle défini pour ce type d'email AvailableVariables=Variables de substitution disponibles NoTranslation=Pas de traduction Translation=Traduction +CurrentTimeZone=Fuseau horaire PHP (serveur) EmptySearchString=Entrez des critères de recherche non vides +EnterADateCriteria=Saisissez une date NoRecordFound=Aucun enregistrement trouvé NoRecordDeleted=Aucun enregistrement supprimé NotEnoughDataYet=Pas assez de données @@ -85,6 +87,8 @@ FileWasNotUploaded=Un fichier a été sélectionné pour attachement mais n'a pa NbOfEntries=Nb d'entrées GoToWikiHelpPage=Consulter l'aide (nécessite un accès internet) GoToHelpPage=Consulter l'aide +DedicatedPageAvailable=Une page d'aide dédiée à cette page existe +HomePage=Page d'accueil RecordSaved=Enregistrement sauvegardé RecordDeleted=Enregistrement supprimé RecordGenerated=Enregistrement généré @@ -220,6 +224,7 @@ Value=Valeur PersonalValue=Valeur personnelle NewObject=Nouveau %s NewValue=Nouvelle valeur +OldValue=Ancienne valeur %s CurrentValue=Valeur courante Code=Code Type=Type @@ -273,6 +278,7 @@ DateModificationShort=Date modif. IPModification=Modification IP DateLastModification=Date de dernière modification DateValidation=Date validation +DateSigning=Date signature DateClosing=Date clôture DateDue=Date échéance DateValue=Date valeur @@ -356,7 +362,7 @@ UnitPriceHTCurrency=Prix ​​unitaire (HT) (devise) UnitPriceTTC=Prix unitaire TTC PriceU=P.U. PriceUHT=P.U. HT -PriceUHTCurrency=P.U. (devise) +PriceUHTCurrency=P.U. HT (devise) PriceUTTC=P.U TTC Amount=Montant AmountInvoice=Montant facture @@ -433,6 +439,7 @@ RemainToPay=Reste à payer Module=Module/Application Modules=Modules/Applications Option=Option +Filters=Filtres List=Liste FullList=Liste complète FullConversation=Conversation complète @@ -542,7 +549,7 @@ None=Aucun NoneF=Aucune NoneOrSeveral=Aucun ou plusieurs Late=Retard -LateDesc=Le délai qui définit si un enregistrement est en retard ou non dépend de votre configuration. Demandez à votre administrateur pour changer ce délai depuis Accueil - Configuration - Alertes +LateDesc=Le délai qui définit si un enregistrement est en retard ou non dépend de votre configuration. Demandez à votre administrateur pour changer ce délai depuis Accueil - Configuration - Alertes NoItemLate=Aucun élément en retard Photo=Photo Photos=Photos @@ -650,6 +657,7 @@ SupplierPreview=Aperçu fournisseur ShowCustomerPreview=Afficher aperçu client ShowSupplierPreview=Afficher aperçu fournisseur RefCustomer=Réf. client +InternalRef=Réf. interne Currency=Devise InfoAdmin=Information pour les administrateurs Undo=Annuler @@ -672,7 +680,6 @@ Email=Email NoEMail=Pas d'email AlreadyRead=Déjà lu NotRead=Non lu -Unread=Non lu NoMobilePhone=Pas de téléphone portable Owner=Propriétaire FollowingConstantsWillBeSubstituted=Les constantes suivantes seront substituées par leur valeur correspondante. @@ -1007,6 +1014,7 @@ SearchIntoContacts=Contacts SearchIntoMembers=Adhérents SearchIntoUsers=Utilisateurs SearchIntoProductsOrServices=Produits ou services +SearchIntoBatch=Lots / N° de série SearchIntoProjects=Projets SearchIntoMO=Ordres de fabrication SearchIntoTasks=Tâches @@ -1108,3 +1116,9 @@ UpToDate=Adhésion à jour OutOfDate=Adhésion expirée 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 +ConfirmAffectTagQuestion=Êtes-vous sur de vouloir affecter ces catégories aux %s lignes sélectionnées ? +CategTypeNotFound=Aucune catégorie trouvée diff --git a/htdocs/langs/fr_FR/members.lang b/htdocs/langs/fr_FR/members.lang index ea52dc21d7a..a541c347adb 100644 --- a/htdocs/langs/fr_FR/members.lang +++ b/htdocs/langs/fr_FR/members.lang @@ -162,6 +162,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=Ancien type de membre 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 9dea25a8b29..d2bce2082cb 100644 --- a/htdocs/langs/fr_FR/modulebuilder.lang +++ b/htdocs/langs/fr_FR/modulebuilder.lang @@ -40,6 +40,7 @@ PageForCreateEditView=Page PHP pour créer/modifier/afficher un enregistrement PageForAgendaTab=Page PHP pour l'onglet événement PageForDocumentTab=Page PHP pour l'onglet document PageForNoteTab=Page PHP pour l'onglet note +PageForContactTab=Page PHP pour l'onglet contact PathToModulePackage=Chemin du zip du package du module/application PathToModuleDocumentation=Chemin d'accès au fichier de documentation du module (%s) SpaceOrSpecialCharAreNotAllowed=Les espaces et les caractères spéciaux ne sont pas autorisés. @@ -77,7 +78,7 @@ IsAMeasure=Est une mesure DirScanned=Répertoire scanné NoTrigger=Pas de trigger NoWidget=Aucun widget -GoToApiExplorer=Se rendre sur l'explorateur d'API +GoToApiExplorer=Explorateur d'API ListOfMenusEntries=Liste des entrées du menu ListOfDictionariesEntries=Liste des entrées de dictionnaires ListOfPermissionsDefined=Liste des permissions @@ -91,6 +92,7 @@ SearchAllDesc=Le champ doit-il être utilisé pour effectuer une recherche à pa SpecDefDesc=Entrez ici toute la documentation que vous souhaitez joindre au module et qui n'a pas encore été définis dans d'autres onglets. Vous pouvez utiliser .md ou, mieux, la syntaxe enrichie .asciidoc. LanguageDefDesc=Entrez dans ces fichiers, toutes les clés et la traduction pour chaque fichier de langue. MenusDefDesc=Définissez ici les menus fournis par votre module +ImportExportProfiles=You will find here the Export or Import profiles provided by your module DictionariesDefDesc=Définissez ici les dictionnaires fournis par le module PermissionsDefDesc=Définissez ici les nouvelles permissions fournies par votre module MenusDefDescTooltip=Les menus fournis par votre module / application sont définis dans le tableau <strong>$this->menus</strong> dans le fichier descripteur de module. Vous pouvez modifier manuellement ce fichier ou utiliser l'éditeur intégré. <br><br> Remarque: une fois définis (et les modules réactivés), les menus sont également visibles dans l'éditeur de menus mis à la disposition des utilisateurs administrateurs sur %s. @@ -105,7 +107,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 vide) +DropTableIfEmpty=(Supprimer la table si elle est 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 @@ -126,7 +128,6 @@ UseSpecificEditorURL = Utiliser une URL d'éditeur spécifique UseSpecificFamily = Utiliser une famille spécifique UseSpecificAuthor = Utiliser un auteur spécifique UseSpecificVersion = Utiliser une version initiale spécifique -ModuleMustBeEnabled=Le module / application doit être activé d'abord IncludeRefGeneration=La référence de l'objet doit être générée automatiquement IncludeRefGenerationHelp=Cochez cette option si vous souhaitez inclure du code pour gérer la génération automatique de la référence IncludeDocGeneration=Je veux générer des documents à partir de l'objet @@ -140,3 +141,4 @@ TypeOfFieldsHelp=Type de champs: <br> varchar (99), double (24,8), réel, texte, 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 diff --git a/htdocs/langs/fr_FR/mrp.lang b/htdocs/langs/fr_FR/mrp.lang index f1eaeffdfed..51807552945 100644 --- a/htdocs/langs/fr_FR/mrp.lang +++ b/htdocs/langs/fr_FR/mrp.lang @@ -77,4 +77,28 @@ UnitCost=Coût unitaire TotalCost=Coût total BOMTotalCost=Le coût de production de cette nomenclature basé sur chaque quantité et produit à consommer (utilise le prix de revient si défini, sinon le PMP si défini, sinon le meilleur prix d'achat) GoOnTabProductionToProduceFirst=Vous devez avoir la production pour clôturer un Ordre de Fabrication (voir onglet '%s'). Mais vous pouvez l'annuler. -ErrorAVirtualProductCantBeUsedIntoABomOrMo=Un kit ne peut pas être utilisé dans une nomenclature ou un ordre de fabrication. +ErrorAVirtualProductCantBeUsedIntoABomOrMo=Un kit ne peut pas être utilisé dans une Nomenclature ou un Ordre de fabrication. +Workstation=Poste de travail +Workstations=Postes de travail +WorkstationsDescription=Gestion des postes de travail +WorkstationSetup = Workstations setup +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> ? +EnableAWorkstation=Activer le module Poste de travail +ConfirmDisableWorkstation=Êtes-vous sûr de vouloir désactiver le module Poste 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 +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 diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang index 0a5abbfbf3a..a8078129464 100644 --- a/htdocs/langs/fr_FR/other.lang +++ b/htdocs/langs/fr_FR/other.lang @@ -1,12 +1,10 @@ # Dolibarr language file - Source file is en_US - other -SecurityCode=Code de sécurité +SecurityCode=Code sécurité NumberingShort=N° Tools=Outils TMenuTools=Outils ToolsDesc=Cet espace regroupe divers outils non accessibles par les autres entrées du menu. <br>Tous ces outils sont accessibles depuis le menu sur le côté.. Birthday=Anniversaire -BirthdayDate=Date anniversaire -DateToBirth=Date de naissance BirthdayAlertOn=alerte anniversaire active BirthdayAlertOff=alerte anniversaire inactive TransKey=Traduction de la clé TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Mois précédent (numéro 1-12) la date de facturation TextPreviousMonthOfInvoice=Mois précédent (texte) de la date de facturation NextMonthOfInvoice=Le mois suivant (numéro 1-12) la date de facturation TextNextMonthOfInvoice=Le mois suivant (texte) la date de facturation +PreviousMonth=Mois précédent +CurrentMonth=Mois en cours ZipFileGeneratedInto=Fichier zip généré dans <b>%s</b> DocFileGeneratedInto=Fichier doc généré dans <b>%s</b>. JumpToLogin=Déconnecté. Aller à la page de connexion ... @@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Note de frais validée (approbation requise) Notify_EXPENSE_REPORT_APPROVE=Note de frais approuvé Notify_HOLIDAY_VALIDATE=Demande de congé validée (approbation requise) Notify_HOLIDAY_APPROVE=Demande de congé approuvée +Notify_ACTION_CREATE=Evénement ajouté à l'agenda SeeModuleSetup=Voir la configuration du module %s NbOfAttachedFiles=Nombre de fichiers/documents liés TotalSizeOfAttachedFiles=Taille totale fichiers/documents liés @@ -97,12 +98,9 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nVeuillez trouver, ci-joint PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nVeuillez trouver, ci-joint, la facture __REF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nVeuillez trouver, ci-joint, le bon d'expédition __REF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nVeuillez trouver, ci-joint, la fiche intervention __REF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Vous pouvez cliquer sur le lien ci-dessous pour effectuer votre paiement si ce n'est déjà fait.\n\n%s\n\n PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentSendActionComm=Rappel événement "__EVENT_LABEL__" le __EVENT_DATE__ à __EVENT_TIME__<br><br>Ceci est un message automatique, merci de ne pas répondre. +PredefinedMailContentSendActionComm=Rappel de l'événement "__EVENT_LABEL__" le __EVENT_DATE__ à __EVENT_TIME__<br> <br>Ceci est un message automatique. Veuillez ne pas y répondre. DemoDesc=Dolibarr est un logiciel de gestion proposant plusieurs modules métiers. Une démonstration qui inclut tous ces modules n'a pas de sens car ce cas n'existe jamais (plusieurs centaines de modules disponibles). Aussi, quelques profils type de démo sont disponibles. ChooseYourDemoProfil=Veuillez choisir le profil de démonstration qui correspond le mieux à votre activité… ChooseYourDemoProfilMore=...ou construisez votre propre profil<br>(sélection manuelle des modules) @@ -116,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 @@ -141,7 +140,7 @@ Right=Droite CalculatedWeight=Poids calculé CalculatedVolume=Volume calculé Weight=Poids -WeightUnitton=tonnes +WeightUnitton=tonne WeightUnitkg=Kg WeightUnitg=g WeightUnitmg=mg @@ -218,6 +217,7 @@ EMailTextExpenseReportValidated=La note de frais %s a été validée. EMailTextExpenseReportApproved=La note de frais %s a été approuvée. EMailTextHolidayValidated=La demande de congé %s a été validée. EMailTextHolidayApproved=La demande de congé %s a été approuvée. +EMailTextActionAdded=L'événement %s a été ajouté à l'agenda ImportedWithSet=Lot d'importation (Import key) DolibarrNotification=Notification automatique ResizeDesc=Entrer la nouvelle largeur <b>OU</b> la nouvelle hauteur. Le ratio d'aspect est conservé lors du redimensionnement… @@ -262,6 +262,7 @@ ContactCreatedByEmailCollector=Contact/adresse créé par le collecteur de courr ProjectCreatedByEmailCollector=Projet créé par le collecteur de courrier électronique à partir du courrier électronique MSGID %s TicketCreatedByEmailCollector=Ticket créé par le collecteur de courrier électronique à partir du courrier électronique MSGID %s OpeningHoursFormatDesc=Utilisez un - pour séparer les heures d'ouverture et de fermeture. <br> Utilisez un espace pour entrer différentes plages. <br> Exemple: 8-12 14-18 +PrefixSession=Préfixe pour l'ID de la session ##### Export ##### ExportsArea=Espace exports diff --git a/htdocs/langs/fr_FR/productbatch.lang b/htdocs/langs/fr_FR/productbatch.lang index 162af66827c..cd38ac89278 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,10 @@ 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 +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 \ No newline at end of file diff --git a/htdocs/langs/fr_FR/products.lang b/htdocs/langs/fr_FR/products.lang index c380edd77f3..5610a674018 100644 --- a/htdocs/langs/fr_FR/products.lang +++ b/htdocs/langs/fr_FR/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Remplissez avec la date de la dernière ligne de servic MultiPricesAbility=Plusieurs niveaux de prix par produit/service (chaque client est dans un et un seul niveau) MultiPricesNumPrices=Nombre de prix DefaultPriceType=Base des prix par défaut (avec ou hors taxes) lors de l’ajout de nouveaux prix de vente -AssociatedProductsAbility=Activer les kits (produits virtuels) +AssociatedProductsAbility=Activer les kits (ensemble de plusieurs produits) +VariantsAbility=Activer les variantes (variantes de produits, par exemple couleur, taille,...) AssociatedProducts=Kits AssociatedProductsNumber=Nombre de sous-produits constituant ce kit ParentProductsNumber=Nbre de produits virtuels/packages parent @@ -167,8 +168,10 @@ BuyingPrices=Prix d'achat CustomerPrices=Prix clients SuppliersPrices=Prix fournisseurs SuppliersPricesOfProductsOrServices=Prix fournisseurs (des produits ou services) -CustomCode=Nomenclature douanière / Code SH +CustomCode=Nomenclature douanière ou Code SH CountryOrigin=Pays d'origine +RegionStateOrigin=Région d'origine +StateOrigin=Département d'origine Nature=Nature du produit (matière première / produit fini) NatureOfProductShort=Nature de produit NatureOfProductDesc=Matière première ou produit fini @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Utiliser le prix fixé PriceByQuantity=Prix différents par quantité DisablePriceByQty=Désactiver les prix par quantité PriceByQuantityRange=Grille de quantités -MultipriceRules=Règles du niveau de prix +MultipriceRules=Prix automatiques pour le niveau UseMultipriceRules=Utilisation des règles de niveau de prix (définies dans la configuration du module de produit) pour calculer automatiquement le prix de tous les autres niveaux en fonction de premier niveau PercentVariationOver=%% de variation sur %s PercentDiscountOver=%% de remis sur %s diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang index 3ffd43a0fbe..d7f3997a019 100644 --- a/htdocs/langs/fr_FR/projects.lang +++ b/htdocs/langs/fr_FR/projects.lang @@ -76,18 +76,20 @@ MyActivities=Mes tâches/activités MyProjects=Mes projets MyProjectsArea=Espace Mes projets DurationEffective=Durée effective -ProgressDeclared=Progression déclarée +ProgressDeclared=Avancement réel déclaré TaskProgressSummary=Progression de tâche CurentlyOpenedTasks=Tâches actuellement ouvertes -TheReportedProgressIsLessThanTheCalculatedProgressionByX=La progression déclarée est inférieure à %s à la progression calculée. -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=La progression déclarée est plus %s que la progression calculée -ProgressCalculated=Progression calculée +TheReportedProgressIsLessThanTheCalculatedProgressionByX=L'avancement réel déclaré est %s moins important que l'avancement de la consommation +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=L'avancement réel déclaré est %splus important que l'avancement de la consommation +ProgressCalculated=Avancement sur consommation WhichIamLinkedTo=dont je suis contact WhichIamLinkedToProject=dont je suis contact de projet Time=Temps +TimeConsumed=Consommé ListOfTasks=Liste de tâches GoToListOfTimeConsumed=Aller à la liste des temps consommés GanttView=Vue Gantt +ListWarehouseAssociatedProject=Liste des entrepôts associés au projet 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 @@ -256,7 +258,7 @@ ServiceToUseOnLines=Service à utiliser sur les lignes InvoiceGeneratedFromTimeSpent=La facture %s a été générée à partir du temps passé sur le projet ProjectBillTimeDescription=Cochez si vous saisissez du temps sur les tâches du projet ET prévoyez de générer des factures à partir des temps pour facturer le client du projet (ne cochez pas si vous comptez créer une facture qui n'est pas basée sur la saisie des temps). Note: Pour générer une facture, aller sur l'onglet 'Temps consommé' du project et sélectionnez les lignes à inclure. ProjectFollowOpportunity=Suivre une opportunité -ProjectFollowTasks=Suivez des tâches ou du temps passé +ProjectFollowTasks=Suivre des tâches ou du temps passé Usage=Usage UsageOpportunity=Utilisation: Opportunité UsageTasks=Utilisation: Tâches @@ -267,3 +269,5 @@ 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 +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classer le projet à clôturé lorsque toutes les tâches de ce projet sont à 100 %% de progression +PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Non rétroactif : l’activation de cette option ne clôturera pas les projets dont les tâches sont déjà à 100 %%. Cette option ne classe que les projets ouverts. diff --git a/htdocs/langs/fr_FR/propal.lang b/htdocs/langs/fr_FR/propal.lang index 64199c5248d..aaff4579427 100644 --- a/htdocs/langs/fr_FR/propal.lang +++ b/htdocs/langs/fr_FR/propal.lang @@ -90,12 +90,17 @@ PassedInOpenStatus = passé au statut "ouvert" CantBeSign = ne peut pas être signée Sign = Signer Signed = signé +NoSign = Non signer +NoSigned = Non signé CantBeSign = ne peut pas être signé +CantBeSign = ne peut pas être non signé CantBeValidated = Ne peut pas être validé ConfirmMassValidation = Confirmer la validation ? ConfirmMassSignature = Confirmer la signature ? +ConfirmMassNoSignature = Confirmer la non signature ? ConfirmMassValidationQuestion = Voulez-vous confirmer la validation des devis brouillons selectionnés ? ConfirmMassSignatureQuestion = Voulez-vous confirmer la signature des devis ouvert selectionnés ? +ConfirmMassNoSignatureQuestion = Voulez-vous confirmer la non 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 diff --git a/htdocs/langs/fr_FR/recruitment.lang b/htdocs/langs/fr_FR/recruitment.lang index bea2b2fa539..c3fcd8fece3 100644 --- a/htdocs/langs/fr_FR/recruitment.lang +++ b/htdocs/langs/fr_FR/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=Le poste n'est plus ouvert. Le poste a été pourvu. JobClosedTextCanceled=Le poste n'est plus ouvert. ExtrafieldsJobPosition=Attributs complémentaires (postes) ExtrafieldsCandidatures=Attributs complémentaires (candidature) +MakeOffer=Faire un offre diff --git a/htdocs/langs/fr_FR/salaries.lang b/htdocs/langs/fr_FR/salaries.lang index f4138177a16..73ab172a424 100644 --- a/htdocs/langs/fr_FR/salaries.lang +++ b/htdocs/langs/fr_FR/salaries.lang @@ -2,6 +2,7 @@ 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=Par défaut, laisser vide l’option « Créer automatiquement un règlement total » lors de la création d'un Salaire Salary=Salaire Salaries=Salaires NewSalaryPayment=Nouveau règlement de salaire diff --git a/htdocs/langs/fr_FR/sendings.lang b/htdocs/langs/fr_FR/sendings.lang index 49586113bd9..d2b56dfe677 100644 --- a/htdocs/langs/fr_FR/sendings.lang +++ b/htdocs/langs/fr_FR/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Autres expéditions pour cette commande SendingsAndReceivingForSameOrder=Expéditions et réceptions pour cette commande SendingsToValidate=Expéditions à valider StatusSendingCanceled=Annulée +StatusSendingCanceledShort=Annulée StatusSendingDraft=Brouillon StatusSendingValidated=Validée (produits à envoyer ou envoyés) StatusSendingProcessed=Traitée @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=Vous devez d'abord valider la commande pour pou # Sending methods # ModelDocument DocumentModelTyphon=Modèle de bon de réception/livraison complet (logo…) +DocumentModelStorm=Modèle de document plus complet des fiches expéditions et compatibilité avec les attributs complémentaires (logo,...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constante EXPEDITION_ADDON_NUMBER non définie SumOfProductVolumes=Somme des volumes des produits SumOfProductWeights=Somme des poids des produits diff --git a/htdocs/langs/fr_FR/stocks.lang b/htdocs/langs/fr_FR/stocks.lang index f5c3c9453e3..2d2be548f3b 100644 --- a/htdocs/langs/fr_FR/stocks.lang +++ b/htdocs/langs/fr_FR/stocks.lang @@ -62,6 +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 +WarehouseAskWarehouseOnThirparty=Définir un entrepôt sur les tiers +WarehouseAskWarehouseDuringPropal=Définir un entrepôt sur les propositions WarehouseAskWarehouseDuringOrder=Définir un entrepôt sur les commandes UserDefaultWarehouse=Définir un entrepôt sur les utilisateurs MainDefaultWarehouse=Entrepôt par défaut @@ -240,3 +242,4 @@ InventoryRealQtyHelp=Définissez la valeur sur 0 pour réinitialiser la quantit UpdateByScaning=Mise à jour par scan 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 diff --git a/htdocs/langs/fr_FR/ticket.lang b/htdocs/langs/fr_FR/ticket.lang index 926ca24d3da..d2dbef92452 100644 --- a/htdocs/langs/fr_FR/ticket.lang +++ b/htdocs/langs/fr_FR/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Sévérités TicketDictResolution=Ticket - Résolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Question commerciale +TicketTypeShortCOM=Question commerciale TicketTypeShortHELP=Demande d'aide fonctionnelle TicketTypeShortISSUE=Problème ou bogue TicketTypeShortREQUEST=Demande de changement ou d'amélioration @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Autre TicketSeverityShortLOW=Faible TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=Élevé -TicketSeverityShortBLOCKING=Critique/Bloquant +TicketSeverityShortBLOCKING=Critique, bloquant ErrorBadEmailAddress=Champ '%s' incorrect MenuTicketMyAssign=Mes tickets @@ -125,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=L'interface publique permet à tous les visit TicketsAutoAssignTicket=Affecter automatiquement l'utilisateur qui a créé le ticket TicketsAutoAssignTicketHelp=Lors de la création d'un ticket, l'utilisateur peut être automatiquement affecté au ticket. 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é @@ -230,8 +229,8 @@ TicketChangeStatus=Changer l'état TicketConfirmChangeStatus=Confirmez le changement d'état: %s? TicketLogStatusChanged=Statut modifié: %s à %s TicketNotNotifyTiersAtCreate=Ne pas notifier l'entreprise à la création +Unread=Non lu TicketNotCreatedFromPublicInterface=Non disponible. Le ticket n’a pas été créé à partir de l'interface publique. -PublicInterfaceNotEnabled=L’interface publique n’a pas été activée ErrorTicketRefRequired=La référence du ticket est requise # diff --git a/htdocs/langs/fr_FR/website.lang b/htdocs/langs/fr_FR/website.lang index 0db2af94537..ce277cc5f52 100644 --- a/htdocs/langs/fr_FR/website.lang +++ b/htdocs/langs/fr_FR/website.lang @@ -30,7 +30,6 @@ EditInLine=Editer en ligne AddWebsite=Ajouter site web Webpage=Page/container Web AddPage=Ajouter une page/container -HomePage=Page d'accueil PageContainer=Page PreviewOfSiteNotYetAvailable=La prévisualisation de votre site web <strong>%s</strong> n'est pas disponible actuellement. Vous devez d'abord '<strong>Importer un modèle de site web complet</strong>' ou juste '<strong>Ajouter une page/container</strong>. RequestedPageHasNoContentYet=La page demandée avec l'id=%s ne présente encore aucun contenu ou le fichier cache .tpl.php a été supprimé. Ajoutez du contenu à la page pour résoudre cela. @@ -136,4 +135,5 @@ RSSFeed=Flux RSS RSSFeedDesc=Vous pouvez obtenir un flux RSS des derniers articles de type 'blogpost' en utilisant cette URL 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 cadres +AllowedInFrames=Autorisé dans les Frames +DefineListOfAltLanguagesInWebsiteProperties=Définir la liste des langues disponibles dans les propriétés du site web. diff --git a/htdocs/langs/fr_FR/withdrawals.lang b/htdocs/langs/fr_FR/withdrawals.lang index 1649b7271de..771fcfbcc83 100644 --- a/htdocs/langs/fr_FR/withdrawals.lang +++ b/htdocs/langs/fr_FR/withdrawals.lang @@ -42,8 +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 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. 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 @@ -131,7 +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éancier CI +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 @@ -146,3 +149,5 @@ InfoRejectSubject=Ordre de prélèvement rejeté InfoRejectMessage=Bonjour, <br><br> l'ordre de prélèvement de la facture %s liée à la société %s, avec un montant de %s a été refusé par la banque.<br><br>--<br>%s ModeWarning=Option mode réel non établi, nous allons arrêter après cette simulation ErrorCompanyHasDuplicateDefaultBAN=La société avec l'identifiant %s a plus d'un compte bancaire par défaut. Aucun moyen de savoir lequel utiliser. +ErrorICSmissing=ICS manquant pour le compte bancaire %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/fr_FR/workflow.lang b/htdocs/langs/fr_FR/workflow.lang index 0c753a2529e..2af480afa83 100644 --- a/htdocs/langs/fr_FR/workflow.lang +++ b/htdocs/langs/fr_FR/workflow.lang @@ -21,3 +21,5 @@ descWORKFLOW_BILL_ON_RECEPTION=Classer les réceptions en "facturées" lorsqu'un descWORKFLOW_TICKET_CLOSE_INTERVENTION=Fermer toutes les interventions liées au ticket lorsqu'un ticket est fermé AutomaticCreation=Création automatique AutomaticClassification=Classification automatique +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/fr_GA/accountancy.lang b/htdocs/langs/fr_GA/accountancy.lang new file mode 100644 index 00000000000..552865118f1 --- /dev/null +++ b/htdocs/langs/fr_GA/accountancy.lang @@ -0,0 +1,2 @@ +# 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 8c6135dc874..ca2cbd16ab0 100644 --- a/htdocs/langs/fr_GA/admin.lang +++ b/htdocs/langs/fr_GA/admin.lang @@ -1,5 +1,7 @@ # 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) 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/compta.lang b/htdocs/langs/fr_GA/compta.lang deleted file mode 100644 index c7c41488180..00000000000 --- a/htdocs/langs/fr_GA/compta.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - compta -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account diff --git a/htdocs/langs/fr_GA/mrp.lang b/htdocs/langs/fr_GA/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/fr_GA/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/fr_GA/products.lang b/htdocs/langs/fr_GA/products.lang index 6e900475275..2a38b9b0181 100644 --- a/htdocs/langs/fr_GA/products.lang +++ b/htdocs/langs/fr_GA/products.lang @@ -1,2 +1,2 @@ # Dolibarr language file - Source file is en_US - products -CustomCode=Customs / Commodity / HS code +AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/fr_GA/withdrawals.lang b/htdocs/langs/fr_GA/withdrawals.lang new file mode 100644 index 00000000000..facdefc082f --- /dev/null +++ b/htdocs/langs/fr_GA/withdrawals.lang @@ -0,0 +1,2 @@ +# 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 1aa15550b74..de9a83b813d 100644 --- a/htdocs/langs/gl_ES/accountancy.lang +++ b/htdocs/langs/gl_ES/accountancy.lang @@ -16,16 +16,18 @@ ThisService=Este servizo ThisProduct=Este produto DefaultForService=Predeterminado para o servizo DefaultForProduct=Predeterminado para o produto +ProductForThisThirdparty=Produto para este terceiro +ServiceForThisThirdparty=Servizo para este terceiro CantSuggest=Non pode suxerirse AccountancySetupDoneFromAccountancyMenu=A maior parte da configuración da contabilidade realizase dende o menú %s -ConfigAccountingExpert=Configuration of the module accounting (double entry) +ConfigAccountingExpert=Configuración do módulo contabilidade (entrada doble) Journalization=Procesar diarios Journals=Diarios JournalFinancial=Diarios financieiros BackToChartofaccounts=Voltar ao plan contable Chartofaccounts=Plan contable -ChartOfSubaccounts=Chart of individual accounts -ChartOfIndividualAccountsOfSubsidiaryLedger=Chart of individual accounts of the subsidiary ledger +ChartOfSubaccounts=Gráficos de contas individuais +ChartOfIndividualAccountsOfSubsidiaryLedger=Graficos de contas indivudais dependendets do libro maior CurrentDedicatedAccountingAccount=Conta contable adicada AssignDedicatedAccountingAccount=Nova conta a asignar InvoiceLabel=Etiqueta factura @@ -35,8 +37,8 @@ OtherInfo=Outra información DeleteCptCategory=Eliminar a conta contable do grupo ConfirmDeleteCptCategory=¿Está certo de querer eliminar esta conta contable do grupo de contas contables? JournalizationInLedgerStatus=Estado de diario -AlreadyInGeneralLedger=Already transferred in accounting journals and ledger -NotYetInGeneralLedger=Not yet transferred in accouting journals and ledger +AlreadyInGeneralLedger=Xa rexistrado en contas contables e no Libro Maior +NotYetInGeneralLedger=Non foi rexistrado aínda en contas contables nin no Libro Maior GroupIsEmptyCheckSetup=O grupo está baleiro, comprobe a configuración da personalización de grupos contables DetailByAccount=Amosar detalles por conta AccountWithNonZeroValues=Contas con valores non cero @@ -45,9 +47,10 @@ CountriesInEEC=Países na CEE CountriesNotInEEC=Países non CEE CountriesInEECExceptMe=Todos os paises incluidos na CEE excepto %s CountriesExceptMe=Todos os países excepto %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 +AccountantFiles=Exportar documentos contables +ExportAccountingSourceDocHelp=Con esta utilidade, pode exportar os eventos de orixe (lista e PDFs) que foron empregados para xerar a súa contabilidade. Para exportar os seus diarios, use a entrada de menú% s -% s. +VueByAccountAccounting=Ver por conta contable +VueBySubAccountAccounting=Ver pos subconta contable MainAccountForCustomersNotDefined=Conta contable principal para clientes non definida na configuración MainAccountForSuppliersNotDefined=Conta contable principal para provedores non definida na configuración @@ -83,7 +86,7 @@ AccountancyAreaDescAnalyze=PASO %s: Engadir ou editar transaccións existentes, AccountancyAreaDescClosePeriod=PASO %s: Pechar periodo, polo que non poderá facer modificacións nun futuro. -TheJournalCodeIsNotDefinedOnSomeBankAccount=A mandatory step in setup has not been completed (accounting code journal not defined for all bank accounts) +TheJournalCodeIsNotDefinedOnSomeBankAccount=Non foi completado un paso obrigatorio na configuración (conta contable non definida en todas as contas bancarias) Selectchartofaccounts=Seleccione un plan contable activo ChangeAndLoad=Cambiar e cargar Addanaccount=Engadir unha conta contable @@ -93,8 +96,8 @@ SubledgerAccount=Subconta contable SubledgerAccountLabel=Etiqueta subconta contable ShowAccountingAccount=Amosar contabilidade ShowAccountingJournal=Amosar diario contable -ShowAccountingAccountInLedger=Show accounting account in ledger -ShowAccountingAccountInJournals=Show accounting account in journals +ShowAccountingAccountInLedger=Amosar a conta contable no libro maior +ShowAccountingAccountInJournals=Amosar a conta contable nos diarios AccountAccountingSuggest=Conta contable suxerida MenuDefaultAccounts=Contas contables por defecto MenuBankAccounts=Contas Bancarias @@ -116,9 +119,9 @@ ExpenseReportsVentilation=Contabilizar informes de gastos CreateMvts=Crear nova transacción UpdateMvts=Modificación dunha transacción ValidTransaction=Transacción validada -WriteBookKeeping=Register transactions in accounting +WriteBookKeeping=Rexistrar movementos en contabilidade Bookkeeping=Libro Maior -BookkeepingSubAccount=Subledger +BookkeepingSubAccount=Librp maior auxiliar AccountBalance=Saldo da conta ObjectsRef=Referencia de obxecto orixe CAHTF=Total compras a provedor antes de impostos @@ -128,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 para a conta contable +TotalForAccount=Total for accounting account Ventilate=Contabilizar @@ -144,20 +147,20 @@ NotVentilatedinAccount=Conta sen contabilización na contabilidad XLineSuccessfullyBinded=%s produtos/servizos relacionados correctamente nunha conta contable XLineFailedToBeBinded=%s produtos/servizos sen conta contable -ACCOUNTING_LIMIT_LIST_VENTILATION=Número de elementos a contabilizar que amósanse por páxina (máximo recomendado: 50) +ACCOUNTING_LIMIT_LIST_VENTILATION=Número máximo de liñas na listaxe e na páxina de ligazón (recomendado: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Ordear as páxinas de contabilización "A contabilizar" polos elementos mais recentes ACCOUNTING_LIST_SORT_VENTILATION_DONE=Ordear as páxinas de contabilización "Contabilizadas" polos elementos mais recentes -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. +ACCOUNTING_LENGTH_DESCRIPTION=Acortar a descrición de produtoe e servizos nas listaxes despois de x caracteres (Mellor = 50) +ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=Acortar no formulario de descrición da conta de produtos e servizos nas listaxes despois de x caracteres (Mellor = 50) +ACCOUNTING_LENGTH_GACCOUNT=Lonxitude das contas contables en xeral (Se define o valor 6 aquí, a conta "706" aparecerá como "706000" na pantalla) +ACCOUNTING_LENGTH_AACCOUNT=Lonxitude das contas contables de terceiros (Se define o valor 6 aquí, a conta "401" aparecerá como "401000" na pantalla) +ACCOUNTING_MANAGE_ZERO=Permitir xestionar un número diferente de ceros ao final dunha conta contable. Preciso por algúns países (como Suíza). Se está desactivado (predeterminado), pode configurar os seguintes dous parámetros para solicitar á aplicación que engada ceros virtuais. BANK_DISABLE_DIRECT_INPUT=Desactivar transaccións directas en conta bancaria ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Habilitar exportación de borradores al diario -ACCOUNTANCY_COMBO_FOR_AUX=Habilita a listaxe combinada para a conta subsidiaria (pode ser lento se ten moitos terceiros) -ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. -ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER=On accountancy transfer, select period show by default +ACCOUNTANCY_COMBO_FOR_AUX=Habilita a listaxe combinada para a conta contable subsidiaria (pode ser lento se ten moitos terceiros) +ACCOUNTING_DATE_START_BINDING=Define unha data para comezar a ligar e transferir na contabilidade. Por debaixo desta data, as transaccións non se transferirán á contabilidade. +ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER=Na transferencia de contabilidade, selecciona amosar o período por defecto ACCOUNTING_SELL_JOURNAL=Diario de vendas ACCOUNTING_PURCHASE_JOURNAL=Diario de compras @@ -177,18 +180,18 @@ 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=Accounting account by default to register customer deposit +ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT=Conta contable por defecto para rexistrar os ingresos do cliente -ACCOUNTING_PRODUCT_BUY_ACCOUNT=Conta contable predeterminada para produtos comprados (usada se non están definidos na folla de produtos) -ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=Accounting account by default for the bought products in EEC (used if not defined in the product sheet) -ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT=Accounting account by default for the bought products and imported out of EEC (used if not defined in the product sheet) +ACCOUNTING_PRODUCT_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=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=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_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=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=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) @@ -199,6 +202,7 @@ Docref=Referencia LabelAccount=Etiqueta conta LabelOperation=Etiqueta operación Sens=Sentido +AccountingDirectionHelp=Para unha conta contable dun cliente, use o crédito para rexistrar o pago recibido. <br>. Para unha conta contable dun provedor, use Débito para rexistrar o pago realizado LetteringCode=Codigo de letras Lettering=Letras Codejournal=Diario @@ -207,22 +211,23 @@ NumPiece=Apunte TransactionNumShort=Núm. transacción AccountingCategory=Grupos persoalizados 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. ByAccounts=Por contas ByPredefinedAccountGroups=Por grupos predefinidos ByPersonalizedAccountGroups=Por grupos persoalizados ByYear=Por ano NotMatch=Non establecido -DeleteMvt=Delete some operation lines from accounting +DeleteMvt=Eliminar liñas do Libro Maior DelMonth=Mes a eliminar DelYear=Ano a eliminar DelJournal=Diario a eliminar -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=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 DescFinanceJournal=O diario financiero inclúe todos os tipos de pagos por conta bancaria -DescJournalOnlyBindedVisible=This is a view of record that are bound to an accounting account and can be recorded into the Journals and Ledger. +DescJournalOnlyBindedVisible=Ista é una vista do rexistro ligada a unha conta contable e que pode ser rexistrada nos diarios e Libro Maior. VATAccountNotDefined=Conta contable para IVE non definida ThirdpartyAccountNotDefined=Conta contable para terceiro non definida ProductAccountNotDefined=Conta contable para produto non definida @@ -241,19 +246,19 @@ ListAccounts=Listaxe de contas contables UnknownAccountForThirdparty=Conta contable de terceiro descoñecida, usaremos %s UnknownAccountForThirdpartyBlocking=Conta contable de terceiro descoñecida. Erro de bloqueo. ThirdpartyAccountNotDefinedOrThirdPartyUnknown=Conta contable de terceiro non definida ou terceiro descoñecido. Usaremos a %s -ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored=Third-party unknown and subledger not defined on the payment. We will keep the subledger account value empty. +ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored=Terceiro descoñecido e conta vinculada non definidos no pago. Manteremos o valor da conta ligada baleiro. ThirdpartyAccountNotDefinedOrThirdPartyUnknownBlocking=Conta do terceiro descoñecida ou terceiro descoñecido. Erro de bloqueo -UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking=Conta do terceiros descoñecida e conta de espera non definida. Erro de bloqueo +UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking=Conta de terceiros descoñecida e conta de espera non definida. Erro de bloqueo PaymentsNotLinkedToProduct=Pagos non ligados a un produto/servizo OpeningBalance=Saldo de apertura ShowOpeningBalance=Amosar saldo de apertura HideOpeningBalance=Ocultar saldo de apertura -ShowSubtotalByGroup=Amosar subtotal por grupo +ShowSubtotalByGroup=Amosar subtotal por nivel Pcgtype=Grupo de conta PcgtypeDesc=Grupo e subgrupo de conta utilízanse como criterios predefinidos de "filtro" e "agrupación" para algúns informes de contabilidade. Por exemplo, "INGRESOS" ou "GASTOS" usanse como grupos para contas contables de produtos para construir o informe de gastos/ingresos. -Reconcilable=Reconcilable +Reconcilable=Reconciliable TotalVente=Total facturación antes de impostos TotalMarge=Total marxe vendas @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consulte aquí a listaxe de liñas de informes de gastos DescVentilExpenseReportMore=Se configura as contas contables dos tipos de informes de gastos, a aplicación será capaz de facer a ligazón entre as súas liñas de informes de gastos e as contas contables, simplemente cun clic no botón <strong>"%s"</strong> , Se non estableceu a conta contable no diccionario ou se aínda ten algunhas liñas non contabilizadas a alguna conta, terá que facer unha contabilización manual dende o menú "<strong>%s</strong>". DescVentilDoneExpenseReport=Consulte aquí as liñas de informes de gastos e as súas contas contables +Closure=Peche anual 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=Todos os movementos foron rexistrados e validados +NotAllMovementsCouldBeRecordedAsValidated=Non todos os movementos puideron ser rexistrados e validados ValidateMovements=Validar os movementos -DescValidateMovements=Any modification or deletion of writing, lettering and deletes will be prohibited. All entries for an exercise must be validated otherwise closing will not be possible -SelectMonthAndValidate=Selecciona mes e valida movementos +DescValidateMovements=Prohíbese calquera modificación ou eliminación de rexistros. Todas as entradas para un exercicio deben validarse doutro xeito ou non será posible pechalo ValidateHistory=Contabilizar automáticamente AutomaticBindingDone=Ligazón automática finalizada @@ -293,9 +300,10 @@ Accounted=Contabilizada no Libro Maior NotYetAccounted=Aínda non contabilizada no Libro Maior ShowTutorial=Amosar Tutorial NotReconciled=Non reconciliado +WarningRecordWithoutSubledgerAreExcluded=Aviso: todas as operacións sen subcontas contables defininidas están filtradas e excluídas desta vista ## Admin -BindingOptions=Binding options +BindingOptions=Opcións de ligazón ApplyMassCategories=Aplicar categorías en masa AddAccountFromBookKeepingWithNoCategories=Conta dispoñible sen grupo persoalizado CategoryDeleted=A categoría para a conta contable foi eliminada @@ -315,9 +323,9 @@ ErrorAccountingJournalIsAlreadyUse=Este diario xa está a ser utilizado AccountingAccountForSalesTaxAreDefinedInto=Nota: A conta contable do IVE nas vendas defínese no menú <b> %s</b> - <b> %s</b> NumberOfAccountancyEntries=Número de entradas NumberOfAccountancyMovements=Número de movementos -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=Desactivar a ligazón e transferencia na contabilidade das vendas (as facturas do cliente non se terán en conta na contabilidade) +ACCOUNTING_DISABLE_BINDING_ON_PURCHASES=Desactivar a ligazón e transferencia na contabilidade das compras (as facturas do provedor non se terán en conta na contabilidade) +ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS=Desactivar a ligazón e transferencia na contabilidade dos informes de gastos (os informes de gastos non se terán en conta na contabilidade) ## Export ExportDraftJournal=Exportar libro borrador @@ -335,12 +343,13 @@ Modelcsv_agiris=Exportar a Agiris Modelcsv_LDCompta=Exportar a LD Compta (v9 & maior) (En Probas) Modelcsv_LDCompta10=Exportar a LD Compta (v10 & maior) Modelcsv_openconcerto=Exportar a OpenConcerto (En probas) -Modelcsv_configurable=Exportar a CSV Configurable -Modelcsv_FEC=Exportar FEC (Art. L47 A) -Modelcsv_Sage50_Swiss=Exportar a Sage 50 Suiza +Modelcsv_configurable=Exportación CSV Configurable +Modelcsv_FEC=Exportación FEC (Art. L47 A) +Modelcsv_FEC2=Exportar FEC (con escritura de xeración de datas / documento inverso) +Modelcsv_Sage50_Swiss=Exportación a Sage 50 Suiza Modelcsv_winfic=Exportar a Winfic - eWinfic - WinSis Conta -Modelcsv_Gestinumv3=Export for Gestinum (v3) -Modelcsv_Gestinumv5Export for Gestinum (v5) +Modelcsv_Gestinumv3=Exportar a Gestinum (v3) +Modelcsv_Gestinumv5Export para Gestinum (v5) ChartofaccountsId=Id do plan contable ## Tools - Init accounting account on product / service @@ -353,16 +362,16 @@ OptionModeProductSell=Modo vendas OptionModeProductSellIntra=Modo Vendas exportación CEE OptionModeProductSellExport=Modo vendas exportación outros paises OptionModeProductBuy=Modo compras -OptionModeProductBuyIntra=Mode purchases imported in EEC -OptionModeProductBuyExport=Mode purchased imported from other countries +OptionModeProductBuyIntra=Modo compras importadas importadas de EEC +OptionModeProductBuyExport=Modo compras importadas doutros paises OptionModeProductSellDesc=Amosar todos os produtos con conta contable de vendas OptionModeProductSellIntraDesc=Amosar todos os produtos con conta contable para vendas na CEE. OptionModeProductSellExportDesc=Amosar todos os produtos con conta contable para outras vendas ao exterior. OptionModeProductBuyDesc=Amosar todos os produtos con conta contable de compras -OptionModeProductBuyIntraDesc=Show all products with accounting account for purchases in EEC. -OptionModeProductBuyExportDesc=Show all products with accounting account for other foreign purchases. +OptionModeProductBuyIntraDesc=Amosar todos os produtos con conta contable para compras en CEE +OptionModeProductBuyExportDesc=Amosar todos os produtos con conta contable para outras compras no extranxeiro. CleanFixHistory=Eliminar código contable das liñas que no existen no plan contable -CleanHistory=Resetear todos os vínculos do ano seleccionado +CleanHistory=Resetear todas as ligazóns do ano seleccionado PredefinedGroups=Grupos persoalizados WithoutValidAccount=Sen conta adicada válida WithValidAccount=Con conta adicada válida @@ -371,8 +380,8 @@ AccountRemovedFromGroup=Conta eliminada do grupo SaleLocal=Venda local SaleExport=Venda de exportación SaleEEC=Venda na CEE -SaleEECWithVAT=Sale in EEC with a VAT not null, so we suppose this is NOT an intracommunautary sale and the suggested account is the standard product account. -SaleEECWithoutVATNumber=Sale in EEC with no VAT but the VAT ID of thirdparty is not defined. We fallback on the product account for standard sales. You can fix the VAT ID of thirdparty or the product account if needed. +SaleEECWithVAT=Vendas na CEE con IVE non nulo, polo que supoñemos que isto non é unha venda intracomunitaria e a conta suxerida é a conta estandar de produto. +SaleEECWithoutVATNumber=Venda na CEE sen IVE pero non se define o número de identificación do IVE de terceiros. Respondemos á conta do produto para as vendas estándar. Pode corrixir o ID de IVE de terceiros ou a conta do produto se é preciso. ## Dictionary Range=Rango de conta contable @@ -380,7 +389,7 @@ Calculated=Calculado Formula=Fórmula ## Error -SomeMandatoryStepsOfSetupWereNotDone=Algúns pasos precisoss da configuración non foron realizados, prégase completalos. +SomeMandatoryStepsOfSetupWereNotDone=Algúns pasos precisos da configuración non foron realizados, prégase completalos. ErrorNoAccountingCategoryForThisCountry=Non hai grupos contables dispoñibles para %s (Vexa Inicio - Configuración - Diccionarios) ErrorInvoiceContainsLinesNotYetBounded=Tenta facer un diario de algunhas liñas da factura <strong>%s</strong>, pero algunhas outras liñas aínda non están ligadas a contas contables. Rexeitase a contabilización de todas as liñas de factura desta factura. ErrorInvoiceContainsLinesNotYetBoundedShort=Algunhas liñas da factura non están ligadas a contas contables. diff --git a/htdocs/langs/gl_ES/admin.lang b/htdocs/langs/gl_ES/admin.lang index dc2f2aa0a84..4d03682d5ef 100644 --- a/htdocs/langs/gl_ES/admin.lang +++ b/htdocs/langs/gl_ES/admin.lang @@ -18,10 +18,10 @@ GlobalChecksum=Suma de comprobación global MakeIntegrityAnalysisFrom=Realizar o análise da integridade dos ficheiros da aplicación dende LocalSignature=Sinatura local incrustada (menos segura) RemoteSignature=Sinatura remota (mais segura) -FilesMissing=Arquivos non atopados -FilesUpdated=Arquivos actualizados -FilesModified=Arquivos modificados -FilesAdded=Arquivos engadidos +FilesMissing=Ficheiros non atopados +FilesUpdated=Ficheiros actualizados +FilesModified=Ficheiros modificados +FilesAdded=Ficheiros engadidos FileCheckDolibarr=Comprobar a integradade dos ficheiros da aplicación AvailableOnlyOnPackagedVersions=O ficheiro local para a comprobación da integridade só está dispoñible cando a aplicación instálase dende un paquete oficial XmlNotFound=Non atópase o ficheiro xml de Integridade @@ -37,9 +37,9 @@ UnlockNewSessions=Eliminar bloqueo de conexións YourSession=A súa sesión Sessions=Sesións de usuarios WebUserGroup=Usuario/grupo do servidor web -PermissionsOnFilesInWebRoot=Permissions on files in web root directory -PermissionsOnFile=Permissions on file %s -NoSessionFound=Parece que o seu PHP non pode listar as sesións activas. El directorio de salvaguardado de sesións (<b>%s</b>) puede estar protegido (por ejemplo, por los permisos del sistema operativo o por la directiva open_basedir de su PHP). +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). DBStoringCharset=Codificación da base de datos para o almacenamento de datos DBSortingCharset=Codificación da base de datos para clasificar os datos HostCharset=Codificación do host @@ -56,6 +56,8 @@ GUISetup=Entorno 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 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. @@ -68,12 +70,12 @@ DictionarySetup=Configuración do diccionario Dictionary=Diccionario ErrorReservedTypeSystemSystemAuto=O valor 'system' e 'systemauto' para o tipo está reservado. Vostede pode empregar 'user' como valor para engadir o seu propio rexistro ErrorCodeCantContainZero=O código non pode conter o valor 0 -DisableJavascript=Deshabilitar Javascript e funcións Ajax (Recomendado para personas ciegas ou navegadores de texto) -DisableJavascriptNote=Nota: Para propósitos de proba ou depuración. Para a optimización para persoas ciegas ou navegadores de texto, é posible que prefira utilizar a configuración no perfil do usuario. -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=Agardar a que presione unha tecla antes de cargar o contido da listaxe combinada de terceiros <br>Isto pode incrementar o rendemento se ten un grande número de terceiros, pero é menos convinte. -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. +DisableJavascript=Deshabilitar Javascript e funcións Ajax +DisableJavascriptNote=Nota: Para propósitos de proba ou depuración. Para a optimización para persoas cegas ou navegadores de texto, é posible que prefira utilizar a configuración no perfil do usuario. +UseSearchToSelectCompanyTooltip=Tamén se ten un grande número de terceiros (> 100 000), pode aumentar a velocidade mediante a constante COMPANY_DONOTSEARCH_ANYWHERE establecendo a 1 en Configuración-> Outros. A procura será limitada á creación de cadea. +UseSearchToSelectContactTooltip=Tamén se ten un grande número de terceiros (> 100 000), pode aumentar a velocidade mediante a constante CONTACT_DONOTSEARCH_ANYWHERE establecendo a 1 en Configuración-> Outros. A procura será limitada á creación de cadea. +DelaiedFullListToSelectCompany=Agardar a que presione unha tecla antes de cargar o contido da lista combinada de terceiros <br>Isto pode incrementar o rendemento se ten un grande número de terceiros, pero é menos convinte. +DelaiedFullListToSelectContact=Agardar a que presione unha tecla antes de cargar o contido da lista combinada de contactos. <br> Isto pode incrementar o rendemento se ten un grande número de contactos, pero é menos convinte. NumberOfKeyToSearch=Nº de caracteres para desencadenar a busca: %s NumberOfBytes=Número de Bytes SearchString=Buscar cadea @@ -82,12 +84,11 @@ AllowToSelectProjectFromOtherCompany=Nun documento dun terceiro, pode escoller u JavascriptDisabled=Javascript desactivado UsePreviewTabs=Ver lapelas vista previa ShowPreview=Ver vista previa -ShowHideDetails=Show-Hide details +ShowHideDetails=Show-Ocultar detalles PreviewNotAvailable=Vista previa non dispoñible ThemeCurrentlyActive=Tema actualmente activo -CurrentTimeZone=Zona horaria PHP (Servidor) MySQLTimeZone=Zona horaria MySql (base de datos) -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). +TZHasNoEffect=As datas son almacenadas e servidas polo servidor da base de datos coma se foran enviadas coma unha cadea. A zona horaria só ten efecto se é usada a función UNIX_TIMESTAMP (que no debera ser usada pol Dolibarr, polo que a zona horaria da base de datos non debe tener efecto, qínda que fora cambiada despois de introducir os datos). Space=Área Table=Taboa Fields=Campos @@ -98,14 +99,14 @@ NextValueForInvoices=Próximo valor (facturas) NextValueForCreditNotes=Próximo valor (abonos) NextValueForDeposit=Próximo valor (anticipos) NextValueForReplacements=Próximo valor (rectificativas) -MustBeLowerThanPHPLimit=Nota: A configuración actual do PHP limita o tamaño máximo de subida a <b>%s</b> %s, cualquera que sexa o valor deste parámetro +MustBeLowerThanPHPLimit=Nota: A configuración actual do PHP limita o tamaño máximo de subida a <b>%s</b> %s, calquera que sexa o valor deste parámetro NoMaxSizeByPHPLimit=Ningunha limitación interna configurada no seu servidor PHP MaxSizeForUploadedFiles=Tamaño máximo dos ficheiros a subir (0 para desactivar a subida) UseCaptchaCode=Utilización de código gráfico (CAPTCHA) na página de inicio de sesión AntiVirusCommand=Ruta completa ao comando do antivirus -AntiVirusCommandExample=Exemplo para ClamWin: c:\\Program Files (x86)\\ClamWin\\bin\\clamscan.exe<br>Exemplo para ClamAv: /usr/bin/clamscan +AntiVirusCommandExample=Exemplo para ClamAv (require clamav-daemon):/usr/bin/clamdscan<br> Exemplo para ClamWin (moi moi lento): c::\\Progra~1\\ClamWin\\bin\\clamscan.exe AntiVirusParam= Mais parámetors na liña de comandos -AntiVirusParamExample=Exemplo para o demo ClamWin: --database="C:\\Program Files (x86)\\ClamWin\\lib" +AntiVirusParamExample=Exemplo para o ClamAv: --fdpass <br> Exemplo para ClamWin: --database="C:\\Program Files (x86)\\ClamWin\\lib" ComptaSetup=Configuración do módulo Contabilidade UserSetup=Configuración na xestión de usuarios MultiCurrencySetup=Configuración do módulo multimoeda @@ -133,7 +134,7 @@ PHPTZ=Zona Horaria Servidor PHP DaylingSavingTime=Horario de verán (usuario) CurrentHour=Hora PHP (servidor) CurrentSessionTimeOut=Timeout sesión actual -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" +YouCanEditPHPTZ=Para definir unha zona horaria PHP diferente (non é preciso), probe a engadir un ficheiro .htacces cunha liña coma esta "SetEnvTZ Europe/Madrid" HoursOnThisPageAreOnServerTZ=Atención, ao contrario doutras pantallas, o horario nesta páxina non atópase na súa zona horaria local, atópase na zona horaria do servidor. Box=Panel Boxes=Paneis @@ -141,8 +142,8 @@ MaxNbOfLinesForBoxes=Número máximo de liñas para paneis AllWidgetsWereEnabled=Todos os widgets dispoñibles están activados PositionByDefault=Posición por defecto Position=Posición -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. +MenusDesc=Os xestores de menús definen o contido das dúas barras de menú (horizontal e vertical) +MenusEditorDesc=O editor de menús permite definir entradas de menú persoalizadas. Useo con coidado para evitar inestabilidade e entradas de menús erróneos. <br> Algúns módulos engaden entradas do menú (no menú <b>Todo</b> maioritariamente). Se elimina algunhas destas entradas por erro, pode restauralas desactivando e reactivando o módulo. MenuForUsers=Menú para os usuarios LangFile=ficheiro .lang Language_en_US_es_MX_etc=Lingua (en_US, es_MX, ...) @@ -153,9 +154,9 @@ 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 ficheros temporais (sen risco de perda de datos) -PurgeDeleteTemporaryFilesShort=Eliminar ficheiros temporais purgados -PurgeDeleteAllFilesInDocumentsDir=Eliminar todos os ficheiros do directorio <b>%s</b>. Ficheiros temporais e ficheiros relacionados con elementos (terceiros, facturas, etc.) serán eliminados. +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. +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 PurgeNothingToDelete=Sen directorios ou ficheiros a eliminar. PurgeNDirectoriesDeleted=<b>%s</b> ficheiros ou directorios eliminados @@ -173,14 +174,14 @@ 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>. -ImportMySqlDesc=Para importar unha copia, hai que utilizar o comando mysql na liña seguinte: +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 ImportPostgreSqlCommand=%s %s meuficheirobackup.sql FileNameToGenerate=Nome do ficheiro a xerar Compression=Compresión -CommandsToDisableForeignKeysForImport=Command to disable foreign keys on import -CommandsToDisableForeignKeysForImportWarning=Mandatory if you want to be able to restore your sql dump later +CommandsToDisableForeignKeysForImport=Comando para desactivar as claves externas á importación +CommandsToDisableForeignKeysForImportWarning=Obrigatorio se quiere poder restaurar mais tarde o seu volcado SQL ExportCompatibility=Compatibilidade do ficheiro de exportación xerado ExportUseMySQLQuickParameter=Use a opción --quick ExportUseMySQLQuickParameterHelp=A opción'--quick' parameter axuda a limitar o consumo de RAM en táboas longas. @@ -201,30 +202,30 @@ IgnoreDuplicateRecords=Ignorar os erros por rexistro duplicado (INSERT IGNORE) AutoDetectLang=Autodetección (navegador) FeatureDisabledInDemo=Opción deshabilitada no demo FeatureAvailableOnlyOnStable=Funcionaliade dispoñible exclusivamente en versións oficiais estables -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 +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. +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... +ModulesDevelopYourModule=Desenvolva as súas propias aplicacións/módulos +ModulesDevelopDesc=Vostede pode desenvolver o seu propio módulo ou atopar un socio para que desenvolva un para vostede. +DOLISTOREdescriptionLong=En vez de conectar o sitio web <a href="https://www.dolistore.com">www.dolistore.com</a> para atopar un módulo externo, pode usar esta ferramenta incorporada que lle realizará a busca no tenda dolistore (pode ser lento, precisa acceso a Internet) ... +NewModule=Novo +FreeModule=Gratis CompatibleUpTo=Compatible coa versión %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 +NotCompatible=Este módulo non parece compatible co seu Dolibarr %s (Min %s - Max %s). +CompatibleAfterUpdate=Este módulo require unha actualización do seu Dolibarr %s (Min %s - Max %s). +SeeInMarkerPlace=Ver na tenda +SeeSetupOfModule=Ver a configuración do módulo %s Updated=Actualizado Nouveauté=Novidade AchatTelechargement=Compra/Descarga -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... +GoModuleSetupArea=Para aplicar/instalar un novo módulo, ir ao área de configuración de módulos <a href="%s">%s</a>. +DoliStoreDesc=DoliStore, o sitio oficial de módulos externos e para Dolibarr ERP/CRM +DoliPartnersDesc=Listaxe de empresas que ofrecen módulos-desenvolvementos a medida.<br> Nota: dende que Dolibarr é una aplicación de código aberto, <i>calquera persoa</i> con experiencia en programación PHP pode desenvolver un módulo. +WebSiteDesc=Sitios web de referencia para atopar mais módulos (non core)... +DevelopYourModuleDesc=Algunhas solucións para desenvolver o seu propio módulo ... URL=Ligazón RelativeURL=Ligazón relativa BoxesAvailable=Paneis dispoñibles @@ -232,17 +233,17 @@ BoxesActivated=Paneis activos ActivateOn=Activar en ActiveOn=Activo en SourceFile=Ficheiro orixe -AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled +AvailableOnlyIfJavascriptAndAjaxNotDisabled=Dispoñible só se Javascript e Ajax non están desactivados Required=Requirido UsedOnlyWithTypeOption=Usado só por algunha opción da axenda Security=Seguridade Passwords=Contrasinais -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. +DoNotStoreClearPassword=Non almacenar o contrasinal sen cifrar na base de datos (NON en texto plano). É moi recomendable activar esta opción. +MainDbPasswordFileConfEncrypted=Cifrar o contrasinal da base de datos no ficheiro conf.php. É moi recomendable activar esta opción. +InstrucToEncodePass=Para ter o contrasinal codificado en <b>conf.php</b>, mude a liña <br><b>$dolibarr_main_db_pass = "...";</b><br>por<br> <b>$dolibarr_main_db_pass = "crypted:%s";</b> +InstrucToClearPass=Para ter o contrasinal decodificado (visible) en <b>conf.php</b>, mude a liña <br><b>$dolibarr_main_db_pass = "crypted:...";</b><br>por<br><b>$dolibarr_main_db_pass = "%s";</b> +ProtectAndEncryptPdfFiles=Protección dos ficheros PDF xerados. Isto NON está recomendado, pode fallar a xeración de PDF en masa +ProtectAndEncryptPdfFilesDesc=A protección dun documento PDF o garda dispoñible para ler e imprimir con calquera navegador PDF. Porén, a edición e a copia non son posibles. Teña conta de que o uso desta característica fai que a creación global dun conxunto de PDFs non funcione. Feature=Función DolibarrLicense=Licenza Developpers=Desenvolvedores/contribuidores @@ -256,11 +257,12 @@ ReferencedPreferredPartners=Partners preferidos OtherResources=Outros recursos ExternalResources=Recursos externos SocialNetworks=Redes sociais -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 +SocialNetworkId=ID Rede Social +ForDocumentationSeeWiki=Para a documentación de usuario, desenvolvedor (Doc, FAQS),<br> visite o wiki Dolibarr: <br><b><a href="%s" target="_blank">%s</a></b> +ForAnswersSeeForum=Para calquera outra dúbida/axuda, pode facer uso do foro Dolibarr: <br><b><a href="%s" target="_blank">%s</a></b> +HelpCenterDesc1=Aquí hai algúns recursos para obter axuda e soporte de Dolibarr +HelpCenterDesc2=Algúns destes recursos só están dispoñibles en <b>inglés</b>. +CurrentMenuHandler=Xestor de menú actual MeasuringUnit=Unidade de medida LeftMargin=Marxe esquerdo TopMargin=Marxe superior @@ -274,41 +276,41 @@ NoticePeriod=Prazo de aviso NewByMonth=Novo por mes Emails=E-Mails EMailsSetup=Configuración e-mails -EMailsDesc=This page allows you to set parameters or options for email sending. +EMailsDesc=Esta páxina permite configurar parámetros ou opcións para envíos de correos electrónicos. EmailSenderProfiles=Perfís de remitentes de e-mails EMailsSenderProfileDesc=Pode gardar esta sección baleira. Se vostede introduce algúns enderezos de correo aquí, estes serán engadidos a listaxe de posibles emisores dentro da caixa cando escribe un novo enderezo. -MAIN_MAIL_SMTP_PORT=Porto do servidor SMTP (Por defecto en 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=Configuración do Módulo -ModulesSetup=Configuración dos Módulos/Aplicacións +MAIN_MAIL_SMTP_PORT=Porto do servidor SMTP (Valor por defecto en php.ini: <b>%s</b>) +MAIN_MAIL_SMTP_SERVER=Host SMTP/SMTPS (Valor por defecto en php.ini: <b>%s</b>) +MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike=Porto SMTP/SMTPS (Non definido en PHP en sistemas de tipo Unix) +MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike=Nome/ip servidor SMTP/SMTPS (Non definido en PHP en sistemas tipo Unix) +MAIN_MAIL_EMAIL_FROM=Correo electrónico do remitente para correos electrónicos automáticos (valor predeterminado en php.ini: <b>%s </b>) +MAIN_MAIL_ERRORS_TO=Correo electrónico utilizado enviar os correos electrónicos con erros (campos "Errors-To" nos correos electrónicos enviados) +MAIN_MAIL_AUTOCOPY_TO= Enviar a copia oculta (Bcc) de todos os correos electrónicos enviados a +MAIN_DISABLE_ALL_MAILS=Deshabilitar todo o envío de correo electrónico (para fins de proba ou demostracións) +MAIN_MAIL_FORCE_SENDTO=Enviar todos os correos electrónicos a (en lugar de destinatarios reais, para fins de proba) +MAIN_MAIL_ENABLED_USER_DEST_SELECT=Engadir correos electrónicos dos empregados (se se define) na lista de destinatarios predefinidos ao escribir un novo correo electrónico +MAIN_MAIL_SENDMODE=Método de envío de correos electrónico +MAIN_MAIL_SMTPS_ID=ID de autentificación SMTP (se o servidor de envío require autenticación) +MAIN_MAIL_SMTPS_PW=Contrasinal SMTP (se o servidor de envío require autenticación) +MAIN_MAIL_EMAIL_TLS=Usar cifrado TLS (SSL) +MAIN_MAIL_EMAIL_STARTTLS=Usar cifrado TLS (STARTTLS) +MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED=Autorizar os certificados autosinados +MAIN_MAIL_EMAIL_DKIM_ENABLED=Use DKIM para xerar sinatura de correo electrónico +MAIN_MAIL_EMAIL_DKIM_DOMAIN=Dominio de correo electrónico para usar con DKIM +MAIN_MAIL_EMAIL_DKIM_SELECTOR=Nome do selector DKIM +MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY=Chave privada para a sinatura de DKIM +MAIN_DISABLE_ALL_SMS=Desactivar todo o envío de SMS (para fins de proba ou demostracións) +MAIN_SMS_SENDMODE=Método de envío de SMS +MAIN_MAIL_SMS_FROM=Número de teléfono por defecto do remitente para os envíos SMS +MAIN_MAIL_DEFAULT_FROMTYPE=Correo electrónico predeterminado do remitente para o envío manual (correo electrónico do usuario ou correo electrónico da Empresa) +UserEmail=Correo electrónico de usuario +CompanyEmail=Correo electrónico da empresa +FeatureNotAvailableOnLinux=Funcionalidade non dispoñible en sistemas similares a Unix. Probe localmente o seu programa sendmail.. +FixOnTransifex=Corrixa a tradución na plataforma de tradución en liña do proxecto Transifex +SubmitTranslation=Se a tradución deste idioma non está completa ou atopa erros, pode corrixilo editando ficheiros no directorio <b>langs/%s</b> e envía o teu cambio a www.transifex.com/dolibarr-association/dolibarr/ +SubmitTranslationENUS=Se a tradución deste idioma non está completa ou atopa erros, pode corrixilo editando ficheiros no directorio <b>langs/%s</b> e enviar os ficheiros modificados a dolibarr.org/forum ou, se son desenvolvedores, cun PR a github.com/Dolibarr/dolibarr. +ModuleSetup=Configuración do módulo +ModulesSetup=Configuración dos módulos ModuleFamilyBase=Sistema ModuleFamilyCrm=Xestión de Relacións cos Clientes (CRM) ModuleFamilySrm=Xestión de Relacións cos Provedores (VRM) @@ -335,7 +337,7 @@ UnpackPackageInModulesRoot=Para instalar un módulo externo, descomprima o fiche SetupIsReadyForUse=A instalación do módulo rematou. Porén, debe habilitar e configurar o módulo na súa aplicación, indo á páxina para configurar os módulos: <a href="%s">%s</a>. NotExistsDirect=O directorio raíz alternativo non está configurado nun directorio existente.<br> InfDirAlt=Dende a versión 3, é posible definir un directorio raíz alternativo. Isto permítelle almacenar, nun directorio adicado, plug-ins e prantillas persoalizadas.<br>Só en que crear un directorio na raíz de Dolibarr (por exemplo: custom).<br> -InfDirExample=<br>Despois indíqueo no ficheiro <strong>conf.php</strong><br> $ dolibarr_main_url_root_alt = 'http://miservidor /custom'<br>$ dolibarr_main_document_root_alt = '/ruta/de/dolibarr/htdocs/custom '<br>Se estas liñas atópanse comentadas con "#", para habilitalas, chega con descomentar eliminando o carácter "#". +InfDirExample=<br>Despois indíqueo no ficheiro <strong>conf.php</strong><br> $dolibarr_main_url_root_alt ='/custom'<br>$dolibarr_main_document_root_alt= '/path/of/dolibarr/htdocs/custom '<br>Se estas liñas atópanse comentadas con "#", para habilitalas, chega con descomentar eliminando o carácter "#". YouCanSubmitFile=Alternativamente, pode subir o módulo .zip comprimido: CurrentVersion=Versión actual de Dolibarr CallUpdatePage=Ir á páxina de actualización da estrutura da base de datos e os seus datos: %s. @@ -348,7 +350,7 @@ 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> GenericMaskCodes3=Calquera outro caracter na máscara quedará sen cambios. <br>Non son permitidos espazos <br> -GenericMaskCodes4a=<u>Exemplo na 99ª %s do terceiro. A empresa realizada o 31/03/2007: </u><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> GenericMaskCodes5=<b>ABC {yy} {mm} - {000000} </b> dará <b> ABC0701-000099 </b><br><b> {0000+100@1}-ZZZ/{dd}/XXX</b> dará <b>0199-ZZZ/31/ XXX</b> <br><b>IN{yy}{mm}-{0000}-{t}</b> dará <b>IN0701-0099-A</b> se o tipo de empresa é 'Responsable Inscrito' con código para o tipo 'A_RI' @@ -364,7 +366,7 @@ UMask=Parámetro UMask de novos ficheiros en Unix/Linux/BSD. UMaskExplanation=Este parámetro determina os dereitos dos ficheiros creados no servidor Dolibarr (durante a subida, por exemplo).<br>Este debe ser o valor octal (por exemplo, 0666 significa leitura / escritura para todos).<br>Este parámetro non ten ningún efecto sobre un servidor Windows. SeeWikiForAllTeam=Vexa o wiki para mais detalles de todos os actores e da súa organización UseACacheDelay= Demora en caché da exportación en segundos (0 o vacio sen caché) -DisableLinkToHelpCenter=Ocultar a ligazón "¿Precisa soporte ou axuda?" na páxina de login +DisableLinkToHelpCenter=Ocultar a ligazón "<b>¿Precisa soporte ou axuda?</b>" na páxina de login DisableLinkToHelp=Ocultar a ligazón á axuda en liña "<b>%s</b>" AddCRIfTooLong=Non hai liñas de corte automático, de tal xeito que se o texto é longo demais non será amosado nos documentos. Prégase que engada un salto de liña na área de texto se fora preciso ConfirmPurge=¿Está certo de querer realizar esta purga?<br>Isto borrará definitivamente todos os datos dos seus ficheiros (área GED, ficheiros axuntados...). @@ -373,11 +375,11 @@ LanguageFilesCachedIntoShmopSharedMemory=ficheiros .lang en memoria compartida LanguageFile=Ficheiro de idioma ExamplesWithCurrentSetup=Exemplos coa configuración actual ListOfDirectories=Listaxe de directorios de prantillas OpenDocument -ListOfDirectoriesForModelGenODT=Listaxe de directorios que conteñen as prantillas de ficheiros co formato OpenDocument.<br>Poña aquí a ruta completa de directorios.<br>Engada un retorno de carro entre cada directorio<br> Para engadir un directorio de módulo GED, engada aquí <b>DOL_DATA_ROOT/ecm/seunomededirectorio.</b><br><br>Os ficheiros deses directorios deben terminar co <b>.odt</b> o <b>.ods</b>. +ListOfDirectoriesForModelGenODT=Listaxe de directorios que conteñen as prantillas de ficheiros co formato OpenDocument.<br><br> Poña aquí a ruta completa de directorios.<br>Engada un retorno de carro entre cada directorio<br> Para engadir un directorio de módulo GED, engada aquí <b>DOL_DATA_ROOT/ecm/seunomededirectorio.</b><br><br>Os ficheiros deses directorios deben terminar co <b>.odt</b> o <b>.ods</b>. NumberOfModelFilesFound=Número de ficheiros de prantillas ODT/ODS atopados nestes directorios ExampleOfDirectoriesForModelGen=Exemplos de sintaxe:<br>c:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir -FollowingSubstitutionKeysCanBeUsed=Colocando as seguintes etiquetas na prantilla, obterá uhna substitución co valor persoalizado ao xerar o documento: -FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Crear_un_modelo_de_documento_ODT +FollowingSubstitutionKeysCanBeUsed=<br>Colocando as seguintes etiquetas na prantilla, obterá uhna substitución co valor persoalizado ao xerar o documento: +FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Orde visualización nome/apelidos DescWeather=Os seguintes gráficos serán amosados no panel se o número de elementos chega a estes valores: KeyForWebServicesAccess=Clave para usar os Web Services (parámetro "dolibarrkey" en webservices) @@ -391,12 +393,12 @@ ModuleMustBeEnabledFirst=O módulo <b>%s</b> debe ser activado antes se precisa SecurityToken=Chave para cifrar urls NoSmsEngine=Non hai dispoñible ningún xestor de envío de SMS. Os xestores de envío de SMS no son instalados por defecto xa que dependen de cada provedor, porén pode atopalos na plataforma %s PDF=PDF -PDFDesc=Global options for PDF generation -PDFAddressForging=Rules for address section +PDFDesc=Opcións globais para xerar os PDF +PDFAddressForging=Regras de visualización de enderezos HideAnyVATInformationOnPDF=Ocultar toda a información relacionada co IVE ao xerar os PDF PDFRulesForSalesTax=Regras de IVE PDFLocaltax=Regras para %s -HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT +HideLocalTaxOnPDF=Ocultar a taxa %s na columna de impostos do pdf HideDescOnPDF=Ocultar descrición dos produtos ao xerar os PDF HideRefOnPDF=Ocultar referencia dos produtos ao xerar os PDF HideDetailsOnPDF=Ocultar detalles das liñas ao xerar os PDF @@ -406,16 +408,16 @@ UrlGenerationParameters=Seguridade das URLs SecurityTokenIsUnique=¿Usar un parámetro securekey único para cada URL? EnterRefToBuildUrl=Introduza a referencia do obxecto %s GetSecuredUrl=Obter a URL calculada -ButtonHideUnauthorized=Ocultar botóns de accións non permitidas aos usuarios non administradores en vez de amosalos atenuados +ButtonHideUnauthorized=Ocultar botóns de accións non permitidas tamén aos usuarios internos (en gris doutro xeito) OldVATRates=Taxa de IVE antiga NewVATRates=Taxa de IVE nova PriceBaseTypeToChange=Cambiar o prezo cuxa referencia de base é MassConvert=Convertir masivamente PriceFormatInCurrentLanguage=Formato de prezo na lingua utilizada String=Cadea de texto -String1Line=String (1 line) +String1Line=Cadea (1 liña) TextLong=Texto longo -TextLongNLines=Long text (n lines) +TextLongNLines=Texto longo (n liñas) HtmlText=Texto html Int=Numérico enteiro Float=Decimal @@ -435,31 +437,31 @@ ExtrafieldCheckBox=Caixa de verificación ExtrafieldCheckBoxFromList=Caixa de verificación da táboa ExtrafieldLink=Vínculo a un obxecto ComputedFormula=Campo combinado -ComputedFormulaDesc=You can enter here a formula using other properties of object or any PHP coding to get a dynamic computed value. You can use any PHP compatible formulas including the "?" condition operator, and following global object: <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) -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) +ComputedFormulaDesc=Pode introducir aquí unha fórmula utilizando outras propiedades de obxecto o calquera código PHP para obter un valor calculado dinámico. Pode utilizar calquera fórmula compatible con PHP, incluído o operador de condición "?" e os obxectos globais seguintes: <strong>$db, $conf, $langs, $mysoc, $user, $object</strong>.<br><strong>ATENCIÓN</strong>: Só algunhas propiedades de $object poden estar dispoñibles. Se precisa propiedades non cargadas, só procure o obxecto na súa fórmula como no segundo exemplo. <br>Usar un campo computado significa que non pode ingresar ningún valor dende a interfaz. Tamén, se hai un error de sintaxe, e posible que a fórmula non devolva nada. <br><br>Exemplo 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> Exemplo de recarga de obxecto<br> (($reloadedobj = new Societe($db)) && ($reloadedobj->fetch($obj->id ? $obj->id : ($obj->rowid ? $obj->rowid : $object->id)) > 0)) ? $reloadedobj->array_options['options_extrafieldkey'] * $reloadedobj->capital / 5 : '-1'<br><br>Outro exemplo de fórmula para forzar a carga do obxecto e o seu obxecto principal: <br>(($reloadedobj = new Task($db)) && ($reloadedobj->fetch($object->id) > 0) && ($secondloadedobj = new Project($db)) && ($secondloadedobj->fetch($reloadedobj->fk_project) > 0)) ? $secondloadedobj->ref : 'Parent project not found' +Computedpersistent=Almacenar campo combinado +ComputedpersistentDesc=Os campos adicionais calculados gardaranse na base de datos, con todo, o valor só se recalculará cando se cambie o obxecto deste campo. Se o campo calculado depende doutros obxectos ou datos globais, este valor pode ser incorrecto. +ExtrafieldParamHelpPassword=Deixar este campo en branco significa que este valor gardarase sen cifrado (o campo estará oculto coa estrelas na pantalla). <br> Estableza aquí o valor "auto" para usar a regra de cifrado predeterminada para gardar o contrasinal na base de datos (entón o valor lido será só o hash, non hai forma de recuperar o valor orixinal) +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 +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 +LocalTaxDesc=Algúns países poden aplicar dous ou tres impostos en cada liña de factura. Se é o caso, escolla o tipo da segunda e terceira taxa e o seu valor. Os tipos posibles son: <br> 1: aplícase o imposto local sobre produtos e servizos sen IVE (a taxa local calcúlase sobre a base impoñible) <br> 2: aplícase o imposto local sobre produtos e servizos incluíndo o IVE (a taxa local calcúlase sobre a base impoñible + imposto principal ) <br> 3: aplicar o imposto local sobre produtos sen IVE (a taxa local calcúlase sobre a base impoñible) <br> 4: aplicar o imposto local sobre produtos incluíndo a IVE (a taxa local calcúlase sobre a base impoñible + ive principal) <br> 5: local imposto aplicable a servizos sen IVE (a taxa local calcúlase sobre a base impoñible) <br> 6: aplícase o imposto local a servizos incluíndo a IVE (a taxa local calcúlase sobre a base impoñible + imposto) SMS=SMS -LinkToTestClickToDial=Enter a phone number to call to show a link to test the ClickToDial url for user <strong>%s</strong> +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=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. +LinkToTest=Ligazón seleccionable xarada para o usuario <strong>%s</strong> (faga clic 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 SetAsDefault=Establecer por defecto ValueOverwrittenByUserSetup=Atención: Este valor pode ser sobreescrito por un valor específico da configuración do usuario (cada usuario pode ter a súa propia url clicktodial) -ExternalModule=Módulo externo - Instalado no directorio %s +ExternalModule=Módulo externo InstalledInto=Instalado no directory %s -BarcodeInitForThirdparties=Mass barcode init for third-parties +BarcodeInitForThirdparties=Inicio de código de barras masivo para terceiros BarcodeInitForProductsOrServices=Inicio masivo de código de barras para produtos ou servizos CurrentlyNWithoutBarCode=Actualmente ten <strong>%s</strong> rexistros de <strong>%s</strong> %s sen código de barras definido. InitEmptyBarCode=Iniciar valor para os %s rexistros baleiros. @@ -478,44 +480,44 @@ ModuleCompanyCodeCustomerAquarium=%s seguido por un código de cliente para cód ModuleCompanyCodeSupplierAquarium=%s seguido por un código de provedor para código de contabilidade de provedor ModuleCompanyCodePanicum=Volta un código contable baleiro. ModuleCompanyCodeDigitaria=O código contable depende do código do terceiro. O código está formado polo caracter ' C ' na primeira posición seguido dos 5 primeiros caracteres do código terceiro. -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. +ModuleCompanyCodeCustomerDigitaria=%s seguido do nome de cliente acortado polo número de caracteres:%s para o código de contabilidade do cliente. +ModuleCompanyCodeSupplierDigitaria=%s seguido do nome do provedor acortado polo número de caracteres:%s para o código de contabilidade do provedor. Use3StepsApproval=De forma predeterminada, os pedimentos a provedor teñen que ser creados e aprobados por 2 usuarios diferentes (un paso/usuario para crear e un paso/usuario para aprobar. Teña conta de que se o usuario ten tanto o permiso para crear e aprobar, un paso/usuario será suficiente. Pode pedir con esta opción introducir unha terceira etapa de aprobación/usuario, se a cantidade é superior a un valor específico (polo que serán precisos 3 pasos: 1 validación, 2=primeira aprobación e 3=segunda aprobación se a cantidade é suficiente).<br>Deixe baleiro se unha aprobación (2 pasos) é suficiente, se establece un valor moi baixo (0,1) requírese unha segunda aprobación sempre (3 pasos). UseDoubleApproval=Usar 3 pasos de aprobación se o importe (sen IVE) é maior que... -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=Se o seu provedor SMTP de correo electrónico precisa restrinxir o cliente de correo electrónico a algunhos enderezos IP (moi raro), este é o seu enderezo IP da súa aplicación ERP CRM: <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>. +WarningPHPMail=AVISO: a configuración para enviar correos electrónicos desde a aplicación está a usar a configuración xenérica predeterminada. Moitas veces é mellor configurar os correos electrónicos saíntes para usar o servidor de correo electrónico do seu fornecedor de servizos de correo electrónico en lugar da configuración predeterminada por varios motivos: +WarningPHPMailA=- Usar o servidor do fornecedor de servizos de correo electrónico aumenta a confiabilidade do seu correo electrónico, polo que aumenta a entrega sen ser marcado como SPAM +WarningPHPMailB=- Algúns provedores de servizos de correo electrónico (como Yahoo) non permiten enviar un correo electrónico desde outro servidor que o seu propio. A súa configuración actual usa o servidor da aplicación para enviar correo electrónico e non o servidor do seu fornecedor de correo electrónico, polo que algúns destinatarios (o compatible co protocolo DMARC restritivo) preguntarán ao seu fornecedor de correo electrónico se poden aceptar o seu correo electrónico e algúns provedores de correo electrónico. (como Yahoo) pode responder "non" porque o servidor non é seu, polo que poucos dos seus correos electrónicos enviados poden non ser aceptados para a súa entrega (teña coidado tamén coa cota de envío do seu fornecedor de correo electrónico). +WarningPHPMailC=- Tamén é interesante usar o servidor SMTP do seu propio fornecedor de servizos de correo electrónico para enviar correos electrónicos, polo que todos os correos electrónicos enviados desde a aplicación tamén se gardarán no directorio "Enviado" da súa caixa de correo. +WarningPHPMailD=Se o método 'PHP Mail' é realmente o método que desexa usar, pode eliminar este aviso engadindo a constante MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP a 1 en Inicio-Configuración-Outro. MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP to 1 in Home-Setup-Other. +WarningPHPMail2=Se o seu fornecedorr SMTP de correo electrónico precisa restrinxir o cliente de correo electrónico a algúns enderezos IP (moi raro), este é o seu enderezo IP do seu axente de usuario de correo (MUA) da súa aplicación ERP CRM: <strong>%s</strong>. +WarningPHPMailSPF=Se o nome de dominio do seu enderezo de correo electrónico do remitente está protexido por un rexistro SPF (pregúntelle ao seu rexistro de nome de dominio), debe engadir as seguintes IPs no rexistro SPF do DNS do seu dominio: <strong>%s</strong>. ClickToShowDescription=Clic para ver a descrición DependsOn=Este módulo precisa o módulo(s) -RequiredBy=Este módulo é requirido polos módulos +RequiredBy=Este módulo é requirido polo(s) módulo(s) TheKeyIsTheNameOfHtmlField=Este é o nome do campo HTML. Son precisos coñecementos técnicos para ler o contido da páxina HTML para obter o nome clave dun campo. PageUrlForDefaultValues=Debe introducir aquí a URL relativa da páxina. Se inclúe parámetros na URL, os valores predeterminados serán efectivos se todos os parámetros están configurados co mesmo valor. PageUrlForDefaultValuesCreate=<br> Exemplo: <br> Para o formulario para crear un novo terceiro, é <strong> %s </strong>. <br> Para a URL dos módulos externos instalados no directorio custom, non inclúa "custom/", use a ruta como <strong> mymodule/mypage.php </strong> e non custom/mymodule/mypage.php. <br> Se desexa un valor predeterminado só se a url ten algún parámetro, pode usar <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. +PageUrlForDefaultValuesList=<br> Exemplo: <br> Para a páxina que lista terceiros, é <strong>%s</strong>. <br> Para o URL de módulos externos instalados no directorio custom, non inclúa o "custom/" use un camiño como <strong> mymodule/mypagelist.php</strong> e non custom/mymodule/mypagelist.php. <br> Se quere un valor predeterminado só se a URL ten algún parámetro, pode usar <strong>%s</strong> +AlsoDefaultValuesAreEffectiveForActionCreate=Teña conta tamén que sobreescribir os valores predeterminados para a creación de formularios só funciona para páxinas que foron deseñadas correctamente (polo tanto, co parámetro action = create ou presend ...) +EnableDefaultValues=Activar a personalización dos valores predeterminados +EnableOverwriteTranslation=Activar o uso de traducións sobreescritas +GoIntoTranslationMenuToChangeThis=Atopouse unha tradución para a clave con este código. Para cambiar este valor, debe editalo desde Inicio-Configuración-Tradución. +WarningSettingSortOrder=Aviso, establecer unha orde de clasificación predeterminada pode producir un erro técnico ao entrar na páxina da listaxe se o campo é un campo descoñecido. Se experimentas tal erro, volte a esta páxina para eliminar a orde de clasificación predeterminada e restaurar o comportamento predeterminado.Field=Campo Field=Campo ProductDocumentTemplates=Prantillas de documentos para xerar documento de produto FreeLegalTextOnExpenseReports=Texto libre legal nos informes de gastos WatermarkOnDraftExpenseReports=Marca de auga nos informes de gastos -AttachMainDocByDefault=Establezca esto en 1 se desexa axuntar o documento principal ao e-mail de forma predeterminada (se corresponde) +AttachMainDocByDefault=Establezca isto en 1 se desexa axuntar o documento principal ao e-mail de forma predeterminada (se corresponde) FilesAttachedToEmail=Axuntar ficheiro SendEmailsReminders=Enviar recordatorios da axenda por correo electrónico davDescription=Configuración do servidor DAV DAVSetup=Configuración do módulo 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. +DAV_ALLOW_PRIVATE_DIR=Active o directorio privado xenérico (o directorio adicado de WebDAV chamado "privado" é preciso iniciar sesión) +DAV_ALLOW_PRIVATE_DIRTooltip=O directorio privado xenérico é un directorio WebDAV ao que calquera pode acceder co seu inicio de sesión/contrasinal de aplicación. +DAV_ALLOW_PUBLIC_DIR=Active o directorio público xenérico (o directorio adicado de WebDAV chamado "público" - non é preciso iniciar sesión) +DAV_ALLOW_PUBLIC_DIRTooltip=O directorio público xenérico é un directorio WebDAV ao que calquera pode acceder (en modo de lectura e escritura), sen autorización necesaria (conta de inicio de sesión/contrasinal). +DAV_ALLOW_ECM_DIR=Active o directorio privado DMS/ECM (directorio raíz do módulo DMS/ECM - é preciso iniciar sesión) +DAV_ALLOW_ECM_DIRTooltip=O directorio raíz onde son cargados todos os ficheiros manualmente cando se usa o módulo DMS/ECM. Do mesmo xeito que o acceso desde a interface web, precisará un inicio de sesión/contrasinal válido con permisos adecuados para acceder a ela. # Modules Module0Name=Usuarios e grupos Module0Desc=Xestión de Usuarios / Empregados e grupos @@ -546,17 +548,17 @@ Module50Desc=Xestión de produtos Module51Name=Mailings masivos Module51Desc=Administraciónde correo de papel en masa Module52Name=Stocks -Module52Desc=Xestión de stocks (só produtos) +Module52Desc=Xestión de stock Module53Name=Servizos Module53Desc=Xestión de servizos Module54Name=Contratos/Suscricións Module54Desc=Xestión de contratos (servizos ou suscripcións recurrentes) Module55Name=Códigos de barras Module55Desc=Xestión dos códigos de barras -Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Payments by Direct Debit -Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. +Module56Name=Pagamento por transferencia bancaria +Module56Desc=Xestión do pagamento de provedores mediante pedimentos de transferencia. Inclúe a xeración de ficheiros SEPA para países europeos. +Module57Name=Domiciliacións bancarias +Module57Desc=Xestión de domiciliacións. Tamén inclue xeración de ficheiro SEPA para países Europeos. Module58Name=ClickToDial Module58Desc=Integración con sistema ClickToDial (Asterisk, ...) Module60Name=Pegatinas @@ -615,14 +617,14 @@ Module1520Desc=Xeración de documentos de correo masivo Module1780Name=Etiquetas/Categorías Module1780Desc=Crear etiquetas/categoría (produtos, clientes, provedores, contactos ou membros) Module2000Name=Editor WYSIWYG -Module2000Desc=Permite a edición dn área de texto usando CKEditor +Module2000Desc=Permite edictar/formatar campos de texto usando CKEditor (html) Module2200Name=Precios dinámicos -Module2200Desc=Activar o uso de expresións matemáticas para auto xerarprezos +Module2200Desc=Activar o uso de expresións matemáticas para auto xerar prezos Module2300Name=Tarefas programadas Module2300Desc=Xestión do traballo programado (alias cron ou chrono taboa) Module2400Name=Eventos/Axenda -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 +Module2400Desc=Siga os eventos ou citas. Deixe que Dolibarr rexistre eventos automáticos co fin de realizar seguemento ou rexistre eventos manuais ou xuntanzas. Este é o módulo principal para unha bona xestión de relacións cos clientes ou provedores. +Module2500Name=GED / SGD Module2500Desc=Sistema de Xestión de Documentos / Xestión Electrónica de Contidos. Organización automática dos seus documentos xerados o almacenados. Compárta cando o precise. Module2600Name=API/Servizos web (servidor SOAP) Module2600Desc=Habilitar os servizos Dolibarr SOAP proporcionando servizos API @@ -644,7 +646,7 @@ 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) Module10000Name=Sitios web -Module10000Desc=Cree sitios web públicos cun editor WYSIWYG. Configure o servidor web (Apache, Nginx,...) para que apunte ao directorio adicado para telo en líña en Internet. +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 Module20000Desc=Xestión dos días libres dos empregados Module39000Name=Lotes de produtos @@ -658,26 +660,26 @@ Module50100Desc=Módulo punto de venda (TPV) Module50150Name=Terminales Punto de Venda Module50150Desc=Módulo punto de venda (Pantalla táctil TPV) Module50200Name=Paypal -Module50200Desc=Ofrece aos clientes pagamentos online vía PayPal (cuenta PayPal o tarjetas de crédito/débito). Esto puede ser usado para permitir a sus clientes realizar pagamentos libres o pagamentos en un objeto de Dolibarr en particular (factura, pedimento...) +Module50200Desc=Ofrece aos clientes pagamentos online vía PayPal (cuenta PayPal o tarxetas de crédito/débito). Esto pode ser usado para permitir aos seus clientes realizar pagamentos libres ou pagamentos nun obxecto de Dolibarr en particular (factura, pedimento...) 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...) +Module50300Desc=Ofrece aos clientes unha páxina de pago en liña Stripe (tarxetas de crédito/débito). Isto pódese usar para permitir aos seus clientes realizar pagamentos ad hoc ou pagos relacionados cun obxecto específico de Dolibarr (factura, pedimento etc ...) Module50400Name=Contabilidade (avanzada) -Module50400Desc=Accounting management (double entries, support General and Subsidiary Ledgers). Export the ledger in several other accounting software formats. +Module50400Desc=Xestión contable (dobre partida, libros xerais e auxiliares). Exporte a varios formatos de software de contabilidade. 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=A impresión directa (sen abrir os documentos) usa o interfaz Cups IPP (A impresora ten que ser visible dende o servidor e CUPS debe estar instalado no servidor) Module55000Name=Enquisa ou Voto Module55000Desc=Módulo para facer enquisas en líña ou votos (como Doodle, Studs, Rdvz, ...) Module59000Name=Marxes -Module59000Desc=Módulo para xestionar os marxes de beneficio +Module59000Desc=Modulo para controlar marxes Module60000Name=Comisións Module60000Desc=Módulo para xestionar aas comisións de venda Module62000Name=Incoterms Module62000Desc=Engade funcións para xestionar Incoterms Module63000Name=Recursos -Module63000Desc=Manage resources (printers, cars, rooms, ...) for allocating to events +Module63000Desc=Xestionar recursos (impresoras, automóbiles, salas, ...) pode asignalos a eventos Permission11=Consultar facturas de cliente Permission12=Crear/Modificar facturas de cliente -Permission13=Invalidate customer invoices +Permission13=Invalidar facturas de cliente Permission14=Validar facturas de cliente Permission15=Enviar facturas de cliente por correo Permission16=Emitir pagamentos de facturas de cliente @@ -694,7 +696,7 @@ Permission32=Crear/modificar produtos Permission34=Eliminar produtos Permission36=Ver/xestionar produtos ocultos Permission38=Exportar produtos -Permission39=Ignore minimum price +Permission39=Ignore prezo mínimo Permission41=Consultar proxectos e tarefas (proxectos compartidos e proxectos dos que son contacto). Tamén pode introducir tempos consumidos, para mín ou os meus subordinados, en tarefas asignadas (Follas de tempo). Permission42=Crear/modificar proxectos (proxectos compartidos e proxectos dos que son contacto). Tamén pode crear tarefas e asignar usuarios a proxectos e tarefas Permission44=Eliminar proxectos (compartidos ou son contacto) @@ -703,9 +705,9 @@ Permission61=Consultar intervencións Permission62=Crear/modificar intervencións Permission64=Eliminar intervencións Permission67=Exportar intervencións -Permission68=Send interventions by email -Permission69=Validate interventions -Permission70=Invalidate interventions +Permission68=Enviar intervención por correo +Permission69=Validar intervención +Permission70=Invalidar intervencións Permission71=Consultar membros Permission72=Crear/modificar membros Permission74=Eliminar membros @@ -728,7 +730,7 @@ Permission95=Consultar balances e resultados Permission101=Consultar expedicións Permission102=Crear/modificar expedicións Permission104=Validar expedicións -Permission105=Send sendings by email +Permission105=Enviar envíos por correo Permission106=Exportar expedicións Permission109=Eliminar expedicións Permission111=Consultar contas financieras @@ -836,10 +838,10 @@ Permission402=Crear/modificar haberes Permission403=Validar haberes Permission404=Eliminar haberes Permission430=Usa barra de debug -Permission511=Read payments of salaries (yours and subordinates) +Permission511=Consultar pagamentos de salarios (teus e dos subordinados) Permission512=Crear/modificar pagamentos de salarios Permission514=Eliminar pagamentos de salarios -Permission517=Read payments of salaries of everybody +Permission517=Ler pagos de salarios de todos Permission519=Exportar salarios Permission520=Consultar Créditos Permission522=Crear/modificar Créditos @@ -851,19 +853,19 @@ Permission532=Crear/modificar servizos Permission534=Eliminar servizos Permission536=Ver/xestionar os servizos ocultos Permission538=Exportar servizos -Permission561=Read payment orders by credit transfer -Permission562=Create/modify payment order by credit transfer -Permission563=Send/Transmit payment order by credit transfer -Permission564=Record Debits/Rejections of credit transfer -Permission601=Read stickers -Permission602=Create/modify stickers -Permission609=Delete stickers +Permission561=Ler ordes de pagamento mediante transferencia +Permission562=Crear/modificar orde de pagamento mediante transferencia +Permission563=Enviar/Transmitir orde de pagamento mediante transferencia +Permission564=Rexistrar débitos/rexeitamentos da transferencia +Permission601=Ler etiquetas +Permission602=Crear/modificar eqtiquetas +Permission609=Borrar etiquetas Permission650=Consultar lista de materiais Permission651=Crear/Actualizar lista de material Permission652=Eliminar lista de material -Permission660=Read Manufacturing Order (MO) -Permission661=Create/Update Manufacturing Order (MO) -Permission662=Delete Manufacturing Order (MO) +Permission660=Ler a orde de fabricación (MO) +Permission661=Crear / Actualizar orde de fabricación (MO) +Permission662=Eliminar orde de fabricación (MO) Permission701=Consultar doacións/subvencións Permission702=Crear/modificar doacións/subvencións Permission703=Eliminar doacións/subvencións @@ -873,8 +875,8 @@ Permission773=Eliminar informe de gastos Permission774=Consultar todos os informes de gastos (incluidos os non subordinados) Permission775=Aprobar informe de gastos Permission776=Pagar informe de gastos -Permission777=Read expense reports of everybody -Permission778=Create/modify expense reports of everybody +Permission777=Ler informes de gastos de todos +Permission778=Crear/modificar informes de gastos de todos Permission779=Exportar informe de gastos Permission1001=Consultar stocks Permission1002=Crear/modificar almacéns @@ -899,9 +901,9 @@ Permission1185=Aprobar pedimentos a provedores Permission1186=Enviar pedimentos a provedores Permission1187=Recibir pedimentos de provedores Permission1188=Pechar pedimentos a provedores -Permission1189=Check/Uncheck a purchase order reception +Permission1189=Marcar/Desmarcar a recepción dunha orde de compra Permission1190=Aprobar (segunda aprobación) pedimentos a provedores -Permission1191=Export supplier orders and their attributes +Permission1191=Exportar pedimentos de provedores e os seus atributos Permission1201=Obter resultado dunha exportación Permission1202=Crear/codificar exportacións Permission1231=Consultar facturas de provedores @@ -915,8 +917,8 @@ 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 Permission1421=Exportar pedimentos de clientes e campos adicionais -Permission1521=Read documents -Permission1522=Delete documents +Permission1521=Ler documentos +Permission1522=Eliminar documentos Permission2401=Consultar accións (eventos ou tarefas) ligadas a súa conta Permission2402=Crear/modificar accións (eventos ou tarefas) ligadas a súa conta Permission2403=Eliminar accións (eventos ou tarefas) ligadas a súa conta @@ -931,7 +933,7 @@ Permission2515=Configuración directorios de documentos Permission2801=Utilizar o cliente FTP en modo leitura (só explorar e descargar) Permission2802=Utilizar o cliente FTP en modo escritura (borrar ou subir ficheiros) Permission3200=Consultar eventos arquivados e huellas dixitais -Permission3301=Generate new modules +Permission3301=Xerar novos módulos Permission4001=Ver empregados Permission4002=Crear empregados Permission4003=Eliminar empregados @@ -951,13 +953,13 @@ Permission23001=Consultar. Traballo programado Permission23002=Crear/actualizar. Traballo programado Permission23003=Borrar. Traballo Programado Permission23004=Executar. Traballo programado -Permission50101=Use Point of Sale (SimplePOS) -Permission50151=Use Point of Sale (TakePOS) +Permission50101=Usar TPV +Permission50151=Usar TPV (TakeTPV) Permission50201=Consultar as transaccións Permission50202=Importar as transaccións -Permission50330=Read objects of Zapier -Permission50331=Create/Update objects of Zapier -Permission50332=Delete objects of Zapier +Permission50330=Ler obxectos de Zapier +Permission50331=Crear/Actualizar obxectos de Zapier +Permission50332=Eliminar obxectos de Zapier Permission50401=Contabilizar produtos e facturas con contas contables Permission50411=Consultar operacións do Libro Maior Permission50412=Rexistrar/Editar operacións no Libro Maior @@ -981,21 +983,21 @@ Permission63001=Consultar recursos Permission63002=Crear/modificar recursos Permission63003=Eliminar recursos Permission63004=Ligar recursos a eventos da axenda -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 +Permission64001=Permitir impresión directa +Permission67000=Permitir impresión de recibos +Permission68001=Ler o informe intracom +Permission68002=Crear/modificar informe intracom +Permission68004=Eliminar informe intracom +Permission941601=Ler recibos +Permission941602=Crear e modificar recibos +Permission941603=Validar recibos +Permission941604=Enviar recibos por correo electrónico +Permission941605=Exportar recibos +Permission941606=Eliminar recibos DictionaryCompanyType=Tipos de terceiros DictionaryCompanyJuridicalType=Formas xurídicas de terceiros -DictionaryProspectLevel=Prospect potential level for companies -DictionaryProspectContactLevel=Prospect potential level for contacts +DictionaryProspectLevel=Nivel potencial de perspectivas para as empresas +DictionaryProspectContactLevel=Nivel potencial de perspectivas para clientes DictionaryCanton=Provincias DictionaryRegion=Rexións DictionaryCountry=Países @@ -1003,7 +1005,7 @@ DictionaryCurrency=Moedas DictionaryCivility=Títulos honoríficos DictionaryActions=Tipos de eventos da axenda DictionarySocialContributions=Tipos de impostos sociais ou fiscais -DictionaryVAT=Tasa de IVE (Imposto sobre vendas en EEUU) +DictionaryVAT=Tipos de IVE ou Tipos de impostos sobre Vendas DictionaryRevenueStamp=Importes de selos fiscais DictionaryPaymentConditions=Condicións de pagamento DictionaryPaymentModes=Modos de pagamento @@ -1025,14 +1027,14 @@ DictionaryEMailTemplates=Prantillas E-Mails DictionaryUnits=Unidades DictionaryMeasuringUnits=Unidades de Medida DictionarySocialNetworks=Redes sociais -DictionaryProspectStatus=Prospect status for companies -DictionaryProspectContactStatus=Prospect status for contacts +DictionaryProspectStatus=Estado cliente potencial +DictionaryProspectContactStatus=Estado da prospección dos contactos DictionaryHolidayTypes=Tipos de vacacións DictionaryOpportunityStatus=Estado de oportunidade para o proxecto/oportunidade DictionaryExpenseTaxCat=Informe de gastos - Categorías de transporte DictionaryExpenseTaxRange=Informe de gastos - Rango por categoría de transporte -DictionaryTransportMode=Intracomm report - Transport mode -TypeOfUnit=Type of unit +DictionaryTransportMode=Informe intracom - Modo de transporte +TypeOfUnit=Tipo de unidade SetupSaved=Configuración gardada SetupNotSaved=Configuración non gardada BackToModuleList=Voltar á lista de módulos @@ -1062,15 +1064,15 @@ LocalTax1ManagementES=Xestión RE LocalTax1IsUsedDescES=O tipo de RE proposto por defecto nas emisións de orzamentos, facturas, pedimentos, etc. Responde á seguinte regra:<br>Se o comprador non está suxeito a RE, RE por defecto=0. Fin da regra.<br>Se o comprador está suxeito a RE entón aplícase o valor de RE por defecto. Fin da regra.<br> LocalTax1IsNotUsedDescES=O tipo de RE proposto por defecto é 0. Fin da regra. LocalTax1IsUsedExampleES=En España, trátase de persoas físicas: autónomos suxeitos a unhos epígrafes concretos do IAE. -LocalTax1IsNotUsedExampleES=En España, trátase de entidades xurídicas: Sociedades limitadas, anónimas, etc. e persoas físicas (autónomos) suxeitos a certos epígrafes do IAE. +LocalTax1IsNotUsedExampleES=En España, trátase de entidades xurídicas: e persoas físicas autónomos suxeitos a certos epígrafes do IAE. LocalTax2ManagementES=Xestión IRPF LocalTax2IsUsedDescES=O tipo de IRPF proposto por defecto nas emisións de orzamentos, facturas, pedimentos, etc. Responde á seguinte regra:<br>Se o vendedor non está suxeito a IRPF, IRPF por defecto=0. Fin da regra.<br>Se o vendedor está suxeito a IRPF entón aplícase o valor de IRPF por defecto. Fin da regra.<br> LocalTax2IsNotUsedDescES=O tipo de IRPF proposto por defecto é 0. Fin da regra. LocalTax2IsUsedExampleES=En España, trátase de persoas físicas: autónomos e profesionais independentes que prestan servizos, e empresas que escolleron o réxime fiscal de módulos. LocalTax2IsNotUsedExampleES=En España, trátase de empresas non suxeitas ao réxime fiscal de módulos. -RevenueStampDesc=The "tax stamp" or "revenue stamp" is a fixed tax you per invoice (It does not depend on amount of invoice). It can also be a percent tax but using the second or third type of tax is better for percent taxes as tax stamps does not provide any reporting. Only few countries uses this type of tax. -UseRevenueStamp=Use a tax stamp -UseRevenueStampExample=The value of tax stamp is defined by default into the setup of dictionaries (%s - %s - %s) +RevenueStampDesc=O "selo fiscal" ou "selo de ingresos" é un imposto fixo por factura (non depende do importe da factura). Tamén pode ser un % de impostos, pero usar o segundo ou terceiro tipo de impostos é mellor para a porcentaxe de impostos, xa que os selos de impostos non proporcionan ningún informe. Só algúns países utilizan este tipo de impostos. +UseRevenueStamp=Use un selo fiscal +UseRevenueStampExample=valor do selo fiscal defínese por defecto na configuración dos dicionarios (%s-%s-%s) CalcLocaltax=Informes de impostos locais CalcLocaltax1=Vendas - Compras CalcLocaltax1Desc=Os informes calcúlanse coa diferencia entre as vendas e as compras @@ -1078,12 +1080,12 @@ CalcLocaltax2=Compras CalcLocaltax2Desc=Os informes se basan no total das compras CalcLocaltax3=Vendas CalcLocaltax3Desc=Os informes se basan no total das vendas -NoLocalTaxXForThisCountry=According to the setup of taxes (See %s - %s - %s), your country does not need to use such type of tax +NoLocalTaxXForThisCountry=Segundo a configuración dos impostos (ver% s -% s -% s), o seu país non precisa aplicar ese tipo de impostos LabelUsedByDefault=Etiqueta que se utilizará se non se atopa tradución para este código LabelOnDocuments=Etiqueta sobre documentos LabelOrTranslationKey=Clave de tradución ou cadea ValueOfConstantKey=Valor da constante -ConstantIsOn=Option %s is on +ConstantIsOn=Opción %s está activada NbOfDays=Nº de días AtEndOfMonth=A fin de mes CurrentNext=Actual/Seguinte @@ -1128,7 +1130,7 @@ LoginPage=Páxina de login BackgroundImageLogin=Imaxe de fondo PermanentLeftSearchForm=Zona de procura permanente do menú esquerdo DefaultLanguage=Idioma por defecto -EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships +EnableMultilangInterface=Activar interfaz multi-idioma para relacións con clientes ou provedores EnableShowLogo=Amosar o logotipo no menú da esquerda CompanyInfo=Empresa/Organización CompanyIds=Identificación da empresa/organización @@ -1152,26 +1154,26 @@ ShowBugTrackLink=Amosar ligazón "<strong>%s</strong>" Alerts=Alertas DelaysOfToleranceBeforeWarning=Atraso antes da amosar unha alerta DelaysOfToleranceDesc=Esta pantalla permite configurar os prazos de tolerancia antes da alerta co icono %s, sobre cada elemento en atraso. -Delays_MAIN_DELAY_ACTIONS_TODO=Atraso (en días) sobre eventos planificados (eventos da axenda) aínda non completados -Delays_MAIN_DELAY_PROJECT_TO_CLOSE=Atraso antes da alerta (en días) sobre proxectos non pechados a tempo -Delays_MAIN_DELAY_TASKS_TODO=Atraso (en días) sobre tarefas planificadas (tarefas de proxectos) aínda non completadas -Delays_MAIN_DELAY_ORDERS_TO_PROCESS=Atraso antes da alerta (en días) sobre pedimentos non procesados -Delays_MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS=Atraso antes da alerta (en días) sobre pedimentos a provedores non procesados -Delays_MAIN_DELAY_PROPALS_TO_CLOSE=Atraso antes da alerta (en días) sobre orzamentos non pechados -Delays_MAIN_DELAY_PROPALS_TO_BILL=Atraso antes da alerta (en días) sobre orzamentos non facturados -Delays_MAIN_DELAY_NOT_ACTIVATED_SERVICES=Atraso antes da alerta (en días) sobre servizos a activar -Delays_MAIN_DELAY_RUNNING_SERVICES=Atraso antes da alerta (en días) sobre servizos expirados -Delays_MAIN_DELAY_SUPPLIER_BILLS_TO_PAY=Atraso antes da alerta (en días) sobre facturas de provedor impagadas -Delays_MAIN_DELAY_CUSTOMER_BILLS_UNPAYED=Atraso antes da alerta (en días) sobre facturas a cliente impagadas -Delays_MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE=Atraso antes da alerta (en días) sobre conciliacións bancarias pendentes -Delays_MAIN_DELAY_MEMBERS=Atraso antes da alerta (en días) sobre cotizacións de membros en atraso -Delays_MAIN_DELAY_CHEQUES_TO_DEPOSIT=Atraso antes da alerta (en días) sobre talóns a ingresar -Delays_MAIN_DELAY_EXPENSEREPORTS=Atraso antes da alerta (en días) sobre informes de gastos a aprobar -Delays_MAIN_DELAY_HOLIDAYS=Atraso antes da alerta (en días) sobre días libres a aprobar. +Delays_MAIN_DELAY_ACTIONS_TODO=Os eventos planificados (eventos da axenda) non se completaron +Delays_MAIN_DELAY_PROJECT_TO_CLOSE=Proxecto non pechado a tempo +Delays_MAIN_DELAY_TASKS_TODO=A tarefa planificada (tarefas do proxecto) non se completou +Delays_MAIN_DELAY_ORDERS_TO_PROCESS=Pedimento non procesado +Delays_MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS=Pedimento non procesado +Delays_MAIN_DELAY_PROPALS_TO_CLOSE=Orzamento non pechado +Delays_MAIN_DELAY_PROPALS_TO_BILL=Orzamento non facturado +Delays_MAIN_DELAY_NOT_ACTIVATED_SERVICES=Servizos a activar +Delays_MAIN_DELAY_RUNNING_SERVICES=Servizos expirados +Delays_MAIN_DELAY_SUPPLIER_BILLS_TO_PAY=Facturas de provedor non pagas +Delays_MAIN_DELAY_CUSTOMER_BILLS_UNPAYED=Facturas a cliente non pagas +Delays_MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE=Conciliacións bancarias pendentes +Delays_MAIN_DELAY_MEMBERS=Cotizacións de membros en atraso +Delays_MAIN_DELAY_CHEQUES_TO_DEPOSIT=Talóns a ingresar non realizados +Delays_MAIN_DELAY_EXPENSEREPORTS=Informe de gastos a aprobar +Delays_MAIN_DELAY_HOLIDAYS=Días libres a aprobar. SetupDescription1=Antes de comezar a usar Dolibarr, algúns parámetros iniciais teñen que ser definidos e activar/configurar os módulos. SetupDescription2=As seguintes dúas seccións son obrigatorias (as dúas primeiras entradas no menu de configuración): -SetupDescription3=<a href="%s">%s->%s</a> <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>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. +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 Audit=Auditoría @@ -1182,24 +1184,24 @@ InfoWebServer=Sobre o Servidor Web InfoDatabase=Sobre a base de datos InfoPHP=Sobre o PHP InfoPerf=Sobre o rendimento -InfoSecurity=About Security +InfoSecurity=Acerca da seguridade BrowserName=Nome do navegador BrowserOS=S.O. do navegador ListOfSecurityEvents=Listaxe de eventos de seguridade Dolibarr SecurityEventsPurged=Eventos de seguridade purgados -LogEventDesc=Pode habilitar o rexistro de eventos de seguridade aquí. Os administradores poden ver o contido do rexistro ao través do menú <b>%s-%s</b>.Atención, esta característica puede xerar unha gran cantidade de datos na base de datos. +LogEventDesc=Pode habilitar o rexistro de eventos de seguridade aquí. Os administradores poden ver o contido do rexistro ao través do menú <b>%s-%s</b>.Atención, esta característica pode xerar unha gran cantidade de datos na base de datos. 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 empresa/entidade. Faga clic nos botóns "%s" ou "%s" a pé de páxina. +CompanyFundationDesc=Edite a información da súa empresa/entidade. Faga clic 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 AvailableModules=Módulos dispoñibles ToActivateModule=Para activar os módulos, ir ao área de Configuración (Inicio->Configuración->Módulos). SessionTimeOut=Timeout de sesións -SessionExplanation=Este número garantiza que a sesión nunca caducará antes deste atraso, si el limpiador de sesión se realiza mediante un limpiador de sesión interno de PHP (e nada más). El limpiador interno de sesións de PHP no garantiza que la sesión caduque después de este retraso. Expirará, después de este retraso, e cuando se ejecute o limpiador de sesións, por lo que cada acceso <b> %s/%s </b>, pero solo durante o acceso realizado por otras sesións (si el valor es 0, significa que la limpieza de sesións solo se realiza por un proceso externo). <br> Nota: en algunos servidores con un mecanismo externo de limpieza de sesión (cron bajo debian, ubuntu...), las sesións se pueden destruir después de un período definido por una configuración externa, sin importar el valor introducido aquí -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=Este número garante que a sesión nunca caducará antes deste atraso, se o limpador de sesión o realiza o limpador de sesión interno PHP (e nada máis). O limpador de sesión PHP interno non garante que a sesión caducará despois deste atraso. Caducará, despois deste atraso, e cando se execute o limpador de sesión, polo que cada acceso <b> %s/%s </b>, pero só durante o acceso feito por outras sesións (se o valor é 0, significa que a limpeza da sesión só se fai por un proceso externo) .<br> Nota: nalgúns servidores cun mecanismo de limpeza de sesión externo (cron baixo debian, ubuntu ...), as sesións pódense destruír despois dun período definido por unha configuración externa, independentemente do valor que se introduza aquí. +SessionsPurgedByExternalSystem=As sesións neste servidor parecen estar limpas por un mecanismo externo (cron baixo debian, ubuntu ...), probablemente cada <b>%s</b> segundos (= valor do parámetro <b>session.gc_maxlifetime</b>), polo que cambiar o valor aquí non ten efecto. Debe solicitar ao administrador do servidor que cambie o atraso da sesión. TriggersAvailable=Triggers dispoñibles TriggersDesc=Os triggers son ficheiros que, unha vez copiados no directorio <b>htdocs/core/triggers</b>, modifican o comportamento do fluxo de traballo de Dolibarr. Realizan accións suplementarias, desencadenadas polos eventos Dolibarr (creación de empresa, validación factura...). TriggerDisabledByName=Triggers deste ficheiro desactivados polo sufixo <b>-NORUN</b> no nome do ficheiro. @@ -1208,37 +1210,37 @@ TriggerAlwaysActive=Triggers deste ficheiro sempre activos, posto que os módulo TriggerActiveAsModuleActive=Triggers deste ficheiro activos posto que o módulo <b>%s</b> está activado GeneratedPasswordDesc=Indique aquí que norma quere utilizar para xerar as contrasinais cando precise xerar un novo contrasinal DictionaryDesc=Inserte aquí os datos de referencia. Pode engadir os seus datos aos predefinidos. -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. +ConstDesc=Esta páxina permítelle editar (substituír) parámetros non dispoñibles noutras páxinas. Estes son principalmente parámetros reservados só para desenvolvedores ou solución avanzadas de problemas. +MiscellaneousDesc=Todos os outros parámetros relacionados coa seguridad definense aquí. LimitsSetup=Configuración de límites e precisións LimitsDesc=Pode definir aquí os límites e precisións utilizados por Dolibarr MAIN_MAX_DECIMALS_UNIT=Decimais máximos para os prezos unitarios MAIN_MAX_DECIMALS_TOT=Decimais máximos para os prezos totais -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) +MAIN_MAX_DECIMALS_SHOWN=Decimais máximos nos prezos <b>amosados na pantalla</b>. Engade unha elipse <b> ... </b> despois deste parámetro (por exemplo, "2 ...") se queres ver o sufixo "<b> ... </b>" ao prezo acurtado. +MAIN_ROUNDING_RULE_TOT=Salto do intervalo de redondeo (para os países onde o redondeo se fai noutra cousa que non sexa a base 10. Por exemplo, pon 0,05 se o redondeo se fai 0,05 pasos) UnitPriceOfProduct=Prezo unitario sen IVE dun produto -TotalPriceAfterRounding=Prezo total despois do redondeo +TotalPriceAfterRounding=Prezo total (sen IVE/ incluído taxas) despois do redondeo ParameterActiveForNextInputOnly=Parámetro efectivo só a partires das próximas sesións NoEventOrNoAuditSetup=Non foron rexistrados eventos de seguridade aínda. Isto pode ser normal se a auditoría non foi habilitada na páxina "Configuración->Seguridade->Auditoría". NoEventFoundWithCriteria=Non atopáronse eventos de seguridade para tales criterios de búsca. SeeLocalSendMailSetup=Ver a configuración local de sendmail -BackupDesc=Para realizar unha copia de seguridade completa de Dolibarr, vostede debe: -BackupDesc2=Garde o contido do directorio de documentos (<b>%s</b>), contén todos os ficheiros subidos e xerados (Polo que inclúe todos os ficheiros de copias xeradas no primeiro paso). +BackupDesc=Unha copia de seguridade <b>completa</b>da instalación de Dolibarr, require dous pasos. +BackupDesc2=Garde o contido do directorio de "documentos" (<b>%s</b>), que contén todos os ficheiros subidos e xerados Isto tamén incluirça os ficheiros xerados no paso 1. Esta operación pode levar varios minutos. BackupDesc3=Gardar o contido da súa base de datos (<b>%s</b>) nun ficheiro de volcado. Para isto pode utilizar o asistente a continuación. BackupDescX=O directorio arquivado deberá gardarse nun lugar seguro. BackupDescY=O ficheiro de volcado xerado deberá gardarse nun lugar seguro. BackupPHPWarning=A copia de seguridade non pode ser garantida con este método. É preferible utilizar o anterior RestoreDesc=Para restaurar unha copia de seguridade de Dolibarr, vostede debe: -RestoreDesc2=Tomar o ficheiro (ficheiro zip, por exemplo) do directorio dos documentos e descomprimilo no directorio dos documentos dunha nova instalación de Dolibarr ou na carpeta dos documentos desta instalación (<b>%s</b>). -RestoreDesc3=Restaurar o ficheiro de volcado gardado na base de datos da nova instalación de Dolibarr ou desta instalación (<b>%s</b>). Atención, unha vez realizada a restauración, deberá utilizar un login/contrasinal de administrador existente no momento da copia de seguridade para conectarse. Para restaurar a base de datos na instalación actual, pode utilizar o asistente a continuación. +RestoreDesc2=Seleccionar o ficheiro (ficheiro zip, por exemplo) do directorio dos documentos e descomprimilo no directorio dos documentos dunha nova instalación de Dolibarr ou na carpeta dos documentos desta instalación (<b>%s</b>). +RestoreDesc3=Restaurar o ficheiro de volcado gardado na base de datos da nova instalación de Dolibarr ou desta instalación (<b>%s</b>). Atención, unha vez realizada a restauración, deberá utilizar un login/contrasinal de administrador existente no momento da copia de seguridade para conectarse.<br> Para restaurar a base de datos na instalación actual, pode utilizar o asistente a continuación. RestoreMySQL=Importación MySQL -ForcedToByAModule=Esta regra está forzada a <b>%s</b> por un dos módulos activados -ValueIsForcedBySystem=This value is forced by the system. You can't change it. +ForcedToByAModule=Esta regra é obrigada a <b>%s</b> por un dos módulos activados +ValueIsForcedBySystem=Este valor é obrigado polo sistema. Non pode cambialo. PreviousDumpFiles=Copias de seguridade da base de datos realizadas anteriormente PreviousArchiveFiles=Copias de seguridade do directorio documentos realizadas anteriormente WeekStartOnDay=Primeiro día da semana RunningUpdateProcessMayBeRequired=Parece preciso realizar o proceso de actualización (a versión do programa %s difiere da versión da base de datos %s) -YouMustRunCommandFromCommandLineAfterLoginToUser=Debe executar o comando dende unha shell despois de ter iniciado sesión coa conta <b>%s</b>. +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 @@ -1275,46 +1277,46 @@ ExtraFieldsSupplierOrders=Campos adicionais (pedimentos a provedores) ExtraFieldsSupplierInvoices=Campos adicionais (facturas) ExtraFieldsProject=Campos adicionais (proxectos) ExtraFieldsProjectTask=Campos adicionais (tarefas) -ExtraFieldsSalaries=Campos dicionais (salarios) +ExtraFieldsSalaries=Campos adicionais (salarios) ExtraFieldHasWrongValue=O campo %s contén un valor non válido AlphaNumOnlyLowerCharsAndNoSpace=só alfanuméricos e minúsculas sen espazo -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). +SendmailOptionNotComplete=Aviso, nalgúns sistemas Linux, para enviar correos electrónicos desde o seu correo electrónico, a configuración de execución de sendmail debe conter a opción -ba (o parámetro mail.force_extra_parameters no seu ficheiro php.ini). Se algúns dos seus destinatarios nunca reciben correos electrónicos, tente editar este parámetro PHP con mail.force_extra_parameters=-ba). PathToDocuments=Ruta de acceso a documentos PathDirectory=Directorio -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=Sí en verano -OnlyFollowingModulesAreOpenedToExternalUsers=Atención: únicamente os módulos seguintes están dispoñibles a usuarios externos (sexa cal fora o permiso de ditos usuarios) e só outorganse permisos: +SendmailOptionMayHurtBuggedMTA=A función para enviar correos usando o método "PHP mail direct" xerará unha mensaxe de correo que algúns servidores de correo receptores poden non analizar correctamente. O resultado é que algúns correos non poden ser lidos por persoas aloxadas nesas plataformas. É o caso dalgúns fornecedores de Internet (por exemplo: Orange en Franza). Isto non é un problema con Dolibarr ou PHP senón co servidor de correo receptor. Porén, pode engadir unha opción MAIN_FIX_FOR_BUGGED_MTA a 1 en Configuración-Outro para modificar Dolibarr para evitar o erro. Porén, pode ter problemas con outros servidores que usan estritamente o estándar SMTP. A outra solución (recomendada) é empregar o método "SMTP socket library" que non ten desvantaxes. +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. +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 +CurrentTranslationString=Cadna traducida actual +WarningAtLeastKeyOrTranslationRequired=Requírese un criterio de busca polo menos para a clave ou a cadea de tradución +NewTranslationStringToShow=Nova cadea traducida a amosar +OriginalValueWas=A tradución orixinal sobrescríbese. O valor orixinal era:<br><br>%s +TransKeyWithoutOriginalValue=Forzou unha nova tradución para a clave de tradución '<strong>%s</strong>' que non existe en ningún ficheiro de idioma +TitleNumberOfActivatedModules=Módulos activados +TotalNumberOfActivatedModules=Número total de módulos activados: <b>%s</b> / <b>%s</b> +YouMustEnableOneModule=Debe activar polo menos 1 módulo. +ClassNotFoundIntoPathWarning=Clase 1%s non foi atopada na ruta PHP +YesInSummer=Sí en verán +OnlyFollowingModulesAreOpenedToExternalUsers=Atención: Teña conta que os módulos seguintes están dispoñibles a usuarios externos (sexa cal fora o permiso destes usuarios) e só se os permisos son concedidos:<br> SuhosinSessionEncrypt=Almacenamento de sesións cifradas por Suhosin ConditionIsCurrently=Actualmente a condición é %s YouUseBestDriver=Está usando o driver %s, actualmente é o mellor driver dispoñible. YouDoNotUseBestDriver=Usa o driver %s aínda que é recomendable usar o driver %s. -NbOfObjectIsLowerThanNoPb=You have only %s %s in the database. This does not require any particular optimization. +NbOfObjectIsLowerThanNoPb=So ten %s %s na base de datos. Isto non require ningunha optimización particular SearchOptim=Buscar optimización -YouHaveXObjectUseSearchOptim=Ten %s %s produtos na base de datos. Debería engadir a constante %s a 1 e Inicio-Configuración-Outra Configuración. Limita a busca ao comezo da cadea o que fai posible que a base de datos use o indice e acade unha resposta inmediata. +YouHaveXObjectUseSearchOptim=Ten %s %s na base de datos. Pode engadir a constante %s a 1 en Configuración de Inicio-Configuración-Outro. Limita a busca ao comezo das cadeas o que fai posible que a base de datos use índices e debería obter unha resposta inmediata. YouHaveXObjectAndSearchOptimOn=Ten %s %s na base de datos e a constante %s está configurada en 1 in Inicio-Configuración-Outra Configuración. BrowserIsOK=Usa o navegador web %s. Este navegador está optimizado para a seguridade e o rendemento. BrowserIsKO=Usa o navegador web %s. Este navegador é unha mala escolla para a seguridade, rendemento e fiabilidade. Aconsellamos utilizar Firefox, Chrome, Opera ou Safari. -PHPModuleLoaded=PHP component %s is loaded +PHPModuleLoaded=%s de compoñente PHP está cargado PreloadOPCode=Pregarca de OPCode está activa AddRefInList=Amosar código de cliente/provedor nas listaxes (e selectores) e ligazóns.<br>Os terceiros aparecerán co nome "CC12345 - SC45678 - The big company coorp", no lugar de "The big company coorp". AddAdressInList=Amosar o enderezo do cliente/provedor nas listaxes (e selectores) <br>Os terceiros aparecerán co nome "The big company coorp - 21 jump street 123456 Big town - USA ", no lugar de "The big company coorp". -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=Amosar o correo electrónico de contacto (ou os teléfonos se non é definido) e a lista de información da cidade (seleccionar lista ou caixa de combinación) <br> Os contactos aparecerán cun formato de nome "Dupond Durand-dupond.durand@email.com-Paris" ou "Dupond" Durand - 06 07 59 65 66 - París "en lugar de" Dupond Durand ". AskForPreferredShippingMethod=Consultar polo método preferido de envío a terceiros. FieldEdition=Edición do campo %s FillThisOnlyIfRequired=Exemplo: +2 (Complete só se rexistra unha desviación do tempo na exportación) @@ -1322,7 +1324,7 @@ GetBarCode=Obter código de barras NumberingModules=Modelos de numeración DocumentModules=Modelos de documento ##### Module password generation -PasswordGenerationStandard=Return a password generated according to internal Dolibarr algorithm: %s characters containing shared numbers and characters in lowercase. +PasswordGenerationStandard=Volta un contrasinal xerado segundo o algoritmo interno de Dolibarr:%s caracteres, que conteñen números e caracteres en minúsculas mesturados. PasswordGenerationNone=Non suxerir ningún contrasinal xerada. O contrasinal debe ser escrito manualmente. PasswordGenerationPerso=Volta un contrasinal segundo a configuración definida. SetupPerso=Segundo a túa configuración @@ -1332,19 +1334,19 @@ RuleForGeneratedPasswords=Norma para a xeración das contrasinais propostas DisableForgetPasswordLinkOnLogonPage=Non amosar a ligazón "Contrasinal esquecida" na páxina de login UsersSetup=Configuración do módulo usuarios UserMailRequired=E-Mail preciso para crear un novo usuario -UserHideInactive=Hide inactive users from all combo lists of users (Not recommended: this may means you won't be able to filter or search on old users on some pages) -UsersDocModules=Document templates for documents generated from user record -GroupsDocModules=Document templates for documents generated from a group record +UserHideInactive=Ocultar usuarios inactivos de todas as listas combinadas de usuarios (Non recomendado: isto pode significar que non poderá filtrar nin buscar usuarios antigos nalgunhas páxinas) +UsersDocModules=Modelos de documentos para documentos xerados desde o rexistro do usuario +GroupsDocModules=Modelos de documentos para documentos xerados desde un rexistro de grupo ##### HRM setup ##### -HRMSetup=HRM module setup +HRMSetup=Setup do módulo RRHH ##### Company setup ##### CompanySetup=Configuración do módulo Terceiros CompanyCodeChecker=Opcións para a xeración automática de códigos de clientes / provedores. AccountCodeManager=Opcións para a xeración automática de contas contables de clientes / provedores. -NotificationsDesc=As notificacións por e-mail permitenlle enviar silenciosamente e-mails automáticos, para algúns eventos Dolibarr. Pódense definir os destinatarios: +NotificationsDesc=As notificacións por e-mail permitenlle enviar silenciosamente e-mails automáticos, para algúns eventos Dolibarr.<br> Pódense definir os destinatarios: NotificationsDescUser=* por usuarios, un usuario á vez. NotificationsDescContact=* por contactos de terceiros (clientes ou provedores), un contacto á vez. -NotificationsDescGlobal=* o configurando destinatarios globlalmente na configuración do módulo. +NotificationsDescGlobal=* ou configurando destinatarios globlalmente na configuración do módulo. ModelModules=Prantillas de documentos DocumentModelOdt=Xeración dos documentos OpenDocument (Ficheiro .ODT / .ODS de LibreOffice, OpenOffice, KOffice, TextEdit...) WatermarkOnDraft=Marca de auga nos documentos borrador @@ -1355,10 +1357,10 @@ MustBeMandatory=¿Obrigatorio para crear terceiros (se o CIF ou tipo de compañ MustBeInvoiceMandatory=¿Obrigatorio para validar facturas? TechnicalServicesProvided=Servizos técnicos prestados #####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. +WebDAVSetupDesc=Estas son as ligazóns para acceder ao directorio WebDAV. Conten un directorio "público" aberto para calquera usuario que coñeza a URL (se permite o acceso público ao directorio) e un directorio "privado" que precisa unha conta de inicio de sesión / contrasinal para acceder. WebDavServer=URL raíz do servidor %s: %s ##### Webcal setup ##### -WebCalUrlForVCalExport=An export link to <b>%s</b> format is available at following link: %s +WebCalUrlForVCalExport=Hai unha ligazón de exportación ao formato <b>%s</b> dispoñible na seguinte ligazón:: %s ##### Invoices ##### BillsSetup=Configuración do módulo Facturas BillsNumberingModule=Módulo de numeración de facturas e abonos @@ -1391,16 +1393,16 @@ WatermarkOnDraftSupplierProposal=Marca de auga en orzamentos de provedor (no cas BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL=Preguntar por conta bancaria a usar no orzamento WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER=Almacén a utilizar para o pedimento ##### Suppliers Orders ##### -BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER=Ask for bank account destination of purchase order +BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER=Preguntar por conta bancaria a usar no pedimento a provedor ##### Orders ##### SuggestedPaymentModesIfNotDefinedInOrder=Modo suxerido de pago en pedimentos de cliente por defecto se non está definido no pedimento -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 +OrdersSetup=Configuración da xestión de pedimentos de cliente +OrdersNumberingModules=Modelos de numeración de pedimentos +OrdersModelModule=Modelos de documentos de pedimentos +FreeLegalTextOnOrders=Texto libre en pedimentos +WatermarkOnDraftOrders=Marca de auga en borradores de pedimentos (ningunha se está baleira) +ShippableOrderIconInList=Engade unha icona na lista de pedimentos que indique se se pode enviar o pedimento +BANK_ASK_PAYMENT_BANK_DURING_ORDER=Solicitar o destino da orde bancaria ##### Interventions ##### InterventionsSetup=Configuración do módulo intervencións FreeLegalTextOnInterventions=Texto adicional nas fichas de intervención @@ -1421,7 +1423,7 @@ AdherentMailRequired=E-Mail obrigatorio para crear un membro novo MemberSendInformationByMailByDefault=Caixa de verificación para enviar o correo de confirmación (validación ou nova cotización) aos membros é por defecto "sí" VisitorCanChooseItsPaymentMode=O visitante pode escoller entre os modos de pagamento dispoñibles MEMBER_REMINDER_EMAIL=Habilitar recordatorio de eventos <b>por e-mail</b> de suscripcións expiradas. Nota: O módulo <strong>%s</strong> debe estar habilitado e configurado correctamente para que o recordatorio sexa enviado. -MembersDocModules=Document templates for documents generated from member record +MembersDocModules=Modelos de documentos para documentos xerados a partir do rexistro de membros ##### LDAP setup ##### LDAPSetup=Configuración do módulo LDAP LDAPGlobalParameters=Parámetros globais @@ -1490,27 +1492,27 @@ LDAPTestSynchroMemberType=Probar a sincronización de tipo de membro LDAPTestSearch= Probar unha busca LDAP LDAPSynchroOK=Proba de sincronización realizada correctamente LDAPSynchroKO=Proba de sincronización erronea -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) +LDAPSynchroKOMayBePermissions=Fallou a proba de sincronización. Comprobe se a conexión co servidor está configurada correctamente e permite actualizacións LDAP +LDAPTCPConnectOK=Conexión TCP ao servidor LDAP realizada (Servidor=%s, Porto=%s) +LDAPTCPConnectKO=Fallo de conexión TCP ao servidor LDAP (Servidor=%s, Porto=%s) +LDAPBindOK=Conexión/Autenticación realizada ao servidor LDAP (Servidor=%s, Puerto=%s, Admin=%s, Password=%s) +LDAPBindKO=Fallo de conexión/autenticación ao servidor LDAP (Servidor=%s, Puerto=%s, Admin=%s, Password=%s) +LDAPSetupForVersion3=Servidor LDAP configurado para versión 3 +LDAPSetupForVersion2=Servidor LDAP configurado para versión 2 +LDAPDolibarrMapping=Mapping Dolibarr +LDAPLdapMapping=Mapping LDAP +LDAPFieldLoginUnix=Inicio de sesión (unix) LDAPFieldLoginExample=Exemplo : uid -LDAPFilterConnection=Search filter -LDAPFilterConnectionExample=Example: &(objectClass=inetOrgPerson) +LDAPFilterConnection=Filtro de búsqueda +LDAPFilterConnectionExample=Exemplo : &(objectClass=inetOrgPerson) LDAPFieldLoginSamba=Login (samba, activedirectory) -LDAPFieldLoginSambaExample=Example: samaccountname +LDAPFieldLoginSambaExample=Exemplo : samaccountname LDAPFieldFullname=Nome completo -LDAPFieldFullnameExample=Example: cn -LDAPFieldPasswordNotCrypted=Password not encrypted -LDAPFieldPasswordCrypted=Password encrypted -LDAPFieldPasswordExample=Example: userPassword -LDAPFieldCommonNameExample=Example: cn +LDAPFieldFullnameExample=Exemplo : cn +LDAPFieldPasswordNotCrypted=Contrasinal non cifrada +LDAPFieldPasswordCrypted=Contrasinal cifrada +LDAPFieldPasswordExample=Exemplo : userPassword +LDAPFieldCommonNameExample=Exemplo : cn LDAPFieldName=Nome LDAPFieldNameExample=Exemplo : sn LDAPFieldFirstName=Nome @@ -1545,67 +1547,72 @@ LDAPFieldSid=SID LDAPFieldSidExample=Exemplo : objectsid LDAPFieldEndLastSubscription=Data finalización como membro LDAPFieldTitle=Posto de traballo -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 +LDAPFieldTitleExample=Exemplo:título +LDAPFieldGroupid=Id Grupo +LDAPFieldGroupidExample=Exemplo : número gid +LDAPFieldUserid=Id usuario +LDAPFieldUseridExample=Exemplo : número uid +LDAPFieldHomedirectory=Directorio Inicio +LDAPFieldHomedirectoryExample=Exemplo : directorioinicio +LDAPFieldHomedirectoryprefix=Prefixo do directorio inicio +LDAPSetupNotComplete=Configuración LDAP incompleta (a completar nas outras pestanas) +LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Administrador ou contrasinal non proporcionados. O acceso LDAP será anónimo e en modo só lectura. +LDAPDescContact=Esta páxina permítelle definir o nome dos atributos LDAP na árbore LDAP para cada dato atopado nos contactos Dolibarr. +LDAPDescUsers=Esta páxina permítelle definir o nome dos atributos LDAP na árbore LDAP para cada dato atopado nos usuarios de Dolibarr.. +LDAPDescGroups=Esta páxina permítelle definir o nome dos atributos LDAP na árbore LDAP para cada dato atopado nos grupos Dolibarr. +LDAPDescMembers=Esta páxina permítelle definir o nome dos atributos LDAP na árbore LDAP para cada dato atopado no módulo de membros de Dolibarr.. +LDAPDescMembersTypes=Esta páxina permítelle definir o nome dos atributos LDAP na árbore LDAP para cada dato atopado nos tipos de membros de Dolibarr. +LDAPDescValues=Os valores de exemplo están deseñados para <b> OpenLDAP </b> cos seguintes esquemas cargados: <b> core.schema, cosine.schema, inetorgperson.schema </b>). Se usa estes valores e OpenLDAP, modifique o ficheiro de configuración LDAP <b> slapd.conf </b> para ter todos os esquemas cargados. +ForANonAnonymousAccess=Para un acceso autenticado (por exemplo para un accesos de escritura) +PerfDolibarr=Informe da configuración/optimización do rendemento YouMayFindPerfAdviceHere=Nesta páxina atopará varias probas e consellos relacionados co rendemento. -NotInstalled=Not installed. -NotSlowedDownByThis=Not slowed down by this. -NotRiskOfLeakWithThis=Not risk of leak with this. +NotInstalled=Non instalado. +NotSlowedDownByThis=Non ralentizado por isto. +NotRiskOfLeakWithThis=Non hai risco de fuga con isto ApplicativeCache=Aplicación caché -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 +MemcachedNotAvailable=Non se atopou aplicación caché. Pode mellorar o rendemento instalando un servidor caché. Memcached é un módulo capaz de usar este servidor caché. <br>Mais información aquí <a href="http://wiki.dolibarr.org/index.php/Module_MemCached_EN">http://wiki.dolibarr.org/index.php/Module_MemCached_EN</a>.<br>Teña conta que moitos provedores de hospedaxe web non fornecen ese servidor caché. +MemcachedModuleAvailableButNotSetup=Atopouse o módulo memcached para a aplicación caché pero a configuración do módulo non está completa. +MemcachedAvailableAndSetup=O módulo memcached adicado a usar o servidor memcached está habilitado. +OPCodeCache=Caché OPCode +NoOPCodeCacheFound=Non se atopou caché OPCode. Cicais estexa a usar unha caché OPCode distinta de XCache ou eAccelerator (bo) ou cicais non teña caché OPCode (moi mal). +HTTPCacheStaticResources=Caché HTTP para estatísticas de recursos (css, img, javascript) +FilesOfTypeCached=Os ficheiros de tipo %s son almacenados en caché polo servidor HTTP +FilesOfTypeNotCached=Os ficheiros de tipo %s non son almacenados en caché polo servidor HTTP +FilesOfTypeCompressed=Os ficheiros de tipo %s son comprimidos polo servidor HTTP +FilesOfTypeNotCompressed=Os ficheiros de tipo %s non son comprimidos polo servidor HTTP +CacheByServer=Caché por servidor +CacheByServerDesc=Por exemplo, usando a directiva Apache "ExpiresByType image/gif A2592000" +CacheByClient=Caché por navegador +CompressionOfResources=Compresión das respostas HTTP +CompressionOfResourcesDesc=Por exemplo, usando a directiva Apache "AddOutputFilterByType DEFLATE" +TestNotPossibleWithCurrentBrowsers=Esta detección automática non é posible cos navegadores actuais +DefaultValuesDesc=Aquí pode definir o valor predeterminado que desexa usar ao crear un novo rexistro e / ou filtros predeterminados ou a orde de clasificación ao listar rexistros. +DefaultCreateForm=Valores predeterminados (para usar nos formularios) +DefaultSearchFilters=Filtros de busca predeterminados +DefaultSortOrder=Ordes de clasificación predeterminados +DefaultFocus=Campos de enfoque predeterminados +DefaultMandatory=Campos de formulario obrigatorios ##### Products ##### ProductSetup=Configuración do módulo Produtos ServiceSetup=Configuración do módulo Servizos ProductServiceSetup=Configuración dos módulos Produtos e Servizos NumberOfProductShowInSelect=Nº de produtos máx. nas listas (0=sen límite) ViewProductDescInFormAbility=Visualización das descripcións dos produtos nos formularios (no caso contrario como tooltip) +DoNotAddProductDescAtAddLines=Non engadir a descrición do produto (da tarxeta do produto) ao enviar engadir liñas nos formularios +OnProductSelectAddProductDesc=Como usar a descrición dos produtos cando se engade un produto como liña dun documento +AutoFillFormFieldBeforeSubmit=Completar automaticamente o campo de entrada da descrición coa descrición do produto +DoNotAutofillButAutoConcat=Non completa automaticamente o campo de entrada coa descrición do produto. A descrición do produto concatenarase coa descrición introducida automaticamente. +DoNotUseDescriptionOfProdut=A descrición do produto nunca se incluirá na descrición das liñas de documentosMergePropalProductCard=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 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=Display products descriptions in the language of the third party -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! +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) +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 +ProductCodeChecker= Módulo para a xeración e comprobación de código de produto (produto ou servizo) +ProductOtherConf= Configuración de Produto/Servizo +IsNotADir=non é un directorio! ##### Syslog ##### SyslogSetup=Configuración do módulo Syslog SyslogOutput=Saída do log @@ -1614,9 +1621,9 @@ SyslogLevel=Nivel SyslogFilename=Nome e ruta do ficheiro YouCanUseDOL_DATA_ROOT=Pode utilizar DOL_DATA_ROOT/dolibarr.log para un rexistro no directorio "documentos" de Dolibarr. Porén, pode establecer un directorio diferente para gardar este ficheiro. ErrorUnknownSyslogConstant=A constante %s non é unha constante syslog coñecida -OnlyWindowsLOG_USER=On Windows, only the LOG_USER facility will be supported +OnlyWindowsLOG_USER=Windows só soporta LOG_USER CompressSyslogs=Compresión e copia de seguridade dos ficheiros de rexistro de depuración (xerados polo módulo Log para a depuración) -SyslogFileNumberOfSaves=Number of backup logs to keep +SyslogFileNumberOfSaves=Copias de seguridade de log a gardar ConfigureCleaningCronjobToSetFrequencyOfSaves=Configurar tareas programados de limpeza para establecer a frecuencia de copia de seguridade do log ##### Donations ##### DonationsSetup=Configuración do módulo doacións/subvencións @@ -1640,46 +1647,46 @@ GenbarcodeLocation=Ferramenta de xeración de códigos de barras na liña de com BarcodeInternalEngine=Motor interno BarCodeNumberManager=Xestor para auto definir números de código de barras ##### Prelevements ##### -WithdrawalsSetup=Configuración d0 módulo domiciliacións +WithdrawalsSetup=Configuración do módulo domiciliacións ##### ExternalRSS ##### ExternalRSSSetup=Configuración das importaciones do fluxo RSS NewRSS=Sindicación dun novo fluxo RSS RSSUrl=URL del RSS RSSUrlExample=Un fluxo RSS interesante ##### 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 +MailingSetup=Configuración do módulo E-Mailing +MailingEMailFrom=E-Mail emisor (From) dos correos enviados por E-Mailing +MailingEMailError=E-Mail de resposta (Errors-to) para as respostas acerca de envíos por e-mailing con erros. +MailingDelay=Segundos que agarda despois de enviar a mensaxe seguinte ##### Notification ##### -NotificationSetup=Email Notification module setup -NotificationEMailFrom=Sender email (From) for emails sent by the Notifications module -FixedEmailTarget=Destinatario +NotificationSetup=Configuración do módulo notificacións +NotificationEMailFrom=E-Mail emisor (From) dos correos enviados ao través de notificacións +FixedEmailTarget=Destinatario fixo ##### 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 +SendingsSetup=Configuración do módulo Expedicións +SendingsReceiptModel=Modelo de notas de entrega +SendingsNumberingModules=Módulos de numeración de notas de entrega +SendingsAbility=Soporte de follas de envío para entregas a clientes +NoNeedForDeliveryReceipts=Na maioría dos casos, as notas de entrega (listaxe de produtos enviados) tamén actúan como notas de recepción e son asinadas polo cliente. A xestión das notas de recepción é polo tanto redundante e rara vez será activada. +FreeLegalTextOnShippings=Texto libre en envíos ##### Deliveries ##### -DeliveryOrderNumberingModules=Products deliveries receipt numbering module -DeliveryOrderModel=Products deliveries receipt model -DeliveriesOrderAbility=Support products deliveries receipts -FreeLegalTextOnDeliveryReceipts=Free text on delivery receipts +DeliveryOrderNumberingModules=Módulos de numeración das notas de recepción +DeliveryOrderModel=Modelo de notas de recepción +DeliveriesOrderAbility=Uso de notas de recepción +FreeLegalTextOnDeliveryReceipts=Texto libre nas notas de recepción ##### FCKeditor ##### AdvancedEditor=Editor avanzado ActivateFCKeditor=Activar editor avanzado para : FCKeditorForCompany=Creación/edición WYSIWIG da descrición e notas dos terceiros FCKeditorForProduct=Creación/edición WYSIWIG da descrición e notas dos produtos/servizos -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=Creación/edición WYSIWIG das liñas de detalle dos produtos (pedimentos, orzamentos, facturas, etc.). <font class="warning">Atención: O uso desta opción non é recomendable xa que pode crear problemas cos caracteres especiais e o formateo de páxina ao xerar ficheiros PDF.</font> FCKeditorForMailing= Creación/edición WYSIWIG dos E-Mails (Utilidades->E-Mailings) FCKeditorForUserSignature=Creación/edición WYSIWIG da sinatura de usuarios FCKeditorForMail=Creación/edición WYSIWIG de todos os e-mails ( excepto Utilidades->E-Mailings) FCKeditorForTicket=Creación/edición WYSIWIG para tickets ##### Stock ##### StockSetup=Configuración do módulo Almacéns -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. +IfYouUsePointOfSaleCheckModule=Se utiliza un módulo de Punto de Venda (módulo TPV por defecto ou otro módulo externo), esta configuración pode ser ignorada polo seu módulo de Punto de Venda. A maioría de módulos TPV están deseñados para crear inmediatamente unha factura e decrementar stocks calquera que sexan estas opcións. Por tanto, se vosteda precisa ou non decrementar stocks no rexistro dunha venda do seu punto de venda, controle tamén a configuración do seu módulo TPV. ##### Menu ##### MenuDeleted=Menú eliminado Menu=Menu @@ -1689,17 +1696,17 @@ NotTopTreeMenuPersonalized=Menús personalizados non ligados a un menú superior NewMenu=Novo menú MenuHandler=Xestor de menús MenuModule=Módulo orixe -HideUnauthorizedMenu= Hide unauthorized menus (gray) +HideUnauthorizedMenu=Ocultar menús non autorizados tamén para usuarios internos (en gris, doutro xeito) 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 +DetailMenuHandler=Controlador de menús onde amosar o novo menú +DetailMenuModule=Nome do módulo se a entrada do menú provén dun módulo +DetailType=Tipo de menú (arriba ou á esquerda) +DetailTitre=Etiqueta de menú ou código de etiqueta para a tradución +DetailUrl=URL onde o menú o envía (ligazón URL absoluta ou ligazón externa con http: //) +DetailEnabled=Condición para amosar ou non a entrada +DetailRight=Condición para amosar menús grises non autorizados +DetailLangs=Nome do ficheiro Lang para a tradución de código de etiqueta +DetailUser=Intern / Extern / Todo Target=Destinatario DetailTarget=Comportamento da ligazón (_blank para abrir unha nova ventana) DetailLevel=Nivel (-1:menú superior, 0:principal, >0 menú e submenú) @@ -1708,105 +1715,105 @@ DeleteMenu=Eliminar entrada de menú ConfirmDeleteMenu=¿Está certo de querer eliminar a entrada de menú <b>%s</b>? FailedToInitializeMenu=Erro ao inicialiar o menú ##### 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: +TaxSetup=Configuración do módulo de impostos, impostos sociais ou fiscais e dividendos +OptionVatMode=IVE vencido +OptionVATDefault=Base estándar +OptionVATDebitOption=Base de devengo +OptionVatDefaultDesc=Vence o IVE: <br> - na entrega de mercadorías (en función da data da factura) <br> - nos pagos por servizos +OptionVatDebitOptionDesc=Vence o IVE: <br> - na entrega de mercadorías (en función da data da factura) <br> - na factura (débito) para servizos +OptionPaymentForProductAndServices=Base de efectivo para produtos e servizos +OptionPaymentForProductAndServicesDesc=Vence o IVE: <br> - no pago de mercadorías <br> - no pago de servizos +SummaryOfVatExigibilityUsedByDefault=Tempo de elección do IVE por defecto segundo a opción escollida: OnDelivery=Pagamento á entrega -OnPayment=On payment -OnInvoice=On invoice -SupposedToBePaymentDate=Payment date used -SupposedToBeInvoiceDate=Invoice date used -Buy=Buy +OnPayment=No pagamento +OnInvoice=Na factura +SupposedToBePaymentDate=Data de pago empregada +SupposedToBeInvoiceDate=Data de utilización da factura +Buy=Mercar Sell=Vendas -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 +InvoiceDateUsed=Data de utilización da factura +YourCompanyDoesNotUseVAT=A súa empresa está cofigurada para que non use o IVE (Inicio - Configuración - Empresa / Organización), polo que non hai opcións de IVE para configurar. +AccountancyCode=Código de contabilidade +AccountancyCodeSell=Conta de venda. código +AccountancyCodeBuy=Conta de compras código ##### Agenda ##### -AgendaSetup=Events and agenda module setup -PasswordTogetVCalExport=Key to authorize export link -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 +AgendaSetup=Configuración do módulo de eventos e axenda +PasswordTogetVCalExport=Chave para autorizar a ligazón de exportación +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 +AGENDA_DEFAULT_FILTER_TYPE=Establecer automaticamente este tipo de eventos no filtro de busca da vista de axenda +AGENDA_DEFAULT_FILTER_STATUS=Establecer automaticamente este estado para eventos no filtro de busca da vista de axenda +AGENDA_DEFAULT_VIEW=Cal vista desexa abrir de xeito predeterminado ao seleccionar o menú Axenda +AGENDA_REMINDER_BROWSER=Activar a lembranza de eventos <b> no navegador do usuario </b> (Cando se alcanza a data de lembranza, o navegador amosa unha ventá emerxente. Cada usuario pode desactivar estas notificacións desde a configuración de notificacións do navegador). +AGENDA_REMINDER_BROWSER_SOUND=Activar a notificación de son +AGENDA_REMINDER_EMAIL=Activar a lembranza de eventos <b> por correo electrónico </b> (a opción de lembranza/atraso pódese definir en cada evento). +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=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. +ClickToDialSetup=Faga clic 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 +ClickToDialUseTelLinkDesc=Utilice este método se os seus usuarios teñen instalado no mesmo ordenador que o do navegador un software de teléfono ou unha interface telefónica, chamando cando fan clic nunha ligazón do seu navegador que comeza con "tel:". Se precisa unha solución de servidor completa (sen necesidade de instalación de software local), debe establecer isto en "Non" e encher o seguinte campo. ##### Point Of Sale (CashDesk) ##### CashDesk=Terminales Punto de Venda -CashDeskSetup=Point of Sales module setup -CashDeskThirdPartyForSell=Default generic third party to use for sales -CashDeskBankAccountForSell=Default account to use to receive cash payments -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) +CashDeskSetup=Configuración do módulo Punto de venda +CashDeskThirdPartyForSell=Un terceiro xenérico predeterminado para usar nas vendas +CashDeskBankAccountForSell=Conta predeterminada a usar para recibir pagos en efectivo +CashDeskBankAccountForCheque=Conta predeterminada a usar para recibir pagos mediante cheque +CashDeskBankAccountForCB=Conta predeterminada a usar para recibir pagos con tarxetas de crédito +CashDeskBankAccountForSumup=Conta bancaria predeterminada a usar para recibir pagos por SumUp +CashDeskDoNotDecreaseStock=Desactivar a diminución de stock cando se realiza unha venda desde o punto de venda (se "non", a diminución destock faise por cada venda realizada desde TPV, independentemente da opción establecida no módulo Stock). +CashDeskIdWareHouse=Forzar e restrinxir o almacén para que diminúa o stock +StockDecreaseForPointOfSaleDisabled=Desactivado diminución de stock desde o punto de venda +StockDecreaseForPointOfSaleDisabledbyBatch=A diminución de stock no TPV non é compatible coa xestión de módulos serie/lote (actualmente activa) polo que a diminución de stock está desactivada. +CashDeskYouDidNotDisableStockDecease=Non desactivou a diminución de stock ao facer unha venda desde o punto de venda. Por iso é preciso un almacén. +CashDeskForceDecreaseStockLabel=Forzouse a diminución do stock de produtos por lotes +CashDeskForceDecreaseStockDesc=Diminuír primeiro polas datas máis antigas para comer por e vender por. +CashDeskReaderKeyCodeForEnter=Código clave para "Enter" definido no lector de códigos de barras. (Exemplo: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 +BookmarkSetup=Configuración do módulo de marcador +BookmarkDesc=Este módulo permítelle xestionar marcadores. Tamén pode engadir atallos a calquera páxina de Dolibarr ou sitios web externos no menú esquerdo. +NbOfBoomarkToShow=Número máximo de marcadores para amosar no menú esquerdo ##### 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 +WebServicesSetup=Configuración do módulo de servizos web +WebServicesDesc=Ao habilitar este módulo, Dolibarr convértese nun servidor de servizos web para proporcionar servizos web diversos. +WSDLCanBeDownloadedHere=Os ficheiros descritores WSDL dos servizos proporcionados pódense descargar aquí +EndPointIs=Os clientes SOAP deben enviar as súas solicitudes ao punto final Dolibarr dispoñible no 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. +ApiSetup=Configuración do módulo API +ApiDesc=Ao habilitar este módulo, Dolibarr convértese nun servidor REST para proporcionar servizos web diversos. +ApiProductionMode=Activa o modo de produción (isto activarase uso de caché para a xestión de servizos) +ApiExporerIs=Pode explorar e probar as API na URL +OnlyActiveElementsAreExposed=Só están expostos os elementos dos módulos habilitados +ApiKey=Chave para API +WarningAPIExplorerDisabled=Desactivouse o explorador de API. O explorador API non está obrigado a proporcionar servizos API. É unha ferramenta para que os desenvolvedores atopen/proben as API REST. Se precisa esta ferramenta, acceda á configuración do módulo API REST para activala. ##### Bank ##### -BankSetupModule=Bank module setup -FreeLegalTextOnChequeReceipts=Free text on check receipts -BankOrderShow=Display order of bank accounts for countries using "detailed bank number" +BankSetupModule=Configuración do módulo Banco +FreeLegalTextOnChequeReceipts=Texto gratuíto nos recibos do talón +BankOrderShow=Amosar a orde das contas bancarias dos países que usan "número bancario detallado" BankOrderGlobal=Xeral -BankOrderGlobalDesc=General display order +BankOrderGlobalDesc=Orde xeral de visualización BankOrderES=Español -BankOrderESDesc=Spanish display order -ChequeReceiptsNumberingModule=Check Receipts Numbering Module +BankOrderESDesc=Orde de exhibición +ChequeReceiptsNumberingModule=Comprobar o módulo de numeración de recibos ##### Multicompany ##### MultiCompanySetup=Configuración do módulo Multi-empresa ##### Suppliers ##### SuppliersSetup=Configuración do módulo Provedores -SuppliersCommandModel=Modelo de pedimentos a provedores completo (logo...) -SuppliersCommandModelMuscadet=Complete template of Purchase Order (old implementation of cornas template) -SuppliersInvoiceModel=Modelo de facturas de provedores completo (logo...) +SuppliersCommandModel=Modelo completo de pedimento a provedor +SuppliersCommandModelMuscadet=Modelo completo da orde de compra (implementación antiga do modelo cornas) +SuppliersInvoiceModel=Modelo completo de facturas de provedor SuppliersInvoiceNumberingModel=Modelos de numeración de facturas de provedor IfSetToYesDontForgetPermission=Se está seleccionado, non esqueza modificar os permisos nos grupos ou usuarios para permitir a segunda aprobación ##### 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 +GeoIPMaxmindSetup=Configuración do módulo GeoIP Maxmind +PathToGeoIPMaxmindCountryDataFile=Ruta ao ficheiro que contén IP Maxmind á tradución 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=Teña conta que o ficheiro de datos de IP a país debe estar dentro dun directorio que poida ler PHP (Comprobe a configuración de PHP open_basedir e os permisos do sistema de ficheiros). +YouCanDownloadFreeDatFileTo=Pode descargar unha <b> versión de demostración gratuíta </b> do ficheiro de país Maxmind GeoIP en %s. +YouCanDownloadAdvancedDatFileTo=Tamén pode descargar unha <b> versión máis completa, con actualizacións </b> do ficheiro de país Maxmind GeoIP en %s. +TestGeoIPResult=Proba dunha conversión IP -> País ##### Projects ##### ProjectsNumberingModules=Módulo de numeración para as referencias dos proxectos ProjectsSetup=Configuración do módulo Proxectos @@ -1825,12 +1832,12 @@ DeleteFiscalYear=Eliminar ano fiscal ConfirmDeleteFiscalYear=¿Está certo de querer eliminar este ano fiscal? ShowFiscalYear=Ver período contable AlwaysEditable=Pode editarse sempre -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 +MAIN_APPLICATION_TITLE=Forzar visibilidade do nome da aplicación (aviso: configurar aquí o seu propio nome pode rachar a función de inicio de sesión de autocompletado cando se usa a aplicación móbil DoliDroid) +NbMajMin=Número mínimo de caracteres en maiúscula +NbNumMin=Número mínimo de caracteres numéricos +NbSpeMin=Número mínimo de caracteres especiais +NbIteConsecutive=Número máximo dos mesmos caracteres que se repiten +NoAmbiCaracAutoGeneration=Non use caracteres ambiguos ("1","l","i","|","0","O") para a xeración automática SalariesSetup=Configuración do módulo salarios SortOrder=Ordenación Format=Formatear @@ -1840,49 +1847,49 @@ ExpenseReportsSetup=Configuración do módulo Informe de Gastos TemplatePDFExpenseReports=Modelos de documento para xerar informes de gastos ExpenseReportsRulesSetup=Configuración do módulo Informes de gastos - Regras ExpenseReportNumberingModules=Módulo de numeración de informes de gastos -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 +NoModueToManageStockIncrease=Non se activou ningún módulo capaz de xestionar o aumento automático de stock. O aumento do stock farase só en entrada manual. +YouMayFindNotificationsFeaturesIntoModuleNotification=Pode atopar opcións para as notificacións por correo electrónico habilitando e configurando o módulo "Notificación". +ListOfNotificationsPerUser=Listaxe de notificacións automáticas por usuario * +ListOfNotificationsPerUserOrContact=Listaxe de posibles notificacións automáticas (no evento empresarial) dispoñibles por usuario * ou por contacto ** +ListOfFixedNotifications=Listaxe de notificacións fixas automáticas +GoOntoUserCardToAddMore=Vaia á pestana "Notificacións" dun usuario para engadir ou eliminar notificacións para os usuarios +GoOntoContactCardToAddMore=Vaia á pestana "Notificacións" dun terceiro para engadir ou eliminar notificacións de contactos/enderezos +Threshold=Límite BackupDumpWizard=Asistente para crear unha copia de seguridade da base de datos BackupZipWizard=Asistente para crear unha copia de seguridade do directorio de documentos -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 +SomethingMakeInstallFromWebNotPossible=A instalación do módulo externo non é posible desde a interface web polo seguinte motivo: +SomethingMakeInstallFromWebNotPossible2=Por este motivo, o proceso de actualización descrito aquí é un proceso manual que só pode realizar un usuario privilexiado con privilexios o ficheiro <strong>%s</strong> para permitir esta función. +InstallModuleFromWebHasBeenDisabledByFile=O seu administrador desactivou a instalación do módulo externo desde a aplicación. Debe pedirlle que elimine o ficheiro <strong>%s</strong> para permitir esta función. +ConfFileMustContainCustom=A instalación ou construción dun módulo externo desde a aplicación precisa gardar os ficheiros do módulo no directorio <strong>%s</strong>. Para que Dolibarr procese este directorio, debe configurar o seu <strong>conf/conf.php</strong> para engadir as dúas liñas directivas: <br><strong>$dolibarr_main_url_root_alt='/custom';</strong><br><strong>$dolibarr_main_document_root_alt='%s/custom';</strong> +HighlightLinesOnMouseHover=Resalte as liñas da táboa cando pasa o rato por riba +HighlightLinesColor=Resaltar a cor da liña cando pasa o rato pasa (use 'ffffff' para non destacar) +HighlightLinesChecked=Resaltar a cor da liña cando está marcada (use 'ffffff' para non destacar) +TextTitleColor=Cor do texto do título da páxina +LinkColor=Cor das ligazóns +PressF5AfterChangingThis=Prema CTRL+F5 no teclado ou limpe a caché do navegador despois de cambiar este valor para que sexa efectivo +NotSupportedByAllThemes=Traballará con temas core, pode que non sexan compatibles con temas externos BackgroundColor=Cor de fondo TopMenuBackgroundColor=Cor de fondo para o Menú superior TopMenuDisableImages=Ocultar imaxes no Menú superior LeftMenuBackgroundColor=Cor de fondo para o Menú esquerdo BackgroundTableTitleColor=Cor de fondo para a Taboa título líña BackgroundTableTitleTextColor=Cor do texto para a liña de título da taboa -BackgroundTableTitleTextlinkColor=Text color for Table title link line +BackgroundTableTitleTextlinkColor=Cor do texto para a liña de ligazón do título da táboa BackgroundTableLineOddColor=Cor de fondo para liñas de tabla odd BackgroundTableLineEvenColor=Cor de fondo para todas as liñas de taboa MinimumNoticePeriod=Período mínimo de notificación (A súa solicitude de licenza debe facerse antes deste período) -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 -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 +NbAddedAutomatically=Número de días engadidos aos contadores de usuarios (automaticamente) cada mes +EnterAnyCode=Este campo contén unha referencia para identificar a liña. Introduza calquera valor da súa escolla, pero sen caracteres especiais. +Enter0or1=Engada 0 ou 1 +UnicodeCurrency=Introduza aquí entre chaves, listaxe do número de bytes que representan o símbolo de moeda. Por exemplo: por $, introduza [36] - para Brasil real R$ [82,36] - para €, introduza [8364] +ColorFormat=A cor RGB está en formato HEX, por exemplo: FF0000 +PictoHelp=Nome da icona en formato dolibarr ('image.png' se está no directorio do tema actual, 'image.png@nom_du_module' se está no directorio /img/ dun módulo) +PositionIntoComboList=Posición da liña nas listas combinadas +SellTaxRate=Tipo de imposto sobre a venda +RecuperableOnly=Sí para o IVE "Non percibido pero recuperable" dedicado a algún estado de Franza. Manteña o valor en "Non" no resto dos casos. +UrlTrackingDesc=Se o provedor ou servizo de transporte ofrece unha páxina ou sitio web para comprobar o estado dos seus envíos, pode introducilo aquí. Podes usar a clave {TRACKID} nos parámetros de URL para que o sistema a substitúa polo número de seguimento que o usuario introduciu na tarxeta de envío. +OpportunityPercent=Cando cree un cliente potencial, definirá unha cantidade estimada de proxecto/cliente potencial. Segundo o estado do cliente potencial, este importe pode multiplicarse por esta taxa para avaliar unha cantidade total que todos os clientes potenciais poden xerar. O valor é unha porcentaxe (entre 0 e 100). +TemplateForElement=Este rexistro de modelo está adicado a cal elemento TypeOfTemplate=Tipo de prantilla TemplateIsVisibleByOwnerOnly=A prantilla é visible só polo propietario VisibleEverywhere=Visible en todas partes @@ -1891,147 +1898,148 @@ FixTZ=Corrección de zona horaria FillFixTZOnlyIfRequired=Exemplo: +2 (complete só se ten algún problema) ExpectedChecksum=Agardando a suma de comprobación CurrentChecksum=Suma de comprobación actual -ExpectedSize=Expected size -CurrentSize=Current size -ForcedConstants=Required constant values +ExpectedSize=Tamaño agardado +CurrentSize=Tamaño actual +ForcedConstants=Valores constantes requiridos MailToSendProposal=Orzamentos a clientes MailToSendOrder=Pedimentos de clientes MailToSendInvoice=Facturas a clientes MailToSendShipment=Envíos MailToSendIntervention=Intervencións -MailToSendSupplierRequestForQuotation=Para enviar solicitude de orzamento a provedor +MailToSendSupplierRequestForQuotation=Para enviar solicitude de orzamento ao provedor MailToSendSupplierOrder=Pedimentos a provedor MailToSendSupplierInvoice=Facturas provedor MailToSendContract=Contratos -MailToSendReception=Receptions +MailToSendReception=Recepcións MailToThirdparty=Terceiros MailToMember=Membros MailToUser=Usuarios MailToProject=Proxectos 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 +ByDefaultInList=Amosar por defecto en modo lista +YouUseLastStableVersion=Emprega a última versión estable +TitleExampleForMajorRelease=Exemplo de mensaxe que pode usar para anunciar a versión maior (non dubide en usalo nos seus sitios web) +TitleExampleForMaintenanceRelease=Exemplo de mensaxe que pode usar para anunciar esta versión de mantemento (non dubide en usala nos seus sitios web) +ExampleOfNewsMessageForMajorRelease=Dolibarr ERP e CRM %s están dispoñibles. A versión %s é unha versión importante con moitas novas funcións tanto para usuarios como para desenvolvedores. Podes descargalo desde a área de descarga do portal https://www.dolibarr.org (versións estables do subdirectorio). Podes ler <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog"> ChangeLog </a> para ver a lista completa de cambios. +ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP e CRM %s están dispoñibles. A versión %s é unha versión de mantemento, polo que só contén correccións de erros. Recomendamos a todos os usuarios que actualicen a esta versión. Unha versión de mantemento non introduce novas funcións nin cambios na base de datos. Podes descargalo desde a área de descarga do portal https://www.dolibarr.org (versións estables do subdirectorio). Pode ler o <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog"> ChangeLog </a> para ver a lista completa de cambios. +MultiPriceRuleDesc=Cando a opción "Varios niveis de prezos por produto/servizo" está activada, pode definir diferentes prezos (un por nivel de prezo) para cada produto. Para aforrar tempo, aquí pode introducir unha regra para calcular automaticamente un prezo para cada nivel en función do prezo do primeiro nivel, polo que só terá que introducir un prezo para o primeiro nivel para cada produto. Esta páxina está deseñada para aforrar tempo pero só é útil se os prezos de cada nivel son relativos ao primeiro nivel. Pode ignorar esta páxina na maioría dos casos. +ModelModulesProduct=Modelos para documentos do produto +WarehouseModelModules=Modelos para documentos de almacéns +ToGenerateCodeDefineAutomaticRuleFirst=Para poder xerar códigos automaticamente, primeiro ten que definir un manager para auto-axustar o número de código de barras. +SeeSubstitutionVars=Ver a nota * para a lista de posibles variables de substitución +SeeChangeLog=Ver o ficheiro ChangeLog (só en inglés) +AllPublishers=Todos os editores +UnknownPublishers=Editores descoñecidos +AddRemoveTabs=Engadir ou eliminar pestanas +AddDataTables=Engadir táboas de obxectos +AddDictionaries=Engadir táboas de dicionarios +AddData=Engade datos ou obxectos a dicionarios +AddBoxes=Engadir widgets +AddSheduledJobs=Engadir tarefas programadas +AddHooks=Engadir Hooks +AddTriggers=Engadir Triggers AddMenus=Engade menús -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. +AddPermissions=Engadir permisos +AddExportProfiles=Engadir perfís de exportación +AddImportProfiles=Engadir perfís de importación +AddOtherPagesOrServices=Engadir outras páxinas ou servizos +AddModels=Engadir modelos de documento ou numeración +AddSubstitutions=Engadir substitucións de claves +DetectionNotPossible=Non é posible a detección +UrlToGetKeyToUseAPIs=Url para obter o token para usar coa API (unha vez recibido o token gárdase na táboa de usuarios da base de datos e debe fornecerse en cada chamada da API) +ListOfAvailableAPIs=Listaxe de API dispoñibles +activateModuleDependNotSatisfied=O módulo "%s" depende do módulo "%s" que falta, polo que o módulo "%1$s" pode non funcionar correctamente. Instale o módulo "%2$s" ou desactive o módulo "%1$s" se quere estar a salvo de calquera sorpresa +CommandIsNotInsideAllowedCommands=O comando que tenta executar non está na listaxe de comandos permitidos definidos no parámetro <strong> $dolibarr_main_restrict_os_commands</strong> no ficheiro <strong>conf.php</strong>. +LandingPage=Páxina de destino +SamePriceAlsoForSharedCompanies=Se usa un módulo multi-empresa, coa opción "Prezo único", o prezo tamén será o mesmo para todas as empresas se os produtos se comparten entre elas +ModuleEnabledAdminMustCheckRights=O módulo está activado. Os permisos para os módulos activados déronse só a usuarios administradores. É posible que teña que conceder permisos a outros usuarios ou grupos manualmente se é preciso. +UserHasNoPermissions=Este usuario non ten permisos definidos +TypeCdr=Use "Ningún" se a data do prazo de pagamento é a data da factura máis un delta en días (delta é o campo "%s")<br>Use "Ao final do mes", se, despois do delta, a data debe aumentará ata chegar ao final do mes (+ un opcional "%s" en días)<br>Use "Actual/Seguinte" para que a data do prazo de pago sexa a primeira Nth do mes despois do delta (o delta é o campo "%s" , N almacénase no campo "%s") +BaseCurrency=Moeda de referencia da empresa (entre na configuración da empresa para cambiar isto) +WarningNoteModuleInvoiceForFrenchLaw=Este módulo %s cumpre coas leis francesas (Loi Finance 2016). +WarningNoteModulePOSForFrenchLaw=Este módulo %s cumpre coas leis francesas (Loi Finance 2016) porque o módulo Rexistros non reversibles está activado automaticamente. +WarningInstallationMayBecomeNotCompliantWithLaw=Está intentando instalar o módulo %s que é un módulo externo. Activar un módulo externo significa que confía no editor dese módulo e que está seguro de que este módulo non afecta negativamente o comportamento da súa aplicación e cumpre coas leis do seu país (%s). Se o módulo introduce unha función ilegal, vostede será responsable do uso de software ilegal. MAIN_PDF_MARGIN_LEFT=Marxe esquerdo en PDF MAIN_PDF_MARGIN_RIGHT=Marxe dereito en PDF MAIN_PDF_MARGIN_TOP=Marxe superior en PDF MAIN_PDF_MARGIN_BOTTOM=Marxe inferior en PDF -MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF -NothingToSetup=There is no specific setup required for this module. -SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups -EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') -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 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 -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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull -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 candidature +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') +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) +COMPANY_DIGITARIA_CLEAN_REGEX=Filtro de rexistro para limpar o valor (COMPANY_DIGITARIA_CLEAN_REGEX) +COMPANY_DIGITARIA_UNIQUE_CODE=Non se permite duplicado +GDPRContact=Responsable de protección de datos (DPO, privacidade de datos ou contacto GDPR) +GDPRContactDesc=Se garda datos sobre empresas/cidadáns europeos, pode nomear o contacto responsable do Regulamento xeral de protección de datos aquí +HelpOnTooltip=Texto de axuda para amosar na información de ferramentas +HelpOnTooltipDesc=​​= Poner aquí o texto ou unha chave de tradución para que o texto apareza nunha tip sobre ferramentas cando este campo aparece nun formulario +YouCanDeleteFileOnServerWith=Pode eliminar este ficheiro no servidor coa liña de comandos: <br>%s +ChartLoaded=Cargado o gráfico da conta +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. +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 +EMailHost=Anfitrión do servidor IMAP de correo electrónico +MailboxSourceDirectory=Directorio fonte da caixa de correo +MailboxTargetDirectory=Directorio de destino da caixa de correo +EmailcollectorOperations=Operacións que debe facer o receptor +EmailcollectorOperationsDesc=As operacións execútanse de arriba a abaixo +MaxEmailCollectPerCollect=Número máximo de correos electrónicos recollidos por recepción +CollectNow=Recibir agora +ConfirmCloneEmailCollector=¿Está certo de que quere clonar o receptor de correo electrónico %s? +DateLastCollectResult=Data do último intento de recepción +DateLastcollectResultOk=Data da última recepción con éxito +LastResult=Último resultado +EmailCollectorConfirmCollectTitle=Confirmación de recepción por correo electrónico +EmailCollectorConfirmCollect=¿Quere executar agora a recepcións deste receptor? +NoNewEmailToProcess=Non hai ningún correo electrónico novo (filtros coincidentes) para procesar +NothingProcessed=Nada feito +XEmailsDoneYActionsDone=%s correos electrónicos cualificados, %s correos electrónicos procesados ​​correctamente (para %s rexistro/accións feitas) +RecordEvent=Gravar evento de correo electrónico +CreateLeadAndThirdParty=Crear cliente potencial (e terceiros se é preciso) +CreateTicketAndThirdParty=Crear ticket (e ligar a terceiros se foi cargado nunha operación anterior) +CodeLastResult=Código de resultado máis recente +NbOfEmailsInInbox=Número de correos electrónicos no directorio de orixe +LoadThirdPartyFromName=Cargar busca de terceiros en %s (só cargar) +LoadThirdPartyFromNameOrCreate=Cargar a busca de terceiros en %s (crea se non se atopa) +WithDolTrackingID=Mensaxe dunha conversa iniciada por un primeiro correo electrónico enviado desde Dolibarr +WithoutDolTrackingID=Mensaxe dunha conversa iniciada por un primeiro correo electrónico NON enviado desde Dolibarr +WithDolTrackingIDInMsgId=Mensaxe enviado desde Dolibarr +WithoutDolTrackingIDInMsgId=Mensaxe NON enviado desde Dolibarr +CreateCandidature=Crear solicitude de traballo FormatZip=Código postal -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=Código de entrada do menú (menú principal) +ECMAutoTree=Amosar árbore automático GED +OperationParamDesc=Defina os valores a empregar para o obxecto da acción, ou como extraer valores. Por exemplo: <br> objproperty1=SET: o valor a definir <br>objproperty2=SET:un valor con substitución de __objproperty1__<br>objproperty3=SETIFEMPTY: valor usado se objproperty3 non está xa definido <br> objproperty4 =EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)<br>options_myextrafield1=EXTRACT:BODY:([^&#92;n]*)<br> object.objproperty5 = EXTRACT:BODY:O meu nome da empresa é\\s([^\\s]*) <br><br> Use a; char como separador para extraer ou establecer varias propiedades. +OpeningHours=Horario de apertura +OpeningHoursDesc=Introduza aquí o horario habitual da súa empresa. +ResourceSetup=Configuración do módulo Recursos +UseSearchToSelectResource=Use un formulario de busca para escoller un recurso (en lugar dunha lista despregable). +DisabledResourceLinkUser=Desactivar a función para ligar un recurso aos usuarios +DisabledResourceLinkContact=Desactivar a función para ligar un recurso aos contactos +EnableResourceUsedInEventCheck=Activar a función para comprobar se un recurso está en uso nun evento +ConfirmUnactivation=Confirmar o restablecemento do módulo +OnMobileOnly=Só na pantalla pequena (smartphone) +DisableProspectCustomerType=Desactiva o tipo de terceiro "Cliente Potencial+Cliente" (polo que o terceiro debe ser "Cliente Potencial" ou "Cliente", pero non pode ser ambos) +MAIN_OPTIMIZEFORTEXTBROWSER=Simplificar a interface para persoas cegas +MAIN_OPTIMIZEFORTEXTBROWSERDesc=Active esta opción se é unha persoa cega ou se usa a aplicación desde un explorador de texto como Lynx ou Links. +MAIN_OPTIMIZEFORCOLORBLIND=Cambiar a cor da interface para daltónicos +MAIN_OPTIMIZEFORCOLORBLINDDesc=Active esta opción se é unha persoa daltónica, nalgún caso a interface cambiará a configuración da cor para aumentar o contraste. 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 +Deuteranopes=Deuteranopsia +Tritanopes=Tritanopia +ThisValueCanOverwrittenOnUserLevel=Este valor pode ser substituído por cada usuario desde a súa páxina de usuario-pestana '%s' +DefaultCustomerType=Tipo predeterminado de terceiros para o formulario de creación "Novo cliente" +ABankAccountMustBeDefinedOnPaymentModeSetup=Nota: a conta bancaria debe estar definida no módulo de cada modo de pago (Paypal, Stripe, ...) para que esta función funcione. +RootCategoryForProductsToSell=Categoría raíz de produtos a vender +RootCategoryForProductsToSellDesc=Se se define, só os produtos desta categoría ou subcategoría estarán dispoñibles no Punto de Venda DebugBar=Barra de depuración DebugBarDesc=Barra de ferramentas que ven con moitas ferramentas para simplificar a depuración. DebugBarSetup=Configuración DebugBar @@ -2039,47 +2047,51 @@ GeneralOptions=Opcións xerais LogsLinesNumber=Número de liñas a amosar na pestana de rexistros 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 dramáticamente a saída. -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 +WarningValueHigherSlowsDramaticalyOutput=Advertencia, os valores altos ralentizan enormemente a saída. +ModuleActivated=O módulo %s está activado e ralentiza a interface +IfYouAreOnAProductionSetThis=Se está nun entorno de produción, debe establecer esta propiedade en %s.. +AntivirusEnabledOnUpload=Antivirus activado nos ficheiros actualizados +EXPORTS_SHARE_MODELS=Os modelos de exportación son compartidos con todos. ExportSetup=Configuración do módulo de exportación. -ImportSetup=Setup of module Import +ImportSetup=Configuración do módulo Importación InstanceUniqueID=ID única da instancia SmallerThan=Menor que LargerThan=Maior que -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. +IfTrackingIDFoundEventWillBeLinked=Teña conta que se se atopa no correo electrónico un ID de seguimento dun correo electrónico entrante é unha resposta dun correo electrónico xa recollido e ligado a un obxecto, o evento creado ligarase automaticamente co obxecto relacionado coñecido. +WithGMailYouCanCreateADedicatedPassword=Cunha conta de GMail, se habilitou a validación de 2 pasos, recoméndase crear un segundo contrasinal adicado para a aplicación no lugar de usar a súa propia contrasinal de conta de https://myaccount.google.com/. +EmailCollectorTargetDir=Pode ser un comportamento desexado mover o correo electrónico a outra etiqueta/directorio cando se procesou con éxito. Simplemente configure o nome do directorio aquí para usar esta función (NON use caracteres especiais no nome). Teña conta que tamén debe usar unha conta de inicio de sesión de lectura/escritura. +EmailCollectorLoadThirdPartyHelp=Pode usar esta acción para usar o contido do correo electrónico para atopar e cargar un terceiro existente na súa base de datos. O terceiro atopado (ou creada) usarase para seguir as accións que o precisen. No campo do parámetro pode usar por exemplo "EXTRACT:BODY:Name:\\s([^\\s]*)" se desexa extraer o nome do terceiro dunha cadea "Nome: nome a atopar" atopada no corpo. +EndPointFor=Punto final de %s:%s +DeleteEmailCollector=Eliminar o receptor de correo electrónico +ConfirmDeleteEmailCollector=¿Está certo de que quere eliminar este receptor de correo electrónico? +RecipientEmailsWillBeReplacedWithThisValue=Os correos electrónicos dos destinatarios sempre se substituirán por este valor +AtLeastOneDefaultBankAccountMandatory=Debe definirse polo menos unha conta bancaria predeterminada +RESTRICT_ON_IP=Permitir acceso a APIS dispoñibles a algunha host IP só (comodín non permitido, use espazo entre valores). Baleiro significa que todos os hosts poden acceder. IPListExample=127.0.0.1 192.168.0.2 [::1] -BaseOnSabeDavVersion=Based on the library SabreDAV version -NotAPublicIp=Not a public IP -MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server (done 1 time only after installation) to allow the foundation to count the number of Dolibarr installation. -FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled -EmailTemplate=Template for email -EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax -PDF_USE_ALSO_LANGUAGE_CODE=If you want to have some texts in your PDF duplicated in 2 different languages in the same generated PDF, you must set here this second language so generated PDF will contains 2 different languages in same page, the one chosen when generating PDF and this one (only few PDF templates support this). Keep empty for 1 language per PDF. -FafaIconSocialNetworksDesc=Enter here the code of a FontAwesome icon. If you don't know what is FontAwesome, you can use the generic value fa-address-book. -FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled -RssNote=Note: Each RSS feed definition provides a widget that you must enable to have it available in dashboard -JumpToBoxes=Jump to Setup -> Widgets -MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" -MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. -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. +BaseOnSabeDavVersion=Baseado na versión SabreDAV da biblioteca +NotAPublicIp=Non é unha IP pública +MakeAnonymousPing=Fai un Ping anónimo '+1' ao servidor da fundación Dolibarr (só se fai unha vez despois da instalación) para permitir á fundación contar o número de instalacións de 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_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 +RssNote=Nota: Cada definición de fonte RSS proporciona un widget que debes habilitar para que estexa dispoñible no panel +JumpToBoxes=Ir a Configuración -> Widgets +MeasuringUnitTypeDesc=Use aquí un valor como "tamaño", "superficie", "volume", "peso", "hora" +MeasuringScaleDesc=A escala é o número de lugares que ten que mover a parte decimal para que coincida coa unidade de referencia predeterminada. Para o tipo de unidade "hora", é o número de segundos. Os valores entre 80 e 99 son valores reservados. +TemplateAdded=Modelo engadido +TemplateUpdated=Modelo actualizado +TemplateDeleted=Modelo eliminado +MailToSendEventPush=Correo electronico lembranbdo o evento +SwitchThisForABetterSecurity=Modificar este valor a %s é recomendable para maior seguridade +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. +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 diff --git a/htdocs/langs/gl_ES/agenda.lang b/htdocs/langs/gl_ES/agenda.lang index b76942ad53e..b0328266609 100644 --- a/htdocs/langs/gl_ES/agenda.lang +++ b/htdocs/langs/gl_ES/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Número de eventos ListOfActions=Listaxe de eventos EventReports=Informes de evento Location=Localización -ToUserOfGroup=Event assigned to any user in group +ToUserOfGroup=Enento 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 @@ -38,7 +38,7 @@ ActionsEvents=Eventos para que Dolibarr cre unha acción na axenda automáticame EventRemindersByEmailNotEnabled=Lembranzas de eventos por correo non foron activados na configuración do módulo %s. ##### Agenda event labels ##### NewCompanyToDolibarr=Terceiro %s creado -COMPANY_DELETEInDolibarr=Third party %s deleted +COMPANY_DELETEInDolibarr=Terceiro %s eliminado ContractValidatedInDolibarr=Contrato %s validado CONTRACT_DELETEInDolibarr=Contrato %s eliminado PropalClosedSignedInDolibarr=Orzamento %s asinado @@ -60,42 +60,42 @@ MemberSubscriptionModifiedInDolibarr=Suscrición %s do membro %s modificada MemberSubscriptionDeletedInDolibarr=Suscrición %s do membro %s eliminada ShipmentValidatedInDolibarr=Expedición %s validada ShipmentClassifyClosedInDolibarr=Expedición %s clasificada como pagada -ShipmentUnClassifyCloseddInDolibarr=Shipment %s classified re-open +ShipmentUnClassifyCloseddInDolibarr=Expedición %s clasificada como aberta de novo ShipmentBackToDraftInDolibarr=Expedición %s de volta ao estatus de borrador ShipmentDeletedInDolibarr=Expedición %s eliminada -ReceptionValidatedInDolibarr=Reception %s validated -OrderCreatedInDolibarr=Pedido %s creado -OrderValidatedInDolibarr=Pedido %s validado -OrderDeliveredInDolibarr=Pedido %s clasificado como enviado -OrderCanceledInDolibarr=Pedido %s anulado -OrderBilledInDolibarr=Pedido %s clasificado como facturado -OrderApprovedInDolibarr=Pedido %s aprobado -OrderRefusedInDolibarr=Pedido %s rexeitado -OrderBackToDraftInDolibarr=Pedido %s de volta ao estaus borrador +ReceptionValidatedInDolibarr=Recepción %s validada +OrderCreatedInDolibarr=Pedimento %s creado +OrderValidatedInDolibarr=Pedimento %s validado +OrderDeliveredInDolibarr=Pedimento %s clasificado como enviado +OrderCanceledInDolibarr=Pedimento %s anulado +OrderBilledInDolibarr=Pedimento %s clasificado como facturado +OrderApprovedInDolibarr=Pedimento %s aprobado +OrderRefusedInDolibarr=Pedimento %s rexeitado +OrderBackToDraftInDolibarr=Pedimento %s de volta ao modo borrador ProposalSentByEMail=Orzamento %s enviado por e-mail ContractSentByEMail=Contrato %s enviado por e-Mail -OrderSentByEMail=Pedido de cliente %s enviado por e-mail +OrderSentByEMail=Pedimento de cliente %s enviado por correo electrónico InvoiceSentByEMail=Factura a cliente %s enviada por e-mail -SupplierOrderSentByEMail=Pedido a proveedor %s enviado por e-mail -ORDER_SUPPLIER_DELETEInDolibarr=Purchase order %s deleted +SupplierOrderSentByEMail=Pedimento a proveedor %s enviado por correo electrónico +ORDER_SUPPLIER_DELETEInDolibarr=Pedimento a provedor %s eliminado SupplierInvoiceSentByEMail=Factura de proveedor %s enviada por e-mail ShippingSentByEMail=Expedición %s enviada por email ShippingValidated= Expedición %s validada InterventionSentByEMail=Intervención %s enviada por e-mail ProposalDeleted=Orzamento eliminado -OrderDeleted=Pedido eliminado +OrderDeleted=Pedimento eliminado InvoiceDeleted=Factura eliminada -DraftInvoiceDeleted=Draft invoice deleted -CONTACT_CREATEInDolibarr=Contact %s created -CONTACT_DELETEInDolibarr=Contact %s deleted +DraftInvoiceDeleted=Borrador de factura eliminado +CONTACT_CREATEInDolibarr=Creouse o contacto %s +CONTACT_DELETEInDolibarr=Contacto %s eliminado PRODUCT_CREATEInDolibarr=Produto %s creado PRODUCT_MODIFYInDolibarr=Produto %s modificado PRODUCT_DELETEInDolibarr=Produto %s eliminado -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 +HOLIDAY_CREATEInDolibarr=Creouse a solicitude de días libres %s +HOLIDAY_MODIFYInDolibarr=Modificada solicitude de días libres %s +HOLIDAY_APPROVEInDolibarr=Aprobada solicitude de días libres %s +HOLIDAY_VALIDATEInDolibarr=Solicitude de días libres %s validada +HOLIDAY_DELETEInDolibarr=Eliminada solicitude de días libres %s EXPENSE_REPORT_CREATEInDolibarr=Informe de gastos %s creado EXPENSE_REPORT_VALIDATEInDolibarr=Informe de gastos %s validado EXPENSE_REPORT_APPROVEInDolibarr=Informe de gastos %s aprobado @@ -106,30 +106,30 @@ PROJECT_MODIFYInDolibarr=Proxecto %s modificado PROJECT_DELETEInDolibarr=Proxecto %s eliminado TICKET_CREATEInDolibarr=Ticket %s creado TICKET_MODIFYInDolibarr=Ticket %s modificado -TICKET_ASSIGNEDInDolibarr=Ticket %s assigned -TICKET_CLOSEInDolibarr=Ticket %s closed +TICKET_ASSIGNEDInDolibarr=Ticket %s asignado +TICKET_CLOSEInDolibarr=Ticket %s pechado TICKET_DELETEInDolibarr=Ticket %s eliminado -BOM_VALIDATEInDolibarr=BOM validated -BOM_UNVALIDATEInDolibarr=BOM unvalidated -BOM_CLOSEInDolibarr=BOM disabled -BOM_REOPENInDolibarr=BOM reopen -BOM_DELETEInDolibarr=BOM deleted -MRP_MO_VALIDATEInDolibarr=MO validated -MRP_MO_UNVALIDATEInDolibarr=MO set to draft status -MRP_MO_PRODUCEDInDolibarr=MO produced -MRP_MO_DELETEInDolibarr=MO deleted -MRP_MO_CANCELInDolibarr=MO canceled +BOM_VALIDATEInDolibarr=Lista de materiais validada +BOM_UNVALIDATEInDolibarr=Lista de materiais non validada +BOM_CLOSEInDolibarr=Lista de materiais desactivada +BOM_REOPENInDolibarr=Lista de materiais aberta de novo +BOM_DELETEInDolibarr=Lista de materiais non eliminada +MRP_MO_VALIDATEInDolibarr=OF validada +MRP_MO_UNVALIDATEInDolibarr=OF establecida a borrador +MRP_MO_PRODUCEDInDolibarr=OF producida +MRP_MO_DELETEInDolibarr=OF eliminada +MRP_MO_CANCELInDolibarr=OF cancelada ##### End agenda events ##### AgendaModelModule=Prantillas de documentos para eventos DateActionStart=Data de inicio -DateActionEnd=Data de fin +DateActionEnd=Data finalización AgendaUrlOptions1=Pode tamén engadir os seguintes parámetros ao filtro de saida: AgendaUrlOptions3=<b>logina=%s</b> para restrinxir saída as accións pertencentes ao usuario <b>%s</b>. AgendaUrlOptionsNotAdmin=<b> logina =!%s</b> para restrinxir saída as accións que non pertencen ao usuario <b>%s</b>. AgendaUrlOptions4=<b>logint=%s</b>para restrinxir saída as accións asignadas ao usuario <b>%s</b>(propietario e outros). 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> to include events of holidays. +AgendaUrlOptionsIncludeHolidays=<b>includeholidays=1</b> a incluir eventos de vacacións. AgendaShowBirthdayEvents=Amosar cumpreanos dos contactos AgendaHideBirthdayEvents=Ocultar cumpreanos dos contactos Busy=Ocupado @@ -152,17 +152,18 @@ ActionType=Tipo de evento DateActionBegin=Data de comezo do evento ConfirmCloneEvent=¿Esta certo de querer clonar o evento <b>%s</b>? RepeatEvent=Repetir evento +OnceOnly=Só unha vez EveryWeek=Cada semana EveryMonth=Cada mes DayOfMonth=Día do mes DayOfWeek=Día da semana DateStartPlusOne=Data inicio +1 hora -SetAllEventsToTodo=Set all events to todo -SetAllEventsToInProgress=Set all events to in progress -SetAllEventsToFinished=Set all events to finished -ReminderTime=Reminder period before the event -TimeType=Duration type -ReminderType=Callback type -AddReminder=Create an automatic reminder notification for this event -ErrorReminderActionCommCreation=Error creating the reminder notification for this event -BrowserPush=Browser Notification +SetAllEventsToTodo=Configura todos os eventos a todo +SetAllEventsToInProgress=Configura todos os eventos a en progreso +SetAllEventsToFinished=Configura todos os eventos a finalizados +ReminderTime=Período de lembranza antes do evento +TimeType=Tipo de duración +ReminderType=Tipo de devolución da chamada +AddReminder=Crear unha notificación de lembranza automática para este evento +ErrorReminderActionCommCreation=Erro ao crear a notificación de lembranza para este evento +BrowserPush=Notiticaciñon emerxente no navegador diff --git a/htdocs/langs/gl_ES/assets.lang b/htdocs/langs/gl_ES/assets.lang index a8ede67427d..a94a7f9643c 100644 --- a/htdocs/langs/gl_ES/assets.lang +++ b/htdocs/langs/gl_ES/assets.lang @@ -21,7 +21,7 @@ NewAsset = Novo activo AccountancyCodeAsset = Código contable (activo) AccountancyCodeDepreciationAsset = Código contable (conta depreciación activo) AccountancyCodeDepreciationExpense = Código contable (conta depreciación gastos) -NewAssetType=Nuevo tipo de activo +NewAssetType=Novo tipo de activo AssetsTypeSetup=Configuración tipos de activos AssetTypeModified=Tipo de activo modificado AssetType=Tipo de activo @@ -34,7 +34,7 @@ ShowTypeCard=Ver tipo '%s' # Module label 'ModuleAssetsName' ModuleAssetsName = Activos # Module description 'ModuleAssetsDesc' -ModuleAssetsDesc = Descrición ben +ModuleAssetsDesc = Descrición de activos # # Admin page @@ -61,5 +61,5 @@ MenuListTypeAssets = Listaxe # # Module # -NewAssetType=Nuevo tipo de activo +NewAssetType=Novo tipo de activo NewAsset=Novo activo diff --git a/htdocs/langs/gl_ES/banks.lang b/htdocs/langs/gl_ES/banks.lang index bb0b955c32c..bbcfd6fd8f9 100644 --- a/htdocs/langs/gl_ES/banks.lang +++ b/htdocs/langs/gl_ES/banks.lang @@ -37,9 +37,9 @@ IbanValid=IBAN válido IbanNotValid=IBAN non válido StandingOrders=Domiciliacións StandingOrder=Domiciliación -PaymentByDirectDebit=Payment by direct debit -PaymentByBankTransfers=Payments by credit transfer -PaymentByBankTransfer=Payment by credit transfer +PaymentByDirectDebit=Pagamento por domiciliación bancaria +PaymentByBankTransfers=Pagamentos por transferencia +PaymentByBankTransfer=Pagamento por transferencia AccountStatement=Extracto da conta AccountStatementShort=Extracto AccountStatements=Extractos da conta @@ -166,17 +166,18 @@ VariousPayment=Pagamento varios VariousPayments=Pagamentos varios ShowVariousPayment=Amosar pagamentos varios AddVariousPayment=Engadir pagamentos varios -VariousPaymentId=Miscellaneous payment ID -VariousPaymentLabel=Miscellaneous payment label -ConfirmCloneVariousPayment=Confirm the clone of a miscellaneous payment +VariousPaymentId=ID de pagamentos varios +VariousPaymentLabel=Etiqueta de pagamentos varios +ConfirmCloneVariousPayment=Confirmar a clonación de pagamentos varios SEPAMandate=Orde SEPA YourSEPAMandate=A súa orde SEPA FindYourSEPAMandate=Esta é a súa orde SEPA para autorizar a nosa empresa a realizar un petición de débito ao seu banco. Envíea de volta asinada (dixitalice o documento asinado) ou envíe por correo a AutoReportLastAccountStatement=Automaticanete cubra a etiqueta 'numero de extracto bancario' co último número de extracto de cando fixo a reconciliación -CashControl=POS cash fence -NewCashFence=New cash fence -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. +CashControl=Control de caixa TPV +NewCashFence=Pehe de nova 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 diff --git a/htdocs/langs/gl_ES/bills.lang b/htdocs/langs/gl_ES/bills.lang index a11d0d3fecd..a5ca9f3aeff 100644 --- a/htdocs/langs/gl_ES/bills.lang +++ b/htdocs/langs/gl_ES/bills.lang @@ -19,7 +19,7 @@ InvoiceStandardAsk=Factura estándar InvoiceStandardDesc=Este tipo de factura é a factura tradicional. InvoiceDeposit=Factura de anticipo InvoiceDepositAsk=Factura de anticipo -InvoiceDepositDesc=This kind of invoice is done when a down payment has been received. +InvoiceDepositDesc=Este tipo de factura crease cando se recibiu un anticipo. InvoiceProForma=Factura proforma InvoiceProFormaAsk=Factura proforma InvoiceProFormaDesc=A <b>factura proforma</b> é a imaxe dunha factura definitiva, pero que non ten ningún valor contable. @@ -66,10 +66,10 @@ paymentInInvoiceCurrency=na moeda das facturas PaidBack=Reembolsado DeletePayment=Eliminar o pagamento ConfirmDeletePayment=¿Está certo de querer eliminar este pagamento? -ConfirmConvertToReduc=Do you want to convert this %s into an available credit? -ConfirmConvertToReduc2=The amount will be saved among all discounts and could be used as a discount for a current or a future invoice for this customer. -ConfirmConvertToReducSupplier=Do you want to convert this %s into an available credit? -ConfirmConvertToReducSupplier2=The amount will be saved among all discounts and could be used as a discount for a current or a future invoice for this vendor. +ConfirmConvertToReduc=¿Quere converter este %s nun crédito dispoñible? +ConfirmConvertToReduc2=A cantidade gardarase entre todos os descontos e podería usarse como desconto dunha factura actual ou futura para este cliente. +ConfirmConvertToReducSupplier=¿Quere converter este %s nun crédito dispoñible? +ConfirmConvertToReducSupplier2=A cantidade gardarase entre todos os descontos e podería usarse como desconto para unha factura actual ou futura deste provedor. SupplierPayments=Pagamentos a provedores ReceivedPayments=Pagamentos recibidos ReceivedCustomersPayments=Pagamentos recibidos de cliente @@ -92,8 +92,8 @@ PaymentConditions=Condicións de pagamento PaymentConditionsShort=Condicións de pagamento PaymentAmount=Importe pagamento PaymentHigherThanReminderToPay=Pagamento superior ao resto a pagar -HelpPaymentHigherThanReminderToPay=Attention, the payment amount of one or more bills is higher than the outstanding amount to pay. <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=Atención, o importe do pagamento dunha ou máis facturas é superior ao importe pendente a pagar. <br> Edite a súa entrada, se non, confirme e considere a posibilidade de crear unha nota de crédito polo exceso recibido por cada factura pagada de máis. +HelpPaymentHigherThanReminderToPaySupplier=Atención, o importe do pagamento dunha ou máis facturas é superior ao importe pendente a pagar. <br> Edite a súa entrada, se non, confirme e considere a posibilidade de crear unha nota de crédito para o exceso pagado por cada factura pagada de máis. ClassifyPaid=Clasificar 'Pagado' ClassifyUnPaid=Clasificar 'Non pagado' ClassifyPaidPartially=Clasificar 'Pagado parcialmente' @@ -135,37 +135,37 @@ BillShortStatusDraft=Borrador BillShortStatusPaid=Pagada BillShortStatusPaidBackOrConverted=Reembolsada ou convertida Refunded=Reembolsada -BillShortStatusConverted=Pago +BillShortStatusConverted=Paga BillShortStatusCanceled=Abandonada BillShortStatusValidated=Validada BillShortStatusStarted=Pagamento parcial BillShortStatusNotPaid=Pte. pagamento BillShortStatusNotRefunded=Non reembolsada -BillShortStatusClosedUnpaid=Pechada (pte. pagamento) +BillShortStatusClosedUnpaid=Pechada BillShortStatusClosedPaidPartially=Pechada (pagamento parcial) PaymentStatusToValidShort=A validar ErrorVATIntraNotConfigured=Número de CIF intracomunitario aínda non configurado -ErrorNoPaiementModeConfigured=No default payment type defined. Go to Invoice module setup to fix this. -ErrorCreateBankAccount=Create a bank account, then go to Setup panel of Invoice module to define payment types -ErrorBillNotFound=Invoice %s does not exist -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=De -BillTo=A -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 +ErrorNoPaiementModeConfigured=Non se definiu ningún tipo de pago por defecto. Vaia á configuración do módulo de facturas para solucionalo. +ErrorCreateBankAccount=Crear unha conta bancaria e logo ir ao panel de configuración do módulo de factura para definir os tipos de pago +ErrorBillNotFound=A factura %s non existe +ErrorInvoiceAlreadyReplaced=Erro, intentou validar unha factura para substituír a factura %s. Pero esta xa foi substituída pola factura %s. +ErrorDiscountAlreadyUsed=Erro, desconto xa utilizado +ErrorInvoiceAvoirMustBeNegative=Erro, a factura correcta debe ter un importe negativo +ErrorInvoiceOfThisTypeMustBePositive=Erro, este tipo de factura debe ter un importe sen impostos positivos (ou nulos) +ErrorCantCancelIfReplacementInvoiceNotValidated=Erro, non se pode cancelar unha factura que foi substituída por outra que aínda está en estado de borrador +ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved=Esta parte ou outra xa está empregada polo que a serie de descontos non se pode eliminar. +BillFrom=Emisor +BillTo=Enviar a: +ActionsOnBill=Accións sobre a factura +RecurringInvoiceTemplate=Modelo / Factura recorrente +NoQualifiedRecurringInvoiceTemplateFound=Non hai ningunha factura de modelo recorrente cualificada para a xeración. +FoundXQualifiedRecurringInvoiceTemplate=Atopáronse %s factura(s) de modelo recorrentes cualificadas para a xeración. +NotARecurringInvoiceTemplate=Non é unha factura de modelo recorrente NewBill=Nova factura -LastBills=Latest %s invoices -LatestTemplateInvoices=Latest %s template invoices -LatestCustomerTemplateInvoices=Latest %s customer template invoices -LatestSupplierTemplateInvoices=Latest %s vendor template invoices +LastBills=Últimas %s facturas +LatestTemplateInvoices=As últimas %s prantillas de facturas +LatestCustomerTemplateInvoices=As últimas %s prantillas de facturas a cliente +LatestSupplierTemplateInvoices=As últimas %s prantillas de facturas de provedor LastCustomersBills=Últimas %s facturas a clientes LastSuppliersBills=Últimas %s facturas de provedores AllBills=Todas as facturas @@ -185,20 +185,20 @@ ConfirmCancelBillQuestion=¿Por qué quere clasificar esta factura como 'abandoa ConfirmClassifyPaidPartially=¿Está certo de querer cambiar o estado da factura <b>%s</b> a pagado? ConfirmClassifyPaidPartiallyQuestion=Esta factura non foi pagada completamente. ¿Cal é a razón para pechar esta factura? ConfirmClassifyPaidPartiallyReasonAvoir=O resto a pagar <b>(%s %s)</b> é un desconto outorgado por pronto pagamento. Regularizaré o IVE cun abono. -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. +ConfirmClassifyPaidPartiallyReasonDiscount=Restar sen pagar <b>(%s %s)</b> é un desconto concedido porque o pago foi adiantado ao prazo. +ConfirmClassifyPaidPartiallyReasonDiscountNoVat=Restar sen pagar <b>(%s %s)</b> é un desconto concedido porque o pago foi adiantado ao prazo. Acepto perder o IVE por este desconto. +ConfirmClassifyPaidPartiallyReasonDiscountVat=Restar sen pagar <b>(%s %s)</b> é un desconto concedido porque o pago foi adiantado ao prazo. Recupero o IVE deste desconto sen unha nota de crédito. +ConfirmClassifyPaidPartiallyReasonBadCustomer=Mal cliente +ConfirmClassifyPaidPartiallyReasonProductReturned=Produtos parcialmente devoltos +ConfirmClassifyPaidPartiallyReasonOther=Cantidade abandonada por outro motivo +ConfirmClassifyPaidPartiallyReasonDiscountNoVatDesc=Esta opción é posible se a súa factura recibiu os comentarios axeitados. (Exemplo «Só o imposto correspondente ao prezo efectivamente pagado dá dereito a dedución») +ConfirmClassifyPaidPartiallyReasonDiscountVatDesc=Nalgúns países, esta elección só pode ser posible se a súa factura contén notas correctas. +ConfirmClassifyPaidPartiallyReasonAvoirDesc=Use esta opción se o resto non se adapta +ConfirmClassifyPaidPartiallyReasonBadCustomerDesc=Un <b> mal cliente </b> é un cliente que rexeita pagar a súa débeda. +ConfirmClassifyPaidPartiallyReasonProductReturnedDesc=Esta opción úsase cando o pago non se completa porque algúns dos produtos foron devoltos +ConfirmClassifyPaidPartiallyReasonOtherDesc=Use esta opción se todas as demais non son axeitadas, por exemplo na seguinte situación:<br>- o pago non se completou porque algúns produtos foron devoltos <br>- cantidade reclamada demasiado importante porque se esqueceu un desconto <br> En todos os casos, o importe excedido debe corrixirse no sistema de contabilidade creando unha nota de crédito. ConfirmClassifyAbandonReasonOther=Outro -ConfirmClassifyAbandonReasonOtherDesc=This choice will be used in all other cases. For example because you plan to create a replacing invoice. +ConfirmClassifyAbandonReasonOtherDesc=Esta opción usarase no resto dos casos. Por exemplo, porque ten pensado crear unha factura de rectificativa. ConfirmCustomerPayment=¿Confirma o proceso deste pagamento de <b>%s</b> %s? ConfirmSupplierPayment=¿Confirma o proceso deste pagamento de <b>%s</b> %s? ConfirmValidatePayment=¿Está certo de querer validar este pagamento? Non permitense cambios despois de validar o pagamento. @@ -209,23 +209,23 @@ NumberOfBillsByMonth=Nº de facturas por mes AmountOfBills=Importe das facturas AmountOfBillsHT=Importe das facturas (Sen IVE) AmountOfBillsByMonthHT=Importe das facturas por mes (Sen IVE) -UseSituationInvoices=Allow situation invoice -UseSituationInvoicesCreditNote=Allow situation invoice credit note -Retainedwarranty=Retained warranty -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=Permitir factura de situación +UseSituationInvoicesCreditNote=Permitir nota de crédito na factura da situación +Retainedwarranty=Garantía retida +AllowedInvoiceForRetainedWarranty=Garantía retida utilizable nos seguintes tipos de facturas +RetainedwarrantyDefaultPercent=Porcentaxe por defecto da garantía retida +RetainedwarrantyOnlyForSituation=Pon a "garantía retida" dispoñible só para facturas de situación +RetainedwarrantyOnlyForSituationFinal=Nas facturas de situación, a dedución global de "garantía retida" aplícase só na situación final +ToPayOn=Para pagar en %s +toPayOn=pagar en %s +RetainedWarranty=Garantía retida +PaymentConditionsShortRetainedWarranty=Condicións de pago da garantía retida +DefaultPaymentConditionsRetainedWarranty=Condicións de pago por garantía por defecto retidas +setPaymentConditionsShortRetainedWarranty=Establecer os termos de pago da garantía retida +setretainedwarranty=Establecer a garantía retida +setretainedwarrantyDateLimit=Establecer o límite de data da garantía retida +RetainedWarrantyDateLimit=Data límite de garantía retida +RetainedWarrantyNeed100Percent=A factura de situación ten que estar ao 100%% de progreso para mostrarse en PDF AlreadyPaid=Xa pago AlreadyPaidBack=Xa reembolsado AlreadyPaidNoCreditNotesNoDeposits=Xa pago (excluidos os abonos e anticipos) @@ -315,9 +315,9 @@ DiscountAlreadyCounted=Descontos xa consumidos CustomerDiscounts=Descontos a clientes SupplierDiscounts=Descontos de provedores BillAddress=Enderezo de facturación -HelpEscompte=This discount is a discount granted to customer because payment was made before term. -HelpAbandonBadCustomer=This amount has been abandoned (customer said to be a bad customer) and is considered as an exceptional loss. -HelpAbandonOther=This amount has been abandoned since it was an error (wrong customer or invoice replaced by another for example) +HelpEscompte=Este desconto é un desconto concedido ao cliente porque o pago foi realizado antes de prazo. +HelpAbandonBadCustomer=Esta cantidade foi abandonada (o cliente dixo que era un cliente malo) e considérase unha perda excepcional. +HelpAbandonOther=Esta cantidade foi abandonada xa que foi un erro (cliente incorrecto ou factura substituída por outra por exemplo) IdSocialContribution=Id pagamento tasa social/fiscal PaymentId=ID pagamento PaymentRef=Ref. pagamento @@ -358,32 +358,32 @@ ListOfPreviousSituationInvoices=Listaxe de facturas de situación previas ListOfNextSituationInvoices=Listaxe das próximas facturas de situación ListOfSituationInvoices=Listaxe de facturas de situación CurrentSituationTotal=Total situación actual -DisabledBecauseNotEnouthCreditNote=To remove a situation invoice from cycle, this invoice's credit note total must cover this invoice total -RemoveSituationFromCycle=Remove this invoice from cycle -ConfirmRemoveSituationFromCycle=Remove this invoice %s from cycle ? -ConfirmOuting=Confirm outing +DisabledBecauseNotEnouthCreditNote=Para eliminar unha factura de situación do ciclo, o total da nota de crédito desta factura debe cubrir este total de factura +RemoveSituationFromCycle=Eliminar esta factura do ciclo +ConfirmRemoveSituationFromCycle=Eliminar esta factura %s do ciclo? +ConfirmOuting=Confirmar a saída FrequencyPer_d=Cada %s días FrequencyPer_m=Cada %s meses FrequencyPer_y=Cada %s anos FrequencyUnit=Frecuencia -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 +toolTipFrequency=Exemplos:<br><b>Indicar 7, Día</b>: creará unha nova factura cada 7 días<br><b>Indicar 3, Mes</b>: creará unha nova factura cada 3 meses +NextDateToExecution=Data para a xeración da próxima factura +NextDateToExecutionShort=Data próxima xeración +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 +NbOfGenerationDoneShort=Número de xeracións feitas +MaxGenerationReached=Máximo número de xeracións alcanzado +InvoiceAutoValidate=Validar facturas automáticamente +GeneratedFromRecurringInvoice=Xerado dende a prantilla de facturas recorrentes %s +DateIsNotEnough=Ainda non foi alcanzada a data +InvoiceGeneratedFromTemplate=Factura %s xerada dende a prantilla de factura recorrente %s +GeneratedFromTemplate=Xerado dende a prantilla de facturas concorrentes %s +WarningInvoiceDateInFuture=Atención: a data da factura é maior que a data actual +WarningInvoiceDateTooFarInFuture=Atención: a data da factura é moi lonxana á data actual +ViewAvailableGlobalDiscounts=Ver os descontos dispoñibles +GroupPaymentsByModOnReports=Pagos agrupados por modo nos informes # PaymentConditions Statut=Estado PaymentConditionShortRECEP=Acuse de recibo @@ -410,10 +410,10 @@ PaymentConditionShort14D=14 días PaymentCondition14D=Pagamento aos 14 días PaymentConditionShort14DENDMONTH=14 días fin de mes PaymentCondition14DENDMONTH=14 días a fin de més -FixAmount=Importe fixo +FixAmount=Importe fixo -1 liña coa etiqueta %s VarAmount=Importe variable (%% total) VarAmountOneLine=Cantidade variable (%% tot.) - 1 liña coa etiqueta '%s' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Cantidade variable (%% tot.) - as mesmas liñas # PaymentType PaymentTypeVIR=Transferencia bancaria PaymentTypeShortVIR=Transferencia bancaria @@ -421,10 +421,10 @@ PaymentTypePRE=Domiciliación PaymentTypeShortPRE=Domiciliación PaymentTypeLIQ=Efectivo PaymentTypeShortLIQ=Efectivo -PaymentTypeCB=Tarxeta de crédito -PaymentTypeShortCB=Tarxeta de crédito -PaymentTypeCHQ=Verificar -PaymentTypeShortCHQ=Verificar +PaymentTypeCB=Tarxeta +PaymentTypeShortCB=Tarxeta +PaymentTypeCHQ=Talón +PaymentTypeShortCHQ=Talón PaymentTypeTIP=TIP (Titulo interbancario de pagamento) PaymentTypeShortTIP=Pagamento TIP PaymentTypeVAD=Pagamento en liña @@ -459,8 +459,8 @@ FullPhoneNumber=Teléfono TeleFax=Fax PrettyLittleSentence=Acepto o pagamento mediante talóns ao meu nome das sumas debidas, na miña calidade de membro dunha empresa autorizada pola Administración Fiscal. IntracommunityVATNumber=Número de IVE intracomunitario -PaymentByChequeOrderedTo=Pagamento mediante talón nominativo a %s enviado a -PaymentByChequeOrderedToShort=Pagamento mediante talón nominativo a +PaymentByChequeOrderedTo=Pagamento mediante talón nominativo (taxas incluídas) a %s enviado a +PaymentByChequeOrderedToShort=Pagamento mediante talón nominativo (taxas incluídas) a SendTo=enviado a PaymentByTransferOnThisBankAccount=Pagamento mediante transferencia á conta bancaria seguinte VATIsNotUsedForInvoice=* IVE non aplicable art-293B del CGI @@ -507,17 +507,17 @@ ListOfYourUnpaidInvoices=Listaxe de facturas impagadas NoteListOfYourUnpaidInvoices=Nota: Este listaxe só inclue os terceiros ds que vostede é comercial. RevenueStamp=Timbre fiscal YouMustCreateInvoiceFromThird=Esta opción só está dispoñible ao crear unha factura dende a lapela 'cliente' en terceiros -YouMustCreateInvoiceFromSupplierThird=This option is only available when creating an invoice from tab "Vendor" of third party -YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice first and convert it to "template" to create a new template invoice -PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) -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 -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 -EarlyClosingReason=Early closing reason -EarlyClosingComment=Early closing note +YouMustCreateInvoiceFromSupplierThird=Esta opción só está dispoñible ao crear unha factura desde a pestana "Provedor" de terceiros +YouMustCreateStandardInvoiceFirstDesc=Primeiro ten que crear unha factura estándar e convertela a "modelo" para crear unha nova factura modelo +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 +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 +EarlyClosingReason=Motivo de peche anticipado +EarlyClosingComment=Nota de peche anticipado ##### Types de contacts ##### TypeContact_facture_internal_SALESREPFOLL=Responsable seguimiento factura a cliente TypeContact_facture_external_BILLING=Contacto cliente facturación @@ -528,50 +528,55 @@ TypeContact_invoice_supplier_external_BILLING=Contacto provedor facturación TypeContact_invoice_supplier_external_SHIPPING=Contacto provedor entregas TypeContact_invoice_supplier_external_SERVICE=Contacto provedor servizos # Situation invoices -InvoiceFirstSituationAsk=First situation invoice -InvoiceFirstSituationDesc=The <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 -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. +InvoiceFirstSituationAsk=Factura de primeira situación +InvoiceFirstSituationDesc=As <b>facturas de situación</b> están ligadas a situacións relacionadas cunha progresión, por exemplo, a progresión dunha construcción. Cada situación está ligada a unha factura. +InvoiceSituation=Factura de situación +PDFInvoiceSituation=Factura de situación +InvoiceSituationAsk=Factura seguindo a situación +InvoiceSituationDesc=Crear unha nova situación despois dunha xa existente +SituationAmount=Importe da factura de situación (neto) +SituationDeduction=Dedución da situación +ModifyAllLines=Modificar todas as liñas +CreateNextSituationInvoice=Crear a seguinte situación +ErrorFindNextSituationInvoice=Erro ao non atopar a seguinte referencia do ciclo de situación +ErrorOutingSituationInvoiceOnUpdate=Non se pode emitir a factura desta situación. +ErrorOutingSituationInvoiceCreditNote=Non se pode emitir a nota de crédito ligada. +NotLastInCycle=Esta factura non é a última do ciclo e non se debe modificar. +DisabledBecauseNotLastInCycle=A seguinte situación xa existe. +DisabledBecauseFinal=Esta situación é definitiva. situationInvoiceShortcode_AS=AS situationInvoiceShortcode_S=D -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 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 +CantBeLessThanMinPercent=O progreso non pode ser menor que o seu valor na situación anterior. +NoSituations=Non hai situacións abertas +InvoiceSituationLast=Factura final e xeral +PDFCrevetteSituationNumber=Situación Nº%s +PDFCrevetteSituationInvoiceLineDecompte=Factura de situación - COUNT +PDFCrevetteSituationInvoiceTitle=Factura de situación +PDFCrevetteSituationInvoiceLine=Situación nº%s: Fact. Nº%s en %s +TotalSituationInvoice=Situación total +invoiceLineProgressError=O progreso da liña de factura non pode ser maior nin igual á seguinte liña de factura +updatePriceNextInvoiceErrorUpdateline=Erro: actualización do prezo na liña de factura:%s +ToCreateARecurringInvoice=Para crear unha factura recorrente para este contrato, primeiro cree este borrador de factura, logo convértao nun modelo de factura e defina a frecuencia para a xeración de facturas futuras. +ToCreateARecurringInvoiceGene=Para xerar futuras facturas regularmente e manualmente, só tes que ir ao menú <strong>%s-%s-%s </strong>. +ToCreateARecurringInvoiceGeneAuto=Se precisa xerar estas facturas automaticamente, pídelle ao administrador que active e configure o módulo <strong>%s </strong>. Teña conta que os dous métodos (manual e automático) pódense empregar xuntos sen risco de duplicación. +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) +StatusOfGeneratedDocuments=Estado da xeración de documentos +DoNotGenerateDoc=Non xerar ficheiro de documento +AutogenerateDoc=Xerar automaticamente un ficheiro de documento +AutoFillDateFrom=Establecer a data de inicio da liña de servizo coa data da factura +AutoFillDateFromShort=Establecer a data de inicio +AutoFillDateTo=Establecer a data de finalización da liña de servizo coa próxima data de factura +AutoFillDateToShort=Establecer a data de finalización +MaxNumberOfGenerationReached=Número máximo de xen. alcanzado BILL_DELETEInDolibarr=Factura eliminada -BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted -UnitPriceXQtyLessDiscount=Unit price x Qty - Discount -CustomersInvoicesArea=Customer billing area -SupplierInvoicesArea=Supplier billing area +BILL_SUPPLIER_DELETEInDolibarr=Eliminouse a factura do provedor +UnitPriceXQtyLessDiscount=Prezo unitario x Cantidade - Desconto +CustomersInvoicesArea=Área de facturación do cliente +SupplierInvoicesArea=Área de facturación de provedor +FacParentLine=Liña principal de factura +SituationTotalRayToRest=Lembranza de pagar sen impostos +PDFSituationTitle=Situación n° %d +SituationTotalProgress=Progreso total %d %% diff --git a/htdocs/langs/gl_ES/blockedlog.lang b/htdocs/langs/gl_ES/blockedlog.lang index 3a8b9adac84..99de9dd3d73 100644 --- a/htdocs/langs/gl_ES/blockedlog.lang +++ b/htdocs/langs/gl_ES/blockedlog.lang @@ -1,54 +1,54 @@ -BlockedLog=Unalterable Logs +BlockedLog=Rexistros inalterables Field=Campo -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). -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 fence 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 +BlockedLogDesc=Este módulo rastrexa algúns eventos nun rexistro inalterable (que non pode ser modificado unha vez rexistrado) nunha cadea de bloques, en tempo real. Este módulo proporciona compatibilidade cos requisitos das lexislacións dalgúns países (como Franza coa lei Finanzas 2016 - Norma NF525). +Fingerprints=Eventos arquivados e huellas dixitais. +FingerprintsDesc=Esta é a ferramenta para navegar ou extraer os rexistros inalterables. Os rexistros inalterables son xerados e arquivados localmente nunha taboa adicada, en tempo real cando é rexistrado un evento de negocios. Pode utilizar esta ferramenta para exportar este ficheiro e gardarlo nun soporte externo (algúns países, como Franza, pidenlle que o faga todos os anos). Teña conta que non hai ningunha función para limpar este rexistro e que todos os cambios que tentara facer hacer directamente neste rexistro (por exemplo, un pirata informático) informanse cunha huella dixital non válida. Se realmente precisa purgar esta taboa porque fixo uso da sua aplicación para unha mostra / propósito de proba e desexa limpar os seus datos para comezar coa súa produción, pode solicitar ao seu revendedor ou integrador que reinicie a súa base de datos (serán eliminados todos os seus datos). +CompanyInitialKey=Clave inicial da empresa (hash do bloque de xénesis) +BrowseBlockedLog=Rexistros inalterables +ShowAllFingerPrintsMightBeTooLong=Amosar todos os rexistros arquivados (pode ser longo) +ShowAllFingerPrintsErrorsMightBeTooLong=Mostrar todos os rexistros de ficheiro no válidos (pode ser longo) +DownloadBlockChain=Descargar pegadas dactilares +KoCheckFingerprintValidity=A entrada de rexistro arquivada non é válida. Significa que alguén (¿un hacker?) Modificou algúns datos deste rexistro despois de gravalo ou borrou o rexistro anterior arquivado (comprobe que existe a liña co # anterior). +OkCheckFingerprintValidity=O rexistro de rexistro arquivado é válido. Os datos desta liña non se modificaron e a entrada segue a anterior. +OkCheckFingerprintValidityButChainIsKo=O rexistro arquivado parece válido en comparación co anterior, pero a cadea estaba corrompida anteriormente. +AddedByAuthority=Almacenado na autoridade remota +NotAddedByAuthorityYet=Aínda non almacenado na autoridade remota +ShowDetails=Amosar detalles almacenados +logPAYMENT_VARIOUS_CREATE=Creouse o pagamento (non asignado á factura) +logPAYMENT_VARIOUS_MODIFY=Modificouse o pagamento (non asignado á factura) +logPAYMENT_VARIOUS_DELETE=Eliminación lóxico do pagamento (non asignado a factura). +logPAYMENT_ADD_TO_BANK=Pagamento engadido ao banco +logPAYMENT_CUSTOMER_CREATE=Pagamento do cliente creado +logPAYMENT_CUSTOMER_DELETE=Eliminación lóxica do pagamento do cliente +logDONATION_PAYMENT_CREATE=Creado pagamento de doación/subvención +logDONATION_PAYMENT_DELETE=Eliminación lóxica do pagamento da doación/subvención. +logBILL_PAYED=Factura do cliente pagada +logBILL_UNPAYED=Factura do cliente marcada como pendente de cobro +logBILL_VALIDATE=Validada factura a cliente +logBILL_SENTBYMAIL=Enviar factura a cliente por correo electrónico +logBILL_DELETE=Factura do cliente borrada lóxicamente +logMODULE_RESET=O módulo BlockedLog foi deshabilitado +logMODULE_SET=O módulo BlockedLog foi habilitado +logDON_VALIDATE=Doación/Subvención validada +logDON_MODIFY=Doación/subvención modificada +logDON_DELETE=Eliminación lóxica da doación/subvención. +logMEMBER_SUBSCRIPTION_CREATE=Creada subscrición de membro +logMEMBER_SUBSCRIPTION_MODIFY=Modificada Subscrición de membro +logMEMBER_SUBSCRIPTION_DELETE=Eliminación lóxica de subscrición de membro +logCASHCONTROL_VALIDATE=Rexistro de peche de caixa +BlockedLogBillDownload=Descarga da factura de cliente +BlockedLogBillPreview=Vista previa da factura do cliente +BlockedlogInfoDialog=Detalles do rexistro +ListOfTrackedEvents=Listaxe de eventos seguidos +Fingerprint=Pegada dactilar +DownloadLogCSV=Exportar rexistros arquivados (CSV) +logDOC_PREVIEW=Vista previa dun documento validado para imprimir ou descargar +logDOC_DOWNLOAD=Descarga dun documento validado para imprimir ou enviar. +DataOfArchivedEvent=Datos completos do evento arquivado. +ImpossibleToReloadObject=O obxecto orixinal (tipo %s, id %s) non ligado (ver a columna "Datos completos" para obter datos gardados inalterables) +BlockedLogAreRequiredByYourCountryLegislation=A lexislación do seu país pode requirir o módulo de rexistros inalterables. A desactivación deste módulo pode facer que calquera transacción futura sexa inválida con respecto á lei e ao uso de software legal xa que non poden ser validadas por unha auditoría fiscal. +BlockedLogActivatedBecauseRequiredByYourCountryLegislation=O módulo de Rexistros inalterables activouse por mor da lexislación do seu país. A desactivación deste módulo pode facer que as transaccións futuras sexan inválidas con respecto á lei e ao uso de software legal, xa que non poden ser validadas por unha auditoría fiscal. +BlockedLogDisableNotAllowedForCountry=Listaxe de países onde o uso deste módulo é obrigatorio (só para evitar desactivar o módulo por erro, se o seu país está nesta lista, a desactivación do módulo non é posible sen editar esta lista antes. Teña conta tamén que habilitar/desactivar este módulo manterá unha pista no rexistro inalterable). +OnlyNonValid=Non válido +TooManyRecordToScanRestrictFilters=Demasiados rexistros para escanear/analizar. Prégase restrinxa a listaxe con filtros mais restrictivos. +RestrictYearToExport=Restrinxir mes/ano para exportar diff --git a/htdocs/langs/gl_ES/boxes.lang b/htdocs/langs/gl_ES/boxes.lang index 1ae5652b2a9..9012a5b62ac 100644 --- a/htdocs/langs/gl_ES/boxes.lang +++ b/htdocs/langs/gl_ES/boxes.lang @@ -37,18 +37,21 @@ BoxTitleOldestUnpaidSupplierBills=Facturas Provedores: últimas %s pendentes de BoxTitleCurrentAccounts=Contas abertas: balance BoxTitleSupplierOrdersAwaitingReception=Pedimentos de provedores agardando recepción BoxTitleLastModifiedContacts=Contactos/Enderezos: Últimos %s modificados -BoxMyLastBookmarks=Bookmarks: latest %s +BoxMyLastBookmarks=Últimos %s marcadores BoxOldestExpiredServices=Servizos antigos expirados BoxLastExpiredServices=Últimos %s contratos mais antigos con servizos expirados BoxTitleLastActionsToDo=Últimas %s accións a realizar BoxTitleLastContracts=Últimos %s contratos modificados BoxTitleLastModifiedDonations=Últimas %s doacións/subvencións modificadas BoxTitleLastModifiedExpenses=Últimos %s informes de gastos modificados -BoxTitleLatestModifiedBoms=Latest %s modified BOMs -BoxTitleLatestModifiedMos=Latest %s modified Manufacturing Orders +BoxTitleLatestModifiedBoms=Últimos %s MRP modificados +BoxTitleLatestModifiedMos=Últimos %s ordes de fabricación modificadas +BoxTitleLastOutstandingBillReached=Superouse o máximo de clientes con pendente BoxGlobalActivity=Actividade global (facturas, orzamentos, ordes) BoxGoodCustomers=Bos clientes BoxTitleGoodCustomers=%s Bos clientes +BoxScheduledJobs=Tarefas programadas +BoxTitleFunnelOfProspection=Embudo de clientes FailedToRefreshDataInfoNotUpToDate=Erro ao actualizar o RSS. Último refresco correcto na data: %s LastRefreshDate=Última data de refresco NoRecordedBookmarks=Non hai marcadores definidos @@ -83,8 +86,8 @@ BoxTitleLatestModifiedSupplierOrders=Pedimentos Provedor: últimos %s modificado BoxTitleLastModifiedCustomerBills=Facturas Clientes: últimas %s modificadas BoxTitleLastModifiedCustomerOrders=Pedimentos Clientes: últimos %s pedimentos modificados BoxTitleLastModifiedPropals=Últimos %s orzamentos modificados -BoxTitleLatestModifiedJobPositions=Latest %s modified jobs -BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures +BoxTitleLatestModifiedJobPositions=Últimos %s traballos modificados +BoxTitleLatestModifiedCandidatures=Últimas %s candidaturas modificadas ForCustomersInvoices=Facturas a clientes ForCustomersOrders=Pedimentos de clientes ForProposals=Orzamentos @@ -92,8 +95,8 @@ LastXMonthRolling=Os últimos %s meses consecutivos ChooseBoxToAdd=Engadir panel ao seu taboleiro BoxAdded=O panel foi agregado ao seu taboleiro BoxTitleUserBirthdaysOfMonth=Cumpreanos deste mes (Usuarios) -BoxLastManualEntries=Últimas entradas manuais en contabilidade -BoxTitleLastManualEntries=%s últimas entradas manuais +BoxLastManualEntries=Último rexistro en contabilidade introducido manualmente ou sen documento orixe +BoxTitleLastManualEntries=Ultimo rexistro de %s introducido manualmente ou sen documento orixe NoRecordedManualEntries=Sen entradas manuais gravadas en contabilidade BoxSuspenseAccount=Operaciónen conta contable con conta en suspenso BoxTitleSuspenseAccount=Número de liñas non asignadas @@ -102,5 +105,7 @@ SuspenseAccountNotDefined=Conta en suspenso non está definida BoxLastCustomerShipments=Últimos envios a clientes BoxTitleLastCustomerShipments=Últimos %s envíos a clientes NoRecordedShipments=Ningún envío a cliente rexistrado +BoxCustomersOutstandingBillReached=Alcanzáronse os clientes cun límite pendente # Pages AccountancyHome=Contabilidade +ValidatedProjects=Proxectos validados diff --git a/htdocs/langs/gl_ES/cashdesk.lang b/htdocs/langs/gl_ES/cashdesk.lang index 0926360b26f..318445e1d3d 100644 --- a/htdocs/langs/gl_ES/cashdesk.lang +++ b/htdocs/langs/gl_ES/cashdesk.lang @@ -50,7 +50,7 @@ AmountAtEndOfPeriod=Importe ao final do período (día, mes ou ano) TheoricalAmount=Importe teórico RealAmount=Importe real CashFence=Peche de caixa -CashFenceDone=Peche de caixa realizado para o período. +CashFenceDone=Peche de caixa realizado para o período NbOfInvoices=Nº de facturas Paymentnumpad=Tipo de Pad para introducir o pago. Numberspad=Teclado numérico @@ -62,7 +62,7 @@ CashDeskBankAccountFor=Conta por defecto a usar para cobros en NoPaimementModesDefined=Non existe modo de pago definido na configuración de TakePOS TicketVatGrouped=Agrupar por tipo de IVE nos tickets AutoPrintTickets=Imprimir tickets automáticamente -PrintCustomerOnReceipts=Print customer on tickets|receipts +PrintCustomerOnReceipts=Imprimir a cliente tickets/recibos EnableBarOrRestaurantFeatures=Habilitar características para Bar ou Restaurante ConfirmDeletionOfThisPOSSale=¿Está certo de querer eliminar a venda actual? ConfirmDiscardOfThisPOSSale=¿Queres descartar a venda actual?? @@ -77,48 +77,50 @@ POSModule=POS Modulo BasicPhoneLayout=Utilizar deseño básico para teléfonos. SetupOfTerminalNotComplete=Configuración da terminal %s non está finalizada DirectPayment=Pago directo -DirectPaymentButton=Add a "Direct cash payment" button +DirectPaymentButton=Engadir un botón "Pago en efectivo" InvoiceIsAlreadyValidated=A factura xa foi validada NoLinesToBill=Sen liñas a facturar 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 +ColorTheme=Cor do tema +Colorful=Colorido +HeadBar=Barra na cabeceira +SortProductField=Campo de clasificación de produtos Browser=Navegador -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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence -CashReport=Cash report -MainPrinterToUse=Main printer to use -OrderPrinterToUse=Order printer to use -MainTemplateToUse=Main template to use -OrderTemplateToUse=Order template to use -BarRestaurant=Bar Restaurant -AutoOrder=Order by the customer himself +BrowserMethodDescription=Impresión de recibos sinxela e doada. Só algúns parámetros para configurar o recibo. Imprimir mediante navegador. +TakeposConnectorMethodDescription=Módulo externo con funcións adicionais. Posibilidade de imprimir desde a nube. +PrintMethod=Método de impresión +ReceiptPrinterMethodDescription=Método potente con moitos parámetros. Completamente personalizable con modelos. Non se pode imprimir desde a nube. +ByTerminal=Por terminal +TakeposNumpadUsePaymentIcon=Usar a icona no canto do texto, nos botóns de pago do teclado numérico +CashDeskRefNumberingModules=Módulo de numeración para vendas de TPV +CashDeskGenericMaskCodes6 = A etiqueta <br><b>(TN)</b> é usada para engadir o número de terminal +TakeposGroupSameProduct=Agrupa as mesmas liñas de produtos +StartAParallelSale=Comeza unha nova venda en paralelo +SaleStartedAt=A venda comezou en %s +ControlCashOpening=Aviso emerxente do efectivo ao abris o TPV +CloseCashFence=Controlar peche de caixa +CashReport=Informe de caixa +MainPrinterToUse=Impresora principal a usar +OrderPrinterToUse=Solicitar que impresora usar +MainTemplateToUse=Modelo principal a usar +OrderTemplateToUse=Modelo de pedido a usar +BarRestaurant=Bar Restaurante +AutoOrder=Pedido do propio cliente 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 +CustomerMenu=Menú do cliente +ScanToMenu=Escanear o código QR para ver o menú +ScanToOrder=Escanear o código QR para pedir +Appearance=Apariencia +HideCategoryImages=Ocultar imaxes de categoría +HideProductImages=Ocultar imaxes do produto +NumberOfLinesToShow=Número de liñas de imaxes a amosar +DefineTablePlan=Definir o plan de mesas +GiftReceiptButton=Engadir un botón "Recibo agasallo" +GiftReceipt=Recibo agasallo +ModuleReceiptPrinterMustBeEnabled=A impresora de recibos do módulo debe estar habilitada primeiro +AllowDelayedPayment=Permitir o pago en débeda +PrintPaymentMethodOnReceipts=Imprimir método de pago en tickets/recibos +WeighingScale=Pesaxe diff --git a/htdocs/langs/gl_ES/categories.lang b/htdocs/langs/gl_ES/categories.lang index 2aa1b892b01..13f95f1a8dc 100644 --- a/htdocs/langs/gl_ES/categories.lang +++ b/htdocs/langs/gl_ES/categories.lang @@ -1,92 +1,99 @@ # Dolibarr language file - Source file is en_US - categories -Rubrique=Tag/Category +Rubrique=Etiqueta/Categoría Rubriques=Etiquetas/Categorías -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=Accounts tags/categories area -ProjectsCategoriesArea=Projects tags/categories area -UsersCategoriesArea=Users tags/categories area -SubCats=Sub-categories -CatList=List of tags/categories -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 -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories -CatProdList=List of products tags/categories -CatMemberList=List of members tags/categories -CatContactList=List of contact tags/categories -CatSupLinks=Links between suppliers 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 -CatProJectLinks=Links between projects and tags/categories -DeleteFromCat=Remove from tags/category +RubriquesTransactions=Etiquetas/Categorías de transaccións +categories=etiquetas/categorias +NoCategoryYet=Ningunha etiqueta/categoría deste tipo creada +In=En +AddIn=Engadir en +modify=modificar +Classify=Clasificar +CategoriesArea=Área Etiquetas/Categorías +ProductsCategoriesArea=Área etiquetas/categorías Produtos/Servizos +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 +ProjectsCategoriesArea=Área etiquetas/categorías Proxectos +UsersCategoriesArea=Área etiquetas/categorías Usuarios +SubCats=Subcategorías +CatList=Listaxe de etiquetas/categorías +CatListAll=Listaxe de etiquetas/categorías (todos os tipos) +NewCategory=Nova etiqueta/categoría +ModifCat=Modificar etiqueta/categoría +CatCreated=Etiqueta/categoría creada +CreateCat=Crear etiqueta/categoría +CreateThisCat=Crear esta etiqueta/categoría +NoSubCat=Esta categoría non contén ningunha subcategoría. +SubCatOf=Subcategoría +FoundCats=Atopadas etiquetas/categorías +ImpossibleAddCat=Imposible engadir á etiqueta/categoría %s +WasAddedSuccessfully=<b>%s</b> foi engadida con éxito +ObjectAlreadyLinkedToCategory=O elemento xa está ligado a esta etiqueta/categoría +ProductIsInCategories=Produto/Servizo está ligado as seguintes etiquetas/categorías +CompanyIsInCustomersCategories=Este terceiro está ligado nas seguintes etiquetas/categorías de clientes/clientes potenciais +CompanyIsInSuppliersCategories=Este terceiro está ligado ás seguintes etiquetas/categorías de provedores +MemberIsInCategories=Este membro está ligado ás seguintes etiquetas/categorías +ContactIsInCategories=Este contacto está ligado ás seguintes etiquetas/categorías de contactos +ProductHasNoCategory=Este produto/servizo non atópase en ningunha etiqueta/categoría +CompanyHasNoCategory=Este terceiro non atópase en ningunha etiqueta/categoría +MemberHasNoCategory=Este membro non atópase en ningunha etiqueta/categoría +ContactHasNoCategory=Este contacto non atópase en ningunha etiqueta/categoría +ProjectHasNoCategory=Este proxecto non atópase en ningunha etiqueta/categoría +ClassifyInCategory=Engadir a unha etiqueta/categoría +NotCategorized=Sen etiqueta/categoría +CategoryExistsAtSameLevel=Esta categoría xa existe para esta referencia +ContentsVisibleByAllShort=Contido visible por todos +ContentsNotVisibleByAllShort=Contido non visible por todos +DeleteCategory=Eliminar etiqueta/categoría +ConfirmDeleteCategory=¿Está certo de querer eliminar esta etiqueta/categoría? +NoCategoriesDefined=Ningunha etiqueta/categoría definida +SuppliersCategoryShort=Etiqueta/categoría Provedores +CustomersCategoryShort=Etiqueta/categoría Clientes +ProductsCategoryShort=Etiqueta/categoría Produtos +MembersCategoryShort=Etiqueta/categoría Membros +SuppliersCategoriesShort=Etiquetas/categorías Provedores +CustomersCategoriesShort=Etiquetas/categorías Clientes +ProspectsCategoriesShort=Etiquetas/categorías Clientes Potenciais +CustomersProspectsCategoriesShort=Etiquetas/categorías Clientes/Clientes Potenciais +ProductsCategoriesShort=Etiquetas/categorías Produtos +MembersCategoriesShort=Etiquetas/categorías Membros +ContactCategoriesShort=Etiquetas/categorías Contactos +AccountsCategoriesShort=Etiquetas/categorías Contabilidade +ProjectsCategoriesShort=Etiquetas/categorías Proxectos +UsersCategoriesShort=Etiquetas/categorías Usuarios +StockCategoriesShort=Etiquetas/categorías Almacéns +ThisCategoryHasNoItems=Esta categoría non contén ningún elemento +CategId=Id de etiqueta/categoría +ParentCategory=Etiqueta/categoría pai +ParentCategoryLabel=Selo de pai /etiqueta/categoría +CatSupList=Listaxe de etiquetas/categorías de provedores +CatCusList=Listaxe de etiquetas/categorías de clientes/clientes potenciais +CatProdList=Listaxe de etiquetas/categorías de produtos +CatMemberList=Listaxe de etiquetas/categorías de membros +CatContactList=Listaxe de etiquetas/categorías de contactos +CatProjectsList=Listaxe de etiquetas/categorías de proxectos +CatUsersList=Listaxe de etiquetas/categorías de usuarios +CatSupLinks=Ligazóns entre provedores e etiquetas/categorías +CatCusLinks=Ligazóns entre clientes/clientes potenciais e etiquetas/categorías +CatContactsLinks=Ligazóns entre contactos/enderezos e etiquetas/categorías +CatProdLinks=Ligazóns entre produtos/servizos e etiquetas/categorías +CatMembersLinks=Ligazóns entre membros e etiquetas/categorías +CatProjectsLinks=Ligazóns entre proxectos e etiquetas/categorías +CatUsersLinks=Ligazóns entre usuarios e etiquetas/categorías +DeleteFromCat=Eliminar de etiquetas/categorías ExtraFieldsCategories=Campos adicionais -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=Warehouses Categories -ActionCommCategoriesArea=Events Categories -WebsitePagesCategoriesArea=Page-Container Categories -UseOrOperatorForCategories=Use or operator for categories +CategoriesSetup=Configuración de etiquetas/categorías +CategorieRecursiv=Ligar co pai etiqueta/categoría automáticamente +CategorieRecursivHelp=Se está activado, cando engade un produto nunha subcategoría o produto será ligado á categoría pai. +AddProductServiceIntoCategory=Engadir o seguinte produto/servizo +AddCustomerIntoCategory=Asignar categoría ao cliente +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 +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 fa0e5afee91..bb98f3309db 100644 --- a/htdocs/langs/gl_ES/companies.lang +++ b/htdocs/langs/gl_ES/companies.lang @@ -124,7 +124,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 number ProfId6AT=- ProfId1AU=Id Prof 1 (ABN) ProfId2AU=- @@ -136,7 +136,7 @@ ProfId1BE=Id Prof 1 (Número de colexiado) ProfId2BE=- ProfId3BE=- ProfId4BE=- -ProfId5BE=EORI number +ProfId5BE=Número EORI ProfId6BE=- ProfId1BR=- ProfId2BR=IE (Inscrición Estadual) @@ -144,11 +144,11 @@ ProfId3BR=IM (Inscrición Municipal) ProfId4BR=CPF #ProfId5BR=CNAE #ProfId6BR=INSS -ProfId1CH=UID-Nummer +ProfId1CH=UID-Número ProfId2CH=- ProfId3CH=Id Prof 1 (Número federal) ProfId4CH=Id Prof 2 (Número de rexistro comercial) -ProfId5CH=EORI number +ProfId5CH=EORI número ProfId6CH=- ProfId1CL=Id Prof 1 (R.U.T.) ProfId2CL=- @@ -166,19 +166,19 @@ ProfId1DE=Id prof. 1 (USt.-IdNr) ProfId2DE=Id prof. 2 (USt.-Nr) ProfId3DE=Id prof. 3 (Handelsregister-Nr.) ProfId4DE=- -ProfId5DE=EORI number +ProfId5DE=Número EORI ProfId6DE=- -ProfId1ES=CIF/NIF -ProfId2ES=Número Seguridade Social -ProfId3ES=CNAE -ProfId4ES=Número de colexiado -ProfId5ES=EORI number +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 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=EORI number +ProfId5FR=Número EORI ProfId6FR=- ProfId1GB=Número rexistro ProfId2GB=- @@ -202,12 +202,12 @@ ProfId1IT=- ProfId2IT=- ProfId3IT=- ProfId4IT=- -ProfId5IT=EORI number +ProfId5IT=Número EORI ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg) ProfId2LU=Id. prof. 2 (Negocios permitidos) ProfId3LU=- ProfId4LU=- -ProfId5LU=EORI number +ProfId5LU=Número EORI ProfId6LU=- ProfId1MA=Id prof. 1 (R.C.) ProfId2MA=Id prof. 2 (Patente) @@ -225,13 +225,13 @@ ProfId1NL=Número KVK ProfId2NL=- ProfId3NL=- ProfId4NL=- -ProfId5NL=EORI number +ProfId5NL=Número EORI ProfId6NL=- -ProfId1PT=NIPC -ProfId2PT=Número segurança social -ProfId3PT=Número rexistro comercial -ProfId4PT=Conservatorio -ProfId5PT=EORI number +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 ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +255,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=Número EORI ProfId6RO=- ProfId1RU=Id prof. 1 (OGRN) ProfId2RU=Id prof. 2 (INN) @@ -302,7 +302,7 @@ AddContact=Crear contacto AddContactAddress=Crear contacto/enderezo EditContact=Editar contacto EditContactAddress=Editar contacto/enderezo -Contact=Contacto +Contact=Contacto/Enderezo Contacts=Contactos/Enderezos ContactId=Id contacto ContactsAddresses=Contactos/Enderezos @@ -359,7 +359,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=Workforce +Workforce=TRaballadores Staff=Empregados ProspectLevelShort=Potencial ProspectLevel=Cliente potencial @@ -412,8 +412,8 @@ DeliveryAddress=Enderezo de envío AddAddress=Engadir enderezo SupplierCategory=Categoría de provedor JuridicalStatus200=Independente -DeleteFile=Eliminación dun arquivo -ConfirmDeleteFile=¿Está certo de querer eliminar este arquivo? +DeleteFile=Eliminación dun ficheiro +ConfirmDeleteFile=¿Está certo de querer eliminar este ficheiro? AllocateCommercial=Asignado a comercial Organization=Organización FiscalYearInformation=Ano fiscal @@ -426,7 +426,7 @@ SocialNetworksInstagramURL=Instagram URL SocialNetworksYoutubeURL=Youtube URL SocialNetworksGithubURL=Github URL YouMustAssignUserMailFirst=Primeiro tes que asignar un e-mail para este usuario para poder engadilo en notificaciónss de e-mail. -YouMustCreateContactFirst=Para poder engadir notificaciones por e-mail, primeiro tes que definir contactos con e-mails válidos para terceiros +YouMustCreateContactFirst=Para poder engadir notificacións por e-mail, primeiro hai que definir contactos con e-mails válidos para terceiros ListSuppliersShort=Listaxe de provedores ListProspectsShort=Listaxe de clientes potenciais ListCustomersShort=Listaxe de clientes @@ -462,8 +462,8 @@ PaymentTermsSupplier=Termos de pagamento - Provedor PaymentTypeBoth=Tipo de pagamento - Cliente e Provedor MulticurrencyUsed=Usa MultiMoeda MulticurrencyCurrency=Moeda -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=Europa (EEC) +RestOfEurope=Resto de Europa (EEC) +OutOfEurope=Fora de Europa (EEC) +CurrentOutstandingBillLate=Factura actual pendente atrasada +BecarefullChangeThirdpartyBeforeAddProductToInvoice=Ter coidado, dependendo da configuración do prezo do produto, debería mudarse o terceiro antes de engadir o produto ao TPV. diff --git a/htdocs/langs/gl_ES/compta.lang b/htdocs/langs/gl_ES/compta.lang index 872ffd25c6e..92a135523c0 100644 --- a/htdocs/langs/gl_ES/compta.lang +++ b/htdocs/langs/gl_ES/compta.lang @@ -1,20 +1,20 @@ # 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=Config. -RemainingAmountPayment=Amount payment remaining: +MenuFinancial=Financieira +TaxModuleSetupToModifyRules=Ir á <a href="%s">configuración do módulo de impostos</a> para modificar as regras de cálculo +TaxModuleSetupToModifyRulesLT=Ir á <a href="%s">configuración da Empresa</a> para modificar as regras de cálculo +OptionMode=Opción de contabilidade +OptionModeTrue=Opción Ingresos-Gastos +OptionModeVirtual=Opción Créditos-Débedas +OptionModeTrueDesc=Neste contexto, o volume de negocio calcúlase sobre pagamentos (data dos pagamentos). A validez das cifras só se asegura se se analiza a contabilidade a través da entrada/saída das contas mediante facturas. +OptionModeVirtualDesc=Neste contexto, o volume de negocio calcúlase sobre facturas (data de validación). Cando se paguen estas facturas, xa sexan pagadas ou non, aparecen na saída do volume de negocio. +FeatureIsSupportedInInOutModeOnly=Función só dispoñible no modo de contabilidade DEBEDAS DE CRÉDITOS (Ver configuración do módulo de contabilidade) +VATReportBuildWithOptionDefinedInModule=As cantidades que se amosan aquí calcúlanse empregando regras definidas pola configuración do módulo Tributario. +LTReportBuildWithOptionDefinedInModule=As cantidades que se amosan aquí calcúlanse empregando regras definidas pola configuración da empresa. +Param=Configuración. +RemainingAmountPayment=Pagamento da cantidade restante: Account=Conta -Accountparent=Conta pai -Accountsparent=Contas pai +Accountparent=Conta principal +Accountsparent=Contas principais Income=Ingresos Outcome=Gastos MenuReportInOut=Ingresos / Gastos @@ -30,34 +30,34 @@ Balance=Saldo Debit=Debe Credit=Haber Piece=Doc. contabilidade -AmountHTVATRealReceived=Total repercutido -AmountHTVATRealPaid=Total xa pago +AmountHTVATRealReceived=Neto repercutido +AmountHTVATRealPaid=Neto xa pago VATToPay=Vendas IVE VATReceived=IVE repercutido VATToCollect=IVE compras VATSummary=Balance de IVE mensual VATBalance=Balance de IVE -VATPaid=Pagamento de IVE -LT1Summary=Resumo RE -LT2Summary=Resumo de IRPF +VATPaid=IVE pagado +LT1Summary=Resumo do imposto 2 RE +LT2Summary=Resumo do imposto 3 IRPF LT1SummaryES=Balance de RE LT2SummaryES=Balance de IRPF LT1SummaryIN=Balance CGST LT2SummaryIN=Balance SGST -LT1Paid=Pagamentos de IRPF -LT2Paid=Pagamentos de IRPF +LT1Paid=Imposto 2 xa pago RE +LT2Paid=Imposto 3 xa pago IRPF LT1PaidES=RE xa pago LT2PaidES=IRPF xa pago LT1PaidIN=xa pago CGST LT2PaidIN=xa pago SGST -LT1Customer=Vendas RE -LT1Supplier=Compras RE +LT1Customer=Imposto 2 vendas RE +LT1Supplier=Imposto 2 compras RE LT1CustomerES=Vendas RE LT1SupplierES=Compras RE LT1CustomerIN=Vendas CGST LT1SupplierIN=Compras CGST -LT2Customer=Vendas IRPF -LT2Supplier=Compras IRPF +LT2Customer=Imposto 3 vendas IRPF +LT2Supplier=Imposto 3 compras IRPF LT2CustomerES=IRPF vendas LT2SupplierES=IRPF compras LT2CustomerIN=Vendas SGST @@ -69,7 +69,7 @@ SocialContribution=Impostos sociais ou fiscais SocialContributions=Impostos sociais ou fiscais SocialContributionsDeductibles=Impostos sociais ou fiscais deducibles SocialContributionsNondeductibles=Impostos sociais ou fiscais non deducibles -DateOfSocialContribution=Date of social or fiscal tax +DateOfSocialContribution=Data do imposto social ou fiscal LabelContrib=Etiqueta de contribución TypeContrib=Tipo de contribución MenuSpecialExpenses=Pagamentos especiais @@ -90,12 +90,12 @@ ListOfCustomerPayments=Listaxe de pagamentos de clientes ListOfSupplierPayments=Listaxe de pagamentos a provedores DateStartPeriod=Data inicio período DateEndPeriod=Data final período -newLT1Payment=Novo pagamento de RE -newLT2Payment=Novo pagamento de IRPF -LT1Payment=Pagamento de RE -LT1Payments=Pagamentos RE -LT2Payment=Pagamento de IRPF -LT2Payments=Pagamentos IRPF +newLT1Payment=Novo pagamento taxa 2 RE +newLT2Payment=Novo pagamento taxa 3 IRPF +LT1Payment=Pagamento taxa 2 RE +LT1Payments=Pagamentos taxa 2 RE +LT2Payment=Pagamento taxa 3 IRPF +LT2Payments=Pagamentos taxa 3 IRPF newLT1PaymentES=Novo pagamento de RE newLT2PaymentES=Novo pagamento de IRPF LT1PaymentES=Pagamento de RE @@ -111,7 +111,7 @@ Refund=Reembolso SocialContributionsPayments=Pagamentos de taxas sociais/fiscais ShowVatPayment=Consultar pagamentos de IVE TotalToPay=Total a pagar -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=¿Está certo de querer eliminar este pagamento 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>. -CalcModeDebt=Análise de facturas rexistradas incluidas as aínda non contabilizadas no Libro Maior. +CalcModeDebt=Análise de documentos rexistrados coñecidos aínda que polo de agora non se contabilicen no Libro Maior. CalcModeEngagement=Análise dos pagamentos rexistrados, incluidos os aínda non contabilizados no Libro Maior. CalcModeBookkeeping=Análise dos datos rexistrados no Libro Maior CalcModeLT1= Modo <b>%sRE facturas a clientes - facturas de provedores%s</b> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Resumo anual do balance de ingresos e gastos AnnualByCompanies=Balance de ingresos e gastos, por grupos de conta predefinidos AnnualByCompaniesDueDebtMode=Balance de ingresos e gastos, desglosado por terceiros, en modo<b>%sCréditos-Débedas%s</b> coñecida como <b>contabilidade de compromiso</b>. AnnualByCompaniesInputOutputMode=Balance de ingresos e gastos, desglosado por terceiros, en modo <b>%sIngresos-Gastos%s</b> coñecido como <b>contabilidad de caixa</b>. -SeeReportInInputOutputMode=Consulte %sanálise de pagamentos%s para obter un cálculo dos pagamentos efectuados, incluso se non foron contabilizados no Libro Maior. -SeeReportInDueDebtMode=Consulte %sanálise de facturas %s para un cálculo baseado en facturas rexistradas coñecidas, incluso se aínda non foron contabilizadas no Libro Maior. -SeeReportInBookkeepingMode=Consulte el <b>%sInforme de facturación%s</b> para realizar un cálculo na <b>Taboa Libro maior</b> +SeeReportInInputOutputMode=Vexa <b> %s análise do dos pagos %s</b> para un cálculo baseado en <b> pagos rexistrados</b> realizados aínda que non se contabilicen no Libro Maior +SeeReportInDueDebtMode=Vexa o <b>%s de análise de documentos gardados %s</b> para un cálculo baseado en coñecidos <b> documentos rexistrados</b> aínda que non se contabilicen no Libro Maior +SeeReportInBookkeepingMode=Vexa o <b>%s análise da táboa de libros de contabilidade %s</b> para un informe baseado na <b> táboa contable de Libro Maior</b> RulesAmountWithTaxIncluded=- Os importes amosados son con todos os impostos incluidos. RulesResultDue=- Incluidas as facturas pendentes, os gastos, o IVE, as doacións pagadas ou non. También inclúe os salarios xa pagos.<br>- Baseado na data da validación das facturas e IVE e na data de vencemento ds gastos. Para os salarios definidos co módulo de Salarios, é usada a data de valor do pagamento. RulesResultInOut=- Inclúe os pagamentos realizados sobre as facturas, os gastos e o IVE. <br>- Basado nas datas de pagamento das facturas, gastos e IVE. A data de doación para as doacións @@ -169,37 +169,40 @@ RulesResultBookkeepingPersonalized=Amosa un rexistro no Libro Maior con contas c SeePageForSetup=Vexa o menú <a href="%s">%s</a> para configuralo DepositsAreNotIncluded=- As facturas de anticipo non están incluidas DepositsAreIncluded=- As facturas de anticipo están incluidas -LT1ReportByCustomers=Informe por terceiro do RE -LT2ReportByCustomers=Informe por terceiro do IRPF +LT1ReportByMonth=Taxa 2 informe por mes +LT2ReportByMonth=Taxa 3 informe por mes +LT1ReportByCustomers=Informe do imposto 2 RE por terceiro +LT2ReportByCustomers=Informe do imposto 3 IRPF por terceiro LT1ReportByCustomersES=Informe de RE por terceiro LT2ReportByCustomersES=Informe de IRPF por terceiro VATReport=Informe IVE VATReportByPeriods=Informe de IVE por período +VATReportByMonth=Informe do imposto sobre a venda por mes VATReportByRates=Informe de impostos por taxa VATReportByThirdParties=Informe de impostos por terceiros VATReportByCustomers=Informe IVE por cliente VATReportByCustomersInInputOutputMode=Informe por cliente do IVE repercutido e soportado VATReportByQuartersInInputOutputMode=Informe por taxa do IVE repercutido e soportado -LT1ReportByQuarters=Informe de IRPF por taxa -LT2ReportByQuarters=Informe de IRPF por taxa +LT1ReportByQuarters=Informe do imposto 2 IRPF por taxa +LT2ReportByQuarters=Informe do imposto 3 IRPF por taxa LT1ReportByQuartersES=Informe de RE por taxa LT2ReportByQuartersES=Informe de IRPF por taxa SeeVATReportInInputOutputMode=Ver o informe <b>%sIVA pagado%s</b> para un modo de cálculo estandard SeeVATReportInDueDebtMode=Ver o informe <b>%sIVA debido%s</b> para un modo de cálculo coa opción sobre o debido -RulesVATInServices=- For services, the report includes the VAT regulations actually received or issued on the basis of the date of payment. -RulesVATInProducts=- For material assets, the report includes the VAT received or issued on the basis of the date of payment. -RulesVATDueServices=- For services, the report includes VAT invoices due, paid or not, based on the invoice date. -RulesVATDueProducts=- For material assets, the report includes the VAT invoices, based on the invoice date. -OptionVatInfoModuleComptabilite=Note: For material assets, it should use the date of delivery to be more fair. +RulesVATInServices=- Para os servizos, o informe inclúe a normativa do IVE realmente recibida ou emitida en función da data do pagamento. +RulesVATInProducts=- Para os activos materiais, o informe inclúe o IVE recibido ou emitido en función da data do pagamento. +RulesVATDueServices=- Para os servizos, o informe inclúe facturas de IVE vencidas, pagadas ou non, en función da data da factura. +RulesVATDueProducts=- Para os activos materiais, o informe inclúe as facturas do IVE, en función da data da factura. +OptionVatInfoModuleComptabilite=Nota: para os activos materiais, debe usar a data de entrega para estar máis axustado ThisIsAnEstimatedValue=Esta é unha vista previa, basaeda en eventos de negocios e non na taboa de contabilidade final, polo que os resultados finais poden diferir destos valores de vista previa PercentOfInvoice=%%/factura NotUsedForGoods=Non utilizado para os bens ProposalStats=Estatísticas de orzamentos -OrderStats=Estatísticas de pedidos +OrderStats=Estatísticas de pedimentos InvoiceStats=Estatísticas de facturas -Dispatch=Desglose -Dispatched=Contabilizadas -ToDispatch=A contabilizar +Dispatch=Enviando +Dispatched=Enviado +ToDispatch=A enviar ThirdPartyMustBeEditAsCustomer=O terceiro debe estar definido como cliente SellsJournal=Diario de vendas PurchasesJournal=Diario de compras @@ -214,35 +217,35 @@ Pcg_subtype=Subtipo de conta InvoiceLinesToDispatch=Líñas de facturas a contabilizar ByProductsAndServices=Por produtos e servizos RefExt=Ref. externa -ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". -LinkedOrder=Vincular a pedido -Mode1=Method 1 -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. +ToCreateAPredefinedInvoice=Para crear unha factura modelo, cree unha factura estándar e, sen validala, prema nos botóns "%s". +LinkedOrder=Ligar a pedimento +Mode1=Método 1 +Mode2=Método 2 +CalculationRuleDesc=Para calcular o IVE total, hai dous métodos: <br> O método 1 é redondear o IVE en cada liña e logo sumalos.<br> O método 2 suma todos os IVE en cada liña e despois redondea o resultado.<br> O modo predeterminado é o modo <b>%s</b> +CalculationRuleDescSupplier=Segundo o provedor, escolla o método axeitado para aplicar a mesma regra de cálculo e obter o mesmo resultado esperado polo seu provedor. +TurnoverPerProductInCommitmentAccountingNotRelevant=O informe do volume de negocio recollido por produto non está dispoñible. Este informe só está dispoñible para o volume de negocio facturado. +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=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. +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_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 CloneTaxForNextMonth=Clonarla para o próximo mes -SimpleReport=informe simple +SimpleReport=Informe simple AddExtraReport=Informes adicionais (engade informe de clientes extranxeiros e locais) OtherCountriesCustomersReport=Informe de clientes extranxeiros -BasedOnTwoFirstLettersOfVATNumberBeingDifferentFromYourCompanyCountry=Based on the two first letters of the VAT number being different from your own company's country code -SameCountryCustomersWithVAT=National customers report -BasedOnTwoFirstLettersOfVATNumberBeingTheSameAsYourCompanyCountry=Based on the two first letters of the VAT number being the same as your own company's country code +BasedOnTwoFirstLettersOfVATNumberBeingDifferentFromYourCompanyCountry=Baseado en que as dúas primeiras letras do número de IVE son diferentes do código de país da súa propia empresa +SameCountryCustomersWithVAT=Informe de clientes estatais +BasedOnTwoFirstLettersOfVATNumberBeingTheSameAsYourCompanyCountry=Baseado en que as dúas primeiras letras do número de IVE son as mesmas que o código de país da súa propia empresa LinkedFichinter=Ligar a unha intervención ImportDataset_tax_contrib=Impostos sociais/fiscais ImportDataset_tax_vat=Pagamentos IVE -ErrorBankAccountNotFound=Error: Conta bancaria non atopada +ErrorBankAccountNotFound=Erro: Conta bancaria non atopada FiscalPeriod=Período contable ListSocialContributionAssociatedProject=Listaxe de contribucións sociais asociadas ao proxecto DeleteFromCat=Eliminar do grupo de contabilidade @@ -256,12 +259,12 @@ TurnoverbyVatrate=Volume de vendas emitidas por tipo de imposto TurnoverCollectedbyVatrate=Volume de vendas cobradas por tipo de imposto PurchasebyVatrate=Compra por taxa de impostos LabelToShow=Etiqueta curta -PurchaseTurnover=Purchase turnover -PurchaseTurnoverCollected=Purchase turnover collected -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=Volume de compras +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. +ReportPurchaseTurnover=Volume compras facturadas +ReportPurchaseTurnoverCollected=Volume de compras abonadas +IncludeVarpaysInResults = Inclúe varios pagos en informes +IncludeLoansInResults = Inclúe prestamos en informes diff --git a/htdocs/langs/gl_ES/contracts.lang b/htdocs/langs/gl_ES/contracts.lang index 698aa2ad63f..e222030e8ab 100644 --- a/htdocs/langs/gl_ES/contracts.lang +++ b/htdocs/langs/gl_ES/contracts.lang @@ -16,7 +16,7 @@ ServiceStatusLateShort=Expirado ServiceStatusClosed=Pechado ShowContractOfService=Amosar contrato de servizos Contracts=Contratos -ContractsSubscriptions=Contratos/Suscricións +ContractsSubscriptions=Contratos/Subscricións ContractsAndLine=Contratos e liñas de contratos Contract=Contrato ContractLine=Liña de contrato @@ -28,7 +28,7 @@ MenuRunningServices=Servizos activos MenuExpiredServices=Servizos expirados MenuClosedServices=Servizos pechados NewContract=Novo contrato -NewContractSubscription=New contract or subscription +NewContractSubscription=Novo contrato/subscrición AddContract=Crear contrato DeleteAContract=Eliminar un contrato ActivateAllOnContract=Activar todos os servizos @@ -49,13 +49,13 @@ ListOfInactiveServices=Listaxe dos servizos inactivos ListOfExpiredServices=Listaxe dos servizos activos expirados ListOfClosedServices=Listaxe dos servizos pechados ListOfRunningServices=Listaxe de servizos activos -NotActivatedServices=Inactive services (among validated contracts) +NotActivatedServices=Servizos inactivos (entre contratos validados) BoardNotActivatedServices=Servizos a activar entre os contratos validados BoardNotActivatedServicesShort=Servizos a activar LastContracts=Últimos %s contratos LastModifiedServices=Últimos %s servizos modificados -ContractStartDate=Data de inicio -ContractEndDate=Data de fin +ContractStartDate=Data inicio +ContractEndDate=Data finalización DateStartPlanned=Data prevista posta en servizo DateStartPlannedShort=Data inicio prevista DateEndPlanned=Data prevista fin do servizo @@ -71,14 +71,14 @@ BoardExpiredServices=Servicios expirados BoardExpiredServicesShort=Servizos expirados ServiceStatus=Estado do servizo DraftContracts=Contratos borrador -CloseRefusedBecauseOneServiceActive=Contract can't be closed as there is at least one open service on it +CloseRefusedBecauseOneServiceActive=O contrato non pode ser pechado, hai polo menos un servizo aberto. ActivateAllContracts=Activar todas as liñas do contrato CloseAllContracts=Pechar todos as liñas do contrato DeleteContractLine=Eliminar liña de contrato ConfirmDeleteContractLine=¿Está certo de querer eliminar esta líña do contrato de servizo? -MoveToAnotherContract=Mover o servizo a outro contrato deste tercero. -ConfirmMoveToAnotherContract=He elegido el contrato y confirmo el cambio de servizo en el presente contrato. -ConfirmMoveToAnotherContractQuestion=Elija cualquier otro contrato del mismo tercero, ¿desea mover este servizo? +MoveToAnotherContract=Mover o servizo a outro contrato deste terceiro. +ConfirmMoveToAnotherContract=Escollin o contrato e confirmo o cambio de servizo no presente contrato. +ConfirmMoveToAnotherContractQuestion=Escolla calquera outro contrato do mesmo terceiro, ¿desexa mover este servizo? PaymentRenewContractId=Renovación servizo (número %s) ExpiredSince=Expirado dende o NoExpiredServices=Sen servizos activos expirados @@ -88,7 +88,7 @@ ListOfServicesToExpire=Listaxe de servizos activos a expirar NoteListOfYourExpiredServices=Esta listaxe só contén os servizos de contratos de terceiros dos que vostede é comercial StandardContractsTemplate=Modelo de contrato estandar ContactNameAndSignature=Para %s, nome e sinatura: -OnlyLinesWithTypeServiceAreUsed=Solo serán clonadas as liñas dotipo "Servizo" +OnlyLinesWithTypeServiceAreUsed=Só serán clonadas as liñas do tipo "Servizo" ConfirmCloneContract=¿Está certo de querer copiar o contrato <b>%s</b>? LowerDateEndPlannedShort=A data de finalización planificada é anterior aos servizos activos SendContractRef=Información do contrato __REF__ diff --git a/htdocs/langs/gl_ES/cron.lang b/htdocs/langs/gl_ES/cron.lang index 1a8a69c0585..b7dafdc697f 100644 --- a/htdocs/langs/gl_ES/cron.lang +++ b/htdocs/langs/gl_ES/cron.lang @@ -1,84 +1,91 @@ # Dolibarr language file - Source file is en_US - cron # About page # Right -Permission23101 = Consultar. Traballo programado -Permission23102 = Crear/actualizar. Traballo programado -Permission23103 = Borrar. Traballo Programado -Permission23104 = Executar. Traballo programado +Permission23101 = Consultar. tarefa programada +Permission23102 = Crear/actualizar. tarefa programada +Permission23103 = Borrar tarefa programada +Permission23104 = Executar tarefa programada # Admin -CronSetup=Scheduled job management setup -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=Or to check and launch a specific job -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 -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 +CronSetup=Configuración da xestión de tarefas programadas +URLToLaunchCronJobs=URL para comprobar e iniciar tarefas programadas de cron desde un navegador +OrToLaunchASpecificJob=Ou para comprobar e iniciar unha tarefa específica desde un navegador +KeyForCronAccess=Chave para a URL para lanzar traballos cron +FileToLaunchCronJobs=Liña de comandos para comprobar e iniciar tarefas cron +CronExplainHowToRunUnix=En entornos Unix debería empregar a seguinte entrada crontab para executar a liña de comandos cada 5 minutos +CronExplainHowToRunWin=En entorno de Microsoft (tm) Windows pode usar as ferramentas de tarefas programadas para executar a liña de comandos cada 5 minutos +CronMethodDoesNotExists=A clase %s non contén ningún método %s +CronMethodNotAllowed=O método %s da clase %s está na listaxe negra de métodos prohibidos +CronJobDefDesc=Os perfís de tarefas cron defínense no ficheiro descritor do módulo. Cando o módulo está activado, carganse e están dispoñibles para que poida administrar os traballos dende o menú de ferramentas de administración %s. +CronJobProfiles=Listaxe de perfís de tarefas cron predefinidas # Menu -EnabledAndDisabled=Enabled and disabled +EnabledAndDisabled=Activado e desactivado # Page list -CronLastOutput=Latest run output -CronLastResult=Latest result code -CronCommand=Command +CronLastOutput=Última saída executada +CronLastResult=Código de resultado máis recente +CronCommand=Comando CronList=Tarefas programadas -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 +CronDelete=Eliminar tarefas programadas +CronConfirmDelete=Está certo de querer eliminar esta tarefa programada? +CronExecute=Iniciar tarefa programada +CronConfirmExecute=Está certo de querer executar estas tarefas programadas agora? +CronInfo=O módulo de tarefas programadas permite programar tarefas para executalas automaticamente. As tarefas tamén se poden iniciar manualmente. +CronTask=Tarefa CronNone=Ningún -CronDtStart=Not before -CronDtEnd=Not after -CronDtNextLaunch=Next execution -CronDtLastLaunch=Start date of latest execution -CronDtLastResult=End date of latest execution +CronDtStart=Non antes +CronDtEnd=Non despois +CronDtNextLaunch=Próxima execución +CronDtLastLaunch=Data de inicio da última execución +CronDtLastResult=Data de finalización da última execución CronFrequency=Frecuencia -CronClass=Class +CronClass=Clase CronMethod=Método -CronModule=Module -CronNoJobs=No jobs registered +CronModule=Módulo +CronNoJobs=Non hai tarefa rexistrada CronPriority=Prioridade CronLabel=Etiqueta -CronNbRun=Number of launches -CronMaxRun=Maximum number of launches -CronEach=Every -JobFinished=Job launched and finished +CronNbRun=Número de lanzamentos +CronMaxRun=Número máximo de lanzamentos +CronEach=Todo +JobFinished=Tarefa iniciada e finalizada +Scheduled=Programada #Page card -CronAdd= Add jobs -CronEvery=Execute job each -CronObject=Instance/Object to create +CronAdd= Axuntar tarefas +CronEvery=Executar cada tarefa +CronObject=Instancia/obxecto a crear CronArgs=Parámetros -CronSaveSucess=Save successfully +CronSaveSucess=Gardar correctamente CronNote=Comentario -CronFieldMandatory=Fields %s is mandatory -CronErrEndDateStartDt=End date cannot be before start date -StatusAtInstall=Status at module installation -CronStatusActiveBtn=Activo +CronFieldMandatory=Os campos %s son obrigados +CronErrEndDateStartDt=A data de finalización non pode ser anterior á data de inicio +StatusAtInstall=Estado da instalación do módulo +CronStatusActiveBtn=Horario CronStatusInactiveBtn=Desactivar -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 +CronTaskInactive=A tarefa está desactivada +CronId=Id +CronClassFile=Nome do ficheiro coa clase +CronModuleHelp=Nome do directorio do módulo Dolibarr (tamén funciona con módulo Dolibarr externo). <BR> Por exemplo, para chamar ao método fetch do obxecto Dolibarr Product /htdocs/<u>product</u>/class/product.class.php, o valor do módulo é <br><i>product</i> +CronClassFileHelp=A ruta relativa e o nome do ficheiro a cargar (a ruta é relativa ao directorio raíz do servidor web). <BR> Por exemplo, para chamar ao método de recuperación do obxecto Dolibarr Product htdocs/product/class/<u>product.class.php</u>, o valor do nome do ficheiro de clase é <br><i>product/class/product.class.php</i> +CronObjectHelp=O nome do obxecto a cargar. <BR>Por exemplo, para chamar ao método de recuperación do obxecto do produto Dolibarr /htdocs/product/class/product.class.php, o valor do nome do ficheiro de clase é <br><i> Product</i> +CronMethodHelp=O nome do obxecto a lanzar. <BR>Por exemplo, para chamar ao método de recuperación do obxecto do produto Dolibarr /htdocs/product/class/product.class.php, o valor para o método é <br><i>fetch</i> +CronArgsHelp=Os argumentos do método. <BR> Por exemplo, para chamar ao método de obtención do obxecto do produto Dolibarr /htdocs/product/class/product.class.php, o valor dos parámetros pode ser <br><i>0, ProductRef</i> +CronCommandHelp=A liña de comandos do sistema para executar +CronCreateJob=Crear unha nova Tarefa Programada CronFrom=De # 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 +CronType=Tipo de tarefa +CronType_method=Método de chamada dunha clase PHP +CronType_command=Comando Shell +CronCannotLoadClass=Non se pode cargar o ficheiro de clase %s (para usar a clase %s) +CronCannotLoadObject=Cargouse o ficheiro de clase %s, pero o obxecto %s non se atopou nel +UseMenuModuleToolsToAddCronJobs=Vaia ao menú "<a href="%s">Home - Ferramentas de administración - Traballos programados</a>" para ver e editar os traballos programados. +JobDisabled=Tarefa deshabilitada +MakeLocalDatabaseDumpShort=Copia local da base de datos +MakeLocalDatabaseDump=Cree un volcado da base de datos local. Os parámetros son: compresión ('gz' ou 'bz' ou 'none'), tipo de copia de seguridade ('mysql', 'pgsql', 'auto'), 1, 'auto' ou nome de ficheiro para construír, número de ficheiros de copia de seguridade que gardar +WarningCronDelayed=Atención, para fins de rendemento, calquera que sexa a próxima data de execución das tarefas habilitadas, é posible que as súas tarefas se retrasen ata un máximo de %s horas antes de executalos. +DATAPOLICYJob=Limpar datos e anonimizar +JobXMustBeEnabled=Tarefa %s debe ser activada +# Cron Boxes +LastExecutedScheduledJob=Última tarefa programad executada +NextScheduledJobExecute=Próxima tarefa programada para executar +NumberScheduledJobError=Número de tarefas programadas por erro diff --git a/htdocs/langs/gl_ES/deliveries.lang b/htdocs/langs/gl_ES/deliveries.lang index b7e846dd4c6..49996ef672a 100644 --- a/htdocs/langs/gl_ES/deliveries.lang +++ b/htdocs/langs/gl_ES/deliveries.lang @@ -27,5 +27,6 @@ Recipient=Destinatario ErrorStockIsNotEnough=Non hai suficiente stock Shippable=Enviable NonShippable=Non enviable +ShowShippableStatus=Amosar estado de envío ShowReceiving=Mostrar nota de recepción -NonExistentOrder=Pedido inexistente +NonExistentOrder=Pedimento inexistente diff --git a/htdocs/langs/gl_ES/donations.lang b/htdocs/langs/gl_ES/donations.lang index c6aedceba3e..fd3cc0dbfdd 100644 --- a/htdocs/langs/gl_ES/donations.lang +++ b/htdocs/langs/gl_ES/donations.lang @@ -9,8 +9,8 @@ DeleteADonation=Eliminar unha doación/subvención ConfirmDeleteADonation=¿Esta certo de querer eliminar esta doación/subvención? PublicDonation=Doación/Subvención Pública DonationsArea=Área de doacións/subvencións -DonationStatusPromiseNotValidated=Promesa non validada -DonationStatusPromiseValidated=Promesa validada +DonationStatusPromiseNotValidated=Doación/Subvención non validada +DonationStatusPromiseValidated=Doación/Subvención validada DonationStatusPaid=Doación/Subvención pagada DonationStatusPromiseNotValidatedShort=Non validada DonationStatusPromiseValidatedShort=Validada @@ -18,7 +18,7 @@ DonationStatusPaidShort=Pagada DonationTitle=Recibo de doación/subvención DonationDate=Data de doación/subvención DonationDatePayment=Data de pago -ValidPromess=Validar promesa +ValidPromess=Validar doación/subvención DonationReceipt=Recibo de doación/subvención DonationsModels=Modelo de documento de recepción de doación/subvención LastModifiedDonations=Últimas %s doacións modificadas diff --git a/htdocs/langs/gl_ES/ecm.lang b/htdocs/langs/gl_ES/ecm.lang index ac1f38369d5..eb6c9efa259 100644 --- a/htdocs/langs/gl_ES/ecm.lang +++ b/htdocs/langs/gl_ES/ecm.lang @@ -15,7 +15,7 @@ ECMNbOfSubDir=Número de sub-directories ECMNbOfFilesInSubDir=Número de ficheiros en sub-directories ECMCreationUser=Creador ECMArea=Área MS/ECM -ECMAreaDesc=The DMS/ECM (Document Management System / Electronic Content Management) area allows you to save, share and search quickly all kind of documents in Dolibarr. +ECMAreaDesc=O área DMS / ECM (Document Management System / Electronic Content Management) permítelle gardar, compartir e buscar rapidamente todo tipo de documentos en Dolibarr. ECMAreaDesc2=Pode crear directorios manuais e axuntar os documentos<br>Os directorios automáticos son cobertos automáticamente ao engadir un documento nunha ficha. ECMSectionWasRemoved=O directorio <b>%s</b> foi eliminado ECMSectionWasCreated=O directorio <b> %s </b> foi creado. @@ -23,7 +23,7 @@ ECMSearchByKeywords=Buscar por palabras clave ECMSearchByEntity=Buscar por obxecto ECMSectionOfDocuments=Directorios de documentos ECMTypeAuto=Automático -ECMDocsBy=Documents linked to %s +ECMDocsBy=Documentos ligados a %s ECMNoDirectoryYet=Non foi creado o directorio ShowECMSection=Amosar directorio DeleteSection=Eliminación directorio @@ -38,6 +38,6 @@ ReSyncListOfDir=Resincronizar a listaxe de directorios HashOfFileContent=Hash do contido do ficheiro NoDirectoriesFound=Non foron atopados directorios FileNotYetIndexedInDatabase=Ficheiro aínda non indexado na base de datos (tente voltar cargalo) -ExtraFieldsEcmFiles=Extrafields Ecm Files -ExtraFieldsEcmDirectories=Extrafields Ecm Directories -ECMSetup=ECM Setup +ExtraFieldsEcmFiles=Extrafields en ficheiros ECM +ExtraFieldsEcmDirectories=Extrafields en directorios ECM +ECMSetup=Configuración ECM diff --git a/htdocs/langs/gl_ES/errors.lang b/htdocs/langs/gl_ES/errors.lang index 893f4a35b65..4e0a15fee05 100644 --- a/htdocs/langs/gl_ES/errors.lang +++ b/htdocs/langs/gl_ES/errors.lang @@ -1,272 +1,289 @@ # Dolibarr language file - Source file is en_US - errors # No errors -NoErrorCommitIsDone=No error, we commit +NoErrorCommitIsDone=Sen erro, é válido # Errors -ErrorButCommitIsDone=Errors found but we validate despite this -ErrorBadEMail=Email %s is wrong -ErrorBadUrl=Url %s is wrong -ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing. -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 -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. -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=Ref used for creation 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 virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. -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> +ErrorButCommitIsDone=Atopáronse erros pero validamos a pesar diso +ErrorBadEMail=Correo electrónico %s incorrecto +ErrorBadMXDomain=Correo electrónico %s parece incorrecto (o dominio non ten un rexistro MX válido) +ErrorBadUrl=Url %s incorrecta +ErrorBadValueForParamNotAString=Valor incorrecto para o seu parámetro. Xeralmente aparece cando falta a tradución +ErrorRefAlreadyExists=A referencia <b>%s</b> xa existe +ErrorLoginAlreadyExists=O login %s xa existe. +ErrorGroupAlreadyExists=O grupo %s xa existe. +ErrorRecordNotFound=Rexistro non atopado +ErrorFailToCopyFile=Erro ao copiar o ficheiro '<b>%s</b>' en '<b>%s</b>'. +ErrorFailToCopyDir=Erro ao copiar o directorio '<b>%s</b>' en '<b>%s</b>'. +ErrorFailToRenameFile=Erro ao renomear o ficheiro '<b>%s</b>' a '<b>%s</b>'. +ErrorFailToDeleteFile=Erro ao eliminar o ficheiro '<b>%s</b>'. +ErrorFailToCreateFile=Erro ao crear o ficheiro '<b>%s</b>' +ErrorFailToRenameDir=Erro ao renomear o directorio '<b>%s</b>' a '<b>%s</b>'. +ErrorFailToCreateDir=Erro ao crear o directorio '<b>%s</b>' +ErrorFailToDeleteDir=Erro a eliminar o directorio '<b>%s</b>'. +ErrorFailToMakeReplacementInto=Erro ao facer a substitución no ficheiro '<b>%s</b>'. +ErrorFailToGenerateFile=Erro ao xerar o ficheiro '<b>%s</b>'. +ErrorThisContactIsAlreadyDefinedAsThisType=Este contacto xa está definido como contacto para este tipo. +ErrorCashAccountAcceptsOnlyCashMoney=Esta conta bancaria é de tipo caixa e só acepta pagos en efectivo. +ErrorFromToAccountsMustDiffers=A conta orixe e destino deben ser distintas. +ErrorBadThirdPartyName=Nome de terceiro incorrecto +ErrorProdIdIsMandatory=O %s é obrigado +ErrorBadCustomerCodeSyntax=A sintaxe do código cliente é incorrecta. +ErrorBadBarCodeSyntax=Sintaxe incorrecta do código de barras. Pode definir un tipo de código de barras incorrecto ou definir unha máscara de código de barras para a numeración que non coincide co valor escaneado. +ErrorCustomerCodeRequired=Código cliente obrigado +ErrorBarCodeRequired=Código de barras obrigado +ErrorCustomerCodeAlreadyUsed=Código de cliente xa utilizado +ErrorBarCodeAlreadyUsed=Código de barras xa utilizado +ErrorPrefixRequired=Prefixo obrigado +ErrorBadSupplierCodeSyntax=A sintaxe do código proveedor é incorrecta +ErrorSupplierCodeRequired=Código proveedor obrigado +ErrorSupplierCodeAlreadyUsed=Código de proveedor xa utilizado +ErrorBadParameters=Parámetros incorrectos +ErrorWrongParameters=Parámetros incorrectos +ErrorBadValueForParameter=valor '%s' incorrecto para o parámetro '%s' +ErrorBadImageFormat=O ficheiro de imaxe non ten un formato compatible (o seu PHP non admite funcións para converter imaxes deste formato) +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) +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 +ErrorFailedToCreateDir=Fallou a creación dun directorio. Comprobe que o usuario do servidor web ten permisos para escribir no directorio de documentos Dolibarr. Se o parámetro <b>safe_mode</b> está activado neste PHP, comprobe que os ficheiros php Dolibarr son propiedade do usuario (ou grupo) do servidor web. +ErrorNoMailDefinedForThisUser=Non existe enderezo de correo electrónico asignado a este usuario +ErrorSetupOfEmailsNotComplete=A configuración do correo electrónico non está rematada +ErrorFeatureNeedJavascript=Esta característica precisa que javascript estexa activado para funcionar. Cambie isto na configuración-visualización. +ErrorTopMenuMustHaveAParentWithId0=Un menú do tipo "Arriba" non pode ter un menú principal. Poña 0 no menú principal ou escolla un menú do tipo "Esquerda". +ErrorLeftMenuMustHaveAParentId=Un menú de tipo "esquerda" debe ter un identificador principal. +ErrorFileNotFound=Non se atopou o ficheiro <b>%s</b> (ruta incorrecta, permisos incorrectos ou acceso denegado polo PHP openbasedir ou parámetro safe_mode) +ErrorDirNotFound=Non se atopou o directorio <b>%s</b> (camiño incorrecto, permisos incorrectos ou acceso denegado polo PHP openbasedir ou parámetro safe_mode) +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. +ErrorPartialFile=Ficheiro non recibido completamente polo servidor. +ErrorNoTmpDir=Non existe o directorio temporal %s. +ErrorUploadBlockedByAddon=Subida bloqueada por un plugin PHP/Apache. +ErrorFileSizeTooLarge=O tamaño do ficheiro é grande de mais. +ErrorFieldTooLong=Campo %s e longo de mais. +ErrorSizeTooLongForIntType=Tamaño demasiado longo para o tipo int (máximo %s caracteres) +ErrorSizeTooLongForVarcharType=Tamaño demasiado longo para o tipo de cadea (máximo %s caracteres) +ErrorNoValueForSelectType=Pregase complete o valor da listaxe de selección +ErrorNoValueForCheckBoxType=Pregase complete o valor da listaxe de caixa de verificación +ErrorNoValueForRadioType=Pregase complete o valor da listaxe de radios +ErrorBadFormatValueList=O valor da listaxe non pode ter máis dunha coma: <u>%s</u>, pero precisa polo menos unha: chave, valor +ErrorFieldCanNotContainSpecialCharacters=O campo <b>%s</b> non debe conter caracteres especiais. +ErrorFieldCanNotContainSpecialNorUpperCharacters=O campo <b>%s</b> non debe conter caracteres especiais nin caracteres en maiúsculas e non pode conter só números. +ErrorFieldMustHaveXChar=O campo <b>%s</b> debe ter polo menos %s caracteres. +ErrorNoAccountancyModuleLoaded=Non hai ningún módulo de contabilidade activado +ErrorExportDuplicateProfil=Este nome de perfil xa existe para este conxunto de exportacións. +ErrorLDAPSetupNotComplete=A concordancia Dolibarr-LDAP non está completada. +ErrorLDAPMakeManualTest=Xerouse un ficheiro .ldif no directorio %s. Tente cargalo manualmente desde a liña de comandos para ter máis información sobre erros. +ErrorCantSaveADoneUserWithZeroPercentage=Non se pode gardar unha acción con "estado non iniciado" se o campo "feito por" tamén está cuberto. +ErrorRefAlreadyExists=A referencia <b>%s</b> xa existe +ErrorPleaseTypeBankTransactionReportName=Introduza o nome do extracto bancario onde se debe informar da entrada (Formato AAAAMM ou AAAAMMDD) +ErrorRecordHasChildren=Erro ao eliminar o rexistro xa que ten algúns rexistros fillos. +ErrorRecordHasAtLeastOneChildOfType=O obxecto ten polo menos un fillo do tipo %s +ErrorRecordIsUsedCantDelete=Non se pode eliminar o rexistro. Xa se usa ou está incluído noutro obxecto. +ErrorModuleRequireJavascript=Non se debe desactivar Javascript para que esta función sexa operativa. Para activar/desactivar Javascript, vaia ao menú Inicio->Configuración->Amosar. +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 > +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. +ErrorBadMask=Erro na máscara +ErrorBadMaskFailedToLocatePosOfSequence=Erro, máscara sen número de secuencia +ErrorBadMaskBadRazMonth=Erro, valor de restablecemento incorrecto +ErrorMaxNumberReachForThisMask=Número máximo alcanzado para esta máscara +ErrorCounterMustHaveMoreThan3Digits=O contador debe ter mais de 3 díxitos +ErrorSelectAtLeastOne=Erro. seleccione polo menos unha entrada. +ErrorDeleteNotPossibleLineIsConsolidated=Non é posible eliminar porque o rexistro está ligado a unha transacción bancaria conciliada +ErrorProdIdAlreadyExist=%s está asignado a outro terceiro +ErrorFailedToSendPassword=Erro ao enviar o contrasinal +ErrorFailedToLoadRSSFile=Non alcanza a fonte RSS. Tente engadir a constante MAIN_SIMPLEXMLLOAD_DEBUG se as mensaxes de erro non proporcionan información suficiente. +ErrorForbidden=Acceso denegado.<br> Intenta acceder a unha páxina, área ou función dun módulo desactivado ou sen estar nunha sesión autenticada ou que non está permitida ao seu usuario. +ErrorForbidden2=O seu administrador Dolibarr pode definir o permiso para este inicio de sesión no menú %s->%s. +ErrorForbidden3=Parece que Dolibarr non se usa a través dunha sesión autenticada. Bote unha ollada á documentación de configuración de Dolibarr para saber como xestionar as autenticacións (htaccess, mod_auth ou outro ...). +ErrorNoImagickReadimage=A clase Imagick non se atopa neste PHP. Non pode estar dispoñible ningunha vista previa. Os administradores poden desactivar esta pestana no menú Configuración-Amosar +ErrorRecordAlreadyExists=Rexistro xa existente +ErrorLabelAlreadyExists=Etiqueta xa existente +ErrorCantReadFile=Erro de lectura do ficheiro '%s' +ErrorCantReadDir=Error de lectura do directorio '%s' +ErrorBadLoginPassword=Valor incorrecto para o inicio de sesión ou o contrasinals +ErrorLoginDisabled=A súa conta foi descativada +ErrorFailedToRunExternalCommand=Non se puido executar o comando externo. Comprobe que está dispoñible e executable polo seu servidor PHP. Se PHP <b> Modo seguro</b>1 está habilitado, comprobe que o comando está dentro dun directorio definido polo parámetro <b>safe_mode_exec_dir</b>. +ErrorFailedToChangePassword=Erro ao cambiar o contrasinal +ErrorLoginDoesNotExists=Non foi posible atopar o usuario con inicio de sesión <b>%s</b>. +ErrorLoginHasNoEmail=Este usuario non ten enderezo de correo electrónico. Proceso abortado. +ErrorBadValueForCode=Valor incorrecto para o código de seguridade. Tenteo novamente cun novo valor ... +ErrorBothFieldCantBeNegative=Os campos %s e %s non poen ser negativos +ErrorFieldCantBeNegativeOnInvoice=O campo <strong>%s</strong> non pode ser negativo neste tipo de factura. Se precisa engadir unha liña de desconto, primeiro cree o desconto (a partir do campo '%s' na tarxeta de terceiros) e aplíqueo á factura. +ErrorLinesCantBeNegativeForOneVATRate=O total de liñas (neto de impostos) non pode ser negativo para unha determinada taxa de IVE non nula (Atopouse un total negativo para o tipo de IVE <b>%s</b>%%) +ErrorLinesCantBeNegativeOnDeposits=As liñas non poden ser negativas nun depósito. Terá problemas cando precise consumir o depósito na factura final se o fai. +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 +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 +ErrorPhpCurlNotInstalled=O PHP CURL non está instalado, isto é esencial para comunicarse con Paypal +ErrorFailedToAddToMailmanList=Erro ao engadir o rexistro %s á listaxe de Mailman %s ou á base de SPIP +ErrorFailedToRemoveToMailmanList=Erro ao eliminar o rexistro %s da listaxe de Mailman %s ou a base de SPIP +ErrorNewValueCantMatchOldValue=O novo valor non pode ser igual ao anterior +ErrorFailedToValidatePasswordReset=Non se puido resetear o contrasinal. Pode que o reseteo xa este feito (esta ligazón só se pode usar unha vez). Se non, tente reiniciar o proceso de reseteo. +ErrorToConnectToMysqlCheckInstance=Falla a conexión á base de datos. Comprobe que o servidor de base de datos está en execución (por exemplo, con mysql/mariadb, pode lanzalo desde a liña de comandos con 'sudo service mysql start'). +ErrorFailedToAddContact=Erro ao engadir o contacto +ErrorDateMustBeBeforeToday=A data debe ser inferior á de hoxe +ErrorDateMustBeInFuture=A data debe ser maior que a de hoxe +ErrorPaymentModeDefinedToWithoutSetup=Estableceuse un modo de pago para escribir %s pero a configuración da factura do módulo non se completou para definir a información que se amosará para este modo de pago. +ErrorPHPNeedModule=Erro, o seu PHP debe ter instalado o módulo <b>%s</b> para usar esta funcionalidade. +ErrorOpenIDSetupNotComplete=Estableceu a configuración do ficheiro Dolibarr para permitir a autenticación OpenID, pero a URL do servizo OpenID non está definida na constante %s +ErrorWarehouseMustDiffers=O almacén de orixe e destino deben de ser diferentes +ErrorBadFormat=O formato contén erros! +ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Erro, este membro aínda non está ligado a ningún terceiro. Ligue o membro a un terceiro existente ou cree un novo terceiro antes de crear a subscrición con factura. +ErrorThereIsSomeDeliveries=Erro, hai algunhas entregas ligadas a este envío. Rexeitouse a eliminación. +ErrorCantDeletePaymentReconciliated=Non se pode eliminar un pago que xerou unha entrada bancaria conciliada +ErrorCantDeletePaymentSharedWithPayedInvoice=Non se pode eliminar un pago compartido polo menos por unha factura co estado Pagado +ErrorPriceExpression1=Non se pode asignar á constante '%s' +ErrorPriceExpression2=Non se pode redefinir a función incorporada '%s' +ErrorPriceExpression3=Variable "%s" sen definir na definición da función +ErrorPriceExpression4=Carácter ilegal '%s' +ErrorPriceExpression5='%s' inesperado +ErrorPriceExpression6=Número incorrecto de argumentos (indicáronse %s, agardábase %s) +ErrorPriceExpression8=Operador inesperado '%s' +ErrorPriceExpression9=Ocorreu un erro inesperado +ErrorPriceExpression10=O operador '%s' carece de operando +ErrorPriceExpression11=Agardando '%s' +ErrorPriceExpression14=División por cero +ErrorPriceExpression17=Variable '%s' sen definir +ErrorPriceExpression19=Non se atopou a expresión +ErrorPriceExpression20=Expresión baleira +ErrorPriceExpression21=Resultado baleiro '%s' +ErrorPriceExpression22=Resultado negativo '%s' +ErrorPriceExpression23=Variable descoñecida ou non definida '%s' en %s +ErrorPriceExpression24=A variable '%s' existe pero non ten valor +ErrorPriceExpressionInternal=Erro interno '%s' +ErrorPriceExpressionUnknown=Erro descoñecido '%s' +ErrorSrcAndTargetWarehouseMustDiffers=Os almacéns de orixe e destino deben ser diferentes +ErrorTryToMakeMoveOnProductRequiringBatchData=Erro ao tentar facer un movemento de stock sen información de lote/serie, no produto '%s' que requiría información de lote/serie +ErrorCantSetReceptionToTotalDoneWithReceptionToApprove=Todas as recepcións rexistradas deben ser verificadas (aprobadas ou denegadas) antes de que se lle permita facer esta acción +ErrorCantSetReceptionToTotalDoneWithReceptionDenied=Todas as recepcións rexistradas deben verificarse (aprobarse) antes de que se lle permita facer esta acción +ErrorGlobalVariableUpdater0=Petición HTTP request falla co erro '%s' +ErrorGlobalVariableUpdater1=Formato JSON '%s' non válido +ErrorGlobalVariableUpdater2=Falta o parámetro '%s' +ErrorGlobalVariableUpdater3=Non se atoparon os datos solicitados no resultado +ErrorGlobalVariableUpdater4=Fallou o cliente SOAP co erro '%s' +ErrorGlobalVariableUpdater5=Non se seleccionou ningunha variable global +ErrorFieldMustBeANumeric=O campo <b>%s</b> debe ser un valor numérico +ErrorMandatoryParametersNotProvided=Non se proporcionan parámetro(s) obrigatorios +ErrorOppStatusRequiredIfAmount=Establecerá unha cantidade estimada para este cliente potencial. Entón tamén debe introducir o seu estado. +ErrorFailedToLoadModuleDescriptorForXXX=Erro ao cargar a clase do descritor do módulo para %s +ErrorBadDefinitionOfMenuArrayInModuleDescriptor=Mala definición do Menu Array na descrición do módulo (valor incorrecto para a chave fk_menu) +ErrorSavingChanges=Produciuse un erro ao gardar os cambios +ErrorWarehouseRequiredIntoShipmentLine=Requírese un almacén na liña para enviar +ErrorFileMustHaveFormat=O ficheiro debe ter o formato %s +ErrorFilenameCantStartWithDot=O nome do ficheiro non pode comezar cun "." +ErrorSupplierCountryIsNotDefined=O país deste provedor non está definido, corrixao na súa +ErrorsThirdpartyMerge=Non se puideron combinar os dous rexistros. Solicitude cancelada. +ErrorStockIsNotEnoughToAddProductOnOrder=Non hai suficiente stock de produto %s para engadilo a un novo pedido. +ErrorStockIsNotEnoughToAddProductOnInvoice=Non hai suficiente stock de produto %s para engadilo a unha nova factura. +ErrorStockIsNotEnoughToAddProductOnShipment=Non hai suficiente stock de produto %s para engadilo a un novo envío. +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 +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. +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. +ErrorMassValidationNotAllowedWhenStockIncreaseOnAction=A validación masiva non é posible cando se establece a opción de aumentar/diminuír o stock nesta acción (debe validalo un por un para que poida definir o almacén para aumentar/diminuír) +ErrorObjectMustHaveStatusDraftToBeValidated=O obxecto %s debe ter o estado 'Borrador' para ser validado. +ErrorObjectMustHaveLinesToBeValidated=O obxecto %s debe ter liñas para ser validado. +ErrorOnlyInvoiceValidatedCanBeSentInMassAction=Só se poden enviar facturas validadas mediante a acción masiva "Enviar por correo electrónico". +ErrorChooseBetweenFreeEntryOrPredefinedProduct=Debe escoller se o artigo é un produto predefinido ou non +ErrorDiscountLargerThanRemainToPaySplitItBefore=O desconto que intenta aplicar é maior do que queda para pagar. Dividir o desconto en 2 descontos menores antes. +ErrorFileNotFoundWithSharedLink=Non se atopou o ficheiro. Pode ser que se modificara a chave para compartir ou que se eliminou o ficheiro recentemente. +ErrorProductBarCodeAlreadyExists=O código de barras do produto %s xa existe noutra referencia de produto. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Teña conta tamén que o uso de kits para aumentar / diminuír automaticamente os subprodutos non é posible cando polo menos un subproduto (ou subproduto de subprodutos) precisa un número de serie / lote. +ErrorDescRequiredForFreeProductLines=A descrición é obrigada para as liñas con produto gratuíto +ErrorAPageWithThisNameOrAliasAlreadyExists=A páxina/contedor <strong>%s</strong> ten o mesmo nome ou alias alternativo que o que intenta empregar +ErrorDuringChartLoad=Erro ao cargar o plan de contabilidade. Se non se cargaron algunhas contas, aínda pode introducilas manualmente. +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:// +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. +ErrorObjectMustHaveStatusActiveToBeDisabled=Os obxectos deben ter o estado "Activo" para ser desactivados +ErrorObjectMustHaveStatusDraftOrDisabledToBeActivated=Os obxectos deben ter o estado "Borrador" ou "Desactivado" para ser habilitados +ErrorNoFieldWithAttributeShowoncombobox=Ningún campo ten a propiedade 'showoncombobox' na definición do obxecto '%s'. Non hai forma de amosar a listaxe combo. +ErrorFieldRequiredForProduct=O campo '%s' é obrigado para o produto %s +ProblemIsInSetupOfTerminal=O problema está na configuración do terminal %s. +ErrorAddAtLeastOneLineFirst=Engada polo menos unha liña primeiro +ErrorRecordAlreadyInAccountingDeletionNotPossible=Erro, o rexistro xa se transferiu á contabilidade, non se pode eliminar. +ErrorLanguageMandatoryIfPageSetAsTranslationOfAnother=Erro, o idioma é obrigatorio se configura a páxina como tradución doutra. +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) +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 +ErrorProductDoesNotNeedBatchNumber=Erro, o produto '<b>%s</b>' non acepta número de lote/serie +ErrorFailedToReadObject=Erro, falla o ler o tipo de obxecto <b>%s</b> +ErrorParameterMustBeEnabledToAllwoThisFeature=Erro, o parámetro <b>%s</b>1debe estar habilitado en <b>conf/conf.php<b> para permitir o uso da interface de liña de comandos polo programador de traballo interno. +ErrorLoginDateValidity=Erro, este inicio de sesión está fóra do intervalo de datas validas +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 +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 + # 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 -WarningProjectClosed=Project is closed. You must re-open it first. -WarningSomeBankTransactionByChequeWereRemovedAfter=Some bank transaction were removed after that the receipt including them were generated. So nb of cheques and total of receipt may differ from number and total in list. -WarningFailedToAddFileIntoDatabaseIndex=Warnin, failed to add file entry into ECM database index table +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. +WarningPasswordSetWithNoAccount=Estableceuse un contrasinal para este membro. En calquera caso, non se creou ningunha conta de usuario. Polo tanto, este contrasinal está almacenado pero non se pode usar para iniciar sesión en Dolibarr. Pode ser usado por un módulo/interface externo, pero se non precisa definir ningún login ou contrasinal para un membro, pode desactivar a opción "Xestionar un inicio de sesión para cada membro" desde a configuración do módulo Membros. Se precisa xestionar un inicio de sesión pero non precisa ningún contrasinal, pode manter este campo baleiro para evitar este aviso. Nota: o correo electrónico tamén pode ser usado como inicio de sesión se o membro está ligado a un usuario. +WarningMandatorySetupNotComplete=Faga clic aquí para configurar os parámetros obrigatorios +WarningEnableYourModulesApplications=Faga clic aquí para habilitar os seus módulos e aplicacións +WarningSafeModeOnCheckExecDir=Aviso, a opción PHP <b>safe_mode</b> está activada polo que o comando debe almacenarse dentro dun directorio declarado polo parámetro php <b>safe_mode_exec_dir</b>. +WarningBookmarkAlreadyExists=Xa existe un marcador con este título ou este destino (URL). +WarningPassIsEmpty=Aviso, o contrasinal da base de datos está baleiro. Este é un burato de seguridade. Debería engadir un contrasinal á súa base de datos e cambiar o ficheiro conf.php para reflectilo. +WarningConfFileMustBeReadOnly=Aviso, o seu ficheiro de configuración (<b>htdocs/conf/conf.php</b>) pode ser sobrescrito polo servidor web. Este é un grave burato de seguridade. Modifique os permisos do ficheiro para que estexan en modo de só lectura para o usuario do sistema operativo usado polo servidor web. Se usa o formato Windows e FAT para o seu disco, debe saber que este sistema de ficheiros non permite engadir permisos no ficheiro, polo que non pode ser completamente seguro. +WarningsOnXLines=Avisos nos rexistro(s) fonte <b>%s</b> +WarningNoDocumentModelActivated=Non se activou ningún modelo para a xeración de documentos. Escollerase un modelo por defecto ata que comprobe a configuración do seu módulo. +WarningLockFileDoesNotExists=Aviso, unha vez rematada a configuración, debe desactivar as ferramentas de instalación/migración engadindo un ficheiro <b>install.lock</b> ao directorio <b>%s</b>2. Omitir a creación deste ficheiro é un grave risco de seguridade. +WarningUntilDirRemoved=Todos os avisos de seguridade (visibles só polos administradores) permanecerán activos mentres a vulnerabilidade estexa presente (ou se engada esa constante MAIN_REMOVE_INSTALL_WARNING en Configuración-> Outra configuración). +WarningCloseAlways=Aviso, o peche faise aínda que a cantidade difire entre os elementos de orixe e de destino. Active esta función con precaución. +WarningUsingThisBoxSlowDown=Aviso, usando este panel ralentiza seriamente todas as páxinas que amosan o panel. +WarningClickToDialUserSetupNotComplete=A configuración da información ClickToDial para o seu usuario non está completa (consulte a lapela ClickToDial na súa tarxeta de usuario). +WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Función desactivada cando a configuración da pantalla está optimizada para navegadores de texto ou persoas cegas. +WarningPaymentDateLowerThanInvoiceDate=A data de pagamento (%s) é anterior á data da factura (%s) para a factura %s. +WarningTooManyDataPleaseUseMoreFilters=Datos de mais (máis de %s liñas). Utilice máis filtros ou estableza a constante %s nun límite máis alto. +WarningSomeLinesWithNullHourlyRate=Algunhas veces algúns usuarios rexistráronse mentres a súa tarifa por hora non estaba definida. Utilizouse un valor do 0 %s por hora, pero isto pode resultar nunha avaliación incorrecta do tempo empregado. +WarningYourLoginWasModifiedPleaseLogin=Modificouse o seu inicio de sesión. Por motivos de seguridade, terá que iniciar sesión co novo inicio de sesión antes da seguinte acción. +WarningAnEntryAlreadyExistForTransKey=Xa existe unha entrada para a clave de tradución para este idioma +WarningNumberOfRecipientIsRestrictedInMassAction=Aviso, o número de destinatarios diferentes está limitado a <b>%s</b> cando se usan as accións masivas nas listaxes +WarningDateOfLineMustBeInExpenseReportRange=Aviso, a data da liña non está no rango do informe de gastos +WarningProjectDraft=O proxecto aínda está en modo borrador. Non esqueza validalo se ten pensado usar tarefas. +WarningProjectClosed=O proxecto está pechado. Primeiro debe abrilo de novo. +WarningSomeBankTransactionByChequeWereRemovedAfter=Algunhas transaccións bancarias elimináronse despois de que se xerou o recibo que as incluíu. Polo tanto, o número de cheques e o total da recepción poden diferir do número e o total na listaxe. +WarningFailedToAddFileIntoDatabaseIndex=Aviso, non se puido engadir a entrada do ficheiro á táboa de índice da base de datos ECM +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. diff --git a/htdocs/langs/gl_ES/exports.lang b/htdocs/langs/gl_ES/exports.lang index 52343e63453..92d24c84a79 100644 --- a/htdocs/langs/gl_ES/exports.lang +++ b/htdocs/langs/gl_ES/exports.lang @@ -26,8 +26,8 @@ FieldTitle=Título campo NowClickToGenerateToBuildExportFile=Agora, seleccione o formato de exportación da lista despregable e faga clic en "Xerar" para xerar o ficheiro de exportación... AvailableFormats=Formatos dispoñibles LibraryShort=Librería -ExportCsvSeparator=Csv caracter separator -ImportCsvSeparator=Csv caracter separator +ExportCsvSeparator=Separador de caracteres en CSV +ImportCsvSeparator=Separador de caracteres en CSV Step=Paso FormatedImport=Asistente de importación FormatedImportDesc1=Esta área permitelle realizar importacións persoalizadas de datos mediante un axudante que evita ter coñecementos técnicos de Dolibarr. @@ -92,11 +92,11 @@ NbOfLinesOK=Número de liñas sen erros nin warnings: <b>%s</b>. NbOfLinesImported=Número de liñas correctamente importadas: <b>%s</b>. DataComeFromNoWhere=O valor a insertar non corresponde a ningún campo do ficheiro orixe. DataComeFromFileFieldNb=O valor a insertar correspondese ao campo número <b>%s</b> do ficheiro orixe. -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: +DataComeFromIdFoundFromRef=O valor que provén do campo número <b>%s</b> do ficheiro fonte usarase para atopar o id do obxecto principal que se vai usar (polo que o obxecto <b>%s</b> que ten a ref. a partir do ficheiro fonte debe existir na base de datos). +DataComeFromIdFoundFromCodeId=O código que provén do campo número <b>%s</b> do ficheiro fonte usarase para atopar o id do obxecto principal que se vai usar (polo que o código do ficheiro fonte debe existir no dicionario <b>%s</b>). Teña conta que se coñece o id, tamén pode usalo no ficheiro fonte no canto do código. A importación debería funcionar nos dous casos. +DataIsInsertedInto=Os datos procedentes do ficheiro fonte engádense no seguinte campo: +DataIDSourceIsInsertedInto=A identificación do obxecto principal atopouse empregando os datos do ficheiro orixe e engádense no seguinte campo: +DataCodeIDSourceIsInsertedInto=A identificación da liña principal atopada no códigoengádese no seguinte campo: SourceRequired=Datos de orixe obligatorios SourceExample=Ejemplo de datos de orixe posibles ExampleAnyRefFoundIntoElement=Todas as referencias atopadas para os elementos <b>%s</b> @@ -133,3 +133,4 @@ KeysToUseForUpdates=Clave a usar para actualizar datos NbInsert=Número de liñas engadidas: %s NbUpdate=Número de liñas actualizadas: %s MultipleRecordFoundWithTheseFilters=Atopáronse varios rexistros con estes filtros: %s +StocksWithBatch=Existencias e localización (almacén) de produtos con número de lote/serie diff --git a/htdocs/langs/gl_ES/ftp.lang b/htdocs/langs/gl_ES/ftp.lang index a31e113a6bb..ec3838e9007 100644 --- a/htdocs/langs/gl_ES/ftp.lang +++ b/htdocs/langs/gl_ES/ftp.lang @@ -1,14 +1,14 @@ # Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Configuración do módulo cliente FTP -NewFTPClient=Nova configuracións cliente FTP -FTPArea=Área FTP -FTPAreaDesc=Esta pantalla amosa unha vista de servidor FTP -SetupOfFTPClientModuleNotComplete=A configuración do módulo de cliente FTP parece incompleta -FTPFeatureNotSupportedByYourPHP=O seu PHP no soporta as funcións FTP -FailedToConnectToFTPServer=Non foi posible conectar co servidor FTP (servidor: %s, porto %s) -FailedToConnectToFTPServerWithCredentials=Non foi posible entrar co usuario/contrasinal FTP configurados +FTPClientSetup=Configuración do módulo cliente FTP ou SFTP +NewFTPClient=Nova configuración de conexión FTP/SFTP +FTPArea=Área FTP/SFTP +FTPAreaDesc=Esta pantalla amosa unha vista dun servidor FTP/SFTP +SetupOfFTPClientModuleNotComplete=A configuración do módulo cliente FTP ou SFTP parece estar imcompleta +FTPFeatureNotSupportedByYourPHP=O seu PHP non soporta funcións FTP/SFTP' +FailedToConnectToFTPServer=Fallo ao conectar ao servidor (servidor %s, porto %s) +FailedToConnectToFTPServerWithCredentials=Fallo ao iniciar sesión no servidor co inicio de sesión/contrasinal FTPFailedToRemoveFile=Non foi posible eliminar o ficheiro <b>%s</b>. FTPFailedToRemoveDir=Non foi posible eliminar o directorio <b>%s</b> (Comprobe os permisos e que o directorio está baleiro). FTPPassiveMode=Modo pasivo -ChooseAFTPEntryIntoMenu=Escolla un sitio FTP no menú ... +ChooseAFTPEntryIntoMenu=Escolla un sitio FTP/SFTM no menú ... FailedToGetFile=Non foi posible acadar os ficheiros %s diff --git a/htdocs/langs/gl_ES/holiday.lang b/htdocs/langs/gl_ES/holiday.lang index 6c59ada6a35..60a0e5c8331 100644 --- a/htdocs/langs/gl_ES/holiday.lang +++ b/htdocs/langs/gl_ES/holiday.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - holiday -HRM=HRM -Holidays=Día libre +HRM=RRHH +Holidays=Vacacións CPTitreMenu=Día libre MenuReportMonth=Estado mensual MenuAddCP=Nova petición de vacacións @@ -15,10 +15,10 @@ CancelCP=Anulada RefuseCP=Rexeitada ValidatorCP=Validador ListeCP=Listaxe de días libres -Leave=Pedido de días libres +Leave=Pedimento de días libres LeaveId=ID Vacacións ReviewedByCP=Será revisada por -UserID=User ID +UserID=ID do Usuario UserForApprovalID=ID de usuario de aprobación UserForApprovalFirstname=Nome do usuario de aprobación UserForApprovalLastname=Apelido do usuario de aprobación @@ -35,15 +35,15 @@ ReturnCP=Voltar á páxina anterior ErrorUserViewCP=Non está autorizado a ler esta petición de días libres. InfosWorkflowCP=Información do workflow RequestByCP=Pedido por -TitreRequestCP=Pedido de días libres +TitreRequestCP=Pedimento de días libres TypeOfLeaveId=ID tipo de días libres TypeOfLeaveCode=Código tipo de días libres TypeOfLeaveLabel=Tipo de etiqueta de días libres -NbUseDaysCP=Número de vacacións consumidos -NbUseDaysCPHelp=The calculation takes into account the non working days and the holidays defined in the dictionary. +NbUseDaysCP=Número de días de vacacións consumidas +NbUseDaysCPHelp=O cálculo toma dentro da conta os días non laborais e as vacacións definidas no diccionario. NbUseDaysCPShort=Días consumidos NbUseDaysCPShortInMonth=Días consumidos en mes -DayIsANonWorkingDay=%s is a non working day +DayIsANonWorkingDay=%s é un día non laboral DateStartInMonth=Data de inicio en mes DateEndInMonth=Data de fin en mes EditCP=Editar @@ -130,5 +130,5 @@ HolidaysNumberingModules=Modelos de numeración de petición de días libres TemplatePDFHolidays=Prantilla PDF para petición de días libres FreeLegalTextOnHolidays=Texto libre no PDF WatermarkOnDraftHolidayCards=Marca de auga no borrador de petición de días libres -HolidaysToApprove=Holidays to approve -NobodyHasPermissionToValidateHolidays=Nobody has permission to validate holidays +HolidaysToApprove=Vacacións para aprobar +NobodyHasPermissionToValidateHolidays=Ninguén ten permisos para validar vacacións diff --git a/htdocs/langs/gl_ES/hrm.lang b/htdocs/langs/gl_ES/hrm.lang index bd222ac2e5e..d5a29275c06 100644 --- a/htdocs/langs/gl_ES/hrm.lang +++ b/htdocs/langs/gl_ES/hrm.lang @@ -1,19 +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 +HRM_EMAIL_EXTERNAL_SERVICE=Cooreo electrónico do SPA +Establishments=Establecementos +Establishment=Establecemento +NewEstablishment=Novo establecemento +DeleteEstablishment=Eliminar establecemento +ConfirmDeleteEstablishment=Está certo de querer eliminar este establecemento? +OpenEtablishment=Abrir establecemento +CloseEtablishment=Pechar establecemento # Dictionary -DictionaryPublicHolidays=HRM - Public holidays -DictionaryDepartment=HRM - Department list -DictionaryFunction=HRM - Job positions +DictionaryPublicHolidays=RRHH - Festivos +DictionaryDepartment=RRHH - Listaxe Departamentos +DictionaryFunction=RRHH - Postos de traballo # Module Employees=Empregados Employee=Empregado -NewEmployee=New employee -ListOfEmployees=List of employees +NewEmployee=Novo empregado +ListOfEmployees=Listaxe de empregados diff --git a/htdocs/langs/gl_ES/install.lang b/htdocs/langs/gl_ES/install.lang index 65fd314784a..6c5340991c7 100644 --- a/htdocs/langs/gl_ES/install.lang +++ b/htdocs/langs/gl_ES/install.lang @@ -1,217 +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=Tipo de driver +InstallEasy=Só ten que seguir as instrucións paso a paso. +MiscellaneousChecks=Comprobación dos requisitos previos +ConfFileExists=Existe o ficheiro de configuración <b>%s </b>. +ConfFileDoesNotExistsAndCouldNotBeCreated=O ficheiro de configuración <b>%s</b> non existe e non puido ser creado! +ConfFileCouldBeCreated=Pódese crear o ficheiro de configuración <b>%s</b>. +ConfFileIsNotWritable=O ficheiro de configuración <b>%s</b> non se pode escribir. Comprobe os permisos. Para a primeira instalación, o servidor web debe poder escribir neste ficheiro durante o proceso de configuración ("chmod 666" por exemplo nun sistema operativo como Unix). +ConfFileIsWritable=O ficheiro de configuración <b>%s</b> é escribíbel. +ConfFileMustBeAFileNotADir=O ficheiro de configuración <b>%s</b> debe ser un ficheiro, non un directorio. +ConfFileReload=Recargando parámetros do ficheiro de configuración. +PHPSupportPOSTGETOk=Este PHP admite variables POST e GET. +PHPSupportPOSTGETKo=É posible que a súa configuración de PHP non admita variables POST e/ou GET. Comprobe o parámetro <b>variables_order</b> en php.ini. +PHPSupportSessions=Este PHP admite sesións. +PHPSupport=Este PHP admite funcións de %s. +PHPMemoryOK=A memoria de sesión máxima de PHP está configurada en <b>%s</b>. Isto debería ser suficiente. +PHPMemoryTooLow=A memoria de sesión máxima de PHP está configurada en <b>%s</b> bytes. Isto é demasiado baixo. Cambie o seu <b>php.ini</b> para establecer o parámetro <b>memory_limit</b> en polo menos <b>%s</b> bytes. +Recheck=Faga clic aquí para unha proba máis detallada +ErrorPHPDoesNotSupportSessions=A súa instalación de PHP non admite sesións. Esta función é precisa para que Dolibarr poida traballar. Comprobe a súa configuración de PHP e os permisos do directorio de sesións. +ErrorPHPDoesNotSupportGD=A súa instalación de PHP non admite funcións gráficas GD. Non haberá gráficos dispoñibles. +ErrorPHPDoesNotSupportCurl=A súa instalación de PHP non admite Curl. +ErrorPHPDoesNotSupportCalendar=A súa instalación de PHP non admite extensións do calendario php. +ErrorPHPDoesNotSupportUTF8=A súa instalación de PHP non admite funcións UTF8. Dolibarr non pode funcionar correctamente. Resolva isto antes de instalar Dolibarr. +ErrorPHPDoesNotSupportIntl=​​= A súa instalación de PHP non admite funcións Intl. +ErrorPHPDoesNotSupportxDebug=A súa instalación de PHP non admite funcións de depuración extensivas. +ErrorPHPDoesNotSupport=A súa instalación de PHP non admite funcións de %s. +ErrorDirDoesNotExists=O directorio %s non existe. +ErrorGoBackAndCorrectParameters=Voltar atrás e comprobar/corrixir os parámetros. +ErrorWrongValueForParameter=Pode que escribise un valor incorrecto para o parámetro '%s'. +ErrorFailedToCreateDatabase=Fallo ao crear a base de datos '%s'. +ErrorFailedToConnectToDatabase=Produciuse un fallo ao conectarse á base de datos '%s'. +ErrorDatabaseVersionTooLow=A versión da base de datos (%s) é antiga de mais. É precisa a versión %s ou superior. +ErrorPHPVersionTooLow=A versión de PHP é antiga de mais. É precisa a versión %s. +ErrorConnectedButDatabaseNotFound=Conexión correcta ao servidor pero non se atopou a base de datos '%s'. +ErrorDatabaseAlreadyExists=A base de datos '%s' xa existe. +IfDatabaseNotExistsGoBackAndUncheckCreate=Se a base de datos non existe, volte atrás e marque a opción "Crear base de datos". +IfDatabaseExistsGoBackAndCheckCreate=Se a base de datos xa existe, volte atrás e desmarque a opción "Crear base de datos". +WarningBrowserTooOld=A versión do navegador é antiga de mais. É moi recomendable actualizar o seu navegador a unha versión recente de Firefox, Chrome ou Opera. +PHPVersion=Versión de PHP +License=Usando licenza +ConfigurationFile=Ficheiro de configuración +WebPagesDirectory=Directorio onde se almacenan as páxinas web +DocumentsDirectory=Directorio para almacenar os documentos cargados e xerados +URLRoot=Raíz URL +ForceHttps=Forzar conexións seguras (https) +CheckToForceHttps=Marque esta opción para forzar conexións seguras (https). <br> Isto require que o servidor web estexa configurado cun certificado SSL. +DolibarrDatabase=Base de datos Dolibarr +DatabaseType=Tipo de base de datos +DriverType=Tipo de controlador Server=Servidor -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 +ServerAddressDescription=Nome ou enderezo IP do servidor de base de datos. Normalmente "localhost" cando o servidor de base de datos está aloxado no mesmo servidor que o servidor web. +ServerPortDescription=Porto do servidor da base de datos. Mantéñase baleiro se o descoñece. +DatabaseServer=Servidor da base de datos DatabaseName=Nome da base de datos -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. +DatabasePrefix=Prefixo da táboa da base de datos +DatabasePrefixDescription=Prefixo da táboa da base de datos. Se está baleiro, por defecto llx_. +AdminLogin=Conta de usuario para o propietario da base de datos Dolibarr. +PasswordAgain=Voltar a escribir a confirmación do contrasinal +AdminPassword=Contrasinal para o propietario da base de datos Dolibarr. +CreateDatabase=Crear base de datos +CreateUser=Crear conta de usuario ou conceder permiso á conta de usuario na base de datos Dolibarr +DatabaseSuperUserAccess=Servidor de base de datos: acceso ao superusuario +CheckToCreateDatabase=Marque a caixa se a base de datos aínda non existe e se debe crear. <br> Neste caso, tamén debe cubrir o nome de usuario e o contrasinal da conta do superusuario na parte inferior desta páxina. +CheckToCreateUser=Marque a caixa se: <br> a conta de usuario da base de datos aínda non existe e hai que creala, ou <br> se a conta de usuario existe pero a base de datos non existe e deben concederse permisos. <br> Neste caso, debe introducir a conta de usuario e o contrasinal e <b> tamén </b> o nome e o contrasinal da conta do superusuario na parte inferior desta páxina. Se esta caixa está desmarcada, o propietario e o contrasinal da base de datos xa deben existir. +DatabaseRootLoginDescription=Nome da conta do superusuario (para crear novas bases de datos ou novos usuarios), obrigatorio se a base de datos ou o seu propietario non existen. +KeepEmptyIfNoPassword=Deixe en branco se o superusuario non ten contrasinal (NON se recomenda) +SaveConfigurationFile=Gardar parámetros en +ServerConnection=Conexión ao servidor +DatabaseCreation=Creación de bases de datos +CreateDatabaseObjects=Creación de obxectos de base de datos +ReferenceDataLoading=Carga de datos de referencia +TablesAndPrimaryKeysCreation=Creación de táboas e claves primarias +CreateTableAndPrimaryKey=Crear táboa %s +CreateOtherKeysForTable=Crear claves e índices foráneos para a táboa %s +OtherKeysCreation=Creación de claves e índices foráneos +FunctionsCreation=Creación de funcións +AdminAccountCreation=Creación do inicio de sesión do administrador +PleaseTypePassword=Escriba un contrasinal, non se permiten contrasinais baleiros. +PleaseTypeALogin=Prégase escriba un inicio de sesión. +PasswordsMismatch=Os contrasinais son diferentes, ténteo de novo. +SetupEnd=Fin da configuración +SystemIsInstalled=Esta instalación rematou. +SystemIsUpgraded=Dolibarr actualizouse correctamente. +YouNeedToPersonalizeSetup=Debe configurar Dolibarr para que se adapte ás súas necesidades (aspecto, características, ...). Para facelo, siga a seguinte ligazón: +AdminLoginCreatedSuccessfuly=O inicio de sesión do administrador Dolibarr '<b>%s </b>' creouse correctamente. +GoToDolibarr=Ir a Dolibarr +GoToSetupArea=Ir a Dolibarr (área de configuración) +MigrationNotFinished=A versión da base de datos non está completamente actualizada: execute de novo o proceso de actualización. +GoToUpgradePage=Ir de novo á páxina de actualización +WithNoSlashAtTheEnd=Sen a barra inclinada "/" ao final +DirectoryRecommendation=<span class="warning"> IMPORTANTE </span>: Debe empregar un directorio que está fóra das páxinas web (polo tanto, non use un subdirectorio do parámetro anterior). +LoginAlreadyExists=Xa existe +DolibarrAdminLogin=Inicio de sesión do administrador de Dolibarr +AdminLoginAlreadyExists=A conta de administrador Dolibarr '<b>%s </b>' xa existe. Volte atrás se queres crear outro. +FailedToCreateAdminLogin=Produciuse un fallo ao crear a conta de administrador de Dolibarr. +WarningRemoveInstallDir=Aviso, por motivos de seguridade, unha vez finalizada a instalación ou actualización, debería engadir un ficheiro chamado <b> install.lock </b> ao directorio do documento Dolibarr para evitar o uso accidental/malicioso da instalación ferramentas de novo. +FunctionNotAvailableInThisPHP=Non dispoñible neste PHP +ChoosedMigrateScript=Escolla un script de migración +DataMigration=Migración da base de datos (datos) +DatabaseMigration=Migración da base de datos (estrutura + algúns datos) +ProcessMigrateScript=Procesamento de scripts +ChooseYourSetupMode=Elixa o seu modo de configuración e faga clic en "Inicio" ... +FreshInstall=Instalación nova +FreshInstallDesc=Use este modo se esta é a súa primeira instalación. Se non, este modo pode reparar unha instalación anterior incompleta. Se desexa actualizar a súa versión, escolla o modo "Actualizar". Upgrade=Actualización -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 +UpgradeDesc=Utilice este modo se substituíu ficheiros Dolibarr antigos por ficheiros dunha versión máis recente. Isto actualizará a súa base de datos e os datos. +Start=Inciciar +InstallNotAllowed=A configuración non está permitida polos permisos en <b> conf.php </b> +YouMustCreateWithPermission=Debe crear o ficheiro %s e establecer permisos de escritura nel para o servidor web durante o proceso de instalación. +CorrectProblemAndReloadPage=Corrixa o problema e prema F5 para recargar a páxina. +AlreadyDone=Xa migrou +DatabaseVersion=Versión da base de datos +ServerVersion=Versión do servidor de base de datos +YouMustCreateItAndAllowServerToWrite=Debe crear este directorio e permitir que o servidor web escriba nel. +DBSortingCollation=Orde de clasificación de caracteres +YouAskDatabaseCreationSoDolibarrNeedToConnect=Seleccionou crear base de datos <b>%s</b>, pero para iso, Dolibarr necesita conectarse ao servidor <b>%s</b> con permisos de superusuario <b>%s</b>. +YouAskLoginCreationSoDolibarrNeedToConnect=Seleccionou crear usuario de base de datos <b>%s</b>, pero para iso, Dolibarr necesita conectarse ao servidor <b>%s</b> con permisos de superusuario <b>%s</b> . +BecauseConnectionFailedParametersMayBeWrong=Fallou a conexión á base de datos: os parámetros host ou superusuario deben ser erroneos. +OrphelinsPaymentsDetectedByMethod=Detectouse o pagamento de orfos polo método %s +RemoveItManuallyAndPressF5ToContinue=Elimine manualmente e prema F5 para continuar. +FieldRenamed=Cambiouse o nome do campo +IfLoginDoesNotExistsCheckCreateUser=Se o usuario aínda non existe, debe marcar a opción "Crear usuario" +ErrorConnection=O servidor "<b>%s</b>", o nome da base de datos "<b>%s</b>", o inicio de sesión "<b>%s</b>" ou o contrasinal da base de datos poden estar mal ou a versión do cliente de PHP pode ser demasiado antiga en comparación coa versión da base de datos. +InstallChoiceRecommanded=Escolla recomendada para instalar a versión <b>%s</b> sobre a súa versión actual <b>%s</b> +InstallChoiceSuggested=<b> Escolla de instalación suxerida polo instalador </b>. +MigrateIsDoneStepByStep=A versión destino (%s) ten un oco de varias versións. O asistente de instalación volverá suxerir unha nova migración unha vez completada. +CheckThatDatabasenameIsCorrect=Comprobe que o nome da base de datos "<b>%s</b>" é correcto. +IfAlreadyExistsCheckOption=Se este nome é correcto e esa base de datos aínda non existe, debe marcar a opción "Crear base de datos". +OpenBaseDir=Parámetro openbasedir de PHP +YouAskToCreateDatabaseSoRootRequired=Marcou a caixa "Crear base de datos". Para iso, ten que proporcionar o nome de usuario/contrasinal do superusuario (parte inferior do formulario). +YouAskToCreateDatabaseUserSoRootRequired=Marcou a caixa "Crear propietario da base de datos". Para iso, ten que proporcionar o nome de usuario/contrasinal do superusuario (parte inferior do formulario). +NextStepMightLastALongTime=O paso actual pode levar varios minutos. Agarde ata que a seguinte pantalla se amose completamente antes de continuar. +MigrationCustomerOrderShipping=Migrar o envío para o almacenamento de pedimentos de cliente +MigrationShippingDelivery=Actualizar o almacenamento do envío +MigrationShippingDelivery2=Actualizar o almacenamento do envío 2 +MigrationFinished=Rematou a migración +LastStepDesc=​​= <strong> Último paso </strong>: defina aquí o inicio de sesión e o contrasinal que desexa usar para conectarse a Dolibarr. <b> Non o perda xa que é a conta principal para administrar todas as outras contas de usuario/ adicionais. </b> +ActivateModule=Activar o módulo %s +ShowEditTechnicalParameters=Faga clic aquí para amosar/editar parámetros avanzados (modo experto) +WarningUpgrade=Aviso: \n Xestionou primeiro unha copia de seguridade da base de datos? \n Esto é moi recomendable. A perda de datos (por exemplo, erros na versión 5.5.40 /41/42/43 de mysql) pode ser posible durante este proceso, polo que é esencial facer unha descarga completa da súa base de datos antes de iniciar calquera migración. \n \n Prema Aceptar para iniciar o proceso de migración ... +ErrorDatabaseVersionForbiddenForMigration=A súa versión de base de datos é %s. Ten un erro crítico, o que fai posible a perda de datos se realiza cambios estruturais na súa base de datos, como o require o proceso de migración. Por esta razón, a migración non se permitirá ata que actualice a base de datos a unha versión mayor sin errores (parcheada) (lista de versiónscoñecidas con este erro: %s) +KeepDefaultValuesWamp=Usou o asistente de configuración Dolibarr de DoliWamp, polo que os valores aquí propostos xa están optimizados. Cambialos só se sabe o que fai. +KeepDefaultValuesDeb=Usou o asistente de configuración Dolibarr desde un paquete Linux (Ubuntu, Debian, Fedora ...), polo que os valores aquí propostos xa están optimizados. Só se debe introducir o contrasinal do propietario da base de datos para crear. Cambia outros parámetros só se sabe o que fai. +KeepDefaultValuesMamp=Usou o asistente de configuración Dolibarr de DoliMamp, polo que os valores aquí propostos xa están optimizados. Cambialos só se sabe o que fai. +KeepDefaultValuesProxmox=Usou o asistente de configuración Dolibarr desde unha aplicación virtual Proxmox, polo que os valores aquí propostos xa están optimizados. Cambialos só se sabe o que fai. +UpgradeExternalModule=Executa o proceso adicado de actualización do módulo externo +SetAtLeastOneOptionAsUrlParameter=Establecer polo menos unha opción como parámetro no URL. Por exemplo: '... repair.php?Standard=confirmado' +NothingToDelete=Nada que limpar/eliminar 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 +MigrationFixData=Corrección de datos desnormalizados +MigrationOrder=Migración de datos para os pedimentos a cliente +MigrationSupplierOrder=Migración de datos para os pedimentos de provedor +MigrationProposal=Migración de datos para propostas comerciais +MigrationInvoice=Migración de datos para as facturas do cliente +MigrationContract=Migración de datos para contratos +MigrationSuccessfullUpdate=Actualización realizada correctamente +MigrationUpdateFailed=Fallou o proceso de actualización +MigrationRelationshipTables=Migración de datos para táboas de relacións (%s) +MigrationPaymentsUpdate=Corrección de datos de pago +MigrationPaymentsNumberToUpdate=%s pago(s) para actualizar +MigrationProcessPaymentUpdate=Actualizar o(s) pagamento(s) %s +MigrationPaymentsNothingToUpdate=Non hai máis cousas que facer +MigrationPaymentsNothingUpdatable=Non hai máis pagamentos que se poidan corrixir +MigrationContractsUpdate=Corrección de datos do contrato +MigrationContractsNumberToUpdate=%s contrato(s) para actualizar +MigrationContractsLineCreation=Crear unha liña de contrato para a ref. %S do contrato +MigrationContractsNothingToUpdate=Non hai máis cousas que facer +MigrationContractsFieldDontExist=O campo fk_facture xa non existe. Nada que facer. +MigrationContractsEmptyDatesUpdate=Corrección de contratos de data baleira +MigrationContractsEmptyDatesUpdateSuccess=A corrección da data baleira do contrato fíxose correctamente +MigrationContractsEmptyDatesNothingToUpdate=Non hai data baleira do contrato para corrixir +MigrationContractsEmptyCreationDatesNothingToUpdate=Non hai data de creación do contrato para corrixir +MigrationContractsInvalidDatesUpdate=Corrección do contrato de data de valor incorrecto +MigrationContractsInvalidDateFix=Contrato correcto %s (Data do contrato =%s, Data de inicio do servizo min =%s) +MigrationContractsInvalidDatesNumber=%s contratos modificados +MigrationContractsInvalidDatesNothingToUpdate=Non hai data con valor erroneo para corrixir +MigrationContractsIncoherentCreationDateUpdate=Corrección da data de creación do contrato de valor incorrecto +MigrationContractsIncoherentCreationDateUpdateSuccess=Corrección da data de creación do contrato de valor incorrecto feita correctamente +MigrationContractsIncoherentCreationDateNothingToUpdate=Non hai ningún valor mal para corrixir a data de creación do contrato +MigrationReopeningContracts=Contrato aberto e pechado por erro +MigrationReopenThisContract=Voltar a abrir o contrato %s +MigrationReopenedContractsNumber=%s contratos modificados +MigrationReopeningContractsNothingToUpdate=Non hai contrato pechado para abrir +MigrationBankTransfertsUpdate=Actualizar ligazóns entre a entrada bancaria e unha transferencia bancaria +MigrationBankTransfertsNothingToUpdate=Todas as ligazóns están actualizadas +MigrationShipmentOrderMatching=Actualización do recibo dos envíos +MigrationDeliveryOrderMatching=Actualización do recibo de entrega +MigrationDeliveryDetail=Actualización de entrega +MigrationStockDetail=Actualizar o valor de stock dos produtos +MigrationMenusDetail=Actualizar táboas de menús dinámicos +MigrationDeliveryAddress=Actualizar o enderezo de entrega nos envíos +MigrationProjectTaskActors=Migración de datos para a táboa llx_projet_task_actors +MigrationProjectUserResp=Campo de migración de datos fk_user_resp de llx_projet para llx_element_contact +MigrationProjectTaskTime=Tempo de actualización empregado en segundos +MigrationActioncommElement=Actualizar datos sobre accións +MigrationPaymentMode=Migración de datos para o tipo de pago +MigrationCategorieAssociation=Migración de categorías +MigrationEvents=Migración de eventos para engadir o propietario do evento á táboa de tarefas +MigrationEventsContact=Migración de eventos para engadir contacto de evento á táboa de asignación +MigrationRemiseEntity=Actualizar o valor do campo da entidade de llx_societe_remise +MigrationRemiseExceptEntity=Actualizar o valor do campo da entidade de llx_societe_remise_except +MigrationUserRightsEntity=Actualizar o valor do campo da entidade de llx_user_rights +MigrationUserGroupRightsEntity=Actualizar o valor do campo da entidade de llx_usergroup_rights +MigrationUserPhotoPath=Migración de enderezos de fotos para usuarios +MigrationFieldsSocialNetworks=Migración de redes sociais dos campos dos usuarios (%s) +MigrationReloadModule=Recargar o módulo %s +MigrationResetBlockedLog=Restablecer o módulo BlockedLog para o algoritmo v7 +ShowNotAvailableOptions=Amosar as opcións non dispoñibles +HideNotAvailableOptions=Ocultar opcións non dispoñibles +ErrorFoundDuringMigration=Informáronse erros durante o proceso de migración polo que o seguinte paso non está dispoñible. Para ignorar os erros, pode <a href="%s"> facer clic aquí </a>, pero é posible que a aplicación ou algunhas funcións non funcionen correctamente ata que non se resolvan os erros. +YouTryInstallDisabledByDirLock=A aplicación tentou actualizarse por si mesma, pero as páxinas de instalación/actualización desactiváronse por seguridade (directorio renomeado co sufixo .lock). <br> +YouTryInstallDisabledByFileLock=A aplicación intentou actualizarse por si mesma, pero as páxinas de instalación/actualización desactiváronse por seguridade (pola existencia dun ficheiro de bloqueo <strong> install.lock </strong> no directorio de documentos dolibarr). <br> +ClickHereToGoToApp=Fai clic aquí para ir á súa aplicación +ClickOnLinkOrRemoveManualy=Se hai unha actualización en curso, agarde. Se non, faga clic na seguinte ligazón. Se sempre ve esta mesma páxina, debe eliminar/renomear o ficheiro install.lock no directorio de documentos. +Loaded=Cargado +FunctionTest=Función test diff --git a/htdocs/langs/gl_ES/interventions.lang b/htdocs/langs/gl_ES/interventions.lang index 37d18abb4c4..54d0c50751f 100644 --- a/htdocs/langs/gl_ES/interventions.lang +++ b/htdocs/langs/gl_ES/interventions.lang @@ -1,66 +1,68 @@ # Dolibarr language file - Source file is en_US - interventions Intervention=Intervención Interventions=Intervencións -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 +InterventionCard=Ficha intervención +NewIntervention=Nova intervención +AddIntervention=Crear intervención +ChangeIntoRepeatableIntervention=Cambiar a intervención recorrente. +ListOfInterventions=Listaxe de intervencións +ActionsOnFicheInter=Eventos sobre a intervención +LastInterventions=Últimas %s Intervencións +AllInterventions=Todas as intervencións CreateDraftIntervention=Crear borrador -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" +InterventionContact=Contacto intervención +DeleteIntervention=Eliminar intervención +ValidateIntervention=Validar intervención +ModifyIntervention=Modificar intervención +DeleteInterventionLine=Eliminar liña de intervención +ConfirmDeleteIntervention=¿Está certo de querer eliminar esta intervención? +ConfirmValidateIntervention=¿Está certo de querer validar esta intervención baixo o nome <b>%s</b>? +ConfirmModifyIntervention=¿Está ceto de querer modificar esta intervención? +ConfirmDeleteInterventionLine=¿Está certo de querer eliminar esta liña da intervención? +ConfirmCloneIntervention=¿Está certo de querer clonar esta intervención? +NameAndSignatureOfInternalContact=Nome e sinatura do participante: +NameAndSignatureOfExternalContact=Nome e sinatura do cliente: +DocumentModelStandard=Documento modelo estándar para intervencións +InterventionCardsAndInterventionLines=Intervencións e liñas de intervención +InterventionClassifyBilled=Clasificar "Facturada" +InterventionClassifyUnBilled=Clasificar "Non facturada" +InterventionClassifyDone=Clasificar "Realizada" StatusInterInvoiced=Facturado -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=Intervención %s enviada por e-mail -InterventionDeletedInDolibarr=Intervention %s deleted -InterventionsArea=Interventions area -DraftFichinter=Draft interventions +SendInterventionRef=Envío da intervención %s +SendInterventionByMail=Enviar intervención por correo electrónico +InterventionCreatedInDolibarr=Intervención %s creada +InterventionValidatedInDolibarr=Intervención %s validada +InterventionModifiedInDolibarr=Intervención %s modificada +InterventionClassifiedBilledInDolibarr=Intervención %s clasificada como facturada +InterventionClassifiedUnbilledInDolibarr=Intervención %s clasificada como non facturada +InterventionSentByEMail=Intervención %s enviada por correo electrónico +InterventionDeletedInDolibarr=Intervención %s eliminada +InterventionsArea=Área intervencións +DraftFichinter=Intervencións borrador LastModifiedInterventions=Últimas %s intervencións modificadas -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 +FichinterToProcess=Intervencións a procesar +TypeContact_fichinter_external_CUSTOMER=Seguimento do contacto co cliente +PrintProductsOnFichinter=Imprimir tamén as liñas de tipo "produto" (non só servizos) nas fichas de intervención +PrintProductsOnFichinterDetails=Intervencións xeradas desde pedimentos +UseServicesDurationOnFichinter=Usar a duración dos servizos para as intervencións xradas desde os pedimentos +UseDurationOnFichinter=Oculta o campo de duración para os rexistros de intervención +UseDateWithoutHourOnFichinter=Oculta horas e minutos fora do campo de data para os registros de intervención +InterventionStatistics=Estatísticas de intervencións +NbOfinterventions=Nº de fichas de intervención +NumberOfInterventionsByMonth=Nº de fichas de intervención por mes (data de validación) +AmountOfInteventionNotIncludedByDefault=A cantidade de intervención non se inclúe por defecto no beneficio (na maioría dos casos, as follas de traballo úsanse para contar o tempo empregado). Engade a opción PROJECT_INCLUDE_INTERVENTION_AMOUNT_IN_PROFIT a 1 en home-setup-other para incluílas. +InterId=Id. intervención +InterRef=Ref. intervención +InterDateCreation=Data creación intervención +InterDuration=Duración intervención +InterStatus=Estado intervención +InterNote=Nota intervención +InterLine=Liña de intervención +InterLineId=Id. liña intervención +InterLineDate=Data liña intervención +InterLineDuration=Duración liña intervención +InterLineDesc=Descrición liña intervención +RepeatableIntervention=Modelo de intervención +ToCreateAPredefinedIntervention=Para crear unha intervención predefinida ou recorrente, cree unha intervención común e converta +Reopen=Abrir de novo +ConfirmReopenIntervention=Estás certo de que queres abrir de novo a intervención <b>%s</b>? diff --git a/htdocs/langs/gl_ES/intracommreport.lang b/htdocs/langs/gl_ES/intracommreport.lang index 576a0345c46..e0788dcbf47 100644 --- a/htdocs/langs/gl_ES/intracommreport.lang +++ b/htdocs/langs/gl_ES/intracommreport.lang @@ -1,40 +1,40 @@ -Module68000Name = Intracomm report -Module68000Desc = Intracomm report management (Support for French DEB/DES format) -IntracommReportSetup = Intracommreport module setup -IntracommReportAbout = About intracommreport +Module68000Name = Informe intracomm +Module68000Desc = Xestión de informes intracomm (soporte para o formato francés DEB / DES) +IntracommReportSetup = Configuración do módulo Intracommreport +IntracommReportAbout = Acerca de 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_AGREMENT=Número de aprobación (emitido polo CISD do anexo) +INTRACOMMREPORT_TYPE_ACTEUR=Tipo de actor +INTRACOMMREPORT_ROLE_ACTEUR=Rol interpretado polo actor +INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION=Nivel de obriga das presentacións +INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION=Nivel de obriga dos envíos +INTRACOMMREPORT_CATEG_FRAISDEPORT=Categoría de servizos tipo "Franqueo" -INTRACOMMREPORT_NUM_DECLARATION=Numéro de déclarant +INTRACOMMREPORT_NUM_DECLARATION=Número de declarante # Menu -MenuIntracommReport=Intracomm report -MenuIntracommReportNew=New declaration +MenuIntracommReport=Informe intracomm +MenuIntracommReportNew=Nova declaración MenuIntracommReportList=Listaxe # View -NewDeclaration=New declaration -Declaration=Declaration -AnalysisPeriod=Analysis period -TypeOfDeclaration=Type of declaration -DEB=Goods exchange declaration (DEB) -DES=Services exchange declaration (DES) +NewDeclaration=Nova declaración +Declaration=Declaracion +AnalysisPeriod=Período de análise +TypeOfDeclaration=Tipo de declaración +DEB=Declaración de cambio de mercadorías (DEB) +DES=Declaración de intercambio de servizos (DES) # Export page -IntracommReportTitle=Preparation of an XML file in ProDouane format +IntracommReportTitle=Preparación dun ficheiro XML en formato ProAduana # List -IntracommReportList=List of generated declarations -IntracommReportNumber=Numero of declaration -IntracommReportPeriod=Period of nalysis -IntracommReportTypeDeclaration=Type of declaration -IntracommReportDownload=download XML file +IntracommReportList=Lista de declaracións xeradas +IntracommReportNumber=Número de declaración +IntracommReportPeriod=Período de análise +IntracommReportTypeDeclaration=Tipo de declaración +IntracommReportDownload=descargar o ficheiro XML # Invoice -IntracommReportTransportMode=Transport mode +IntracommReportTransportMode=Modo de transporte diff --git a/htdocs/langs/gl_ES/languages.lang b/htdocs/langs/gl_ES/languages.lang index ce9d78410c2..a66520eaa71 100644 --- a/htdocs/langs/gl_ES/languages.lang +++ b/htdocs/langs/gl_ES/languages.lang @@ -1,10 +1,10 @@ # Dolibarr language file - Source file is en_US - languages -Language_am_ET=Ethiopian +Language_am_ET=Etíope Language_ar_AR=Árabe -Language_ar_EG=Arabic (Egypt) +Language_ar_EG=Árabe (Exipto) Language_ar_SA=Árabe -Language_az_AZ=Azerbaijani -Language_bn_BD=Bengali +Language_az_AZ=Azerí +Language_bn_BD=Bengalí Language_bn_IN=Bengali (India) Language_bg_BG=Búlgaro Language_bs_BA=Bosnio @@ -14,61 +14,61 @@ Language_da_DA=Danés Language_da_DK=Danés Language_de_DE=Alemán Language_de_AT=Alemán (Austria) -Language_de_CH=German (Switzerland) +Language_de_CH=Alemán (Suíza) Language_el_GR=Grego -Language_el_CY=Greek (Cyprus) +Language_el_CY=Grego (Chipre) Language_en_AU=Inglés (Australia) -Language_en_CA=English (Canada) +Language_en_CA=Inglés (Canadá) Language_en_GB=Inglés (Reino Unido) Language_en_IN=Inglés (India) Language_en_NZ=Inglés (Nova Celandia) Language_en_SA=Inglés (Arabia Saudita) -Language_en_SG=English (Singapore) +Language_en_SG=Inglés (Singapur) Language_en_US=Inglés (Estados Unidos) Language_en_ZA=Inglés (Sudáfrica) Language_es_ES=Español Language_es_AR=Español (Arxentina) -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_BO=Español (Bolivia) +Language_es_CL=Español (Chile) +Language_es_CO=Español (Colombia) +Language_es_DO=Español (República Dominicana) +Language_es_EC=Español (Ecuador) +Language_es_GT=Español (Guatemala) Language_es_HN=Español (Honduras) Language_es_MX=Español (México) -Language_es_PA=Spanish (Panama) +Language_es_PA=Español (Panamá) Language_es_PY=Español (Paraguay) Language_es_PE=Español (Perú) Language_es_PR=Español (Porto Rico) -Language_es_US=Spanish (USA) -Language_es_UY=Spanish (Uruguay) -Language_es_GT=Spanish (Guatemala) -Language_es_VE=Spanish (Venezuela) +Language_es_US=Español (USA) +Language_es_UY=Español (Uruguai) +Language_es_GT=Español (Guatemala) +Language_es_VE=Español (Venezuela) Language_et_EE=Estoniano Language_eu_ES=Éuscaro Language_fa_IR=Persa -Language_fi_FI=Finnish +Language_fi_FI=Finés Language_fr_BE=Francés (Bélxica) Language_fr_CA=Francés (Canadá) -Language_fr_CH=Francés (Suíza) -Language_fr_CI=French (Cost Ivory) -Language_fr_CM=French (Cameroun) +Language_fr_CH=Francés (Suiza) +Language_fr_CI=Francés (Costa Marfíl) +Language_fr_CM=Francés (Camerún) Language_fr_FR=Francés -Language_fr_GA=French (Gabon) +Language_fr_GA=Francés (Gabón) Language_fr_NC=Francés (Nova Caledonia) -Language_fr_SN=French (Senegal) -Language_fy_NL=Frisian -Language_gl_ES=Galician +Language_fr_SN=Francés (Senegal) +Language_fy_NL=Frisón +Language_gl_ES=Galego Language_he_IL=Hebreo Language_hi_IN=Hindi (India) Language_hr_HR=Croata Language_hu_HU=Húngaro -Language_id_ID=Indonesian +Language_id_ID=Indonesio Language_is_IS=Islandés Language_it_IT=Italiano -Language_it_CH=Italian (Switzerland) +Language_it_CH=Italiano (Suíza) Language_ja_JP=Xaponés -Language_ka_GE=Georgian +Language_ka_GE=Xeorxiano Language_km_KH=Khmer Language_kn_IN=Kannada Language_ko_KR=Coreano @@ -76,11 +76,11 @@ Language_lo_LA=Laos Language_lt_LT=Lituano Language_lv_LV=Letón Language_mk_MK=Macedonio -Language_mn_MN=Mongolian +Language_mn_MN=Mongol Language_nb_NO=Noruegués (Bokmål) Language_ne_NP=Nepali Language_nl_BE=Holandés (Bélxica) -Language_nl_NL=Dutch +Language_nl_NL=Alemán Language_pl_PL=Polaco Language_pt_BR=Portugués (Brasil) Language_pt_PT=Portugués @@ -91,15 +91,15 @@ Language_tr_TR=Turco Language_sl_SI=Esloveno Language_sv_SV=Sueco Language_sv_SE=Sueco -Language_sq_AL=Albanian +Language_sq_AL=Albanés Language_sk_SK=Eslovaco -Language_sr_RS=Serbian +Language_sr_RS=Serbio Language_sw_SW=Kiswahili -Language_th_TH=Thai +Language_th_TH=Tailandés Language_uk_UA=Ucraíno Language_uz_UZ=Usbeco Language_vi_VN=Vietnamita Language_zh_CN=Chinés -Language_zh_TW=Chinés (tradicional) -Language_zh_HK=Chinese (Hong Kong) -Language_bh_MY=Malay +Language_zh_TW=Chinés (Tradicional) +Language_zh_HK=Chinés (Hong Kong) +Language_bh_MY=Malaio diff --git a/htdocs/langs/gl_ES/ldap.lang b/htdocs/langs/gl_ES/ldap.lang index 7957050d002..51bb44de08c 100644 --- a/htdocs/langs/gl_ES/ldap.lang +++ b/htdocs/langs/gl_ES/ldap.lang @@ -1,27 +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 +YouMustChangePassNextLogon=Débese cambiar o contrasinal do usuario <b>%s </b> no dominio <b>%s </b>. +UserMustChangePassNextLogon=O usuario debe cambiar o contrasinal no dominio %s +LDAPInformationsForThisContact=Información na base de datos LDAP deste contacto +LDAPInformationsForThisUser=Información na base de datos LDAP para este usuario +LDAPInformationsForThisGroup=Información na base de datos LDAP para este grupo +LDAPInformationsForThisMember=Información na base de datos LDAP para este membro +LDAPInformationsForThisMemberType=Información na base de datos LDAP para este tipo de membro +LDAPAttributes=Atributos LDAP +LDAPCard=Tarxeta LDAP +LDAPRecordNotFound=Non se atopou o rexistro na base de datos LDAP +LDAPUsers=Usuarios na base de datos LDAP LDAPFieldStatus=Estado -LDAPFieldFirstSubscriptionDate=First subscription date -LDAPFieldFirstSubscriptionAmount=First subscription amount -LDAPFieldLastSubscriptionDate=Data da última cotización -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 +LDAPFieldFirstSubscriptionDate=Data da primeira cotización +LDAPFieldFirstSubscriptionAmount=Importe da primeira cotización +LDAPFieldLastSubscriptionDate=Datos da última cotización +LDAPFieldLastSubscriptionAmount=Importe da última cotización +LDAPFieldSkype=ID de Skype +LDAPFieldSkypeExample=Exemplo: skypeName +UserSynchronized=Usuario sincronizado +GroupSynchronized=Grupo sincronizado +MemberSynchronized=Membro sincronizado +MemberTypeSynchronized=Tipo de membro sincronizado +ContactSynchronized=Contacto sincronizado +ForceSynchronize=Forzar a sincronización Dolibarr -> LDAP +ErrorFailedToReadLDAP=Fallou ao ler a base de datos LDAP. Comprobe a configuración do módulo LDAP e a accesibilidade á base de datos. +PasswordOfUserInLDAP=Contrasinal do usuario en LDAP diff --git a/htdocs/langs/gl_ES/link.lang b/htdocs/langs/gl_ES/link.lang index 1ffcd41a18b..4815cf15e64 100644 --- a/htdocs/langs/gl_ES/link.lang +++ b/htdocs/langs/gl_ES/link.lang @@ -1,11 +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 +LinkANewFile=Ligar un novo ficheiro/documento +LinkedFiles=Ficheiros e documentos ligados +NoLinkFound=Sen ligazóns registrados +LinkComplete=O ficheiro foi ligado correctamente +ErrorFileNotLinked=O ficheiro non puido ser ligado +LinkRemoved=A ligazón %s foi eliminada +ErrorFailedToDeleteLink= Erro ao eliminar a ligazón '<b>%s</b>' +ErrorFailedToUpdateLink= Erro ao actualizar a ligazón '<b>%s</b>' +URLToLink=URL a ligar +OverwriteIfExists=Sobrescribir ficheiro se existe diff --git a/htdocs/langs/gl_ES/mailmanspip.lang b/htdocs/langs/gl_ES/mailmanspip.lang index bab4b3576b4..08dbb902cca 100644 --- a/htdocs/langs/gl_ES/mailmanspip.lang +++ b/htdocs/langs/gl_ES/mailmanspip.lang @@ -1,27 +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 +MailmanSpipSetup=Configuración do módulo Mailman e SPIP +MailmanTitle=Sistema de listaxes de correo Mailman +TestSubscribe=Para comprobar a subscrición a listas Mailman +TestUnSubscribe=Para comprobar a cancelación de subscricións a listas Mailman +MailmanCreationSuccess=Subscrición de proba executada correctamente +MailmanDeletionSuccess=Cancelación de subscrición de proba foi executada correctamente +SynchroMailManEnabled=Unha actualización de Mailman será realizada +SynchroSpipEnabled=Unha actualización de Spip será realizada +DescADHERENT_MAILMAN_ADMINPW=Contrasinal de administrador Mailman +DescADHERENT_MAILMAN_URL=URL para as subscricións Mailman +DescADHERENT_MAILMAN_UNSUB_URL=URL para a cancelación de subscripcións Mailman +DescADHERENT_MAILMAN_LISTS=Lista(s) para a subscripción automática dos novos membros (separados por comas) +SPIPTitle=Sistema de xestión de contidos SPIP +DescADHERENT_SPIP_SERVEUR=Servidor SPIP +DescADHERENT_SPIP_DB=Nome da base de datos de SPIP +DescADHERENT_SPIP_USER=Usuario da base de datos de SPIP +DescADHERENT_SPIP_PASS=Contrasinal da base de datos de SPIP +AddIntoSpip=Engadir a SPIP +AddIntoSpipConfirmation=¿Está certo de querer engadir este membro a SPIP? +AddIntoSpipError=Aconteceu un erro ao engadir o membro a SPIP +DeleteIntoSpip=Eliminar de SPIP +DeleteIntoSpipConfirmation=¿Está certo de querer eliminar este membro de SPIP? +DeleteIntoSpipError=Aconteceu un erro ao eliminar o membro de SPIP +SPIPConnectionFailed=Erro ao conectar con SPIP +SuccessToAddToMailmanList=%s agregado con éxito a listaxe de mailman %s ou base de datos SPIP +SuccessToRemoveToMailmanList=%s eliminado con éxito da listaxe de mailman %s ou base de datos SPIP diff --git a/htdocs/langs/gl_ES/mails.lang b/htdocs/langs/gl_ES/mails.lang index f3c5ab840b9..fa304de11c3 100644 --- a/htdocs/langs/gl_ES/mails.lang +++ b/htdocs/langs/gl_ES/mails.lang @@ -92,6 +92,7 @@ MailingModuleDescEmailsFromUser=Mails enviados por usuario MailingModuleDescDolibarrUsers=Usuarios con mails MailingModuleDescThirdPartiesByCategories=Terceiros (por categoría) SendingFromWebInterfaceIsNotAllowed=O envío dende a interfaz web non está permitido. +EmailCollectorFilterDesc=Todos os filtros deben coincidir para recibir un correo electrónico # Libelle des modules de liste de destinataires mailing LineInFile=Liña %s en ficheiro @@ -106,9 +107,9 @@ SearchAMailing=Buscar un Mailing SendMailing=Enviar Mailing SentBy=Enviado por MailingNeedCommand=O envío dun mailing pode realizarse dende a liña de comandos. Solicite ao administrador do servidor que execute o siguiente comando para enviar o mailling a todos os destinatarios: -MailingNeedCommand2=You can however send them online by adding parameter MAILING_LIMIT_SENDBYWEB with value of max number of emails you want to send by session. For this, go on Home - Setup - Other. -ConfirmSendingEmailing=If you want to send emailing directly from this screen, please confirm you are sure you want to send emailing now from your browser ? -LimitSendingEmailing=Note: Sending of emailings from web interface is done in several times for security and timeout reasons, <b>%s</b> recipients at a time for each sending session. +MailingNeedCommand2=Porén, pode envialos en liña engadindo o parámetro MAILING_LIMIT_SENDBYWEB co valor do número máximo de correos electrónicos que desexa enviar por sesión. Para iso, vaia a Inicio-Configuración-Outro. +ConfirmSendingEmailing=Se desexa enviar correos electrónicos directamente desde esta pantalla, confirme que está certo de querer enviar correos electrónicos agora desde o seu navegador? +LimitSendingEmailing=Nota: o envío de mensaxes de correo electrónico desde a interface web faise varias veces por motivos de seguridade e tempo de espera, <b>%s</b> destinatarios á vez por cada sesión de envío. TargetsReset=Vaciar listaxe ToClearAllRecipientsClickHere=Para vaciar a listaxe dos destinatarios deste mailing, faga click no botón ToAddRecipientsChooseHere=Para engadir destinatarios, escolla os que figuran nas listaxes a continuación @@ -125,22 +126,23 @@ TagMailtoEmail=Mail do destinatario (incluindo a ligazón html "mailto:") NoEmailSentBadSenderOrRecipientEmail=Non foi enviado o mail. O remitente ou destinatario é incorrecto. Comprobe os datos do usuario. # Module Notifications Notifications=Notificacións -NoNotificationsWillBeSent=Ningunha notificación por mail está prevista para este evento e empresa -ANotificationsWillBeSent=Unha notificación vai ser enviada por mail -SomeNotificationsWillBeSent=%s notificaciones van ser enviadas por mail -AddNewNotification=Activar un novo destinatario de notificacións -ListOfActiveNotifications=Listaxe de destinatarios activos para notifiacións por mail -ListOfNotificationsDone=Listaxe de notificacións enviadas +NotificationsAuto=Notificacións Auto. +NoNotificationsWillBeSent=Non hai previstas notificacións automáticas por correo electrónico para este tipo de evento e para esta empresa +ANotificationsWillBeSent=Enviarase 1 notificación automática por correo electrónico +SomeNotificationsWillBeSent=As notificacións automáticas de %s enviaranse por correo electrónico +AddNewNotification=Subscribirse a unha nova notificación automática por correo electrónico (destino/evento) +ListOfActiveNotifications=Lista todas as subscricións activas (obxectivos/eventos) para a notificación automática por correo electrónico +ListOfNotificationsDone=Lista todas as notificacións automáticas enviadas por correo electrónico MailSendSetupIs=A configuración de mailings está a '%s'. Este modo non pode ser usado para enviar mails masivos. MailSendSetupIs2=Antes debe, cunha conta de administrador, no menú %sInicio - Configuración - E-Mails%s, cambiar o parámetro <strong>'%s'</strong> para usar o modo '%s'. Con este modo pode configurar un servidor SMTP do seu provedor de servizos de internet. -MailSendSetupIs3=If you have any questions on how to setup your SMTP server, you can ask to %s. -YouCanAlsoUseSupervisorKeyword=You can also add the keyword <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 +MailSendSetupIs3=Se ten algunha dúbida sobre como configurar o seu servidor SMTP, pode preguntar a %s. +YouCanAlsoUseSupervisorKeyword=Tamén pode engadir a palabra clave <strong>__SUPERVISOREMAIL__</strong> para que se envíe un correo electrónico ao supervisor do usuario (só funciona se se define un correo electrónico para este supervisor) +NbOfTargetedContacts=Número actual de correos electrónicos de contacto +UseFormatFileEmailToTarget=O ficheiro importado debe ter o formato <strong>email;name;name;other</strong> +UseFormatInputEmailToTarget=Introduza unha cadea co formato <strong>email;name;firstname;other</strong> +MailAdvTargetRecipients=Destinatarios (selección avanzada) +AdvTgtTitle=Encha os campos de entrada para preseleccionar os terceiros ou os contactos/enderezos aos que desexa dirixirse +AdvTgtSearchTextHelp=Use %% como comodíns. Por exemplo, para atopar todos os elementos como <b>jean, joe, jim</b>, pode introducir <b>j %% </b>, tamén pode usar; como separador de valor e usar ! para exceptuar este valor. Por exemplo <b>jean;joe;jim %% ;!jimo;!Jima %%</b> apuntará a todos jean, joe, ou comezaz con jim pero non jimo e non todo o que comeza con jima AdvTgtSearchIntHelp=Use un intervaldo para seleccionar valor int o float AdvTgtMinVal=Valor mínimo AdvTgtMaxVal=Valor máximo @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Crear filtro AdvTgtOrCreateNewFilter=Nome do novo filtro NoContactWithCategoryFound=Non atopáronse contactos/enderezos con algunha categoría NoContactLinkedToThirdpartieWithCategoryFound=Non atopáronse contactos/enderezos con algunha categoría -OutGoingEmailSetup=Configuración do correo saínte -InGoingEmailSetup=Configuración do correo entrante -OutGoingEmailSetupForEmailing=Configuración do correo saínte (para correo masivo) -DefaultOutgoingEmailSetup=Configuración do correo saínte predeterminada +OutGoingEmailSetup=Configuración de correos electrónicos saíntes +InGoingEmailSetup=Configuración de correos electrónicos entrantes +OutGoingEmailSetupForEmailing=Configuración do correos electrónicos saíntes (para o módulo %s) +DefaultOutgoingEmailSetup=A mesma configuración que a configuración de correos electrónicsoos saíntes predeterminados Information=Información ContactsWithThirdpartyFilter=Contactos con filtro de terceiros. -Unanswered=Unanswered -Answered=Answered -IsNotAnAnswer=Is not answer (initial email) -IsAnAnswer=Is an answer of an initial email +Unanswered=Sen resposta +Answered=Contestado +IsNotAnAnswer=É unha resposta (a un coreo electrónico recibido) +IsAnAnswer=É unha resposta de un coreo electrónico recibido +RecordCreatedByEmailCollector=Rexistro creado polo receptor de correo electrónico %s a partir do correo electrónico %s +DefaultBlacklistMailingStatus=Estado do contacto predeterminado para rexeitar correo electrónico masivo +DefaultStatusEmptyMandatory=Baleiro pero obrigatorio diff --git a/htdocs/langs/gl_ES/main.lang b/htdocs/langs/gl_ES/main.lang index 5ccf9173975..affae88508a 100644 --- a/htdocs/langs/gl_ES/main.lang +++ b/htdocs/langs/gl_ES/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=Sen prantilla dispoñible para este tipo de e-mail AvailableVariables=Variables de substitución dispoñibles NoTranslation=Sen tradución Translation=Tradución -EmptySearchString=Enter non empty search criterias +CurrentTimeZone=Zona horaria PHP (Servidor) +EmptySearchString=Entre unha cadea de busca non baleira +EnterADateCriteria=Engadir un criterio de data NoRecordFound=Non atopáronse rexistros NoRecordDeleted=Non foi eliminado o rexistro NotEnoughDataYet=Non hai suficintes datos @@ -37,18 +39,18 @@ Error=Erro Errors=Errores ErrorFieldRequired=O campo '%s' é obrigatorio ErrorFieldFormat=O campo '%s' ten un valor incorrecto -ErrorFileDoesNotExists=O arquivo %s non existe -ErrorFailedToOpenFile=Fallou ao abrir o arquivo %s +ErrorFileDoesNotExists=O ficheiro %s non existe +ErrorFailedToOpenFile=Fallou ao abrir o ficheiro %s ErrorCanNotCreateDir=Non pode crear o directorio %s ErrorCanNotReadDir=Non pode ler o directorio %s ErrorConstantNotDefined=Parámetro %s non definido ErrorUnknown=Erro descoñecido ErrorSQL=Erro de SQL -ErrorLogoFileNotFound=O arquivo do logo '%s' non atópase +ErrorLogoFileNotFound=O ficheiro do logo '%s' non atópase ErrorGoToGlobalSetup=Vaia á configuración 'Empresa/Organización' para corrixir isto ErrorGoToModuleSetup=Vaia á configuración do módulo para corrixir isto ErrorFailedToSendMail=Erro no envío do e-mail (emisor=%s, destinatario=%s) -ErrorFileNotUploaded=Non foi posible actualizar o arquivo. Revisa que o tamaño non excede o máximo permitido, que hai espazo libre no disco e que non hai xa un arquivo co mesmo nome no directorio. +ErrorFileNotUploaded=Non foi posible actualizar o ficheiro. Revisa que o tamaño non excede o máximo permitido, que hai espazo libre no disco e que non hai xa un ficheiro co mesmo nome no directorio. ErrorInternalErrorDetected=Erro detectado ErrorWrongHostParameter=Parámetro do servidor erroneo ErrorYourCountryIsNotDefined=O seu país non está definido. Vaia ao Inicio-Configuración-Edición e cubra novamente o formulario @@ -59,7 +61,7 @@ ErrorNoRequestInError=Ningunha petición con erro ErrorServiceUnavailableTryLater=Servizo non dispoñible actualmente. Ténteo de novo mais tarde. ErrorDuplicateField=Valor duplicado nun único campo ErrorSomeErrorWereFoundRollbackIsDone=Atopáronse algúns erros. Modificacións desfeitas. -ErrorConfigParameterNotDefined=O parámetro <b>%s</b> no está definido no arquivo de configuración Dolibarr <b>conf.php</b>. +ErrorConfigParameterNotDefined=O parámetro <b>%s</b> no está definido no ficheiro de configuración Dolibarr <b>conf.php</b>. ErrorCantLoadUserFromDolibarrDatabase=Imposible atopar ao usuario <b>%s</b> na base de datos Dolibarr. ErrorNoVATRateDefinedForSellerCountry=Error, ningún tipo de IVE definido para o país '%s'. ErrorNoSocialContributionForSellerCountry=Erro, ningún tipo de taxa social/fiscal definida para o país '%s'. @@ -75,16 +77,18 @@ ClickHere=Faga clic aquí Here=Aquí Apply=Aplicar BackgroundColorByDefault=Cor de fondo por defecto -FileRenamed=O arquivo foi renomeado correctamente -FileGenerated=O arquivo fo xerado correctamente -FileSaved=O arquivo foi gardado correctamente -FileUploaded=O arquivo subiuse correctamente +FileRenamed=O ficheiro foi renomeado correctamente +FileGenerated=O ficheiro fo xerado correctamente +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 arquivo" para subilo. +FileWasNotUploaded=Un ficheiro foi seleccionado para axuntar, pero ainda non foi subido. Faga clic 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 +DedicatedPageAvailable=Esta é unha páxina de axuda adicada relacionada coa pantalla actual +HomePage=Páxina Inicio RecordSaved=Rexistro gardado RecordDeleted=Rexistro eliminado RecordGenerated=Registro xerado @@ -109,7 +113,7 @@ RequestLastAccessInError=Último acceso á base de datos con erro na solicitude ReturnCodeLastAccessInError=Código de retorno de acceso á base de datos con erro para a última petición InformationLastAccessInError=Información do último erro de petición de acceso de base de datos DolibarrHasDetectedError=Dolibarr detectou un erro técnico -YouCanSetOptionDolibarrMainProdToZero=Pode ler o arquivo log ou establecer a opción $dolibarr_main_prod a '0' no seu arquivo de configuración para obter mais información. +YouCanSetOptionDolibarrMainProdToZero=Pode ler o ficheiro log ou establecer a opción $dolibarr_main_prod a '0' no seu ficheiro de configuración para obter mais información. InformationToHelpDiagnose=Esta información pode ser útil para propstas de diagnóstico (pode configurar a opción $dolibarr_main_prod to '1' para eliminar as notificacións) MoreInformation=Mais información TechnicalInformation=Información técnica @@ -150,12 +154,12 @@ Deprecated=Obsoleto Disable=Desactivar Disabled=Desactivado Add=Engadir -AddLink=Víncular -RemoveLink=Eliminar vínculo +AddLink=Ligar +RemoveLink=Eliminar ligazón AddToDraft=Engadir a borrador Update=Actualizar Close=Pechar -CloseAs=Set status to +CloseAs=Establecer estado a CloseBox=Eliminar panel do seu taboleiro Confirm=Confirmar ConfirmSendCardByMail=¿Realmente quere enviar o contido desta ficha por correo a <b>%s</b>? @@ -188,16 +192,16 @@ ShowCardHere=Ver a ficha Search=Procurar SearchOf=Procura SearchMenuShortCut=Ctrl + shift + f -QuickAdd=Quick add +QuickAdd=Engadido rápido QuickAddMenuShortCut=Ctrl + shift + l Valid=Validar Approve=Aprobar Disapprove=Desaprobar ReOpen=Reabrir -Upload=Actualizar arquivo -ToLink=Vínculo +Upload=Actualizar ficheiro +ToLink=Ligazón Select=Seleccionar -SelectAll=Select all +SelectAll=Seleccionar todo Choose=Escoller Resize=Redimensionar ResizeOrCrop=Cambiar o tamaño ou cortar @@ -220,6 +224,7 @@ Value=Valor PersonalValue=Valor persoalizado NewObject=Novo %s NewValue=Novo valor +OldValue=Valor anterior %s CurrentValue=Valor actual Code=Código Type=Tipo @@ -249,7 +254,7 @@ Limits=Límites Logout=Desconectar NoLogoutProcessWithAuthMode=Sen funcionalidades de desconexión co modo de autenticación <b>%s</b> Connection=Usuario -Setup=Config. +Setup=Configuración Alert=Alerta MenuWarnings=Alertas Previous=Anterior @@ -267,10 +272,10 @@ DateStart=Data de inicio DateEnd=Data de fin DateCreation=Data de creación DateCreationShort=Data creac. -IPCreation=Creation IP +IPCreation=Asignación IP DateModification=Data de modificación DateModificationShort=Data modif. -IPModification=Modification IP +IPModification=Modificación IP DateLastModification=Última data de modificación DateValidation=Data de validación DateClosing=Data de peche @@ -324,7 +329,7 @@ Morning=Na mañá Afternoon=Na tarde Quadri=Trimestre MonthOfDay=Mes do día -DaysOfWeek=Days of week +DaysOfWeek=Días da semana HourShort=H MinuteShort=min Rate=Tipo @@ -362,7 +367,7 @@ Amount=Importe AmountInvoice=Importe factura AmountInvoiced=Importe facturado AmountInvoicedHT=Importe facturado (excl. tax) -AmountInvoicedTTC=Amount invoiced (inc. tax) +AmountInvoicedTTC=Importe facturado (incl. tax) AmountPayment=Importe pagamento AmountHTShort=Base imp. AmountTTCShort=Importe @@ -375,7 +380,7 @@ MulticurrencyPaymentAmount=Importe total na divisa orixinal MulticurrencyAmountHT=Base impoñible na divisa orixinal MulticurrencyAmountTTC=Total na divisa orixinal MulticurrencyAmountVAT=Importe IVE na divisa orixinal -MulticurrencySubPrice=Amount sub price multi currency +MulticurrencySubPrice=Cantidade sub prezo divisa orixinal AmountLT1=Importe Imposto 2 AmountLT2=Importe IRPF AmountLT1ES=Importe RE @@ -433,9 +438,10 @@ RemainToPay=Resta por pagar Module=Módulo/Aplicación Modules=Módulos/Aplicacións Option=Opción +Filters=Filtros List=Listaxe FullList=Listaxe completo -FullConversation=Full conversation +FullConversation=Conversa completa Statistics=Estatísticas OtherStatistics=Outras estatísticas Status=Estado @@ -494,7 +500,7 @@ By=Por From=De FromDate=De FromLocation=De -at=at +at=a to=a To=a and=e @@ -517,7 +523,7 @@ Draft=Borrador Drafts=Borradores StatusInterInvoiced=Facturado Validated=Validado -ValidatedToProduce=Validated (To produce) +ValidatedToProduce=Valido (A fabricar) Opened=Activo OpenAll=Aberto (todo) ClosedAll=Pechado (Todo) @@ -533,7 +539,7 @@ Topic=Asunto ByCompanies=Por terceiros ByUsers=Por usuario Links=Ligazóns -Link=Vínculo +Link=Ligazón Rejects=Devolucións Preview=Vista previa NextStep=Seguinte paso @@ -650,6 +656,7 @@ SupplierPreview=Historial provedor ShowCustomerPreview=Amosar historial do cliente ShowSupplierPreview=Amosar historial do provedor RefCustomer=Ref. cliente +InternalRef=Ref. interna Currency=Moeda InfoAdmin=Información para os administradores Undo=Anular @@ -668,7 +675,7 @@ NotSent=Non enviado TextUsedInTheMessageBody=Texto no corpo da mensaxe SendAcknowledgementByMail=Enviar correo de confirmación SendMail=Enviar correo -Email=E-mail +Email=Correo electrónico NoEMail=Sen e-mail AlreadyRead=Xá lido NotRead=Non lido @@ -677,7 +684,7 @@ Owner=Propietario FollowingConstantsWillBeSubstituted=As seguintes constantes serán substituidas polo seu valor correspondente. Refresh=Refrescar BackToList=Voltar á listaxe -BackToTree=Back to tree +BackToTree=Volta á árbore GoBack=Voltar atrás CanBeModifiedIfOk=Pode modificarse se é valido CanBeModifiedIfKo=Pode modificarse se non é valido @@ -691,14 +698,14 @@ RecordsGenerated=%s rexistro(s) xerado(s) AutomaticCode=Creación automática de código FeatureDisabled=Función desactivada MoveBox=Mover panel -Offered=Oferta +Offered=Sen cargo NotEnoughPermissions=Non ten permisos para esta acción SessionName=Nome sesión Method=Método Receive=Recepción -CompleteOrNoMoreReceptionExpected=Completado ou no agárdase mais +CompleteOrNoMoreReceptionExpected=Completado ou non agárdase mais ExpectedValue=Valor agardado -ExpectedQty=Expected Qty +ExpectedQty=Cant. agardada PartialWoman=Parcial TotalWoman=Total NeverReceived=Nunca recibido @@ -715,7 +722,7 @@ MenuECM=Documentos MenuAWStats=AWStats MenuMembers=Membros MenuAgendaGoogle=Axenda Google -MenuTaxesAndSpecialExpenses=Taxes | Special expenses +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 CurrentUserLanguage=Idioma actual @@ -729,16 +736,16 @@ For=Para ForCustomer=Para cliente Signature=Sinatura DateOfSignature=Data da sinatura -HidePassword=Amosar comando con contrasinal oculta +HidePassword=Amosar comando con contrasinal oculto UnHidePassword=Amosar comando con contrasinal á vista Root=Raíz -RootOfMedias=Root of public medias (/medias) +RootOfMedias=Raiz de medias públicas (/medias) Informations=Información Page=Páxina Notes=Notas AddNewLine=Engadir nova liña -AddFile=Engadir arquivo -FreeZone=Free-text product +AddFile=Engadir ficheiro +FreeZone=Sen produtos/servizos predefinidos FreeLineOfType=Entrada libre, tipo: CloneMainAttributes=Clonar o obxecto con estes atributos principais ReGeneratePDF=Xerar de novo o PDF @@ -751,7 +758,7 @@ WarningYouAreInMaintenanceMode=Atención, está en modo mantemento, só o login CoreErrorTitle=Erro de sistema CoreErrorMessage=O sentimos, pero aconteceu un erro. Póñase en contacto co administrador do sistema para comprobar os rexistros ou desactive $dolibarr_main_prod=1 para obter mais información. CreditCard=Tarxeta de crédito -ValidatePayment=Validar pago +ValidatePayment=Validar pagamento CreditOrDebitCard=Tarxeta de crédito ou débito FieldsWithAreMandatory=Os campos marcados cun <b>%s</b> son obrigatorios FieldsWithIsForPublic=Os campos marcados co <b>%s</b> amosaránse na lista pública de membros. Se non desexa velos, desactive a caixa "público". @@ -761,7 +768,7 @@ NotSupported=Non soportado RequiredField=Campo obrigatorio Result=Resultado ToTest=Probar -ValidateBefore=Item must be validated before using this feature +ValidateBefore=Para poder usar esta función debe validarse a ficha Visibility=Visibilidade Totalizable=Totalizable TotalizableDesc=Este campo é totalizable nas listaxes @@ -778,18 +785,18 @@ IM=Mensaxería instantánea NewAttribute=Novo atributo AttributeCode=Código URLPhoto=Url da foto/logo -SetLinkToAnotherThirdParty=Vincular a outro terceiro -LinkTo=Vincular a -LinkToProposal=Vincular a pedido -LinkToOrder=Vincular a pedido -LinkToInvoice=Vincular a factura -LinkToTemplateInvoice=Vincular a prantilla de factura -LinkToSupplierOrder=Vincular a pedido a provedor -LinkToSupplierProposal=Vincular a orzamento de provedor -LinkToSupplierInvoice=Vincular a factura de provedor -LinkToContract=Vincular a contrato -LinkToIntervention=Vincular a intervención -LinkToTicket=Link to ticket +SetLinkToAnotherThirdParty=Ligar a outro terceiro +LinkTo=Ligar a +LinkToProposal=Ligar a orzamento +LinkToOrder=Ligar a pedimento +LinkToInvoice=Ligar a factura +LinkToTemplateInvoice=Ligar a prantilla de factura +LinkToSupplierOrder=Ligar a pedimento a provedor +LinkToSupplierProposal=Ligar a orzamento de provedor +LinkToSupplierInvoice=Ligar a factura de provedor +LinkToContract=Ligar a contrato +LinkToIntervention=Ligar a intervención +LinkToTicket=Ligar a ticket CreateDraft=Crear borrador SetToDraft=Voltar a borrador ClickToEdit=Clic para editar @@ -823,8 +830,8 @@ Access=Acceso SelectAction=Seleccione acción SelectTargetUser=Seleccionar usuario/empregado de destino HelpCopyToClipboard=Use Ctrl+C para copiar ao portapapeis -SaveUploadedFileWithMask=Gardar o arquivo no servidor co nome "<strong>%s</strong>" (senón "%s") -OriginFileName=Nome do arquivo orixe +SaveUploadedFileWithMask=Gardar o ficheiro no servidor co nome "<strong>%s</strong>" (senón "%s") +OriginFileName=Nome do ficheiro orixe SetDemandReason=Definir orixe SetBankAccount=Definir conta bancaria AccountCurrency=Moeda da conta @@ -857,12 +864,12 @@ Sincerely=Atentamente ConfirmDeleteObject=¿Está certo de querer eliminar esta liña? DeleteLine=Eliminación de liña ConfirmDeleteLine=¿Está certo de querer eliminar esta liña? -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=Erro: o ficheiro non foi xerado. Comprobe que o comando 'pdftk' está instalado nun directorio incluído na variable de entorno $ PATH (só linux / unix) ou contacte co administrador do sistema. NoPDFAvailableForDocGenAmongChecked=Sen PDF dispoñibles para a xeración de documentos entre os rexistros seleccionados TooManyRecordForMassAction=Demasiados rexistros seleccionados para a acción masiva. A acción está restrinxida a unha listaxe de %s rexistros. NoRecordSelected=Sen rexistros seleccionados -MassFilesArea=Área de arquivos xerados por accións masivas -ShowTempMassFilesArea=Amosar área de arquivos xerados por accións masivas +MassFilesArea=Área de ficheiros xerados por accións masivas +ShowTempMassFilesArea=Amosar área de ficheiros xerados por accións masivas ConfirmMassDeletion=Confirmación borrado masivo ConfirmMassDeletionQuestion=¿Estás certo de querer eliminar os %s rexistro(s) seleccionado(s)? RelatedObjects=Obxectos relacionados @@ -888,8 +895,8 @@ Miscellaneous=Miscelánea Calendar=Calendario GroupBy=Agrupado por... ViewFlatList=Ver listaxe plana -ViewAccountList=View ledger -ViewSubAccountList=View subaccount ledger +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) @@ -915,7 +922,7 @@ ConfirmSetToDraft=¿Está certo de querer voltar ao estado Borrador? ImportId=ID de importación Events=Eventos EMailTemplates=Prantillas E-mail -FileNotShared=Arquivo non compartido ao público externo +FileNotShared=Ficheiro non compartido ao público externo Project=Proxecto Projects=Proxectos LeadOrProject=Oportunidade | Proxecto @@ -930,7 +937,7 @@ LineNb=Líña no. IncotermLabel=Incoterms TabLetteringCustomer=Letras do cliente TabLetteringSupplier=Letras do provedor -Monday=lúns +Monday=luns Tuesday=martes Wednesday=mércores Thursday=xoves @@ -944,7 +951,7 @@ ThursdayMin=Xo FridayMin=Ve SaturdayMin=Sa SundayMin=Do -Day1=lúns +Day1=luns Day2=martes Day3=mércores Day4=xoves @@ -958,39 +965,39 @@ ShortThursday=X ShortFriday=V ShortSaturday=S ShortSunday=D -one=one -two=two -three=three -four=four -five=five -six=six -seven=seven -eight=eight -nine=nine -ten=ten -eleven=eleven -twelve=twelve -thirteen=thirdteen -fourteen=fourteen -fifteen=fifteen -sixteen=sixteen -seventeen=seventeen -eighteen=eighteen -nineteen=nineteen -twenty=twenty -thirty=thirty -forty=forty -fifty=fifty -sixty=sixty -seventy=seventy -eighty=eighty -ninety=ninety -hundred=hundred -thousand=thousand -million=million -billion=billion -trillion=trillion -quadrillion=quadrillion +one=un +two=dous +three=tres +four=catro +five=cinco +six=seis +seven=sete +eight=oito +nine=nove +ten=dez +eleven=once +twelve=doce +thirteen=trece +fourteen=catorce +fifteen=quince +sixteen=dezaseis +seventeen=dezasete +eighteen=dezaoito +nineteen=dezanove +twenty=vinte +thirty=trinta +forty=corenta +fifty=cincuente +sixty=sesenta +seventy=setenta +eighty=oitenta +ninety=noventa +hundred=cen +thousand=mil +million=millón +billion=billón +trillion=trillón +quadrillion=quadrillón SelectMailModel=Seleccione unha prantilla de correo SetRef=Establecer ref Select2ResultFoundUseArrows=Algúns resultados atopados. Use as frechas para seleccionar. @@ -1021,7 +1028,7 @@ SearchIntoCustomerShipments=Envíos a clientes SearchIntoExpenseReports=Informes de gastos SearchIntoLeaves=Día libre SearchIntoTickets=Tickets -SearchIntoCustomerPayments=Customer payments +SearchIntoCustomerPayments=Pagamentos dos clientes SearchIntoVendorPayments=Pagamentos a provedores SearchIntoMiscPayments=Pagamentos varios CommentLink=Comentarios @@ -1042,7 +1049,7 @@ KeyboardShortcut=Atallo de teclado AssignedTo=Asignada a Deletedraft=Eliminar borrador ConfirmMassDraftDeletion=Confirmación de borrado en masa -FileSharedViaALink=Ficheiro compartido ao través dun vínculo +FileSharedViaALink=Ficheiro compartido ao través dunha ligazón SelectAThirdPartyFirst=Selecciona un terceiro antes... YouAreCurrentlyInSandboxMode=Estás actualmente no modo %s "sandbox" Inventory=Inventario @@ -1078,32 +1085,38 @@ ContactAddedAutomatically=Engadido contacto dende os contactos de terceiros More=Mais ShowDetails=Amosar detalles CustomReports=Informe de custos -StatisticsOn=Statistics on -SelectYourGraphOptionsFirst=Select your graph options to build a graph +StatisticsOn=Estatísticas en +SelectYourGraphOptionsFirst=Seleccione as súas opcións de gráfico para construir un gráfico Measures=Medidas -XAxis=X-Eixes -YAxis=Y-Eixes -StatusOfRefMustBe=Status de %s debe ser %s -DeleteFileHeader=Confirmar borrado de ficheiro +XAxis=X-Eixe +YAxis=Y-Eixe +StatusOfRefMustBe=O estado de %s ten que ser %s +DeleteFileHeader=Confirmar ficheiro a eliminar DeleteFileText=Está certo de querer borrar este ficheiro? -ShowOtherLanguages=Amosar outras linguas -SwitchInEditModeToAddTranslation=Cambiar a modo edición para axuntar traducións a esta lingua -NotUsedForThisCustomer=Non usado para este cliente -AmountMustBePositive=Importe ten que ser positivo +ShowOtherLanguages=Amosar outras lingoas +SwitchInEditModeToAddTranslation=Cambie ao modo de edición para engadir traduciáns a esta lingoa +NotUsedForThisCustomer=Non usado neste cliente +AmountMustBePositive=O importe ten que ser positivo ByStatus=By status InformationMessage=Información -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 +Used=Usado +ASAP=Tan pronto como sexa posible +CREATEInDolibarr=Rexistro %s creado +MODIFYInDolibarr=Rexistro %s modificado +DELETEInDolibarr=Rexistro %s eliminado +VALIDATEInDolibarr=Rexistro %s validado +APPROVEDInDolibarr=Rexistro %s aprobado +DefaultMailModel=Modelo de correo predeterminado +PublicVendorName=Nome público do provedor +DateOfBirth=Data de nacemento +SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry=O token de seguridade caducou e a acción foi cancelada. Prégase intente de novo +UpToDate=Ao día +OutOfDate=Caducado +EventReminder=Recordatorio de evento +UpdateForAllLines=Actualizar todas as liñas +OnHold=Agardando +Civility=Cortesía +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 diff --git a/htdocs/langs/gl_ES/members.lang b/htdocs/langs/gl_ES/members.lang index 819a5522627..aefe3b7e52d 100644 --- a/htdocs/langs/gl_ES/members.lang +++ b/htdocs/langs/gl_ES/members.lang @@ -11,7 +11,7 @@ MembersTickets=Etiquetas membros FundationMembers=Membros da asociación ListOfValidatedPublicMembers=Listaxe de membros públicos validados ErrorThisMemberIsNotPublic=Este membro non é público -ErrorMemberIsAlreadyLinkedToThisThirdParty=Outro membro (nombre: <b>%s</b>, login: <b>%s</b>) está ligado ao terceiro <b>%s</b>. Elimine a ligazón existente xa que un terceiro só pode estar ligado a un só membro (e viceversa). +ErrorMemberIsAlreadyLinkedToThisThirdParty=Outro membro (nome: <b>%s</b>, login: <b>%s</b>) está ligado ao terceiro <b>%s</b>. Elimine a ligazón existente xa que un terceiro só pode estar ligado a un só membro (e viceversa). ErrorUserPermissionAllowsToLinksToItselfOnly=Por razóns de seguridade, debe posuir os dereitos de modificación de todos os usuarios para poder ligar un membro a un usuario que non sexa vostede mesmo mesmo. SetLinkToUser=Ligar a un usuario Dolibarr SetLinkToThirdParty=Ligar a un terceiro Dolibarr @@ -19,8 +19,8 @@ MembersCards=Carnés de membros MembersList=Listaxe de membros MembersListToValid=Listaxe de membros borrador (a validar) MembersListValid=Listaxe de membros validados -MembersListUpToDate=List of valid members with up-to-date subscription -MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListUpToDate=Lista de membros válidos con subscrición actualizada +MembersListNotUpToDate=Lista de membros válidos con data vencida na subscrición MembersListResiliated=Listaxe dos membros dados de baixa MembersListQualified=Listaxe dos membros cualificados MenuMembersToValidate=Membros borrador @@ -32,7 +32,7 @@ DateSubscription=Data afiliación DateEndSubscription=Data fin afiliación EndSubscription=Fin afiliación SubscriptionId=ID afiliación -WithoutSubscription=Without subscription +WithoutSubscription=Sen subscrición MemberId=ID membro NewMember=Novo membro MemberType=Tipo de membro @@ -64,23 +64,23 @@ ConfirmDeleteMemberType=¿Está certo de querer eliminar este tipo de membro? MemberTypeDeleted=Tipo de membro eliminado MemberTypeCanNotBeDeleted=O tipo de membro non pode ser eliminado NewSubscription=Nova afiliación -NewSubscriptionDesc=Utilice este formulario para rexistrarse como un novo membro daa asociación. Para unha renovación, se xa é membro, póñase en contacto coa asociación ao través do mail %s. +NewSubscriptionDesc=Utilice este formulario para rexistrarse como un novo membro da asociación. Para unha renovación, se xa é membro, póñase en contacto coa asociación ao través do mail %s. Subscription=Afiliación Subscriptions=Afiliacións SubscriptionLate=En atraso SubscriptionNotReceived=Afiliación non recibida ListOfSubscriptions=Listaxe de afiliacións -SendCardByMail=Enviar ficha por mail +SendCardByMail=Enviar ficha por correo electrónico AddMember=Crear membro NoTypeDefinedGoToSetup=Ningún tipo de membro definido. Vaia a Configuración -> Tipos de membros NewMemberType=Novo tipo de membro WelcomeEMail=E-mail -SubscriptionRequired=Precisa afilición +SubscriptionRequired=Precisa afiliación DeleteType=Eliminar VoteAllowed=Voto autorizado Physical=Físico Moral=Xurídico -MorAndPhy=Moral and Physical +MorAndPhy=Xurídico e Físico Reenable=Reactivar ResiliateMember=Dar de baixa a un membro ConfirmResiliateMember=¿Está certo de querer dar de baixa a este membro? @@ -116,7 +116,7 @@ SendingEmailOnMemberValidation=Enviar mail na validación dun novo membro SendingEmailOnNewSubscription=Enviar mail nunha nova afiliación SendingReminderForExpiredSubscription=Enviar un recordatorio para afiliación caducada SendingEmailOnCancelation=Enviar mail nunha cancelación -SendingReminderActionComm=Sending reminder for agenda event +SendingReminderActionComm=Enviando lembranzas desde os eventos da axenda # Topic of email templates YourMembershipRequestWasReceived=A súa membresía foi recibida. YourMembershipWasValidated=A súa membresía foi validada. @@ -125,26 +125,26 @@ SubscriptionReminderEmail=Recordatorio de afiliación YourMembershipWasCanceled=A súa membresía foi cancelada. CardContent=Contido da súa ficha de membro # Text of email templates -ThisIsContentOfYourMembershipRequestWasReceived=We want to let you know that your membership request was received.<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 -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 +ThisIsContentOfYourMembershipRequestWasReceived=Queremos comunicarlle que se recibiu a súa solicitude de adhesión <br><br> +ThisIsContentOfYourMembershipWasValidated=Queremos comunicarlle que a súa subscrición foi validada coa seguinte información:<br><br> +ThisIsContentOfYourSubscriptionWasRecorded=Queremos comunicarlle de que se rexistrou a súa nova subscrición<br><br> +ThisIsContentOfSubscriptionReminderEmail=Queremos comunicarlle que a súa subscrición está a piques de caducar ou xa caducou (__MEMBER_LAST_SUBSCRIPTION_DATE_END__). Agardamos que a renove<br><br> +ThisIsContentOfYourCard=Este é un resumo da información que temos sobre vostede. Póñase en contacto connosco se hai algo incorrecto<br><br> +DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Asunto do correo electrónico de notificación recibido en caso de inscrición automática dun convidado +DescADHERENT_AUTOREGISTER_NOTIF_MAIL=Contido do correo electrónico de notificación recibido en caso de inscrición automática dun convidado +DescADHERENT_EMAIL_TEMPLATE_AUTOREGISTER=Modelo de correo electrónico para usar para envios de correo electrónico a membros na subscrición automática de membros +DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Modelo de correo electrónico para usar para enviar correo electrónico a membros coa validación de membros +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_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 +DescADHERENT_CARD_TYPE=Formato de páxinas de tarxetas +DescADHERENT_CARD_HEADER_TEXT=Texto impreso na parte superior das tarxetas de membro +DescADHERENT_CARD_TEXT=Texto impreso nas tarxetas de membro (aliñar á esquerda) +DescADHERENT_CARD_TEXT_RIGHT=Texto impreso nas tarxetas de membro (aliñar á dereita) +DescADHERENT_CARD_FOOTER_TEXT=Texto impreso na parte inferior das tarxetas de membro ShowTypeCard=Ver tipo '%s' HTPasswordExport=Xeración archivo htpassword NoThirdPartyAssociatedToMember=Ningún terceiro asociado a este membro @@ -167,7 +167,7 @@ MembersStatisticsByState=Estatísticas de membros por provincia/pais MembersStatisticsByTown=Estatísticas de membros por poboación MembersStatisticsByRegion=Estatísticas de membros por rexión NbOfMembers=Número de membros -NbOfActiveMembers=Number of current active members +NbOfActiveMembers=Número de membros activos actuais NoValidatedMemberYet=Ningún membro validado atopado MembersByCountryDesc=Esta pantalla presenta unha estatística do número de membros por países. Porén, a gráfica utiliza o servizo en líña de gráficas de Google e só é operativo cando ten operativa unha conexión a Internet. MembersByStateDesc=Esta pantalla presenta unha estatística do número de membros por paises/provincias/comunidades @@ -177,7 +177,7 @@ MenuMembersStats=Estatísticas LastMemberDate=Última data de membro LatestSubscriptionDate=Data da última cotización MemberNature=Natureza do membro -MembersNature=Nature of members +MembersNature=Natureza dos membros Public=Información pública NewMemberbyWeb=Novo membro engadido. Agardando validación NewMemberForm=Novo formulario de membro diff --git a/htdocs/langs/gl_ES/modulebuilder.lang b/htdocs/langs/gl_ES/modulebuilder.lang index 460aef8103b..c5e4535245b 100644 --- a/htdocs/langs/gl_ES/modulebuilder.lang +++ b/htdocs/langs/gl_ES/modulebuilder.lang @@ -1,142 +1,143 @@ # 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 -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=Go to 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=(Delete 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 -ModuleMustBeEnabled=The module/application must be enabled first -IncludeRefGeneration=The reference of object must be generated automatically -IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference -IncludeDocGeneration=I want to generate some documents from the object -IncludeDocGenerationHelp=If you check this, some code will be generated to add a "Generate document" box on the record. -ShowOnCombobox=Show value into combobox -KeyForTooltip=Key for tooltip -CSSClass=CSS Class -NotEditable=Not editable -ForeignKey=Foreign key -TypeOfFieldsHelp=Type of fields:<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. +ModuleBuilderDesc=Esta ferramenta só debe ser usada por usuarios ou desenvolvedores experimentados. Ofrece utilidades para construír ou editar o seu propio módulo. Aquí está a documentación para o <a href="%s" target="_blank"> desenvolvemento manual alternativo </a>. +EnterNameOfModuleDesc=Introduza o nome do módulo/aplicación a crear sen espazos. Use maiúsculas para separar palabras (por exemplo: MyModule, EcommerceForShop, SyncWithMySystem ...) +EnterNameOfObjectDesc=Introduza o nome do obxecto a crear sen espazos. Use maiúsculas para separar palabras (por exemplo: MyObject, Student, Teacher ...). Xerarase o ficheiro de clase CRUD, pero tamén o ficheiro API, páxinas para listar/engadir/editar/eliminar obxectos e ficheiros SQL. +ModuleBuilderDesc2=Ruta onde se xeran/editan os módulos (primeiro directorio para módulos externos definidos en %s): <strong>%s </strong> +ModuleBuilderDesc3=Atopáronse módulos xerados/editables: <strong>%s </strong> +ModuleBuilderDesc4=Detéctase un módulo como "editable" cando o ficheiro <strong>%s </strong> existe no raíz do directorio do módulo +NewModule=Novo +NewObjectInModulebuilder=Novo obxecto +ModuleKey=Chave de módulo +ObjectKey=Chave do obxecto +ModuleInitialized=Módulo inicializado +FilesForObjectInitialized=Os ficheiros do novo obxecto '%s' inicializados +FilesForObjectUpdated=Actualizáronse os ficheiros do obxecto '%s' (ficheiros .sql e ficheiro .class.php) +ModuleBuilderDescdescription=Introduza aquí toda a información xeral que describe o seu módulo. +ModuleBuilderDescspecifications=Pode introducir aquí unha descrición detallada das especificacións do seu módulo que aínda non están estruturadas noutras lapelas. Entón ten ao seu alcance todas as regras a desenvolver. Este contido de texto tamén se incluirá na documentación xerada (ver última lapela). Podes usar o formato Markdown, pero recoméndase usar o formato Asciidoc (comparación entre .md e .asciidoc: http://asciidoctor.org/docs/user-manual/#compared-to-markdown). +ModuleBuilderDescobjects=Defina aquí os obxectos que desexa xestionar co seu módulo. Xerarase unha clase DAO CRUD, ficheiros SQL, páxina para listar o rexistro de obxectos, para crear/editar/ver un rexistro e unha API. +ModuleBuilderDescmenus=Esta guía está adicada a definir as entradas de menú proporcionadas polo seu módulo. +ModuleBuilderDescpermissions=Esta guía está adicada a definir os novos permisos que desexa proporcionar co seu módulo. +ModuleBuilderDesctriggers=Esta é a vista dos triggers proporcionados polo seu módulo. Para incluír o código executado cando se inicia un evento comercial desencadeado, só ten que editar este ficheiro. +ModuleBuilderDeschooks=Esta lapela está adicada aos hooks. +ModuleBuilderDescwidgets=Esta guía está adicada a xestionar/construír widgets. +ModuleBuilderDescbuildpackage=Pode xerar aquí un ficheiro de paquete "listo para distribuír" (un ficheiro .zip normalizado) do seu módulo e un ficheiro de documentación "listo para distribuír". Só ten que facer clic no botón para crear o paquete ou o ficheiro de documentación. +EnterNameOfModuleToDeleteDesc=Pode eliminar o seu módulo. AVISO: Eliminaranse todos os ficheiros de codificación do módulo (xerados ou creados manualmente) E os datos estruturados e a documentación. +EnterNameOfObjectToDeleteDesc=Pode eliminar un obxecto. AVISO: Eliminaranse todos os ficheiros de codificación (xerados ou creados manualmente) relacionados co obxecto. +DangerZone=Zona de perigo +BuildPackage=Construír o paquete +BuildPackageDesc=Pode xerar un paquete zip da súa aplicación para que estea listo para distribuílo en calquera Dolibarr. Tamén podes distribuílo ou vendelo no mercado como <a href="https://www.dolistore.com"> DoliStore.com </a>. +BuildDocumentation=Documentación de compilación +ModuleIsNotActive=Este módulo aínda non está activado. Vaia a %s para activalo ou faga clic aquí +ModuleIsLive=Este módulo activouse. Calquera cambio pode romper unha función activa actualmente. +DescriptionLong=Descrición longa +EditorName=Nome do editor +EditorUrl=URL do editor +DescriptorFile=Ficheiro descriptor do módulo +ClassFile=Arquivo para a clase PHP DAO CRUD +ApiClassFile=Ficheiro para a clase PHP API +PageForList=Páxina PHP para a lista de rexistros +PageForCreateEditView=Páxina PHP para crear/editar/ver un rexistro +PageForAgendaTab=Páxina PHP para a lapela de evento +PageForDocumentTab=Páxina PHP para a lapela de documento +PageForNoteTab=Páxina PHP para o separador de notas +PageForContactTab=Páxina PHP para o separador de contacto +PathToModulePackage=Ruta ao zip do paquete de módulo/aplicación +PathToModuleDocumentation=Ruta ao ficheiro da documentación do módulo/aplicación (%s) +SpaceOrSpecialCharAreNotAllowed=Non se permiten espazos nin caracteres especiais. +FileNotYetGenerated=O ficheiro aínda non foi xerado +RegenerateClassAndSql=Forzar a actualización dos ficheiros .class e .sql +RegenerateMissingFiles=Xerar ficheiros que faltan +SpecificationFile=Arquivo de documentación +LanguageFile=Ficheiro para o idioma +ObjectProperties=Propiedades do obxecto +ConfirmDeleteProperty=Está certo de que quere eliminar a propiedade <strong>%s </strong>? Isto cambiará o código na clase PHP pero tamén eliminará a columna da definición de obxecto da táboa. +NotNull=Non NULO +NotNullDesc=1= Establecer a base de datos como NOT NULL. -1= Permitir valores nulos e forzar o valor NULL se está baleiro ('' ou 0). +SearchAll=Usado para "buscar todo" +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 +ArrayOfKeyValuesDesc=Matriz de chaves e valores se o campo é unha lista combinada con valores fixos +WidgetFile=Ficheiro widget +CSSFile=Ficheiro CSS +JSFile=Ficheiro Javascript +ReadmeFile=Ficheiro Léame +ChangeLog=Ficheiro ChangeLog +TestClassFile=Ficheiro para a clase PHP Test +SqlFile=Ficheiro SQL +PageForLib=Ficheiro para a biblioteca común de PHP +PageForObjLib=Ficheiro da biblioteca PHP dedicado a obxectos +SqlFileExtraFields=Ficheiro SQL para atributos complementarios +SqlFileKey=Ficheiro SQL para chaves +SqlFileKeyExtraFields=Ficheiro SQL para chaves de atributos complementarios +AnObjectAlreadyExistWithThisNameAndDiffCase=Xa existe un obxecto con este nome e un caso diferente +UseAsciiDocFormat=Pode usar o formato Markdown, pero recoméndase usar o formato Asciidoc (comparación entre .md e .asciidoc: http://asciidoctor.org/docs/user-manual/#compared-to-markdown) +IsAMeasure=É unha medida +DirScanned=Directorio analizado +NoTrigger=Non hai trigger +NoWidget=Non hai widget +GoToApiExplorer=Explorador de API +ListOfMenusEntries=Listaxe de entradas de menú +ListOfDictionariesEntries=Listaxe de entradas de dicionarios +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 +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) +SpecDefDesc=Introduza aquí toda a documentación que desexa proporcionar co seu módulo que non estexa xa definida por outras pestanas. Pode usar .md ou mellor, a rica sintaxe .asciidoc. +LanguageDefDesc=Introduza neste ficheiro toda a clave e a tradución para cada ficheiro de idioma. +MenusDefDesc=Defina aquí os menús proporcionados polo seu módulo +DictionariesDefDesc=Defina aquí os dicionarios proporcionados polo seu módulo +PermissionsDefDesc=Defina aquí os novos permisos proporcionados polo seu módulo +MenusDefDescTooltip=Os menús proporcionados polo seu módulo/aplicación están definidos no array <strong> $this->menús </strong> no ficheiro descriptor do módulo. Pode editar este ficheiro manualmente ou usar o editor incrustado. <br> <br> Nota: Unha vez definido (e reactivado o módulo), os menús tamén son visibles no editor de menú dispoñible para os usuarios administradores en %s. +DictionariesDefDescTooltip=Os dicionarios proporcionados polo seu módulo/aplicación están definidos no array <strong> $this->dicionarios </strong> no ficheiro descriptor do módulo. Pode editar este ficheiro manualmente ou usar o editor incrustado. <br> <br> Nota: Unha vez definido (e reactivado o módulo), os dicionarios tamén son visibles na área de configuración para os usuarios administradores en %s. +PermissionsDefDescTooltip=Os permisos proporcionados polo seu módulo/aplicación defínense no array <strong> $this->rights </strong> no ficheiro descriptor do módulo. Pode editar este ficheiro manualmente ou usar o editor incrustado. <br> <br> Nota: Unha vez definido (e reactivado o módulo), os permisos son visibles na configuración de permisos predeterminada %s. +HooksDefDesc=Define na propiedade <b> module_parts ['hooks'] </b>, no descriptor do módulo, o contexto dos hooks que desexa xestionar (a listaxe de contextos pódese atopar mediante unha busca en '<b> initHooks (</b> 'no código principal). <br> Edite o ficheiro de hooks para engadir o código das funcións (as funcións pódense atopar mediante unha busca en' <b> executeHooks </b> 'no código principal). +TriggerDefDesc=Defina no ficheiro de activación o código que desexa executar para cada evento empresarial executado. +SeeIDsInUse=Ver identificacións en uso na súa instalación +SeeReservedIDsRangeHere=Ver o rango de identificacións reservadas +ToolkitForDevelopers=Kit de ferramentas para desenvolvedores Dolibarr +TryToUseTheModuleBuilder=Se ten coñecemento de SQL e PHP, pode empregar o asistente para o creador de módulos nativos. <br> Active o módulo <strong>%s </strong> e use o asistente facendo clic no <span class="fa fa-bug "> </span> no menú superior dereito. <br> Aviso: esta é unha función avanzada para desenvolvedores, <b> non </b> experimente no seu sitio de produción. +SeeTopRightMenu=Ver <span class="fa fa-bug"> </span> no menú superior dereito +AddLanguageFile=Engadir ficheiro de idioma +YouCanUseTranslationKey=Pode usar aquí unha chave que é a chave de tradución que se atopa no ficheiro de idioma (ver lapela "Idiomas") +DropTableIfEmpty=(Destruír a táboa se está baleira) +TableDoesNotExists=A táboa %s non existe +TableDropped=Eliminouse a táboa %s +InitStructureFromExistingTable=Construír a cadea de array de estruturas dunha táboa existente +UseAboutPage=Desactivar a páxina sobre +UseDocFolder=Desactivar o cartafol de documentación +UseSpecificReadme=Usar un ReadMe específico +ContentOfREADMECustomized=Nota: o contido do ficheiro README.md foi substituído polo valor específico definido na configuración de ModuleBuilder. +RealPathOfModule=Ruta real do módulo +ContentCantBeEmpty=O contido do ficheiro non pode estar baleiro +WidgetDesc=Pode xerar e editar aquí os widgets que se incorporarán ao seu módulo. +CSSDesc=Pode xerar e editar aquí un ficheiro con CSS personalizado incrustado no seu módulo. +JSDesc=Pode xerar e editar aquí un ficheiro con Javascript personalizado incrustado co seu módulo. +CLIDesc=Pode xerar aquí algúns scripts de liña de comandos que desexa proporcionar co seu módulo. +CLIFile=Ficheiro CLI +NoCLIFile=Non hai ficheiros CLI +UseSpecificEditorName = Usar un nome de editor específico +UseSpecificEditorURL = Usar unha URL de editor específico +UseSpecificFamily = Usar unha familia específica +UseSpecificAuthor = Usar un autor específico +UseSpecificVersion = Usar unha versión inicial específica +IncludeRefGeneration=A referencia do obxecto debe xerarse automaticamente +IncludeRefGenerationHelp=Sinale esta opción se quere incluír código para xestionar a xeración automaticamente da referencia +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 +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) +AsciiToHtmlConverter=Conversor de ascii a HTML +AsciiToPdfConverter=Conversor de ascii a PDF +TableNotEmptyDropCanceled=A táboa non está baleira. Cancelouse a eliminación. +ModuleBuilderNotAllowed=O creador de módulos está dispoñible pero non permitido ao seu usuario. diff --git a/htdocs/langs/gl_ES/mrp.lang b/htdocs/langs/gl_ES/mrp.lang index 84a0177e4de..26bc6d491ef 100644 --- a/htdocs/langs/gl_ES/mrp.lang +++ b/htdocs/langs/gl_ES/mrp.lang @@ -1,80 +1,104 @@ -Mrp=Ordes de fabricación -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 Material -BOMsSetup=Setup of module BOM -ListOfBOMs=List of bills of material - BOM -ListOfManufacturingOrders=List of Manufacturing Orders -NewBOM=New bill of material -ProductBOMHelp=Product to create with this BOM.<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 material %s ? -ConfirmCloneMo=Are you sure you want to clone the Manufacturing Order %s ? -ManufacturingEfficiency=Manufacturing efficiency -ConsumptionEfficiency=Consumption efficiency -ValueOfMeansLoss=Value of 0.95 means an average of 5%% of loss during the production -ValueOfMeansLossForProductProduced=Value of 0.95 means an average of 5%% of loss of produced product -DeleteBillOfMaterials=Delete Bill Of Materials -DeleteMo=Delete Manufacturing Order -ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? -ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? -MenuMRP=Ordes de fabricación -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 +Mrp=Pedimentos de fabricación +MOs=Pedimentos de fabricación +ManufacturingOrder=Pedimento de fabricación +MRPDescription=Módulo para xestionar pedimentos de fabricación (MO). +MRPArea=Área MRP +MrpSetupPage=Configuración do módulo MRP +MenuBOM=Listaxe de material +LatestBOMModified=Últimas %s listaxes de materiais modificadas +LatestMOModified=Últimos %s pedimentos de material modificados +Bom=Listaxes de material +BillOfMaterials=Listaxe de material +BOMsSetup=Configuración do módulo BOM +ListOfBOMs=Listaxe de facturas de materiais - BOM +ListOfManufacturingOrders=Listaxe de pedimentos de fabricación +NewBOM=Nova listaxe de materiais +ProductBOMHelp=Produto a crear con este BOM.<br>Nota: os produtos coa propiedade 'Natureza do producto'='Materia prima' non están visibles nesta listaxe. +BOMsNumberingModules=Modelos de numeración BOM +BOMsModelModule=Prantillas de documentos BOMS +MOsNumberingModules=Modelos de numeración MO +MOsModelModule=Prantillas de documentos MO +FreeLegalTextOnBOMs=Texto libre no documento BOM +WatermarkOnDraftBOMs=Marca de auga no borrador MO +FreeLegalTextOnMOs=Texto libre no documento MO +WatermarkOnDraftMOs=Marca de auga no borrador MO +ConfirmCloneBillOfMaterials=¿Está certo de querer clonar esta listaxe de materiais %s? +ConfirmCloneMo=Está certo de querer clonar este pedimento de facturación %s? +ManufacturingEfficiency=Eficiencia de fabricación +ConsumptionEfficiency=Eficienci de consumo +ValueOfMeansLoss=O valor de 0.95 significa un promedio de 5%% de perda durante a produción +ValueOfMeansLossForProductProduced=O valor de 0,95 significa unha media do 5 %% da perda do produto producido +DeleteBillOfMaterials=Eliminar listaxe de material +DeleteMo=Borra pedimentos de manufacturación +ConfirmDeleteBillOfMaterials=¿Está certo de querer eliminar esta Listaxe de Material? +ConfirmDeleteMo=¿Está certo de querer eliminar esta Listaxe de Material? +MenuMRP=Pedimentos de manufacturación +NewMO=Novo pedimento de manufacturación +QtyToProduce=Cant. a producir +DateStartPlannedMo=Data de inicio prevista +DateEndPlannedMo=Date de finalización prevista +KeepEmptyForAsap=Baleiro quere dicir 'Tan pronto como sexa posible' +EstimatedDuration=Duración estimada +EstimatedDurationDesc=Duración estimada para manufacturar este produto usando este BOM +ConfirmValidateBom=Está certo de que desexa validar a listaxe de materias coa referencia <strong>%s</strong> (poderá usala para crear novos pedimentos de fabricación) +ConfirmCloseBom=¿Está certo de que quere cancelar esta listaxe de materiales (xa non poderá usalo para crear novos pedimentos de fabricación)? +ConfirmReopenBom=Está certo de que quere voltar a abrir esta listaxe de materiales (poderá usala para construír novos pedimentoss de fabricación) +StatusMOProduced=Producido +QtyFrozen=Cant. conxelada +QuantityFrozen=Cantidade conxelada +QuantityConsumedInvariable=Cando se sinala esta marca, a cantidade consumida sempre é o valor definido e non é relativa á cantidade producida. +DisableStockChange=Cambio de stock desactivado +DisableStockChangeHelp=Cando se sinala esta marca, non hai cambio de stock neste produto, calquera que sexa a cantidade consumida +BomAndBomLines=Listaxes de material e liñas +BOMLine=Liña de BOM +WarehouseForProduction=Almacén para produción +CreateMO=Crear MO +ToConsume=A consumir +ToProduce=A poducir +QtyAlreadyConsumed=Cant. xa consumida +QtyAlreadyProduced=Cant. xa producida +QtyRequiredIfNoLoss=Cant. precisa se non hai perda (a eficiencia de fabricación é do 100 %%) +ConsumeOrProduce=Consumir ou producir +ConsumeAndProduceAll=Consumir e producir todo +Manufactured=Fabricado +TheProductXIsAlreadyTheProductToProduce=O produto a engadir xa é o produto a fabricar. +ForAQuantityOf=Para producir unha cantidade de %s +ConfirmValidateMo=Está certo de que desexa validar este pedimento de fabricación? +ConfirmProductionDesc=Ao facer clic en '%s', validará o consumo e/ou a produción para as cantidades establecidas. Isto tamén actualizará o stock e rexistrará os movementos de stock. +ProductionForRef=Produción de %s +AutoCloseMO=Pecha automaticamente o pedimento de fabricación se se alcanzan cantidades a consumir e producir +NoStockChangeOnServices=Non hai cambio de stock nos servizos +ProductQtyToConsumeByMO=Cantidade de produto aínda por consumir por MO aberto +ProductQtyToProduceByMO=Cantidade de produto aínda por producir por MO aberto +AddNewConsumeLines=Engadir nova liña para consumir +ProductsToConsume=Produtos para consumir +ProductsToProduce=Produtos para fabricar +UnitCost=Custo unitario +TotalCost=Custo total +BOMTotalCost=O custo para producir este BOM está en función do custo de cada cantidade e produto a consumir (use o prezo de custo se se define, se non o prezo medio ponderado se se define, se non o mellor prezo de compra) +GoOnTabProductionToProduceFirst=Primeiro debe iniciar a produción para pechar un pedimento de fabricación (ver a pestana '%s'). Pero pode cancelalo. +ErrorAVirtualProductCantBeUsedIntoABomOrMo=Non se pode usar un produto composto nunha lista de materiales nin nunha MO +Workstation=Estación de traballo +Workstations=Estacións de traballo +WorkstationsDescription=Xestión de estacións de traballo +WorkstationSetup = Configuración de estacións de traballo +WorkstationSetupPage = Páxina de configuración de estacións de traballo +WorkstationAbout = Acerca das estacións de traballo +WorkstationAboutPage = Páxina acerca das estacións de traballo +WorkstationList=Listaxe de estacións de traballo +WorkstationCreate=Axuntar nova estación de traballo +ConfirmEnableWorkstation=Está certo de querer activar a estación de traballo <b>%s</b>? +EnableAWorkstation=Activar a estación de traballo +ConfirmDisableWorkstation=Está certo de querer desactivar a estación de traballo <b>%s</b>? +DisableAWorkstation=Desactivar unha estación de traballo +DeleteWorkstation=Quitar +NbOperatorsRequired=Número de operadores precisos +THMOperatorEstimated=THM estimada operador +THMMachineEstimated=THM estimada máquina +WorkstationType=Tipo de estación de traballo +Human=Humano +Machine=Máquina +HumanMachine=Humano/Máquina +WorkstationArea=Area estación de traballo +Machines=Máquinas +THMEstimatedHelp=Esta taxa permite definir un custo estimado do artigo diff --git a/htdocs/langs/gl_ES/multicurrency.lang b/htdocs/langs/gl_ES/multicurrency.lang index c9ec381e5b6..27cbebdc7b8 100644 --- a/htdocs/langs/gl_ES/multicurrency.lang +++ b/htdocs/langs/gl_ES/multicurrency.lang @@ -20,3 +20,19 @@ MulticurrencyPaymentAmount=Importe total, moeda orixe AmountToOthercurrency=Cantidade a (en moeda da conta receptora) CurrencyRateSyncSucceed=Taxa da moeda sincronizada correctamente MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT=Use a moeda do documento para pagos online +TabTitleMulticurrencyRate=Listaxe de taxas +ListCurrencyRate=Listaxe de tipos de cambio da moeda +CreateRate=Crea unha taxa +FormCreateRate=Creación de taxa +FormUpdateRate=Modificación de taxa +successRateCreate=Engadiuse a taxa de moeda %s á base de datos +ConfirmDeleteLineRate=Está certo de querer eliminar a taxa de %s da moeda %s na data de %s? +DeleteLineRate=Limpar taxa +successRateDelete=Taxa eliminada +errorRateDelete=Erro cando eliminaba taxa +successUpdateRate=Modificación feita +ErrorUpdateRate=Erro cando modificaba a taxa +Codemulticurrency=Código moeda +UpdateRate=Cambiar a taxa +CancelUpdate=Cancelar +NoEmptyRate=O campo de taxa non debe estar baleiro diff --git a/htdocs/langs/gl_ES/oauth.lang b/htdocs/langs/gl_ES/oauth.lang index 075ff49a895..1355842921f 100644 --- a/htdocs/langs/gl_ES/oauth.lang +++ b/htdocs/langs/gl_ES/oauth.lang @@ -1,32 +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 +ConfigOAuth=Configuración Oauth +OAuthServices=Servizos OAuth +ManualTokenGeneration=Xeración manual de token +TokenManager=Xestor de token +IsTokenGenerated=¿Está o token xerado? +NoAccessToken=Non hai token de acceso gardado na base de datos local +HasAccessToken=Foi xerado e gardado na base de datos local un token +NewTokenStored=Token recibido e gardado +ToCheckDeleteTokenOnProvider=Faga clic aquí para comprobar/eliminar a autorización gardada polo fornecedor de OAuth %s +TokenDeleted=Token eliminado +RequestAccess=Faga clic aquí para consultar/renovar acceso e recibir un novo token a gardar +DeleteAccess=Faga clic aquí para eliminar o token +UseTheFollowingUrlAsRedirectURI=Utilice o seguinte URL como redirección URI cando cree as súas credenciais co seu provedor de OAuth: +ListOfSupportedOauthProviders=Introduza as credenciais proporcionadas polo seu provedor OAuth2. Aquí só figuran os provedores compatibles con OAuth2. Estes servizos poden ser empregados por outros módulos que precisan autenticación OAuth2. +OAuthSetupForLogin=Páxina para xerar un token OAuth +SeePreviousTab=Ver a lapela previa +OAuthIDSecret=ID OAuth e contrasinal +TOKEN_REFRESH=Actualizar o token actual +TOKEN_EXPIRED=Token expirado +TOKEN_EXPIRE_AT=Token expira o +TOKEN_DELETE=Eliminar token gardado +OAUTH_GOOGLE_NAME=Servicio Oauth Google +OAUTH_GOOGLE_ID=Id Oauth Google +OAUTH_GOOGLE_SECRET=Oauth Google Secret +OAUTH_GOOGLE_DESC=Vaia a <a class="notasortlink" href="https://console.developers.google.com/" target="_blank">esta páxina</a> e a "Credenciais" para crear credenciais Oauth +OAUTH_GITHUB_NAME=Servizo Oauth GitHub +OAUTH_GITHUB_ID=Id Oauth Github +OAUTH_GITHUB_SECRET=Oauth GitHub Secret +OAUTH_GITHUB_DESC=Vaia a <a class="notasortlink" href="https://github.com/settings/developers" target="_blank">esta páxina</a> e a "Rexistrar unha nova aplicación" para crear crecenciais Oauth +OAUTH_STRIPE_TEST_NAME=Test OAuth Stripe OAUTH_STRIPE_LIVE_NAME=OAuth Stripe Live diff --git a/htdocs/langs/gl_ES/opensurvey.lang b/htdocs/langs/gl_ES/opensurvey.lang index 9f83fcfb4f3..852bda171e5 100644 --- a/htdocs/langs/gl_ES/opensurvey.lang +++ b/htdocs/langs/gl_ES/opensurvey.lang @@ -1,61 +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=Data límite -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 +Survey=Enquisa +Surveys=Enquisas +OrganizeYourMeetingEasily=Organice facilmente as súas reunións e enquisas. Primeiro selecciona o tipo de enquisa ... +NewSurvey=Nova enquisa +OpenSurveyArea=Área de enquisas +AddACommentForPoll=Pode engadir un comentario á enquisa ... +AddComment=Engadir comentario +CreatePoll=Crear enquisa +PollTitle=Título da enquisa +ToReceiveEMailForEachVote=Reciba un correo electrónico por cada voto +TypeDate=Escriba a data +TypeClassic=Tipo estándar +OpenSurveyStep2=Seleccione as súas datas entre os días libres (gris). Os días seleccionados son verdes. Pode deseleccionar un día seleccionado previamente facendo clic de novo nel +RemoveAllDays=Eliminar todos os días +CopyHoursOfFirstDay=Copiar as horas do primeiro día +RemoveAllHours=Eliminar todas as horas +SelectedDays=Días seleccionados +TheBestChoice=A mellor opción actualmente é +TheBestChoices=As mellores opcións son actualmente +with=con +OpenSurveyHowTo=Se acepta votar nesta enquisa, ten que dar o seu nome, escoller os valores que mellor se axusten a vostede e validalo co botón ao final da liña. +CommentsOfVoters=Comentarios dos votantes +ConfirmRemovalOfPoll=Está certo de que quere eliminar esta votación (e todos os votos) +RemovePoll=Eliminar enquisa +UrlForSurvey=URL para comunicarse para ter acceso directo á enquisa +PollOnChoice=Está a crear unha enquisa para facer unha opción múltiple para unha enquisa. Primeiro introduza todas as opcións posibles para a súa enquisa: +CreateSurveyDate=Crear unha enquisa de data +CreateSurveyStandard=Crear unha enquisa estándar +CheckBox=caixa de verificación simple +YesNoList=Lista (baleiro/si/non) +PourContreList=Listaxe (baleiro/a favor/en contra) +AddNewColumn=Engadir nova columna +TitleChoice=Etiqueta de elección +ExportSpreadsheet=Exportar folla de cálculo co resultado +ExpireDate=Datos límite +NbOfSurveys=Número de enquisas +NbOfVoters=Non. de votantes +SurveyResults=Resultados +PollAdminDesc=Está autorizado a cambiar todas as liñas de voto desta enquisa co botón "Editar". Tamén pode eliminar unha columna ou unha liña con %s. Tamén pode engadir unha nova columna con %s. +5MoreChoices=5 opcións máis +Against=Contra +YouAreInivitedToVote=Está convidado a votar nesta enquisa +VoteNameAlreadyExists=Este nome xa se usou para esta enquisa +AddADate=Engade unha data +AddStartHour=Engadir hora de inicio +AddEndHour=Engadir hora de finalización +votes=voto(s) +NoCommentYet=Aínda non se enviaron comentarios para esta enquisa +CanComment=Os votantes poden comentar na enquisa +CanSeeOthersVote=Os votantes poden ver o voto doutras persoas +SelectDayDesc=Para cada día seleccionado, pode escoller ou non o horario de reunión no seguinte formato: <br> - baleiro, <br> - "8h", "8H" ou "8:00" para dar unha hora de comezo da reunión, <br> - "8-11", "8h-11h", "8H-11H" ou "8: 00-11: 00" para dar a hora de inicio e final da reunión, <br> - "8h15-11h15 "," 8H15-11H15 "ou" 8: 15-11: 15 "para o mesmo pero con minutos. +BackToCurrentMonth=Voltar ao mes actual +ErrorOpenSurveyFillFirstSection=Non encheu a primeira sección da creación da enquisa +ErrorOpenSurveyOneChoice=Introduza polo menos unha opción +ErrorInsertingComment=Houbo un erro ao inserir o seu comentario +MoreChoices=Introduza máis opcións para os votantes +SurveyExpiredInfo=Pechouse a votación ou caducou o tempo de votación. +EmailSomeoneVoted=%s encheu unha liña. \nPode atopar a súa enquisa na ligazón:\n %s +ShowSurvey=Amosar a enquisa +UserMustBeSameThanUserUsedToVote=Debe ter votado e usar o mesmo nome de usuario que o usado para votar, para publicar un comentario diff --git a/htdocs/langs/gl_ES/orders.lang b/htdocs/langs/gl_ES/orders.lang index 2bb9401c922..c7a3ac01b3d 100644 --- a/htdocs/langs/gl_ES/orders.lang +++ b/htdocs/langs/gl_ES/orders.lang @@ -53,7 +53,7 @@ StatusOrderToBill=Emitido StatusOrderApproved=Aprobado StatusOrderRefused=Rexeitado StatusOrderReceivedPartially=Recibido parcialmente -StatusOrderReceivedAll=Todos os productos recibidos +StatusOrderReceivedAll=Todos os produtos recibidos ShippingExist=Existe unha expedición QtyOrdered=Cant. pedida ProductQtyInDraft=Cantidades en borrador de pedimentos @@ -80,22 +80,22 @@ NoOrder=Sen pedimentos NoSupplierOrder=Sen orde de compra LastOrders=Últimos %s pedimentos de clientes LastCustomerOrders=Últimos %s pedimentos de clientes -LastSupplierOrders=Últimas %s ordes de compra +LastSupplierOrders=Últimas %s pedimentos de provedor LastModifiedOrders=Últimos %s pedimentos de clientes modificados AllOrders=Todos os pedimentos NbOfOrders=Número de pedimentos OrdersStatistics=Estatísticas de pedimentos de clientes -OrdersStatisticsSuppliers=Estatísticas de ordes de pedimento +OrdersStatisticsSuppliers=Estatísticas de pedimentos a provedor NumberOfOrdersByMonth=Número de pedimentos por mes AmountOfOrdersByMonthHT=Importe total de pedimentos por mes (sen IVE) ListOfOrders=Listaxe de pedimentos CloseOrder=Pechar pedimento -ConfirmCloseOrder=¿Está seguro de querer clasificar este pedimento como enviado? Una vez enviado un pedimento, solo podrá facturarse -ConfirmDeleteOrder=¿Está seguro de querer eliminar este pedimento? -ConfirmValidateOrder=¿Está seguro de querer validar este pedimento bajo la referencia <b>%s</b> ? -ConfirmUnvalidateOrder=¿Está seguro de querer restaurar el pedimento <b>%s</b> al estado borrador? -ConfirmCancelOrder=¿Está seguro de querer anular este pedimento? -ConfirmMakeOrder=¿Está seguro de querer confirmar este pedimento en fecha de <b>%s</b> ? +ConfirmCloseOrder=¿Está certo de querer clasificar este pedimento como enviado? Una vez enviado un pedimento, solo podrá facturarse +ConfirmDeleteOrder=¿Está certo de querer eliminar este pedimento? +ConfirmValidateOrder=¿Está certo de querer validar este pedimento bajo la referencia <b>%s</b> ? +ConfirmUnvalidateOrder=¿Está certo de querer restaurar el pedimento <b>%s</b> al estado borrador? +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 @@ -112,13 +112,13 @@ OrderMode=Método de pedimento AuthorRequest=Autor/Solicitante UserWithApproveOrderGrant=Usuarios habilitados para aprobar os pedimentos PaymentOrderRef=Pago pedimento %s -ConfirmCloneOrder=¿Está seguro de querer clonar este pedimento <b>%s</b>? +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=Purchase Order %s received %s -SupplierOrderSubmitedInDolibarr=Purchase Order %s submited -SupplierOrderClassifiedBilled=Purchase Order %s set billed +SupplierOrderReceivedInDolibarr=Pedimento de provedor %s recibido %s +SupplierOrderSubmitedInDolibarr=Pedimento de provedor %s solicitado +SupplierOrderClassifiedBilled=Pedimento de provedor %s facturado OtherOrders=Outros pedimentos ##### Types de contacts ##### TypeContact_commande_internal_SALESREPFOLL=Responsable seguemento do pedimento cliente @@ -161,29 +161,29 @@ CloseReceivedSupplierOrdersAutomatically=Pechar pedimento a modo "%s" automatica SetShippingMode=Indica o modo de envío WithReceptionFinished=Con recepción finalizada #### supplier orders status -StatusSupplierOrderCanceledShort=Anulada +StatusSupplierOrderCanceledShort=Anulado StatusSupplierOrderDraftShort=Borrador StatusSupplierOrderValidatedShort=Validado StatusSupplierOrderSentShort=Expedición en curso StatusSupplierOrderSent=Envío en curso -StatusSupplierOrderOnProcessShort=Pedido +StatusSupplierOrderOnProcessShort=Pedimento StatusSupplierOrderProcessedShort=Procesado StatusSupplierOrderDelivered=Emitido StatusSupplierOrderDeliveredShort=Emitido StatusSupplierOrderToBillShort=Emitido -StatusSupplierOrderApprovedShort=Aprobada -StatusSupplierOrderRefusedShort=Rexeitada +StatusSupplierOrderApprovedShort=Aprobado +StatusSupplierOrderRefusedShort=Rexeitado StatusSupplierOrderToProcessShort=A procesar StatusSupplierOrderReceivedPartiallyShort=Recibido parcialmente StatusSupplierOrderReceivedAllShort=Produtos recibidos -StatusSupplierOrderCanceled=Anulada +StatusSupplierOrderCanceled=Anulado StatusSupplierOrderDraft=Borrador (é preciso validar) StatusSupplierOrderValidated=Validado -StatusSupplierOrderOnProcess=Pedido - Agardando recepción -StatusSupplierOrderOnProcessWithValidation=Pedido - Agardando recibir ou validar +StatusSupplierOrderOnProcess=Pedimento - Agardando recepción +StatusSupplierOrderOnProcessWithValidation=Pedimento - Agardando recibir ou validar StatusSupplierOrderProcessed=Procesado StatusSupplierOrderToBill=Emitido -StatusSupplierOrderApproved=Aprobada -StatusSupplierOrderRefused=Rexeitada +StatusSupplierOrderApproved=Aprobado +StatusSupplierOrderRefused=Rexeitado StatusSupplierOrderReceivedPartially=Recibido parcialmente -StatusSupplierOrderReceivedAll=Todos os productos recibidos +StatusSupplierOrderReceivedAll=Todos os produtos recibidos diff --git a/htdocs/langs/gl_ES/other.lang b/htdocs/langs/gl_ES/other.lang index c476990f905..5a52b287896 100644 --- a/htdocs/langs/gl_ES/other.lang +++ b/htdocs/langs/gl_ES/other.lang @@ -1,154 +1,156 @@ # 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 -BirthdayDate=Birthday date -DateToBirth=Birth date -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 -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 -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__ -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 -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=tonne +SecurityCode=Código seguridade +NumberingShort=Nº +Tools=Utilidades +TMenuTools=Utilidades +ToolsDesc=Todas as utilidades que non están incluidas noutras entradas do menú atópanse aquí.<br>Todas as utilidades están dispoñibles no menú da esquerda. +Birthday=Aniversario +BirthdayAlertOn=Alerta de aniversario activa +BirthdayAlertOff=Alerta de aniversario inactiva +TransKey=Tradución da clave TransKey +MonthOfInvoice=Mes (número 1-12) da data da factura +TextMonthOfInvoice=Mes (texto) da data da factura +PreviousMonthOfInvoice=Mes anterior (número 1-12) da data da factura +TextPreviousMonthOfInvoice=Mes anterior (texto) da data da factura +NextMonthOfInvoice=Mes seguinte (número 1-12) da data da factura +TextNextMonthOfInvoice=Mes seguinte (texto) da data da factura +PreviousMonth=Mes previo +CurrentMonth=Mes actual +ZipFileGeneratedInto=Ficheiro zip xerado en <b>%s</b>. +DocFileGeneratedInto=Ficheiro documento xerado en <b>%s</b>. +JumpToLogin=Desconectado. Ir á páxina de inicio de sesión ... +MessageForm=Mensaxe no formulario de pago en liña +MessageOK=Mensaxe na páxina de retorno de pago confirmado +MessageKO=Mensaxe na páxina de retorno de pago cancelado +ContentOfDirectoryIsNotEmpty=O contido deste directorio non está baleiro +DeleteAlsoContentRecursively=Comprobe para eliminar todo o contido recursivamente +PoweredBy=Fornecido by +YearOfInvoice=Ano da data da factura +PreviousYearOfInvoice=Ano previo da data da factura +NextYearOfInvoice=Ano seguinte da data da factura +DateNextInvoiceBeforeGen=Data da próxima factura (antes da xeración) +DateNextInvoiceAfterGen=Data da próxima factura (despois da xeración) +GraphInBarsAreLimitedToNMeasures=Os gráficos están limitados ao % medidos en modo "Barras". O modo 'Liñas' foi automáticamente seleccionado no seu lugar. +OnlyOneFieldForXAxisIsPossible=Actualmente só e posible 1 campo como eixo X. Só escolleu o primeiro campo seleccionado. +AtLeastOneMeasureIsRequired=Requírese polo menos1 campo para medir +AtLeastOneXAxisIsRequired=Reuírese polo menos un campo para o eixo X +LatestBlogPosts=Última publicación no blog +Notify_ORDER_VALIDATE=Validación pedimento cliente +Notify_ORDER_SENTBYMAIL=Envío pedimento do cliente por correo electrónico +Notify_ORDER_SUPPLIER_SENTBYMAIL=Envío pedimento ao provedor por correo electrónico +Notify_ORDER_SUPPLIER_VALIDATE=Pedimento a provedor aprobado +Notify_ORDER_SUPPLIER_APPROVE=Pedimento a provedor aprobado +Notify_ORDER_SUPPLIER_REFUSE=Pedimento a provedor rexeitado +Notify_PROPAL_VALIDATE=Validación orzamento cliente +Notify_PROPAL_CLOSE_SIGNED=Orzamento cliente pechado como asinado +Notify_PROPAL_CLOSE_REFUSED=Orzamento cliente pechado como rexeitado +Notify_PROPAL_SENTBYMAIL=Envío orzamento cliente por correo electrónico +Notify_WITHDRAW_TRANSMIT=Transmisión domiciliación +Notify_WITHDRAW_CREDIT=Abono domiciliación +Notify_WITHDRAW_EMIT=Emisión domiciliación +Notify_COMPANY_CREATE=Creación terceiro +Notify_COMPANY_SENTBYMAIL=Correos enviados dende a ficha do terceiro +Notify_BILL_VALIDATE=Validada factura a cliente +Notify_BILL_UNVALIDATE=Non validade factura a cliente +Notify_BILL_PAYED=Factura do cliente pagada +Notify_BILL_CANCEL=Cancelación factura a cliente +Notify_BILL_SENTBYMAIL=Envío factura a cliente por correo electrónico +Notify_BILL_SUPPLIER_VALIDATE=Validación factura de provedor +Notify_BILL_SUPPLIER_PAYED=Factura do provedor pagada +Notify_BILL_SUPPLIER_SENTBYMAIL=Envío factura de provedor por correo electrónico +Notify_BILL_SUPPLIER_CANCELED=Factura del provedor cancelada +Notify_CONTRACT_VALIDATE=Validación contrato +Notify_FICHINTER_VALIDATE=Intervención validada +Notify_FICHINTER_ADD_CONTACT=Contacto engadido a intervención +Notify_FICHINTER_SENTBYMAIL=Intervención enviada por correo electrónico +Notify_SHIPPING_VALIDATE=Envío validado +Notify_SHIPPING_SENTBYMAIL=Expedición enviada por correo electrónico +Notify_MEMBER_VALIDATE=Membro validado +Notify_MEMBER_MODIFY=Membro modificado +Notify_MEMBER_SUBSCRIPTION=Membro afiliado +Notify_MEMBER_RESILIATE=Membro de baixa +Notify_MEMBER_DELETE=Eliminación membro +Notify_PROJECT_CREATE=Creación de proxecto +Notify_TASK_CREATE=Tarefa creada +Notify_TASK_MODIFY=Tarefa modificada +Notify_TASK_DELETE=Tarefa eliminada +Notify_EXPENSE_REPORT_VALIDATE=Informe de gastos validado (requírese aprobación) +Notify_EXPENSE_REPORT_APPROVE=Informe de gastos aprobado +Notify_HOLIDAY_VALIDATE=Petición días libres validada (requírese aprobación) +Notify_HOLIDAY_APPROVE=Petición días libres aprobada +Notify_ACTION_CREATE=Acción engadida na Axenda +SeeModuleSetup=Vexa a configuración do módulo %s +NbOfAttachedFiles=Número ficheiros/documentos axuntados +TotalSizeOfAttachedFiles=Tamaño total dos ficheiros/documentos axuntados +MaxSize=Tamaño máximo +AttachANewFile=Axuntar novo ficheiro/documento +LinkedObject=Obxecto ligado +NbOfActiveNotifications=Número de notificacións (nº de destinatarios) +PredefinedMailTest=__(Hello)__\nEste é un correo de proba enviado a __EMAIL__.\nAs dúas liñas están separadas por un retorno de carro.\n\n__USER_SIGNATURE__ +PredefinedMailTestHtml=__(Hello)__\nEste é un correo de <b> proba</b> (a palabra proba debe estar en negrita). <br> As dúas liñas están separadas por un retorno de carro. <br> <br> __USER_SIGNATURE__ +PredefinedMailContentContract=__(Ola)__\n\n\n__(Sinceiramente)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendInvoice=__(Hello)__\n\nAquí atopará a factura __REF__\n\n__ONLINE_PAYMENT_TEXT_AND_URL__\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendInvoiceReminder=__(Hello)__\n\nGostariamos de advertirlle que a factura __REF__ parece non estar paga. Así que enviamoslle de novo a factura no ficheiro axuntado, coma un recordatorio.\n\n__ONLINE_PAYMENT_TEXT_AND_URL__\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendProposal=__(Hello)__\n\nPoñémonos en contacto con vostede para facilitarlle o orzamento __PREF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendSupplierProposal=__(Hello)__\n\nPoñémonos en contacto con vostede para facilitarlle o orzamento __PREF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendOrder=__(Hello)__\n\nPoñémonos en contacto con vostede para facilitarlle o pedimento __PREF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPoñémonos en contacto con vostede para facilitarlle o pedimento __PREF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPoñémonos en contacto con vostede para facilitarlle a factura __PREF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendShipping=__(Hello)__\n\nPoñémonos en contacto con vostede para facilitarlle o envío __PREF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendFichInter=__(Hello)__\n\nPoñémonos en contacto con vostede para facilitarllea intervención __PREF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentLink=Pode facer clic na seguinte ligazón para realizar o seu pago, se aínda non o fixo.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sinceiramente)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendActionComm=Lembranza do evento "__EVENT_LABEL__" on __EVENT_DATE__ at __EVENT_TIME__<br><br>Está é uynha mensaxe automática, prégase non respostar. +DemoDesc=Dolibarr é un ERP/CRM que suporta varios módulos de negocio. Non ten sentido unha demostración que amose xa que este escenario non sucede nunca (varios centos dispoñibles). Así, hai varios perfís dispoñibles de demostración. +ChooseYourDemoProfil=Escolla o perfil de demostración que mellor se adapte as súas necesidades ... +ChooseYourDemoProfilMore=... ou constrúa seu perfil<br>(modo de selección manual) +DemoFundation=Xestión de membros dunha asociación +DemoFundation2=Xestión de membros e contas bancarias dunha asociación +DemoCompanyServiceOnly=Empresa ou traballador por conta propia vendendo só servizos +DemoCompanyShopWithCashDesk=Xestión dunha tenda con caixa +DemoCompanyProductAndStocks=Empresa vendendo produtos con punto de venda +DemoCompanyManufacturing=Empresa fabricadora de produtos +DemoCompanyAll=Empresa con actividades múltiples (todos os módulos principais) +CreatedBy=Creado por %s +ModifiedBy=Modificado por %s +ValidatedBy=Validado por %s +ClosedBy=Pechado por %s +CreatedById=Id usuario que foi creado +ModifiedById=Id de usuario no que foi realizado último cambio +ValidatedById=Id usuario que validou +CanceledById=Id usuario que canelou +ClosedById=Id usuario que pechou +CreatedByLogin=Login usuario que creou +ModifiedByLogin=Login de usuario que fixo o último cambio +ValidatedByLogin=Login usuario que validou +CanceledByLogin=Login usuario que cancelou +ClosedByLogin=Login usuario que pechou +FileWasRemoved=O ficheiro %s foi eliminado +DirWasRemoved=O directorio %s foi eliminado +FeatureNotYetAvailable=Funcionalidade ainda non dispoñible nesta versión actual +FeaturesSupported=Funcionalidades dispoñibles +Width=Ancho +Height=Alto +Depth=Fondo +Top=Superior +Bottom=Inferior +Left=Esquerda +Right=Dereita +CalculatedWeight=Peso calculado +CalculatedVolume=Volume calculado +Weight=Peso +WeightUnitton=tonelada WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg -WeightUnitpound=pound -WeightUnitounce=ounce -Length=Length +WeightUnitpound=libra +WeightUnitounce=onza +Length=Lonxitude LengthUnitm=m LengthUnitdm=dm LengthUnitcm=cm LengthUnitmm=mm -Surface=Area +Surface=Área SurfaceUnitm2=m² SurfaceUnitdm2=dm² SurfaceUnitcm2=cm² @@ -162,125 +164,127 @@ VolumeUnitcm3=cm³ (ml) VolumeUnitmm3=mm³ (µl) VolumeUnitfoot3=ft³ VolumeUnitinch3=in³ -VolumeUnitounce=ounce -VolumeUnitlitre=litre -VolumeUnitgallon=gallon +VolumeUnitounce=onza +VolumeUnitlitre=litro +VolumeUnitgallon=galón 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. -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 -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 +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. +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. +ProfIdShortDesc=<b> Id. Profesional% s </b> é unha información que depende dun país de terceiros. <br> Por exemplo, para o país <b>% s </b>, é o código <b>% s </ b>. +DolibarrDemo=Demo de Dolibarr ERP/CRM +StatsByNumberOfUnits=Estatísticas para suma de unidades de produto/servizo +StatsByNumberOfEntities=Estatísticas en número de identidades referentes (nº de facturas o pedimentos...) +NumberOfProposals=Número de pedimentos +NumberOfCustomerOrders=Número de pedimentos de clientes +NumberOfCustomerInvoices=Número de facturas a clientes +NumberOfSupplierProposals=Número de orzamentos de provedores +NumberOfSupplierOrders=Número de pedimentos a provedores +NumberOfSupplierInvoices=Número de facturas de provedores +NumberOfContracts=Número de contratos +NumberOfMos=Número de pedimentos de fabricación +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 +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 +EMailTextInterventionAddedContact=Unha nova intervencións %s foi asignada a vostede +EMailTextInterventionValidated=Ficha intervención %s validada +EMailTextInvoiceValidated=Factura %s validada +EMailTextInvoicePayed=A factura %s foi pagada. +EMailTextProposalValidated=O orzamento %s do seu interese foi validado. +EMailTextProposalClosedSigned=O orzamento %s foi pechado e asinado +EMailTextOrderValidated=Pedimento %s validado. +EMailTextOrderApproved=Pedimento %s aprobado +EMailTextOrderValidatedBy=Pedimento %s rexistrado por %s. +EMailTextOrderApprovedBy=Pedimento %s aprobado por %s +EMailTextOrderRefused=Pedimento %s rexeitado +EMailTextOrderRefusedBy=Pedimento %s rexeitado por %s +EMailTextExpeditionValidated=Envío %s validado. +EMailTextExpenseReportValidated=Informe de gastos %s validado. +EMailTextExpenseReportApproved=Informe de gastos %s aprobado. +EMailTextHolidayValidated=Petición de días libres %s validada. +EMailTextHolidayApproved=Petición de días libres %s aprobada. +EMailTextActionAdded=A acción %s foi engadida na axenda +ImportedWithSet=Lote de importación +DolibarrNotification=Notificación automática +ResizeDesc=Introduza o novo ancho <b>O</b> a nova altura. A relación conservase ao cambiar o tamaño ... +NewLength=Novo ancho +NewHeight=Nova altura +NewSizeAfterCropping=Novas dimensións desois de recortar +DefineNewAreaToPick=Establezca la zona de imagen a conservar (clic izquierdo sobre la imagen y arrastre hasta la esquina opuesta) +CurrentInformationOnImage=Esta herramienta le permite cambiar el tamaño o cuadrar la imagen. Aquí hay información sobre la imagen que se está editando +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". +UseAdvancedPerms=Usar os dereitos avanzados nos permisos dalgúns módulos +FileFormat=Formato de ficheiro +SelectAColor=Escolla unha cor +AddFiles=Engadir ficheiros +StartUpload=Transferir +CancelUpload=Cancelar a transferencia +FileIsTooBig=O ficheiro é grande de mais +PleaseBePatient=Pregamos sexa paciente... +NewPassword=Novo contrasinal +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 +YouMustClickToChange=Porén, debe facer click primeiro na seguinte ligazón para validar este 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 +Chart=Gráfico +PassEncoding=Cifrado de contrasinal +PermissionsAdd=Permisos engadidos +PermissionsDelete=Permisos eliminados +YourPasswordMustHaveAtLeastXChars=O seu contrasinal debe ter alo menos <strong>%s</strong> caracteres +YourPasswordHasBeenReset=O seu contrasinal foi restablecido con éxito +ApplicantIpAddress=Enderezo IP do solicitante +SMSSentTo=SMS enviado a %s +MissingIds=IDs perdidos +ThirdPartyCreatedByEmailCollector=Terceiro creado polo recolector de correos electrónicos do MSGID de correo electrónico %s +ContactCreatedByEmailCollector=Contacto/enderezo creado polo recolector de correos electrónicos do MSGID de correo electrónico %s +ProjectCreatedByEmailCollector=Proxecto creado polo recolector de correos electrónicos do MSGID de correo electrónico %s +TicketCreatedByEmailCollector=Ticket creado polo recolector de correos electrónicos do MSGID de correo electrónico %s +OpeningHoursFormatDesc=Use o - para separar horario de apertura e peche.<br>Use o espazo para engadir diferentes rangos.<br>Exemplo: 8-12 14-18 +PrefixSession=Prefixo do Id da sesión ##### 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) +ExportsArea=Área de exportación +AvailableFormats=Formatos dispoñibles +LibraryUsed=Librería utilizada +LibraryVersion=Versión librería +ExportableDatas=Datos exportables +NoExportableData=Non hai datos exportables (sen módulos con datos exportables cargados, ou non teñen permisos) ##### External sites ##### -WebsiteSetup=Setup of module website -WEBSITE_PAGEURL=URL of page +WebsiteSetup=Configuración do módulo website +WEBSITE_PAGEURL=URL da páxina WEBSITE_TITLE=Título WEBSITE_DESCRIPTION=Descrición -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 +WEBSITE_IMAGE=Imaxe +WEBSITE_IMAGEDesc=Ruta relativa das imaxes. Pode mantela baleira, rara vez ten uso (pode ser usada polo contido dinámico para amosar una vista previa dunha listaxe de publicacións de blog). Use __WEBSITE_KEY__ no path se o path depende do nome do sitio web +WEBSITE_KEYWORDS=Chaves +LinesToImport=Liñas a importar -MemoryUsage=Memory usage -RequestDuration=Duration of request -ProductsPerPopularity=Products/Services by popularity -PopuProp=Products/Services by popularity in Proposals -PopuCom=Products/Services by popularity in Orders -ProductStatistics=Products/Services Statistics -NbOfQtyInOrders=Qty in orders -SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... +MemoryUsage=Uso de memoria +RequestDuration=Duración da solicitude +ProductsPerPopularity=Produtos/Servizos por popularidade +PopuProp=Produtos/Servizos por popularidade en Orzamentos +PopuCom=Produtos/Servizos por popularidade e Pedimentos +ProductStatistics=Estatísticas de Produtos/Servizos +NbOfQtyInOrders=Cantidade en pedimentos +SelectTheTypeOfObjectToAnalyze=Seleccione o tipo de obxecto a nalizar... diff --git a/htdocs/langs/gl_ES/paybox.lang b/htdocs/langs/gl_ES/paybox.lang index e993d94eb67..533eea03695 100644 --- a/htdocs/langs/gl_ES/paybox.lang +++ b/htdocs/langs/gl_ES/paybox.lang @@ -1,31 +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 +PayBoxSetup=Configuración do módulo PayBox +PayBoxDesc=Este módulo ofrece páxinas para permitir o pago en <a href="http://www.paybox.com" target="_blank">PayBox</a> por parte dos clientes. Pode usarse para un pago gratuíto ou para un pago dun obxecto Dolibarr en particular (factura, pedido, ...) +FollowingUrlAreAvailableToMakePayments=As seguintes URL están dispoñibles para ofrecer unha páxina a un cliente na que facer un pago en obxectos Dolibarr +PaymentForm=Forma de pagamento +WelcomeOnPaymentPage=A nosa benvida ao servizo de pagamento en liña +ThisScreenAllowsYouToPay=Esta pantalla permítelle facer un pagamento en liña a %s. +ThisIsInformationOnPayment=Esta é información sobre o pagamento a facer +ToComplete=Completar +YourEMail=Correo electrónico para recibir a confirmación do pagamento +Creditor=Acredor +PaymentCode=Código do pagamento +PayBoxDoPayment=Pagamento con Paybox +YouWillBeRedirectedOnPayBox=Será redirixido á páxina segura de PayBox para introducir a información da súa tarxeta de crédito Continue=Seguinte -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 -VendorName=Name of vendor -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 +SetupPayBoxToHavePaymentCreatedAutomatically=Configure a súa caixa de pagamento coa url <b>%s</b> para que o pagamento se cree automaticamente cando o valide PayBox. +YourPaymentHasBeenRecorded=Esta páxina confirma que se rexistrou o seu pagamento. Grazas. +YourPaymentHasNotBeenRecorded=O seu pagamento NON se rexistrou e cancelouse a transacción. Grazas. +AccountParameter=Parámetros da conta +UsageParameter=Parámetros de uso +InformationToFindParameters=Axuda a atopar a información da súa conta %s +PAYBOX_CGI_URL_V2=URL do módulo CGI de PayBox para pagamento +CSSUrlForPaymentForm=URL da folla de estilo CSS para o formulario de pagamento +NewPayboxPaymentReceived=Novo pagamento de PayBox recibido +NewPayboxPaymentFailed=Novo intento de pagamento de PayBox pero fallou +PAYBOX_PAYONLINE_SENDEMAIL=Nnotificación por correo electrónico despois do intento de pagamento (éxito ou fallo) +PAYBOX_PBX_SITE=Valor para PBX SITE +PAYBOX_PBX_RANG=Valor para PBX Rang +PAYBOX_PBX_IDENTIFIANT=Valor para Id PBX +PAYBOX_HMAC_KEY=Chave HMAC diff --git a/htdocs/langs/gl_ES/paypal.lang b/htdocs/langs/gl_ES/paypal.lang index 5eb5f389445..1544765cc29 100644 --- a/htdocs/langs/gl_ES/paypal.lang +++ b/htdocs/langs/gl_ES/paypal.lang @@ -1,36 +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 +PaypalSetup=Configuración do módulo PayPal +PaypalDesc=Este módulo permite pagos de clientes vía <a href="http://www.paypal.com" target="_blank">Paypal</a>. Isto pode usarse para realizar calquera pago en relación cun obxecto Dolibarr (facturas, pedimentos ...) +PaypalOrCBDoPayment=Pagar con Paypal (tarxeta ou Paypal) +PaypalDoPayment=Pago mediante Paypal +PAYPAL_API_SANDBOX=Modo de probas/sandbox +PAYPAL_API_USER=Nome usuario API +PAYPAL_API_PASSWORD=Contrasinal API +PAYPAL_API_SIGNATURE=Sinatura API +PAYPAL_SSLVERSION=Versión Curl SSL +PAYPAL_API_INTEGRAL_OR_PAYPALONLY=Propor pago integral (Tarxeta+Paypal) ou só Paypal 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 +PaypalModeOnlyPaypal=Só PayPal +ONLINE_PAYMENT_CSS_URL=URL ou CSS opcional da folla de estilo na páxina de pago en liña +ThisIsTransactionId=Identificador da transacción: <b>%s</b> +PAYPAL_ADD_PAYMENT_URL=Engadir a url del pago Paypal ao enviar un documento por correo electrónico +NewOnlinePaymentReceived=Novo pago en liña recibido +NewOnlinePaymentFailed=Intentouse un novo pago en liña pero fallou +ONLINE_PAYMENT_SENDEMAIL=Enderezo de correo electrónico a notificar no caso de intento de pago (con éxito ou non) +ReturnURLAfterPayment=URL de retorno despois do pago +ValidationOfOnlinePaymentFailed=Fallou a validación do pago en liña +PaymentSystemConfirmPaymentPageWasCalledButFailed=A páxina de confirmación de pago foi chamada polo sistema de pago devolveu un erro +SetExpressCheckoutAPICallFailed=Chamada á API SetExpressCheckout fallou. +DoExpressCheckoutPaymentAPICallFailed=Chamada á API DoExpressCheckoutPayment fallou. +DetailedErrorMessage=Detalle da mensaxe de erro +ShortErrorMessage=Mensaxe curto de erro +ErrorCode=Código do erro +ErrorSeverityCode=Gravidade do código de erro +OnlinePaymentSystem=Sistema de pago online +PaypalLiveEnabled=Paypal en vivo habilitado (do contrario, modo proba/sandbox) +PaypalImportPayment=Importe pagos Paypal +PostActionAfterPayment=Accións despois dos pagos +ARollbackWasPerformedOnPostActions=Foi executada unha reversión en todas as accións. Debe completar as acciones de publicación manualmente se son precisas. +ValidationOfPaymentFailed=A validación do pago Paypal fallou +CardOwner=Titular da tarxeta +PayPalBalance=Crédito paypal diff --git a/htdocs/langs/gl_ES/printing.lang b/htdocs/langs/gl_ES/printing.lang index 97d17227276..19739ba42ba 100644 --- a/htdocs/langs/gl_ES/printing.lang +++ b/htdocs/langs/gl_ES/printing.lang @@ -43,12 +43,12 @@ IPP_State_reason1=Razon 1 do estado IPP_BW=Branco e negro IPP_Color=Cor IPP_Device=Dispositivo -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. +IPP_Media=Impresora +IPP_Supported=Tipo de soporte +DirectPrintingJobsDesc=Esta páxina enumera os traballos de impresión atopados nas impresoras dispoñibles. +GoogleAuthNotConfigured=Google OAuth non se configurou. Habilite o módulo OAuth e configure un ID/segredo de Google. +GoogleAuthConfigured=As credenciais de Google OAuth atopáronse na configuración do módulo OAuth. +PrintingDriverDescprintgcp=Variables de configuración para o controlador de impresión Google Cloud Print. +PrintingDriverDescprintipp=Variables de configuración de drivers para impresoras Cups +PrintTestDescprintgcp=Listaxe de impresoras para Google Cloud Print. +PrintTestDescprintipp=Listaxe de impresoras para servidor Cups diff --git a/htdocs/langs/gl_ES/productbatch.lang b/htdocs/langs/gl_ES/productbatch.lang index a2cd4187edb..79377f94908 100644 --- a/htdocs/langs/gl_ES/productbatch.lang +++ b/htdocs/langs/gl_ES/productbatch.lang @@ -1,6 +1,6 @@ # ProductBATCH language file - en_US - ProductBATCH ManageLotSerial=Usar numeración por lote/serie -ProductStatusOnBatch=Se (é preciso lote/serie) +ProductStatusOnBatch=Sí (é preciso lote/serie) ProductStatusNotOnBatch=Non (non é preciso lote/serie) ProductStatusOnBatchShort=Sí ProductStatusNotOnBatchShort=Non diff --git a/htdocs/langs/gl_ES/products.lang b/htdocs/langs/gl_ES/products.lang index 585ebaf1788..ba1300b6c83 100644 --- a/htdocs/langs/gl_ES/products.lang +++ b/htdocs/langs/gl_ES/products.lang @@ -2,7 +2,7 @@ ProductRef=Ref. produto ProductLabel=Etiqueta produto ProductLabelTranslated=Tradución etiqueta de produto -ProductDescription=Product description +ProductDescription=Descrición do produto ProductDescriptionTranslated=Tradución da descrición de produto ProductNoteTranslated=Tradución notas de produto ProductServiceCard=Ficha Produto/Servizo @@ -18,12 +18,12 @@ Reference=Referencia NewProduct=Novo produto NewService=Novo servizo ProductVatMassChange=Cambio de IVE masivo -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. +ProductVatMassChangeDesc=Esta ferramenta actualiza o tipo de IVE definido en <b><u>ALL</b></u>produtos e servizos +MassBarcodeInit=Inicio masivo de código de barras +MassBarcodeInitDesc=Esta páxina pódese usar para inicializar un código de barras en obxectos que non teñen definido un código de barras. Comprobe antes de completar a configuración do código de barras do módulo. ProductAccountancyBuyCode=Código contable (compra) -ProductAccountancyBuyIntraCode=Accounting code (purchase intra-community) -ProductAccountancyBuyExportCode=Accounting code (purchase import) +ProductAccountancyBuyIntraCode=Código contable (compra intra-comunitaria) +ProductAccountancyBuyExportCode=Código contable (compra importación) ProductAccountancySellCode=Código contable (venda) ProductAccountancySellIntraCode=Código contable (venda intracomunitaria) ProductAccountancySellExportCode=Código contable (venda de exportación) @@ -31,23 +31,23 @@ ProductOrService=Produto ou servizo ProductsAndServices=Produtos e servizos ProductsOrServices=Produtos ou servizos ProductsPipeServices=Produtos | Servizos -ProductsOnSale=Products for sale -ProductsOnPurchase=Products for purchase +ProductsOnSale=Produtos á venda +ProductsOnPurchase=Produtos en compra ProductsOnSaleOnly=Produtos só á venda ProductsOnPurchaseOnly=Produtos só en compra ProductsNotOnSell=Produtos nin á venda nin en compra -ProductsOnSellAndOnBuy=Produtos en venda e en compra -ServicesOnSale=Services for sale -ServicesOnPurchase=Services for purchase +ProductsOnSellAndOnBuy=Produtos en venda mais en compra +ServicesOnSale=Servizos en venda +ServicesOnPurchase=Servizos en compra ServicesOnSaleOnly=Servizos só á venda ServicesOnPurchaseOnly=Servizos só en compra ServicesNotOnSell=Servizos fora de venda e de compra -ServicesOnSellAndOnBuy=Servizos á venda e en compra -LastModifiedProductsAndServices=Latest %s modified products/services +ServicesOnSellAndOnBuy=Servizos á venda mais en compra +LastModifiedProductsAndServices=Últimos %s produtos/servizos modificados LastRecordedProducts=Últimos %s produtos rexistrados LastRecordedServices=Últimos %s servizos rexistrados -CardProduct0=Produto -CardProduct1=Servizo +CardProduct0=Ficha produto +CardProduct1=Ficha servizo Stock=Stock MenuStocks=Stocks Stocks=Stocks e localización de produtos (almacén) @@ -72,22 +72,22 @@ AppliedPricesFrom=Prezo de venda SellingPrice=Prezo de venda SellingPriceHT=Prezo de venda sen IVE SellingPriceTTC=Prezo de venda con IVE -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. +SellingMinPriceTTC=Prezo mínimo de venda (IVE incluido) +CostPriceDescription=Este campo de prezo (sen impostos) pode usarse para almacenar o importe medio que este produto custa á súa empresa. Pode ser calquera prezo que calcule vostede mesmo, por exemplo a partir do prezo medio de compra máis o custo medio de produción e distribución. +CostPriceUsage=Este valor podería usarse para o cálculo de marxes SoldAmount=Importe vendas PurchasedAmount=Importe compras NewPrice=Novo prezo MinPrice=Prezo de venda mín. EditSellingPriceLabel=Editar etiqueta prezo de venda -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=Pechada +CantBeLessThanMinPrice=O prezo de venda non pode ser inferior ao mínimo permitido para este produto (%s sen impostos). Esta mensaxe tamén pode aparecer se escribe un desconto demasiado alto. +ContractStatusClosed=Pechado ErrorProductAlreadyExists=Un produto coa referencia %s xa existe. -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. +ErrorProductBadRefOrLabel=Valor incorrecto como referencia ou etiqueta. +ErrorProductClone=Houbo un problema ao tentar clonar o produto ou servizo. +ErrorPriceCantBeLowerThanMinPrice=Erro, o prezo non pode ser inferior ao prezo mínimo. Suppliers=Provedores -SupplierRef=Vendor SKU +SupplierRef=SKU Provedor ShowProduct=Amosar produto ShowService=Amosar servizo ProductsAndServicesArea=Área produtos e servizos @@ -104,25 +104,26 @@ SetDefaultBarcodeType=Defina o tipo de código de barras BarcodeValue=Valor do código de barras NoteNotVisibleOnBill=Nota (non visible nas facturas, orzamentos...) ServiceLimitedDuration=Se o produto é un servizo con duración limitada : -FillWithLastServiceDates=Fill with last service line dates -MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) -MultiPricesNumPrices=Number of prices -DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual products) -AssociatedProducts=Kits -AssociatedProductsNumber=Number of products composing this kit -ParentProductsNumber=Number of parent packaging product -ParentProducts=Parent products -IfZeroItIsNotAVirtualProduct=If 0, this product is not a kit -IfZeroItIsNotUsedByVirtualProduct=If 0, this product is not used by any kit +FillWithLastServiceDates=Complete coas últimas datas da liña de servizo +MultiPricesAbility=Varios segmentos de prezos por produto/servizo (cada cliente está nun segmento) +MultiPricesNumPrices=Nº de prezos +DefaultPriceType=Base de prezos por defecto (con ou sen impostos) ao engadir novos prezos de venda +AssociatedProductsAbility=Activar produtos compostos (kits) +VariantsAbility=Activar variantes (variantes de produtos, por exemplo cor, tamaño) +AssociatedProducts=Produtos compostos +AssociatedProductsNumber=Nº de produtos que compoñen este produto +ParentProductsNumber=Nº de produtos que este produto comptén +ParentProducts=Produtos pai +IfZeroItIsNotAVirtualProduct=Se 0, este produto non é un produto composto +IfZeroItIsNotUsedByVirtualProduct=Se 0, este produto non está sendo utilizado por ningún produto composto KeywordFilter=Filtro por clave -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 +CategoryFilter=Filtro por categoría +ProductToAddSearch=Procurar produtos a axuntar +NoMatchFound=Non atopáronse resultados +ListOfProductsServices=Listaxe de produtos/servizos +ProductAssociationList=Listaxe de produtos/servizos que compoñen este produto composto +ProductParentList=Listaxe de produtos/servizos con este produto como compoñente +ErrorAssociationIsFatherOfThis=Un dos produtos seleccionados é pai do produto en curso DeleteProduct=Eliminar un produto/servizo ConfirmDeleteProduct=¿Está certo de querer eliminar este produto/servizo? ProductDeleted=O produto/servizo "%s" foi eliminado da base de datos. @@ -134,8 +135,8 @@ DeleteProductLine=Eliminar liña de produto ConfirmDeleteProductLine=¿Está certo de querer eliminar esta liña de produto? ProductSpecial=Especial QtyMin=Cantidad mínima de compra -PriceQtyMin=Price quantity min. -PriceQtyMinCurrency=Price (currency) for this qty. (no discount) +PriceQtyMin=Prezo para esta cantidade mínima +PriceQtyMinCurrency=Prezo (moeda) para esta cantidade mínima (sen desconto) VATRateForSupplierProduct=Tasa IVE (para este produto/provedor) DiscountQtyMin=Desconto para esta cantidade NoPriceDefinedForThisSupplier=Ningún prezo/cant. definido para este provedor/produto @@ -157,8 +158,8 @@ RowMaterial=Materia prima ConfirmCloneProduct=¿Está certo de querer clonar o produto ou servizo <b>%s</b>? CloneContentProduct=Clonar a información principal do produto/servizo ClonePricesProduct=Clonar prezos -CloneCategoriesProduct=Clone tags/categories linked -CloneCompositionProduct=Clone virtual product/service +CloneCategoriesProduct=Clonar etiquetas/categorías ligadas +CloneCompositionProduct=Clonar produto/servizo virtual CloneCombinationsProduct=Clonar variantes de produto ProductIsUsed=Este produto é utilizado NewRefForClone=Ref. do novo produto/servizo @@ -167,11 +168,13 @@ BuyingPrices=Prezos de compra CustomerPrices=Prezos a clientes SuppliersPrices=Prezos a provedores SuppliersPricesOfProductsOrServices=Prezos de provedores (de produtos ou servizos) -CustomCode=Código aduaneiro / Mercancía / +CustomCode=Aduanda / Mercadoría / Código HS CountryOrigin=País de orixe -Nature=Nature of product (material/finished) -NatureOfProductShort=Nature of product -NatureOfProductDesc=Raw material or finished product +RegionStateOrigin=Rexión de orixe +StateOrigin=Estado|Provincia de orixe +Nature=Natureza do produto (material/manufacturado) +NatureOfProductShort=Natureza do produto +NatureOfProductDesc=Materia prima ou produto manufacturado ShortLabel=Etiqueta curta Unit=Unidade p=u. @@ -205,12 +208,12 @@ unitLM=Metro lineal unitM2=Metro cadrado unitM3=Metro cúbico unitL=Litro -unitT=ton +unitT=tonelada unitKG=kg unitG=Gramo unitMG=mg -unitLB=pound -unitOZ=ounce +unitLB=libra +unitOZ=onza unitM=Metro unitDM=dm unitCM=cm @@ -229,8 +232,8 @@ unitCM3=cm³ unitMM3=mm³ unitFT3=ft³ unitIN3=in³ -unitOZ3=ounce -unitgallon=gallon +unitOZ3=onza +unitgallon=galón ProductCodeModel=Modelo de ref. de produto ServiceCodeModel=Modelo de ref. de servizo CurrentProductPrice=Prezo actual @@ -239,15 +242,15 @@ AlwaysUseFixedPrice=Usar o prezo fixado PriceByQuantity=Prezos diferentes por cantidade DisablePriceByQty=Desactivar prezos por cantidade PriceByQuantityRange=Rango cantidade -MultipriceRules=Regras para segmento de prezos -UseMultipriceRules=Use price segment rules (defined into product module setup) to auto calculate prices of all other segments according to first segment +MultipriceRules=Prezos automaticamente por segmento +UseMultipriceRules=Usar regras do segmento de prezos (definidas na configuración do módulo de produto) para calcular automaticamente os prezos de todos os outros segmentos segundo o primeiro segmento PercentVariationOver=%% variación sobre %s PercentDiscountOver=%% desconto sobre %s KeepEmptyForAutoCalculation=Mantéñase baleiro para que calcule automáticamente o peso ou volume dos produtos -VariantRefExample=Examples: COL, SIZE -VariantLabelExample=Examples: Color, Size +VariantRefExample=Exemplo: COR, TAMAÑO +VariantLabelExample=Exemplo: Cor, Tamaño ### composition fabrication -Build=Fabricar +Build=Producir ProductsMultiPrice=Produtos e prezos para cada segmento de prezos ProductsOrServiceMultiPrice=Prezos a clientes (de produtos ou servizos, multiprezos) ProductSellByQuarterHT=Facturación trimestral de produtos antes de impostos @@ -257,15 +260,15 @@ Quarter2=2º trimestre Quarter3=3º trimestre Quarter4=4º trimestre BarCodePrintsheet=Imprimir código de barras -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. +PageToGenerateBarCodeSheets=Con esta ferramenta pode imprimir follas de pegatinas de código de barras. Escolla o formato da páxina da pegatina, o tipo de código de barras e o valor do código de barras e prema no botón <b>%s</b>. +NumberOfStickers=Número de pegatinas para imprimir na páxina +PrintsheetForOneBarCode=Imprimir varias pegatinas para un código de barras +BuildPageToPrint=Xerar páxina para imprimir +FillBarCodeTypeAndValueManually=Cubrir o tipo e o valor do código de barras manualmente. +FillBarCodeTypeAndValueFromProduct=Cubrir o tipo de código de barras e o valor do código de barras dun produto. +FillBarCodeTypeAndValueFromThirdParty=Cubrir o tipo de código de barras e o valor do código de barras dun terceiro. +DefinitionOfBarCodeForProductNotComplete=A definición do tipo ou valor do código de barras non está completa para o produto %s. +DefinitionOfBarCodeForThirdpartyNotComplete=A definición do tipo ou valor do código de barras non completo para terceiros %s. BarCodeDataForProduct=Información do código de barras do produto %s: BarCodeDataForThirdparty=Información do código de barras do terceiro %s: ResetBarcodeForAllRecords=Definir valores de codigo de barras para todos os rexistros (isto restablecerá os valores de códigos de barras xa rexistrados cos novos valores) @@ -280,68 +283,68 @@ MinimumRecommendedPrice=O prezo mínimo recomendado é: %s PriceExpressionEditor=Editor de expresión de prezos PriceExpressionSelected=Expresión de prezos seleccionada PriceExpressionEditorHelp1="price = 2 + 2" ou "2 + 2" para configurar un prezo. Use ; para separar expresións -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> +PriceExpressionEditorHelp2=Pode acceder a ExtraFields con variables como <b>#extrafield_myextrafieldkey#</b> e variables globais con <b>#global_mycode#</b> +PriceExpressionEditorHelp3=Tanto en produto/servizo como nos prezos de provedores hai estas variables dispoñibles:<br><b>#tva_tx# #localtax1_tx# #localtax2_tx# #weight# #length# #surface# #price_min#</b> +PriceExpressionEditorHelp4=Só no prezo do produto/servizo: <b>#supplier_min_price#</b><br>Só nos prezos do provedor: <b>#supplier_quantity# and #supplier_tva_tx#</b> PriceExpressionEditorHelp5=Valores globais dispoñibles: PriceMode=Modo prezo PriceNumeric=Número DefaultPrice=Prezo por defecto -DefaultPriceLog=Log of previous default prices -ComposedProductIncDecStock=Increase/Decrease stock on parent change -ComposedProduct=Child products +DefaultPriceLog=Rexistro de prezos predeterminados anteriores +ComposedProductIncDecStock=Incrementar/Diminuir stock ao mudar o pai +ComposedProduct=Subproduto MinSupplierPrice=Prezo mínimo de compra MinCustomerPrice=Prezo mínimo de venda DynamicPriceConfiguration=Configuración de prezo dinámico -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. +DynamicPriceDesc=Pode definir fórmulas matemáticas para calcular os prezos do cliente ou do provedor. Tales fórmulas poden empregar todos os operadores matemáticos, algunhas constantes e variables. Pode definir aquí as variables que desexa empregar. Se a variable precisa unha actualización automática, pode definir a URL externa para permitir a Dolibarr actualizar o valor automaticamente. AddVariable=Engadir variable AddUpdater=Engadir Actualizador GlobalVariables=Variables globais VariableToUpdate=Variable a actualizar -GlobalVariableUpdaters=External updaters for variables +GlobalVariableUpdaters=Variables globais a actualizar GlobalVariableUpdaterType0=datos JSON -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"}} +GlobalVariableUpdaterHelp0=Analiza os datos JSON do URL especificado, VALUE especifica a localización do valor relevante, +GlobalVariableUpdaterHelpFormat0=Formato da solicitude {"URL": "http://example.com/urlofjson", "VALUE": "array1,array2,targetvalue"} +GlobalVariableUpdaterType1=Datos do servizo web +GlobalVariableUpdaterHelp1=Analiza os datos do Webservice a partir dun URL especificado, NS especifica o espazo de nomes, VALUE especifica a localización do valor relevante, DATA debe conter os datos que se enviarán e METHOD é o método WS a chamar +GlobalVariableUpdaterHelpFormat1=O formato da solicitude é {"URL": "http://example.com/urlofws", "VALUE": "array,targetvalue", "NS": "http://example.com/urlofns", "METHOD": "myWSMethod", "DATA": {"your":"data","to":"send"}} UpdateInterval=Intervalo de actualización (minutos) LastUpdated=Última actualización CorrectlyUpdated=Actualizado correctamente -PropalMergePdfProductActualFile=Arcquivos usados para engadir no PDF Azur son -PropalMergePdfProductChooseFile=Seleccione os arquivos PDF -IncludingProductWithTag=Produtos/servizos incluidos co tag +PropalMergePdfProductActualFile=Ficheiros usados para engadir no PDF Azur son +PropalMergePdfProductChooseFile=Seleccione os ficheiros PDF +IncludingProductWithTag=Produtos/servizos incluidos coa etiqueta DefaultPriceRealPriceMayDependOnCustomer=Prezo por defecto, ou prezo real pode depender do cliente WarningSelectOneDocument=Seleccione alo menos un documento DefaultUnitToShow=Unidade NbOfQtyInProposals=Cant. en orzamentos -ClinkOnALinkOfColumn=Click on a link of column %s to get a detailed view... +ClinkOnALinkOfColumn=Click na ligazón da columna %s para obter unha vista detallada... ProductsOrServicesTranslations=Tradución Produtos/Servizos -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 +TranslatedLabel=Tradución da etiqueta +TranslatedDescription=Tradución da descrición +TranslatedNote=Tradución das notas +ProductWeight=Peso para 1 produto +ProductVolume=Volume para 1 produto +WeightUnits=Peso unitario +VolumeUnits=Volumen unitario +WidthUnits=Ancho unitario +LengthUnits=Lonxitude unitaria +HeightUnits=Peso unitario +SurfaceUnits=Superficie unitaria +SizeUnits=Tamaño unitario +DeleteProductBuyPrice=Eliminar prezo de compra +ConfirmDeleteProductBuyPrice=¿Está certo de querer eliminar este prezo de compra? +SubProduct=Subproduto +ProductSheet=Folla de produto +ServiceSheet=Folla de servizo +PossibleValues=Valores posibles GoOnMenuToCreateVairants=Vaia ao menú %s - %s para preparar variables de atributos (como cores, tamaño, ...) -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 +UseProductFournDesc=Engade unha función para definir as descricións dos produtos definidos polos provedores ademais das descricións para os clientes +ProductSupplierDescription=Descrición do produto do provedor +UseProductSupplierPackaging=Utilice o envase nos prezos do provedor (recalcule as cantidades segundo o prezo do empaquetado do provedor ao engadir/actualizar a liña nos documentos do provedor) +PackagingForThisProduct=Empaquetado +PackagingForThisProductDesc=No pedimento do provedor, solicitará automaticamente esta cantidade (ou un múltiplo desta cantidade). Non pode ser inferior á cantidade mínima de compra +QtyRecalculatedWithPackaging=A cantidade da liña recalculouse segundo o empaquetado do provedor #Attributes VariantAttributes=Atributos variantes @@ -364,31 +367,31 @@ SelectCombination=Seleccione combinación ProductCombinationGenerator=Xerador de variantes Features=Funcións PriceImpact=Impacto no prezo -ImpactOnPriceLevel=Impact on price level %s -ApplyToAllPriceImpactLevel= Apply to all levels -ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels +ImpactOnPriceLevel=Impacto sobre o prexo no nivel %s +ApplyToAllPriceImpactLevel= Aplicar a todos os niveis +ApplyToAllPriceImpactLevelHelp=Ao facer clic aquí establecerá o mesmo impacto no prezo en todos os niveis WeightImpact=Impacto no peso NewProductAttribute=Novo atributo NewProductAttributeValue=Novo valor de atributo ErrorCreatingProductAttributeValue=Ocurriu un erro ao crear o valor do atributo. Esto pode ser por que xa existía un valor con esta referencia -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. +ProductCombinationGeneratorWarning=Se continúa, antes de xerar novas variantes, ELIMINARÁ todas as anteriores. as xa existentes actualizaranse cos novos valores +TooMuchCombinationsWarning=Xerar moitas variantes pode producir un alto uso da CPU, uso de memoria e Dolibarr será quen de crealas. Activar a opción "%s" pode axudar a reducir o uso de memoria. DoNotRemovePreviousCombinations=Non remover variantes previas UsePercentageVariations=Utilizar variacións porcentuais PercentageVariation=Variación porcentual ErrorDeletingGeneratedProducts=Aconteceu un erro mentres eliminaba as variantes de produtos existentes NbOfDifferentValues=Nº de valores diferentes -NbProducts=Number of products -ParentProduct=Parent product +NbProducts=Nº de produtos +ParentProduct=Produto pai HideChildProducts=Ocultar as variantes de produtos ShowChildProducts=Amosar a variantes de produtos -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=Referencia de produto de destino +NoEditVariants=Vaia á tarxeta de produto principal e edite o impacto do prezo das variantes na lapela de variantes +ConfirmCloneProductCombinations=¿Quere copiar todas as variantes do produto a outro produto pai coa referencia dada? +CloneDestinationReference=Referencia de produto destino ErrorCopyProductCombinations=Aconteceu un erro ao copiar as variantes de produto ErrorDestinationProductNotFound=Destino do produto non atopado ErrorProductCombinationNotFound=Variante do produto non atopada -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=Acción só dispoñible na variante do produto +ProductsPricePerCustomer=Prezos de produto por cliente +ProductSupplierExtraFields=Atributos adicionais (Prezos Provedor) +DeleteLinkedProduct=Eliminar o produto fillo ligado á combinación diff --git a/htdocs/langs/gl_ES/projects.lang b/htdocs/langs/gl_ES/projects.lang index 58766a79bc1..55a7a3e1624 100644 --- a/htdocs/langs/gl_ES/projects.lang +++ b/htdocs/langs/gl_ES/projects.lang @@ -41,22 +41,22 @@ SetProject=Definir proxecto NoProject=Ningún proxecto definido ou propiedade de NbOfProjects=Nº de proxectos NbOfTasks=Nº de tarefas -TimeSpent=Tempo adicado -TimeSpentByYou=Tempo adicado por vostede -TimeSpentByUser=Tempo adicado por usuario +TimeSpent=Tempo empregado +TimeSpentByYou=Tempo empregado por vostede +TimeSpentByUser=Tempo empregado por usuario TimesSpent=Tempos adicados TaskId=ID Tarefa RefTask=Ref. tarefa LabelTask=Etiqueta tarefa -TaskTimeSpent=Tempo adicado en tarefas +TaskTimeSpent=Tempo empregado en tarefas TaskTimeUser=Usuario TaskTimeNote=Nota TaskTimeDate=Data TasksOnOpenedProject=Tarefas en proxectos abertos WorkloadNotDefined=Carga de traballo non definida -NewTimeSpent=Tempo adicado -MyTimeSpent=Meu tempo adicado -BillTime=Facturar tempo adicado +NewTimeSpent=Tempo empregado +MyTimeSpent=Meu tempo empregado +BillTime=Facturar tempo empregado BillTimeShort=Facturar tempo TimeToBill=Tempo non facturado TimeBilled=Tempo facturado @@ -67,7 +67,7 @@ TaskDateEnd=Data finalización tarefa TaskDescription=Descrición tarefa NewTask=Nova tarefa AddTask=Crear tarefa -AddTimeSpent=Engadir tempo adicado +AddTimeSpent=Engadir tempo empregado AddHereTimeSpentForDay=Engadir tempo empregado neste día/tarefa AddHereTimeSpentForWeek=Engadir tempo empregado nesta semana/tarefa Activity=Actividade @@ -85,6 +85,7 @@ ProgressCalculated=Progresión calculada WhichIamLinkedTo=que eu liguei a WhichIamLinkedToProject=que eu liguei ao proxecto Time=Tempo +TimeConsumed=Consumido ListOfTasks=Listaxe de tarefas GoToListOfTimeConsumed=Ir á listaxe de tempos empregados GanttView=Vista de Gantt @@ -99,8 +100,8 @@ ListShippingAssociatedProject=Listaxe de envíos asociados ao proxecto ListFichinterAssociatedProject=Listaxe de intervencións asociadas ao proxecto ListExpenseReportsAssociatedProject=Listaxe de informes de gastos asociados ao proxecto ListDonationsAssociatedProject=Listaxe de doacións/subvencións asociadas ao proxecto -ListVariousPaymentsAssociatedProject=Listaxe de pagos diversos asociados ao proxecto -ListSalariesAssociatedProject=Listaxe de pagos de salarios asociados ao proxecto +ListVariousPaymentsAssociatedProject=Listaxe de pagamentos diversos asociados ao proxecto +ListSalariesAssociatedProject=Listaxe de pagamentos de salarios asociados ao proxecto ListActionsAssociatedProject=Listaxe de eventos asociados ao proxecto ListMOAssociatedProject=Listaxe de ordes de fabricación asociadas ao proxecto ListTaskTimeUserProject=Listaxe de tempo empregado nas tarefas do proxecto @@ -115,7 +116,7 @@ ChildOfTask=Fío da tarefa TaskHasChild=A tarefa ten fíos NotOwnerOfProject=Non é dono deste proxecto privado AffectedTo=Asignado a -CantRemoveProject=Este proxecto non pode ser eliminado porque está referenciado por algúns outros obxectoss (facturas, pedimentos ou outras). Ver lapela de referencias. +CantRemoveProject=Este proxecto non pode ser eliminado porque está referenciado por algúns outros obxectoss (facturas, pedimentos ou outras). Ver lapela '%s'. ValidateProject=Validar proxecto ConfirmValidateProject=¿Está certo de querer validar este proxecto? CloseAProject=Pechar proxecto @@ -126,25 +127,25 @@ ConfirmReOpenAProject=Está certo de querer reabrir este proxecto? ProjectContact=Contactos do proxecto TaskContact=Contactos de tarefas ActionsOnProject=Eventos do proxecto -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. +YouAreNotContactOfProject=Vostede non é contacto deste proxecto privado +UserIsNotContactOfProject=O usuario non é contacto deste proxecto privado +DeleteATimeSpent=Eliminación de tempo empregado +ConfirmDeleteATimeSpent=¿Está certo de querer eliminar este tempo empregado? +DoNotShowMyTasksOnly=Ver tamén tarefas non asignadas a min +ShowMyTasksOnly=Ver só tarefas asignadas a min +TaskRessourceLinks=Contactos da tarefa +ProjectsDedicatedToThisThirdParty=Proxectos adicados a este terceiro +NoTasks=Ningunha tarefa para este proxecto +LinkedToAnotherCompany=Ligado a outro terceiro +TaskIsNotAssignedToUser=Tarefa non asignada ao usuario. Use o botón '<strong>%s</strong>' para asignar a tarefa agora. +ErrorTimeSpentIsEmpty=O tempo consumido está baleiro +ThisWillAlsoRemoveTasks=Esta operación tamén eliminará todas as tarefas do proxecto (<b>%s</b> tarefas neste intre) e todas as entradas de tempo empregado. +IfNeedToUseOtherObjectKeepEmpty=Se os obxectos (factura, pedimento, ...) pertencen a outro terceiro, debe estar ligado ao proxecto a crear, deixe isto baleiro para permitir asignar o proxecto a distintos terceiros. CloneTasks=Clonar as tarefas CloneContacts=Clonar os contactos CloneNotes=Clonar a notas CloneProjectFiles=Clonar os ficheiros engadidos no proxecto -CloneTaskFiles=Clonar os ficheiros engadidos da(s) tarefa(s) (se se clonan a(s) tarefa(s)) +CloneTaskFiles=Clonar tarefa(s) engadida(s) a ficheiro(s) (se se clonaron a(s) tarefa(s)) CloneMoveDate=¿Actualizar as datas dos proxectos/tarefas? ConfirmCloneProject=¿Está certo de querer clonar este proxecto? ProjectReportDate=Cambiar data das tarefas segundo a data de inicio do novo proxecto @@ -178,7 +179,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Participante TypeContact_project_task_external_TASKCONTRIBUTOR=Participante SelectElement=Escolla elemento AddElement=Ligar ao elemento -LinkToElementShort=Vincular a +LinkToElementShort=Ligar a # Documents models DocumentModelBeluga=Prantilla de documento para a descrición dos obxectos ligados DocumentModelBaleine=Prantilla de documendo do proxecto para tarefas @@ -187,12 +188,12 @@ PlannedWorkload=Carga de traballo planificada PlannedWorkloadShort=Carga de traballo ProjectReferers=Items relacionados ProjectMustBeValidatedFirst=O proxecto previamente ten que validarse -FirstAddRessourceToAllocateTime=Asignar a un usuario a unha tarefa para asignar tempo +FirstAddRessourceToAllocateTime=Asignar un usuario a unha tarefa para asignar tempo InputPerDay=Entrada por día InputPerWeek=Entrada por semana InputPerMonth=Entrada por mes InputDetail=Detalle de entrada -TimeAlreadyRecorded=Tempo adicado xa rexistrado para esta tarefa/día e usuario %s +TimeAlreadyRecorded=Tempo empregado xa rexistrado para esta tarefa/día e usuario %s ProjectsWithThisUserAsContact=Proxectos con este usuario como contacto TasksWithThisUserAsContact=Tarefas asignadas a este usuario ResourceNotAssignedToProject=Non asignado ao proxecto @@ -211,12 +212,12 @@ ProjectNbProjectByMonth=Nº de proxectos creados por mes ProjectNbTaskByMonth=Nº de tarefas creadas por mes ProjectOppAmountOfProjectsByMonth=Importe de oportunidades por mes ProjectWeightedOppAmountOfProjectsByMonth=Importe medio oportunidades por mes -ProjectOpenedProjectByOppStatus=Open project|lead by lead status -ProjectsStatistics=Statistics on projects or leads -TasksStatistics=Statistics on tasks of projects or leads +ProjectOpenedProjectByOppStatus=Proxectos/oportunidades abertas por estado da oportunidade +ProjectsStatistics=Estatísticas sobre proxectos/oportunidades +TasksStatistics=Estatísticas sobre tarefas en proxectos/oportunidade TaskAssignedToEnterTime=Tarefa asignada. Debería poder introducir tempos nesta tarefa. IdTaskTime=Id tempo da tarefa -YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX +YouCanCompleteRef=Se desexa completar a referencia con algún sufixo, recoméndase engadir un carácter - para separala, polo que a numeración automática aínda funcionará correctamente para os próximos proxectos. Por exemplo %s-MYSUFFIX OpenedProjectsByThirdparties=Proxectos abertos de terceiros OnlyOpportunitiesShort=Só oportunidades OpenedOpportunitiesShort=Oportunidades abertas @@ -238,7 +239,7 @@ LatestProjects=Últimos %s proxectos LatestModifiedProjects=Últimos %s proxectos modificados OtherFilteredTasks=Outras tarefas filtradas NoAssignedTasks=Sen tarefas asignadas ( Asigne proxectos/tarefas ao usuario actual dende o selector superior para indicar tempos nelas) -ThirdPartyRequiredToGenerateInvoice=A third party must be defined on project to be able to invoice it. +ThirdPartyRequiredToGenerateInvoice=Debe definirse un terceiro no proxecto para poder facturalo. ChooseANotYetAssignedTask=Escolla unha tarefa non asignada aínda a vostede # Comments trans AllowCommentOnTask=Permitir comentarios dos usuarios nas tarefas @@ -254,7 +255,7 @@ TimeSpentForInvoice=Tempo empregado OneLinePerUser=Unha liña por usuario ServiceToUseOnLines=Servizo a usar en liñas InvoiceGeneratedFromTimeSpent=Factura %s foi xerada co tempo empregado no proxecto -ProjectBillTimeDescription=Check if you enter timesheet on tasks of project AND you plan to generate invoice(s) from the timesheet to bill the customer of the project (do not check if you plan to create invoice that is not based on entered timesheets). Note: To generate invoice, go on tab 'Time spent' of the project and select lines to include. +ProjectBillTimeDescription=Comprobe se introduce unha folla de tempo nas tarefas do proxecto e planea xerar factura(s) a partir da folla de tempo para facturar ao cliente do proxecto (non comprobe se pensa crear unha factura que non estexa baseada nas follas de traballo introducidas). Nota: para xerar factura, vaia a pestana "Tempo empregado" do proxecto e selecciona as liñas a incluír. ProjectFollowOpportunity=Seguir oportunidade ProjectFollowTasks=Seguir tarefa Usage=Uso diff --git a/htdocs/langs/gl_ES/propal.lang b/htdocs/langs/gl_ES/propal.lang index c0d0b31f60c..af8b0cff643 100644 --- a/htdocs/langs/gl_ES/propal.lang +++ b/htdocs/langs/gl_ES/propal.lang @@ -1,87 +1,91 @@ # Dolibarr language file - Source file is en_US - propal Proposals=Orzamentos -Proposal=Commercial proposal +Proposal=Orzamento ProposalShort=Orzamento ProposalsDraft=Orzamentos borrador -ProposalsOpened=Open commercial proposals -CommercialProposal=Commercial proposal -PdfCommercialProposalTitle=Commercial proposal -ProposalCard=Proposal card -NewProp=New commercial proposal -NewPropal=New proposal +ProposalsOpened=Orzamentos abertos +CommercialProposal=Orzamento +PdfCommercialProposalTitle=Orzamento +ProposalCard=Ficha orzamento +NewProp=Novo orzamento +NewPropal=Novo orzamento Prospect=Cliente potencial -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 +DeleteProp=Eliminar orzamento +ValidateProp=Validar orzamento +AddProp=Crear orzamento +ConfirmDeleteProp=¿Está certo de querer eliminar este orzamento? +ConfirmValidateProp=¿Está certo de querer validar este orzamento coa referencia <b>%s</b> ? +LastPropals=Últimos %s orzamentos LastModifiedProposals=Últimos %s orzamentos modificados -AllPropals=All proposals -SearchAProposal=Search a proposal -NoProposal=No proposal -ProposalsStatistics=Commercial proposal's statistics +AllPropals=Todos os orzamentos +SearchAProposal=Atopar un orzamento +NoProposal=Sen orzamentos +ProposalsStatistics=Estatísticas de orzamentos NumberOfProposalsByMonth=Número por mes -AmountOfProposalsByMonthHT=Amount by month (excl. tax) -NbOfProposals=Number of commercial proposals -ShowPropal=Show proposal +AmountOfProposalsByMonthHT=Importe por mes (sen IVE) +NbOfProposals=Número de orzamentos +ShowPropal=Ver orzamento PropalsDraft=Borradores -PropalsOpened=Aberta +PropalsOpened=Abertos PropalStatusDraft=Borrador (é preciso validar) -PropalStatusValidated=Validated (proposal is open) -PropalStatusSigned=Signed (needs billing) -PropalStatusNotSigned=Not signed (closed) +PropalStatusValidated=Validado (Orzamento aberto) +PropalStatusSigned=Asinado (a facturar) +PropalStatusNotSigned=Non asinado (pechado) PropalStatusBilled=Facturado PropalStatusDraftShort=Borrador -PropalStatusValidatedShort=Validated (open) -PropalStatusClosedShort=Pechada -PropalStatusSignedShort=Signed -PropalStatusNotSignedShort=Not signed +PropalStatusValidatedShort=Validado (aberto) +PropalStatusClosedShort=Pechado +PropalStatusSignedShort=Asinado +PropalStatusNotSignedShort=Non asinado PropalStatusBilledShort=Facturado -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 -CloseAs=Set status to -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 -AvailabilityPeriod=Availability delay -SetAvailability=Set availability delay -AfterOrder=after order -OtherProposals=Other proposals +PropalsToClose=Orzamentos a pechar +PropalsToBill=Orzamentos asinados a facturar +ListOfProposals=Listaxe de orzamentos +ActionsOnPropal=Eventos no orzamento +RefProposal=Ref. orzamento +SendPropalByMail=Enviar orzamento por mail +DatePropal=Data orzamento +DateEndPropal=Data fin de validez +ValidityDuration=Duración de validez +SetAcceptedRefused=Establecer aceptado/rexeitado +ErrorPropalNotFound=Orzamento %s non atopado +AddToDraftProposals=Engadir borrador do orzamento +NoDraftProposals=Sen orzamentos borrador +CopyPropalFrom=Crear orzamento por copia dun existente +CreateEmptyPropal=Crear proposta comercial baleira ou dende a listaxe de produtos/servizos. +DefaultProposalDurationValidity=Prazo de validez por defecto (en días) +UseCustomerContactAsPropalRecipientIfExist=Utilizar enderezo do contacto de seguemento do cliente definido, na vez do enderezo do terceiro como destinatario dos orzamentos +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 +AvailabilityPeriod=Tempo de entrega +SetAvailability=Definir o tempo de entrega +AfterOrder=dende a sinatura +OtherProposals=Outros orzamentos ##### Availability ##### -AvailabilityTypeAV_NOW=Immediate -AvailabilityTypeAV_1W=1 week -AvailabilityTypeAV_2W=2 weeks -AvailabilityTypeAV_3W=3 weeks -AvailabilityTypeAV_1M=1 month +AvailabilityTypeAV_NOW=Inmediata +AvailabilityTypeAV_1W=1 semana +AvailabilityTypeAV_2W=2 semanas +AvailabilityTypeAV_3W=3 semanas +AvailabilityTypeAV_1M=1 mes ##### Types de contacts ##### -TypeContact_propal_internal_SALESREPFOLL=Representative following-up proposal -TypeContact_propal_external_BILLING=Contacto cliente facturación pedido -TypeContact_propal_external_CUSTOMER=Customer contact following-up proposal -TypeContact_propal_external_SHIPPING=Customer contact for delivery +TypeContact_propal_internal_SALESREPFOLL=Comercial seguemento orzamento +TypeContact_propal_external_BILLING=Contacto cliente de facturación orzamento +TypeContact_propal_external_CUSTOMER=Contacto cliente seguemento orzamento +TypeContact_propal_external_SHIPPING=Contacto cliente para envíos # 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 +DocModelAzurDescription=Modelo de orzamento completo (vella implementación de modelo Cyan) +DocModelCyanDescription=Modelo de orzamento completo +DefaultModelPropalCreate=Modelo por defecto +DefaultModelPropalToBill=Modelo por defecto ao pechar un orzamento (a facturar) +DefaultModelPropalClosed=Modelo por defecto ao pechar un orzamento (non facturado) +ProposalCustomerSignature=Aceptado: sinatura dixital (selo da empresa, data e sinatura) +ProposalsStatisticsSuppliers=Estatísticas orzamentos de provedores +CaseFollowedBy=Caso seguido por +SignedOnly=Só asinado +IdProposal=ID orzamento +IdProduct=ID Produto +PrParentLine=Liña principal do orzamento +LineBuyPriceHT=Importe do prezo de compra neto sen impostos para a liña + diff --git a/htdocs/langs/gl_ES/receiptprinter.lang b/htdocs/langs/gl_ES/receiptprinter.lang index e8a421ecd45..15589e95e61 100644 --- a/htdocs/langs/gl_ES/receiptprinter.lang +++ b/htdocs/langs/gl_ES/receiptprinter.lang @@ -1,82 +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 +ReceiptPrinterSetup=Configuración do módulo ReceiptPrinter +PrinterAdded=Engadiuse a impresora %s +PrinterUpdated=Actualizouse a impresora %s +PrinterDeleted=Eliminouse a impresora %s +TestSentToPrinter=Proba enviada á impresora %s +ReceiptPrinter=Impresoras de recibos +ReceiptPrinterDesc=Configuración de impresoras de recibos +ReceiptPrinterTemplateDesc=Configuración de Modelos +ReceiptPrinterTypeDesc=Descrición do tipo de impresora de recibos +ReceiptPrinterProfileDesc=Descrición do perfil da impresora de recibos +ListPrinters=Listaxe de impresoras +SetupReceiptTemplate=Configuración do modelo +CONNECTOR_DUMMY=Impresora ficticia +CONNECTOR_NETWORK_PRINT=Impresora de rede +CONNECTOR_FILE_PRINT=Impresora local +CONNECTOR_WINDOWS_PRINT=Impresora local en Windows +CONNECTOR_CUPS_PRINT=Impresora CUPS +CONNECTOR_DUMMY_HELP=Impresora falsa para proba, non fai nada CONNECTOR_NETWORK_PRINT_HELP=10.x.x.x:9100 CONNECTOR_FILE_PRINT_HELP=/dev/usb/lp0, /dev/usb/lp1 CONNECTOR_WINDOWS_PRINT_HELP=LPT1, COM1, smb://FooUser:secret@computername/workgroup/Receipt Printer -CONNECTOR_CUPS_PRINT_HELP=CUPS printer name, example: HPRT_TP805L -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 +CONNECTOR_CUPS_PRINT_HELP=CUPS nome da impresora, exemplo: HPRT_TP805L +PROFILE_DEFAULT=Perfil predeterminado +PROFILE_SIMPLE=Perfil simple +PROFILE_EPOSTEP=Perfil Epos Tep +PROFILE_P822D=Perfil P822D +PROFILE_STAR=Perfil Start +PROFILE_DEFAULT_HELP=Perfil predeterminado adecuado para impresoras Epson +PROFILE_SIMPLE_HELP=Perfil simple sen gráficos +PROFILE_EPOSTEP_HELP=Perfil Epos Tep +PROFILE_P822D_HELP=Perfil P822D Sen gráficos +PROFILE_STAR_HELP=Perfil Star +DOL_LINE_FEED=Saltar a liña +DOL_ALIGN_LEFT=Aliñar á esquerda o texto +DOL_ALIGN_CENTER=Centrar o texto +DOL_ALIGN_RIGHT=Aliñar texto á dereita +DOL_USE_FONT_A=Usar o tipo de letra A da impresora +DOL_USE_FONT_B=Usar o tipo de letra B da impresora +DOL_USE_FONT_C=Usar o tipo de letra C da impresora DOL_PRINT_BARCODE=Imprimir código de barras -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=Beed sound -DOL_PRINT_TEXT=Print text -DateInvoiceWithTime=Invoice date and time -YearInvoice=Invoice year -DOL_VALUE_MONTH_LETTERS=Invoice month in letters -DOL_VALUE_MONTH=Invoice month -DOL_VALUE_DAY=Invoice day -DOL_VALUE_DAY_LETTERS=Inovice day in letters -DOL_LINE_FEED_REVERSE=Line feed reverse -InvoiceID=Invoice ID +DOL_PRINT_BARCODE_CUSTOMER_ID=Imprimir o código de barras do cliente +DOL_CUT_PAPER_FULL=Cortar o ticket por completo +DOL_CUT_PAPER_PARTIAL=Cortar parcialmente o ticket +DOL_OPEN_DRAWER=Caixón aberto +DOL_ACTIVATE_BUZZER=Activar o zumbador +DOL_PRINT_QRCODE=Imprimir código QR +DOL_PRINT_LOGO=Imprimir o logotipo da miña empresa +DOL_PRINT_LOGO_OLD=Imprimir o logotipo da miña empresa (impresoras antigas) +DOL_BOLD=Negrita +DOL_BOLD_DISABLED=Desactivar negrita +DOL_DOUBLE_HEIGHT=Tamaño de dobre altura +DOL_DOUBLE_WIDTH=Tamaño de dobre ancho +DOL_DEFAULT_HEIGHT_WIDTH=Tamaño e ancho predeterminados +DOL_UNDERLINE=Activar subliñado +DOL_UNDERLINE_DISABLED=Desactivar o subliñado +DOL_BEEP=Pitido +DOL_PRINT_TEXT=Imprimir texto +DateInvoiceWithTime=Data e hora da factura +YearInvoice=Ano de factura +DOL_VALUE_MONTH_LETTERS=Mes de factura en letras +DOL_VALUE_MONTH=Mes da factura +DOL_VALUE_DAY=Día da factura +DOL_VALUE_DAY_LETTERS=Día factura en letras +DOL_LINE_FEED_REVERSE=Avance de liña inverso +InvoiceID=ID de factura InvoiceRef=Ref. factura -DOL_PRINT_OBJECT_LINES=Invoice lines -DOL_VALUE_CUSTOMER_FIRSTNAME=Customer first name -DOL_VALUE_CUSTOMER_LASTNAME=Customer last name -DOL_VALUE_CUSTOMER_MAIL=Customer mail -DOL_VALUE_CUSTOMER_PHONE=Customer phone -DOL_VALUE_CUSTOMER_MOBILE=Customer mobile -DOL_VALUE_CUSTOMER_SKYPE=Customer Skype -DOL_VALUE_CUSTOMER_TAX_NUMBER=Customer tax number -DOL_VALUE_CUSTOMER_ACCOUNT_BALANCE=Customer account balance -DOL_VALUE_MYSOC_NAME=Your company name -VendorLastname=Vendor last name -VendorFirstname=Vendor first name -VendorEmail=Vendor email -DOL_VALUE_CUSTOMER_POINTS=Customer points -DOL_VALUE_OBJECT_POINTS=Object points +DOL_PRINT_OBJECT_LINES=Liñas de factura +DOL_VALUE_CUSTOMER_FIRSTNAME=Nome do cliente +DOL_VALUE_CUSTOMER_LASTNAME=Apelido do cliente +DOL_VALUE_CUSTOMER_MAIL=Correo do cliente +DOL_VALUE_CUSTOMER_PHONE=Teléfono do cliente +DOL_VALUE_CUSTOMER_MOBILE=Móbil do cliente +DOL_VALUE_CUSTOMER_SKYPE=Cliente Skype +DOL_VALUE_CUSTOMER_TAX_NUMBER=Número fiscal do cliente +DOL_VALUE_CUSTOMER_ACCOUNT_BALANCE=Saldo da conta do cliente +DOL_VALUE_MYSOC_NAME=Nome da súa empresa +VendorLastname=Apelido do vendedor +VendorFirstname=Nome do vendedor +VendorEmail=Correo electrónico do vendedor +DOL_VALUE_CUSTOMER_POINTS=Puntos de cliente +DOL_VALUE_OBJECT_POINTS=Puntos obxecto diff --git a/htdocs/langs/gl_ES/receptions.lang b/htdocs/langs/gl_ES/receptions.lang index aa749200b20..6c33af15572 100644 --- a/htdocs/langs/gl_ES/receptions.lang +++ b/htdocs/langs/gl_ES/receptions.lang @@ -1,47 +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 +ReceptionsSetup=Configuración da recepción del producto +RefReception=Ref. recepción +Reception=Recepción +Receptions=Recepcións +AllReceptions=Todas as recepcións +Reception=Recepción +Receptions=Recepcións +ShowReception=Amosar recepcións +ReceptionsArea=Área recepcións +ListOfReceptions=Listaxe de recepcións +ReceptionMethod=Método de recepción +LastReceptions=Últimas %s recepciones +StatisticsOfReceptions=Estadísticas de recepciones +NbOfReceptions=Número de recepciones +NumberOfReceptionsByMonth=Número de recepciones por mes +ReceptionCard=Ficha recepción +NewReception=Nova recepción +CreateReception=Crear recepción +QtyInOtherReceptions=Cant. en outras recepcións +OtherReceptionsForSameOrder=Outras recepciones deste pedimento +ReceptionsAndReceivingForSameOrder=Recepcións e recibos deste pedimento. +ReceptionsToValidate=Recepcións a validar StatusReceptionCanceled=Anulado StatusReceptionDraft=Borrador -StatusReceptionValidated=Validated (products to ship or already shipped) +StatusReceptionValidated=Validado (produtos a enviar ou enviados) StatusReceptionProcessed=Procesado StatusReceptionDraftShort=Borrador StatusReceptionValidatedShort=Validado StatusReceptionProcessedShort=Procesado -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 +ReceptionSheet=Folla de recepción +ConfirmDeleteReception=¿Está certo de querer eliminar esta recepción? +ConfirmValidateReception=¿Está certo de querer validar esta recepción coa referencia <b>%s</b>? +ConfirmCancelReception=¿Está certo de querer cancelar esta recepción? +StatsOnReceptionsOnlyValidated=Estatísticas realizadas únicamente sobre as recepcións validadas. A data usada é a data de validación da recepción (a data prevista de envío aínda non é coñecida) +SendReceptionByEMail=Enviar recepción por correo electrónico +SendReceptionRef=Envío da recepción %s +ActionsOnReception=Eventos sobre a recepción +ReceptionCreationIsDoneFromOrder=Polo momento, a creación dunha nova recepción faise a partir da tarxeta de pedimento. +ReceptionLine=Liña de recepción +ProductQtyInReceptionAlreadySent=Cantidade de produto do pedimento de cliente aberto xa enviado +ProductQtyInSuppliersReceptionAlreadyRecevied=Cantidade de produto en pedimentos a proveedores xa recibidos +ValidateOrderFirstBeforeReception=Primeiro debe validar o pedimento antes de poder facer recepcións. +ReceptionsNumberingModules=Módulo de numeración para recepcións +ReceptionsReceiptModel=Modeloss de documentos para recepcións. +NoMorePredefinedProductToDispatch=Non hai máis produtos predefinidos para enviar diff --git a/htdocs/langs/gl_ES/recruitment.lang b/htdocs/langs/gl_ES/recruitment.lang index f97c12e25bb..f247bc5bd29 100644 --- a/htdocs/langs/gl_ES/recruitment.lang +++ b/htdocs/langs/gl_ES/recruitment.lang @@ -18,58 +18,59 @@ # # Module label 'ModuleRecruitmentName' -ModuleRecruitmentName = Recruitment +ModuleRecruitmentName = Contratación # Module description 'ModuleRecruitmentDesc' -ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions +ModuleRecruitmentDesc = Xestionar e seguir campañas de contratación para novos postos de traballo # # Admin page # -RecruitmentSetup = Recruitment setup +RecruitmentSetup = Configuración da contratación Settings = Configuracións -RecruitmentSetupPage = Enter here the setup of main options for the recruitment module -RecruitmentArea=Recruitement area -PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. -EnablePublicRecruitmentPages=Enable public pages of open jobs +RecruitmentSetupPage = Introduza aquí a configuración das principais opcións para o módulo de contratación +RecruitmentArea=Área de contratación +PublicInterfaceRecruitmentDesc=As páxinas públicas dos traballos son URL públicas para mostrar e responder aos traballos dispoñibles. Hai un enlace diferente para cada traballo dispoñible, que se atopa en cada rexistro de traballo. +EnablePublicRecruitmentPages=Activar páxinas públicas de traballos dispoñibles # # About page # -About = Acerca de -RecruitmentAbout = About Recruitment -RecruitmentAboutPage = Recruitment about page -NbOfEmployeesExpected=Expected nb of employees -JobLabel=Label of job position -WorkPlace=Work place -DateExpected=Expected date -FutureManager=Future manager -ResponsibleOfRecruitement=Responsible of recruitment -IfJobIsLocatedAtAPartner=If job is located at a partner place +About = page +RecruitmentAbout = Acerca de contratación +RecruitmentAboutPage = Páxina acerca de contratación +NbOfEmployeesExpected=Número esperado de empregados +JobLabel=Etiqueta de posto de traballo +WorkPlace=Lugar de traballo +DateExpected=Data agardado +FutureManager=Xestor de futuro +ResponsibleOfRecruitement=Responsable da contratación +IfJobIsLocatedAtAPartner=Se o traballo está situado nun lugar asociado PositionToBeFilled=Posto de traballo -PositionsToBeFilled=Job positions +PositionsToBeFilled=Listaxe de postos de traballo ListOfPositionsToBeFilled=List of job positions -NewPositionToBeFilled=New job positions +NewPositionToBeFilled=Novos postos de traballo -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) +JobOfferToBeFilled=Posto de traballo a ocupar +ThisIsInformationOnJobPosition=Información do posto de traballo a ocupar +ContactForRecruitment=Contacto para a contratación +EmailRecruiter=Correo electrónico do responsable de contratación +ToUseAGenericEmail=Para usar un correo electrónico xenérico. Se non se define, utilizarase o correo electrónico do responsable de contratación +NewCandidature=Nova aplicación +ListOfCandidatures=Listaxe de aplicacións +RequestedRemuneration=Remuneración solicitada +ProposedRemuneration=Proposta de remuneración +ContractProposed=Poroposta de contrato +ContractSigned=Contrato asinado +ContractRefused=Rexeitouse o contrato +RecruitmentCandidature=Solicitude +JobPositions=Postos de traballo +RecruitmentCandidatures=Solicitudes +InterviewToDo=Entrevista a realizar +AnswerCandidature=Resposta da solicitude +YourCandidature=A súa solicitude +YourCandidatureAnswerMessage=Grazas pola túa solicitude.<br>... +JobClosedTextCandidateFound=O posto de traballo está pechado. O posto foi cuberto. +JobClosedTextCanceled=O posto de traballo está pechado +ExtrafieldsJobPosition=Atributos complementarios (postos de traballo) +ExtrafieldsCandidatures=Atributos complementarios (solicitudes de traballo) +MakeOffer=Facer unha oferta diff --git a/htdocs/langs/gl_ES/resource.lang b/htdocs/langs/gl_ES/resource.lang index 360dbebb5ac..3f2853318eb 100644 --- a/htdocs/langs/gl_ES/resource.lang +++ b/htdocs/langs/gl_ES/resource.lang @@ -1,39 +1,39 @@ # Dolibarr language file - Source file is en_US - resource MenuResourceIndex=Recursos -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 +MenuResourceAdd=Novo recurso +DeleteResource=Eliminar recurso +ConfirmDeleteResourceElement=Confirme eliminar o recurso deste elemento +NoResourceInDatabase=Sen recursos na base de datos. +NoResourceLinked=Sen recursos ligados +ActionsOnResource=Eventos sobre este recurso +ResourcePageIndex=Listaxe de recursos +ResourceSingular=Recurso +ResourceCard=Ficha do recurso +AddResource=Crear un recurso +ResourceFormLabel_ref=Nome do recurso +ResourceType=Tipo de recurso +ResourceFormLabel_description=Descrición do recurso -ResourcesLinkedToElement=Resources linked to element +ResourcesLinkedToElement=Recursos ligados ao elemento -ShowResource=Show resource +ShowResource=Amosar recurso -ResourceElementPage=Element resources -ResourceCreatedWithSuccess=Resource successfully created -RessourceLineSuccessfullyDeleted=Resource line successfully deleted -RessourceLineSuccessfullyUpdated=Resource line successfully updated -ResourceLinkedWithSuccess=Resource linked with success +ResourceElementPage=Elementos de recursos +ResourceCreatedWithSuccess=Recurso creado correctamente +RessourceLineSuccessfullyDeleted=Liña de recurso eliminada correctamente +RessourceLineSuccessfullyUpdated=Liña de recurso actualizada correctamente +ResourceLinkedWithSuccess=Recurso ligado correctamente -ConfirmDeleteResource=Confirm to delete this resource -RessourceSuccessfullyDeleted=Resource successfully deleted -DictionaryResourceType=Type of resources +ConfirmDeleteResource=Confirme eliminar este recurso +RessourceSuccessfullyDeleted=Recurso eliminado correctamente +DictionaryResourceType=Tipo de recursos -SelectResource=Select resource +SelectResource=Seleccionar o recurso -IdResource=Id resource -AssetNumber=Serial number -ResourceTypeCode=Resource type code +IdResource=Id do recurso +AssetNumber=Número de serie +ResourceTypeCode=Código do tipo de recurso ImportDataset_resource_1=Recursos -ErrorResourcesAlreadyInUse=Some resources are in use -ErrorResourceUseInEvent=%s used in %s event +ErrorResourcesAlreadyInUse=Algúns recursos están en uso +ErrorResourceUseInEvent=%s usado en %s evento diff --git a/htdocs/langs/gl_ES/sendings.lang b/htdocs/langs/gl_ES/sendings.lang index 7a2a0c2ce0b..99d7be5b352 100644 --- a/htdocs/langs/gl_ES/sendings.lang +++ b/htdocs/langs/gl_ES/sendings.lang @@ -1,74 +1,76 @@ # Dolibarr language file - Source file is en_US - sendings -RefSending=Ref. shipment -Sending=Shipment +RefSending=Ref. envío +Sending=Envío Sendings=Envíos -AllSendings=All Shipments -Shipment=Shipment +AllSendings=Todos os envíos +Shipment=Envío Shipments=Envíos -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 +ShowSending=Amosar envíos +Receivings=Recepcións +SendingsArea=Área envíos +ListOfSendings=Listaxe de envíos +SendingMethod=Método de envío +LastSendings=Últimos %s envíos +StatisticsOfSendings=Estatísticas de envíos +NbOfSendings=Número de envíos +NumberOfShipmentsByMonth=Número de envíos por mes +SendingCard=Ficha envío +NewSending=Novo envío +CreateShipment=Crear envío +QtyShipped=Cant. enviada +QtyShippedShort=Cant. env. +QtyPreparedOrShipped=Cant. preparada ou enviada +QtyToShip=Cant. a enviar +QtyToReceive=Cant. a recibir +QtyReceived=Cant. recibida +QtyInOtherShipments=Cant. en outros envíos +KeepToShip=Resto a enviar +KeepToShipShort=Pendente +OtherSendingsForSameOrder=Outros envíos deste pedimento +SendingsAndReceivingForSameOrder=Envíos e recepcións deste pedimento +SendingsToValidate=Envíos a validar StatusSendingCanceled=Anulado +StatusSendingCanceledShort=Anulada StatusSendingDraft=Borrador -StatusSendingValidated=Validated (products to ship or already shipped) +StatusSendingValidated=Validado (produtos a enviar ou enviados) StatusSendingProcessed=Procesado StatusSendingDraftShort=Borrador StatusSendingValidatedShort=Validado StatusSendingProcessedShort=Procesado -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. +SendingSheet=Nota de entrega +ConfirmDeleteSending=¿Está certo de querer eliminar esta expedición? +ConfirmValidateSending=¿Está certo de querer validar esta expedición coa referencia <b>%s</b>? +ConfirmCancelSending=¿Está certo de querer anular esta expedición? +DocumentModelMerou=Modelo Merou A5 +WarningNoQtyLeftToSend=Alerta, ningún produto agardando para ser enviado. +StatsOnShipmentsOnlyValidated=Estatísticas realizadas únicamente sobre as expedicións validadas +DateDeliveryPlanned=Data prevista de entrega +RefDeliveryReceipt=Ref. nota de entrega +StatusReceipt=Estado nota de entrega +DateReceived=Data real de recepción +ClassifyReception=Clasificar recibido +SendShippingByEMail=Envío de expedición por correo electrónico +SendShippingRef=Envío da expedición %s +ActionsOnShipping=Eventos sobre a expedición +LinkToTrackYourPackage=Ligazón para o seguimento do seu paquete +ShipmentCreationIsDoneFromOrder=Polo momento, a creación dun novo envío faise a partir da tarxeta de pedimento. +ShipmentLine=Liña de expedición +ProductQtyInCustomersOrdersRunning=Cantidade en pedimentos de clientes abertos +ProductQtyInSuppliersOrdersRunning=Cantidade en pedimentos a provedores abertos +ProductQtyInShipmentAlreadySent=Cantidade de produto do pedimento de cliente aberto xa enviado +ProductQtyInSuppliersShipmentAlreadyRecevied=Cantidade en pedimentos a proveedores xa recibidos +NoProductToShipFoundIntoStock=Non se atopou ningún produto para enviar no almacén <b>% s </b>. Corrixir o stock ou voltar a escoller outro almacén. +WeightVolShort=Peso/Vol. +ValidateOrderFirstBeforeShipment=Antes de poder realizar envíos debe validar o pedimento. # Sending methods # ModelDocument -DocumentModelTyphon=More complete document model for delivery receipts (logo...) -Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined -SumOfProductVolumes=Sum of product volumes -SumOfProductWeights=Sum of product weights +DocumentModelTyphon=Modelo de documento mais completo de nota de entrega (logo...) +DocumentModelStorm=Modelo de documento máis completo para a compatibilidade de recibos de entrega e campos extra (logo ...) +Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constante EXPEDITION_ADDON_NUMBER no definida +SumOfProductVolumes=Suma do volume dos produtos +SumOfProductWeights=Suma do peso dos produtos # warehouse details -DetailWarehouseNumber= Warehouse details -DetailWarehouseFormat= W:%s (Qty: %d) +DetailWarehouseNumber= Detalles do almacén +DetailWarehouseFormat= Alm.:%s (Cant. : %d) diff --git a/htdocs/langs/gl_ES/sms.lang b/htdocs/langs/gl_ES/sms.lang index 75f91e553c4..6d1b63764fb 100644 --- a/htdocs/langs/gl_ES/sms.lang +++ b/htdocs/langs/gl_ES/sms.lang @@ -36,16 +36,16 @@ SmsStatusSentCompletely=Envío completado SmsStatusError=Erro SmsStatusNotSent=Non enviado SmsSuccessfulySent=SMS enviado correctamente (de 1%s a 1%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) +ErrorSmsRecipientIsEmpty=O número de destino está baleiro +WarningNoSmsAdded=Non hai ningún número de teléfono novo para engadir á lista de destinos +ConfirmValidSms=Confirmas a validación desta campaña? +NbOfUniqueSms=Nº números de teléfonos únicos +NbOfSms=Nº de números de teléfono +ThisIsATestMessage=Esta é unha mensaxe de proba +SendSms=Enviar SMS +SmsInfoCharRemain=Nº de caracteres restantes +SmsInfoNumero= (formato internacional ex.: +33899701761) +DelayBeforeSending=Atraso antes de envío (minutos) +SmsNoPossibleSenderFound=Sen remitente dispoñible. Comprobe a configuración do seu fornecedor de SMS. +SmsNoPossibleRecipientFound=Sen destino dispoñible. Comprobe a configuración do seu fornecedor de SMS. +DisableStopIfSupported=Desctivar a mensaxe STOP (sé é soportado) diff --git a/htdocs/langs/gl_ES/stocks.lang b/htdocs/langs/gl_ES/stocks.lang index dbe81a57b5b..489350367f1 100644 --- a/htdocs/langs/gl_ES/stocks.lang +++ b/htdocs/langs/gl_ES/stocks.lang @@ -1,242 +1,244 @@ # Dolibarr language file - Source file is en_US - stocks -WarehouseCard=Warehouse card +WarehouseCard=Ficha almacén Warehouse=Almacén -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 +Warehouses=Almacéns +ParentWarehouse=Almacén pai +NewWarehouse=Novo almacén / Zona de almacenaxe +WarehouseEdit=Modificar almacén +MenuNewWarehouse=Novo almacén +WarehouseSource=Almacén orixe +WarehouseSourceNotDefined=Sen almacéns definidos, +AddWarehouse=Crear almacén +AddOne=Engadir un +DefaultWarehouse=Almacén por defecto +WarehouseTarget=Almacén destino +ValidateSending=Validar envío +CancelSending=Anular envío +DeleteSending=Eliminar envío Stock=Stock Stocks=Stocks -MissingStocks=Missing stocks -StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future -StocksByLotSerial=Stocks by lot/serial -LotSerial=Lots/Serials -LotSerialList=List of lot/serials +MissingStocks=Falta sock +StockAtDate=Stocks á data +StockAtDateInPast=Data no pasado +StockAtDateInFuture=Data no futuro +StocksByLotSerial=Stocks por lotes/serie +LotSerial=Lotes/Series +LotSerialList=Listaxe de lotes/series Movements=Movementos -ErrorWarehouseRefRequired=Warehouse reference name is required -ListOfWarehouses=List of warehouses +ErrorWarehouseRefRequired=O nome de referencia do almacén é obrigado +ListOfWarehouses=Listaxe de almacéns ListOfStockMovements=Listaxe de movementos de stock -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 +ListOfInventories=Listaxe de inventarios +MovementId=ID movemento +StockMovementForId=ID movemento %d +ListMouvementStockProject=Listaxe de movementos de stock asociados ao proxecto +StocksArea=Área almacéns +AllWarehouses=Todos os almacéns +IncludeEmptyDesiredStock=Inclúe tamén stock negativo con stock desexado indefinido +IncludeAlsoDraftOrders=Incluir tamén pedimentos borrador Location=Localización -LocationSummary=Short name location -NumberOfDifferentProducts=Number of different products -NumberOfProducts=Total number of products -LastMovement=Latest movement -LastMovements=Latest movements +LocationSummary=Nome curto da localización +NumberOfDifferentProducts=Número de produtos diferentes +NumberOfProducts=Numero total de produtos +LastMovement=Último movemento +LastMovements=Últimos movementos Units=Unidades Unit=Unidade -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) +StockCorrection=Corrección stock +CorrectStock=Corrixir stock +StockTransfer=Transferencia de stock +TransferStock=Transferir stock +MassStockTransferShort=Transferencia de stock masiva +StockMovement=Movemento de stock +StockMovements=Movementos de stock +NumberOfUnit=Número de unidades +UnitPurchaseValue=Prezo de compra unitario +StockTooLow=Stock insuficinte +StockLowerThanLimit=O stock é menor que o límite da alerta (%s) EnhancedValue=Valor -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 -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 pending orders that are planned to be done before the date will be finished -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) -IdWarehouse=Id warehouse -DescWareHouse=Description warehouse -LieuWareHouse=Localisation warehouse -WarehousesAndProducts=Warehouses and products -WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average price -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. -SellPriceMin=Selling Unit Price -EstimatedStockValueSellShort=Value for sell -EstimatedStockValueSell=Value for sell -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 onto "%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=Type 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'). +PMPValue=Prezo medio ponderado +PMPValueShort=PMP +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 +UserDefaultWarehouse=Establecer un almacén para usuarios +MainDefaultWarehouse=Almacén por defecto +MainDefaultWarehouseUser=Usar un almacén por defecto para cada usuario +MainDefaultWarehouseUserDesc=Ao activar esta opción, durante a creación dun produto, o almacén asignado ao produto definirase nesta. Se non se define ningún almacén no usuario, defínese automaticamente o almacén predeterminado. +IndependantSubProductStock=Stock do producto e stock do subproducto son independentes +QtyDispatched=Cantidade enviada +QtyDispatchedShort=Cant. enviada +QtyToDispatchShort=Cant. a enviar +OrderDispatch=Artigos recibidos +RuleForStockManagementDecrease=Escolla Regra para diminución automática de stock (sempre é posible a diminución manual, aínda que estexa activada unha regra de diminución automática) +RuleForStockManagementIncrease=Escolla Regra para o aumento automático de stock (o aumento manual sempre é posible, aínda que estexa activada unha regra de aumento automático) +DeStockOnBill=Diminuir o stock real na validación da factura/nota de crédito do cliente +DeStockOnValidateOrder=Diminuír o stock real na validación do pedimento de provedor +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 +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. +StockDiffPhysicTeoric=Explicación da diferenza entre stock físico e virtual +NoPredefinedProductToDispatch=Non hai produtos predefinidos para este obxecto. Polo tanto, non é preciso o stock en envío. +DispatchVerb=Enviado +StockLimitShort=Límite para alerta +StockLimit=Stock límite para alertas +StockLimitDesc=(baleiro) significa que non hai aviso.<br> 0 pode usarse como aviso en canto o stock estexa baleiro. +PhysicalStock=Stock físico +RealStock=Stock real +RealStockDesc=O stock físico/real é o stock actualmente existente nos almacéns +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 +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.) +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. +SellPriceMin=Prezo de venda unitario +EstimatedStockValueSellShort=Valor de venda +EstimatedStockValueSell=Valor de venda +EstimatedStockValueShort=Valor compra de stock +EstimatedStockValue=Valor de compra de stock +DeleteAWarehouse=Eliminar un almacén +ConfirmDeleteWarehouse=¿Está certo de querer eliminar o almacén <b>%s</b>? +PersonalStock=Stock persoal %s +ThisWarehouseIsPersonalStock=Este almacén representa o stock persoal de %s %s +SelectWarehouseForStockDecrease=Seleccione o almacén a usar no decremento de stock +SelectWarehouseForStockIncrease=Seleccione o almacén a usar no incremento de stock +NoStockAction=Sen accións sobre o stock +DesiredStock=Stock óptimo desexado +DesiredStockDesc=Esta cantidade será o valor que se utilizará para encher o stock no reposición. +StockToBuy=A pedir +Replenishment=Reposición +ReplenishmentOrders=Ordes de reposición +VirtualDiffersFromPhysical=Segundo as opcións de aumento/disminución, o stock físico e virtual (pedimentos en curso+stock físico) pode diferir +UseRealStockByDefault=Usar stock real por defecto, en lugar de stock virtual, para o reposición +ReplenishmentCalculation=A cantidade a pedir será (cantidade desexada - stock real) en lugar de (cantidade desexada - stock virtual) +UseVirtualStock=Usar stock virtual +UsePhysicalStock=Usar stock físico +CurentSelectionMode=Modo de selección actual +CurentlyUsingVirtualStock=Stock virtual +CurentlyUsingPhysicalStock=Stock físico +RuleForStockReplenishment=Regra para o reposicion de stock +SelectProductWithNotNullQty=Seleccione alo menos un produto cunha cantidade distinta de cero e un provedor +AlertOnly= Só alertas +IncludeProductWithUndefinedAlerts = Inclúe tamén stock negativo para produtos sen cantidade desexada definida, para restablecelos a 0 +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. +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". +RecordMovement=Rexistrar transferencia +ReceivingForSameOrder=Recepcións deste pedimento +StockMovementRecorded=Movemento de stock rexistrado +RuleForStockAvailability=Reglas de requerimento de stock +StockMustBeEnoughForInvoice=O nivel de stock debe ser suficiente para engadir produto/servizo á factura (a comprobación faise no stock real actual ao engadir unha liña na factura calquera que sexa a regra para o cambio automático de stock) +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 +DateMovement=Data de movemento +InventoryCode=Movemento ou código de inventario +IsInPackage=Contido no paquete +WarehouseAllowNegativeTransfer=O stock pode ser negativvo +qtyToTranferIsNotEnough=Non ten stock suficiente no seu almacén de orixe e a súa configuración non permite stocks negativos +qtyToTranferLotIsNotEnough=Non ten stock suficiente para este número de lote no seu almacén de orixe e a súa configuración non permite existencias negativas (a cantidade para o produto '%s' co lote '%s' é %s no almacén '%s'). ShowWarehouse=Ver almacén -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 +MovementCorrectStock=Correción de sotck do produto %s +MovementTransferStock=Transferencia de stock do produto %s a outro almacén +InventoryCodeShort=Código Inv./Mov. +NoPendingReceptionOnSupplierOrder=Non agárdanse recepcións do pedimento a provedor +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 +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 +InventoryDate=Data inventario +NewInventory=Novo inventario +inventorySetup = Configuración inventario +inventoryCreatePermission=Crear novo inventario +inventoryReadPermission=Ver inventarios +inventoryWritePermission=Actualizar inventarios +inventoryValidatePermission=Validar inventario inventoryTitle=Inventario -inventoryListTitle=Inventories -inventoryListEmpty=No inventory in progress -inventoryCreateDelete=Create/Delete inventory -inventoryCreate=Create new -inventoryEdit=Editar +inventoryListTitle=Inventarios +inventoryListEmpty=Sen inventario en progreso +inventoryCreateDelete=Crear/Eliminar inventario +inventoryCreate=Crear novo +inventoryEdit=Modificar inventoryValidate=Validado inventoryDraft=En servizo -inventorySelectWarehouse=Warehouse choice +inventorySelectWarehouse=Selección de almacén inventoryConfirmCreate=Crear -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 +inventoryOfWarehouse=Inventario para o almacén: %s +inventoryErrorQtyAdd=Erro: A cantidade é menor que cero +inventoryMvtStock=Por inventario +inventoryWarningProductAlreadyExists=Este producto xa atópase no listado +SelectCategory=Filtro por categoría +SelectFournisseur=Filtro provedor inventoryOnDate=Inventario -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 +INVENTORY_USE_INVENTORY_DATE_FOR_DATE_OF_MVT=Os movementos de stock terán a data do inventario (en lugar da data da validación do inventario) +inventoryChangePMPPermission=Permitir cambiar o PMP dun produto +ColumnNewPMP=Nova unidade PMP +OnlyProdsInStock=Non engadir produto sen stock +TheoricalQty=Cant. teórica +TheoricalValue=Cant. teórica +LastPA=Último BP +CurrentPA=BP actual +RecordedQty=Cant. gardada +RealQty=Cant. real +RealValue=Valor Real +RegulatedQty=Cant. Regulada +AddInventoryProduct=Engadir produto ao inventario AddProduct=Engadir -ApplyPMP=Apply PMP -FlushInventory=Flush inventory -ConfirmFlushInventory=Do you confirm this action? -InventoryFlushed=Inventory flushed -ExitEditMode=Exit edition +ApplyPMP=Aplicar PMP +FlushInventory=Inventario +ConfirmFlushInventory=¿Confirma esta acción? +InventoryFlushed=Inventario finalizado +ExitEditMode=Sair da edición inventoryDeleteLine=Eliminación de liña -RegulateStock=Regulate Stock +RegulateStock=Regular stock ListInventory=Listaxe -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) +StockSupportServices=A xestión de stock soporta Servizos +StockSupportServicesDesc=Por defecto só pode almacenar o produto co tipo "produto". Se está activado e se o servizo de módulo está activado, tamén pode almacenar un produto co tipo "servizo" +ReceiveProducts=Recibir artigos +StockIncreaseAfterCorrectTransfer=Incremento por corrección/transferencia +StockDecreaseAfterCorrectTransfer=Decremento por corrección/transferencia +StockIncrease=Incremento de stock +StockDecrease=Decremento de stock +InventoryForASpecificWarehouse=Inventario para un almacén determinado +InventoryForASpecificProduct=Inventario para un produto determinado +StockIsRequiredToChooseWhichLotToUse=Stock é solicitado para escoller que lote usar +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 +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 +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. diff --git a/htdocs/langs/gl_ES/stripe.lang b/htdocs/langs/gl_ES/stripe.lang index 38f22b6ab4d..9cd983083e0 100644 --- a/htdocs/langs/gl_ES/stripe.lang +++ b/htdocs/langs/gl_ES/stripe.lang @@ -1,72 +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 +StripeSetup=Configuración do módulo Stripe +StripeDesc=Este módulo ofrecelle páxinas para permitir o pagamento a clientes mediante <a href="http://www.stripe.com" target="_blank">Stripe</a>. Podese usar para un pagamento libre ou para un pagamento dun obxecto en concreto de Dolibarr (factura, pedimento...) +StripeOrCBDoPayment=Pagar con tarxeta de crédito ou Stripe +FollowingUrlAreAvailableToMakePayments=As seguintes URL están dispoñibles para ofrecer unha páxina a un cliente no que facer un pagamento de obxectos Dolibarr +PaymentForm=Forma de pagamento +WelcomeOnPaymentPage=A nosa benvida ao servizo de pagamento en liña +ThisScreenAllowsYouToPay=Esta pantalla permítelle facer un pagamento en liña a %s. +ThisIsInformationOnPayment=Esta é información sobre o pagamento a facer +ToComplete=Completar +YourEMail=Correo electrónico para recibir unha confirmación do pagamento +STRIPE_PAYONLINE_SENDEMAIL=Notificación por correo electrónico despois dun intento de pagamento (éxito ou fracaso) +Creditor=Acredor +PaymentCode=Código do pagamento +StripeDoPayment=Pagar con Stripe +YouWillBeRedirectedOnStripe=Será redirixido á páxina segura de Stripe para introducir a información da súa tarxeta de crédito Continue=Seguinte -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 -VendorName=Name of vendor -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 +ToOfferALinkForOnlinePayment=URL para o pagamento de %s +ToOfferALinkForOnlinePaymentOnOrder=URL para ofrecer unha páxina de pagamento en liña %s para un pedimento de cliente +ToOfferALinkForOnlinePaymentOnInvoice=URL para ofrecer unha páxina de pagamento en liña %s para a factura dun cliente +ToOfferALinkForOnlinePaymentOnContractLine=URL para ofrecer unha páxina de pagamento en liña %s para unha liña de contrato +ToOfferALinkForOnlinePaymentOnFreeAmount=URL para ofrecer unha páxina de pagamento en liña de %s de calquera cantidade sen ningún obxecto existente +ToOfferALinkForOnlinePaymentOnMemberSubscription=URL para ofrecer unha páxina de pagamento en liña %s para unha subscrición de membro +ToOfferALinkForOnlinePaymentOnDonation=URL para ofrecer unha páxina de pagamento en liña %s para o pagamento dunha doazón/subvención +YouCanAddTagOnUrl=Tamén pode engadir o parámetro URL <b>&tag=<i>valore</i> </b> a calquera deses URL (obrigatorio só para o pagamento non ligado a un obxecto) para engadir a súa propia etiqueta de comentario de pagamento. <br> Para a URL de pagamentos sen ningún obxecto existente, tamén pode engadir o parámetro <strong> &noidempotency=1 </strong> para que a mesma ligazón coa mesma etiqueta poida usarse varias veces (algúns modos de pagamento poden limitar o pagamento a 1 por cada ligazón diferente sen este parámetro) +SetupStripeToHavePaymentCreatedAutomatically=Configure o seu Stripe coa url <b>%s </b> para que o pagamento se cree automaticamente cando o valide Stripe. +AccountParameter=Parámetros da conta +UsageParameter=Parámetros de uso +InformationToFindParameters=Axuda para atopar a información da súa conta %s +STRIPE_CGI_URL_V2=URL do módulo CGI Stripe para o pagamento +CSSUrlForPaymentForm=URL da folla de estilo CSS para o formulario de pagamento +NewStripePaymentReceived=Recibiuse un novo pagamento Stripe +NewStripePaymentFailed=Intentouse un novo pagamento por Stripe pero fallou +FailedToChargeCard=Non se puido cargar a tarxeta +STRIPE_TEST_SECRET_KEY=Chave de proba secreta +STRIPE_TEST_PUBLISHABLE_KEY=Chave de proba publicable +STRIPE_TEST_WEBHOOK_KEY=Chave de proba de Webhook +STRIPE_LIVE_SECRET_KEY=Chave live secreta +STRIPE_LIVE_PUBLISHABLE_KEY=Chave live publicable +STRIPE_LIVE_WEBHOOK_KEY=Chave live de Webhook +ONLINE_PAYMENT_WAREHOUSE=Stock que se usará para diminuír o stock cando se faga o pagamento en liña <br> (TODO Cando se fai a opción de diminuír o stock nunha acción de factura e o pagamento en liña xera a factura?) +StripeLiveEnabled=Stripe live activado (se non, proba modo sandbox) +StripeImportPayment=Importar pagamentos de Stripe +ExampleOfTestCreditCard=Exemplo de tarxeta de crédito para a proba:%s => válido,%s => erro CVC,%s => caducado,%s => falla de carga +StripeGateways=Pasarelas de Stripe +OAUTH_STRIPE_TEST_ID=Id de cliente de Stripe Connect (ca _...) +OAUTH_STRIPE_LIVE_ID=Id de cliente Stripe Connect (ca _...) +BankAccountForBankTransfer=Conta bancaria para os as transferencias +StripeAccount=Conta Stripe +StripeChargeList=Listaxe de cargos Stripe +StripeTransactionList=Listaxe de transaccións +StripeCustomerId=Id de cliente de Stripe +StripePaymentModes=Modos de pagamento de Stripe +LocalID=ID local +StripeID=ID Stripe +NameOnCard=Nome na tarxeta +CardNumber=Número de tarxeta +ExpiryDate=Datos de caducidade 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 +DeleteACard=Eliminar tarxeta +ConfirmDeleteCard=Este certo querer eliminar esta tarxeta de Crédito ou Débito? +CreateCustomerOnStripe=Crear cliente en Stripe +CreateCardOnStripe=Crear unha tarxeta en Stripe +ShowInStripe=Amosar en Stripe +StripeUserAccountForActions=Conta de usuario a utilizar para a notificación por correo electrónico dalgúns eventos de Stripe (pagos de Stripe) +StripePayoutList=Listaxe de pagamentos de Stripe +ToOfferALinkForTestWebhook=Ligazón para configurar Stripe WebHook para chamar ao IPN (modo de proba) +ToOfferALinkForLiveWebhook=Ligazón para configurar Stripe WebHook para chamar ao IPN (modo en directo) +PaymentWillBeRecordedForNextPeriod=O pago será rexistrado para o seguinte período. +ClickHereToTryAgain=<a href="%s"> Faga clic aquí para tentalo de novo ... </a> +CreationOfPaymentModeMustBeDoneFromStripeInterface=Debido a fortes regras de autenticación do cliente, a creación dunha tarxeta debe facerse desde o backoffice de Stripe. Pode facer clic aquí para activar o rexistro de cliente de Stripe:%s diff --git a/htdocs/langs/gl_ES/supplier_proposal.lang b/htdocs/langs/gl_ES/supplier_proposal.lang index 1446d11794a..1d11586a557 100644 --- a/htdocs/langs/gl_ES/supplier_proposal.lang +++ b/htdocs/langs/gl_ES/supplier_proposal.lang @@ -1,54 +1,55 @@ # 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=Prezo orzamentos -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=Orzamentos de provedor -SupplierProposalsShort=Orzamentos de provedor -NewAskPrice=New price request -ShowSupplierProposal=Show price request -AddSupplierProposal=Create a price request -SupplierProposalRefFourn=Vendor ref +SupplierProposal=Orzamentos de provedor +supplier_proposalDESC=Xestiona orzamentos de provedor +SupplierProposalNew=Novo orzamento +CommRequest=Orzamento +CommRequests=Orzamentos +SearchRequest=Buscar un orzamento +DraftRequests=Orzamentos borrador +SupplierProposalsDraft=Orzamentos de provedor borrador +LastModifiedRequests=Últimos %s orzamentos modificados +RequestsOpened=Orzamentos abertos +SupplierProposalArea=Área orzamentos de provedor +SupplierProposalShort=Orzamento de provedor +SupplierProposals=Orzamentos de provedores +SupplierProposalsShort=Orzamentos de provedores +AskPrice=Orzamento +NewAskPrice=Novo orzamento +ShowSupplierProposal=Amosar orzamento +AddSupplierProposal=Crear un orzamento +SupplierProposalRefFourn=Ref. provedor SupplierProposalDate=Data de entrega -SupplierProposalRefFournNotice=Before closing to "Accepted", think to grasp suppliers references. -ConfirmValidateAsk=Are you sure you want to validate this price request under name <b>%s</b>? -DeleteAsk=Delete request -ValidateAsk=Validate request -SupplierProposalStatusDraft=Borrador (é preciso validar) -SupplierProposalStatusValidated=Validated (request is open) -SupplierProposalStatusClosed=Pechada -SupplierProposalStatusSigned=Accepted +SupplierProposalRefFournNotice=Antes de pechar a "Aceptado", pense en comprender as referencias dos provedores. +ConfirmValidateAsk=Está certo de querer validar esta solicitude de prezo co nome <b> %s</b>? +DeleteAsk=Eliminar orzamento +ValidateAsk=Validar orzamento +SupplierProposalStatusDraft=Borrador (a validar) +SupplierProposalStatusValidated=Validado (orzamento aberto) +SupplierProposalStatusClosed=Pechado +SupplierProposalStatusSigned=Aceptado SupplierProposalStatusNotSigned=Rexeitado SupplierProposalStatusDraftShort=Borrador SupplierProposalStatusValidatedShort=Validado -SupplierProposalStatusClosedShort=Pechada -SupplierProposalStatusSignedShort=Accepted +SupplierProposalStatusClosedShort=Pechado +SupplierProposalStatusSignedShort=Aceptado SupplierProposalStatusNotSignedShort=Rexeitado -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 +CopyAskFrom=Crear orzamento por copia dun existente +CreateEmptyAsk=Crear un orzamento en branco +ConfirmCloneAsk=¿Está certo de querer clonar o orzamento <b>%s</b>? +ConfirmReOpenAsk=¿Está certo de querer abrir de novo o orzamento <b>%s</b>? +SendAskByMail=Enviar orzamento por correo electrónico +SendAskRef=Enviando o orzamento %s +SupplierProposalCard=Ficha orzamento +ConfirmDeleteAsk=¿Está certo de querer eliminar este orzamento <b>%s</b>? +ActionsOnSupplierProposal=Eventos do orzamento +DocModelAuroreDescription=Modelo de orzamento completo (logo...) +CommercialAsk=Orzamento +DefaultModelSupplierProposalCreate=Modelo por defecto +DefaultModelSupplierProposalToBill=Modelo por defecto ao pechar un orzamento (aceptado) +DefaultModelSupplierProposalClosed=Modelo por defecto ao pechar un orzamento (rexeitado) +ListOfSupplierProposals=Listaxe de orzamentos de provedor +ListSupplierProposalsAssociatedProject=Listaxe de orzamentos de provedor asociados ao proxecto +SupplierProposalsToClose=Orzamentos de provedor a pechar +SupplierProposalsToProcess=Orzamentos de provedor a procesar +LastSupplierProposals=Últimos %s orzamentos +AllPriceRequests=Todos os orzamentos diff --git a/htdocs/langs/gl_ES/suppliers.lang b/htdocs/langs/gl_ES/suppliers.lang index 99bc16f91d3..1d835ebdedb 100644 --- a/htdocs/langs/gl_ES/suppliers.lang +++ b/htdocs/langs/gl_ES/suppliers.lang @@ -6,43 +6,43 @@ NewSupplier=Novo provedor History=Histórico ListOfSuppliers=Listaxe de provedores ShowSupplier=Ver provedor -OrderDate=Data de pedido +OrderDate=Data de pedimento BuyingPriceMin=Mellor prezo de compra BuyingPriceMinShort=Mellor prezo de compra -TotalBuyingPriceMinShort=Total dos prezos de compra dos subproductos -TotalSellingPriceMinShort=Total dos prezos de venda dos subproductos -SomeSubProductHaveNoPrices=Algúns subproductos non teñen prezo definido +TotalBuyingPriceMinShort=Total dos prezos de compra dos subprodutos +TotalSellingPriceMinShort=Total dos prezos de venda dos subprodutos +SomeSubProductHaveNoPrices=Algúns subprodutos non teñen prezo definido AddSupplierPrice=Engadir prezo de compra ChangeSupplierPrice=Mudar prezo de compra SupplierPrices=Prezos provedor ReferenceSupplierIsAlreadyAssociatedWithAProduct=Esta referencia de provedor xa está asociada á referencia: %s -NoRecordedSuppliers=Sen provedores registrados +NoRecordedSuppliers=Sen provedores rexistrados SupplierPayment=Pagos a provedor SuppliersArea=Área provedores RefSupplierShort=Ref. provedor Availability=Dispoñibilidade -ExportDataset_fournisseur_1=Facturas de provedor e detalle da factura -ExportDataset_fournisseur_2=Facturas de provedor e pagos -ExportDataset_fournisseur_3=Pedidos a provedor e detalles de pedido -ApproveThisOrder=Aprobar este pedido -ConfirmApproveThisOrder=Está certo de querer aprobar o pedido a provedor <b>%s</b>? -DenyingThisOrder=Denegar este pedido -ConfirmDenyingThisOrder=¿Está certo de querer denegar o pedido a provedor <b>%s</b>? -ConfirmCancelThisOrder=¿Está certo de querer cancelar o pedido a provedor <b>%s</b>? -AddSupplierOrder=Crear pedido a provedor +ExportDataset_fournisseur_1=Facturas de provedor e liñas de factura +ExportDataset_fournisseur_2=Facturas de provedor e pagamentos +ExportDataset_fournisseur_3=Pedimentos a provedor e liñas de pedimento +ApproveThisOrder=Aprobar este pedimento +ConfirmApproveThisOrder=Está certo de querer aprobar o pedimento a provedor <b>%s</b>? +DenyingThisOrder=Denegar este pedimento +ConfirmDenyingThisOrder=¿Está certo de querer denegar o pedimento a provedor <b>%s</b>? +ConfirmCancelThisOrder=¿Está certo de querer cancelar o pedimento a provedor <b>%s</b>? +AddSupplierOrder=Crear pedimento a provedor AddSupplierInvoice=Crear factura de provedor ListOfSupplierProductForSupplier=Listaxe de produtos e prezos do provedor <b>%s</b> SentToSuppliers=Enviado a provedores -ListOfSupplierOrders=Listaxe de pedidos de compra -MenuOrdersSupplierToBill=Pedidos de provedor a facturar -NbDaysToDelivery=Tempo de entrega (días) -DescNbDaysToDelivery=O maior atraso nas entregas de produtos deste pedido +ListOfSupplierOrders=Listaxe de pedimentos a provedor +MenuOrdersSupplierToBill=Pedimentos a provedor a facturar +NbDaysToDelivery=Tempo de entrega (en días) +DescNbDaysToDelivery=O maior atraso nas entregas de produtos deste pedimento SupplierReputation=Reputación provedor -ReferenceReputation=Reference reputation -DoNotOrderThisProductToThisSupplier=Non realizar pedidos +ReferenceReputation=Reputación de referencia +DoNotOrderThisProductToThisSupplier=Non realizar pedimentos NotTheGoodQualitySupplier=Mala calidade ReputationForThisProduct=Reputación BuyerName=Nome do comprador -AllProductServicePrices=Todos os prezos de produto / servizo -AllProductReferencesOfSupplier=All references of vendor +AllProductServicePrices=Todos os prezos de produto/servizo +AllProductReferencesOfSupplier=Todas as referencias de provedores de produto/servizo BuyingPriceNumShort=Prezos provedor diff --git a/htdocs/langs/gl_ES/ticket.lang b/htdocs/langs/gl_ES/ticket.lang index e99c740d69d..d9268409b20 100644 --- a/htdocs/langs/gl_ES/ticket.lang +++ b/htdocs/langs/gl_ES/ticket.lang @@ -19,289 +19,286 @@ # Module56000Name=Tickets -Module56000Desc=Ticket system for issue or request management +Module56000Desc=Sistema detickets para a xestión de emisións ou solicitudes -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) +Permission56001=Ver tickets +Permission56002=Modificar tickets +Permission56003=Eliminar tickets +Permission56004=Administrar tickets +Permission56005=Ver tickets de todos os terceiros (non aplicable para usuarios externos, sempre estará limitado ao terceiro do que dependen) -TicketDictType=Ticket - Types -TicketDictCategory=Ticket - Groupes -TicketDictSeverity=Ticket - Severities -TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketDictType=Tipo de tickets +TicketDictCategory=Grupos de tickets +TicketDictSeverity=Gravidade dos tickets +TicketDictResolution=Resolución dos tickets -TicketTypeShortHELP=Request for functionnal help -TicketTypeShortISSUE=Issue, bug or problem -TicketTypeShortREQUEST=Change or enhancement request +TicketTypeShortCOM=Pregunta comercial +TicketTypeShortHELP=Solicitar axuda sobre funcións +TicketTypeShortISSUE=Erro, bug ou problema +TicketTypeShortREQUEST=Solicitude de cambio ou mellora TicketTypeShortPROJET=Proxecto TicketTypeShortOTHER=Outro TicketSeverityShortLOW=Baixo TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=Alto -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Crítico / Bloqueo -ErrorBadEmailAddress=Field '%s' incorrect -MenuTicketMyAssign=My tickets -MenuTicketMyAssignNonClosed=My open tickets -MenuListNonClosed=Open tickets +ErrorBadEmailAddress=O campo '%s' é incorrecto +MenuTicketMyAssign=Meus tickets +MenuTicketMyAssignNonClosed=Meus tickets abertos +MenuListNonClosed=Tickets abertos TypeContact_ticket_internal_CONTRIBUTOR=Participante -TypeContact_ticket_internal_SUPPORTTEC=Assigned user -TypeContact_ticket_external_SUPPORTCLI=Customer contact / incident tracking -TypeContact_ticket_external_CONTRIBUTOR=External contributor +TypeContact_ticket_internal_SUPPORTTEC=Usuario asignado +TypeContact_ticket_external_SUPPORTCLI=Contacto seguemento cliente/incidente +TypeContact_ticket_external_CONTRIBUTOR=Contribuidor externo -OriginEmail=Email source -Notify_TICKET_SENTBYMAIL=Send ticket message by email +OriginEmail=Orixe E-Mail +Notify_TICKET_SENTBYMAIL=Enviar mensaxe de ticket por e-mail # Status -NotRead=Non lido Read=Lido -Assigned=Assigned +Assigned=Asignado InProgress=En progreso -NeedMoreInformation=Waiting for information -Answered=Answered -Waiting=Waiting -Closed=Pechada -Deleted=Deleted +NeedMoreInformation=Agardando información +Answered=Contestado +Waiting=Agardando +Closed=Pechado +Deleted=Eliminado # Dict Type=Tipo -Severity=Severity +Severity=Gravidade # Email templates -MailToSendTicketMessage=To send email from ticket message +MailToSendTicketMessage=Enviar correo electrónico dende ticket # # Admin page # -TicketSetup=Ticket module setup +TicketSetup=Configuración do módulo de ticket TicketSettings=Configuracións TicketSetupPage= -TicketPublicAccess=A public interface requiring no identification is available at the following url -TicketSetupDictionaries=The type of ticket, severity and analytic codes are configurable from dictionaries -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 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. -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 -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. +TicketPublicAccess=Na seguinte url está dispoñible unha interface pública que non precisa identificación +TicketSetupDictionaries=Os tipos de categorías e os niveis de gravidade podense configurar nos diccionarios +TicketParamModule=Configuración de variables do módulo +TicketParamMail=Configuración de correo electrónicol +TicketEmailNotificationFrom=E-mail de notificación de +TicketEmailNotificationFromHelp=Utilizado na resposta da mensaxe do ticket por exemplo +TicketEmailNotificationTo=Notificacións e-mail a +TicketEmailNotificationToHelp=Envíe notificacións por e-mail a este enderezo. +TicketNewEmailBodyLabel=Mensaxe de texto enviado despois de crear un ticket +TicketNewEmailBodyHelp=O texto especificado aquí será insertado no correo electrónico de confirmación de creación dun novo ticket dende a interfaz pública. A información sobre a consulta do ticket agregase automáticamente. +TicketParamPublicInterface=Configuración da interfaz pública +TicketsEmailMustExist=Requirir un enderezo de e-mail existente para crear un ticket +TicketsEmailMustExistHelp=Na interfaz pública, o enderezo de correo electrónico debe ser cuberto na base de datos para crear un novo ticket. +PublicInterface=Interfaz pública. +TicketUrlPublicInterfaceLabelAdmin=URL alternativa de interfaz pública +TicketUrlPublicInterfaceHelpAdmin=É posible definir un alias para o servidor web e así poñer a disposición a interface pública con outro URL (o servidor debe actuar como proxy neste novo URL) +TicketPublicInterfaceTextHomeLabelAdmin=Texto de benvida da interfaz pública +TicketPublicInterfaceTextHome=Pode crear un ticket de asistencia ou ver algún existente desde o identificados do seu ticket de seguimento. +TicketPublicInterfaceTextHomeHelpAdmin=O texto aquí definido aparecerá na páxina de inicio da interface pública. +TicketPublicInterfaceTopicLabelAdmin=Título da interfaz +TicketPublicInterfaceTopicHelp=Este texto aparecerá como o título da interfaz pública. +TicketPublicInterfaceTextHelpMessageLabelAdmin=Texto de axuda á entrada da mensaxe +TicketPublicInterfaceTextHelpMessageHelpAdmin=Este texto aparecerá sobre o área de entrada de mensaxes do usuario. +ExtraFieldsTicket=Campos adicionais +TicketCkEditorEmailNotActivated=O editor HTML non está activado. Poña o contido de FCKEDITOR_ENABLE_MAIL en 1 para obtelo. +TicketsDisableEmail=Non enviar correos electrónicos de creación de tickets ou grabación de mensaxes +TicketsDisableEmailHelp=Por defecto, os correos electrónicos envíanse cando se crean novas entradas ou mensaxes. Active esta opción para desactivar as notificacións de correo electrónico *all* +TicketsLogEnableEmail=Activar o rexistro por correo electrónico +TicketsLogEnableEmailHelp=A cada cambio, enviarase un correo electrónico **to each contact** asociado ao ticket. +TicketParams=Parámetros +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) +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 +TicketsActivatePublicInterfaceHelp=A interface pública permite aos visitantes crear entradas. +TicketsAutoAssignTicket=Asignar automaticamente ao usuario que creou o ticket +TicketsAutoAssignTicketHelp=Ao crear un ticket, o usuario pode asignarse automaticamente ao ticket. +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 +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. # # 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=Área Tickets +TicketList=Listaxe de tickets +TicketAssignedToMeInfos=Esta páxina amosa o listado de tickets que están asignados ao usuario actual +NoTicketsFound=Ningún ticket atopado +NoUnreadTicketsFound=Ningún ticket sen ler atopado +TicketViewAllTickets=Ver todos os tickets +TicketViewNonClosedOnly=Ver só tickets abertos +TicketStatByStatus=Tickets por estado +OrderByDateAsc=Ordear por data ascendente +OrderByDateDesc=Ordear por data descendente +ShowAsConversation=Amosar a listaxe de conversa +MessageListViewType=Amosar a listaxe de taboas # # 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=Grupo -SeeTicket=See ticket -TicketMarkedAsRead=Ticket has been marked as read -TicketReadOn=Read on +TicketCard=Ficha ticket +CreateTicket=Crear ticket +EditTicket=Editar ticket +TicketsManagement=Xestión de tickets +CreatedBy=Creado por +NewTicket=Novo ticket +SubjectAnswerToTicket=Resposta +TicketTypeRequest=Tipo de solicitude +TicketCategory=Grúpo +SeeTicket=Ver ticket +TicketMarkedAsRead=O ticket foi marcado como lido +TicketReadOn=Lido o TicketCloseOn=Data de peche -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. +MarkAsRead=Marcar ticket como lido +TicketHistory=Historial +AssignUser=Asignar ao usuario +TicketAssigned=O Ticket foi asignado +TicketChangeType=Cambiar tipo +TicketChangeCategory=Cambiar categoría +TicketChangeSeverity=Cambiar gravidade +TicketAddMessage=Engadir mensaxe +AddMessage=Engadir mensaxe +MessageSuccessfullyAdded=Ticket engadido +TicketMessageSuccessfullyAdded=Mensaxe engadida correctamente +TicketMessagesList=Listaxe de mensaxes +NoMsgForThisTicket=Ningunha mensaxe para este ticket +Properties=Clasificación +LatestNewTickets=Últimos %s tickets (non lidos) +TicketSeverity=Gravidade +ShowTicket=Ver ticket +RelatedTickets=Tickets relacionados +TicketAddIntervention=Crear intervención +CloseTicket=Pechar ticket +CloseATicket=Pechar un ticket +ConfirmCloseAticket=Confirmar o peche do ticket +ConfirmDeleteTicket=Confirme a eliminación do ticket +TicketDeletedSuccess=Ticket eliminado con éxito +TicketMarkedAsClosed=Ticket marcado como pechado +TicketDurationAuto=Duración calculada +TicketDurationAutoInfos=Duración calculada automáticamente a partir da intervención relacionada +TicketUpdated=Ticket actualizado +SendMessageByEmail=Enviar mensaxe por e-mail +TicketNewMessage=Nova mensaxe +ErrorMailRecipientIsEmptyForSendTicketMessage=O destinatario está baleiro. Non foi enviado o email +TicketGoIntoContactTab=Vaia á lapela "Contactos" para seleccionalos +TicketMessageMailIntro=Introdución +TicketMessageMailIntroHelp=Este texto é engadido só ao principio do email e non será gardado. +TicketMessageMailIntroLabelAdmin=Introdución á mensaxe cando enviase un e-mail +TicketMessageMailIntroText=Ola, <br>Enviouse unha nova resposta a un ticket. Aquí está a mensaxe: <br> +TicketMessageMailIntroHelpAdmin=Este texto será insertado antes do texto daa resposta a un ticket. TicketMessageMailSignature=Sinatura -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. -PublicInterfaceNotEnabled=Public interface was not enabled -ErrorTicketRefRequired=Ticket reference name is required +TicketMessageMailSignatureHelp=Este texto será agregado só ao final do correo electrónico e non será gardado. +TicketMessageMailSignatureText=<p>Cordialmente,</p><p>--</p> +TicketMessageMailSignatureLabelAdmin=Sinatura do correo electónico de resposta +TicketMessageMailSignatureHelpAdmin=Este texto será insertado despois da mensaxe de resposta. +TicketMessageHelp=Só este texto será gardado na listaxe de mensaxes na ficha do ticket +TicketMessageSubstitutionReplacedByGenericValues=As variables de substitución son reemplazadas por valores xenéricos. +TimeElapsedSince=Tempo transcurrido dende +TicketTimeToRead=Tempo transcurrido antes de ler o ticket +TicketContacts=Contactos do ticket +TicketDocumentsLinked=Documentos ligados ao ticket +ConfirmReOpenTicket=¿Está certo de querer reabrir este ticket? +TicketMessageMailIntroAutoNewPublicMessage=Publicouse unha nova mensaxe no ticket co asunto %s: +TicketAssignedToYou=Ticket asignado +TicketAssignedEmailBody=Foille asignado o ticket #%s por %s +MarkMessageAsPrivate=Marcar mensaxe como privada +TicketMessagePrivateHelp=Esta mensaxe non será amosada aos usuarios externos +TicketEmailOriginIssuer=Emisor orixe dos tickets +InitialMessage=Mensaxe inicial +LinkToAContract=Ligar a un contrato +TicketPleaseSelectAContract=Seleccione un contrato +UnableToCreateInterIfNoSocid=Non pode crearse unha intervención se non hai definidos terceiros +TicketMailExchanges=Intercambios de correos electrónicos +TicketInitialMessageModified=Mensaxe inicial modificada +TicketMessageSuccesfullyUpdated=Mensaxe actualizada con éxito +TicketChangeStatus=Cambiar estado +TicketConfirmChangeStatus=¿Confirma o cambio de estado: %s? +TicketLogStatusChanged=Estado cambiado: %s a %s +TicketNotNotifyTiersAtCreate=Non notificar á compañía ao crear +Unread=Non lido +TicketNotCreatedFromPublicInterface=Non dispoñible. O ticket non se creou desde a interface pública. +ErrorTicketRefRequired=O nome da referencia do ticket é obrigatorio # # 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=Ticket %s lido por %s +NoLogForThisTicket=Aínda no hai rexistro para este ticket +TicketLogAssignedTo=Ticket %s asignado a %s +TicketLogPropertyChanged=Ticket %s modificado: clasificación: de %s a %s +TicketLogClosedBy=Ticket %s pechado por %s +TicketLogReopen=Ticket %s aberto de novo # # 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! +TicketSystem=Sistema de tickets +ShowListTicketWithTrackId=Amosar listado de tickets con track ID +ShowTicketWithTrackId=Amosar ticket desde id de seguemento +TicketPublicDesc=Pode crear un ticket de soporte ou comprobar un ID existente. +YourTicketSuccessfullySaved=Ticket gardado con éxito! +MesgInfosPublicTicketCreatedWithTrackId=Foi creado un novo ticket con ID %s. +PleaseRememberThisId=Pregase que conserve o número de seguimento que lle podemos pedir máis adiante. +TicketNewEmailSubject=Confirmación de creación de ticket +TicketNewEmailSubjectCustomer=Novo ticket de soporte +TicketNewEmailBody=Este é un correo electrónico automático para confirmar que foi rexistrado un novo ticket. +TicketNewEmailBodyCustomer=Este es un e-mail automático para confirmar que creouse un novo ticket na súa conta. +TicketNewEmailBodyInfosTicket=Información para monitorear o ticket +TicketNewEmailBodyInfosTrackId=Número de seguemento do ticket: %s +TicketNewEmailBodyInfosTrackUrl=Pode ver o progreso do ticket facendo click sobre a seguinte ligazón. +TicketNewEmailBodyInfosTrackUrlCustomer=Pode ver o progreso do ticket na interfaz específica facendo clic na seguinte ligazón +TicketEmailPleaseDoNotReplyToThisEmail=Prégase non respostar directamente a este correo. Use a ligazón para respostar. +TicketPublicInfoCreateTicket=Este formulario permitelle rexistrar un ticket de soporte no noso sistema. +TicketPublicPleaseBeAccuratelyDescribe=Prégase describa de forma precisa o problema. Aporte a maior cantidade de información posible para permitirnos identificar a súa solicitude. +TicketPublicMsgViewLogIn=Ingrese o ID de seguemento do ticket +TicketTrackId=ID público de seguemento +OneOfTicketTrackId=Un dos seus ID de seguemento +ErrorTicketNotFound=Non foi atopado o ticket co id de seguemento %s! Subject=Asunto -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 +ViewTicket=Ver ticket +ViewMyTicketList=Ver a miña listaxe de tickets +ErrorEmailMustExistToCreateTicket=Erro: enderezo de correo electrónico non atopado na nosa base de datos +TicketNewEmailSubjectAdmin=Novo ticket creado. +TicketNewEmailBodyAdmin=<p> O ticket foi creado co ID # %s, ver información: </p> +SeeThisTicketIntomanagementInterface=Ver Ticket na interfaz de administración +TicketPublicInterfaceForbidden=A interfaz pública para os tickets non estaba habilitada. +ErrorEmailOrTrackingInvalid=ID de seguemento ou enderezo de correo electrónico incorrectos +OldUser=Usuario antigo NewUser=Novo usuario -NumberOfTicketsByMonth=Number of tickets per month -NbOfTickets=Number of tickets +NumberOfTicketsByMonth=Número de tickets por mes +NbOfTickets=Número de 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 +TicketNotificationEmailSubject=Ticket %s actualizado +TicketNotificationEmailBody=Esta é unha mensaxe automática para notificarlle queo ticket %s acaba de ser actualizado +TicketNotificationRecipient=Recipiente de notificación +TicketNotificationLogMessage=Rexistro de mensaxe +TicketNotificationEmailBodyInfosTrackUrlinternal=Ver ticket na interfaz +TicketNotificationNumberEmailSent=Enviouse un correo electrónico de notificación: %s -ActionsOnTicket=Events on ticket +ActionsOnTicket=Eventos no ticket # # Boxes # -BoxLastTicket=Latest created tickets -BoxLastTicketDescription=Latest %s created tickets +BoxLastTicket=Últimos tickets creados +BoxLastTicketDescription=Últimos %s tickets creados BoxLastTicketContent= -BoxLastTicketNoRecordedTickets=No recent unread tickets -BoxLastModifiedTicket=Latest modified tickets -BoxLastModifiedTicketDescription=Latest %s modified tickets +BoxLastTicketNoRecordedTickets=Non hai tickets recentes sen ler +BoxLastModifiedTicket=Últimos tickets modificados +BoxLastModifiedTicketDescription=Últimos %s tickets modificados BoxLastModifiedTicketContent= -BoxLastModifiedTicketNoRecordedTickets=No recent modified tickets +BoxLastModifiedTicketNoRecordedTickets=Non hai tickets modificados recentemente diff --git a/htdocs/langs/gl_ES/trips.lang b/htdocs/langs/gl_ES/trips.lang index 639e621d831..98087e25679 100644 --- a/htdocs/langs/gl_ES/trips.lang +++ b/htdocs/langs/gl_ES/trips.lang @@ -1,151 +1,151 @@ # Dolibarr language file - Source file is en_US - trips -ShowExpenseReport=Show expense report +ShowExpenseReport=Ver informe de gastos Trips=Informes de gastos -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 inform for validation. -TripSociete=Information company -TripNDF=Informations expense report -PDFStandardExpenseReports=Standard template to generate a PDF document for expense report -ExpenseReportLine=Expense report line +TripsAndExpenses=Informes de gastos +TripsAndExpensesStatistics=Estatísticas de informes de gastos +TripCard=Ficha de informe gasto +AddTrip=Crear informe de informes de gasto +ListOfTrips=Listaxe de informes de gastos +ListOfFees=Listaxe de honorarios +TypeFees=Tipos de honorarios +ShowTrip=Ver informe de gastos +NewTrip=Novo informe de gasto +LastExpenseReports=Últimos %s informes de gastos +AllExpenseReports=Todos os informes de gastos +CompanyVisited=Empresa/organización visitada +FeesKilometersOrAmout=Importe ou quilómetros +DeleteTrip=Eliminar informe de gasto +ConfirmDeleteTrip=¿Está certo de querer eliminar este informe de gasto? +ListTripsAndExpenses=Listaxe de informe de gastos +ListToApprove=Agardando aprobación +ExpensesArea=Área de informe de gastos +ClassifyRefunded=Clasificar 'Reembolsado' +ExpenseReportWaitingForApproval=Foi enviado un novo informe de gasto para ser aprobado +ExpenseReportWaitingForApprovalMessage=Foi enviado un novo ginforme de asto e está agardando para ser aprobado.<br>- Usuario: %s<br>- Periodo. %s<br>Faga clic aquí para validalo: %s +ExpenseReportWaitingForReApproval=Foi enviado un novo informe de gasto para aprobalo de novo +ExpenseReportWaitingForReApprovalMessage=Foi enviado un novo informe de gasto e está agardando para ser aprobado de novo.<br>O %s, rexeitou a súa aprobación por esta razón: %s<br>Foi proposta unha nova versión e agarda a súa aprobación.<br>- Usuario: %s<br>- Periodo. %s<br>Faga clic aquí para validalo: %s +ExpenseReportApproved=Un novo informe de gasto foi aprobado +ExpenseReportApprovedMessage=O informe de gasto %s foi aprobado.<br>- Usuario: %s<br>- Aprobado por: %s<br>Faga clic aquí para validalo: %s +ExpenseReportRefused=Un informe de gasto foi rexeitado +ExpenseReportRefusedMessage=O informe de gasto %s foi rexeitado.<br>- Usuario: %s<br>- Rexeitado por: %s<br>- Motivo do rexeitamento: %s<br>Faga clic aquí ver o gasto: %s +ExpenseReportCanceled=Un informe de gasto foi cancelado +ExpenseReportCanceledMessage=O informe de gasto %s foi cancelado.<br>- Usuario: %s<br>- Cancelado por: %s<br>- Motivo da cancelación: %s<br>Faga clic aquí ver o gasto: %s +ExpenseReportPaid=Un informe de gasto foi pagado +ExpenseReportPaidMessage=O informe de gasto %s foi pagado.<br>- Usuario: %s<br>- Pagado por: %s<br>Faga clic aquí ver o gasto: %s +TripId=Id de informe de gasto +AnyOtherInThisListCanValidate=Persoa a informar para a validación +TripSociete=Información da empresa +TripNDF=Información do informe de gasto +PDFStandardExpenseReports=Prantilla estandard para xerar un documento de informe de gasto +ExpenseReportLine=Liña de informe gasto TF_OTHER=Outro -TF_TRIP=Transportation -TF_LUNCH=Lunch +TF_TRIP=Transporte +TF_LUNCH=Xantar TF_METRO=Metro -TF_TRAIN=Train -TF_BUS=Bus +TF_TRAIN=Trén +TF_BUS=Autocar TF_CAR=Coche -TF_PEAGE=Toll -TF_ESSENCE=Fuel +TF_PEAGE=Peaxe +TF_ESSENCE=Combustible TF_HOTEL=Hotel TF_TAXI=Taxi -EX_KME=Mileage costs -EX_FUE=Fuel CV +EX_KME=Custos de quilometraxe +EX_FUE=Combustible 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 +EX_PAR=Estacionamento +EX_TOL=Peaxe +EX_TAX=Impostos varios +EX_IND=Suscrición de indemnización por transporte +EX_SUM=Mantemento +EX_SUO=Material de oficina +EX_CAR=Aluguer de vehículos +EX_DOC=Documentación +EX_CUR=Os clientes reciben +EX_OTR=Outros receptores +EX_POS=Franqueo +EX_CAM=Mantemento e reparación +EX_EMM=Alimentación de empregados +EX_GUM=Alimentación dos hóspedes +EX_BRE=Almorzo +EX_FUE_VP=Combustible +EX_TOL_VP=Peaxe +EX_PAR_VP=Estacionamento +EX_CAM_VP=Mantemento e reparacións +DefaultCategoryCar=Modo de transporte predeterminado +DefaultRangeNumber=Número de rango predeterminado +UploadANewFileNow=Subir un novo documento agora +Error_EXPENSEREPORT_ADDON_NotDefined=Erro, a regra para a ref de numeración do informe de gastos non se definiu na configuración do módulo "Informe de gastos" +ErrorDoubleDeclaration=Declarou outro informe de gastos nun intervalo de datas similar. +AucuneLigne=Non hai gastos declarados +ModePaiement=Modo de pagamento +VALIDATOR=Usuario responsable para aprobación VALIDOR=Aprobado por -AUTHOR=Recorded by +AUTHOR=Rexistrado por AUTHORPAIEMENT=Pagado por -REFUSEUR=Denied by -CANCEL_USER=Deleted by +REFUSEUR=Denegado por +CANCEL_USER=Eliminado por MOTIF_REFUS=Razón MOTIF_CANCEL=Razón -DATE_REFUS=Deny date +DATE_REFUS=Data de denegación DATE_SAVE=Data de validación -DATE_CANCEL=Cancelation date -DATE_PAIEMENT=Data de pago -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=Expense report milles index -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 +DATE_CANCEL=Data de cancelación +DATE_PAIEMENT=Data de pagamento +BROUILLONNER=Abrir de novo +ExpenseReportRef=Ref. informe de gasto +ValidateAndSubmit=Validar e enviar para aprobar +ValidatedWaitingApproval=Validado (agardando aprobación) +NOT_AUTHOR=Non é o autor deste informe de gasto. Operación cancelada. +ConfirmRefuseTrip=¿Está certo de querer denegar este informe de gasto? +ValideTrip=Aprobar informe de gasto +ConfirmValideTrip=¿Está certo de querer aprobar este informe de gasto? +PaidTrip=Pagarinforme de gasto +ConfirmPaidTrip=¿Está certo de querer cambiar o estado deste informe de gasto a "Pagado"? +ConfirmCancelTrip=¿Está certo de querer cancelar este informe de gasto? +BrouillonnerTrip=Devolver o informe de gasto ao estado "Borrador" +ConfirmBrouillonnerTrip=¿Está certo de querer devolver este informe de gasto ao estado "Borrador"? +SaveTrip=Validar informe de gasto +ConfirmSaveTrip=¿Está certo de querer validar este informe de gasto? +NoTripsToExportCSV=Sen informe de gasto a exportar para este periodo. +ExpenseReportPayment=Informe de pagamentos de gastos +ExpenseReportsToApprove=Informe de gastos a aprobar +ExpenseReportsToPay=Informe de gastos a pagar +ConfirmCloneExpenseReport=¿Está certo de querer eliminar este informe de gastos? +ExpenseReportsIk=Configuración das tarifas de quilometraxe +ExpenseReportsRules=Regras de informe de gastos +ExpenseReportIkDesc=Pode modificar o cálculo do gasto en quilómetros por categoría e intervalo que se definiron previamente. <b> d </b> é a distancia en quilómetros +ExpenseReportRulesDesc=Pode crear ou actualizar calquera regra de cálculo. Esta parte utilizase cando o usuario cree un novo informe de gastos expenseReportOffset=Decálogo -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 +expenseReportCoef=Coeficiente +expenseReportTotalForFive=Exemplo con <u>d</u>= 5 +expenseReportRangeFromTo=de %d a %d +expenseReportRangeMoreThan=mais de %d +expenseReportCoefUndefined=(valor non definido) +expenseReportCatDisabled=Categoría deshabilitada - vexa o diccionario c_exp_tax_cat +expenseReportRangeDisabled=Intervalo deshabilitado: consulte o diccionario c_exp_tax_range 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=Category of car -ExpenseRangeOffset=Offset amount: %s -RangeIk=Mileage range -AttachTheNewLineToTheDocument=Attach the line to an uploaded document +ExpenseReportApplyTo=Aplicar a +ExpenseReportDomain=Dominio a aplicar +ExpenseReportLimitOn=Límite en +ExpenseReportDateStart=Data inicio +ExpenseReportDateEnd=Data fin +ExpenseReportLimitAmount=Importe límite +ExpenseReportRestrictive=Restrictivo +AllExpenseReport=Todo tipo de informe de gastos +OnExpense=Liña de gastos +ExpenseReportRuleSave=Foi gardada a regra de informe de gastos +ExpenseReportRuleErrorOnSave=Erro: %s +RangeNum=Intervalo %d +ExpenseReportConstraintViolationError=Id de infracción [%s]: %s é superior a %s %s +byEX_DAY=por día (limitación a %s) +byEX_MON=por mes (limitación a %s) +byEX_YEA=por ano (limitación a %s) +byEX_EXP=por liña(limitación a %s) +ExpenseReportConstraintViolationWarning=Id de infracción [%s]: %s é superior a %s %s +nolimitbyEX_DAY=por día (sen limitación) +nolimitbyEX_MON=por mes (sen limitación) +nolimitbyEX_YEA=por ano (sen limitación) +nolimitbyEX_EXP=por liña (sen limitación) +CarCategory=Categoría do vehículo +ExpenseRangeOffset=Importe compensado: %s +RangeIk=Intervalo de quilometraxe +AttachTheNewLineToTheDocument=Engadir a liña a un documento actualizado diff --git a/htdocs/langs/gl_ES/users.lang b/htdocs/langs/gl_ES/users.lang index e6bcfc93d77..18657d820b1 100644 --- a/htdocs/langs/gl_ES/users.lang +++ b/htdocs/langs/gl_ES/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Eliminar do grupo PasswordChangedAndSentTo=Contrasinal cambiado e enviado a <b>%s</b>. PasswordChangeRequest=Solicitude para cambiar o contrasinal de <b>%s</b> PasswordChangeRequestSent=Solicitude de cambio de contrasinal para <b>%s</b> enviado a <b>%s</b>. +IfLoginExistPasswordRequestSent=Se este inicio de sesión é unha conta válida, enviouse un correo electrónico para restablecer o contrasinal. +IfEmailExistPasswordRequestSent=Se este correo electrónico é unha conta válida, enviouse un correo electrónico para restablecer o contrasinal. ConfirmPasswordReset=Confirmar restablecemento de contrasinal MenuUsersAndGroups=Usuarios e grupos LastGroupsCreated=Últimos %s grupos creados @@ -73,6 +75,7 @@ CreateInternalUserDesc=Este formulario permitelle engadir un usuario interno par 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) PermissionInheritedFromAGroup=O permiso concédese xa que o hereda dun grupo ao cal pertence o usuario. Inherited=Heredado +UserWillBe=Será o usuario creado UserWillBeInternalUser=O usuario creado será un usuario interno (xa que non está ligado a un terceiro en particular) UserWillBeExternalUser=O usuario creado será un usuario externo (xa que está ligado a un terceiro en particular) IdPhoneCaller=ID chamada recibida (teléfono) @@ -108,13 +111,15 @@ DisabledInMonoUserMode=Desactivado en modo mantemento UserAccountancyCode=Código contable usuario UserLogoff=Usuario desconectado UserLogged=Usuario conectado -DateOfEmployment=Employment date -DateEmployment=Data de contratación do empregado +DateOfEmployment=Data de contratación empregado +DateEmployment=Contratación empregado +DateEmploymentstart=Data de comezo da contratación do empregado DateEmploymentEnd=Data de baixa do empregado +RangeOfLoginValidity=Rango de data de validez do inicio de sesión CantDisableYourself=Pode desactivar o seu propio rexistro de usuario ForceUserExpenseValidator=Forzar validación do informe de gasto ForceUserHolidayValidator=Forzar validación do rexeitamento do gasto -ValidatorIsSupervisorByDefault=Por defecto, o responsable da validación é o supervisor do usuario. Manter baleiro para manter este comportamento. +ValidatorIsSupervisorByDefault=Por defecto, o responsable da validación é o supervisor do usuario. Manter baleiro para gardar este comportamento. UserPersonalEmail=Email persoal UserPersonalMobile=Teléfono móbil persoal -WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s +WarningNotLangOfInterface=Aviso, este é o idioma principal que fala o usuario, non o idioma da interface que escolleu ver. Para cambiar o idioma da interface visible por este usuario, vaia a lapela %s diff --git a/htdocs/langs/gl_ES/website.lang b/htdocs/langs/gl_ES/website.lang index e16ee97f8fa..7691822ddf4 100644 --- a/htdocs/langs/gl_ES/website.lang +++ b/htdocs/langs/gl_ES/website.lang @@ -1,139 +1,139 @@ # Dolibarr language file - Source file is en_US - website Shortname=Código -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 -HomePage=Home Page +WebsiteSetupDesc=​​ Cree aquí os sitios web que desexa usar. Despois vaia ao menú de sitios web para editalos. +DeleteWebsite=Eliminar sitio web +ConfirmDeleteWebsite=¿Está certo de querer eliminar este sitio web? Tamén se eliminarán todas as súas páxinas e o contido. Os ficheiros cargados (como no directorio multimedia, no módulo ECM, ...) permanecerán. +WEBSITE_TYPE_CONTAINER=Tipo de páxina / contedor +WEBSITE_PAGE_EXAMPLE=Páxina web para usar como exemplo +WEBSITE_PAGENAME=Nome/alias da páxina +WEBSITE_ALIASALT=Nomes/alias alternativos de páxinas +WEBSITE_ALIASALTDesc=Use aquí a listaxe doutros nomes/alias para que tamén se poida acceder á páxina usando outros nomes/alias (por exemplo, o nome antigo despois de renomear o alias para manter a ligazón de retroceso na ligazón/nome antigo funcionando). A sintaxe é:<br> nome alternativo1,nome alternativo2, ... +WEBSITE_CSS_URL=URL do ficheiro CSS externo +WEBSITE_CSS_INLINE=Contido do ficheiro CSS (común a todas as páxinas) +WEBSITE_JS_INLINE=Contido do ficheiro Javascript (común a todas as páxinas) +WEBSITE_HTML_HEADER=Adición na parte inferior da cabeceira HTML (común a todas as páxinas) +WEBSITE_ROBOT=Ficheiro robots (robots.txt) +WEBSITE_HTACCESS=Ficheiro .htaccess do sitio web +WEBSITE_MANIFEST_JSON=Ficheiro manifest.json do sitio web +WEBSITE_README=Ficheiro README.md +WEBSITE_KEYWORDSDesc=Use unha coma para separar os valores +EnterHereLicenseInformation=Introduza aquí metadatos ou información de licenza para facer un ficheiro README.md. se distribúe o seu sitio web como modelo, o ficheiro incluirase no paquete temtate. +HtmlHeaderPage=Cabeceira HTML (específica só para esta páxina) +PageNameAliasHelp=Nome ou alias da páxina. <br> Este alias tamén se usa para forxar un URL de SEO cando o sitio web se executa desde un servidor virtual dun servidor web (como Apacke, Nginx, ...). Use o botón "<strong>%s </strong>" para editar este alias. +EditTheWebSiteForACommonHeader=Nota: Se desexa definir unha cabeceira personalizada para todas as páxinas, edite a cabeceira a nivel de sitio en lugar de a páxina/contedor. +MediaFiles=Librería de medios +EditCss=Editar propiedades do sitio web +EditMenu=Menú Editar +EditMedias=Editar medios +EditPageMeta=Editar as propiedades da páxina/contedor +EditInLine=Editar en liña +AddWebsite=Engadir sitio web +Webpage=Páxina web/contedor +AddPage=Engadir páxina/contedor PageContainer=Páxina -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 virtual host has permission <strong>%s</strong> on files into<br><strong>%s</strong> +PreviewOfSiteNotYetAvailable=A vista previa do seu sitio web <strong>%s </strong> aínda non está dispoñible. Primeiro debe "<strong> Importar un modelo de sitio web completo </strong>" ou simplemente "<strong> Engadir unha páxina/contedor </strong>". +RequestedPageHasNoContentYet=A páxina solicitada co id %s aínda non ten contido ou a caché file.tpl.php foi eliminada. Edite o contido da páxina para solucionar isto. +SiteDeleted=Eliminouse o sitio web '%s' +PageContent=Páxina/Contedor +PageDeleted=Eliminouse a páxina/Contedor '%s' do sitio web %s +PageAdded=Engadiuse a páxina/Contedor '%s' +ViewSiteInNewTab=Ver o sitio nunha nova lapela +ViewPageInNewTab=Ver a páxina nunha nova lapela +SetAsHomePage=Establecer como páxina de inicio +RealURL=URL real +ViewWebsiteInProduction=Ver o sitio web usando URL de inicio +SetHereVirtualHost=<u> Usar con Apache/NGinx/... </u> <br> Cree no seu servidor web (Apache, Nginx, ...) un host virtual adicado con PHP habilitado e un directorio raíz en <br > <strong>%s </strong> +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=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. -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> +WritePerm=Escribe +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. +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 +SyntaxHelp=Axuda sobre consellos específicos de sintaxe +YouCanEditHtmlSourceckeditor=Pode editar o código fonte HTML empregando o botón "Fonte" do editor. +YouCanEditHtmlSource=<br><span class="fa fa-bug"></span> Pode incluír código PHP nesta fonte empregando etiquetas <strong>&lt;?php ?&gt;</strong>. Están dispoñibles as seguintes variables: $conf, $db, $mysoc, $user, $website, $websitepage, $weblangs, $pagelangs.<br><br><span class="fa fa-bug"></span> Tamén podes incluír contido doutra páxina/contedor coa seguinte sintaxe: <br><strong>&lt;?php includeContainer('alias_of_container_to_include'); ?&gt;</strong><br><br><span class="fa fa-bug"></span> Pode facer unha redirección a outra páxina / contedor coa seguinte sintaxe (Nota: non publique ningún contido antes dunha redirección): <br><strong>&lt;?php redirectToContainer('alias_of_container_to_redirect_to'); ?&gt;</strong><br><br><span class="fa fa-link"></span> Para engadir unha ligazón a outra páxina, use a sintaxe: :<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> Para incluír unha <strong> ligazón para descargar </strong> un ficheiro almacenado no directorio <strong> documentos </strong>, use o envoltorio <strong> document.php</strong> wrapper:<br>Exemplo, para un ficheiro en documentos / ecm (hai que rexistralo), a sintaxe é :<br><strong>&lt;a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext"&gt;</strong><br>Para un ficheiro en documentos/medios (abrir o directorio para acceso público), a sintaxe é: <br><strong>&lt;a href="/document.php?modulepart=medias&file=[relative_dir/]filename.ext"&gt;</strong><br>Para un ficheiro compartido con unha ligazón para compartir (acceso aberto empregando a chave hash para compartir ficheiro), a sintaxe é: <br><strong>&lt;a href="/document.php?hashp=publicsharekeyoffile"&gt;</strong><br><br><span class="fa fa-picture-o"></span> Para incluír unha <strong> imaxe </strong> almacenada no directorio <strong> documentos </strong>, use o envoltorio <strong>viewimage.php</strong> <br>Exemplo, para unha imaxe en documentos/medios (directorio aberto para acceso público), a sintaxe é:<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 +YouCanEditHtmlSource2=Para unha imaxe compartida cunha ligazón de uso compartido (acceso aberto mediante a chave hash para compartir ficheiro), a sintaxe é: <br><strong>&lt;img src =" viewimage.php? Hashp=12345679012 ..."&gt;<br></strong> +YouCanEditHtmlSourceMore=<br>Máis exemplos de código HTML ou dinámico dispoñibles na <a href="%s" target="_blank">documentación wiki</a><br> +ClonePage=Clonar páxina/contedor +CloneSite=Clonar sitio +SiteAdded=Sitio web engadido +ConfirmClonePage=Introduza o código/alias da nova páxina e se é unha tradución da páxina clonada. +PageIsANewTranslation=A nova páxina é unha tradución da páxina actual? +LanguageMustNotBeSameThanClonedPage=Vostede clona unha páxina como tradución. O idioma da nova páxina debe ser diferente do idioma da páxina de orixe. +ParentPageId=ID da páxina principal +WebsiteId=ID do sitio web +CreateByFetchingExternalPage=Crear páxina/contedor recuperando páxina desde un URL externo ... +OrEnterPageInfoManually=Ou crea a páxina desde cero ou a partir dun modelo de páxina ... +FetchAndCreate=Obter e crear +ExportSite=Exportar sitio web +ImportSite=Importar prantilla de sitio web +IDOfPage=Id da páxina Banner=Banner -BlogPost=Blog post -WebsiteAccount=Website account +BlogPost=Entrada no blog +WebsiteAccount=Conta do sitio web WebsiteAccounts=Contas do sitio web -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=Include 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 +AddWebsiteAccount=Crear unha conta de sitio web +BackToListForThirdParty=Votar á listaxe do terceiros +DisableSiteFirst=Desactivar primeiro o sitio web +MyContainerTitle=Título do sitio web +AnotherContainer=Isto é como incluír contido doutra páxina/contedor (pode ter un erro aquí se activa o código dinámico porque o subcontedor incrustado pode que non exista) +SorryWebsiteIsCurrentlyOffLine=Sentímolo, este sitio web está actualmente fóra de liña. Por favor, volte máis tarde ... +WEBSITE_USE_WEBSITE_ACCOUNTS=Activar a táboa de contas do sitio web +WEBSITE_USE_WEBSITE_ACCOUNTSTooltip=Habilite a táboa para almacenar as contas do sitio web (inicio de sesión/contrasinal) para cada sitio web/terceiro +YouMustDefineTheHomePage=Primeiro debe definir a páxina de inicio predeterminada +OnlyEditionOfSourceForGrabbedContentFuture=Aviso: a creación dunha páxina web importando unha páxina web externa está reservada a usuarios experimentados. Dependendo da complexidade da páxina de orixe, o resultado da importación pode diferir do orixinal. Tamén se a páxina de orixe usa estilos CSS comúns ou javascript en conflito, pode rachar o aspecto ou as características do editor de sitios web cando se traballa nesta páxina. Este método é un xeito máis rápido de crear unha páxina, pero recoméndase crear a súa nova páxina desde cero ou a partir dun modelo de páxina suxerido. <br> Teña en conta tamén que é posible que o editor en liña non funcione correctamente cando se usa nunha páxina externa. +OnlyEditionOfSourceForGrabbedContent=Só é posible a edición de orixe HTML cando se capturou contido dun sitio externo +GrabImagesInto=Toma tamén imaxes atopadas en css e páxina. +ImagesShouldBeSavedInto=As imaxes deberían gardarse no directorio +WebsiteRootOfImages=Directorio raíz para as imaxes do sitio web +SubdirOfPage=Subdirectorio adicado á páxina +AliasPageAlreadyExists=A páxina de alias <strong>%s </strong> xa existe +CorporateHomePage=Páxina de inicio da empresa +EmptyPage=Páxina baleira +ExternalURLMustStartWithHttp=O URL externo debe comezar con http:// ou https:// +ZipOfWebsitePackageToImport=Cargue o ficheiro Zip do paquete de modelos do sitio web +ZipOfWebsitePackageToLoad=ou Escolla un paquete de modelo de sitio web incrustado dispoñible +ShowSubcontainers=Mostrar contido dinámico +InternalURLOfPage=URL interno da páxina +ThisPageIsTranslationOf=Esta páxina/contedor é unha tradución de +ThisPageHasTranslationPages=Esta páxina/contedor ten tradución +NoWebSiteCreateOneFirst=Aínda non se creou ningún sitio web. Cree un primeiro. +GoTo=Ir a +DynamicPHPCodeContainsAForbiddenInstruction=Engade un código PHP dinámico que contén a instrución PHP '<strong>%s </strong>' que está prohibida por defecto como contido dinámico (ver as opcións ocultas WEBSITE_PHP_ALLOW_xxx para aumentar a lista de comandos permitidos). +NotAllowedToAddDynamicContent=Non ten permiso para engadir ou editar contido dinámico PHP en sitios web. Solicite permiso ou simplemente manteña o código nas etiquetas PHP sen modificar. +ReplaceWebsiteContent=Buscar ou substituír contido do sitio web +DeleteAlsoJs=¿Eliminar tamén todos os ficheiros javascript específicos deste sitio web? +DeleteAlsoMedias=¿Quere eliminar tamén todos os ficheiros multimedia específicos deste sitio web? +MyWebsitePages=Páxinas do sitio web +SearchReplaceInto=Buscar|Substituir por +ReplaceString=Nova cadea +CSSContentTooltipHelp=Introduza aquí contido CSS. Para evitar calquera conflito co CSS da aplicación, asegúrese de antepoñer toda a declaración coa clase .bodywebsite. Por exemplo: <br> <br> #mycssselector, input.myclass:hover {...} <br> debe ser <br> .bodywebsite #mycssselector,.bodywebsite input.myclass:hover {...} <br> <br> Nota: Se ten un ficheiro grande sen este prefixo, pode usar "lessc" para convertelo para engadir o prefixo .bodywebsite en todas partes. +LinkAndScriptsHereAreNotLoadedInEditor=Aviso: este contido só se emite cando se accede ao sitio desde un servidor. Non se usa no modo de edición, polo que se precisa cargar ficheiros javascript tamén no modo de edición, só ten que engadir a súa etiqueta 'script src=...' á páxina. +Dynamiccontent=Mostra dunha páxina con contido dinámico +ImportSite=Importar prantilla de sitio web +EditInLineOnOff=O modo 'Editar en liña' é %s +ShowSubContainersOnOff=O modo para executar "contido dinámico" é %s +GlobalCSSorJS=Ficheiro global CSS/JS/Header do sitio web +BackToHomePage=Voltar á páxina de inicio ... +TranslationLinks=Ligazóns de tradución +YouTryToAccessToAFileThatIsNotAWebsitePage=Tenta acceder a unha páxina que non está dispoñible. <br> (ref =%s, type =%s, status =%s) +UseTextBetween5And70Chars=Para boas prácticas de SEO, use un texto de entre 5 e 70 caracteres +MainLanguage=Idioma principal +OtherLanguages=​​ Outros idiomas +UseManifest=Proporciona un ficheiro manifest.json +PublicAuthorAlias=​​ Alias ​​de autor público +AvailableLanguagesAreDefinedIntoWebsiteProperties=Os idiomas dispoñibles defínense nas propiedades do sitio web +ReplacementDoneInXPages=Substitución feita en %s páxinas ou contedores RSSFeed=Fíos RSS -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 +RSSFeedDesc=Pode obter unha fonte RSS dos últimos artigos co tipo 'blogpost' usando este URL +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. diff --git a/htdocs/langs/gl_ES/withdrawals.lang b/htdocs/langs/gl_ES/withdrawals.lang index 396c348cb5f..595d3694f5b 100644 --- a/htdocs/langs/gl_ES/withdrawals.lang +++ b/htdocs/langs/gl_ES/withdrawals.lang @@ -1,148 +1,152 @@ # 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 +CustomersStandingOrdersArea=Área domiciliacións +SuppliersStandingOrdersArea=Área domiciliacións +StandingOrdersPayment=Domiciliacións StandingOrderPayment=Domiciliación -NewStandingOrder=New direct debit order -NewPaymentByBankTransfer=New payment by credit transfer +NewStandingOrder=Nova domiciliación +NewPaymentByBankTransfer=Novo pagamenyo por transferencia StandingOrderToProcess=A procesar -PaymentByBankTransferReceipts=Credit transfer orders -PaymentByBankTransferLines=Credit transfer order lines +PaymentByBankTransferReceipts=Solicitudes de transferencia +PaymentByBankTransferLines=Liñas de ordes de transferencia WithdrawalsReceipts=Domiciliacións WithdrawalReceipt=Domiciliación -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 +BankTransferReceipts=Solicitudes de transferencia +BankTransferReceipt=Ordes de transferencia +LatestBankTransferReceipts=Últimas %s ordes de transferencia +LastWithdrawalReceipts=Últimos %s ficheiros de ordes de domiciliación +WithdrawalsLine=Liña de orde de domiciliacións +CreditTransferLine=Liña de orde de transferencia +WithdrawalsLines=Liñas de ordes de domiciliación +CreditTransferLines=Liñas de ordes de transferencia +RequestStandingOrderToTreat=Peticións de domiciliacións a procesar +RequestStandingOrderTreated=Peticións de domiciliacións procesadas +RequestPaymentsByBankTransferToTreat=Solicitudes de transferencia a tramitar +RequestPaymentsByBankTransferTreated=Solicitudes de transferencia a procesar +NotPossibleForThisStatusOfWithdrawReceiptORLine=Aínda non é posible. O estado da domiciliación debe ser 'abonada' antes de poder realizar devolucións as súas líñas +NbOfInvoiceToWithdraw=Nº de facturas pendentes de domiciliación +NbOfInvoiceToWithdrawWithInfo=Número de facturas agardando domiciliación para clientes que teñen o seu número de conta definida +NbOfInvoiceToPayByBankTransfer=Nº de facturas de provedores agardando un pagamento mediante transferencia +SupplierInvoiceWaitingWithdraw=Factura de provedor agardando pagamento mediante transferencia +InvoiceWaitingWithdraw=Facturas agardando domiciliación +InvoiceWaitingPaymentByBankTransfer=Factura agardando transferencia +AmountToWithdraw=Cantidade a domiciliar +NoInvoiceToWithdraw=Non hai ningunha factura aberta para '%s' agardando. Vaia á lapela '%s' da tarxeta de factura para facer unha solicitude. +NoSupplierInvoiceToWithdraw=Non hai ningunha factura do provedor con "Solicitudes de crédito" abertas. Vaia á pestana '%s' da tarxeta da factura para facer unha solicitude. +ResponsibleUser=Usuario responsable das domiciliacións +WithdrawalsSetup=Configuración das domiciliacións +CreditTransferSetup=Configuración das transferencias +WithdrawStatistics=Estatísticas de domiciliacións +CreditTransferStatistics=Estatísticas das transferencias Rejects=Devolucións -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 -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>. -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=Enviado -StatusDebited=Debited -StatusCredited=Credited -StatusPaid=Pagada -StatusRefused=Rexeitado -StatusMotif0=Unspecified -StatusMotif1=Insufficient funds -StatusMotif2=Request contested -StatusMotif3=No direct debit payment order -StatusMotif4=Pedido de cliente -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 +LastWithdrawalReceipt=As %s últimas domiciliacións +MakeWithdrawRequest=Realizar unha petición de domiciliación +MakeBankTransferOrder=Realizar unha petición de transferencia +WithdrawRequestsDone=%s domiciliacións rexistradas +BankTransferRequestsDone=%s transferencias rexistradas +ThirdPartyBankCode=Código banco do terceiro +NoInvoiceCouldBeWithdrawed=Non se facturou ningunha factura correctamente. Comprobe que as facturas son de empresas con IBAN válido e que IBAN ten unha RMU (Referencia de mandato único) co modo <strong>%s</strong>1. +ClassCredited=Clasificar como "Abonada" +ClassCreditedConfirm=¿Está certo de querer clasificar esta domiciliación como abonada na súa conta bancaria? +TransData=Data envío +TransMetod=Método envío +Send=Enviar +Lines=Líñas +StandingOrderReject=Emitir unha devolución +WithdrawsRefused=Devolución de domiciliación +WithdrawalRefused=Retirada rexeitada +CreditTransfersRefused=Transferencia rexeitada +WithdrawalRefusedConfirm=¿Está certo de querer crear unha devolución de domiciliación para a empresa +RefusedData=Data de devolución +RefusedReason=Motivo de devolución +RefusedInvoicing=Facturación da devolución +NoInvoiceRefused=Non facturar a devolución +InvoiceRefused=Factura rexeitada (Cargar os gastos ao cliente) +StatusDebitCredit=Estado de débito/crédito +StatusWaiting=Agardando +StatusTrans=Enviada +StatusDebited=Adebedado +StatusCredited=Abonada +StatusPaid=Paga +StatusRefused=Rexeitada +StatusMotif0=Non especificado +StatusMotif1=Fondos insuficintes +StatusMotif2=Solicitude rexeitada +StatusMotif3=Sen domiciliacións +StatusMotif4=Pedimento do cliente +StatusMotif5=Conta inexistente +StatusMotif6=Conta sen saldo +StatusMotif7=Decisión xudicial +StatusMotif8=Outro motivo +CreateForSepaFRST=Domiciliar (SEPA FRST) +CreateForSepaRCUR=Domiciliar (SEPA RCUR) +CreateAll=Domiciliar (todas) +CreateFileForPaymentByBankTransfer=Crear un ficheiro para a transferencia +CreateSepaFileForPaymentByBankTransfer=Crear un ficheiro de transferencia (SEPA) +CreateGuichet=Só oficina +CreateBanque=Só banco +OrderWaiting=Agardando proceso +NotifyTransmision=Envío de domiciliación +NotifyCredit=Abono de domiciliación +NumeroNationalEmetter=Número Nacional do Emisor +WithBankUsingRIB=Para as contas bancarias que utilizan RIB +WithBankUsingBANBIC=Para as contas bancarias que utilizan o código BAN/BIC/SWIFT +BankToReceiveWithdraw=Conta bancaria para recibir a domiciliación +BankToPayCreditTransfer=Conta bancaria empregada como fonte de pagamentos +CreditDate=Abonada o +WithdrawalFileNotCapable=Non se pode xerar o ficheiro de recibo de retirada para o seu país %s (o seu país non está incluido) +ShowWithdraw=Ver domiciliación +IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Porén, se a factura ten polo menos unha orde de pagamento por domiciliación bancaria aínda non procesada, non se configurará como paga para permitir a xestión previa da retirada. +DoStandingOrdersBeforePayments=Esta lapela permítelle solicitar unha orde de pagamento por domiciliación bancaria. Unha vez feito isto, entra no menú Banco-> Pago mediante domiciliación bancaria para xerar e xestionar a orde de domiciliación bancaria. Cando se pecha a orde de domiciliación bancaria, o pagamento das facturas rexistrarase automaticamente e as facturas pecharanse se o resto do pago é nulo. +DoCreditTransferBeforePayments=Esta lapela permítelle solicitar unha orde de transferencia. Unha vez feito isto, entra no menú Banco-> Pago mediante transferencia para xerar e xestionar a orde de transferencia. Cando se pecha a orde de transferencia, o pagamento das facturas rexistrarase automaticamente e as facturas pecharanse se o resto do pago é nulo. +WithdrawalFile=Ficheiro de domiciliación +CreditTransferFile=Ficheiro de transferencia +SetToStatusSent=Clasificar como "Ficheiro enviado" +ThisWillAlsoAddPaymentOnInvoice=Isto tamén rexistrará os pagos nas facturas e clasificaos como "Pagados" se queda por pagar é nulo +StatisticsByLineStatus=Estatísticas por estado das liñas +RUM=RUM +DateRUM=Data da sinatura do mandato +RUMLong=Referencia única do mandato +RUMWillBeGenerated=Se está baleiro, o número RUM /Referencia Única do Mandato) xérase unha vez gardada a información da conta bancaria +WithdrawMode=Modo domiciliación (FRST o RECUR) +WithdrawRequestAmount=Importe da domiciliación +BankTransferAmount=Importe da solicitude +WithdrawRequestErrorNilAmount=Non é posible crear unha domiciliación sen importe +SepaMandate=Mandato SEPA +SepaMandateShort=Mandato SEPA +PleaseReturnMandate=Envíe de volta este formulario de mandato por correo electrónico a %s ou por correo a +SEPALegalText=Ao asinar este mandato, autoriza (A) %s a enviar instruccións ao seu banco para cargar na súa conta e (B) ao seu banco para cargar na súa conta en acordo coas instruccións de %s. Como parte dos seus dereitos, ten dereito a unha devolución nos termos e condicións do seu contrato co seu banco. Unha devolución debe reclamarse dentro de 8 semanas a partires da data na que foi realizado o cargo a súa conta. Os seus dereitos con respeito ao mandato anterior explícanse nun comunicado que pode obter do seu banco. +CreditorIdentifier=Identificador Acredor +CreditorName=Nome acredor +SEPAFillForm=(B) Cubra todos os campos marcados con * +SEPAFormYourName=O seu nome +SEPAFormYourBAN=IBAN da súa conta bancaria +SEPAFormYourBIC=BIC do seu banco +SEPAFrstOrRecur=Tipo de pagamento +ModeRECUR=Pago recorrente +ModeFRST=Pago único +PleaseCheckOne=Escolla só un +CreditTransferOrderCreated=Creouse a orde de transferencia %s +DirectDebitOrderCreated=Domiciliación %s creada +AmountRequested=Importe solicitado SEPARCUR=SEPA CUR SEPAFRST=SEPA FRST -ExecutionDate=Execution date -CreateForSepa=Create direct debit file -ICS=Creditor Identifier CI -END_TO_END="EndToEndId" SEPA XML tag - Unique id assigned per transaction -USTRD="Unstructured" SEPA XML tag -ADDDAYS=Add days to Execution Date -NoDefaultIBANFound=No default IBAN found for this third party +ExecutionDate=Data de execución +CreateForSepa=Crear ficheiro de domiciliación bancaria +ICS=Identificador de acreedor CI +ICSTransfer=Identificador de acredor CI para transferencia bancaria +END_TO_END=Etiqueta XML SEPA "EndToEndId" - ID único asignada por transacción +USTRD=Etiqueta SEPA XML "Unstructured" +ADDDAYS=Engadir días á data de execución +NoDefaultIBANFound=Non atopouse o IBAN deste terceiro ### 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. +InfoCreditSubject=Abono de domiciliación %s polo banco +InfoCreditMessage=A orde de domiciliación %s foi abonada polo banco<br>Data de abono: %s +InfoTransSubject=Envío de domiciliación %s ao banco +InfoTransMessage=A orde de domiciliación %s foi enviada ao banco por %s %s.<br><br> +InfoTransData=Importe: %s<br>Método: %s<br>Data: %s +InfoRejectSubject=Domiciliación devolta +InfoRejectMessage=Bos días:<br><br>a domiciliación da factura %s por conta da empresa %s, cun importe de %s foi devolta polo banco.<br><br>--<br>%s +ModeWarning=Non estableceuse a opción de modo real, deteremonos despois desta simulación +ErrorCompanyHasDuplicateDefaultBAN=A empresa co identificador %s ten máis dunha conta bancaria predeterminada. Non hai xeito de saber cal usar. +ErrorICSmissing=Falta o ICS na conta bancaria% s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=A cantidade total da orde de domiciliación é distinta da suma das liñas diff --git a/htdocs/langs/gl_ES/workflow.lang b/htdocs/langs/gl_ES/workflow.lang index 299be277e1d..7be56785df7 100644 --- a/htdocs/langs/gl_ES/workflow.lang +++ b/htdocs/langs/gl_ES/workflow.lang @@ -1,23 +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. +WorkflowSetup=Configuración do modulo Fluxo de Traballo +WorkflowDesc=Este módulo permite algunhas accíóns automátizadas. Por defecto, o fluxo de traballo está aberto (podense facer cousas na orde desexada) mais aquí pode activar algunhas accións automátizadas. +ThereIsNoWorkflowToModify=No hai dispoñibles modificacións de fluxo de traballo nos módulos activados. # 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) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Crear automáticamente un pedimento de cliente despois da sinatura dun orzamento (o novo pedimento terá o mesmo importe que o orzamento) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Crear automáticamente una factura a cliente despois da sinatura dun orzamento (a nova factura terá o mesmo importe que o orzamento) +descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Crear unha factura a cliente automáticamente despois de validar un contrato +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Crear automáticamente unha factura a cliente despois de pechar o pedimento de cliente ( nova factura terá o mesmo importe que o pedimento) # 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) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Clasificar orzamento orixe como facturado cando o pedimento do cliente sexa marcado como facturado (e se o importe do pedimento é igual á suma dos importes dos orzamentos ligados) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Clasificar o orzamento orixe como facturados cando a factura ao cliente sexa validada (e se o importe da factura é igual á suma dos importes dos orzamentos ligados) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Clasificar pedimento de cliente orixe como facturado cando a factura ao cliente sexa validada (e se o importe da factura é igual á suma dos importes dos pedimentos ligados) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Clasificar pedimento de cliente orixe como facturado cando a factura ao cliente sexa marcada como pagada (e se o importe da factura é igual á suma dos importes dos pedimentos ligados) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Clasificar automáticamente o pedimento orixe como enviado cando o envío sexa validado (e se a cantidade enviada por todos os envíos é a mesma que o pedimento a actualizar) # 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 +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Clasificar o orzamento ligado de provedor orixe como facturado cando a factura de provedor sexa validada (e se o importe da factura é igual á suma do importe dos orzamentos ligados) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Clasificar o pedimento orixe a provedor ligado como facturado cando a factura de provedor sexa validada (e se o importe da factura é igual á suma do importe dos pedimentos ligados) +descWORKFLOW_BILL_ON_RECEPTION=Clasificar recepcións a "facturado" cando sexa validado un pedimento de provedor ligado # Autoclose intervention -descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed -AutomaticCreation=Automatic creation -AutomaticClassification=Automatic classification +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Pecha todas as intervencións ligadas ao ticket cando o ticket está pechado +AutomaticCreation=Creación automática +AutomaticClassification=Clasificación automática +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Clasifique o envío orixe ligado como pechado cando a factura ao cliente sexa validada diff --git a/htdocs/langs/gl_ES/zapier.lang b/htdocs/langs/gl_ES/zapier.lang index a92ff38f3ce..64d3db80452 100644 --- a/htdocs/langs/gl_ES/zapier.lang +++ b/htdocs/langs/gl_ES/zapier.lang @@ -26,4 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier para modulo de Dolibarr # Admin page # ZapierForDolibarrSetup = Configuración de Zapier para Dolibarr -ZapierDescription=Interface with Zapier +ZapierDescription=Interfaz con Zapier diff --git a/htdocs/langs/he_IL/accountancy.lang b/htdocs/langs/he_IL/accountancy.lang index 3211a0b62df..9e084932477 100644 --- a/htdocs/langs/he_IL/accountancy.lang +++ b/htdocs/langs/he_IL/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Date Docref=Reference LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/he_IL/admin.lang b/htdocs/langs/he_IL/admin.lang index e630e1c2258..73aaf8f75be 100644 --- a/htdocs/langs/he_IL/admin.lang +++ b/htdocs/langs/he_IL/admin.lang @@ -56,6 +56,8 @@ GUISetup=להציג SetupArea=הגדרת UploadNewTemplate=Upload new template(s) FormToTestFileUploadForm=טופס לבדוק העלאת קובץ (על פי ההגדרה) +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled 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. @@ -85,7 +87,6 @@ ShowPreview=הצג תצוגה מקדימה ShowHideDetails=Show-Hide details PreviewNotAvailable=לא זמין תצוגה מקדימה ThemeCurrentlyActive=פעיל כרגע הנושא -CurrentTimeZone=אזור PHP (שרת) 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=מרחב @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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=No directory or files to delete. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Preferred Partners OtherResources=Other resources ExternalResources=External Resources SocialNetworks=Social Networks +SocialNetworkId=Social Network 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> HelpCenterDesc1=Here are some resources for getting help and support with Dolibarr. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Examples with current configuration ListOfDirectories=רשימה של ספריות ותבניות 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=דוגמאות תחביר: <br> c: \\ mydir <br> / Home / mydir <br> DOL_DATA_ROOT / ECM / ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br> לדעת איך ליצור תבניות ODT המסמכים שלך, לפני אחסונם ספריות אלה, קרא את התיעוד wiki: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=עמדת שם / שם משפחה @@ -406,7 +408,7 @@ UrlGenerationParameters=פרמטרים כדי להבטיח את כתובות ה SecurityTokenIsUnique=השתמש פרמטר ייחודי securekey עבור כל כתובת אתר EnterRefToBuildUrl=הזן התייחסות %s אובייקט GetSecuredUrl=לקבל את כתובת האתר מחושב -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +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 @@ -668,7 +670,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 @@ -1306,7 +1308,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,13 @@ ServiceSetup=מודול שירותי התקנה ProductServiceSetup=מוצרים ושירותים ההתקנה מודולים 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=ברקוד מסוג ברירת מחדל עבור מוצרים @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=תפריט חדש MenuHandler=תפריט המטפל MenuModule=מקור מודול -HideUnauthorizedMenu= הסתר תפריטים בלתי מורשים (אפור) +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=מזהה התפריט DetailMenuHandler=תפריט המטפל היכן להציג תפריט חדש DetailMenuModule=שם מודול אם סעיף מתפריט באים מודול @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=רוכסן MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/he_IL/banks.lang b/htdocs/langs/he_IL/banks.lang index 9500a5b8b2e..81a23238550 100644 --- a/htdocs/langs/he_IL/banks.lang +++ b/htdocs/langs/he_IL/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/he_IL/blockedlog.lang b/htdocs/langs/he_IL/blockedlog.lang index 5afae6e9e53..0bba5605d0f 100644 --- a/htdocs/langs/he_IL/blockedlog.lang +++ b/htdocs/langs/he_IL/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/he_IL/boxes.lang b/htdocs/langs/he_IL/boxes.lang index 5fe5dc964a7..bc3d4ba7b02 100644 --- a/htdocs/langs/he_IL/boxes.lang +++ b/htdocs/langs/he_IL/boxes.lang @@ -46,9 +46,12 @@ 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. @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Accountancy +ValidatedProjects=Validated projects diff --git a/htdocs/langs/he_IL/cashdesk.lang b/htdocs/langs/he_IL/cashdesk.lang index 0e214defc7a..ddc13c48ea3 100644 --- a/htdocs/langs/he_IL/cashdesk.lang +++ b/htdocs/langs/he_IL/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +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 @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/he_IL/categories.lang b/htdocs/langs/he_IL/categories.lang index c8bfcef77e2..d01b7fcecb9 100644 --- a/htdocs/langs/he_IL/categories.lang +++ b/htdocs/langs/he_IL/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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=משלימים תכונות CategoriesSetup=Tags/categories setup diff --git a/htdocs/langs/he_IL/companies.lang b/htdocs/langs/he_IL/companies.lang index 2537b7e9b2f..d1b5cde4dac 100644 --- a/htdocs/langs/he_IL/companies.lang +++ b/htdocs/langs/he_IL/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi 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=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=Potential diff --git a/htdocs/langs/he_IL/compta.lang b/htdocs/langs/he_IL/compta.lang index 3dd45972e01..6635b8b2829 100644 --- a/htdocs/langs/he_IL/compta.lang +++ b/htdocs/langs/he_IL/compta.lang @@ -111,7 +111,7 @@ 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 ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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 diff --git a/htdocs/langs/he_IL/cron.lang b/htdocs/langs/he_IL/cron.lang index d2da7ded67e..2ebdda1e685 100644 --- a/htdocs/langs/he_IL/cron.lang +++ b/htdocs/langs/he_IL/cron.lang @@ -6,14 +6,15 @@ 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 -OrToLaunchASpecificJob=Or to check and launch a specific job +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 environement you can use Scheduled task tools 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 @@ -42,10 +43,11 @@ CronModule=Module CronNoJobs=No jobs registered CronPriority=Priority CronLabel=Label -CronNbRun=Nb. launch -CronMaxRun=Max number launch +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 @@ -56,16 +58,16 @@ CronNote=Comment CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Enable +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 exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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 @@ -76,8 +78,14 @@ 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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +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' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/he_IL/errors.lang b/htdocs/langs/he_IL/errors.lang index 893f4a35b65..5b26be724d9 100644 --- a/htdocs/langs/he_IL/errors.lang +++ b/htdocs/langs/he_IL/errors.lang @@ -5,8 +5,10 @@ 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. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ 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=Ref used for creation already exists. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/he_IL/exports.lang b/htdocs/langs/he_IL/exports.lang index 2dcf4317e00..a0eb7161ef2 100644 --- a/htdocs/langs/he_IL/exports.lang +++ b/htdocs/langs/he_IL/exports.lang @@ -26,6 +26,8 @@ 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. @@ -131,3 +133,4 @@ 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/he_IL/mails.lang b/htdocs/langs/he_IL/mails.lang index 041207e7c48..8e5376e51f9 100644 --- a/htdocs/langs/he_IL/mails.lang +++ b/htdocs/langs/he_IL/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=הודעות -NoNotificationsWillBeSent=No email notifications are planned for this event and company -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent +NotificationsAuto=Notifications Auto. +NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company +ANotificationsWillBeSent=1 automatic notification will be sent by email +SomeNotificationsWillBeSent=%s automatic notifications will be sent by email +AddNewNotification=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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +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/he_IL/main.lang b/htdocs/langs/he_IL/main.lang index f6d4759a902..05e91914906 100644 --- a/htdocs/langs/he_IL/main.lang +++ b/htdocs/langs/he_IL/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=No template available for this email type AvailableVariables=Available substitution variables NoTranslation=No translation Translation=Translation +CurrentTimeZone=אזור PHP (שרת) EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria NoRecordFound=No record found NoRecordDeleted=No record deleted NotEnoughDataYet=Not enough data @@ -85,6 +87,8 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C 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 @@ -220,6 +224,7 @@ Value=Value PersonalValue=Personal value NewObject=New %s NewValue=New value +OldValue=Old value %s CurrentValue=Current value Code=Code Type=Type @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Option +Filters=Filters List=List FullList=Full list FullConversation=Full conversation @@ -650,6 +656,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 @@ -671,7 +678,7 @@ SendMail=Send email Email=Email NoEMail=No email AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=No mobile phone Owner=Owner FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/he_IL/modulebuilder.lang b/htdocs/langs/he_IL/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/he_IL/modulebuilder.lang +++ b/htdocs/langs/he_IL/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/he_IL/mrp.lang b/htdocs/langs/he_IL/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/he_IL/mrp.lang +++ b/htdocs/langs/he_IL/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/he_IL/other.lang b/htdocs/langs/he_IL/other.lang index 374c864f7dc..d8012ef5cac 100644 --- a/htdocs/langs/he_IL/other.lang +++ b/htdocs/langs/he_IL/other.lang @@ -5,8 +5,6 @@ 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 -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Right CalculatedWeight=Calculated weight CalculatedVolume=Calculated volume Weight=Weight -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/he_IL/products.lang b/htdocs/langs/he_IL/products.lang index fe9deabbb4e..d9cb3f15d68 100644 --- a/htdocs/langs/he_IL/products.lang +++ b/htdocs/langs/he_IL/products.lang @@ -108,7 +108,8 @@ 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=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +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 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/he_IL/projects.lang b/htdocs/langs/he_IL/projects.lang index c69aa3209c0..22aa61251a1 100644 --- a/htdocs/langs/he_IL/projects.lang +++ b/htdocs/langs/he_IL/projects.lang @@ -76,15 +76,16 @@ MyActivities=My tasks/activities MyProjects=My projects MyProjectsArea=My projects Area DurationEffective=Effective duration -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Time +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/he_IL/recruitment.lang b/htdocs/langs/he_IL/recruitment.lang index b775e78552e..437445f25dc 100644 --- a/htdocs/langs/he_IL/recruitment.lang +++ b/htdocs/langs/he_IL/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/he_IL/sendings.lang b/htdocs/langs/he_IL/sendings.lang index 80e3aa3af9c..17d8f937b82 100644 --- a/htdocs/langs/he_IL/sendings.lang +++ b/htdocs/langs/he_IL/sendings.lang @@ -30,6 +30,7 @@ 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 @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=More complete document model for delivery receipts (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/he_IL/stocks.lang b/htdocs/langs/he_IL/stocks.lang index 8907a4d5091..5d1abeffa0d 100644 --- a/htdocs/langs/he_IL/stocks.lang +++ b/htdocs/langs/he_IL/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/he_IL/ticket.lang b/htdocs/langs/he_IL/ticket.lang index a8353b66744..39e0b9f8175 100644 --- a/htdocs/langs/he_IL/ticket.lang +++ b/htdocs/langs/he_IL/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=אחר TicketSeverityShortLOW=Low TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=High -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Read Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/he_IL/website.lang b/htdocs/langs/he_IL/website.lang index bc14948946c..e476cd982a3 100644 --- a/htdocs/langs/he_IL/website.lang +++ b/htdocs/langs/he_IL/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/he_IL/withdrawals.lang b/htdocs/langs/he_IL/withdrawals.lang index 114a8d9dd6c..059b3451c11 100644 --- a/htdocs/langs/he_IL/withdrawals.lang +++ b/htdocs/langs/he_IL/withdrawals.lang @@ -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>. ClassCredited=Classify credited @@ -131,7 +132,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,3 +148,5 @@ 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/he_IL/workflow.lang b/htdocs/langs/he_IL/workflow.lang index 299be277e1d..494a0424a75 100644 --- a/htdocs/langs/he_IL/workflow.lang +++ b/htdocs/langs/he_IL/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 diff --git a/htdocs/langs/hi_IN/accountancy.lang b/htdocs/langs/hi_IN/accountancy.lang index 0afe8f7a50d..46d584fa5d7 100644 --- a/htdocs/langs/hi_IN/accountancy.lang +++ b/htdocs/langs/hi_IN/accountancy.lang @@ -16,6 +16,8 @@ ThisService=यह सेवा ThisProduct=यह उत्पाद DefaultForService=सेवा के लिए डिफ़ॉल्ट DefaultForProduct=उत्पाद के लिए डिफ़ॉल्ट +ProductForThisThirdparty=Product for this thirdparty +ServiceForThisThirdparty=Service for this thirdparty CantSuggest=सुझाव नहीं दे सकते AccountancySetupDoneFromAccountancyMenu=लेखाकर्म का अधिकांश सेटअप मेनू से किया जाता है %s ConfigAccountingExpert=Configuration of the module accounting (double entry) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Date Docref=Reference LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/hi_IN/admin.lang b/htdocs/langs/hi_IN/admin.lang index 976284cbff1..5adf390f9fa 100644 --- a/htdocs/langs/hi_IN/admin.lang +++ b/htdocs/langs/hi_IN/admin.lang @@ -56,6 +56,8 @@ 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. @@ -85,7 +87,6 @@ ShowPreview=Show preview ShowHideDetails=Show-Hide details PreviewNotAvailable=Preview not available ThemeCurrentlyActive=Theme currently active -CurrentTimeZone=TimeZone PHP (server) MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Dates are stored and returned by database server as if they were kept as submitted string. The timezone has effect only when using the UNIX_TIMESTAMP function (that should not be used by Dolibarr, so database TZ should have no effect, even if changed after data was entered). Space=Space @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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. @@ -256,6 +257,7 @@ 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. @@ -375,7 +377,7 @@ 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:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +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 @@ -406,7 +408,7 @@ UrlGenerationParameters=Parameters to secure URLs SecurityTokenIsUnique=Use a unique securekey parameter for each URL EnterRefToBuildUrl=Enter reference for object %s GetSecuredUrl=Get calculated URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +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 @@ -668,7 +670,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 @@ -1306,7 +1308,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,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 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=New menu MenuHandler=Menu handler MenuModule=Source module -HideUnauthorizedMenu= Hide unauthorized menus (gray) +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 @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/hi_IN/banks.lang b/htdocs/langs/hi_IN/banks.lang index 9500a5b8b2e..81a23238550 100644 --- a/htdocs/langs/hi_IN/banks.lang +++ b/htdocs/langs/hi_IN/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/hi_IN/blockedlog.lang b/htdocs/langs/hi_IN/blockedlog.lang index 5afae6e9e53..0bba5605d0f 100644 --- a/htdocs/langs/hi_IN/blockedlog.lang +++ b/htdocs/langs/hi_IN/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/hi_IN/boxes.lang b/htdocs/langs/hi_IN/boxes.lang index d6fd298a3a7..9a751483fb1 100644 --- a/htdocs/langs/hi_IN/boxes.lang +++ b/htdocs/langs/hi_IN/boxes.lang @@ -46,9 +46,12 @@ 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. @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Accountancy +ValidatedProjects=Validated projects diff --git a/htdocs/langs/hi_IN/cashdesk.lang b/htdocs/langs/hi_IN/cashdesk.lang index 498baa82200..3fef645d99d 100644 --- a/htdocs/langs/hi_IN/cashdesk.lang +++ b/htdocs/langs/hi_IN/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +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 @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/hi_IN/categories.lang b/htdocs/langs/hi_IN/categories.lang index ba37a43b4ec..4ddf0d6093f 100644 --- a/htdocs/langs/hi_IN/categories.lang +++ b/htdocs/langs/hi_IN/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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 diff --git a/htdocs/langs/hi_IN/companies.lang b/htdocs/langs/hi_IN/companies.lang index e9f51f14885..1481398db45 100644 --- a/htdocs/langs/hi_IN/companies.lang +++ b/htdocs/langs/hi_IN/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi 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=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=Potential diff --git a/htdocs/langs/hi_IN/compta.lang b/htdocs/langs/hi_IN/compta.lang index 8f4f058bb87..1afeb6e3727 100644 --- a/htdocs/langs/hi_IN/compta.lang +++ b/htdocs/langs/hi_IN/compta.lang @@ -111,7 +111,7 @@ 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 ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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 diff --git a/htdocs/langs/hi_IN/cron.lang b/htdocs/langs/hi_IN/cron.lang index 1de1251831a..2ebdda1e685 100644 --- a/htdocs/langs/hi_IN/cron.lang +++ b/htdocs/langs/hi_IN/cron.lang @@ -7,13 +7,14 @@ Permission23103 = Delete Scheduled job Permission23104 = Execute Scheduled job # Admin CronSetup=Scheduled job management setup -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=Or to check and launch a specific job +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 @@ -46,6 +47,7 @@ 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 @@ -56,7 +58,7 @@ CronNote=Comment CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Enable +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Disable CronTaskInactive=This job is disabled CronId=Id @@ -82,3 +84,8 @@ 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/hi_IN/errors.lang b/htdocs/langs/hi_IN/errors.lang index 893f4a35b65..5b26be724d9 100644 --- a/htdocs/langs/hi_IN/errors.lang +++ b/htdocs/langs/hi_IN/errors.lang @@ -5,8 +5,10 @@ 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. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ 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=Ref used for creation already exists. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/hi_IN/exports.lang b/htdocs/langs/hi_IN/exports.lang index 3549e3f8b23..a0eb7161ef2 100644 --- a/htdocs/langs/hi_IN/exports.lang +++ b/htdocs/langs/hi_IN/exports.lang @@ -133,3 +133,4 @@ 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/hi_IN/mails.lang b/htdocs/langs/hi_IN/mails.lang index 1235eef3b27..2d02c5ddcf9 100644 --- a/htdocs/langs/hi_IN/mails.lang +++ b/htdocs/langs/hi_IN/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Notifications -NoNotificationsWillBeSent=No email notifications are planned for this event and company -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent +NotificationsAuto=Notifications Auto. +NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company +ANotificationsWillBeSent=1 automatic notification will be sent by email +SomeNotificationsWillBeSent=%s automatic notifications will be sent by email +AddNewNotification=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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +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/hi_IN/main.lang b/htdocs/langs/hi_IN/main.lang index 50363abd476..7f67e16d9ea 100644 --- a/htdocs/langs/hi_IN/main.lang +++ b/htdocs/langs/hi_IN/main.lang @@ -28,7 +28,9 @@ 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 @@ -85,6 +87,8 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C 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 @@ -220,6 +224,7 @@ Value=Value PersonalValue=Personal value NewObject=New %s NewValue=New value +OldValue=Old value %s CurrentValue=Current value Code=Code Type=Type @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Option +Filters=Filters List=List FullList=Full list FullConversation=Full conversation @@ -650,6 +656,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 @@ -671,7 +678,7 @@ SendMail=Send email Email=Email NoEMail=No email AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=No mobile phone Owner=Owner FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/hi_IN/modulebuilder.lang b/htdocs/langs/hi_IN/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/hi_IN/modulebuilder.lang +++ b/htdocs/langs/hi_IN/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/hi_IN/mrp.lang b/htdocs/langs/hi_IN/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/hi_IN/mrp.lang +++ b/htdocs/langs/hi_IN/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/hi_IN/other.lang b/htdocs/langs/hi_IN/other.lang index 54c0572d453..7a895bb1ca5 100644 --- a/htdocs/langs/hi_IN/other.lang +++ b/htdocs/langs/hi_IN/other.lang @@ -5,8 +5,6 @@ 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 -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Right CalculatedWeight=Calculated weight CalculatedVolume=Calculated volume Weight=Weight -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/hi_IN/products.lang b/htdocs/langs/hi_IN/products.lang index 97db059594f..9ecc11ed93d 100644 --- a/htdocs/langs/hi_IN/products.lang +++ b/htdocs/langs/hi_IN/products.lang @@ -108,7 +108,8 @@ 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=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +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 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/hi_IN/projects.lang b/htdocs/langs/hi_IN/projects.lang index baf0ecde17f..05aa1f5a560 100644 --- a/htdocs/langs/hi_IN/projects.lang +++ b/htdocs/langs/hi_IN/projects.lang @@ -76,15 +76,16 @@ MyActivities=My tasks/activities MyProjects=My projects MyProjectsArea=My projects Area DurationEffective=Effective duration -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Time +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/hi_IN/recruitment.lang b/htdocs/langs/hi_IN/recruitment.lang index b775e78552e..437445f25dc 100644 --- a/htdocs/langs/hi_IN/recruitment.lang +++ b/htdocs/langs/hi_IN/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/hi_IN/sendings.lang b/htdocs/langs/hi_IN/sendings.lang index 5ce3b7f67e9..73bd9aebd42 100644 --- a/htdocs/langs/hi_IN/sendings.lang +++ b/htdocs/langs/hi_IN/sendings.lang @@ -30,6 +30,7 @@ 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 @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=More complete document model for delivery receipts (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/hi_IN/stocks.lang b/htdocs/langs/hi_IN/stocks.lang index 660443bcded..a1f55010139 100644 --- a/htdocs/langs/hi_IN/stocks.lang +++ b/htdocs/langs/hi_IN/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/hi_IN/ticket.lang b/htdocs/langs/hi_IN/ticket.lang index 59519282c80..982fff90ffa 100644 --- a/htdocs/langs/hi_IN/ticket.lang +++ b/htdocs/langs/hi_IN/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Other TicketSeverityShortLOW=Low TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=High -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Read Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/hi_IN/website.lang b/htdocs/langs/hi_IN/website.lang index 03e042e4be6..f17def114b8 100644 --- a/htdocs/langs/hi_IN/website.lang +++ b/htdocs/langs/hi_IN/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/hi_IN/withdrawals.lang b/htdocs/langs/hi_IN/withdrawals.lang index 114a8d9dd6c..059b3451c11 100644 --- a/htdocs/langs/hi_IN/withdrawals.lang +++ b/htdocs/langs/hi_IN/withdrawals.lang @@ -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>. ClassCredited=Classify credited @@ -131,7 +132,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,3 +148,5 @@ 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/hi_IN/workflow.lang b/htdocs/langs/hi_IN/workflow.lang index 299be277e1d..494a0424a75 100644 --- a/htdocs/langs/hi_IN/workflow.lang +++ b/htdocs/langs/hi_IN/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 diff --git a/htdocs/langs/hr_HR/accountancy.lang b/htdocs/langs/hr_HR/accountancy.lang index d3f1ceacc61..f5ba4bd62f1 100644 --- a/htdocs/langs/hr_HR/accountancy.lang +++ b/htdocs/langs/hr_HR/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Date Docref=Reference LabelAccount=Oznaka računa LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Broj komada TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/hr_HR/admin.lang b/htdocs/langs/hr_HR/admin.lang index 073e9232710..7e0ec932d8e 100644 --- a/htdocs/langs/hr_HR/admin.lang +++ b/htdocs/langs/hr_HR/admin.lang @@ -56,6 +56,8 @@ GUISetup=Prikaz SetupArea=Postavke UploadNewTemplate=Upload new template(s) FormToTestFileUploadForm=Obrazac za testiranje uploada datoteka (sukladno postavkama) +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled 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. @@ -85,7 +87,6 @@ ShowPreview=Prikaži pregled ShowHideDetails=Show-Hide details PreviewNotAvailable=Pregled nije dostupan ThemeCurrentlyActive=Tema trenutno aktivna -CurrentTimeZone=Vremenska zona PHP (server) MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Dates are stored and returned by database server as if they were kept as submitted string. The timezone has effect only when using the UNIX_TIMESTAMP function (that should not be used by Dolibarr, so database TZ should have no effect, even if changed after data was entered). Space=Razmak @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Obriši privremene datoteke +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 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 PurgeNothingToDelete=Nema mapa i datoteka za brisanje. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Preferirani partneri OtherResources=Drugi izvori ExternalResources=External Resources SocialNetworks=Social Networks +SocialNetworkId=Social Network ID ForDocumentationSeeWiki=Za korisničku ili razvojnu dokumentciju ( DOC, FAQ...)<br> pogledajte na Dolibarr Wiki-u:<br><b><a href="%s" target="_blank">%s</a></b> ForAnswersSeeForum=Za sva ostala pitanja/pomoć, obratite se na Dolibarr forumu:<br><b><a href="%s" target="_blank">%s</a></b> HelpCenterDesc1=Here are some resources for getting help and support with Dolibarr. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Examples with current configuration ListOfDirectories=Popis mapa sa OpenDocument predlošcima 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=Primjer:<br>c:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br>Da bi ste saznali kako kreirati ODT predloške dokumenata, prije pohranjivanja istih u navedene mape, pročitajte wiki dokumentaciju na: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Pozicija Imena/Prezimena @@ -406,7 +408,7 @@ UrlGenerationParameters=Parametri za osiguranje URL-a SecurityTokenIsUnique=Koristi jedinstven securekey parametar za svaki URL EnterRefToBuildUrl=Unesite referencu za objekt %s GetSecuredUrl=Traži izračunan URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) OldVATRates=Stara stopa PDV-a NewVATRates=Nova stopa PDV-a PriceBaseTypeToChange=Promjeni cijene sa baznom referentnom vrijednosti definiranoj na @@ -668,7 +670,7 @@ Module54000Desc=Direct print (without opening the documents) using Cups IPP inte Module55000Name=Anketa, Upitnik ili Glasanje Module55000Desc=Create online polls, surveys or votes (like Doodle, Studs, RDVz etc...) Module59000Name=Marže -Module59000Desc=Modul za upravljanje maržama +Module59000Desc=Module to follow margins Module60000Name=Provizije Module60000Desc=Modul za upravljanje provizijama Module62000Name=Incoterms @@ -1306,7 +1308,7 @@ 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=Optimizacija pretrage -YouHaveXObjectUseSearchOptim=You have %s %s in the database. You should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,13 @@ ServiceSetup=Podešavanje modula usluga ProductServiceSetup=Podešavanje modula Proizvoda i usluga 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=Zadana vrsta barkoda za korištenje kod proizvoda @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Osobni izbornici nisu povezani na gornji izbornik NewMenu=Novi izbornik MenuHandler=Nosioc izbornika MenuModule=Izvorni modul -HideUnauthorizedMenu= Sakrij neautorizirane izbornike (sivo) +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=ID Izbornika DetailMenuHandler=Nosioc izbornika gdje da se prikaže novi izbornik DetailMenuModule=Naziv modula ako stavka izbornika dolazi iz modula @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=PBR MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/hr_HR/banks.lang b/htdocs/langs/hr_HR/banks.lang index 722bbc6949d..6e93525512f 100644 --- a/htdocs/langs/hr_HR/banks.lang +++ b/htdocs/langs/hr_HR/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/hr_HR/blockedlog.lang b/htdocs/langs/hr_HR/blockedlog.lang index 5afae6e9e53..0bba5605d0f 100644 --- a/htdocs/langs/hr_HR/blockedlog.lang +++ b/htdocs/langs/hr_HR/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/hr_HR/boxes.lang b/htdocs/langs/hr_HR/boxes.lang index 91564430c76..62c1870fd62 100644 --- a/htdocs/langs/hr_HR/boxes.lang +++ b/htdocs/langs/hr_HR/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=Zadnjih %s izmjenjenih donacija BoxTitleLastModifiedExpenses=Zadnjih %s izmjenjenih izvještaja troškova BoxTitleLatestModifiedBoms=Latest %s modified BOMs BoxTitleLatestModifiedMos=Latest %s modified Manufacturing Orders +BoxTitleLastOutstandingBillReached=Customers with maximum outstanding exceeded BoxGlobalActivity=Globalna aktivnost (računi, prijedlozi, nalozi) BoxGoodCustomers=Dobar kupac BoxTitleGoodCustomers=%s dobrih kupaca +BoxScheduledJobs=Planirani poslovi +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Failed to refresh RSS flux. Latest successful refresh date: %s LastRefreshDate=Datum zadnjeg osvježavanja NoRecordedBookmarks=Nema definiranih oznaka. @@ -92,8 +95,8 @@ LastXMonthRolling=Zadnja %s tekuća mjesece ChooseBoxToAdd=Dodaj prozorčić na početnu stranicu BoxAdded=Widget was added in your dashboard BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users) -BoxLastManualEntries=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Računovodstvo +ValidatedProjects=Validated projects diff --git a/htdocs/langs/hr_HR/cashdesk.lang b/htdocs/langs/hr_HR/cashdesk.lang index f03eb1340b0..ac1d97cc447 100644 --- a/htdocs/langs/hr_HR/cashdesk.lang +++ b/htdocs/langs/hr_HR/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=Broj računa Paymentnumpad=Type of Pad to enter payment Numberspad=Numbers Pad @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/hr_HR/categories.lang b/htdocs/langs/hr_HR/categories.lang index b3f785c8df7..38b81102ca5 100644 --- a/htdocs/langs/hr_HR/categories.lang +++ b/htdocs/langs/hr_HR/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=Sučelje kategorija projekata UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories CatList=Popis kategorija +CatListAll=List of tags/categories (all types) NewCategory=Nova kategorija ModifCat=Promjeni kategoriju CatCreated=Kategorija kreirana @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=ID Kategorije -CatSupList=List of vendor tags/categories -CatCusList=Popis kategorija kupaca/potencijalnih kupaca +ParentCategory=Parent tag/category +ParentCategoryLabel=Label of parent tag/category +CatSupList=List of vendors tags/categories +CatCusList=List of customers/prospects tags/categories CatProdList=Popis kategorija proizvoda CatMemberList=Popis kategorija članova -CatContactList=Popis kategorija kontakta -CatSupLinks=Veze između dobavljača i kategorija +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=Veze između kupaca/potencijalnih kupaca i kategorija CatContactsLinks=Links between contacts/addresses and tags/categories CatProdLinks=Veze izmeđi proizvoda/usluga i kategorija -CatProJectLinks=Veze između projekata i kategorija +CatMembersLinks=Links between members and tags/categories +CatProjectsLinks=Veze između projekata i kategorija +CatUsersLinks=Links between users and tags/categories DeleteFromCat=Makni iz kategorije ExtraFieldsCategories=Dodatni atributi CategoriesSetup=Podešavanje kategorija diff --git a/htdocs/langs/hr_HR/companies.lang b/htdocs/langs/hr_HR/companies.lang index 70f428267e7..ab89dcbabc0 100644 --- a/htdocs/langs/hr_HR/companies.lang +++ b/htdocs/langs/hr_HR/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi VATIntraManualCheck=You can also check manually on the European Commission website <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=Provjera nije moguća. Servis za provjeru nije pružena od strane države članice (%s). NorProspectNorCustomer=Not prospect, nor customer -JuridicalStatus=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Zaposlenici ProspectLevelShort=Potencijal diff --git a/htdocs/langs/hr_HR/compta.lang b/htdocs/langs/hr_HR/compta.lang index 35de89eb445..78940a5a086 100644 --- a/htdocs/langs/hr_HR/compta.lang +++ b/htdocs/langs/hr_HR/compta.lang @@ -111,7 +111,7 @@ Refund=Povrat SocialContributionsPayments=Plaćanja društveni/fiskalni porez ShowVatPayment=Prikaži PDV plaćanja TotalToPay=Ukupno za platiti -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account +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=Konto kupca @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Jeste li sigurni da želite obrisati ovu uplatu 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> -CalcModeDebt=Analysis of known recorded invoices even if they are not yet accounted in ledger. +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= Način <b>%sRE na računima kupaca - računima dobavljača%s</b> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Stanje prihoda i troškova, godišnji sažetak 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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=Prikazani iznosi su sa uključenim svim porezima 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=- Uključuje stvarne uplate po računima, troškove, PDV i plaće. <br>- Baziran je po datumu plaćanja računa, troškova, PDV-a i plaćama. Datum donacje za donacije. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting SeePageForSetup=See menu <a href="%s">%s</a> for setup DepositsAreNotIncluded=- Računi za predujam nisu uključeni 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=Izvještaj po RE komitenta LT2ReportByCustomersES=Izvještaj po IRPF komitenta VATReport=Sale tax report VATReportByPeriods=Sale tax report by period +VATReportByMonth=Sale tax report by month VATReportByRates=Sale tax report by rates VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer diff --git a/htdocs/langs/hr_HR/cron.lang b/htdocs/langs/hr_HR/cron.lang index d91b7a5fb77..1f2d530e535 100644 --- a/htdocs/langs/hr_HR/cron.lang +++ b/htdocs/langs/hr_HR/cron.lang @@ -7,13 +7,14 @@ Permission23103 = Obriši planirani posao Permission23104 = Pokreni planirani posao # Admin CronSetup=Postavljanje upravljanja planiranih poslova -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=Ili za provjeru i pokretanje specifičnog posla +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=Sigurnosni ključ za URL za pokretanje cron zadataka FileToLaunchCronJobs=Command line to check and launch qualified cron jobs CronExplainHowToRunUnix=U Unix okolini potrebno je korisititi sljedeći crontab unos za pokretanje komande svakih 5 minuta CronExplainHowToRunWin=On Microsoft(tm) Windows environment you can use Scheduled Task tools to run the command line each 5 minutes CronMethodDoesNotExists=Klasa %s ne sadrži niti jednu %s metodu +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 @@ -46,6 +47,7 @@ CronNbRun=Number of launches CronMaxRun=Maximum number of launches CronEach=Svakih JobFinished=Posao pokrenut i završen +Scheduled=Scheduled #Page card CronAdd= Dodaj poslove CronEvery=Izvrši posao svaki @@ -56,7 +58,7 @@ CronNote=Napomena CronFieldMandatory=Polja %s su obavezna CronErrEndDateStartDt=Datum kraja ne može biti prije datuma početka StatusAtInstall=Status at module installation -CronStatusActiveBtn=Omogući +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Onemogući CronTaskInactive=Ovaj posao je onemogućen CronId=ID @@ -76,8 +78,14 @@ 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=Idite na izbornik "Home - Admin tools - Scheduled jobs" za prikaz i uređivanje planiranih poslova. +UseMenuModuleToolsToAddCronJobs=Go into menu "<a href="%s">Home - Admin tools - Scheduled jobs</a>" to see and edit scheduled jobs. JobDisabled=Posao onemogućen MakeLocalDatabaseDumpShort=Lakalni backup baze 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/hr_HR/errors.lang b/htdocs/langs/hr_HR/errors.lang index 8b017fff9cf..cf19fd01b31 100644 --- a/htdocs/langs/hr_HR/errors.lang +++ b/htdocs/langs/hr_HR/errors.lang @@ -5,8 +5,10 @@ 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. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ 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=Ref used for creation already exists. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/hr_HR/exports.lang b/htdocs/langs/hr_HR/exports.lang index f8f24af0ed9..f214e7f85dd 100644 --- a/htdocs/langs/hr_HR/exports.lang +++ b/htdocs/langs/hr_HR/exports.lang @@ -26,6 +26,8 @@ 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=Biblioteka +ExportCsvSeparator=Csv caracter separator +ImportCsvSeparator=Csv caracter separator Step=Step FormatedImport=Čarobnjak za unos podataka 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. @@ -131,3 +133,4 @@ 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/hr_HR/mails.lang b/htdocs/langs/hr_HR/mails.lang index 80155474705..2b7ce391248 100644 --- a/htdocs/langs/hr_HR/mails.lang +++ b/htdocs/langs/hr_HR/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Obavijesti -NoNotificationsWillBeSent=Nema planiranih obavijesti za ovaj događaj i tvrtku -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent +NotificationsAuto=Notifications Auto. +NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company +ANotificationsWillBeSent=1 automatic notification will be sent by email +SomeNotificationsWillBeSent=%s automatic notifications will be sent by email +AddNewNotification=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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=Podatak ContactsWithThirdpartyFilter=Contacts with third-party filter Unanswered=Unanswered Answered=Answered IsNotAnAnswer=Is not answer (initial email) IsAnAnswer=Is an answer of an initial email +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/hr_HR/main.lang b/htdocs/langs/hr_HR/main.lang index 8ef879f459d..ad0c07d9405 100644 --- a/htdocs/langs/hr_HR/main.lang +++ b/htdocs/langs/hr_HR/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=Nema predloška za taj tip e-pošte AvailableVariables=Dostupne zamjenske vrijednosti NoTranslation=Bez prijevoda Translation=Prijevod +CurrentTimeZone=Vremenska zona PHP (server) EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria NoRecordFound=Spis nije pronađen NoRecordDeleted=Spis nije izbrisan NotEnoughDataYet=Nedovoljno podataka @@ -85,6 +87,8 @@ FileWasNotUploaded=Datoteka za prilog je odabrana, ali još nije učitana. Klikn NbOfEntries=Broj unosa GoToWikiHelpPage=Pročitajte Online pomoć (potreban pristup Internetu) GoToHelpPage=Pročitaj pomoć +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Home Page RecordSaved=Podatak spremljen RecordDeleted=Podatak obrisan RecordGenerated=Record generated @@ -220,6 +224,7 @@ Value=Vrijednost PersonalValue=Osobna vrijednost NewObject=Novi%s NewValue=Nova vrijednost +OldValue=Old value %s CurrentValue=Trenutna vrijednost Code=Oznaka Type=Vrsta @@ -354,8 +359,8 @@ UnitPrice=Jedinična cijena UnitPriceHT=Jedinična cijena (bez poreza) UnitPriceHTCurrency=Jedinična cijena (bez poreza) (u valuti) UnitPriceTTC=Jedinična cijena -PriceU=Jed. cijena -PriceUHT=Jed. cijena +PriceU=Jed. cij. +PriceUHT=J.C. netto PriceUHTCurrency=J.C. (valuta) PriceUTTC=J.C. (s porezom) Amount=Iznos @@ -391,7 +396,7 @@ TotalHTShort=Ukupno (bez poreza) TotalHT100Short=Total 100%% (excl.) TotalHTShortCurrency=Total (excl. in currency) TotalTTCShort=Ukupno s PDV-om -TotalHT=Ukupno bez PDV-a +TotalHT=Ukupno netto TotalHTforthispage=Ukupno (bez PDV-a) na ovoj stranici Totalforthispage=Ukupno na ovoj stranici TotalTTC=Ukupno s PDV-om @@ -433,6 +438,7 @@ RemainToPay=Preostalo za platiti Module=Modul/Aplikacija Modules=Moduli/Aplikacije Option=Opcija +Filters=Filters List=Popis FullList=Cijeli popis FullConversation=Cijeli razgovor @@ -650,6 +656,7 @@ SupplierPreview=Prikaz dobavljača ShowCustomerPreview=Prikaži kupca ShowSupplierPreview=Prikaži dobavljača RefCustomer=Vezani dokument pri kupcu +InternalRef=Internal ref. Currency=Valuta InfoAdmin=Podaci za administratore Undo=Povrati @@ -671,7 +678,7 @@ SendMail=Pošalji e-poštu Email=E-pošta NoEMail=Nema e-pošte AlreadyRead=Već pročitano -NotRead=Nije pročitano +NotRead=Unread NoMobilePhone=Nema mobilnog telefona Owner=Vlasnik FollowingConstantsWillBeSubstituted=Sljedeće konstante bit će zamjenjene s odgovarajućom vrijednošću. @@ -1007,7 +1014,7 @@ SearchIntoMembers=Članovi SearchIntoUsers=Korisnici SearchIntoProductsOrServices=Proizvodi ili usluge SearchIntoProjects=Projekti -SearchIntoMO=Manufacturing Orders +SearchIntoMO=Proizvodni nalozi SearchIntoTasks=Zadaci SearchIntoCustomerInvoices=Računi za kupce SearchIntoSupplierInvoices=Ulazni računi @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/hr_HR/modulebuilder.lang b/htdocs/langs/hr_HR/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/hr_HR/modulebuilder.lang +++ b/htdocs/langs/hr_HR/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/hr_HR/mrp.lang b/htdocs/langs/hr_HR/mrp.lang index f018be890cc..d40d51ab493 100644 --- a/htdocs/langs/hr_HR/mrp.lang +++ b/htdocs/langs/hr_HR/mrp.lang @@ -1,17 +1,17 @@ -Mrp=Manufacturing Orders +Mrp=Proizvodni nalozi MOs=Manufacturing orders -ManufacturingOrder=Manufacturing Order +ManufacturingOrder=Proizvodni nalog MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP MenuBOM=Bills of material LatestBOMModified=Latest %s Bills of materials modified LatestMOModified=Latest %s Manufacturing Orders modified -Bom=Bills of Material -BillOfMaterials=Bill of Material +Bom=Sastavnice +BillOfMaterials=Sastavnica BOMsSetup=Setup of module BOM ListOfBOMs=List of bills of material - BOM -ListOfManufacturingOrders=List of Manufacturing Orders +ListOfManufacturingOrders=Lista proizvodnih naloga NewBOM=New bill of material 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 @@ -32,13 +32,13 @@ DeleteBillOfMaterials=Delete Bill Of Materials DeleteMo=Delete Manufacturing Order ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? -MenuMRP=Manufacturing Orders -NewMO=New Manufacturing Order +MenuMRP=Proizvodni nalozi +NewMO=Novi proizvodni nalog QtyToProduce=Qty to produce -DateStartPlannedMo=Date start planned -DateEndPlannedMo=Date end planned +DateStartPlannedMo=Datum početka planirani +DateEndPlannedMo=Datum završetka planirani KeepEmptyForAsap=Empty means 'As Soon As Possible' -EstimatedDuration=Estimated duration +EstimatedDuration=Procjena trajanja 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) ? @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/hr_HR/other.lang b/htdocs/langs/hr_HR/other.lang index f2b9c16f0f7..e96a3a7a4a4 100644 --- a/htdocs/langs/hr_HR/other.lang +++ b/htdocs/langs/hr_HR/other.lang @@ -5,8 +5,6 @@ Tools=Alati TMenuTools=Alati ToolsDesc=Svi alati koji nisu uključeni u ostalim sučeljima grupirani su ovdje.<br>Možete im pristupiti uz pomoć izbornika lijevo. Birthday=Birthday -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=Poštovana/ni,\nposlali smo vam robu prema dos 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) @@ -137,7 +139,7 @@ Right=Right CalculatedWeight=Izračunata masa CalculatedVolume=Izračunati volumen Weight=Masa -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/hr_HR/products.lang b/htdocs/langs/hr_HR/products.lang index bceda0c20e6..62d40d82a31 100644 --- a/htdocs/langs/hr_HR/products.lang +++ b/htdocs/langs/hr_HR/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Broj cijena DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=Broj matičnih grupiranih proizvoda @@ -167,8 +168,10 @@ BuyingPrices=Nabavne cijene CustomerPrices=Cijene kupaca SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +CustomCode=Customs|Commodity|HS code CountryOrigin=Zemlja porijekla +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Nature of product (material/finished) NatureOfProductShort=Nature of product NatureOfProductDesc=Raw material or finished product @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Koristi fiksnu cijenu PriceByQuantity=Različite cijene prema količini DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Raspon količine -MultipriceRules=Pravila odjelnih cijena +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=%% varijacija preko %s PercentDiscountOver=%% popust preko %s diff --git a/htdocs/langs/hr_HR/projects.lang b/htdocs/langs/hr_HR/projects.lang index 0b381082a17..ff826d9e7a5 100644 --- a/htdocs/langs/hr_HR/projects.lang +++ b/htdocs/langs/hr_HR/projects.lang @@ -76,15 +76,16 @@ MyActivities=Moji zadaci/aktivnosti MyProjects=Moji projekti MyProjectsArea=Sučelje mojih projekata DurationEffective=Efektivno trajanje -ProgressDeclared=Objavljeni napredak +ProgressDeclared=Declared real progress TaskProgressSummary=Napredak zadatka CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=Deklarirani napredak manji je za %s od pretpostavljenog napretka -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=Deklarirani napredak veći je za %s od pretpostavljenog napretka -ProgressCalculated=Izračunati napredak +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=s kojim sam povezan WhichIamLinkedToProject=projekt s kojim sam povezan Time=Vrijeme +TimeConsumed=Consumed ListOfTasks=Popis zadataka GoToListOfTimeConsumed=Idi na popis utrošenog vremena GanttView=Gantogram diff --git a/htdocs/langs/hr_HR/recruitment.lang b/htdocs/langs/hr_HR/recruitment.lang index 31f81481a9c..519a3ae434e 100644 --- a/htdocs/langs/hr_HR/recruitment.lang +++ b/htdocs/langs/hr_HR/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/hr_HR/sendings.lang b/htdocs/langs/hr_HR/sendings.lang index 9d7ec4b228e..220a0004a70 100644 --- a/htdocs/langs/hr_HR/sendings.lang +++ b/htdocs/langs/hr_HR/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Ostale isporuke za ovu narudžbu SendingsAndReceivingForSameOrder=Shipments and receipts for this order SendingsToValidate=Isporuke za ovjeru StatusSendingCanceled=Poništeno +StatusSendingCanceledShort=Poništeno StatusSendingDraft=Skica StatusSendingValidated=Ovjereno (proizvodi za isporuku ili su isporučeni) StatusSendingProcessed=Obrađen @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=Prvo morate ovjeriti narudžbu prije izrade otp # Sending methods # ModelDocument DocumentModelTyphon=Kompletan model dokumenta za dostavnu primku (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Konstanta EXPEDITION_ADDON_NUMBER nije definirana SumOfProductVolumes=Ukupni volumen proizvoda SumOfProductWeights=Ukupna masa proizvoda diff --git a/htdocs/langs/hr_HR/stocks.lang b/htdocs/langs/hr_HR/stocks.lang index 20f7b0c745c..66ac338fa3a 100644 --- a/htdocs/langs/hr_HR/stocks.lang +++ b/htdocs/langs/hr_HR/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/hr_HR/ticket.lang b/htdocs/langs/hr_HR/ticket.lang index 70e17eef676..7a4ddd8295d 100644 --- a/htdocs/langs/hr_HR/ticket.lang +++ b/htdocs/langs/hr_HR/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Ostalo TicketSeverityShortLOW=Nisko TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=Visoko -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Nije pročitano Read=Read Assigned=Assigned InProgress=U postupku @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/hr_HR/website.lang b/htdocs/langs/hr_HR/website.lang index 41f2e8808aa..893a4042577 100644 --- a/htdocs/langs/hr_HR/website.lang +++ b/htdocs/langs/hr_HR/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page PageContainer=Strana 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/hr_HR/withdrawals.lang b/htdocs/langs/hr_HR/withdrawals.lang index 9d80e1ba9bd..1ac48911293 100644 --- a/htdocs/langs/hr_HR/withdrawals.lang +++ b/htdocs/langs/hr_HR/withdrawals.lang @@ -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>. ClassCredited=Označi kao kreditirano @@ -131,7 +132,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,3 +148,5 @@ 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=Opcija za stvarni način nije postavljena, zaustavljamo nakon ove simulacije ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorICSmissing=Missing ICS in Bank account %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/hr_HR/workflow.lang b/htdocs/langs/hr_HR/workflow.lang index 8fc3bf1c296..0e485d46ab2 100644 --- a/htdocs/langs/hr_HR/workflow.lang +++ b/htdocs/langs/hr_HR/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 diff --git a/htdocs/langs/hu_HU/accountancy.lang b/htdocs/langs/hu_HU/accountancy.lang index 70ffa6bdfbb..342be1b6de1 100644 --- a/htdocs/langs/hu_HU/accountancy.lang +++ b/htdocs/langs/hu_HU/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Dátum Docref=Hivatkozás LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/hu_HU/admin.lang b/htdocs/langs/hu_HU/admin.lang index 2beca20a1c0..76ed7753d26 100644 --- a/htdocs/langs/hu_HU/admin.lang +++ b/htdocs/langs/hu_HU/admin.lang @@ -56,6 +56,8 @@ GUISetup=Kijelző SetupArea=Beállítás UploadNewTemplate=Új sablon(ok) feltöltése FormToTestFileUploadForm=A fájlfeltöltés tesztelésének űrlapja (beállítás szerint) +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled IfModuleEnabled=Megjegyzés: az 'igen' csak akkor eredményes, ha a <b>%s</b> modul engedélyezve van 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. @@ -85,7 +87,6 @@ ShowPreview=Előnézet megtekintése ShowHideDetails=Show-Hide details PreviewNotAvailable=Előnézet nem elérhető ThemeCurrentlyActive=Jelenleg aktív téma -CurrentTimeZone=A PHP (szerver) időzónája MySQLTimeZone=MySql (adatbázis) időzóna TZHasNoEffect=A dátumokat az adatbázis-kiszolgáló karakterláncként tárolja és küldi vissza. Az időzónának csak az UNIX_TIMESTAMP funkció használatakor van hatása (ezt a Dolibarr nem használhatja, tehát az adatbázis TZ-nek nincs hatása, még akkor sem, ha az adatok bevitele után megváltozott). Space=Hely @@ -153,8 +154,8 @@ 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=Az összes ideiglenes fájl törlése (nincs adatvesztés kockázata). Megjegyzés: A törlés csak akkor történik meg, ha a temp könyvtárat 24 órával ezelőtt hozták létre. -PurgeDeleteTemporaryFilesShort=Ideiglenes fájlok törlése +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 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 PurgeNothingToDelete=Nincs törlésre váró fájl vagy könyvtár @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Preferált partnerek OtherResources=Egyéb források ExternalResources=Külső források SocialNetworks=Közösségi hálózatok +SocialNetworkId=Social Network ID ForDocumentationSeeWiki=A felhasználó vagy fejlesztői dokumentáció (doc, GYIK ...), <br> vessünk egy pillantást a Dolibarr Wiki: <br> <a href="%s" target="_blank"><b>%s</b></a> ForAnswersSeeForum=Ha bármilyen további kérdése / help, akkor használja a fórumot Dolibarr: <br> <a href="%s" target="_blank"><b>%s</b></a> HelpCenterDesc1=Itt kaphat a Dolibarr-rel kapcsolatban segítséget és támogatást. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Példák az aktuális konfigurációval ListOfDirectories=OpenDocument sablonok listája könyvtárak ListOfDirectoriesForModelGenODT=Az OpenDocument formátumú sablonfájlokat tartalmazó könyvtárak listája. <br> <br> Írja ide a könyvtárak teljes elérési útját. <br> Nyomjon "Enter"-t minden egyes könyvtár között. <br> A GED modul könyvtárának hozzáadása: <b>DOL_DATA_ROOT/ecm/saját_könyvtár_neve</b>. <br> <br> Az e könyvtárakban található fájloknak <b>.odt</b> vagy <b>.ods</b> kiterjesztésre kell végződni. NumberOfModelFilesFound=Ezekben a könyvtárakban található ODT / ODS sablon fájlok száma -ExampleOfDirectoriesForModelGen=Példák a szintaxis: <br> c: \\ mydir <br> / Home / mydir <br> DOL_DATA_ROOT / ECM / ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br> Ha tudod, hogyan kell létrehozni a odt dokumentumsablonok, mielőtt tárolja őket azokra a könyvtárakra, olvasd el a wiki dokumentáció: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=A név / vezetéknév sorrendje @@ -406,7 +408,7 @@ UrlGenerationParameters=URL paraméterek biztosítása SecurityTokenIsUnique=Használjunk olyan egyedi securekey paraméter az URL EnterRefToBuildUrl=Adja meg az objektum referencia %s GetSecuredUrl=Get URL számított -ButtonHideUnauthorized=Rejtett gombok elrejtése nem adminisztrátorok számára az illetéktelen tevékenységekhez a szürke letiltott gombok megjelenítése helyett +ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) OldVATRates=Régi ÁFA-kulcs NewVATRates=Új ÁFA-kulcs PriceBaseTypeToChange=Módosítsa az árakat a meghatározott alap referenciaértékkel @@ -668,7 +670,7 @@ Module54000Desc=Közvetlen nyomtatás (a dokumentumok kinyitása nélkül) a Cup Module55000Name=Szavazás, felmérés vagy választás Module55000Desc=Hozzon létre online szavazást, felmérést vagy választást (például Doodle, Studs, RDVz stb.) Module59000Name=Margók -Module59000Desc=Az árrések kezelésére szolgáló modul +Module59000Desc=Module to follow margins Module60000Name=Jutalékok Module60000Desc=Modul a jutalékok kezelésére Module62000Name=Nemzetközi kereskedelmi feltételek @@ -1306,7 +1308,7 @@ YouUseBestDriver=A(z) %s illesztőprogramot használja, amely a jelenleg elérhe YouDoNotUseBestDriver=A(z) %s illesztőprogramot használja, de az %s illesztőprogram használata ajánlott. NbOfObjectIsLowerThanNoPb=Csak %s %s van az adatbázisban. Ez nem igényel különösebb optimalizálást. SearchOptim=Keresés optimalizálása -YouHaveXObjectUseSearchOptim=%s %s van az adatbázisban. A Nyitólap->Beállítások->Egyéb beállítások oldalon adja hozzá a %s konstanst 1 értékkel. Korlátozza a keresést a karakterláncok elejére, amely lehetővé teszi az adatbázis számára az indexek használatát, és azonnali választ eredményez. +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=%s %s van az adatbázisban, és az %s konstans értéke 1-re van állítva a Nyitólap->Beállítások->Egyéb beállítások oldalon. BrowserIsOK=A(z) %s webböngészőt használja. Ez a böngésző rendben van a biztonság és a teljesítmény szempontjából. BrowserIsKO=Az %s webböngészőt használja. Ez a böngésző köztudottan rossz választás a biztonság, a teljesítmény és a megbízhatóság szempontjából. Javasoljuk a Firefox, a Chrome, az Opera vagy a Safari használatát. @@ -1596,8 +1598,13 @@ ServiceSetup=Szolgáltatások modul beállítása ProductServiceSetup=Termékek és szolgáltatások modulok beállítása NumberOfProductShowInSelect=A kombinált kiválasztási listákban megjelenítendő termékek maximális száma (0 = nincs korlátozás) 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=A termékleírások megjelenítése a partner nyelvén +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=Alapértelmezett típusú vonalkód használatát termékek @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=Új menü MenuHandler=Menü kezelő MenuModule=Forrás modul -HideUnauthorizedMenu= Hide jogosulatlan menük (szürke) +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=Id menü DetailMenuHandler=Menü, ahol a kezelő jelzi az új menü DetailMenuModule=Modul neve, ha menübejegyzés származnak modul @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/hu_HU/banks.lang b/htdocs/langs/hu_HU/banks.lang index b526b83be5c..ccc93640d6a 100644 --- a/htdocs/langs/hu_HU/banks.lang +++ b/htdocs/langs/hu_HU/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/hu_HU/blockedlog.lang b/htdocs/langs/hu_HU/blockedlog.lang index 8a37fe90724..e2c08d1d937 100644 --- a/htdocs/langs/hu_HU/blockedlog.lang +++ b/htdocs/langs/hu_HU/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/hu_HU/boxes.lang b/htdocs/langs/hu_HU/boxes.lang index 93ca573083a..ead5517a357 100644 --- a/htdocs/langs/hu_HU/boxes.lang +++ b/htdocs/langs/hu_HU/boxes.lang @@ -46,9 +46,12 @@ 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=Időzített feladatok +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Failed to refresh RSS flux. Latest successful refresh date: %s LastRefreshDate=Latest refresh date NoRecordedBookmarks=Nincs könyvjezlő. Kattintson <a href="%s">ide</a> könyvjelző hozzáadásához. @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Accountancy +ValidatedProjects=Validated projects diff --git a/htdocs/langs/hu_HU/cashdesk.lang b/htdocs/langs/hu_HU/cashdesk.lang index f562064c20c..3215e0e3839 100644 --- a/htdocs/langs/hu_HU/cashdesk.lang +++ b/htdocs/langs/hu_HU/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=Számlák száma Paymentnumpad=Type of Pad to enter payment Numberspad=Numbers Pad @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/hu_HU/categories.lang b/htdocs/langs/hu_HU/categories.lang index 741cab33de6..f16ea1f8280 100644 --- a/htdocs/langs/hu_HU/categories.lang +++ b/htdocs/langs/hu_HU/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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=Kiegészítő tulajdonságok CategoriesSetup=Tags/categories setup diff --git a/htdocs/langs/hu_HU/companies.lang b/htdocs/langs/hu_HU/companies.lang index d6179acca4b..7848c56a7d1 100644 --- a/htdocs/langs/hu_HU/companies.lang +++ b/htdocs/langs/hu_HU/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Ellenőrizze a Közösségen belüli ÁFA-azonosítót VATIntraManualCheck=Manuálisan ellenőrizheti az Európai Bizottság webhelyén <a href="%s" target="_blank"> %s </a> ErrorVATCheckMS_UNAVAILABLE=Ellenőrzés nem lehetséges. A szolgáltatást a tagállam nem teszi lehetővé (%s). NorProspectNorCustomer=Nem leendő partner, nem ügyfél -JuridicalStatus=Jogi személy típusa +JuridicalStatus=Business entity type Workforce=Workforce Staff=Alkalmazottak ProspectLevelShort=Potenciális diff --git a/htdocs/langs/hu_HU/compta.lang b/htdocs/langs/hu_HU/compta.lang index e750d016947..58ff2d8bdcf 100644 --- a/htdocs/langs/hu_HU/compta.lang +++ b/htdocs/langs/hu_HU/compta.lang @@ -111,7 +111,7 @@ Refund=Visszatérítés SocialContributionsPayments=Social/fiscal taxes payments ShowVatPayment=Mutasd ÁFA fizetési TotalToPay=Összes fizetni -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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=Jelentés a harmadik fél IRPF VATReport=Sale tax report VATReportByPeriods=Sale tax report by period +VATReportByMonth=Sale tax report by month VATReportByRates=Sale tax report by rates VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer diff --git a/htdocs/langs/hu_HU/cron.lang b/htdocs/langs/hu_HU/cron.lang index 70fd2ff5e3c..88f0a731a8c 100644 --- a/htdocs/langs/hu_HU/cron.lang +++ b/htdocs/langs/hu_HU/cron.lang @@ -7,13 +7,14 @@ Permission23103 = Ütemezett feladatok törlése Permission23104 = Ütemezett feladat végrehajtása # Admin CronSetup=Scheduled job management setup -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=Or to check and launch a specific job +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 @@ -46,6 +47,7 @@ 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 @@ -56,7 +58,7 @@ CronNote=Megjegyzés CronFieldMandatory=A %s mezőket kötelező kitölteni CronErrEndDateStartDt=A befejezés időpontja nem lehet hamarabb mint a kezdet StatusAtInstall=Status at module installation -CronStatusActiveBtn=Engedélyez +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Letiltás CronTaskInactive=Ez a feladat ki van kapcsolva CronId=Id @@ -82,3 +84,8 @@ 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/hu_HU/errors.lang b/htdocs/langs/hu_HU/errors.lang index 2fcfb92b003..66351dfdb7e 100644 --- a/htdocs/langs/hu_HU/errors.lang +++ b/htdocs/langs/hu_HU/errors.lang @@ -5,8 +5,10 @@ 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 rossz ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=A %s felhasználói név már létezik. ErrorGroupAlreadyExists=A %s csoport már létezik. ErrorRecordNotFound=A rekord nem található @@ -48,6 +50,7 @@ ErrorFieldsRequired=Néhány kötelezően kitöltendő mező még üres. ErrorSubjectIsRequired=The email topic is required ErrorFailedToCreateDir=Nem sikerült létrehozni egy könyvtárat. Ellenőrizze, hogy a Web szerver felhasználó engedélyekkel rendelkezik, hogy ültesse át Dolibarr dokumentumok könyvtárba. Ha a paraméter <b>safe_mode</b> engedélyezve van ez a PHP-t, ellenőrizze, hogy Dolibarr PHP fájlok tulajdonosa a webszerver felhasználó (vagy csoport). ErrorNoMailDefinedForThisUser=Nincs megadva a felhasználó email címe +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=A funkcó működéséhez Javascript aktiválására van szükség. A beállítások - képernyő részben beállíthatja. ErrorTopMenuMustHaveAParentWithId0=Egy menü típusú &quot;fent&quot; nem lehet egy szülő menüben. Tedd 0 szülő menüből, vagy válasszon egy menüt típusú &quot;baloldal&quot;. ErrorLeftMenuMustHaveAParentId=Egy menü típusú &quot;Bal&quot; kell egy szülő id. @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=This profile name already exists for this export set. ErrorLDAPSetupNotComplete=Dolibarr LDAP-egyezés nem teljes. ErrorLDAPMakeManualTest=Egy. LDIF fájlt keletkezett %s könyvtárban. Próbálja meg kézzel betölteni a parancssorból, hogy több információt hibákat. ErrorCantSaveADoneUserWithZeroPercentage=Can't save an action with "status not started" if field "done by" is also filled. -ErrorRefAlreadyExists=Ref használt létrehozására már létezik. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/hu_HU/exports.lang b/htdocs/langs/hu_HU/exports.lang index 69e7436c345..207e255a0f7 100644 --- a/htdocs/langs/hu_HU/exports.lang +++ b/htdocs/langs/hu_HU/exports.lang @@ -26,6 +26,8 @@ FieldTitle=Mező cím NowClickToGenerateToBuildExportFile=Now, select the file format in the combo box and click on "Generate" to build the export file... AvailableFormats=Available Formats LibraryShort=Könyvtár +ExportCsvSeparator=Csv caracter separator +ImportCsvSeparator=Csv caracter separator Step=Lépés 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. @@ -131,3 +133,4 @@ 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/hu_HU/mails.lang b/htdocs/langs/hu_HU/mails.lang index a00af6c7a1f..97cce391084 100644 --- a/htdocs/langs/hu_HU/mails.lang +++ b/htdocs/langs/hu_HU/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Vonal %s fájlban @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Értesítések -NoNotificationsWillBeSent=Nincs e-mail értesítést terveznek erre az eseményre és vállalati -ANotificationsWillBeSent=1 értesítést küldünk e-mailben -SomeNotificationsWillBeSent=%s értesítést küldünk e-mailben -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=Lista minden e-mail értesítést küldeni +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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=Információ ContactsWithThirdpartyFilter=Contacts with third-party filter Unanswered=Unanswered Answered=Answered IsNotAnAnswer=Is not answer (initial email) IsAnAnswer=Is an answer of an initial email +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/hu_HU/main.lang b/htdocs/langs/hu_HU/main.lang index 1cb2ef1cbf2..8b26160d391 100644 --- a/htdocs/langs/hu_HU/main.lang +++ b/htdocs/langs/hu_HU/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=Ilyen e-mail típushoz nincs elérhető sablon AvailableVariables=Elérhető helyettesítő változók NoTranslation=Nincs fordítás Translation=Fordítás +CurrentTimeZone=A PHP (szerver) időzónája EmptySearchString=Adjon meg nem üres keresési feltételeket +EnterADateCriteria=Enter a date criteria NoRecordFound=Rekord nem található NoRecordDeleted=Nincs törölt rekord NotEnoughDataYet=Nincs elég adat @@ -85,6 +87,8 @@ FileWasNotUploaded=Egy fájl ki lett választva csatolásra, de még nincs felt NbOfEntries=Bejegyzések száma GoToWikiHelpPage=Online súgó olvasása (Internet hozzáférés szükséges) GoToHelpPage=Segítség olvasása +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Home Page RecordSaved=Rekord elmentve RecordDeleted=Rekord törölve RecordGenerated=Rekord létrehozva @@ -220,6 +224,7 @@ Value=Érték PersonalValue=Személyes Érték NewObject=Új %s NewValue=Új Érték +OldValue=Old value %s CurrentValue=Jelenlegi Érték Code=Kód Type=Típus @@ -433,6 +438,7 @@ RemainToPay=Még fizetendő Module=Modul/Alkalmazás Modules=Modulok/alkalmazások Option=Opció +Filters=Filters List=Lista FullList=Teljes lista FullConversation=Teljes beszélgetés @@ -650,6 +656,7 @@ SupplierPreview=Eladói előnézet ShowCustomerPreview=Ügyfél előnézet mutatása ShowSupplierPreview=Eladói előnézet megjelenítése RefCustomer=Ügyfél Ref. +InternalRef=Internal ref. Currency=Pénznem InfoAdmin=Információ adminisztrátorok számára Undo=Visszacsinál @@ -671,7 +678,7 @@ SendMail=E-mail küldése Email=E-mail NoEMail=Nincs email AlreadyRead=Már elolvasott -NotRead=Nem olvasott +NotRead=Unread NoMobilePhone=Nincs mobilszám Owner=Tulajdonos FollowingConstantsWillBeSubstituted=Az alábbi konstansok helyettesítve leszenek a hozzájuk tartozó értékekkel. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/hu_HU/modulebuilder.lang b/htdocs/langs/hu_HU/modulebuilder.lang index 460aef8103b..d257f8a1b0b 100644 --- a/htdocs/langs/hu_HU/modulebuilder.lang +++ b/htdocs/langs/hu_HU/modulebuilder.lang @@ -5,7 +5,7 @@ EnterNameOfObjectDesc=Enter name of the object to create with no spaces. Use upp ModuleBuilderDesc2=Path where modules are generated/edited (first directory for external modules defined into %s): <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 +NewModule=Új modul NewObjectInModulebuilder=New object ModuleKey=Module key ObjectKey=Object key @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/hu_HU/mrp.lang b/htdocs/langs/hu_HU/mrp.lang index 0a110b4dee4..74f340cce90 100644 --- a/htdocs/langs/hu_HU/mrp.lang +++ b/htdocs/langs/hu_HU/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/hu_HU/other.lang b/htdocs/langs/hu_HU/other.lang index 934ae54ceb1..db482da70da 100644 --- a/htdocs/langs/hu_HU/other.lang +++ b/htdocs/langs/hu_HU/other.lang @@ -5,8 +5,6 @@ Tools=Eszközök TMenuTools=Eszközök ToolsDesc=A menükben nem szereplő összes eszköz ide van gyűjtve. <br> Az eszközök a bal oldali menüből érhetők el. Birthday=Születésnap -BirthdayDate=Születésnap dátuma -DateToBirth=Születési dátum BirthdayAlertOn=Születésnaposok aktív BirthdayAlertOff=Születésnaposok inaktív TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=A számla dátumát megelőző hónap (1–12) TextPreviousMonthOfInvoice=A számla dátumát megelőző hónap (szöveges) NextMonthOfInvoice=A számla dátumát követő hónap (1-12) TextNextMonthOfInvoice=A számla dátumát követő hónap (szöveges) +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=A(z) <b>%s</b> fájlba létrehozott ZIP-fájl. DocFileGeneratedInto=A(z) <b>%s</b> fájlba létrehozott dokumentum fájl. JumpToLogin=A kapcsolat megszakadt. Ugrás a bejelentkezési oldalra ... @@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=A költségjelentés érvényesítve (jóváhagy Notify_EXPENSE_REPORT_APPROVE=A költségjelentés jóváhagyva Notify_HOLIDAY_VALIDATE=Leave request validated (approval required) Notify_HOLIDAY_APPROVE=Leave request approved +Notify_ACTION_CREATE=Added action to Agenda SeeModuleSetup=Lásd a %s modul beállításait NbOfAttachedFiles=Száma csatolt fájlok / dokumentumok TotalSizeOfAttachedFiles=Teljes méretű csatolt fájlok / dokumentumok @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=A kifizetéshez kattintson az alábbi linkre, ha még nem történt meg.\n\n%s\n\n PredefinedMailContentGeneric=__(Helló)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendActionComm=Event reminder "__EVENT_LABEL__" on __EVENT_DATE__ at __EVENT_TIME__<br><br>This is an automatic message, please do not reply. DemoDesc=A Dolibarr egy kompakt ERP/CRM, amely számos üzleti modult támogat. Az összes modult bemutató demonstrációnak nincs értelme, mivel ez a forgatókönyv soha nem fordul elő (több száz elérhető). Azonban számos demo profil elérhető. ChooseYourDemoProfil=Válassza ki az igényeinek leginkább megfelelő bemutató profilt ... ChooseYourDemoProfilMore=... vagy készítsen saját profilt <br>(manuális modulválasztás) @@ -214,6 +216,7 @@ EMailTextExpenseReportValidated=Az %s költségjelentés érvényesítve. EMailTextExpenseReportApproved=Az %s költségjelentés jóváhagyva. EMailTextHolidayValidated=Az %sszabadságkérelem érvényesítve. EMailTextHolidayApproved=Az %s szabadságkérelem jóváhagyva. +EMailTextActionAdded=The action %s has been added to the Agenda. ImportedWithSet=Behozatal adathalmaz DolibarrNotification=Automatikus értesítés ResizeDesc=Írja be az új szélesség <b>vagy</b> új magasság. Arányt kell tartani során átméretezés ... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Az elérhetőség/cím létrehozva az e-mail gyű ProjectCreatedByEmailCollector=A projektet létrehozva az e-mail gyűjtő által az MSGID %s e-mailből TicketCreatedByEmailCollector=A jegy létrehozva az e-mail gyűjtő által az MSGID %s e-mailből OpeningHoursFormatDesc=A nyitvatartási időket (-tól-ig) kötőjellel (-) válassza el. <br> Használjon szóközt a különböző idősávok megadásához. <br> Példa: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Az export területén diff --git a/htdocs/langs/hu_HU/products.lang b/htdocs/langs/hu_HU/products.lang index f260c21a8ac..6add4db3590 100644 --- a/htdocs/langs/hu_HU/products.lang +++ b/htdocs/langs/hu_HU/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Több árszegmens termékenként / szolgáltatásonként (minden ügyfél egy árszegmensben van) MultiPricesNumPrices=Árak száma DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Vételi árak CustomerPrices=Végfelhasználói árak SuppliersPrices=Eladási árak SuppliersPricesOfProductsOrServices=Eladási árak (termékek vagy szolgáltatások) -CustomCode=Vám / Áru / HS kód +CustomCode=Customs|Commodity|HS code CountryOrigin=Származási ország +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Nature of product (material/finished) NatureOfProductShort=Nature of product NatureOfProductDesc=Raw material or finished product @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Használja a fix árat PriceByQuantity=Mennyiségtől függő ár DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Mennyiségi intervallum -MultipriceRules=Árazási szabályok +MultipriceRules=Automatic prices for segment UseMultipriceRules=Használjon árszegmens-szabályokat (meghatározva a termékmodul beállításában), hogy automatikusan kiszámítsa az összes többi szegmens árát az első szegmens szerint PercentVariationOver=%% változó ár %s fölött PercentDiscountOver=%% kedvezmény %s fölött diff --git a/htdocs/langs/hu_HU/projects.lang b/htdocs/langs/hu_HU/projects.lang index 6dec0368501..faec1be92fe 100644 --- a/htdocs/langs/hu_HU/projects.lang +++ b/htdocs/langs/hu_HU/projects.lang @@ -1,18 +1,18 @@ # 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 +RefProject=Ref. projekt +ProjectRef=Projekt ref. +ProjectId=Projekt azonosítója +ProjectLabel=Projekt címke +ProjectsArea=Projektek területe +ProjectStatus=Projekt állapota SharedProject=Mindenki PrivateProject=Projekt kapcsolatok -ProjectsImContactFor=Projects for which I am explicitly a contact -AllAllowedProjects=All project I can read (mine + public) +ProjectsImContactFor=Olyan projektek, amelyekkel kifejezetten kapcsolatban állok +AllAllowedProjects=Az összes projekt, amit el tudok olvasni (az enyém + nyilvános) AllProjects=Minden projekt -MyProjectsDesc=This view is limited to projects you are a contact for +MyProjectsDesc=Ez a nézet azokra a projektekre korlátozódik, amelyekhez Ön kapcsolattartó ProjectsPublicDesc=Ez a nézet minden az ön által megtekinthető projektre van korlátozva. -TasksOnProjectsPublicDesc=This view presents all tasks on projects you are allowed to read. +TasksOnProjectsPublicDesc=Ez a nézet azokat a projekteket mutatja be, amelyeket elolvashat. ProjectsPublicTaskDesc=Ez a nézet minden az ön által megtekinthető projektre van korlátozva. ProjectsDesc=Ez a nézet minden projektet tartalmaz. TasksOnProjectsDesc=This view presents all tasks on all projects (your user permissions grant you permission to view everything). @@ -26,244 +26,245 @@ OnlyYourTaskAreVisible=Only tasks assigned to you are visible. Assign task to yo ImportDatasetTasks=Tasks of projects ProjectCategories=Project tags/categories NewProject=Új projekt -AddProject=Create project +AddProject=Projekt létrehozása DeleteAProject=Projekt törlése DeleteATask=Feladat törlése -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 +ConfirmDeleteAProject=Biztosan törli a projektet? +ConfirmDeleteATask=Biztosan törli ezt a feladatot? +OpenedProjects=Nyitott projektek +OpenedTasks=Nyitott feladatok +OpportunitiesStatusForOpenedProjects=Vezet a nyitott projektek mennyisége állapot szerint +OpportunitiesStatusForProjects=Vezeti a projektek mennyiségét állapot szerint ShowProject=Projektek mutatása ShowTask=Feladat mutatása SetProject=Projekt beállítása NoProject=Nincs létrehozott vagy tulajdonolt projekt -NbOfProjects=Number of projects -NbOfTasks=Number of tasks +NbOfProjects=Projektek száma +NbOfTasks=Feladatok száma TimeSpent=Eltöltött idő -TimeSpentByYou=Time spent by you -TimeSpentByUser=Time spent by user -TimesSpent=Töltött idő -TaskId=Task ID -RefTask=Task ref. -LabelTask=Task label -TaskTimeSpent=Time spent on tasks +TimeSpentByYou=Ön által eltöltött idő +TimeSpentByUser=A felhasználó által eltöltött idő +TimesSpent=Eltöltött idő +TaskId=Feladat azonosítója +RefTask=Feladat ref. +LabelTask=Feladat címke +TaskTimeSpent=Feladatokra fordított idő TaskTimeUser=Felhasználó TaskTimeNote=Megjegyzés TaskTimeDate=Dátum -TasksOnOpenedProject=Tasks on open projects -WorkloadNotDefined=Workload not defined +TasksOnOpenedProject=Feladatok nyílt projektekről +WorkloadNotDefined=A munkaterhelés nincs meghatározva NewTimeSpent=Töltött idő MyTimeSpent=Az én eltöltött időm -BillTime=Bill the time spent -BillTimeShort=Bill time -TimeToBill=Time not billed -TimeBilled=Time billed +BillTime=Bill az eltöltött idő +BillTimeShort=Bill idő +TimeToBill=Az idő nincs számlázva +TimeBilled=Számlázott idő Tasks=Feladatok Task=Feladat -TaskDateStart=Task start date -TaskDateEnd=Task end date -TaskDescription=Task description +TaskDateStart=A feladat kezdési dátuma +TaskDateEnd=A feladat befejezésének dátuma +TaskDescription=Feladatleírás NewTask=Új feladat -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 +AddTask=Feladat létrehozása +AddTimeSpent=Hozzon létre töltött időt +AddHereTimeSpentForDay=Adja ide a napra / feladatra fordított időt +AddHereTimeSpentForWeek=Adja ide a hétre / feladatra fordított időt Activity=Aktivitás Activities=Feladatok/aktivitások MyActivities=Feladataim/Aktivitásaim MyProjects=Projektjeim -MyProjectsArea=My projects Area +MyProjectsArea=Saját projektek Terület DurationEffective=Effektív időtartam -ProgressDeclared=Declared progress -TaskProgressSummary=Task progress -CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress -WhichIamLinkedTo=which I'm linked to -WhichIamLinkedToProject=which I'm linked to project +ProgressDeclared=Deklarált valódi haladás +TaskProgressSummary=A feladat előrehaladása +CurentlyOpenedTasks=Gondosan nyitott feladatok +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=A bejelentett valós haladás inkább %s, mint a fogyasztás terén elért haladás +ProgressCalculated=Haladás a fogyasztás terén +WhichIamLinkedTo=amihez kapcsolódom +WhichIamLinkedToProject=amelyet a projekthez kötök Time=Idő -ListOfTasks=List of tasks -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 -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 +TimeConsumed=Consumed +ListOfTasks=Feladatok listája +GoToListOfTimeConsumed=Ugrás az elfogyasztott idő listájára +GanttView=Gantt nézet +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 +ListPredefinedInvoicesAssociatedProject=A projekthez kapcsolódó ügyfélsablonok listája +ListSupplierOrdersAssociatedProject=A projekthez kapcsolódó beszerzési rendelések listája +ListSupplierInvoicesAssociatedProject=A projekthez kapcsolódó szállítói számlák listája +ListContractAssociatedProject=A projekttel kapcsolatos szerződések listája +ListShippingAssociatedProject=A projekthez kapcsolódó szállítások listája +ListFichinterAssociatedProject=A projekttel kapcsolatos beavatkozások listája +ListExpenseReportsAssociatedProject=A projekthez kapcsolódó költségjelentések listája +ListDonationsAssociatedProject=A projekthez kapcsolódó adományok listája +ListVariousPaymentsAssociatedProject=A projekthez kapcsolódó különféle kifizetések listája +ListSalariesAssociatedProject=A projekthez kapcsolódó fizetések fizetési listája +ListActionsAssociatedProject=A projekttel kapcsolatos események listája +ListMOAssociatedProject=A projekthez kapcsolódó gyártási megrendelések listája +ListTaskTimeUserProject=A projekt feladataihoz felhasznált idő listája +ListTaskTimeForTask=A feladathoz felhasznált idő listája +ActivityOnProjectToday=A projekt tevékenysége ma +ActivityOnProjectYesterday=Tegnapi projekt tevékenység ActivityOnProjectThisWeek=Heti projekt aktivitás ActivityOnProjectThisMonth=Havi projekt aktivitás ActivityOnProjectThisYear=Évi projekt aktivitás ChildOfProjectTask=Projekt/Feladat gyermeke -ChildOfTask=Child of task -TaskHasChild=Task has child +ChildOfTask=A feladat gyermeke +TaskHasChild=Feladatnak gyermeke van NotOwnerOfProject=Nem tulajdonosa ennek a privát projektnek AffectedTo=Érinti -CantRemoveProject=This project can't be removed as it is referenced by some other objects (invoice, orders or other). See tab '%s'. +CantRemoveProject=Ez a projekt nem távolítható el, mivel más objektumok (számla, megrendelések vagy egyéb) hivatkoznak rá. Lásd az '%s' lapot. ValidateProject=Projekt hitelesítése -ConfirmValidateProject=Are you sure you want to validate this project? +ConfirmValidateProject=Biztosan érvényesíteni szeretné ezt a projektet? CloseAProject=Projekt lezárása -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) +ConfirmCloseAProject=Biztosan bezárja ezt a projektet? +AlsoCloseAProject=Szintén zárja be a projektet (tartsa nyitva, ha továbbra is követnie kell a gyártási feladatokat rajta) ReOpenAProject=Projekt nyitása -ConfirmReOpenAProject=Are you sure you want to re-open this project? +ConfirmReOpenAProject=Biztosan újra megnyitja ezt a projektet? ProjectContact=A projekt kapcsolatai -TaskContact=Task contacts +TaskContact=Feladat kapcsolattartói ActionsOnProject=Projekteh tartozó cselekvések YouAreNotContactOfProject=Nem kapcsolata ennek a privát projektnek -UserIsNotContactOfProject=User is not a contact of this private project +UserIsNotContactOfProject=A felhasználó nem a privát projekt kapcsolattartója DeleteATimeSpent=Eltöltött idő törlése -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 +ConfirmDeleteATimeSpent=Biztosan törli ezt az eltöltött időt? +DoNotShowMyTasksOnly=Lásd még a hozzám nem rendelt feladatokat +ShowMyTasksOnly=Csak a hozzám rendelt feladatokat tekintheti meg +TaskRessourceLinks=A feladat kapcsolatai ProjectsDedicatedToThisThirdParty=Harmadik félhnek dedikált projektek NoTasks=Nincs a projekthez tartozó feladat LinkedToAnotherCompany=Harmadik félhez kapcsolva -TaskIsNotAssignedToUser=Task not assigned to user. Use button '<strong>%s</strong>' to assign task now. +TaskIsNotAssignedToUser=A feladat nincs hozzárendelve a felhasználóhoz. A feladat hozzárendeléséhez használja az '<strong> %s </strong>' gombot. ErrorTimeSpentIsEmpty=Töltött idő üres ThisWillAlsoRemoveTasks=Ez a művelet is törli az összes feladatot a projekt <b>(%s</b> feladatokat a pillanatban), és az összes bemenet eltöltött idő. IfNeedToUseOtherObjectKeepEmpty=Ha egyes tárgyakat (számla, megrendelés, ...), amelyek egy másik harmadik félnek kell kapcsolódniuk a projekt létrehozásához, tartsa ezt az üres, hogy a projekt, hogy több harmadik fél. -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 +CloneTasks=Klónfeladatok +CloneContacts=Klónozza a névjegyeket +CloneNotes=Klón jegyzetek +CloneProjectFiles=Klón projekt csatlakozott fájlokhoz +CloneTaskFiles=Feladat (ok) egyesített fájljainak klónozása (ha feladat (ok) klónozása) +CloneMoveDate=Frissíti a projekteket / feladatokat mostantól? +ConfirmCloneProject=Biztosan klónozza ezt a projektet? +ProjectReportDate=Módosítsa a feladat dátumát az új projekt kezdési dátumának megfelelően +ErrorShiftTaskDate=Lehetetlen áthelyezni a feladat dátumát az új projekt kezdési dátumának megfelelően +ProjectsAndTasksLines=Projektek és feladatok +ProjectCreatedInDolibarr=%s projekt létrehozva +ProjectValidatedInDolibarr=Az %s projekt érvényesítve +ProjectModifiedInDolibarr=Az %s projekt módosítva +TaskCreatedInDolibarr=Az %s feladat létrehozva +TaskModifiedInDolibarr=Az %s feladat módosítva +TaskDeletedInDolibarr=Az %s feladat törölve +OpportunityStatus=Ólom státusz +OpportunityStatusShort=Ólom státusz +OpportunityProbability=Ólom valószínűsége +OpportunityProbabilityShort=Ólom probab. +OpportunityAmount=Ólom mennyisége +OpportunityAmountShort=Ólom mennyisége +OpportunityWeightedAmount=Lehetőséggel súlyozott összeg +OpportunityWeightedAmountShort=Opp. súlyozott összeg +OpportunityAmountAverageShort=Átlagos ólommennyiség +OpportunityAmountWeigthedShort=Súlyozott ólommennyiség +WonLostExcluded=Nyert / elveszett kizárva ##### Types de contacts ##### TypeContact_project_internal_PROJECTLEADER=Projekt vezető TypeContact_project_external_PROJECTLEADER=Projekt vezető TypeContact_project_internal_PROJECTCONTRIBUTOR=Hozzájáruló TypeContact_project_external_PROJECTCONTRIBUTOR=Hozzájáruló -TypeContact_project_task_internal_TASKEXECUTIVE=Kivitelező -TypeContact_project_task_external_TASKEXECUTIVE=Task Kivitelező +TypeContact_project_task_internal_TASKEXECUTIVE=Feladatvezető +TypeContact_project_task_external_TASKEXECUTIVE=Feladatvezető TypeContact_project_task_internal_TASKCONTRIBUTOR=Hozzájáruló TypeContact_project_task_external_TASKCONTRIBUTOR=Hozzájáruló -SelectElement=Select element -AddElement=Link to element +SelectElement=Válasszon elemet +AddElement=Link elemhez LinkToElementShort=Hivatkozás erre: # 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 +DocumentModelBeluga=Projektdokumentum-sablon a kapcsolt objektumok áttekintéséhez +DocumentModelBaleine=Projektdokumentum sablon feladatokhoz +DocumentModelTimeSpent=Projekt jelentés sablon a töltött időre +PlannedWorkload=Tervezett terhelés +PlannedWorkloadShort=Munkaterhelés ProjectReferers=Kapcsolódó elemek -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 +ProjectMustBeValidatedFirst=A projektet először érvényesíteni kell +FirstAddRessourceToAllocateTime=Rendeljen felhasználói erőforrást a projekt kapcsolattartójává az időosztáshoz +InputPerDay=Bevitel naponta +InputPerWeek=Heti bevitel +InputPerMonth=Havi bevitel +InputDetail=Bemenet részletei +TimeAlreadyRecorded=Ez az a nap, amelyet erre a feladatra már naponta rögzítettünk, és az %s felhasználó +ProjectsWithThisUserAsContact=Vetíti ezt a felhasználót kapcsolattartóként +TasksWithThisUserAsContact=A felhasználóhoz rendelt feladatok +ResourceNotAssignedToProject=Nincs hozzárendelve a projekthez +ResourceNotAssignedToTheTask=Nincs hozzárendelve a feladathoz +NoUserAssignedToTheProject=Nincs felhasználó hozzárendelve ehhez a projekthez +TimeSpentBy=Által töltött idő +TasksAssignedTo=Hozzárendelt feladatok +AssignTaskToMe=Rendeljen nekem feladatot +AssignTaskToUser=Hozzárendelje a feladatot az %s fájlhoz +SelectTaskToAssign=Válassza ki a hozzárendelni kívánt feladatot ... +AssignTask=Hozzárendelni +ProjectOverview=Áttekintés +ManageTasks=Használja a projekteket a feladatok követésére és / vagy az eltöltött idő jelentésére (munkaidő-táblázatok) +ManageOpportunitiesStatus=Használja a projekteket a vezetők / ügyfelek követésére +ProjectNbProjectByMonth=Létrehozott projektek száma hónaponként +ProjectNbTaskByMonth=A létrehozott feladatok száma hónaponként +ProjectOppAmountOfProjectsByMonth=A leadek száma havonta +ProjectWeightedOppAmountOfProjectsByMonth=Súlyozott leadmennyiség havonta +ProjectOpenedProjectByOppStatus=Nyitott projekt | vezető a vezető státus szerint +ProjectsStatistics=Projektek vagy leadek statisztikája +TasksStatistics=Statisztika a projektek vagy a vezetők feladatairól +TaskAssignedToEnterTime=Feladat kijelölve. Lehetővé kell tenni a feladat megadásának idejét. +IdTaskTime=Id feladat idő +YouCanCompleteRef=Ha a ref-et valamilyen utótaggal szeretné kiegészíteni, akkor ajánlott egy - karakter hozzáadása az elválasztáshoz, így az automatikus számozás továbbra is megfelelően fog működni a következő projekteknél. Például %s-MYSUFFIX +OpenedProjectsByThirdparties=Nyitott projektek harmadik felektől +OnlyOpportunitiesShort=Csak vezet +OpenedOpportunitiesShort=Nyílt vezetők +NotOpenedOpportunitiesShort=Nem nyílt vezető +NotAnOpportunityShort=Nem ólom +OpportunityTotalAmount=A leadek teljes száma +OpportunityPonderatedAmount=Súlyozott mennyiségű ólom +OpportunityPonderatedAmountDesc=A valószínűséggel súlyozott ólomösszeg +OppStatusPROSP=Felkutatás +OppStatusQUAL=Képesítés OppStatusPROPO=Javaslat -OppStatusNEGO=Negociation -OppStatusPENDING=Folyamatban -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 +OppStatusNEGO=Tárgyalás +OppStatusPENDING=Függőben levő +OppStatusWON=Megnyert +OppStatusLOST=Elveszett +Budget=Költségvetés +AllowToLinkFromOtherCompany=Engedélyezheti a másik vállalat projektjeinek összekapcsolását harmadik felek vesszővel elválasztott azonosítói: összekapcsolhatják e harmadik fél összes projektjét (példa: 123,4795,53) <br> +LatestProjects=Legfrissebb %s projektek +LatestModifiedProjects=A legújabb %s módosított projektek +OtherFilteredTasks=Egyéb szűrt feladatok +NoAssignedTasks=Nem található hozzárendelt feladat (az aktuális felhasználóhoz rendeljen projektet / feladatokat a felső jelölőnégyzetből az idő megadásához) +ThirdPartyRequiredToGenerateInvoice=A számlázáshoz meg kell határozni egy harmadik felet a projekten. +ChooseANotYetAssignedTask=Válasszon ki egy olyan feladatot, amely még nincs hozzárendelve # 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=Töltött idő -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 +AllowCommentOnTask=Felhasználói megjegyzések engedélyezése a feladatokhoz +AllowCommentOnProject=Felhasználói megjegyzések engedélyezése a projektekhez +DontHavePermissionForCloseProject=Nincs engedélye az %s projekt bezárására +DontHaveTheValidateStatus=Az %s projektnek nyitva kell lennie a lezáráshoz +RecordsClosed=%s projekt lezárult +SendProjectRef=Információs projekt %s +ModuleSalaryToDefineHourlyRateMustBeEnabled=A „Fizetések” modulnak lehetővé kell tennie az alkalmazottak óradíjának meghatározását az eltöltött idő valorizálása érdekében +NewTaskRefSuggested=A feladat ref már használatban van, új feladat ref szükséges +TimeSpentInvoiced=Számlázással töltött idő +TimeSpentForInvoice=Eltöltött idő +OneLinePerUser=Felhasználónként egy sor +ServiceToUseOnLines=A vonalakon használható szolgáltatás +InvoiceGeneratedFromTimeSpent=Az %s számla a projektre fordított időből származik +ProjectBillTimeDescription=Ellenőrizze, hogy beírta-e a munkaidő-nyilvántartást a projekt feladataira, ÉS azt tervezi, hogy számlákat generál az időről, hogy kiszámlázza a projekt ügyfelét (ne ellenőrizze, hogy olyan számlát kíván-e létrehozni, amely nem a beírt munkaidő-nyilvántartások alapján készül). Megjegyzés: Számla előállításához lépjen a projekt „Idő eltelt” fülére, és válassza ki a beépítendő sorokat. +ProjectFollowOpportunity=Kövesse a lehetőséget +ProjectFollowTasks=Kövesse a feladatokat vagy az eltöltött időt +Usage=Használat +UsageOpportunity=Használat: Lehetőség +UsageTasks=Használat: Feladatok +UsageBillTimeShort=Használat: Számlaidő +InvoiceToUse=Használandó számlatervezet NewInvoice=Új számla -OneLinePerTask=One line per task -OneLinePerPeriod=One line per period -RefTaskParent=Ref. Parent Task -ProfitIsCalculatedWith=Profit is calculated using +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 diff --git a/htdocs/langs/hu_HU/recruitment.lang b/htdocs/langs/hu_HU/recruitment.lang index 17638802c51..590a003a8f0 100644 --- a/htdocs/langs/hu_HU/recruitment.lang +++ b/htdocs/langs/hu_HU/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/hu_HU/sendings.lang b/htdocs/langs/hu_HU/sendings.lang index 9e47080363d..aba9cc8f51b 100644 --- a/htdocs/langs/hu_HU/sendings.lang +++ b/htdocs/langs/hu_HU/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Más szállítások ehhez a megrendeléshez SendingsAndReceivingForSameOrder=Shipments and receipts for this order SendingsToValidate=Hitelesítésre váró szállítások StatusSendingCanceled=Megszakítva +StatusSendingCanceledShort=Visszavonva StatusSendingDraft=Piszkozat StatusSendingValidated=Hitelesítve (már szállítva) StatusSendingProcessed=Feldolgozott @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=Teljesebb dokumentum modell bizonylatokhoz (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Állandó EXPEDITION_ADDON_NUMBER nincs definiálva SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/hu_HU/stocks.lang b/htdocs/langs/hu_HU/stocks.lang index c41ce038ee2..d6a04f7d23e 100644 --- a/htdocs/langs/hu_HU/stocks.lang +++ b/htdocs/langs/hu_HU/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/hu_HU/ticket.lang b/htdocs/langs/hu_HU/ticket.lang index 79cde86ee8b..eca711a1cf2 100644 --- a/htdocs/langs/hu_HU/ticket.lang +++ b/htdocs/langs/hu_HU/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Egyéb TicketSeverityShortLOW=Alacsony TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=Magas -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Nem olvasott Read=Olvas Assigned=Assigned InProgress=Folyamatban @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/hu_HU/website.lang b/htdocs/langs/hu_HU/website.lang index 25d8faccd6d..d7e4a43010d 100644 --- a/htdocs/langs/hu_HU/website.lang +++ b/htdocs/langs/hu_HU/website.lang @@ -30,7 +30,6 @@ EditInLine=Szerkesztés inline AddWebsite=Webhely hozzáadása Webpage=Weblap / tároló AddPage=Oldal / tároló hozzáadása -HomePage=Honlap PageContainer=Oldal PreviewOfSiteNotYetAvailable=A weboldal előnézete <strong>%s</strong> még nem érhető el. Először &#39; <strong>Teljes weboldal-sablont</strong> kell <strong>importálnia</strong> &#39; vagy csak &#39; <strong>Oldal / tároló hozzáadása</strong> &#39; <strong>elemet</strong> . RequestedPageHasNoContentYet=Az %s azonosítóval kért oldalnak még nincs tartalma, vagy a .tpl.php gyorsítótár fájlt eltávolították. Szerkessze az oldal tartalmát ennek megoldásához. @@ -101,7 +100,7 @@ EmptyPage=Üres oldal ExternalURLMustStartWithHttp=A külső URL-nek http: // vagy https: // -el kell kezdődnie. ZipOfWebsitePackageToImport=Töltse fel a webhelysablon-csomag Zip fájlját ZipOfWebsitePackageToLoad=vagy Válasszon egy elérhető beágyazott webhelysablon-csomagot -ShowSubcontainers=Vegye fel a dinamikus tartalmat +ShowSubcontainers=Show dynamic content InternalURLOfPage=Az oldal belső URL-je ThisPageIsTranslationOf=Ez az oldal / konténer a(z) ... nyelv fordítása ThisPageHasTranslationPages=Ezen az oldalon / tárolóban van fordítás @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/hu_HU/withdrawals.lang b/htdocs/langs/hu_HU/withdrawals.lang index 7522b6d2bd1..64d418be9f1 100644 --- a/htdocs/langs/hu_HU/withdrawals.lang +++ b/htdocs/langs/hu_HU/withdrawals.lang @@ -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>. ClassCredited=Jóváírtan osztályozva @@ -131,7 +132,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,3 +148,5 @@ 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=Opció a valós módban nem volt beállítva, akkor hagyja abba ezt követően szimuláció ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorICSmissing=Missing ICS in Bank account %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/hu_HU/workflow.lang b/htdocs/langs/hu_HU/workflow.lang index 569e1e15dc3..245805b071d 100644 --- a/htdocs/langs/hu_HU/workflow.lang +++ b/htdocs/langs/hu_HU/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=Automatikus létrehozás AutomaticClassification=Automatikus minősítés +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/id_ID/accountancy.lang b/htdocs/langs/id_ID/accountancy.lang index 669c6b2ad04..f8548a63d79 100644 --- a/htdocs/langs/id_ID/accountancy.lang +++ b/htdocs/langs/id_ID/accountancy.lang @@ -16,6 +16,8 @@ ThisService=Layanan ini ThisProduct=Produk ini DefaultForService=Standar untuk Layanan DefaultForProduct=Standar untuk Produk +ProductForThisThirdparty=Product for this thirdparty +ServiceForThisThirdparty=Service for this thirdparty CantSuggest=Tidak bisa menyarankan AccountancySetupDoneFromAccountancyMenu=Kebanyakan aturan akutansi dilakukan dari bilah menu %s ConfigAccountingExpert=Configuration of the module accounting (double entry) @@ -48,6 +50,7 @@ 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 MainAccountForCustomersNotDefined=Akun akuntansi utama untuk pelanggan tidak ditentukan dalam pengaturan MainAccountForSuppliersNotDefined=Akun akuntansi utama untuk vendor tidak ditentukan dalam pengaturan @@ -144,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=Jumlah elemen yang akan dijilidkan ditunjukkan oleh halaman (maksimum yang disarankan: 50) +ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 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 @@ -198,7 +201,8 @@ Docdate=Tanggal Docref=Referensi LabelAccount=Label Akun LabelOperation=Operasi label -Sens=Sen +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=Kode huruf Lettering=Tulisan Codejournal=Jurnal @@ -206,7 +210,8 @@ JournalLabel=Label jurnal NumPiece=Jumlah potongan TransactionNumShort=Tidak. transaksi AccountingCategory=Grup yang dipersonalisasi -GroupByAccountAccounting=Kelompokkan dengan akun akuntansi +GroupByAccountAccounting=Group by general ledger account +GroupBySubAccountAccounting=Group by subledger account 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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Pembayaran tidak terkait dengan produk / layanan apa OpeningBalance=Saldo awal ShowOpeningBalance=Tampilkan saldo awal HideOpeningBalance=Sembunyikan saldo awal -ShowSubtotalByGroup=Tampilkan subtotal menurut grup +ShowSubtotalByGroup=Show subtotal by 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. @@ -271,11 +276,13 @@ 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 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 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 -SelectMonthAndValidate=Pilih bulan dan validasi gerakan ValidateHistory=Mengikat Secara Otomatis AutomaticBindingDone=Pengikatan otomatis dilakukan @@ -293,6 +300,7 @@ 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 ## Admin BindingOptions=Binding options @@ -337,6 +345,7 @@ 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_Sage50_Swiss=Ekspor untuk Sage 50 Swiss Modelcsv_winfic=Ekspor Winfic - eWinfic - WinSis Compta Modelcsv_Gestinumv3=Export for Gestinum (v3) diff --git a/htdocs/langs/id_ID/admin.lang b/htdocs/langs/id_ID/admin.lang index d5b84801d2d..6053f1fcc05 100644 --- a/htdocs/langs/id_ID/admin.lang +++ b/htdocs/langs/id_ID/admin.lang @@ -37,8 +37,8 @@ UnlockNewSessions=Hapuskan penguncian koneksi. YourSession=Sesi Anda Sessions=Sesi Pengguna WebUserGroup=Server web pengguna / grup -PermissionsOnFilesInWebRoot=Permissions on files in web root directory -PermissionsOnFile=Permissions on file %s +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). DBStoringCharset=Karakter set atau charset dari basisdata untuk menyimpan data DBSortingCharset=Karakter set atau charset dari basisdata untuk penyortiran data @@ -56,6 +56,8 @@ GUISetup=Tampakan Display SetupArea=Pengaturan UploadNewTemplate=Unggah templat baru(s) FormToTestFileUploadForm=Halaman percobaan untuk mengunggah berkas (berdasarkan konfigurasi di pengaturan) +ModuleMustBeEnabled=Modul/aplikasi <b> %s </b> harus diaktifkan +ModuleIsEnabled=Modul/aplikasi <b> %s </b> telah diaktifkan 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. @@ -73,7 +75,7 @@ DisableJavascriptNote=Catatan: Untuk tujuan pengujian atau debug. Pengoptimasian UseSearchToSelectCompanyTooltip=Juga jika Anda memiliki banyak pihak ketiga (> 100.000), Anda dapat mempercepat dengan menetapkan konstanta COMPANY_DONOTSEARCH_ANYWHERE menjadi 1 pada Pengaturan-> Lainnya. Pencarian akan dibatasi kemudian untuk memulai string. UseSearchToSelectContactTooltip=Dan juga jika Anda memiliki banyak pihak ketiga (> 100.000), Anda dapat mempercepatnya dengan menetapkan konstanta CONTACT_DONOTSEARCH_ANYWHERE menjadi 1 di Pengaturan-> Lainnya. Pencarian akan kemudian dibatasi untuk memulai string. DelaiedFullListToSelectCompany=Tunggu hingga tombol ditekan sebelum memuat konten dari daftar kombo Pihak Ketiga.<br> Ini dapat meningkatkan kecepatan kinerja jika Anda memiliki banyak pihak ketiga, tetapi cara ini kurang nyaman. -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=Tunggu hingga tombol ditekan sebelum memuat konten dari daftar kombo Kontak. <br> Ini dapat meningkatkan kinerja jika Anda memiliki banyak kontak, tetapi bisa menjadi kurang nyaman. NumberOfKeyToSearch=Jumlah karakter yang memicu pencarian: %s NumberOfBytes=Jumlah Bytes SearchString=Cari string @@ -82,10 +84,9 @@ AllowToSelectProjectFromOtherCompany=Pada dokumen pihak ketiga, dapat memilih pr JavascriptDisabled=JavaScript dinonaktifkan UsePreviewTabs=Gunakan tab pratinjau ShowPreview=Tampilkan pratinjau -ShowHideDetails=Show-Hide details +ShowHideDetails=Tampilkan-Sembunyikan rincian PreviewNotAvailable=Preview tidak tersedia ThemeCurrentlyActive=Tema yang sedang aktif -CurrentTimeZone=TimeZone PHP (Server) MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Tanggal disimpan dan dikembalikan oleh server database seolah-olah disimpan sebagai string yang dikirimkan. Zona waktu hanya berpengaruh bila menggunakan fungsi UNIX_TIMESTAMP (yang seharusnya tidak digunakan oleh Dolibarr, jadi basis data TZ seharusnya tidak berpengaruh, bahkan jika diubah setelah data dimasukkan). Space=Ruang @@ -153,8 +154,8 @@ 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 file sementara (tidak ada risiko kehilangan data). Catatan: Penghapusan dilakukan hanya jika direktori temp dibuat 24 jam yang lalu. -PurgeDeleteTemporaryFilesShort=Hapus file sementara +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. +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 PurgeNothingToDelete=Tidak ada direktori atau file untuk dihapus. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Mitra yang Dipilih OtherResources=Sumber daya lainnya ExternalResources=Sumber Daya Eksternal SocialNetworks=Jaringan sosial +SocialNetworkId=ID Jaringan Sosial ForDocumentationSeeWiki=Untuk dokumentasi pengguna atau pengembang (Doc, FAQs ...), <br> lihatlah pada Dolibarr Wiki: <br><b><a href="%s" target="_blank"> %s a0ebd08bc08bc08 ForAnswersSeeForum=Untuk pertanyaan / bantuan lain, Anda dapat menggunakan forum Dolibarr: <br><b><a href="%s" target="_blank"> %s </a> </b> HelpCenterDesc1=Berikut adalah beberapa sumber untuk mendapatkan bantuan dan dukungan dengan Dolibarr. @@ -274,7 +276,7 @@ NoticePeriod=Periode pemberitahuan NewByMonth=Baru setiap bulan Emails=Email EMailsSetup=Penyiapan email -EMailsDesc=This page allows you to set parameters or options for email sending. +EMailsDesc=Halaman ini memungkinkan Anda mengatur parameter atau pilihan untuk pengiriman email. EmailSenderProfiles=Email profil pengirim EMailsSenderProfileDesc=Anda dapat menyimpan bagian ini kosong. Jika Anda memasukkan beberapa email di sini, mereka akan ditambahkan ke daftar kemungkinan pengirim ke kotak kombo saat Anda menulis email baru. MAIN_MAIL_SMTP_PORT=Port SMTP / SMTPS (nilai default dalam php.ini:<b>%s </b>) @@ -292,7 +294,7 @@ MAIN_MAIL_SMTPS_ID=ID SMTP (jika server pengirim memerlukan otentikasi) MAIN_MAIL_SMTPS_PW=Kata Sandi SMTP (jika server pengirim memerlukan otentikasi) MAIN_MAIL_EMAIL_TLS=Gunakan enkripsi TLS (SSL) MAIN_MAIL_EMAIL_STARTTLS=Gunakan enkripsi TLS (STARTTLS) -MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED=Authorise les certificats auto-signés +MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED=Otorisasi les certificats auto-signés MAIN_MAIL_EMAIL_DKIM_ENABLED=Gunakan DKIM untuk menghasilkan tanda tangan email MAIN_MAIL_EMAIL_DKIM_DOMAIN=Domain Email untuk digunakan dengan dkim MAIN_MAIL_EMAIL_DKIM_SELECTOR=Nama pemilih dkim @@ -304,9 +306,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Email pengirim default untuk pengiriman manual (Email UserEmail=Email pengguna CompanyEmail=Email Perusahaan FeatureNotAvailableOnLinux=Fitur tidak tersedia di sistem seperti Unix. Uji program sendmail Anda secara lokal. -FixOnTransifex=Fix the translation on the online translation platform of project +FixOnTransifex=Perbaiki terjemahan pada platform online terjemahan proyek SubmitTranslation=Jika terjemahan untuk bahasa ini tidak lengkap atau Anda menemukan kesalahan, Anda dapat memperbaikinya dengan mengedit file dalam direktori<b>langs / %s</b>dan kirimkan perubahan Anda ke 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=Jika terjemahan untuk bahasa ini tidak lengkap atau Anda menemukan kesalahan, Anda dapat memperbaikinya dengan mengedit file ke direktori <b> langs/%s</b> dan mengirimkan file yang telah diubah ke dolibarr.org/forum atau, jika Anda seorang pengembang, dengan PR di github .com / Dolibarr / dolibarr ModuleSetup=Setup Modul ModulesSetup=Modul / Pengaturan aplikasi ModuleFamilyBase=Sistem @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Contoh dengan konfigurasi saat ini ListOfDirectories=Daftar direktori templat OpenDocument ListOfDirectoriesForModelGenODT=Daftar direktori yang berisi file templat dengan format OpenDocument. <br> <br> Masukkan path direktori lengkap di sini. <br> Tambahkan carriage return antara direktori eah. <br> Untuk menambahkan direktori modul GED, tambahkan di sini<b>DOL_DATA_ROOT / ecm / yourdirectoryname </b>. <br> <br> File dalam direktori tersebut harus diakhiri dengan<b>.odt</b>atau<b>.ods </b>. NumberOfModelFilesFound=Jumlah file template ODT / ODS yang ditemukan di direktori ini -ExampleOfDirectoriesForModelGen=Contoh sintaks: <br> c: \\ mydir <br> / home / mydir<br>DOL_DATA_ROOT / ecm / ecmdir +ExampleOfDirectoriesForModelGen=Contoh sintaks: <br> c: \\myapp\\mydocumentdir\\mysubdir <br> /home/myapp/mydocumentdir/mysubdir <br> DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed= <br> Untuk mengetahui cara membuat tempt dokumen ODT Anda, sebelum menyimpannya di direktori tersebut, baca dokumentasi wiki: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Posisi Nama/Nama Belakang @@ -391,12 +393,12 @@ ModuleMustBeEnabledFirst=Modul<b>%s</b>harus diaktifkan terlebih dahulu jika And SecurityToken=Kunci untuk mengamankan URL NoSmsEngine=Tidak ada manajer pengirim SMS yang tersedia. Manajer pengirim SMS tidak diinstal dengan distribusi default karena tergantung pada vendor eksternal, tetapi Anda dapat menemukannya di %s PDF=PDF -PDFDesc=Global options for PDF generation -PDFAddressForging=Rules for address section +PDFDesc=Pilihan / opsi global untuk pembuatan PDF +PDFAddressForging=Aturan untuk bagian dari alamat HideAnyVATInformationOnPDF=Sembunyikan semua informasi yang terkait dengan Pajak Penjualan / PPN PDFRulesForSalesTax=Aturan untuk Pajak Penjualan / PPN PDFLocaltax=Aturan untuk %s -HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT +HideLocalTaxOnPDF=Sembunyikan tarif %s pada kolom Pajak Penjualan / PPN HideDescOnPDF=Sembunyikan deskripsi produk HideRefOnPDF=Sembunyikan produk ref. HideDetailsOnPDF=Sembunyikan detail lini produk @@ -406,16 +408,16 @@ UrlGenerationParameters=Parameter untuk mengamankan URL SecurityTokenIsUnique=Gunakan parameter keamanan unik untuk setiap URL EnterRefToBuildUrl=Masukkan referensi untuk objek %s GetSecuredUrl=Dapatkan URL yang dihitung -ButtonHideUnauthorized=Sembunyikan tombol untuk pengguna non-admin untuk tindakan yang tidak sah alih-alih menunjukkan tombol yang dinonaktifkan yang berwarna abu-abu +ButtonHideUnauthorized=Sembunyikan juga tombol tindakan tidak sah untuk pengguna internal (jika tidak berwarna abu-abu) OldVATRates=Suku VAT lama NewVATRates=Suku VAT baru PriceBaseTypeToChange=Ubah harga dengan nilai referensi dasar ditentukan pada MassConvert=Luncurkan konversi massal PriceFormatInCurrentLanguage=Format Harga Dalam Bahasa Saat Ini String=Tali -String1Line=String (1 line) +String1Line=String (1 baris) TextLong=Teks panjang -TextLongNLines=Long text (n lines) +TextLongNLines=Teks panjang (n baris) HtmlText=Teks html Int=Bilangan bulat Float=Mengapung @@ -442,9 +444,9 @@ 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=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 +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 -ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath +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 LocalTaxDesc=Beberapa negara dapat menerapkan dua atau tiga pajak pada setiap baris faktur. Jika demikian, pilih jenis untuk pajak kedua dan ketiga beserta tarifnya. Jenis yang mungkin adalah: <br> 1: pajak daerah berlaku untuk produk dan layanan tanpa PPN (pajak lokal dihitung berdasarkan jumlah tanpa pajak) <br> 2: pajak daerah berlaku untuk produk dan layanan termasuk PPN (pajak lokal dihitung berdasarkan jumlah + pajak utama) a0342fccfda19bz 3: pajak lokal berlaku untuk produk tanpa pajak (pajak lokal dihitung berdasarkan jumlah tanpa pajak) <br> 4: pajak lokal berlaku untuk produk termasuk pajak (pajak lokal dihitung atas jumlah + pajak utama) <br> 5: pajak lokal berlaku untuk layanan tanpa pajak (pajak lokal dihitung pada jumlah tanpa pajak) <br> 6: pajak lokal berlaku untuk layanan termasuk PPN (pajak lokal dihitung atas jumlah + pajak) @@ -482,13 +484,13 @@ ModuleCompanyCodeCustomerDigitaria=%s diikuti oleh nama pelanggan terpotong deng ModuleCompanyCodeSupplierDigitaria=%s diikuti oleh nama pemasok terpotong dengan jumlah karakter: %s untuk kode akuntansi pemasok. Use3StepsApproval=Secara default, Pesanan Pembelian harus dibuat dan disetujui oleh 2 pengguna yang berbeda (satu langkah / pengguna untuk membuat dan satu langkah / pengguna untuk menyetujui. Perhatikan bahwa jika pengguna memiliki izin untuk membuat dan menyetujui, satu langkah / pengguna akan cukup) . Anda dapat bertanya dengan opsi ini untuk memperkenalkan langkah ketiga / persetujuan pengguna, jika jumlahnya lebih tinggi dari nilai yang ditentukan (jadi 3 langkah diperlukan: 1 = validasi, 2 = persetujuan pertama dan 3 = persetujuan kedua jika jumlahnya cukup). <br> Set ini menjadi kosong jika satu persetujuan (2 langkah) sudah cukup, setel ke nilai yang sangat rendah (0,1) jika persetujuan kedua (3 langkah) selalu diperlukan. UseDoubleApproval=Gunakan persetujuan 3 langkah saat jumlah (tanpa pajak) lebih tinggi dari ... -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. +WarningPHPMail=PERINGATAN: Pengaturan untuk mengirim email dari aplikasi menggunakan pengaturan umum default. Seringkali lebih baik mengatur email keluar untuk menggunakan server email Penyedia Layanan Email Anda daripada pengaturan default karena beberapa alasan: +WarningPHPMailA=- Menggunakan server Penyedia Layanan Email meningkatkan kepercayaan email Anda, sehingga meningkatkan pengiriman tanpa ditandai sebagai SPAM +WarningPHPMailB=- Beberapa Penyedia Layanan Email (seperti Yahoo) tidak mengizinkan Anda mengirim email dari server lain selain dari server mereka sendiri. Pengaturan Anda saat ini menggunakan server aplikasi untuk mengirim email dan bukan server penyedia email Anda, jadi beberapa penerima (yang kompatibel dengan protokol DMARC terbatas), akan menanyakan penyedia email Anda apakah mereka dapat menerima email Anda dan beberapa penyedia email (seperti Yahoo) mungkin menjawab "tidak" karena server tersebut bukan milik mereka, jadi beberapa Email yang Anda kirim mungkin tidak dapat diterima untuk pengiriman (hati-hati juga dengan kuota pengiriman penyedia email Anda). +WarningPHPMailC=- Menggunakan server SMTP milik Penyedia Layanan Email Anda sendiri untuk mengirim email juga menarik sehingga semua email yang dikirim dari aplikasi juga akan disimpan ke direktori "Terkirim" di kotak surat Anda. +WarningPHPMailD=Jika metode 'PHP Mail' benar-benar metode yang ingin Anda gunakan, Anda dapat menghapus peringatan ini dengan menambahkan MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP konstan ke 1 di Home - Setup - Other. WarningPHPMail2=Jika penyedia SMTP email Anda perlu membatasi klien email ke beberapa alamat IP (sangat jarang), ini adalah alamat IP dari agen pengguna email (MUA) untuk aplikasi ERP CRM Anda:<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>. +WarningPHPMailSPF=Jika nama domain di alamat email pengirim Anda dilindungi oleh data SPF (tanya pendaftar nama domain), Anda harus menambahkan IP berikut di data SPF DNS domain Anda: <strong> %s </strong>. ClickToShowDescription=Klik untuk menampilkan deskripsi DependsOn=Modul ini membutuhkan modul RequiredBy=Modul ini diperlukan oleh modul @@ -554,9 +556,9 @@ Module54Desc=Manajemen kontrak (layanan atau langganan berulang) Module55Name=Barcode Module55Desc=Manajemen barcode Module56Name=Pembayaran dengan transfer kredit -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. +Module56Desc=Manajemen pembayaran pemasok dengan pesanan Transfer Kredit. Ini termasuk pembuatan file SEPA untuk negara-negara Eropa. +Module57Name=Pembayaran dengan Debit Langsung +Module57Desc=Pengelolaan pesanan Debit Langsung. Ini termasuk pembuatan file SEPA untuk negara-negara Eropa. Module58Name=ClickToDial Module58Desc=Integrasi sistem ClickToDial (Asterisk, ...) Module60Name=Stiker @@ -662,13 +664,13 @@ Module50200Desc=Menawarkan pelanggan halaman pembayaran online PayPal (akun PayP Module50300Name=Garis Module50300Desc=Menawarkan pelanggan halaman pembayaran online Stripe (kartu kredit / debit). Ini dapat digunakan untuk memungkinkan pelanggan Anda melakukan pembayaran ad-hoc atau pembayaran yang terkait dengan objek Dolibarr tertentu (faktur, pesanan, dll ...) Module50400Name=Akuntansi (entri ganda) -Module50400Desc=Accounting management (double entries, support General and Subsidiary Ledgers). Export the ledger in several other accounting software formats. +Module50400Desc=Manajemen akuntansi (entri ganda, mendukung Buku Besar Umum dan Pembantu). Ekspor buku besar dalam beberapa format perangkat lunak akuntansi lainnya. Module54000Name=PrintIPP Module54000Desc=Cetak langsung (tanpa membuka dokumen) menggunakan antarmuka Cups IPP (Printer harus terlihat dari server, dan CUPS harus diinstal pada server). Module55000Name=Polling, Survei atau Vote Module55000Desc=Buat jajak pendapat, survei, atau suara online (seperti Doodle, Studs, RDVz dll ...) Module59000Name=Margin -Module59000Desc=Modul untuk mengelola margin +Module59000Desc=Modul untuk mengikuti margin Module60000Name=Komisi Module60000Desc=Modul untuk mengelola komisi Module62000Name=Istilah Ekonomi Internasional @@ -677,7 +679,7 @@ Module63000Name=Sumber daya Module63000Desc=Kelola sumber daya (printer, mobil, kamar, ...) untuk dialokasikan ke agenda Permission11=Membaca Nota Pelanggan Permission12=Membuat/Merubah Nota Pelanggan -Permission13=Invalidate customer invoices +Permission13=Faktur pelanggan tidak valid Permission14=Validasi Nota Pelanggan Permission15=Mengirim Nota Pelanggan Menggunakan EMail Permission16=Mencatat Pembayaran Untuk Nota Pelanggan @@ -694,7 +696,7 @@ Permission32=Membuat/Merubah produk Permission34=Menghapus Produk Permission36=Lihat / kelola produk tersembunyi Permission38=Produk ekspor -Permission39=Ignore minimum price +Permission39=Abaikan harga minimum Permission41=Baca proyek dan tugas (proyek bersama dan proyek yang saya hubungi). Dapat juga memasukkan waktu yang dikonsumsi, untuk saya atau hierarki saya, pada tugas yang diberikan (absen) Permission42=Buat / modifikasi proyek (proyek bersama dan proyek yang saya hubungi). Dapat juga membuat tugas dan menetapkan pengguna untuk proyek dan tugas Permission44=Hapus proyek (proyek bersama dan proyek yang saya hubungi) @@ -703,9 +705,9 @@ Permission61=Baca intervensi Permission62=Buat / modifikasi intervensi Permission64=Hapus intervensi Permission67=Intervensi ekspor -Permission68=Send interventions by email -Permission69=Validate interventions -Permission70=Invalidate interventions +Permission68=Kirim intervensi melalui email +Permission69=Validasi intervensi +Permission70=Intervensi tidak valid Permission71=Membaca Data Anggota Permission72=Membuat/Merubah Data Anggota Permission74=Menghapus Data Anggota @@ -728,7 +730,7 @@ Permission95=Membaca Laporan Permission101=Baca kiriman Permission102=Buat / ubah pengiriman Permission104=Validasi pengiriman -Permission105=Send sendings by email +Permission105=Kirim kiriman melalui email Permission106=Pengiriman ekspor Permission109=Hapus pengiriman Permission111=Baca akun keuangan @@ -836,11 +838,11 @@ Permission402=Buat / ubah diskon Permission403=Validasi diskon Permission404=Hapus diskon Permission430=Gunakan Debug Bar -Permission511=Read payments of salaries (yours and subordinates) +Permission511=Baca pembayaran gaji (milik Anda dan bawahan) Permission512=Buat / ubah pembayaran gaji Permission514=Hapus pembayaran gaji -Permission517=Read payments of salaries of everybody -Permission519=Export salaries +Permission517=Baca pembayaran gaji semua orang +Permission519=Gaji ekspor Permission520=Baca Pinjaman Permission522=Buat / modifikasi pinjaman Permission524=Hapus pinjaman @@ -851,19 +853,19 @@ Permission532=Membuat/Merubah Jasa Permission534=Menghapus Jasa Permission536=Lihat / kelola layanan tersembunyi Permission538=Layanan ekspor -Permission561=Read payment orders by credit transfer -Permission562=Create/modify payment order by credit transfer -Permission563=Send/Transmit payment order by credit transfer -Permission564=Record Debits/Rejections of credit transfer -Permission601=Read stickers -Permission602=Create/modify stickers -Permission609=Delete stickers +Permission561=Baca perintah pembayaran melalui transfer kredit +Permission562=Buat / ubah perintah pembayaran melalui transfer kredit +Permission563=Mengirim / Mengirimkan perintah pembayaran melalui transfer kredit +Permission564=Catat Debit / Penolakan transfer kredit +Permission601=Baca stiker +Permission602=Buat / modifikasi stiker +Permission609=Hapus stiker Permission650=Baca Bills of Material Permission651=Buat / Perbarui Bills of Material Permission652=Hapus Bills of Material -Permission660=Read Manufacturing Order (MO) -Permission661=Create/Update Manufacturing Order (MO) -Permission662=Delete Manufacturing Order (MO) +Permission660=Baca Pesanan Pabrikan (MO) +Permission661=Buat / Perbarui Pesanan Pabrikan (MO) +Permission662=Hapus Pesanan Pabrikan (MO) Permission701=Membaca Sumbangan Permission702=Membuat/Merubah Sumbangan Permission703=Menghapus Sumbangan @@ -873,8 +875,8 @@ Permission773=Hapus laporan pengeluaran Permission774=Baca semua laporan pengeluaran (bahkan untuk pengguna bukan bawahan) Permission775=Menyetujui laporan pengeluaran Permission776=Membayar laporan pengeluaran -Permission777=Read expense reports of everybody -Permission778=Create/modify expense reports of everybody +Permission777=Baca laporan pengeluaran semua orang +Permission778=Buat / ubah laporan pengeluaran semua orang Permission779=Laporan pengeluaran ekspor Permission1001=Membaca Stok Permission1002=Membuat/Merubah Gudang @@ -899,9 +901,9 @@ Permission1185=Setujui pesanan pembelian Permission1186=Memesan pesanan pembelian Permission1187=Mengakui tanda terima pesanan pembelian Permission1188=Hapus pesanan pembelian -Permission1189=Check/Uncheck a purchase order reception +Permission1189=Centang / Hapus centang pada penerimaan pesanan pembelian Permission1190=Menyetujui (persetujuan kedua) pesanan pembelian -Permission1191=Export supplier orders and their attributes +Permission1191=Ekspor pesanan pemasok dan atributnya Permission1201=Dapatkan hasil ekspor Permission1202=Buat / Ubah ekspor Permission1231=Baca faktur vendor @@ -915,8 +917,8 @@ Permission1251=Menjalankan impor massal data eksternal ke dalam basis data (memu Permission1321=Ekspor faktur, atribut, dan pembayaran pelanggan Permission1322=Buka kembali tagihan yang dibayar Permission1421=Ekspor pesanan dan atribut penjualan -Permission1521=Read documents -Permission1522=Delete documents +Permission1521=Baca dokumen +Permission1522=Hapus dokumen Permission2401=Baca tindakan (agenda atau tugas) yang ditautkan dengan akun penggunanya (jika pemilik agenda atau baru saja ditugaskan) Permission2402=Buat / modifikasi tindakan (agenda atau tugas) yang ditautkan ke akun penggunanya (jika pemilik agenda) Permission2403=Hapus tindakan (agenda atau tugas) yang ditautkan ke akun penggunanya (jika pemilik agenda) @@ -931,7 +933,7 @@ Permission2515=Siapkan direktori dokumen Permission2801=Gunakan klien FTP dalam mode baca (hanya menjelajah dan mengunduh) Permission2802=Gunakan klien FTP dalam mode tulis (hapus atau unggah file) Permission3200=Baca agenda yang diarsipkan dan sidik jari -Permission3301=Generate new modules +Permission3301=Hasilkan modul baru Permission4001=Lihat karyawan Permission4002=Buat karyawan Permission4003=Hapus karyawan @@ -951,13 +953,13 @@ Permission23001=Baca pekerjaan terjadwal Permission23002=Buat / perbarui pekerjaan yang Dijadwalkan Permission23003=Hapus pekerjaan terjadwal Permission23004=Jalankan pekerjaan yang Dijadwalkan -Permission50101=Use Point of Sale (SimplePOS) -Permission50151=Use Point of Sale (TakePOS) +Permission50101=Gunakan Point of Sale (SimplePOS) +Permission50151=Gunakan Point of Sale (TakePOS) Permission50201=Membaca Data Transaksi Permission50202=Transaksi impor -Permission50330=Read objects of Zapier -Permission50331=Create/Update objects of Zapier -Permission50332=Delete objects of Zapier +Permission50330=Membaca objek Zapier +Permission50331=Buat / Perbarui objek Zapier +Permission50332=Hapus objek Zapier Permission50401=Ikat produk dan faktur dengan akun akuntansi Permission50411=Baca operasi dalam buku besar Permission50412=Tulis / Edit operasi dalam buku besar @@ -981,21 +983,21 @@ Permission63001=Baca sumber daya Permission63002=Buat / modifikasi sumber daya Permission63003=Hapus sumber daya Permission63004=Tautkan sumber daya ke agenda agenda -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 +Permission64001=Izinkan pencetakan langsung +Permission67000=Izinkan pencetakan tanda terima +Permission68001=Baca laporan intracomm +Permission68002=Membuat / mengubah laporan intracomm +Permission68004=Hapus laporan intracomm +Permission941601=Tanda terima telah dibaca +Permission941602=Membuat dan mengubah tanda terima +Permission941603=Validasi tanda terima +Permission941604=Kirim tanda terima melalui email +Permission941605=Ekspor tanda terima +Permission941606=Hapus tanda terima DictionaryCompanyType=Jenis pihak ketiga DictionaryCompanyJuridicalType=Badan hukum pihak ketiga -DictionaryProspectLevel=Prospect potential level for companies -DictionaryProspectContactLevel=Prospect potential level for contacts +DictionaryProspectLevel=Tingkat prospek potensial bagi perusahaan +DictionaryProspectContactLevel=Tingkatkan prospek potensial untuk kontak DictionaryCanton=Negara Bagian / Provinsi DictionaryRegion=Daerah DictionaryCountry=Negara @@ -1025,14 +1027,14 @@ DictionaryEMailTemplates=Template Email DictionaryUnits=Unit DictionaryMeasuringUnits=Unit Pengukur DictionarySocialNetworks=Jaringan sosial -DictionaryProspectStatus=Prospect status for companies -DictionaryProspectContactStatus=Prospect status for contacts +DictionaryProspectStatus=Status prospek untuk perusahaan +DictionaryProspectContactStatus=Status prospek untuk kontak DictionaryHolidayTypes=Jenis cuti DictionaryOpportunityStatus=Status memimpin untuk proyek / prospek DictionaryExpenseTaxCat=Laporan biaya - Kategori transportasi DictionaryExpenseTaxRange=Laporan biaya - Kisaran berdasarkan kategori transportasi -DictionaryTransportMode=Intracomm report - Transport mode -TypeOfUnit=Type of unit +DictionaryTransportMode=Laporan Intracomm - Mode transportasi +TypeOfUnit=Jenis unit SetupSaved=Pengaturan disimpan SetupNotSaved=Pengaturan tidak disimpan BackToModuleList=Kembali ke daftar Modul @@ -1083,7 +1085,7 @@ LabelUsedByDefault=Label digunakan secara default jika tidak ada terjemahan yang LabelOnDocuments=Beri label pada dokumen LabelOrTranslationKey=Label atau kunci terjemahan ValueOfConstantKey=Nilai konstanta konfigurasi -ConstantIsOn=Option %s is on +ConstantIsOn=Opsi %s aktif NbOfDays=Jumlah hari AtEndOfMonth=diakhir bulan CurrentNext=Sekarang / selanjutnya @@ -1128,7 +1130,7 @@ LoginPage=Halaman masuk BackgroundImageLogin=Gambar latar belakang PermanentLeftSearchForm=Formulir pencarian permanen di menu sebelah kiri DefaultLanguage=Bahasa default -EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships +EnableMultilangInterface=Aktifkan dukungan multibahasa untuk hubungan pelanggan atau vendor EnableShowLogo=Tampilkan logo perusahaan di menu CompanyInfo=Perusahaan/Organisasi CompanyIds=Identitas Perusahaan / Organisasi @@ -1182,7 +1184,7 @@ InfoWebServer=Tentang Server Web InfoDatabase=Tentang Basis Data InfoPHP=Tentang PHP InfoPerf=Tentang Pertunjukan -InfoSecurity=About Security +InfoSecurity=Tentang Keamanan BrowserName=Nama peramban BrowserOS=OS peramban ListOfSecurityEvents=Daftar agenda keamanan Dolibarr @@ -1233,7 +1235,7 @@ RestoreDesc2=Kembalikan file cadangan (misalnya file zip) dari direktori "dokume RestoreDesc3=Kembalikan struktur database dan data dari file dump cadangan ke dalam database instalasi Dolibarr baru atau ke dalam database instalasi saat ini (<b> %s </b>). Peringatan, setelah pemulihan selesai, Anda harus menggunakan login / kata sandi, yang ada dari waktu cadangan / instalasi untuk terhubung lagi. <br> Untuk mengembalikan database cadangan ke dalam instalasi saat ini, Anda dapat mengikuti asisten ini. RestoreMySQL=Impor MySQL ForcedToByAModule=Aturan ini dipaksa untuk<b>%s</b>oleh modul yang diaktifkan -ValueIsForcedBySystem=This value is forced by the system. You can't change it. +ValueIsForcedBySystem=Nilai ini dipaksakan oleh sistem. Anda tidak bisa mengubahnya. PreviousDumpFiles=File cadangan yang ada PreviousArchiveFiles=File arsip yang ada WeekStartOnDay=Hari pertama dalam seminggu @@ -1294,8 +1296,8 @@ WarningAtLeastKeyOrTranslationRequired=Kriteria pencarian diperlukan setidaknya NewTranslationStringToShow=String terjemahan baru untuk ditampilkan OriginalValueWas=Terjemahan aslinya ditimpa. Nilai asli adalah: <br> <br> %s TransKeyWithoutOriginalValue=Anda memaksa terjemahan baru untuk kunci terjemahan '<strong> %s </strong>' yang tidak ada dalam file bahasa apa pun -TitleNumberOfActivatedModules=Activated modules -TotalNumberOfActivatedModules=Activated modules: <b>%s</b> / <b>%s</b> +TitleNumberOfActivatedModules=Modul yang diaktifkan +TotalNumberOfActivatedModules=Modul yang diaktifkan: <b> %s </b> / <b> %s </b> YouMustEnableOneModule=Anda setidaknya harus mengaktifkan 1 modul ClassNotFoundIntoPathWarning=Kelas %s tidak ditemukan di jalur PHP YesInSummer=Ya di musim panas @@ -1306,7 +1308,7 @@ YouUseBestDriver=Anda menggunakan driver %s yang merupakan driver terbaik yang s YouDoNotUseBestDriver=Anda menggunakan driver %s tetapi driver %s disarankan. NbOfObjectIsLowerThanNoPb=Anda hanya memiliki %s %s dalam database. Ini tidak memerlukan optimasi tertentu. SearchOptim=Optimasi pencarian -YouHaveXObjectUseSearchOptim=Anda memiliki %s %s dalam database. Anda harus menambahkan konstanta %s ke 1 di Home-Setup-Other. Batasi pencarian hingga awal string yang memungkinkan database menggunakan indeks dan Anda harus segera mendapat respons. +YouHaveXObjectUseSearchOptim=Anda memiliki %s %s di database. Anda dapat menambahkan konstanta %s ke 1 di Home-Setup-Other. Batasi pencarian hingga awal string yang memungkinkan database menggunakan indeks dan Anda akan mendapatkan respons segera. YouHaveXObjectAndSearchOptimOn=Anda memiliki %s %s di database dan konstanta %s diatur ke 1 di Home-Setup-Other. BrowserIsOK=Anda menggunakan browser web %s. Browser ini ok untuk keamanan dan kinerja. BrowserIsKO=Anda menggunakan browser web %s. Browser ini dikenal sebagai pilihan yang buruk untuk keamanan, kinerja, dan keandalan. Kami merekomendasikan menggunakan Firefox, Chrome, Opera atau Safari. @@ -1314,7 +1316,7 @@ PHPModuleLoaded=Komponen PHP %s dimuat PreloadOPCode=OPCode preloaded digunakan AddRefInList=Tampilkan Pelanggan / Vendor ref. daftar info (daftar pilih atau kotak kombo) dan sebagian besar hyperlink. <br> Pihak Ketiga akan muncul dengan format nama "CC12345 - SC45678 - The Big Company corp." alih-alih "Perusahaan Besar Perusahaan". AddAdressInList=Tampilkan daftar info alamat Pelanggan / Vendor (daftar pilih atau kotak kombo) <br> Pihak Ketiga akan muncul dengan format nama "Korporasi Perusahaan Besar - 21 lompat jalan 123456 Kota besar - AS" alih-alih "Korps Perusahaan Besar". -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=Tampilan Kontak email (atau telepon jika tidak ditentukan) dan daftar info kota (pilih daftar atau kotak kombo) <br> Kontak akan muncul dengan format nama "Dupond Durand - dupond.durand@email.com - Paris" atau "Dupond Durand - 06 07 59 65 66 - Paris "bukan" Dupond Durand ". AskForPreferredShippingMethod=Mintalah metode pengiriman pilihan untuk Pihak Ketiga. FieldEdition=Edisi baris %s FillThisOnlyIfRequired=Contoh: +2 (isi hanya jika masalah offset zona waktu dialami) @@ -1322,7 +1324,7 @@ GetBarCode=Dapatkan barcode NumberingModules=Model penomoran DocumentModules=Model dokumen ##### Module password generation -PasswordGenerationStandard=Return a password generated according to internal Dolibarr algorithm: %s characters containing shared numbers and characters in lowercase. +PasswordGenerationStandard=Kembalikan kata sandi yang dibuat sesuai dengan algoritma Dolibarr internal: karakter %s yang berisi angka dan karakter bersama dalam huruf kecil. PasswordGenerationNone=Jangan menyarankan kata sandi yang dihasilkan. Kata sandi harus diketik secara manual. PasswordGenerationPerso=Kembalikan kata sandi sesuai dengan konfigurasi yang Anda tentukan secara pribadi. SetupPerso=Menurut konfigurasi Anda @@ -1421,7 +1423,7 @@ AdherentMailRequired=Diperlukan email untuk membuat anggota baru MemberSendInformationByMailByDefault=Kotak centang untuk mengirim konfirmasi email kepada anggota (validasi atau berlangganan baru) diaktifkan secara default VisitorCanChooseItsPaymentMode=Pengunjung dapat memilih dari mode pembayaran yang tersedia MEMBER_REMINDER_EMAIL=Aktifkan pengingat otomatis<b>melalui email</b>dari langganan yang kedaluwarsa. Catatan: Modul<strong>%s </strong> harus diaktifkan dan diatur dengan benar untuk mengirim pengingat. -MembersDocModules=Document templates for documents generated from member record +MembersDocModules=Templat dokumen untuk dokumen yang dihasilkan dari catatan anggota ##### LDAP setup ##### LDAPSetup=Pengaturan LDAP LDAPGlobalParameters=Parameter Global @@ -1564,9 +1566,9 @@ LDAPDescValues=Nilai contoh dirancang untuk<b>OpenLDAP</b>dengan skema dimuat be ForANonAnonymousAccess=Untuk akses yang diautentikasi (misalnya untuk akses tulis) PerfDolibarr=Pengaturan kinerja / laporan optimalisasi YouMayFindPerfAdviceHere=Halaman ini menyediakan beberapa pemeriksaan atau saran yang berkaitan dengan kinerja. -NotInstalled=Not installed. -NotSlowedDownByThis=Not slowed down by this. -NotRiskOfLeakWithThis=Not risk of leak with this. +NotInstalled=Tidak terpasang. +NotSlowedDownByThis=Tidak diperlambat oleh ini. +NotRiskOfLeakWithThis=Tidak ada resiko bocor dengan ini. ApplicativeCache=Cache yang berlaku MemcachedNotAvailable=Tidak ditemukan cache aplikatif. Anda dapat meningkatkan kinerja dengan menginstal server cache Memcached dan modul dapat menggunakan server cache ini. <br> Informasi lebih lanjut di sini <a href="http://wiki.dolibarr.org/index.php/Module_MemCached_EN"> http://wiki.dolibarr.org/index.php/Module_MemCached_EN </a>. <br> Perhatikan bahwa banyak penyedia hosting web tidak menyediakan server cache seperti itu. MemcachedModuleAvailableButNotSetup=Modul memcached untuk cache aplikatif ditemukan tetapi pengaturan modul tidak lengkap. @@ -1596,8 +1598,13 @@ ServiceSetup=Pengaturan modul layanan ProductServiceSetup=Pengaturan modul Produk dan Layanan NumberOfProductShowInSelect=Jumlah maksimum produk yang ditampilkan dalam daftar pilihan kombo (0 = tanpa batas) ViewProductDescInFormAbility=Tampilkan deskripsi produk dalam bentuk (jika tidak ditampilkan dalam popup tooltip) +DoNotAddProductDescAtAddLines=Jangan tambahkan deskripsi produk (dari kartu produk) saat mengirimkan tambahkan baris pada formulir +OnProductSelectAddProductDesc=Cara menggunakan deskripsi produk saat menambahkan produk sebagai baris dokumen +AutoFillFormFieldBeforeSubmit=Isi kolom input deskripsi secara otomatis dengan deskripsi produk +DoNotAutofillButAutoConcat=Jangan isi otomatis kolom input dengan deskripsi produk. Deskripsi produk akan digabungkan dengan deskripsi yang dimasukkan secara otomatis. +DoNotUseDescriptionOfProdut=Deskripsi produk tidak akan pernah dimasukkan ke dalam deskripsi baris dokumen MergePropalProductCard=Aktifkan di produk / layanan File Terlampir tab pilihan untuk menggabungkan dokumen PDF produk ke proposal PDF azur jika produk / layanan ada di proposal -ViewProductDescInThirdpartyLanguageAbility=Tampilkan deskripsi produk dalam bahasa pihak ketiga +ViewProductDescInThirdpartyLanguageAbility=Menampilkan deskripsi produk dalam bentuk dalam bahasa pihak ketiga (sebaliknya dalam bahasa pengguna) UseSearchToSelectProductTooltip=Juga jika Anda memiliki sejumlah besar produk (> 100.000), Anda dapat meningkatkan kecepatan dengan menetapkan konstan PRODUCT_DONOTSEARCH_ANYWHERE ke 1 di Pengaturan-> Lainnya. Pencarian kemudian akan dibatasi untuk memulai string. UseSearchToSelectProduct=Tunggu hingga Anda menekan tombol sebelum memuat konten dari daftar kombo produk (Ini dapat meningkatkan kinerja jika Anda memiliki sejumlah besar produk, tetapi itu kurang nyaman) SetDefaultBarcodeTypeProducts=Jenis barcode default untuk digunakan untuk produk @@ -1614,9 +1621,9 @@ SyslogLevel=Tingkat SyslogFilename=Nama file dan jalur YouCanUseDOL_DATA_ROOT=Anda dapat menggunakan DOL_DATA_ROOT / dolibarr.log untuk file log di direktori "dokumen" Dolibarr. Anda dapat mengatur jalur lain untuk menyimpan file ini. ErrorUnknownSyslogConstant=Constant %s bukan konstanta Syslog yang dikenal -OnlyWindowsLOG_USER=On Windows, only the LOG_USER facility will be supported +OnlyWindowsLOG_USER=Di Windows, hanya fasilitas LOG_USER yang akan didukung CompressSyslogs=Kompresi dan cadangan file log debug (dihasilkan oleh modul Log untuk debug) -SyslogFileNumberOfSaves=Number of backup logs to keep +SyslogFileNumberOfSaves=Jumlah log cadangan yang harus disimpan ConfigureCleaningCronjobToSetFrequencyOfSaves=Konfigurasikan pekerjaan terjadwal untuk mengatur frekuensi cadangan log ##### Donations ##### DonationsSetup=Pengaturan modul donasi @@ -1672,7 +1679,7 @@ AdvancedEditor=Editor tingkat lanjut ActivateFCKeditor=Aktifkan editor lanjutan untuk: FCKeditorForCompany=WYSIWIG pembuatan / edisi deskripsi elemen dan catatan (kecuali produk / layanan) FCKeditorForProduct=WYSIWIG pembuatan / edisi deskripsi produk dan layanan / catatan -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=Pembuatan / edisi WYSIWIG baris detail produk untuk semua entitas (proposal, pesanan, faktur, dll ...). <span class="warning"> Peringatan: Menggunakan opsi ini untuk kasus ini sangat tidak disarankan karena dapat menimbulkan masalah dengan karakter khusus dan pemformatan halaman saat membuat file PDF. </span> FCKeditorForMailing= Pembuatan / edisi WYSIWIG untuk eMailing massal (Alat-> eMailing) FCKeditorForUserSignature=WYSIWIG pembuatan / edisi tanda tangan pengguna FCKeditorForMail=Pembuatan / edisi WYSIWIG untuk semua email (kecuali Tools-> eMailing) @@ -1682,14 +1689,14 @@ StockSetup=Pengaturan modul stok IfYouUsePointOfSaleCheckModule=Jika Anda menggunakan modul Point of Sale (POS) yang disediakan secara default atau modul eksternal, pengaturan ini mungkin diabaikan oleh modul POS Anda. Sebagian besar modul POS dirancang secara default untuk membuat faktur segera dan mengurangi stok terlepas dari opsi di sini. Jadi jika Anda perlu atau tidak memiliki penurunan stok saat mendaftarkan penjualan dari POS Anda, periksa juga pengaturan modul POS Anda. ##### Menu ##### MenuDeleted=Menu dihapus -Menu=Menu +Menu=Tidak bisa Menus=Menu TreeMenuPersonalized=Menu yang dipersonalisasi NotTopTreeMenuPersonalized=Menu yang dipersonalisasi tidak ditautkan ke entri menu teratas NewMenu=Menu baru MenuHandler=Penangan menu MenuModule=Modul sumber -HideUnauthorizedMenu= Sembunyikan menu yang tidak sah (abu-abu) +HideUnauthorizedMenu=Sembunyikan juga menu yang tidak sah untuk pengguna internal (berwarna abu-abu jika tidak) DetailId=Menu id DetailMenuHandler=Penangan menu tempat menampilkan menu baru DetailMenuModule=Nama modul jika entri menu berasal dari modul @@ -1737,16 +1744,16 @@ AGENDA_USE_EVENT_TYPE=Gunakan jenis agenda (dikelola dalam Pengaturan menu -> Ka AGENDA_USE_EVENT_TYPE_DEFAULT=Secara otomatis mengatur nilai default ini untuk jenis agenda di agenda buat formulir AGENDA_DEFAULT_FILTER_TYPE=Secara otomatis mengatur jenis agenda ini di filter pencarian tampilan agenda AGENDA_DEFAULT_FILTER_STATUS=Secara otomatis mengatur status ini untuk agenda di filter pencarian tampilan agenda -AGENDA_DEFAULT_VIEW=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_DEFAULT_VIEW=Tampilan mana yang ingin Anda buka secara default saat memilih menu Agenda +AGENDA_REMINDER_BROWSER=Aktifkan pengingat acara <b> pada browser pengguna </b> (Ketika tanggal pengingat tercapai, popup ditampilkan oleh browser. Setiap pengguna dapat menonaktifkan pemberitahuan tersebut dari pengaturan pemberitahuan browser). AGENDA_REMINDER_BROWSER_SOUND=Aktifkan pemberitahuan suara -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=Aktifkan pengingat acara <b> melalui email </b> (opsi pengingat / penundaan dapat ditentukan pada setiap acara). +AGENDA_REMINDER_EMAIL_NOTE=Catatan: Frekuensi tugas %s harus cukup untuk memastikan bahwa pengingat dikirim pada saat yang tepat. AGENDA_SHOW_LINKED_OBJECT=Tampilkan objek yang ditautkan ke tampilan agenda ##### Clicktodial ##### ClickToDialSetup=Klik Untuk Memanggil pengaturan modul ClickToDialUrlDesc=Url dipanggil ketika klik pada telepon picto dilakukan. Di URL, Anda dapat menggunakan tag <br><b>__PHONETO__</b>yang akan diganti dengan nomor telepon orang untuk memanggil <br><b>__PHONEFROM__</b>yang akan diganti dengan nomor telepon memanggil orang (Anda) <br><b>__LOGIN__</b>yang akan diganti dengan clicktodial login (didefinisikan pada kartu pengguna) <br><b>__PASS__</b>yang akan diganti dengan password clicktodial (didefinisikan pada kartu pengguna). -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. +ClickToDialDesc=Modul ini mengubah nomor telepon, saat menggunakan komputer desktop, menjadi tautan yang dapat diklik. Satu klik akan memanggil nomor tersebut. Ini dapat digunakan untuk memulai panggilan telepon saat menggunakan telepon lunak di desktop Anda atau saat menggunakan sistem CTI berdasarkan protokol SIP misalnya. Catatan: Saat menggunakan ponsel cerdas, nomor telepon selalu dapat diklik. ClickToDialUseTelLink=Gunakan hanya tautan "tel:" pada nomor telepon ClickToDialUseTelLinkDesc=Gunakan metode ini jika pengguna Anda memiliki softphone atau antarmuka perangkat lunak yang diinstal pada komputer yang sama dengan browser, dan dipanggil ketika Anda mengklik tautan di browser Anda yang dimulai dengan "tel:". Jika Anda memerlukan solusi server lengkap (tidak perlu instalasi perangkat lunak lokal), Anda harus mengatur ini ke "Tidak" dan isi kolom selanjutnya. ##### Point Of Sale (CashDesk) ##### @@ -1876,7 +1883,7 @@ EnterAnyCode=Baris ini berisi referensi untuk mengidentifikasi baris. Masukkan n Enter0or1=Masukkan 0 atau 1 UnicodeCurrency=Masukkan di sini di antara kurung kurawal, daftar nomor byte yang mewakili simbol mata uang. Misalnya: untuk $, masukkan [36] - untuk brazil real R $ [82,36] - untuk €, masukkan [8364] ColorFormat=Warna RGB dalam format HEX, mis .: FF0000 -PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) +PictoHelp=Nama ikon dalam format dolibarr ('image.png' jika masuk ke direktori tema saat ini, 'image.png@nom_du_module' jika masuk ke direktori / img / modul) PositionIntoComboList=Posisi baris ke dalam daftar kombo SellTaxRate=Tarif pajak penjualan RecuperableOnly=Ya untuk PPN "Tidak Ditanggapi tetapi Dapat Dipulihkan" yang didedikasikan untuk beberapa negara bagian di Prancis. Simpan nilai "Tidak" dalam semua kasus lainnya. @@ -1907,7 +1914,7 @@ MailToSendReception=Penerimaan MailToThirdparty=Pihak Ketiga MailToMember=Anggota MailToUser=Pengguna -MailToProject=Projects +MailToProject=Proyek MailToTicket=Tiket ByDefaultInList=Tampilkan secara default pada tampilan daftar YouUseLastStableVersion=Anda menggunakan versi stabil terbaru @@ -1917,7 +1924,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s tersedia. Versi %s ada ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s tersedia. Versi %s adalah versi pemeliharaan, jadi hanya berisi perbaikan bug. Kami menyarankan semua pengguna untuk meningkatkan ke versi ini. Rilis pemeliharaan tidak memperkenalkan fitur baru atau perubahan pada database. Anda dapat mengunduhnya dari area unduhan https://www.dolibarr.org portal (subdirektori versi Stabil). Anda dapat membaca <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog"> ChangeLog </a> untuk daftar lengkap perubahan. MultiPriceRuleDesc=Ketika opsi "Beberapa tingkat harga per produk / layanan" diaktifkan, Anda dapat menentukan harga yang berbeda (satu per tingkat harga) untuk setiap produk. Untuk menghemat waktu Anda, di sini Anda dapat memasukkan aturan untuk secara otomatis menghitung ulang harga untuk setiap level berdasarkan harga level pertama, jadi Anda hanya perlu memasukkan harga untuk level pertama untuk setiap produk. Halaman ini dirancang untuk menghemat waktu Anda tetapi hanya berguna jika harga Anda untuk setiap level relatif terhadap level pertama. Anda dapat mengabaikan halaman ini dalam banyak kasus. ModelModulesProduct=Template untuk dokumen produk -WarehouseModelModules=Templates for documents of warehouses +WarehouseModelModules=Template untuk dokumen gudang ToGenerateCodeDefineAutomaticRuleFirst=Agar dapat menghasilkan kode secara otomatis, Anda harus terlebih dahulu menetapkan manajer untuk secara otomatis menentukan nomor kode batang. SeeSubstitutionVars=Lihat * catatan untuk daftar kemungkinan variabel substitusi SeeChangeLog=Lihat file ChangeLog (hanya bahasa Inggris) @@ -1956,7 +1963,7 @@ MAIN_PDF_MARGIN_LEFT=Margin kiri pada PDF MAIN_PDF_MARGIN_RIGHT=Margin kanan pada PDF MAIN_PDF_MARGIN_TOP=Margin teratas pada PDF MAIN_PDF_MARGIN_BOTTOM=Margin bawah pada PDF -MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF +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') @@ -1983,11 +1990,12 @@ EMailHost=Host server IMAP email MailboxSourceDirectory=Direktori sumber kotak surat MailboxTargetDirectory=Direktori target kotak surat EmailcollectorOperations=Operasi yang harus dilakukan oleh kolektor +EmailcollectorOperationsDesc=Operasi dijalankan dari urutan atas ke bawah MaxEmailCollectPerCollect=Jumlah email maksimum yang dikumpulkan per kumpulkan CollectNow=Kumpulkan sekarang ConfirmCloneEmailCollector=Anda yakin ingin mengkloning kolektor Email %s? -DateLastCollectResult=Tanggal kumpulkan terbaru dicoba -DateLastcollectResultOk=Tanggal terbaru kumpulkan berhasill +DateLastCollectResult=Tanggal percobaan koleksi terbaru +DateLastcollectResultOk=Tanggal keberhasilan koleksi terbaru LastResult=Hasil terbaru EmailCollectorConfirmCollectTitle=Konfirmasi pengumpulan email EmailCollectorConfirmCollect=Apakah Anda ingin menjalankan koleksi untuk kolektor ini sekarang? @@ -1996,16 +2004,16 @@ NothingProcessed=Tidak ada yang dilakukan XEmailsDoneYActionsDone=email %s memenuhi syarat, email %s berhasil diproses (untuk catatan / tindakan %s dilakukan) RecordEvent=Rekam agenda email CreateLeadAndThirdParty=Buat timbal (dan pihak ketiga jika perlu) -CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) +CreateTicketAndThirdParty=Buat tiket (dan tautkan ke pihak ketiga jika dimuat oleh operasi sebelumnya) CodeLastResult=Kode hasil terbaru NbOfEmailsInInbox=Jumlah email dalam direktori sumber LoadThirdPartyFromName=Muat pihak ketiga yang mencari di %s (hanya memuat) LoadThirdPartyFromNameOrCreate=Muat pencarian pihak ketiga di %s (buat jika tidak ditemukan) -WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr -WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr -WithDolTrackingIDInMsgId=Message sent from Dolibarr -WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +WithDolTrackingID=Pesan dari percakapan yang dimulai oleh email pertama yang dikirim dari Dolibarr +WithoutDolTrackingID=Pesan dari percakapan yang dimulai dengan email pertama TIDAK dikirim dari Dolibarr +WithDolTrackingIDInMsgId=Pesan dikirim dari Dolibarr +WithoutDolTrackingIDInMsgId=Pesan TIDAK dikirim dari Dolibarr +CreateCandidature=Buat lamaran kerja FormatZip=Kode Pos MainMenuCode=Kode entri menu (mainmenu) ECMAutoTree=Tampilkan pohon ECM otomatis @@ -2019,7 +2027,7 @@ DisabledResourceLinkContact=Nonaktifkan fitur untuk menautkan sumber daya ke kon EnableResourceUsedInEventCheck=Aktifkan fitur untuk memeriksa apakah sumber daya digunakan dalam suatu agenda ConfirmUnactivation=Konfirmasikan setel ulang modul OnMobileOnly=Hanya pada layar kecil (smartphone) -DisableProspectCustomerType=Disable the "Prospect + Customer" third party type (so third party must be "Prospect" or "Customer", but can't be both) +DisableProspectCustomerType=Nonaktifkan jenis pihak ketiga "Prospek + Pelanggan" (sehingga pihak ketiga haruslah "Prospek" atau "Pelanggan", tetapi tidak boleh keduanya) MAIN_OPTIMIZEFORTEXTBROWSER=Sederhanakan antarmuka untuk orang buta MAIN_OPTIMIZEFORTEXTBROWSERDesc=Aktifkan opsi ini jika Anda adalah orang buta, atau jika Anda menggunakan aplikasi dari peramban teks seperti Lynx atau Links. MAIN_OPTIMIZEFORCOLORBLIND=Ubah warna antarmuka untuk orang buta warna @@ -2041,15 +2049,15 @@ 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 -IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. -AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +IfYouAreOnAProductionSetThis=Jika Anda berada di lingkungan produksi, Anda harus menyetel properti ini ke %s. +AntivirusEnabledOnUpload=Antivirus diaktifkan pada file yang diunggah EXPORTS_SHARE_MODELS=Model ekspor dibagi dengan semua orang ExportSetup=Pengaturan ekspor modul ImportSetup=Pengaturan impor modul InstanceUniqueID=ID unik dari instance SmallerThan=Lebih kecil dari LargerThan=lebih besar dari -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. +IfTrackingIDFoundEventWillBeLinked=Perhatikan bahwa Jika ID pelacakan dari suatu objek ditemukan dalam email, atau jika email adalah jawaban dari email yang sudah dikumpulkan dan ditautkan ke suatu objek, acara yang dibuat akan secara otomatis ditautkan ke objek terkait yang diketahui. WithGMailYouCanCreateADedicatedPassword=Dengan akun GMail, jika Anda mengaktifkan validasi 2 langkah, disarankan untuk membuat kata sandi khusus kedua untuk aplikasi alih-alih menggunakan kata sandi akun Anda sendiri dari https://myaccount.google.com/. EmailCollectorTargetDir=Ini mungkin merupakan perilaku yang diinginkan untuk memindahkan email ke tag / direktori lain ketika berhasil diproses. Cukup atur nama direktori di sini untuk menggunakan fitur ini (JANGAN menggunakan karakter khusus dalam nama). Perhatikan bahwa Anda juga harus menggunakan akun login baca / tulis. EmailCollectorLoadThirdPartyHelp=Anda dapat menggunakan tindakan ini untuk menggunakan konten email untuk menemukan dan memuat pihak ketiga yang ada di database Anda. Pihak ketiga yang ditemukan (atau dibuat) akan digunakan untuk mengikuti tindakan yang membutuhkannya. Di baris parameter Anda dapat menggunakan misalnya 'EXTRACT: BODY: Name: \\ s ([^ \\ s] *)' jika Anda ingin mengekstrak nama pihak ketiga dari string 'Nama: nama untuk menemukan' ditemukan di dalam tubuh. @@ -2073,13 +2081,17 @@ RssNote=Catatan: Setiap definisi umpan RSS menyediakan widget yang harus Anda ak JumpToBoxes=Langsung ke Pengaturan -> Widget MeasuringUnitTypeDesc=Gunakan di sini nilai seperti "ukuran", "permukaan", "volume", "berat", "waktu" MeasuringScaleDesc=Skala adalah jumlah tempat Anda harus memindahkan bagian desimal untuk mencocokkan unit referensi default. Untuk tipe unit "waktu", itu adalah jumlah detik. Nilai antara 80 dan 99 adalah nilai yang dicadangkan. -TemplateAdded=Template added -TemplateUpdated=Template updated -TemplateDeleted=Template deleted -MailToSendEventPush=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. +TemplateAdded=Template ditambahkan +TemplateUpdated=Template diperbarui +TemplateDeleted=Template dihapus +MailToSendEventPush=Email pengingat acara +SwitchThisForABetterSecurity=Direkomendasikan untuk mengganti nilai ini ke %s untuk keamanan lebih +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. +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 diff --git a/htdocs/langs/id_ID/banks.lang b/htdocs/langs/id_ID/banks.lang index 4f6a68201fd..d7bdb21cbd5 100644 --- a/htdocs/langs/id_ID/banks.lang +++ b/htdocs/langs/id_ID/banks.lang @@ -173,10 +173,11 @@ SEPAMandate=Mandat SEPA 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=Pagar kas POS -NewCashFence=Pagar uang tunai baru +CashControl=POS cash desk control +NewCashFence=New cash desk 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 diff --git a/htdocs/langs/id_ID/blockedlog.lang b/htdocs/langs/id_ID/blockedlog.lang index 6e33a07b94f..45c2d2264dd 100644 --- a/htdocs/langs/id_ID/blockedlog.lang +++ b/htdocs/langs/id_ID/blockedlog.lang @@ -35,7 +35,7 @@ logDON_DELETE=Penghapusan donasi logis logMEMBER_SUBSCRIPTION_CREATE=Langganan anggota dibuat logMEMBER_SUBSCRIPTION_MODIFY=Langganan anggota diubah logMEMBER_SUBSCRIPTION_DELETE=Penghapusan logis langganan anggota -logCASHCONTROL_VALIDATE=Rekaman pagar uang tunai +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Unduhan faktur pelanggan BlockedLogBillPreview=Pratinjau faktur pelanggan BlockedlogInfoDialog=Detail Log diff --git a/htdocs/langs/id_ID/boxes.lang b/htdocs/langs/id_ID/boxes.lang index d4ae8002577..9ffe9c3402a 100644 --- a/htdocs/langs/id_ID/boxes.lang +++ b/htdocs/langs/id_ID/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=Donasi terbaru %s yang dimodifikasi BoxTitleLastModifiedExpenses=Laporan pengeluaran termodifikasi %s terbaru BoxTitleLatestModifiedBoms=BOM dimodifikasi %s terbaru BoxTitleLatestModifiedMos=Modifikasi Pesanan Manufaktur %s terbaru +BoxTitleLastOutstandingBillReached=Customers with maximum outstanding exceeded BoxGlobalActivity=Aktivitas global (faktur, proposal, pesanan) BoxGoodCustomers=Pelanggan yang baik BoxTitleGoodCustomers=%s Pelanggan yang baik +BoxScheduledJobs=Scheduled jobs +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Gagal menyegarkan fluks RSS. Tanggal penyegaran yang sukses terakhir: %s LastRefreshDate=Tanggal penyegaran terbaru NoRecordedBookmarks=Tidak ada penanda yang ditentukan. @@ -92,8 +95,8 @@ LastXMonthRolling=Rolling bulan %s terbaru ChooseBoxToAdd=Tambahkan widget ke dasbor Anda BoxAdded=Widget ditambahkan di dasbor Anda BoxTitleUserBirthdaysOfMonth=Ulang tahun bulan ini (pengguna) -BoxLastManualEntries=Entri manual terakhir dalam akuntansi -BoxTitleLastManualEntries=entri manual terbaru %s +BoxLastManualEntries=Latest record in accountancy entered manually or without source document +BoxTitleLastManualEntries=%s latest record entered manually or without source document NoRecordedManualEntries=Tidak ada entri manual yang dicatat dalam akuntansi BoxSuspenseAccount=Hitung operasi akuntansi dengan akun suspense BoxTitleSuspenseAccount=Jumlah garis yang tidak terisi @@ -102,5 +105,7 @@ SuspenseAccountNotDefined=Akun penangguhan tidak ditentukan BoxLastCustomerShipments=Pengiriman pelanggan terakhir BoxTitleLastCustomerShipments=Pengiriman pelanggan %s terbaru NoRecordedShipments=Tidak ada pengiriman pelanggan yang direkam +BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages AccountancyHome=Akuntansi +ValidatedProjects=Validated projects diff --git a/htdocs/langs/id_ID/cashdesk.lang b/htdocs/langs/id_ID/cashdesk.lang index bc39b8bf56b..b18ea4ad4a5 100644 --- a/htdocs/langs/id_ID/cashdesk.lang +++ b/htdocs/langs/id_ID/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Catatan Kaki AmountAtEndOfPeriod=Jumlah pada akhir periode (hari, bulan atau tahun) TheoricalAmount=Jumlah teoretis RealAmount=Jumlah nyata -CashFence=Anggaran uang tunai -CashFenceDone=Anggaran uang tunai yang dilakukan untuk periode tersebut +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=Nb faktur Paymentnumpad=Jenis Pad untuk memasukkan pembayaran Numberspad=Angka pad @@ -99,8 +99,9 @@ CashDeskRefNumberingModules=Modul penomoran untuk penjualan POS CashDeskGenericMaskCodes6 = tag <br><b>{TN}</b>digunakan untuk menambahkan nomor terminal TakeposGroupSameProduct=Kelompokkan lini produk yang sama StartAParallelSale=Mulai penjualan paralel baru -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Tutup pagar uang +SaleStartedAt=Sale started at %s +ControlCashOpening=Control cash popup at opening POS +CloseCashFence=Close cash desk control CashReport=Laporan tunai MainPrinterToUse=Printer utama untuk digunakan OrderPrinterToUse=Memesan printer untuk digunakan @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/id_ID/categories.lang b/htdocs/langs/id_ID/categories.lang index 15b8b143200..d37a907add2 100644 --- a/htdocs/langs/id_ID/categories.lang +++ b/htdocs/langs/id_ID/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=Area label/kategori Proyek UsersCategoriesArea=Area label/kategori Pengguna SubCats=Sub-kategori CatList=Daftar label/kategori +CatListAll=List of tags/categories (all types) NewCategory=Label/kategori baru ModifCat=Ubah label/kategori CatCreated=Label/kategori dibuat @@ -65,16 +66,22 @@ UsersCategoriesShort=Label/kategori pengguna StockCategoriesShort=Label/kategori gudang ThisCategoryHasNoItems=Kategori ini tidak mengandung barang apa pun. CategId=Label/id kategori -CatSupList=Daftar label/kategori vendor -CatCusList=Daftar label/kategori pelanggan/prospek +ParentCategory=Parent tag/category +ParentCategoryLabel=Label of parent tag/category +CatSupList=List of vendors tags/categories +CatCusList=List of customers/prospects tags/categories CatProdList=Daftar label/kategori produk CatMemberList=Daftar label/kategori anggota -CatContactList=Daftar label/kategori kontak -CatSupLinks=Tautan antara pemasok dan label/kategori +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=Tautan antara pelanggan/prospek dan label/kategori CatContactsLinks=Tautan antara kontak/alamat dan label/kategori CatProdLinks=Tautan antara produk/layanan dan label/kategori -CatProJectLinks=Tautan antara proyek dan label/kategori +CatMembersLinks=Links between members and tags/categories +CatProjectsLinks=Tautan antara proyek dan label/kategori +CatUsersLinks=Links between users and tags/categories DeleteFromCat=Hapus dari label/kategori ExtraFieldsCategories=Atribut pelengkap CategoriesSetup=Pengaturan label/kategori diff --git a/htdocs/langs/id_ID/companies.lang b/htdocs/langs/id_ID/companies.lang index 3dd19063424..08b96e96903 100644 --- a/htdocs/langs/id_ID/companies.lang +++ b/htdocs/langs/id_ID/companies.lang @@ -358,7 +358,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=Jenis Badan Hukum +JuridicalStatus=Business entity type Workforce=Workforce Staff=karyawan ProspectLevelShort=Potensi diff --git a/htdocs/langs/id_ID/compta.lang b/htdocs/langs/id_ID/compta.lang index 5b49606be63..9e62c742f29 100644 --- a/htdocs/langs/id_ID/compta.lang +++ b/htdocs/langs/id_ID/compta.lang @@ -111,7 +111,7 @@ Refund=Pengembalian dana SocialContributionsPayments=Pembayaran pajak sosial / fiskal ShowVatPayment=Tampilkan pembayaran PPN TotalToPay=Total yang harus dibayar -BalanceVisibilityDependsOnSortAndFilters=Saldo terlihat dalam daftar ini hanya jika tabel diurutkan naik pada %s dan difilter untuk 1 rekening bank +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=Kode akuntansi pelanggan SupplierAccountancyCode=Kode akuntansi vendor CustomerAccountancyCodeShort=Cust. Akun. kode @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Anda yakin ingin menghapus pembayaran pajak sosi 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>. -CalcModeDebt=Analisis faktur tercatat yang diketahui bahkan jika mereka belum diperhitungkan dalam buku besar. +CalcModeDebt=Analysis of known recorded documents even if they are not yet accounted in ledger. CalcModeEngagement=Analisis pembayaran tercatat yang diketahui, bahkan jika mereka belum diperhitungkan dalam Buku Besar. CalcModeBookkeeping=Analisis data dijurnal dalam tabel Pembukuan Pembukuan. CalcModeLT1= Mode<b>%sRE pada faktur pelanggan - pemasok invoices%s </b> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Neraca pendapatan dan pengeluaran, ringkasan tahuna AnnualByCompanies=Saldo pendapatan dan pengeluaran, menurut kelompok akun yang telah ditentukan AnnualByCompaniesDueDebtMode=Neraca pendapatan dan pengeluaran, perincian menurut kelompok yang telah ditentukan, mode<b>%sClaims-Debts%s</b>berkata<b>akuntansi akuntan a09a4b7f0f AnnualByCompaniesInputOutputMode=Neraca pendapatan dan pengeluaran, perincian menurut kelompok yang telah ditentukan, mode<b>%s Penghasilan-Pengeluaran%s</b>mengatakan<b>akuntansi kas a09a4b739f178 -SeeReportInInputOutputMode=Lihat %sanalisis pembayaran%s untuk perhitungan pembayaran aktual yang dilakukan bahkan jika mereka belum diperhitungkan dalam Ledger. -SeeReportInDueDebtMode=Lihat %s analisis faktur %s untuk perhitungan berdasarkan faktur tercatat yang diketahui bahkan jika mereka belum diperhitungkan dalam Ledger. -SeeReportInBookkeepingMode=Lihat<b>%sLaporan pembuatan%s</b>untuk perhitungan pada<b>Tabel Pembukuan Pembukuan a09a4b739f17f8f0z +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=- Jumlah yang ditampilkan termasuk semua pajak RulesResultDue=- Ini termasuk faktur terutang, biaya, PPN, sumbangan apakah mereka dibayar atau tidak. Juga termasuk gaji yang dibayarkan. <br> - Ini didasarkan pada tanggal penagihan faktur dan pada tanggal jatuh tempo untuk pengeluaran atau pembayaran pajak. Untuk gaji yang ditentukan dengan modul Gaji, tanggal nilai pembayaran digunakan. RulesResultInOut=- Ini termasuk pembayaran nyata yang dilakukan pada faktur, biaya, PPN dan gaji. <br> - Ini didasarkan pada tanggal pembayaran faktur, biaya, PPN dan gaji. Tanggal donasi untuk donasi. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=Ini menunjukkan catatan dalam Buku Besar Anda SeePageForSetup=Lihat menu <a href="%s"> %s </a> untuk pengaturan DepositsAreNotIncluded=- Faktur pembayaran tidak termasuk DepositsAreIncluded=- Faktur pembayaran disertakan +LT1ReportByMonth=Tax 2 report by month +LT2ReportByMonth=Tax 3 report by month LT1ReportByCustomers=Laporkan pajak 2 oleh pihak ketiga LT2ReportByCustomers=Laporkan pajak 3 oleh pihak ketiga LT1ReportByCustomersES=Laporan oleh RE pihak ketiga LT2ReportByCustomersES=Laporkan oleh IRPF pihak ketiga VATReport=Laporan pajak penjualan VATReportByPeriods=Laporan pajak penjualan berdasarkan periode +VATReportByMonth=Sale tax report by month VATReportByRates=Laporan pajak penjualan berdasarkan tarif VATReportByThirdParties=Laporan pajak penjualan oleh pihak ketiga VATReportByCustomers=Laporan pajak penjualan oleh pelanggan diff --git a/htdocs/langs/id_ID/cron.lang b/htdocs/langs/id_ID/cron.lang index 611fd7aa4ba..226c36001ea 100644 --- a/htdocs/langs/id_ID/cron.lang +++ b/htdocs/langs/id_ID/cron.lang @@ -7,13 +7,14 @@ Permission23103 = Hapus pekerjaan terjadwal Permission23104 = Jalankan pekerjaan yang Dijadwalkan # Admin CronSetup=Penyiapan manajemen pekerjaan terjadwal -URLToLaunchCronJobs=URL untuk memeriksa dan meluncurkan pekerjaan cron yang berkualitas -OrToLaunchASpecificJob=Atau untuk memeriksa dan meluncurkan pekerjaan tertentu +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=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 CronExplainHowToRunWin=Pada lingkungan Microsoft (tm) Windows Anda dapat menggunakan alat Tugas Terjadwal untuk menjalankan baris perintah setiap 5 menit CronMethodDoesNotExists=Kelas %s tidak mengandung metode apa pun %s +CronMethodNotAllowed=Method %s of class %s is in blacklist of forbidden methods CronJobDefDesc=Profil pekerjaan Cron didefinisikan ke dalam file deskriptor modul. Ketika modul diaktifkan, mereka dimuat dan tersedia sehingga Anda dapat mengelola pekerjaan dari menu alat admin %s. CronJobProfiles=Daftar profil pekerjaan cron yang telah ditentukan # Menu @@ -46,6 +47,7 @@ CronNbRun=Jumlah peluncuran CronMaxRun=Jumlah maksimum peluncuran CronEach=Setiap JobFinished=Pekerjaan diluncurkan dan selesai +Scheduled=Scheduled #Page card CronAdd= Tambahkan pekerjaan CronEvery=Jalankan pekerjaan masing-masing @@ -56,7 +58,7 @@ CronNote=Komentar CronFieldMandatory=Bidang %s wajib diisi CronErrEndDateStartDt=Tanggal akhir tidak boleh sebelum tanggal mulai StatusAtInstall=Status pada pemasangan modul -CronStatusActiveBtn=Memungkinkan +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Nonaktifkan CronTaskInactive=Pekerjaan ini dinonaktifkan CronId=Indo @@ -82,3 +84,8 @@ MakeLocalDatabaseDumpShort=Pencadangan basis data lokal MakeLocalDatabaseDump=Buat dump basis data lokal. Parameternya adalah: kompresi ('gz' atau 'bz' atau 'tidak ada'), jenis cadangan ('mysql', 'pgsql', 'auto'), 1, 'otomatis' atau nama file yang akan dibuat, jumlah file cadangan yang akan disimpan WarningCronDelayed=Perhatian, untuk tujuan kinerja, apa pun tanggal berikutnya pelaksanaan pekerjaan yang diaktifkan, pekerjaan Anda mungkin tertunda hingga maksimum %s jam, sebelum dijalankan. DATAPOLICYJob=Pembersih data dan penganonim +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/id_ID/errors.lang b/htdocs/langs/id_ID/errors.lang index 0d776c69a27..73af84cd831 100644 --- a/htdocs/langs/id_ID/errors.lang +++ b/htdocs/langs/id_ID/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=Tidak ada kesalahan, kami berkomitmen # Errors ErrorButCommitIsDone=Kesalahan ditemukan tetapi kami memvalidasinya 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. ErrorLoginAlreadyExists=Login %s sudah ada. ErrorGroupAlreadyExists=Grup %s sudah ada. ErrorRecordNotFound=Rekaman tidak ditemukan. @@ -48,6 +50,7 @@ ErrorFieldsRequired=Beberapa bidang wajib diisi tidak terisi. ErrorSubjectIsRequired=Diperlukan topik email ErrorFailedToCreateDir=Gagal membuat direktori. Periksa apakah pengguna server Web memiliki izin untuk menulis ke direktori dokumen Dolibarr. Jika parameter<b>safe_mode</b>diaktifkan pada PHP ini, periksa apakah file-file Dolibarr php milik pengguna web server (atau grup). ErrorNoMailDefinedForThisUser=Tidak ada surat yang ditentukan untuk pengguna ini +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=Fitur ini perlu javascript untuk diaktifkan agar berfungsi. Ubah ini dalam pengaturan - tampilan. ErrorTopMenuMustHaveAParentWithId0=Menu bertipe 'Top' tidak dapat memiliki menu induk. Masukkan 0 di menu induk atau pilih menu dengan tipe 'Kiri'. ErrorLeftMenuMustHaveAParentId=Menu bertipe 'Kiri' harus memiliki id induk. @@ -75,7 +78,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=Referensi yang digunakan untuk pembuatan sudah ada. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. 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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=Anda harus memilih apakah artikel ErrorDiscountLargerThanRemainToPaySplitItBefore=Diskon yang Anda coba terapkan lebih besar daripada tetap membayar. Membagi diskon menjadi 2 diskon lebih kecil sebelumnya. ErrorFileNotFoundWithSharedLink=File tidak ditemukan. Mungkin kunci berbagi diubah atau file dihapus baru-baru ini. ErrorProductBarCodeAlreadyExists=Barcode produk %s sudah ada pada referensi produk lain. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Perhatikan juga bahwa menggunakan produk virtual untuk menambah / mengurangi subproduk secara otomatis tidak dimungkinkan ketika setidaknya satu sub-produk (atau subproduk dari subproduk) memerlukan nomor seri / lot. +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=Deskripsi adalah wajib untuk saluran dengan produk gratis ErrorAPageWithThisNameOrAliasAlreadyExists=Halaman / wadah<strong>%s </strong> memiliki nama atau alias alternatif yang sama dengan yang Anda coba gunakan ErrorDuringChartLoad=Kesalahan saat memuat bagan akun. Jika beberapa akun tidak dimuat, Anda masih dapat memasukkannya secara manual. @@ -243,6 +246,16 @@ ErrorReplaceStringEmpty=Kesalahan, string untuk diganti menjadi kosong 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 + # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Parameter PHP Anda upload_max_filesize (%s) lebih tinggi dari parameter PHP post_max_size (%s). Ini bukan pengaturan yang konsisten. WarningPasswordSetWithNoAccount=Kata sandi ditetapkan untuk anggota ini. Namun, tidak ada akun pengguna yang dibuat. Jadi kata sandi ini disimpan tetapi tidak dapat digunakan untuk masuk ke Dolibarr. Ini dapat digunakan oleh modul / antarmuka eksternal tetapi jika Anda tidak perlu mendefinisikan login atau kata sandi untuk anggota, Anda dapat menonaktifkan opsi "Kelola login untuk setiap anggota" dari pengaturan modul Anggota. Jika Anda perlu mengelola login tetapi tidak memerlukan kata sandi, Anda dapat mengosongkan isian ini untuk menghindari peringatan ini. Catatan: Email juga dapat digunakan sebagai login jika anggota tersebut tertaut ke pengguna. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Info masuk Anda telah diubah. Untuk tujua WarningAnEntryAlreadyExistForTransKey=Entri sudah ada untuk kunci terjemahan untuk bahasa ini WarningNumberOfRecipientIsRestrictedInMassAction=Peringatan, jumlah penerima yang berbeda terbatas pada<b>%s</b>saat menggunakan aksi massa dalam daftar WarningDateOfLineMustBeInExpenseReportRange=Peringatan, tanggal saluran tidak dalam kisaran laporan pengeluaran +WarningProjectDraft=Project is still in draft mode. Don't forget to validate it if you plan to use tasks. WarningProjectClosed=Proyek ditutup. Anda harus membukanya kembali terlebih dahulu. WarningSomeBankTransactionByChequeWereRemovedAfter=Beberapa transaksi bank dihapus setelah kwitansi termasuk mereka dihasilkan. Jadi nb cek dan total penerimaan mungkin berbeda dari jumlah dan total dalam daftar. -WarningFailedToAddFileIntoDatabaseIndex=Warnin, gagal menambahkan entri file ke tabel indeks basis data ECM +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. diff --git a/htdocs/langs/id_ID/exports.lang b/htdocs/langs/id_ID/exports.lang index dcf4255886e..39cc5685c18 100644 --- a/htdocs/langs/id_ID/exports.lang +++ b/htdocs/langs/id_ID/exports.lang @@ -133,3 +133,4 @@ KeysToUseForUpdates=Kunci (kolom) untuk digunakan untuk memperbarui data yang ad NbInsert=Jumlah baris yang dimasukkan: %s NbUpdate=Jumlah baris yang diperbarui: %s MultipleRecordFoundWithTheseFilters=Beberapa catatan telah ditemukan dengan filter ini: %s +StocksWithBatch=Stocks and location (warehouse) of products with batch/serial number diff --git a/htdocs/langs/id_ID/mails.lang b/htdocs/langs/id_ID/mails.lang index 60dae133949..6d4d3003efc 100644 --- a/htdocs/langs/id_ID/mails.lang +++ b/htdocs/langs/id_ID/mails.lang @@ -92,6 +92,7 @@ MailingModuleDescEmailsFromUser=Masukan input email oleh pengguna MailingModuleDescDolibarrUsers=Pengguna dengan Email MailingModuleDescThirdPartiesByCategories=Pihak ketiga (berdasarkan kategori) SendingFromWebInterfaceIsNotAllowed=Mengirim dari antarmuka web tidak diizinkan. +EmailCollectorFilterDesc=All filters must match to have an email being collected # Libelle des modules de liste de destinataires mailing LineInFile=Baris %s dalam berkas @@ -125,12 +126,13 @@ TagMailtoEmail=Email Penerima (termasuk tautan html "mailto:") NoEmailSentBadSenderOrRecipientEmail=Tidak ada email yang dikirim. Pengirim atau penerima email salah. Verifikasi profil pengguna. # Module Notifications Notifications=Notifikasi -NoNotificationsWillBeSent=Tidak ada pemberitahuan email yang direncanakan untuk agenda dan perusahaan ini -ANotificationsWillBeSent=1 notifikasi akan dikirim melalui email -SomeNotificationsWillBeSent=notifikasi %s akan dikirim melalui email -AddNewNotification=Aktifkan pemberitahuan email baru untuk target/agenda -ListOfActiveNotifications=Daftar semua target/agenda aktif untuk pemberitahuan email -ListOfNotificationsDone=Daftar semua pemberitahuan email yang dikirim +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=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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Berkas yang diimpor harus memiliki format email <stro UseFormatInputEmailToTarget=Masukkan string dengan format<strong>email;nama;nama depan;lainnya</strong> MailAdvTargetRecipients=Penerima (pilihan lanjutan) AdvTgtTitle=Isi kolom input untuk memilih pihak ketiga atau kontak/alamat yang ditargetkan -AdvTgtSearchTextHelp=Gunakan %% sebagai wildcard. Misalnya untuk menemukan semua item seperti <b>jean, joe, jim</b>, Anda dapat memasukkan <b>j%%</b>, Anda juga dapat menggunakan ; sebagai pemisah untuk nilai, dan gunakan ! sebagai kecuali nilai ini. Sebagai contoh <b>jean;joe;jim%%;!jimo;!jima%</b> akan menargetkan semua jean, joe, mulai dengan jim tetapi tidak jimo dan tidak semua yang dimulai dengan jima +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=Gunakan sela untuk memilih nilai int atau float AdvTgtMinVal=Nilai minimum AdvTgtMaxVal=Nilai maksimum @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Buat filter AdvTgtOrCreateNewFilter=Nama filter baru NoContactWithCategoryFound=Tidak ditemukan kontak/alamat dengan kategori NoContactLinkedToThirdpartieWithCategoryFound=Tidak ditemukan kontak/alamat dengan kategori -OutGoingEmailSetup=Pengaturan email keluar -InGoingEmailSetup=Penyiapan email masuk -OutGoingEmailSetupForEmailing=Pengaturan Email Keluar (untuk modul %s) -DefaultOutgoingEmailSetup=Pengaturan email keluar standar +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=Informasi ContactsWithThirdpartyFilter=Kontak dengan filter pihak ketiga Unanswered=Unanswered Answered=Answered IsNotAnAnswer=Is not answer (initial email) IsAnAnswer=Is an answer of an initial email +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/id_ID/main.lang b/htdocs/langs/id_ID/main.lang index def7208cb73..92771fd72b5 100644 --- a/htdocs/langs/id_ID/main.lang +++ b/htdocs/langs/id_ID/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=Tidak ada templat yang tersedia untuk jenis email ini AvailableVariables=Variabel substitusi yang tersedia NoTranslation=Tanpa terjemahan Translation=Terjemahan +CurrentTimeZone=TimeZone PHP (Server) EmptySearchString=Masukkan kriteria pencarian yang tidak kosong +EnterADateCriteria=Enter a date criteria NoRecordFound=Tidak ada catatan yang ditemukan NoRecordDeleted=Tidak ada catatan yang dihapus NotEnoughDataYet=Tidak cukup data @@ -85,6 +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 RecordSaved=Rekam disimpan RecordDeleted=Rekam dihapus RecordGenerated=Rekaman dihasilkan @@ -220,6 +224,7 @@ Value=Nilai PersonalValue=Nilai pribadi NewObject=%s baru NewValue=Nilai baru +OldValue=Old value %s CurrentValue=Nilai sekarang Code=Kode Type=Tipe @@ -433,6 +438,7 @@ RemainToPay=Tetap membayar Module=Modul / Aplikasi Modules=Modul / Aplikasi Option=Pilihan +Filters=Filters List=Daftar FullList=Daftar lengkap FullConversation=Percakapan penuh @@ -650,6 +656,7 @@ SupplierPreview=Pratinjau vendor ShowCustomerPreview=Tampilkan pratinjau pelanggan ShowSupplierPreview=Tampilkan pratinjau vendor RefCustomer=Ref. pelanggan +InternalRef=Internal ref. Currency=Mata uang InfoAdmin=Informasi untuk administrator Undo=Membuka @@ -671,7 +678,7 @@ SendMail=Mengirim email Email=Email NoEMail=Tidak ada email AlreadyRead=Sudah baca -NotRead=Tidak membaca +NotRead=Unread NoMobilePhone=Tidak ada ponsel Owner=Pemilik FollowingConstantsWillBeSubstituted=Konstanta berikut akan diganti dengan nilai yang sesuai. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/id_ID/modulebuilder.lang b/htdocs/langs/id_ID/modulebuilder.lang index e8584203a6e..aeecb827d2a 100644 --- a/htdocs/langs/id_ID/modulebuilder.lang +++ b/htdocs/langs/id_ID/modulebuilder.lang @@ -40,6 +40,7 @@ PageForCreateEditView=Halaman PHP untuk membuat / mengedit / melihat catatan PageForAgendaTab=Halaman PHP untuk tab agenda PageForDocumentTab=Halaman PHP untuk tab dokumen PageForNoteTab=Halaman PHP untuk tab note +PageForContactTab=PHP page for contact tab PathToModulePackage=Path ke zip paket modul / aplikasi PathToModuleDocumentation=Path ke file modul / dokumentasi aplikasi (%s) SpaceOrSpecialCharAreNotAllowed=Spasi atau karakter khusus tidak diperbolehkan. @@ -77,7 +78,7 @@ IsAMeasure=Adalah ukuran DirScanned=Direktori dipindai NoTrigger=Tidak ada pemicu NoWidget=Tidak ada widget -GoToApiExplorer=Buka Penjelajah API +GoToApiExplorer=API explorer ListOfMenusEntries=Daftar entri menu ListOfDictionariesEntries=Daftar entri kamus ListOfPermissionsDefined=Daftar izin yang ditentukan @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=Jika Anda memiliki pengetahuan tentang SQL dan PHP, And SeeTopRightMenu=Lihat <span class="fa fa-bug"> </span> di menu kanan atas AddLanguageFile=Tambahkan file bahasa YouCanUseTranslationKey=Di sini Anda dapat menggunakan kunci yang merupakan kunci terjemahan yang ditemukan dalam file bahasa (lihat tab "Bahasa") -DropTableIfEmpty=(Hapus tabel jika kosong) +DropTableIfEmpty=(Destroy table if empty) TableDoesNotExists=Tabel %s tidak ada TableDropped=Tabel %s dihapus InitStructureFromExistingTable=Membangun string array struktur dari tabel yang ada @@ -126,7 +127,6 @@ UseSpecificEditorURL = Gunakan URL editor tertentu UseSpecificFamily = Gunakan keluarga tertentu UseSpecificAuthor = Gunakan penulis tertentu UseSpecificVersion = Gunakan versi awal tertentu -ModuleMustBeEnabled=Modul / aplikasi harus diaktifkan terlebih dahulu IncludeRefGeneration=Referensi objek harus dihasilkan secara otomatis IncludeRefGenerationHelp=Periksa ini jika Anda ingin memasukkan kode untuk mengelola pembuatan referensi secara otomatis IncludeDocGeneration=Saya ingin menghasilkan beberapa dokumen dari objek @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Jenis bidang: <br> varchar (99), ganda (24,8), real, teks, html AsciiToHtmlConverter=Pengonversi Ascii ke HTML AsciiToPdfConverter=Pengonversi ascii ke PDF TableNotEmptyDropCanceled=Meja tidak kosong. Drop telah dibatalkan. +ModuleBuilderNotAllowed=The module builder is available but not allowed to your user. diff --git a/htdocs/langs/id_ID/mrp.lang b/htdocs/langs/id_ID/mrp.lang index 0dab77fbf41..53bc718c450 100644 --- a/htdocs/langs/id_ID/mrp.lang +++ b/htdocs/langs/id_ID/mrp.lang @@ -78,3 +78,27 @@ TotalCost=Total biaya BOMTotalCost=Biaya untuk menghasilkan BOM ini berdasarkan pada biaya setiap kuantitas dan produk yang akan dikonsumsi (gunakan harga Biaya jika ditentukan, selain itu Harga Rata-rata Tertimbang jika ditentukan, selain itu harga pembelian Terbaik) 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/id_ID/other.lang b/htdocs/langs/id_ID/other.lang index 67d6dae2501..dc4e9b6e401 100644 --- a/htdocs/langs/id_ID/other.lang +++ b/htdocs/langs/id_ID/other.lang @@ -5,8 +5,6 @@ Tools=Alat TMenuTools=Alat ToolsDesc=Semua alat yang tidak termasuk dalam entri menu lain dikelompokkan di sini.<br>Semua alat dapat diakses melalui menu kiri. Birthday=Ulang tahun -BirthdayDate=Tanggal lahir -DateToBirth=Tanggal lahir BirthdayAlertOn=peringatan ulang tahun aktif BirthdayAlertOff=peringatan ulang tahun tidak aktif TransKey=Terjemahan dari kunci TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Bulan sebelumnya (nomor 1-12) dari tanggal faktur TextPreviousMonthOfInvoice=Bulan sebelumnya (teks) dari tanggal faktur NextMonthOfInvoice=Bulan berikutnya (nomor 1-12) dari tanggal faktur TextNextMonthOfInvoice=Bulan berikutnya (teks) dari tanggal faktur +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=File zip dihasilkan menjadi<b>%s </b>. DocFileGeneratedInto=File Doc dihasilkan menjadi<b>%s </b>. JumpToLogin=Terputus. Buka halaman login ... @@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Laporan biaya divalidasi (diperlukan persetujuan) Notify_EXPENSE_REPORT_APPROVE=Laporan biaya disetujui Notify_HOLIDAY_VALIDATE=Tinggalkan permintaan divalidasi (diperlukan persetujuan) Notify_HOLIDAY_APPROVE=Biarkan permintaan disetujui +Notify_ACTION_CREATE=Added action to Agenda SeeModuleSetup=Lihat pengaturan modul %s NbOfAttachedFiles=Jumlah file / dokumen yang dilampirkan TotalSizeOfAttachedFiles=Ukuran total file / dokumen yang dilampirkan @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Halo)__\n\nSilakan temukan pengiriman __REF PredefinedMailContentSendFichInter=__(Halo)__\n\nSilakan temukan intervensi __REF__ terlampir\n\n\n__ (Hormat) __\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Anda dapat mengklik tautan di bawah untuk melakukan pembayaran jika belum dilakukan.\n\n%s\n\n PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendActionComm=Event reminder "__EVENT_LABEL__" on __EVENT_DATE__ at __EVENT_TIME__<br><br>This is an automatic message, please do not reply. DemoDesc=Dolibarr adalah ERP / CRM ringkas yang mendukung beberapa modul bisnis. Demo yang menampilkan semua modul tidak masuk akal karena skenario ini tidak pernah terjadi (beberapa ratus tersedia). Jadi, beberapa profil demo tersedia. ChooseYourDemoProfil=Pilih profil demo yang paling sesuai dengan kebutuhan Anda ... ChooseYourDemoProfilMore=... atau buat profil Anda sendiri <br> (pemilihan modul manual) @@ -214,6 +216,7 @@ EMailTextExpenseReportValidated=Laporan biaya %s telah divalidasi. EMailTextExpenseReportApproved=Laporan biaya %s telah disetujui. EMailTextHolidayValidated=Tinggalkan permintaan %s telah divalidasi. EMailTextHolidayApproved=Tinggalkan permintaan %s telah disetujui. +EMailTextActionAdded=The action %s has been added to the Agenda. ImportedWithSet=Kumpulan data impor DolibarrNotification=Pemberitahuan otomatis ResizeDesc=Masukkan lebar baru<b>OR</b>tinggi baru. Rasio akan disimpan selama mengubah ukuran ... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Kontak / alamat yang dibuat oleh kolektor email d ProjectCreatedByEmailCollector=Proyek dibuat oleh kolektor email dari email MSGID %s TicketCreatedByEmailCollector=Tiket dibuat oleh kolektor email dari email MSGID %s OpeningHoursFormatDesc=Gunakan a - untuk memisahkan jam buka dan tutup. <br> Gunakan spasi untuk memasukkan rentang yang berbeda. <br> Contoh: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Area ekspor diff --git a/htdocs/langs/id_ID/products.lang b/htdocs/langs/id_ID/products.lang index 74921ca30f8..aa10df00723 100644 --- a/htdocs/langs/id_ID/products.lang +++ b/htdocs/langs/id_ID/products.lang @@ -108,7 +108,8 @@ 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=Activate kits (virtual 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 ParentProductsNumber=Jumlah produk kemasan induk @@ -167,8 +168,10 @@ BuyingPrices=Harga beli CustomerPrices=Harga pelanggan SuppliersPrices=Harga penjual SuppliersPricesOfProductsOrServices=Harga vendor (produk atau layanan) -CustomCode=Bea Cukai / Komoditas / kode HS +CustomCode=Customs|Commodity|HS code CountryOrigin=Negara Asal +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Sifat produk (bahan / selesai) NatureOfProductShort=Sifat produk NatureOfProductDesc=Bahan baku mentah atau produk jadi @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Gunakan harga tetap PriceByQuantity=Harga berbeda dengan kuantitas DisablePriceByQty=Nonaktifkan harga berdasarkan kuantitas PriceByQuantityRange=Rentang kuantitas -MultipriceRules=Aturan segmen harga +MultipriceRules=Automatic prices for segment UseMultipriceRules=Gunakan aturan segmen harga (didefinisikan dalam pengaturan modul produk) untuk secara otomatis menghitung harga semua segmen lain sesuai dengan segmen pertama PercentVariationOver=variasi %% lebih dari %s PercentDiscountOver=%% diskon lebih dari %s diff --git a/htdocs/langs/id_ID/projects.lang b/htdocs/langs/id_ID/projects.lang index 51c8fa22f38..b10e1fcca51 100644 --- a/htdocs/langs/id_ID/projects.lang +++ b/htdocs/langs/id_ID/projects.lang @@ -76,15 +76,16 @@ MyActivities=Tugas / kegiatan saya MyProjects=Proyek saya MyProjectsArea=Proyek saya Area DurationEffective=Durasi efektif -ProgressDeclared=Menyatakan kemajuan +ProgressDeclared=Declared real progress TaskProgressSummary=Kemajuan tugas CurentlyOpenedTasks=Buka tugas saat ini -TheReportedProgressIsLessThanTheCalculatedProgressionByX=Kemajuan yang dideklarasikan kurang dari %s dari progresi yang dihitung -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=Kemajuan yang dideklarasikan adalah lebih %s dari progresi yang dihitung -ProgressCalculated=Kemajuan yang dihitung +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=yang terhubung dengan saya WhichIamLinkedToProject=yang saya tautkan ke proyek Time=Waktu +TimeConsumed=Consumed ListOfTasks=Daftar tugas GoToListOfTimeConsumed=Buka daftar waktu yang digunakan GanttView=Lihat Gantt diff --git a/htdocs/langs/id_ID/recruitment.lang b/htdocs/langs/id_ID/recruitment.lang index e1e686e6d5f..97ceb8dc169 100644 --- a/htdocs/langs/id_ID/recruitment.lang +++ b/htdocs/langs/id_ID/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/id_ID/sendings.lang b/htdocs/langs/id_ID/sendings.lang index c780874113f..cb5514d96ea 100644 --- a/htdocs/langs/id_ID/sendings.lang +++ b/htdocs/langs/id_ID/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Pengiriman lain untuk pesanan ini SendingsAndReceivingForSameOrder=Pengiriman dan kwitansi untuk pesanan ini SendingsToValidate=Pengiriman untuk divalidasi StatusSendingCanceled=Dibatalkan +StatusSendingCanceledShort=Dibatalkan StatusSendingDraft=Konsep StatusSendingValidated=Divalidasi (produk untuk dikirim atau pun sudah dikirim) StatusSendingProcessed=Diproses @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=Anda harus terlebih dahulu memvalidasi pesanan # Sending methods # ModelDocument DocumentModelTyphon=Model dokumen yang lebih lengkap untuk tanda terima pengiriman (logo ...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=EXPEDITION_ADDON_NUMBER Konstan tidak ditentukan SumOfProductVolumes=Jumlah volume produk SumOfProductWeights=Jumlah bobot produk diff --git a/htdocs/langs/id_ID/stocks.lang b/htdocs/langs/id_ID/stocks.lang index 88ba7c376fd..fb71e9c978f 100644 --- a/htdocs/langs/id_ID/stocks.lang +++ b/htdocs/langs/id_ID/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Atur gudang berdasarkan pesanan Penjualan UserDefaultWarehouse=Tetapkan gudang pada Pengguna MainDefaultWarehouse=Gudang bawaan @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/id_ID/ticket.lang b/htdocs/langs/id_ID/ticket.lang index d8bc9fd797a..2a25919c9be 100644 --- a/htdocs/langs/id_ID/ticket.lang +++ b/htdocs/langs/id_ID/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Tiket - Jenis TicketDictCategory=Tiket - Grup TicketDictSeverity=Tiket - Tingkat Permasalahan TicketDictResolution=Tiket - Resolusi -TicketTypeShortBUGSOFT=Logika Tidak Berfungsi -TicketTypeShortBUGHARD=Materi Tidak Berfungsi -TicketTypeShortCOM=Pertanyaan komersial +TicketTypeShortCOM=Pertanyaan komersial TicketTypeShortHELP=Permintaan bantuan fungsional TicketTypeShortISSUE=Masalah, bug, atau masalah TicketTypeShortREQUEST=Ubah atau tingkatkan permintaan @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Lainnya TicketSeverityShortLOW=Rendah TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=Tinggi -TicketSeverityShortBLOCKING=Kritis/Memblokir +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Bidang '%s' salah MenuTicketMyAssign=Tiket saya @@ -60,7 +58,6 @@ OriginEmail=Sumber email Notify_TICKET_SENTBYMAIL=Kirim pesan tiket melalui email # Status -NotRead=Tidak membaca Read=Baca Assigned=Ditugaskan InProgress=Sedang berlangsung @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Antarmuka publik memungkinkan setiap pengunju TicketsAutoAssignTicket=Secara otomatis menetapkan pengguna yang membuat tiket TicketsAutoAssignTicketHelp=Saat membuat tiket, pengguna dapat secara otomatis ditugaskan ke tiket. 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status berubah: %s menjadi %s TicketNotNotifyTiersAtCreate=Tidak memberi tahu perusahaan saat membuat Unread=Belum dibaca TicketNotCreatedFromPublicInterface=Tidak tersedia. Tiket tidak dibuat dari antarmuka publik. -PublicInterfaceNotEnabled=Antarmuka publik tidak diaktifkan ErrorTicketRefRequired=Diperlukan nama referensi tiket # diff --git a/htdocs/langs/id_ID/website.lang b/htdocs/langs/id_ID/website.lang index 9d0b6cc0fe1..eb522b5a859 100644 --- a/htdocs/langs/id_ID/website.lang +++ b/htdocs/langs/id_ID/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit sebaris AddWebsite=Tambahkan situs web Webpage=Halaman web / wadah AddPage=Tambahkan halaman / wadah -HomePage=Halaman Depan PageContainer=Page PreviewOfSiteNotYetAvailable=Pratinjau situs web Anda<strong>%s </strong> belum tersedia. Anda harus terlebih dahulu '<strong> Impor template situs web lengkap </strong>' atau hanya '<strong> Tambahkan halaman / wadah </strong>'. RequestedPageHasNoContentYet=Halaman yang diminta dengan id %s belum memiliki konten, atau file cache .tpl.php telah dihapus. Edit konten halaman untuk menyelesaikan ini. @@ -101,7 +100,7 @@ EmptyPage=Halaman kosong ExternalURLMustStartWithHttp=URL eksternal harus dimulai dengan http: // atau https: // ZipOfWebsitePackageToImport=Unggah file Zip dari paket templat situs web ZipOfWebsitePackageToLoad=atau Pilih paket templat situs web tertanam yang tersedia -ShowSubcontainers=Sertakan konten dinamis +ShowSubcontainers=Show dynamic content InternalURLOfPage=URL halaman internal ThisPageIsTranslationOf=Halaman / wadah ini adalah terjemahan dari ThisPageHasTranslationPages=Halaman / wadah ini memiliki terjemahan @@ -137,3 +136,4 @@ RSSFeedDesc=Anda bisa mendapatkan RSS feed dari artikel terbaru dengan mengetikk 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. diff --git a/htdocs/langs/id_ID/withdrawals.lang b/htdocs/langs/id_ID/withdrawals.lang index 1ff4c8b5eef..9b5daafd94b 100644 --- a/htdocs/langs/id_ID/withdrawals.lang +++ b/htdocs/langs/id_ID/withdrawals.lang @@ -42,6 +42,7 @@ LastWithdrawalReceipt=Tanda terima debit langsung %s terbaru MakeWithdrawRequest=Buat permintaan pembayaran debit langsung MakeBankTransferOrder=Buat Permintaan Transfer Kredit WithdrawRequestsDone=%s permintaan pembayaran debit langsung dicatat +BankTransferRequestsDone=%s credit transfer requests recorded ThirdPartyBankCode=Kode bank pihak ketiga NoInvoiceCouldBeWithdrawed=Tidak ada faktur yang berhasil didebit. Periksa apakah faktur ada pada perusahaan dengan IBAN yang valid dan bahwa IBAN memiliki UMR (Referensi Mandat Unik) dengan mode<strong>%s </strong>. ClassCredited=Klasifikasi dikreditkan @@ -131,7 +132,8 @@ SEPARCUR=SEPA CUR SEPAFRST=SEPA FRST ExecutionDate=Tanggal eksekusi CreateForSepa=Buat berkas debet langsung -ICS=Pengidentifikasi Kreditor CI +ICS=Creditor Identifier CI for direct debit +ICSTransfer=Creditor Identifier CI for bank transfer END_TO_END=Tag XML SEPA "EndToEndId" - Id unik yang ditetapkan untuk setiap transaksi USTRD=Tag XML SEPA "Tidak Terstruktur" ADDDAYS=Tambahkan hari ke Tanggal Eksekusi @@ -146,3 +148,5 @@ InfoRejectSubject=Pesanan pembayaran debit langsung ditolak InfoRejectMessage=Halo, <br> <br>, urutan pembayaran debit langsung dari %s yang terkait dengan perusahaan %s, dengan jumlah %s telah ditolak oleh bank. <br> <br> - <br> %s ModeWarning=Opsi untuk mode nyata tidak disetel, kami berhenti setelah simulasi ini ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorICSmissing=Missing ICS in Bank account %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/id_ID/workflow.lang b/htdocs/langs/id_ID/workflow.lang index eab46445c72..c1d6e986377 100644 --- a/htdocs/langs/id_ID/workflow.lang +++ b/htdocs/langs/id_ID/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=Pembuatan Otomatis AutomaticClassification=Pengklasifikasian Otomatis +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/is_IS/accountancy.lang b/htdocs/langs/is_IS/accountancy.lang index c83c3cef1d6..5c45bf600e6 100644 --- a/htdocs/langs/is_IS/accountancy.lang +++ b/htdocs/langs/is_IS/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Date Docref=Reference LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/is_IS/admin.lang b/htdocs/langs/is_IS/admin.lang index a97b287a176..2b6093184ff 100644 --- a/htdocs/langs/is_IS/admin.lang +++ b/htdocs/langs/is_IS/admin.lang @@ -56,6 +56,8 @@ GUISetup=Skoða SetupArea=Skipulag UploadNewTemplate=Upload new template(s) FormToTestFileUploadForm=Form til að prófa skrá hlaða (samkvæmt skipulag) +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled 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. @@ -85,7 +87,6 @@ ShowPreview=Sýna forskoðun ShowHideDetails=Show-Hide details PreviewNotAvailable=Forskoðun er ekki í boði ThemeCurrentlyActive=Þema virk -CurrentTimeZone=PHP-miðlara Tímasvæði 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 @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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ú PurgeNothingToDelete=No directory or files to delete. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Preferred Partners OtherResources=Other resources ExternalResources=External Resources SocialNetworks=Social Networks +SocialNetworkId=Social Network ID ForDocumentationSeeWiki=Notandanafn eða skjölum verktaki '(Doc, FAQs ...), <br> kíkið á Dolibarr Wiki: <br> <a href="%s" target="_blank"><b> %s </b></a> ForAnswersSeeForum=Fyrir einhverjar aðrar spurningar / hjálp, getur þú notað Dolibarr spjall: <br> <a href="%s" target="_blank"><b> %s </b></a> HelpCenterDesc1=Here are some resources for getting help and support with Dolibarr. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Examples with current configuration ListOfDirectories=Listi yfir OpenDocument sniðmát framkvæmdarstjóra 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=Dæmi um setningafræði: <br> c: \\ mydir <br> / Home / mydir <br> DOL_DATA_ROOT / ECM / ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br> Til að vita hvernig á að búa odt skjalið sniðmát, áður en að geyma þá í þeim möppum, lesa wiki skjöl: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Staðsetning firstname / nafn @@ -406,7 +408,7 @@ UrlGenerationParameters=Breytur til að tryggja vefslóðir SecurityTokenIsUnique=Nota einstakt securekey breytu fyrir hvert slóð EnterRefToBuildUrl=Sláðu inn tilvísun til %s mótmæla GetSecuredUrl=Fá reiknað slóð -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +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 @@ -668,7 +670,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 @@ -1306,7 +1308,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,13 @@ ServiceSetup=Þjónusta mát skipulag ProductServiceSetup=Vörur og Þjónusta einingar skipulag 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 tegund til nota fyrir vörur @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=Nýr matseðill MenuHandler=Valmynd dýraþjálfari MenuModule=Heimild mát -HideUnauthorizedMenu= Fela óviðkomandi valmyndir (grátt) +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=Auðkenni Valmynd DetailMenuHandler=Valmynd dýraþjálfari hvar á að birta nýja valmynd DetailMenuModule=Module nafn ef matseðill færsla kemur frá einingu @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/is_IS/banks.lang b/htdocs/langs/is_IS/banks.lang index ca4aef62431..dbe306c9acb 100644 --- a/htdocs/langs/is_IS/banks.lang +++ b/htdocs/langs/is_IS/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/is_IS/blockedlog.lang b/htdocs/langs/is_IS/blockedlog.lang index 4a0e02851e2..ffd835ef987 100644 --- a/htdocs/langs/is_IS/blockedlog.lang +++ b/htdocs/langs/is_IS/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/is_IS/boxes.lang b/htdocs/langs/is_IS/boxes.lang index d1b8a7367be..fdb47cd6d8f 100644 --- a/htdocs/langs/is_IS/boxes.lang +++ b/htdocs/langs/is_IS/boxes.lang @@ -46,9 +46,12 @@ 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=Engin bókamerki skilgreind. Smelltu <a href="%s">hér</a> til að bæta við bókamerki. @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Bókhalds +ValidatedProjects=Validated projects diff --git a/htdocs/langs/is_IS/cashdesk.lang b/htdocs/langs/is_IS/cashdesk.lang index e5ac19f8ff5..244a0b22645 100644 --- a/htdocs/langs/is_IS/cashdesk.lang +++ b/htdocs/langs/is_IS/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=NB af reikningum Paymentnumpad=Type of Pad to enter payment Numberspad=Numbers Pad @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/is_IS/categories.lang b/htdocs/langs/is_IS/categories.lang index 12ea7e5e036..b5b63e566bb 100644 --- a/htdocs/langs/is_IS/categories.lang +++ b/htdocs/langs/is_IS/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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=Fyllingar eiginleika CategoriesSetup=Tags/categories setup diff --git a/htdocs/langs/is_IS/companies.lang b/htdocs/langs/is_IS/companies.lang index 1ec0e068f53..86883bf1c40 100644 --- a/htdocs/langs/is_IS/companies.lang +++ b/htdocs/langs/is_IS/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi VATIntraManualCheck=You can also check manually on the European Commission website <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=Athuga ekki hægt. Athugaðu þjónusta er ekki veitt af aðildarríki ( %s ). NorProspectNorCustomer=Not prospect, nor customer -JuridicalStatus=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=Möguleiki diff --git a/htdocs/langs/is_IS/compta.lang b/htdocs/langs/is_IS/compta.lang index 8a3d0831930..b281068b1a6 100644 --- a/htdocs/langs/is_IS/compta.lang +++ b/htdocs/langs/is_IS/compta.lang @@ -111,7 +111,7 @@ Refund=Refund SocialContributionsPayments=Social/fiscal taxes payments ShowVatPayment=Sýna VSK greiðslu TotalToPay=Samtals borga -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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=Skýrsla um þriðja aðila IRPF VATReport=Sale tax report VATReportByPeriods=Sale tax report by period +VATReportByMonth=Sale tax report by month VATReportByRates=Sale tax report by rates VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer diff --git a/htdocs/langs/is_IS/cron.lang b/htdocs/langs/is_IS/cron.lang index 2d3b08fe463..52aaabab757 100644 --- a/htdocs/langs/is_IS/cron.lang +++ b/htdocs/langs/is_IS/cron.lang @@ -6,14 +6,15 @@ 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 -OrToLaunchASpecificJob=Or to check and launch a specific job +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 environement you can use Scheduled task tools 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 @@ -42,10 +43,11 @@ CronModule=Module CronNoJobs=No jobs registered CronPriority=Forgangur CronLabel=Merki -CronNbRun=Nb. launch -CronMaxRun=Max number launch +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 @@ -56,16 +58,16 @@ CronNote=Athugasemd CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Enable +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Slökkva 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 exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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=Frá @@ -76,8 +78,14 @@ 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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +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' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/is_IS/errors.lang b/htdocs/langs/is_IS/errors.lang index 05a5bca9bb6..82755eaab2b 100644 --- a/htdocs/langs/is_IS/errors.lang +++ b/htdocs/langs/is_IS/errors.lang @@ -5,8 +5,10 @@ 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 er rangt ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=Innskráning %s er þegar til. ErrorGroupAlreadyExists=Group %s er þegar til. ErrorRecordNotFound=Upptaka fannst ekki. @@ -48,6 +50,7 @@ ErrorFieldsRequired=Sumir Nauðsynlegir reitir voru ekki fylltir. ErrorSubjectIsRequired=The email topic is required ErrorFailedToCreateDir=Ekki tókst að búa til möppu. Athugaðu að vefþjóninn notandi hefur réttindi til að skrifa inn Dolibarr skjöl skrá. Ef viðfang <b>safe_mode</b> er virkt á þessu PHP, athuga hvort Dolibarr PHP skrár á nú á netþjóninn notandi (eða hóp). ErrorNoMailDefinedForThisUser=Nei póstur er skilgreind fyrir þennan notanda +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=Þessi aðgerð þarfnast javascript til að virkja til vinnu. Breyting þessi hefur skipulag - sýna. ErrorTopMenuMustHaveAParentWithId0=A valmynd af gerðinni 'Efst' má ekki hafa foreldri valmyndinni. Put 0 í valmyndinni foreldri eða veldu Valmynd af gerðinni 'Vinstri'. ErrorLeftMenuMustHaveAParentId=A valmynd af gerðinni 'Vinstri' verða að hafa foreldri kt. @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=This profile name already exists for this export set. ErrorLDAPSetupNotComplete=Dolibarr-LDAP samsvörun er ekki lokið. ErrorLDAPMakeManualTest=A. LDIF skrá hefur verið búin til í %s . Prófaðu að hlaða það handvirkt úr stjórn lína að hafa meiri upplýsingar um villur. ErrorCantSaveADoneUserWithZeroPercentage=Can't save an action with "status not started" if field "done by" is also filled. -ErrorRefAlreadyExists=Ref notað sköpun er þegar til. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/is_IS/exports.lang b/htdocs/langs/is_IS/exports.lang index 63970ffbd21..a9f6a31bddf 100644 --- a/htdocs/langs/is_IS/exports.lang +++ b/htdocs/langs/is_IS/exports.lang @@ -26,6 +26,8 @@ FieldTitle=Field titill NowClickToGenerateToBuildExportFile=Now, select the file format in the combo box and click on "Generate" to build the export file... AvailableFormats=Available Formats LibraryShort=Bókasafn +ExportCsvSeparator=Csv caracter separator +ImportCsvSeparator=Csv caracter separator Step=Skref 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. @@ -131,3 +133,4 @@ 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/is_IS/mails.lang b/htdocs/langs/is_IS/mails.lang index 0c77e81bb81..6f2c1d0b683 100644 --- a/htdocs/langs/is_IS/mails.lang +++ b/htdocs/langs/is_IS/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Lína %s í skrá @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Tilkynningar -NoNotificationsWillBeSent=Engar tilkynningar í tölvupósti er mjög spennandi fyrir þennan atburð og fyrirtæki -ANotificationsWillBeSent=1 tilkynning verður send með tölvupósti -SomeNotificationsWillBeSent=%s tilkynningar verða sendar í tölvupósti -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=Sýna allar tilkynningar í tölvupósti sendi +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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +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/is_IS/main.lang b/htdocs/langs/is_IS/main.lang index 55729865831..0c0dae311ad 100644 --- a/htdocs/langs/is_IS/main.lang +++ b/htdocs/langs/is_IS/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=No template available for this email type AvailableVariables=Available substitution variables NoTranslation=No translation Translation=Þýðing +CurrentTimeZone=PHP-miðlara Tímasvæði EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria NoRecordFound=No record found NoRecordDeleted=No record deleted NotEnoughDataYet=Not enough data @@ -85,6 +87,8 @@ FileWasNotUploaded=A-skrá er valin fyrir viðhengi en var ekki enn upp. Smelltu NbOfEntries=No. of entries GoToWikiHelpPage=Read online help (Internet access needed) GoToHelpPage=Lestu hjálpina +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Home Page RecordSaved=Upptaka vistuð RecordDeleted=Record deleted RecordGenerated=Record generated @@ -220,6 +224,7 @@ Value=Gildi PersonalValue=Starfsfólk gildi NewObject=New %s NewValue=Nýtt gildi +OldValue=Old value %s CurrentValue=Núverandi gildi Code=Code Type=Tegund @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Valkostur +Filters=Filters List=Listi FullList=Sjá lista FullConversation=Full conversation @@ -650,6 +656,7 @@ SupplierPreview=Vendor preview ShowCustomerPreview=Sýna viðskiptavinum sýnishorn ShowSupplierPreview=Show vendor preview RefCustomer=Tilv. viðskiptavina +InternalRef=Internal ref. Currency=Gjaldmiðill InfoAdmin=Upplýsingar fyrir stjórnendur Undo=Hætta við @@ -671,7 +678,7 @@ SendMail=Senda tölvupóst Email=Email NoEMail=No email AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=No mobile phone Owner=Eigandi FollowingConstantsWillBeSubstituted=Eftir Fastar verður staðgengill með samsvarandi gildi. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/is_IS/modulebuilder.lang b/htdocs/langs/is_IS/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/is_IS/modulebuilder.lang +++ b/htdocs/langs/is_IS/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/is_IS/mrp.lang b/htdocs/langs/is_IS/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/is_IS/mrp.lang +++ b/htdocs/langs/is_IS/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/is_IS/other.lang b/htdocs/langs/is_IS/other.lang index 6eef3ff2036..fb1ea9d9c80 100644 --- a/htdocs/langs/is_IS/other.lang +++ b/htdocs/langs/is_IS/other.lang @@ -5,8 +5,6 @@ Tools=Verkfæri 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=Afmæli -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=afmæli viðvörun virk BirthdayAlertOff=afmæli viðvörun óvirk TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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=Fjöldi meðfylgjandi skrá / gögn TotalSizeOfAttachedFiles=Heildarstærð meðfylgjandi skrá / gögn @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Hægri CalculatedWeight=Reiknað þyngd CalculatedVolume=Reiknað magn Weight=Þyngd -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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=Innflutningur gögnum DolibarrNotification=Sjálfvirk tilkynning ResizeDesc=Sláðu inn nýja breidd <b>EÐA</b> nýja hæð. Hlutfall verður haldið á resizing ... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Útflutningur area diff --git a/htdocs/langs/is_IS/products.lang b/htdocs/langs/is_IS/products.lang index 028eea77a82..a43c32766fd 100644 --- a/htdocs/langs/is_IS/products.lang +++ b/htdocs/langs/is_IS/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Fjöldi verð DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +CustomCode=Customs|Commodity|HS code CountryOrigin=Uppruni land +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Nature of product (material/finished) NatureOfProductShort=Nature of product NatureOfProductDesc=Raw material or finished product @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/is_IS/projects.lang b/htdocs/langs/is_IS/projects.lang index f48818ff1f4..8e693b106e7 100644 --- a/htdocs/langs/is_IS/projects.lang +++ b/htdocs/langs/is_IS/projects.lang @@ -76,15 +76,16 @@ MyActivities=verkefni mín / starfsemi MyProjects=Verkefnin mín MyProjectsArea=My projects Area DurationEffective=Árangursrík Lengd -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Tími +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/is_IS/recruitment.lang b/htdocs/langs/is_IS/recruitment.lang index feaa40a6de2..411fc152c09 100644 --- a/htdocs/langs/is_IS/recruitment.lang +++ b/htdocs/langs/is_IS/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/is_IS/sendings.lang b/htdocs/langs/is_IS/sendings.lang index b498380aa64..9bb3e783a22 100644 --- a/htdocs/langs/is_IS/sendings.lang +++ b/htdocs/langs/is_IS/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Aðrar sendingar fyrir þessari röð SendingsAndReceivingForSameOrder=Shipments and receipts for this order SendingsToValidate=Sendi til að sannreyna StatusSendingCanceled=Hætt við +StatusSendingCanceledShort=Hætt við StatusSendingDraft=Víxill StatusSendingValidated=Staðfestar (vörur til skip eða þegar flutt) StatusSendingProcessed=Afgreitt @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=Meira heill skjal líkan fyrir kvittunum sending (logo. ..) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER skilgreind ekki SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/is_IS/stocks.lang b/htdocs/langs/is_IS/stocks.lang index eb22f8deba6..9741ab77235 100644 --- a/htdocs/langs/is_IS/stocks.lang +++ b/htdocs/langs/is_IS/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/is_IS/ticket.lang b/htdocs/langs/is_IS/ticket.lang index 956e3b0a629..113be596543 100644 --- a/htdocs/langs/is_IS/ticket.lang +++ b/htdocs/langs/is_IS/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Önnur TicketSeverityShortLOW=Low TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=Hár -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Lesa Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/is_IS/website.lang b/htdocs/langs/is_IS/website.lang index 5f3b13b98b1..bcec388e753 100644 --- a/htdocs/langs/is_IS/website.lang +++ b/htdocs/langs/is_IS/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/is_IS/withdrawals.lang b/htdocs/langs/is_IS/withdrawals.lang index 755bbeb6aee..2390a284ffe 100644 --- a/htdocs/langs/is_IS/withdrawals.lang +++ b/htdocs/langs/is_IS/withdrawals.lang @@ -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>. ClassCredited=Flokka fært @@ -131,7 +132,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,3 +148,5 @@ 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=Valkostur fyrir alvöru ham var ekki sett, að hætta við eftir þessa uppgerð ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorICSmissing=Missing ICS in Bank account %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/is_IS/workflow.lang b/htdocs/langs/is_IS/workflow.lang index 8f682447322..50064fb4035 100644 --- a/htdocs/langs/is_IS/workflow.lang +++ b/htdocs/langs/is_IS/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 diff --git a/htdocs/langs/it_CH/compta.lang b/htdocs/langs/it_CH/compta.lang deleted file mode 100644 index c7c41488180..00000000000 --- a/htdocs/langs/it_CH/compta.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - compta -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account diff --git a/htdocs/langs/it_CH/mrp.lang b/htdocs/langs/it_CH/mrp.lang new file mode 100644 index 00000000000..f03d631dfd4 --- /dev/null +++ b/htdocs/langs/it_CH/mrp.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - mrp +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? diff --git a/htdocs/langs/it_CH/products.lang b/htdocs/langs/it_CH/products.lang index 6e900475275..2a38b9b0181 100644 --- a/htdocs/langs/it_CH/products.lang +++ b/htdocs/langs/it_CH/products.lang @@ -1,2 +1,2 @@ # Dolibarr language file - Source file is en_US - products -CustomCode=Customs / Commodity / HS code +AssociatedProductsAbility=Enable Kits (set of several products) diff --git a/htdocs/langs/it_IT/accountancy.lang b/htdocs/langs/it_IT/accountancy.lang index efd66d86cb6..7651e63da89 100644 --- a/htdocs/langs/it_IT/accountancy.lang +++ b/htdocs/langs/it_IT/accountancy.lang @@ -16,6 +16,8 @@ ThisService=Questo servizio ThisProduct=Questo prodotto DefaultForService=Predefinito per servizio DefaultForProduct=Predefinito per prodotto +ProductForThisThirdparty=Product for this thirdparty +ServiceForThisThirdparty=Service for this thirdparty CantSuggest=Non posso suggerire AccountancySetupDoneFromAccountancyMenu=La maggior parte del setup della contabilità è effettuata dal menù %s ConfigAccountingExpert=Configuration of the module accounting (double entry) @@ -48,6 +50,7 @@ CountriesExceptMe=Tutti i paesi eccetto %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=Account principale di contabilità per i clienti non definito nel setup MainAccountForSuppliersNotDefined=Account principale di contabilità per fornitori non definito nel setup @@ -144,7 +147,7 @@ NotVentilatedinAccount=Non collegato al piano dei conti XLineSuccessfullyBinded=%sprodotti/servizi correttamente collegato ad un piano dei conti XLineFailedToBeBinded=%sprodotti/servizi non collegato a nessun piano dei conti -ACCOUNTING_LIMIT_LIST_VENTILATION=Numero di elementi da associare mostrato per pagina (massimo raccomandato: 50) +ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Inizia ad ordinare la pagina "Associazioni da effettuare" dagli elementi più recenti ACCOUNTING_LIST_SORT_VENTILATION_DONE=Inizia ad ordinare la pagina "Associazioni effettuate" dagli elementi più recenti @@ -198,7 +201,8 @@ Docdate=Data Docref=Riferimento LabelAccount=Etichetta conto LabelOperation=Etichetta operazione -Sens=Verso +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=Codice impressioni Lettering=Impressioni Codejournal=Giornale @@ -206,7 +210,8 @@ JournalLabel=Etichetta del giornale NumPiece=Numero del pezzo TransactionNumShort=Num. transazione AccountingCategory=Gruppi personalizzati -GroupByAccountAccounting=Raggruppamento piano dei conti +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. ByAccounts=Per conto ByPredefinedAccountGroups=Per gruppi predefiniti @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Saldo di apertura ShowOpeningBalance=Mostra bilancio di apertura HideOpeningBalance=Nascondi bilancio di apertura -ShowSubtotalByGroup=Mostra totale parziale per gruppo +ShowSubtotalByGroup=Show subtotal by level Pcgtype=Gruppo di conto PcgtypeDesc=Il gruppo di conti viene utilizzato come criterio 'filtro' e 'raggruppamento' predefiniti per alcuni report contabili. Ad esempio, "REDDITO" o "SPESA" sono utilizzati come gruppi per la contabilità dei prodotti per creare il rapporto spese / entrate. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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=Consultare qui il numero di movimenti per mese che non sono stati convalidati e gli anni fiscali già aperti OverviewOfMovementsNotValidated=Passaggio 1 / Panoramica dei movimenti non convalidati. (Necessario per chiudere un anno fiscale) +AllMovementsWereRecordedAsValidated=All movements were recorded as validated +NotAllMovementsCouldBeRecordedAsValidated=Not all movements could be recorded as validated ValidateMovements=Convalida i movimenti DescValidateMovements=Qualsiasi modifica o cancellazione di scrittura, lettura e cancellazione sarà vietata. Tutte le voci per un esercizio devono essere convalidate altrimenti la chiusura non sarà possibile -SelectMonthAndValidate=Seleziona il mese e convalida i movimenti ValidateHistory=Collega automaticamente AutomaticBindingDone=Collegamento automatico fatto @@ -293,6 +300,7 @@ Accounted=Accounted in ledger NotYetAccounted=Not yet accounted in ledger ShowTutorial=Mostra tutorial NotReconciled=Non conciliata +WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view ## Admin BindingOptions=Binding options @@ -337,6 +345,7 @@ Modelcsv_LDCompta10=Esporta per LD Compta (v10 e successive) Modelcsv_openconcerto=Export for OpenConcerto (Test) Modelcsv_configurable=Export CSV Configurable Modelcsv_FEC=Export FEC +Modelcsv_FEC2=Export FEC (With dates generation writing / document reversed) Modelcsv_Sage50_Swiss=Export for Sage 50 Switzerland Modelcsv_winfic=Esporta Winfic - eWinfic - WinSis Compta Modelcsv_Gestinumv3=Export for Gestinum (v3) @@ -381,7 +390,7 @@ 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) +ErrorNoAccountingCategoryForThisCountry=Nessun gruppo di piano dei conti disponibile per il paese %s ( Vedi Home - Impostazioni - Dizionari ) 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=Alcune righe della fattura non sono collegato a un piano dei conti. ExportNotSupported=Il formato di esportazione configurato non è supportato in questa pagina diff --git a/htdocs/langs/it_IT/admin.lang b/htdocs/langs/it_IT/admin.lang index b20c40b7563..29b516e2c33 100644 --- a/htdocs/langs/it_IT/admin.lang +++ b/htdocs/langs/it_IT/admin.lang @@ -56,6 +56,8 @@ GUISetup=Aspetto grafico e lingua SetupArea=Impostazioni UploadNewTemplate=Carica nuovi modelli FormToTestFileUploadForm=Modulo per provare il caricamento file (secondo la configurazione) +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled 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. @@ -85,7 +87,6 @@ ShowPreview=Vedi anteprima ShowHideDetails=Show-Hide details PreviewNotAvailable=Anteprima non disponibile ThemeCurrentlyActive=Tema attualmente attivo -CurrentTimeZone=Fuso orario attuale 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=Spazio @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Cancella fle temporanei +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 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 PurgeNothingToDelete=Nessuna directory o file da eliminare. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Preferred Partners OtherResources=Altre risorse ExternalResources=Risorse esterne SocialNetworks=Social Networks +SocialNetworkId=Social Network ID ForDocumentationSeeWiki=La documentazione per utenti e sviluppatori e le FAQ sono disponibili sul wiki di Dolibarr: <br/>Dai un'occhiata a <a href="%s" target="_blank"><b> %s</b></a> ForAnswersSeeForum=Per qualsiasi altro problema/domanda, si può utilizzare il forum di Dolibarr: <br> <a href="%s" target="_blank"><b>%s</b></a> HelpCenterDesc1=Here are some resources for getting help and support with Dolibarr. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Esempi di funzionamento secondo la configurazione attua ListOfDirectories=Elenco delle directory dei modelli OpenDocument ListOfDirectoriesForModelGenODT=Lista di cartelle contenenti file modello in formato OpenDocument.<br><br>Inserisci qui il percorso completo delle cartelle.<br>Digitare un 'Invio' tra ciascuna cartella.<br>Per aggiungere una cartella del modulo GED, inserire qui <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b>.<br><br>I file in quelle cartelle devono terminare con <b>.odt</b> o <b>.ods</b>. NumberOfModelFilesFound=Number of ODT/ODS template files found in these directories -ExampleOfDirectoriesForModelGen=Esempi di sintassi: <br/> c: dir \\ <br/> /Home/mydir <br/> DOL_DATA_ROOT/ECM/ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br/>Per sapere come creare i modelli di documento odt, prima di salvarli in queste directory, leggere la documentazione wiki: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Posizione del cognome/nome @@ -406,7 +408,7 @@ UrlGenerationParameters=Parametri di generazione degli indirizzi SecurityTokenIsUnique=Utilizzare un unico parametro securekey per ogni URL EnterRefToBuildUrl=Inserisci la reference per l'oggetto %s GetSecuredUrl=Prendi URL calcolato -ButtonHideUnauthorized=Nascondi i pulsanti per azioni non autorizzate anziché mostrare i pulsanti disabilitati +ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) OldVATRates=Vecchia aliquota IVA NewVATRates=Nuova aliquota IVA PriceBaseTypeToChange=Modifica i prezzi con la valuta di base definita. @@ -668,7 +670,7 @@ Module54000Desc=Direct print (without opening the documents) using Cups IPP inte Module55000Name=Sondaggio, Indagine o Votazione Module55000Desc=Modulo per creare sondaggi, indagini o feedback online (Doodle, Studs, Rdvz o simili) Module59000Name=Margini -Module59000Desc=Modulo per gestire margini +Module59000Desc=Module to follow margins Module60000Name=Commissioni Module60000Desc=Modulo per gestire commissioni Module62000Name=Import-Export @@ -1306,7 +1308,7 @@ 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=Ottimizzazione della ricerca -YouHaveXObjectUseSearchOptim=You have %s %s in the database. You should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,13 @@ ServiceSetup=Impostazioni modulo servizi ProductServiceSetup=Impostazioni moduli prodotti e servizi 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=Tipo di codici a barre predefinito da utilizzare per i prodotti @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=Nuovo menu MenuHandler=Gestore menu MenuModule=Modulo sorgente -HideUnauthorizedMenu= Nascondere i menu non autorizzati +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=Id menu DetailMenuHandler=Gestore menu dove mostrare il nuovo menu DetailMenuModule=Nome del modulo, per le voci di menu provenienti da un modulo @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=CAP MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/it_IT/banks.lang b/htdocs/langs/it_IT/banks.lang index 67051003cf9..0391c90cf1b 100644 --- a/htdocs/langs/it_IT/banks.lang +++ b/htdocs/langs/it_IT/banks.lang @@ -173,10 +173,11 @@ SEPAMandate=Mandato SEPA 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 fence -NewCashFence=New cash fence +CashControl=POS cash desk control +NewCashFence=New cash desk 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 diff --git a/htdocs/langs/it_IT/bills.lang b/htdocs/langs/it_IT/bills.lang index 930f6948a9e..fb10fd9b8d9 100644 --- a/htdocs/langs/it_IT/bills.lang +++ b/htdocs/langs/it_IT/bills.lang @@ -379,7 +379,7 @@ InvoiceAutoValidate=Convalida le fatture automaticamente GeneratedFromRecurringInvoice=Fattura ricorrente %s generata dal modello DateIsNotEnough=Data non ancora raggiunta InvoiceGeneratedFromTemplate=Fattura %s generata da modello ricorrente %s -GeneratedFromTemplate=Generated from template invoice %s +GeneratedFromTemplate=Generata dal modello di fattura %s WarningInvoiceDateInFuture=Attenzione, la data della fattura è successiva alla data odierna WarningInvoiceDateTooFarInFuture=Attenzione, la data della fattura è troppo lontana dalla data odierna ViewAvailableGlobalDiscounts=Mostra gli sconti disponibili @@ -531,6 +531,7 @@ TypeContact_invoice_supplier_external_SERVICE=Vendor service contact InvoiceFirstSituationAsk=Prima fattura di avanzamento lavori InvoiceFirstSituationDesc=La <b>fatturazione ad avanzamento lavori</b> è collegata a una progressione e a un avanzamento dello stato del lavoro, ad esempio la progressione di una costruzione. Ogni avanzamento lavori è legato a una fattura. InvoiceSituation=Fattura ad avanzamento lavori +PDFInvoiceSituation=Fattura di avanzamento lavori InvoiceSituationAsk=Fattura a seguito di avanzamento lavori InvoiceSituationDesc=Crea un nuovo avanzamento lavori a seguito di uno già esistente SituationAmount=Importo della fattura di avanzamento lavori (al netto delle imposte) @@ -575,3 +576,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Fattura fornitore eliminata UnitPriceXQtyLessDiscount=Prezzo unitario x Qtà - Sconto CustomersInvoicesArea=Area fatturazione clienti SupplierInvoicesArea=Area di fatturazione del fornitore +FacParentLine=Genitore riga fattura +SituationTotalRayToRest=Resto da pagare senza tasse +PDFSituationTitle=Situazione n ° %d +SituationTotalProgress=Avanzamento totale %d %% diff --git a/htdocs/langs/it_IT/blockedlog.lang b/htdocs/langs/it_IT/blockedlog.lang index 7a37bfa4034..98846601074 100644 --- a/htdocs/langs/it_IT/blockedlog.lang +++ b/htdocs/langs/it_IT/blockedlog.lang @@ -22,8 +22,8 @@ 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_PAYED=Fattura attiva pagata +logBILL_UNPAYED=Fattura attiva impostata "non pagata" logBILL_VALIDATE=Convalida fattura attiva logBILL_SENTBYMAIL=Customer invoice send by mail logBILL_DELETE=Customer invoice logically deleted @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Registrazione chiusura cassa BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/it_IT/boxes.lang b/htdocs/langs/it_IT/boxes.lang index 9c5a07767a4..c9877141918 100644 --- a/htdocs/langs/it_IT/boxes.lang +++ b/htdocs/langs/it_IT/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=Ultime %s donazioni modificate BoxTitleLastModifiedExpenses=Ultime %s note spese modificate BoxTitleLatestModifiedBoms=Ultime %s distinte componenti modificate BoxTitleLatestModifiedMos=Ultimi %s ordini di produzione modificati +BoxTitleLastOutstandingBillReached=Clienti con il massimo in sospeso superato BoxGlobalActivity=Attività generale (fatture, proposte, ordini) BoxGoodCustomers=Buoni clienti BoxTitleGoodCustomers=%s Buoni clienti +BoxScheduledJobs=Processi pianificati +BoxTitleFunnelOfProspection=Imbuto di piombo FailedToRefreshDataInfoNotUpToDate=Aggiornamento del flusso RSS fallito. Data dell'ultimo aggiornamento valido: %s LastRefreshDate=Data dell'ultimo aggiornamento NoRecordedBookmarks=Nessun segnalibro presente @@ -83,8 +86,8 @@ BoxTitleLatestModifiedSupplierOrders=Ordini fornitore: ultimi %s modificati BoxTitleLastModifiedCustomerBills=Fatture attive: ultime %s modificate BoxTitleLastModifiedCustomerOrders=Ordini: ultimi %s modificati BoxTitleLastModifiedPropals=Ultime %s proposte modificate -BoxTitleLatestModifiedJobPositions=Latest %s modified jobs -BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures +BoxTitleLatestModifiedJobPositions=Ultimi %s jobs modificati +BoxTitleLatestModifiedCandidatures=Ultime candidature modificate %s ForCustomersInvoices=Fatture attive ForCustomersOrders=Ordini cliente ForProposals=Proposte @@ -92,8 +95,8 @@ LastXMonthRolling=Ultimi %s mesi ChooseBoxToAdd=Aggiungi widget alla dashboard BoxAdded=Widget aggiunto al pannello principale BoxTitleUserBirthdaysOfMonth=Compleanni di questo mese (utenti) -BoxLastManualEntries=Ultime registrazioni manuali in contabilità -BoxTitleLastManualEntries=%s ultime voci del manuale +BoxLastManualEntries=Latest record in accountancy entered manually or without source document +BoxTitleLastManualEntries=%s latest record entered manually or without source document NoRecordedManualEntries=Nessuna registrazione manuale registrata in contabilità BoxSuspenseAccount=Conta l'operazione contabile con l'account suspense BoxTitleSuspenseAccount=Numero di righe non allocate @@ -102,5 +105,7 @@ SuspenseAccountNotDefined=L'account Suspense non è definito BoxLastCustomerShipments=Ultime spedizioni cliente BoxTitleLastCustomerShipments=Ultime %s spedizioni cliente NoRecordedShipments=Nessuna spedizione cliente registrata +BoxCustomersOutstandingBillReached=Clienti con limite eccezionale raggiunto # Pages AccountancyHome=Contabilità +ValidatedProjects=Progetti convalidati diff --git a/htdocs/langs/it_IT/cashdesk.lang b/htdocs/langs/it_IT/cashdesk.lang index da0aaa59816..b8069c4f189 100644 --- a/htdocs/langs/it_IT/cashdesk.lang +++ b/htdocs/langs/it_IT/cashdesk.lang @@ -47,10 +47,10 @@ Receipt=Ricevuta Header=Header Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) -TheoricalAmount=Theorical amount +TheoricalAmount=Importo teorico RealAmount=Real amount -CashFence=Cassetta dei contanti -CashFenceDone=Cash fence done for the period +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=Numero di fatture Paymentnumpad=Type of Pad to enter payment Numberspad=Numbers Pad @@ -99,8 +99,9 @@ CashDeskRefNumberingModules=Modulo di numerazione per vendite POS CashDeskGenericMaskCodes6 = <br> Il tag <b> {TN} </b> viene utilizzato per aggiungere il numero del terminale TakeposGroupSameProduct=Raggruppa le stesse linee di prodotti StartAParallelSale=Inizia una nuova vendita parallela -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Chiudi cassetta contanti +SaleStartedAt=Sale started at %s +ControlCashOpening=Control cash popup at opening POS +CloseCashFence=Close cash desk control CashReport=Rapporto di cassa MainPrinterToUse=Stampante principale da utilizzare OrderPrinterToUse=Ordine stampante da utilizzare @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/it_IT/categories.lang b/htdocs/langs/it_IT/categories.lang index 7d60396caab..8de361ac0e1 100644 --- a/htdocs/langs/it_IT/categories.lang +++ b/htdocs/langs/it_IT/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=Area tag/categorie progetti UsersCategoriesArea=Users tags/categories area SubCats=Sub-categorie CatList=Lista delle tag/categorie +CatListAll=Elenco di tag / categorie (tutti i tipi) NewCategory=Nuova tag/categoria ModifCat=Modifica tag/categoria CatCreated=Tag/categoria creata @@ -65,28 +66,34 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Tag / categorie di magazzino ThisCategoryHasNoItems=Questa categoria non contiene alcun elemento. CategId=ID Tag/categoria -CatSupList=List of vendor tags/categories -CatCusList=Lista delle tag/categorie clienti +ParentCategory=Tag / categoria principale +ParentCategoryLabel=Etichetta del tag / categoria principale +CatSupList=Elenco di tag / categorie di fornitori +CatCusList=Elenco di tag / categorie di clienti / potenziali clienti CatProdList=Elenco delle tag/categorie prodotti CatMemberList=Lista delle tag/categorie membri -CatContactList=Lista delle tag/categorie contatti -CatSupLinks=Collegamenti tra fornitori e tag/categorie +CatContactList=Elenco di tag / categorie di contatti +CatProjectsList=Elenco di tag / categorie di progetti +CatUsersList=Elenco di tag / categorie di utenti +CatSupLinks=Collegamenti tra fornitori e tag / categorie CatCusLinks=Collegamenti tra clienti e tag/categorie CatContactsLinks=Collegamento fra: contatti/indirizzi e tags/categorie CatProdLinks=Collegamenti tra prodotti/servizi e tag/categorie -CatProJectLinks=Collegamenti tra progetti e tag/categorie +CatMembersLinks=Collegamenti tra membri e tag/categorie +CatProjectsLinks=Collegamenti tra progetti e tag/categorie +CatUsersLinks=Collegamenti tra utenti e tag / categorie DeleteFromCat=Elimina dalla tag/categoria ExtraFieldsCategories=Campi extra CategoriesSetup=Impostazioni Tag/categorie CategorieRecursiv=Collega automaticamente alla tag/categoria padre CategorieRecursivHelp=If option is on, when you add a product into a subcategory, product will also be added into the parent category. AddProductServiceIntoCategory=Aggiungi il seguente prodotto/servizio -AddCustomerIntoCategory=Assign category to customer -AddSupplierIntoCategory=Assign category to supplier +AddCustomerIntoCategory=Assegna la categoria al cliente +AddSupplierIntoCategory=Assegna la categoria al fornitore ShowCategory=Mostra tag/categoria ByDefaultInList=Default nella lista ChooseCategory=Choose category StocksCategoriesArea=Categorie magazzini ActionCommCategoriesArea=Categorie eventi -WebsitePagesCategoriesArea=Page-Container 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 703fa6018f2..a5ca94be7b1 100644 --- a/htdocs/langs/it_IT/companies.lang +++ b/htdocs/langs/it_IT/companies.lang @@ -144,7 +144,7 @@ ProfId3BR=IM (Inscricao Municipal) ProfId4BR=CPF #ProfId5BR=CNAE #ProfId6BR=INSS -ProfId1CH=UID-Nummer +ProfId1CH=Numero UID ProfId2CH=- ProfId3CH=numero federale ProfId4CH=numero registrazione commerciale @@ -282,11 +282,11 @@ CustomerAbsoluteDiscountShort=Sconto assoluto CompanyHasRelativeDiscount=Il cliente ha uno sconto del <b> %s%% </b> CompanyHasNoRelativeDiscount=Il cliente non ha alcuno sconto relativo impostato HasRelativeDiscountFromSupplier=Hai uno sconto predefinito di <b>%s%%</b> da questo fornitore -HasNoRelativeDiscountFromSupplier=You have no default relative discount from this vendor +HasNoRelativeDiscountFromSupplier=Non esistono sconti relativi predefiniti per questo fornitore\n CompanyHasAbsoluteDiscount=Questo cliente ha degli sconti disponibili (note di credito o anticipi) per un totale di <b>%s</b>%s CompanyHasDownPaymentOrCommercialDiscount=Questo cliente ha uno sconto disponibile (commerciale, anticipi) per <b>%s</b>%s CompanyHasCreditNote=Il cliente ha ancora note di credito per <b> %s %s </b> -HasNoAbsoluteDiscountFromSupplier=You have no discount credit available from this vendor +HasNoAbsoluteDiscountFromSupplier=Il fornitore non ha disponibile alcuno sconto assoluto per credito 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 @@ -358,8 +358,8 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi VATIntraManualCheck=È anche possibile controllare manualmente sul sito della Commissione Europea <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=Non è possibile effettuare il controllo. Servizio non previsto per lo stato membro ( %s). NorProspectNorCustomer=Né cliente, né cliente potenziale -JuridicalStatus=Forma giuridica -Workforce=Workforce +JuridicalStatus=Tipo di entità aziendale +Workforce=Forza lavoro Staff=Dipendenti ProspectLevelShort=Cl. Pot. ProspectLevel=Liv. cliente potenziale @@ -462,8 +462,8 @@ PaymentTermsSupplier=Termine di pagamento - Fornitore PaymentTypeBoth=Tipo di pagamento - Cliente e fornitore MulticurrencyUsed=Use Multicurrency MulticurrencyCurrency=Valuta -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=Europa (CEE) +RestOfEurope=Resto d'Europa (CEE) +OutOfEurope=Fuori dall'Europa (CEE) +CurrentOutstandingBillLate=Fatture scadute in ritardo +BecarefullChangeThirdpartyBeforeAddProductToInvoice=Fai attenzione, a seconda delle impostazioni del prezzo del prodotto, dovresti cambiare terze parti prima di aggiungere il prodotto al POS. diff --git a/htdocs/langs/it_IT/compta.lang b/htdocs/langs/it_IT/compta.lang index 8243a338ffc..a7638fb2824 100644 --- a/htdocs/langs/it_IT/compta.lang +++ b/htdocs/langs/it_IT/compta.lang @@ -111,7 +111,7 @@ Refund=Rimborso SocialContributionsPayments=Pagamenti tasse/contributi ShowVatPayment=Visualizza pagamento IVA TotalToPay=Totale da pagare -BalanceVisibilityDependsOnSortAndFilters=Il bilancio è visibile in questo elenco solo se la tabella è ordinata in verso ascendente per %s e filtrata per un conto bancario +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=Cod. cont. cliente @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Sei sicuro di voler cancellare il pagamento di q 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> -CalcModeDebt=Analisi delle fatture registrate anche se non sono ancora contabilizzate nel libro mastro. +CalcModeDebt=Analysis of known recorded documents even if they are not yet accounted in ledger. CalcModeEngagement=Analisi dei pagamenti registrati, anche se non ancora contabilizzati nel libro mastro. CalcModeBookkeeping=Analysis of data journalized in Bookkeeping Ledger table. CalcModeLT1= Modalità <b>%sRE su fatture clienti - fatture fornitori%s</b> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Bilancio di entrate e uscite, sintesi annuale 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=Vedi %sanalisi dei pagamenti%s per un calcolo sui pagamenti effettivi effettuati anche se non ancora contabilizzati nel libro mastro. -SeeReportInDueDebtMode=Vedi %sanalisi delle fatture %s per un calcolo basato sulle fatture registrate anche se non ancora contabilizzate nel libro mastro. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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=- Gli importi indicati sono tasse incluse RulesResultDue=- Include fatture in sospeso, spese, IVA, donazioni, indipendentemente dal fatto che siano pagate o meno. Comprende anche gli stipendi pagati. <br> - Si basa sulla data di fatturazione delle fatture e sulla data di scadenza delle spese o dei pagamenti delle imposte. Per gli stipendi definiti con il modulo Salario, viene utilizzata la data valuta del pagamento. RulesResultInOut=- Include i pagamenti reali di fatture, spese e IVA. <br>- Si basa sulle date di pagamento di fatture, spese e IVA. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting SeePageForSetup=See menu <a href="%s">%s</a> for setup DepositsAreNotIncluded=- Down payment invoices are not included DepositsAreIncluded=- Sono incluse le fatture d'acconto +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=IRPF soggetti terzi(Spagna) 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 @@ -208,7 +211,7 @@ DescPurchasesJournal=Storico acquisti CodeNotDef=Non definito WarningDepositsNotIncluded=Down payment invoices are not included in this version with this accountancy module. DatePaymentTermCantBeLowerThanObjectDate=La data termine di pagamento non può essere anteriore alla data dell'oggetto -Pcg_version=Chart of accounts models +Pcg_version=Modelli piano dei conti Pcg_type=Tipo pcg Pcg_subtype=Sottotipo Pcg InvoiceLinesToDispatch=Riga di fattura da spedire *consegnare diff --git a/htdocs/langs/it_IT/cron.lang b/htdocs/langs/it_IT/cron.lang index bc04e98bec5..988a944ddfd 100644 --- a/htdocs/langs/it_IT/cron.lang +++ b/htdocs/langs/it_IT/cron.lang @@ -7,13 +7,14 @@ Permission23103 = Elimina processo pianificato Permission23104 = Esegui processo pianificato # Admin CronSetup=Impostazione delle azioni pianificate -URLToLaunchCronJobs=URL per controllare ed eseguire i processi in cron -OrToLaunchASpecificJob=O per lanciare un processo specifico +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=Chiave di sicurezza per l'URL che lancia i processi pianificati FileToLaunchCronJobs=Riga di comando per controllare e lanciare i processi pianificati in cron CronExplainHowToRunUnix=In ambienti Unix per lanciare il comando ogni 5 minuti dovresti usare la seguente riga di crontab CronExplainHowToRunWin=In ambienti Microsoft(tm) Windows per lanciare il comando ogni 5 minuti dovresti usare le operazioni pianificate CronMethodDoesNotExists=La classe %s non contiene alcune metodo %s +CronMethodNotAllowed=Method %s of class %s is in blacklist of forbidden methods CronJobDefDesc=I profili cron sono definiti nel file di descrizione del modulo. Quando il modulo viene attivao, vengono caricati e resi disponivbili permettendoti di amministrare i processi dal menu strumenti amministrazione %s. CronJobProfiles=Lista dei profili cron predefiniti # Menu @@ -46,6 +47,7 @@ CronNbRun=Num. lancio CronMaxRun=Numero massimo di lanci CronEach=Ogni JobFinished=Processo eseguito e completato +Scheduled=Scheduled #Page card CronAdd= Aggiungi processo CronEvery=Esegui ogni processo @@ -56,7 +58,7 @@ CronNote=Commento CronFieldMandatory=Il campo %s è obbligatorio CronErrEndDateStartDt=La data di fine non può essere precedente a quella di inizio StatusAtInstall=Stato all'installazione del modulo -CronStatusActiveBtn=Abilita +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Disattiva CronTaskInactive=Questo processo è disabilitato CronId=Id @@ -82,3 +84,8 @@ MakeLocalDatabaseDumpShort=Backup del database locale MakeLocalDatabaseDump=Create a local database dump. Parameters are: compression ('gz' or 'bz' or 'none'), backup type ('mysql' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep WarningCronDelayed=Attenzione, per motivi di performance, qualunque sia la data della prossima esecuzione dei processi attivi, i tuoi processi possono essere ritardati di un massimo di %s ore prima di essere eseguiti DATAPOLICYJob=Pulizia dei dati e anonimizzatore +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/it_IT/deliveries.lang b/htdocs/langs/it_IT/deliveries.lang index bc6a34e0149..a24bb962dac 100644 --- a/htdocs/langs/it_IT/deliveries.lang +++ b/htdocs/langs/it_IT/deliveries.lang @@ -27,5 +27,6 @@ Recipient=Destinatario ErrorStockIsNotEnough=Non ci sono sufficienti scorte Shippable=Disponibile per spedizione NonShippable=Non disponibile per spedizione +ShowShippableStatus=Mostra lo stato di spedizione ShowReceiving=Mostra ricevuta di consegna NonExistentOrder=Ordine inesistente diff --git a/htdocs/langs/it_IT/ecm.lang b/htdocs/langs/it_IT/ecm.lang index f14a0514d5c..0eef308f02a 100644 --- a/htdocs/langs/it_IT/ecm.lang +++ b/htdocs/langs/it_IT/ecm.lang @@ -23,7 +23,7 @@ ECMSearchByKeywords=Ricerca per parole chiave ECMSearchByEntity=Ricerca per oggetto ECMSectionOfDocuments=Directory dei documenti ECMTypeAuto=Automatico -ECMDocsBy=Documents linked to %s +ECMDocsBy=Documenti collegati a %s ECMNoDirectoryYet=Nessuna directory creata ShowECMSection=Visualizza la directory DeleteSection=Eliminare la directory @@ -38,6 +38,6 @@ ReSyncListOfDir=Aggiorna la lista delle cartelle HashOfFileContent=Hash contenuto file NoDirectoriesFound=Nessuna cartella trovata FileNotYetIndexedInDatabase=File non indicizzato nel database (prova a caricarlo di nuovo) -ExtraFieldsEcmFiles=Extrafields Ecm Files -ExtraFieldsEcmDirectories=Extrafields Ecm Directories -ECMSetup=ECM Setup +ExtraFieldsEcmFiles=File Ecm campi extra +ExtraFieldsEcmDirectories=Directory Ecm campi extra +ECMSetup=Configurazione ECM diff --git a/htdocs/langs/it_IT/errors.lang b/htdocs/langs/it_IT/errors.lang index 01a4e96f6b8..ec5b4234b48 100644 --- a/htdocs/langs/it_IT/errors.lang +++ b/htdocs/langs/it_IT/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=Nessun errore, committiamo # Errors ErrorButCommitIsDone=Sono stati trovati errori ma si convalida ugualmente ErrorBadEMail=Email %s is wrong +ErrorBadMXDomain=Email %s seems wrong (domain has no valid MX record) ErrorBadUrl=L'URL %s è sbagliato ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=L'utente %s esiste già. ErrorGroupAlreadyExists=Il gruppo %s esiste già ErrorRecordNotFound=Record non trovato @@ -48,6 +50,7 @@ ErrorFieldsRequired=Mancano alcuni campi obbligatori. ErrorSubjectIsRequired=Il titolo della email è obbligatorio ErrorFailedToCreateDir=Impossibile creare la directory. Verifica che l'utente del server Web abbia i permessi per scrivere nella directory Dolibarr. Se il parametro <b>safe_mode</b> è abilitato in PHP, verifica che i file php di Dolibarr appartengano all'utente o al gruppo del server web (per esempio www-data). ErrorNoMailDefinedForThisUser=Nessun indirizzo memorizzato per questo utente +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=Questa funzione necessita di javascript per essere attivata. Modificare questa impostazione nel menu Impostazioni - layout di visualizzazione. ErrorTopMenuMustHaveAParentWithId0=Un menu di tipo "Top" non può appartenere ad un menu superiore. Seleziona 0 menu genitori o scegli un menu di tipo "Left". ErrorLeftMenuMustHaveAParentId=Un menu di tipo 'Left' deve avere un id genitore @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=Questo nome profilo già esiste per questo set di esp ErrorLDAPSetupNotComplete=La configurazione per l'uso di LDAP è incompleta ErrorLDAPMakeManualTest=È stato generato un file Ldif nella directory %s. Prova a caricarlo dalla riga di comando per avere maggiori informazioni sugli errori. ErrorCantSaveADoneUserWithZeroPercentage=Can't save an action with "status not started" if field "done by" is also filled. -ErrorRefAlreadyExists=Il riferimento utilizzato esiste già. +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 @@ -99,7 +102,7 @@ ErrorBadMaskBadRazMonth=Errore, valore di reset non valido ErrorMaxNumberReachForThisMask=Maximum number reached for this mask ErrorCounterMustHaveMoreThan3Digits=Il contatore deve avere più di 3 cifre ErrorSelectAtLeastOne=Errore. Selezionare almeno una voce. -ErrorDeleteNotPossibleLineIsConsolidated=Delete not possible because record is linked to a bank transaction that is conciliated +ErrorDeleteNotPossibleLineIsConsolidated=Impossibile eliminare il record collegato ad una transazione bancaria conciliata\n ErrorProdIdAlreadyExist=%s è già assegnato ErrorFailedToSendPassword=Impossibile inviare la password ErrorFailedToLoadRSSFile=Impossibile ottenere feed RSS. Se i messaggi di errore non forniscono informazioni sufficienti, prova ad ativare il debug con MAIN_SIMPLEXMLLOAD_DEBUG. @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -224,7 +227,7 @@ ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must hav 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. +ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Errore! Impossibile eliminare un pagamento collegato ad una fattura Pagata. ErrorSearchCriteriaTooSmall=Search criteria too small. ErrorObjectMustHaveStatusActiveToBeDisabled=Gli oggetti devono avere lo stato 'Attivo' per essere disabilitati ErrorObjectMustHaveStatusDraftOrDisabledToBeActivated=Gli oggetti devono avere lo stato 'Bozza' o 'Disabilitato' per essere abilitato @@ -243,6 +246,16 @@ ErrorReplaceStringEmpty=Errore, la stringa da sostituire è vuota 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=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 + # 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. @@ -266,7 +279,11 @@ WarningSomeLinesWithNullHourlyRate=Some times were recorded by some users while WarningYourLoginWasModifiedPleaseLogin=La tua login è stata modificata. Per ragioni di sicurezza dove accedere con la nuova login prima di eseguire una nuova azione. WarningAnEntryAlreadyExistForTransKey=Esiste già una voce tradotta per la chiave di traduzione per questa lingua 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 +WarningDateOfLineMustBeInExpenseReportRange=Attenzione, la data della riga non è compresa nel periodo della nota spese\n +WarningProjectDraft=Project is still in draft mode. Don't forget to validate it if you plan to use tasks. WarningProjectClosed=Il progetto è chiuso. È necessario prima aprirlo nuovamente. WarningSomeBankTransactionByChequeWereRemovedAfter=Alcune transazioni bancarie sono state rimosse dopo che è stata generata la ricevuta che le includeva. Quindi il numero di assegni e il totale dello scontrino possono differire dal numero e dal totale nell'elenco. -WarningFailedToAddFileIntoDatabaseIndex=Avviso, impossibile aggiungere la voce del file nella tabella dell'indice del database ECM +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. diff --git a/htdocs/langs/it_IT/exports.lang b/htdocs/langs/it_IT/exports.lang index aa66a29179d..5b616c68eaf 100644 --- a/htdocs/langs/it_IT/exports.lang +++ b/htdocs/langs/it_IT/exports.lang @@ -133,3 +133,4 @@ KeysToUseForUpdates=Chiave da utilizzare per l'aggiornamento dei dati NbInsert=Numero di righe inserite: %s NbUpdate=Numero di righe aggiornate: %s MultipleRecordFoundWithTheseFilters=Righe multiple sono state trovate con questi filtri: %s +StocksWithBatch=Scorte e ubicazione (magazzino) dei prodotti con numero di lotto / seriale diff --git a/htdocs/langs/it_IT/interventions.lang b/htdocs/langs/it_IT/interventions.lang index 449510235a8..ef76939f5ec 100644 --- a/htdocs/langs/it_IT/interventions.lang +++ b/htdocs/langs/it_IT/interventions.lang @@ -64,3 +64,5 @@ InterLineDuration=Line duration intervention InterLineDesc=Line description intervention RepeatableIntervention=Modello di intervento ToCreateAPredefinedIntervention=Per creare un intervento predefinito o ricorrente, creare un intervento comune e convertirlo in modello di intervento +Reopen=Riapri +ConfirmReopenIntervention=Sei sicuro di voler riaprire l'intervento <b> %s </b>? diff --git a/htdocs/langs/it_IT/languages.lang b/htdocs/langs/it_IT/languages.lang index 5e5be267cc1..b950698f946 100644 --- a/htdocs/langs/it_IT/languages.lang +++ b/htdocs/langs/it_IT/languages.lang @@ -40,7 +40,7 @@ Language_es_PA=Spagnolo (Panama) Language_es_PY=Spagnolo (Paraguay) Language_es_PE=Spagnolo (Perù) Language_es_PR=Spagnolo (Portorico) -Language_es_US=Spanish (USA) +Language_es_US=Spagnolo (USA) Language_es_UY=Spagnolo (Uruguay) Language_es_GT=Spagnolo (Guatemala) Language_es_VE=Spagnolo (Venezuela) @@ -56,7 +56,7 @@ Language_fr_CM=Francese (Camerun) Language_fr_FR=Francese Language_fr_GA=Francese (Gabon) Language_fr_NC=Francese (Nuova Caledonia) -Language_fr_SN=French (Senegal) +Language_fr_SN=Francese (Senegal) Language_fy_NL=Frisone Language_gl_ES=Galiziano Language_he_IL=Ebraico diff --git a/htdocs/langs/it_IT/mails.lang b/htdocs/langs/it_IT/mails.lang index af3f2044542..f6a0cc2c0a4 100644 --- a/htdocs/langs/it_IT/mails.lang +++ b/htdocs/langs/it_IT/mails.lang @@ -92,6 +92,7 @@ MailingModuleDescEmailsFromUser=Emails input by user MailingModuleDescDolibarrUsers=Users with Emails MailingModuleDescThirdPartiesByCategories=Soggetti terzi (per categoria) SendingFromWebInterfaceIsNotAllowed=Sending from web interface is not allowed. +EmailCollectorFilterDesc=Tutti i filtri devono corrispondere affinché venga raccolta un'e-mail # Libelle des modules de liste de destinataires mailing LineInFile=Riga %s nel file @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=Nessuna email inviata. Mittente o destinatario errati. Verifica il profilo utente. # Module Notifications Notifications=Notifiche -NoNotificationsWillBeSent=Non sono previste notifiche per questo evento o società -ANotificationsWillBeSent=Verrà inviata una notifica via email -SomeNotificationsWillBeSent=%s notifiche saranno inviate via email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=Elenco delle notifiche spedite per email +NotificationsAuto=Notifiche Auto. +NoNotificationsWillBeSent=Non sono previste notifiche e-mail automatiche per questo tipo di evento e azienda +ANotificationsWillBeSent=Verrà inviata una notifica tramite email +SomeNotificationsWillBeSent=le %s notifiche automatiche verranno inviate tramite e-mail +AddNewNotification=Iscriviti a una nuova notifica e-mail automatica (target / evento) +ListOfActiveNotifications=Elenca tutti gli abbonamenti attivi (obiettivi / eventi) per la notifica e-mail automatica +ListOfNotificationsDone=Elenco delle notifiche email automatiche inviate MailSendSetupIs=La configurazione della posta elettronica di invio è stata impostata alla modalità '%s'. Questa modalità non può essere utilizzata per inviare mail di massa. MailSendSetupIs2=Con un account da amministratore è necessario cliccare su %sHome -> Setup -> EMails%s e modificare il parametro <strong>'%s'</strong> per usare la modalità '%s'. Con questa modalità è possibile inserire i dati del server SMTP di elezione e usare Il "Mass Emailing" MailSendSetupIs3=Se hai domande su come configurare il tuo server SMTP chiedi a %s. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir UseFormatInputEmailToTarget=Enter a string with format <strong>email;name;firstname;other</strong> MailAdvTargetRecipients=Destinatari (selezione avanzata) 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 +AdvTgtSearchTextHelp=Utilizza %% come caratteri jolly. Ad esempio, per trovare tutti gli articoli come <b> jean, joe, jim </b>, puoi inserire <b> j%% </b>, puoi anche usare; come separatore di valore e usa ! ad eccezione di questo valore. Ad esempio <b> jean; joe; jim%%;! Jimo;! Jima%% </b> sceglierà come target tutti i jeans, joe, inizia con jim ma non jimo e non tutto ciò che inizia con jima AdvTgtSearchIntHelp=Use interval to select int or float value AdvTgtMinVal=Valore minimo AdvTgtMaxVal=Valore massimo @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Crea filtro AdvTgtOrCreateNewFilter=Titolo del nuovo filtro NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Configurazione email in uscita -InGoingEmailSetup=Incoming email setup +OutGoingEmailSetup=Email in uscita +InGoingEmailSetup=Email in entrata OutGoingEmailSetupForEmailing=Configurazione della posta elettronica in uscita (per il modulo %s) -DefaultOutgoingEmailSetup=Impostazione predefinita email in uscita +DefaultOutgoingEmailSetup=Stessa configurazione della configurazione globale della posta in uscita Information=Informazioni ContactsWithThirdpartyFilter=Contacts with third-party filter -Unanswered=Unanswered +Unanswered=Senza risposta Answered=Answered -IsNotAnAnswer=Is not answer (initial email) -IsAnAnswer=Is an answer of an initial email +IsNotAnAnswer=Non è risposta (email iniziale) +IsAnAnswer=È la risposta di una prima email +RecordCreatedByEmailCollector=Record creato da Email Collector %s dall'email %s +DefaultBlacklistMailingStatus=Default contact status for refuse bulk emailing +DefaultStatusEmptyMandatory=Empty but mandatory diff --git a/htdocs/langs/it_IT/main.lang b/htdocs/langs/it_IT/main.lang index 0be748325f0..b7ba2b5fe0e 100644 --- a/htdocs/langs/it_IT/main.lang +++ b/htdocs/langs/it_IT/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=Nessun tema disponibile per questo tipo di email AvailableVariables=Variabili di sostituzione disponibili NoTranslation=Nessuna traduzione Translation=Traduzioni +CurrentTimeZone=Fuso orario attuale EmptySearchString=Inserisci criteri di ricerca non vuoti +EnterADateCriteria=Enter a date criteria NoRecordFound=Nessun risultato trovato NoRecordDeleted=Nessun record eliminato NotEnoughDataYet=Dati insufficienti @@ -85,6 +87,8 @@ FileWasNotUploaded=Il file selezionato per l'upload non è stato ancora caricato NbOfEntries=No. of entries GoToWikiHelpPage=Leggi l'aiuto online (è richiesto un collegamento internet) GoToHelpPage=Vai alla pagina di aiuto +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Home Page RecordSaved=Record salvato RecordDeleted=Record cancellato RecordGenerated=Record generato @@ -220,6 +224,7 @@ Value=Valore PersonalValue=Valore personalizzato NewObject=Nuovo %s NewValue=Nuovo valore +OldValue=Old value %s CurrentValue=Valore attuale Code=Codice Type=Tipo @@ -433,6 +438,7 @@ RemainToPay=Rimanente da pagare Module=Moduli/Applicazioni Modules=Moduli/Applicazioni Option=Opzione +Filters=Filters List=Elenco FullList=Elenco completo FullConversation=Conversazione completa @@ -650,6 +656,7 @@ SupplierPreview=Anteprima fornitore ShowCustomerPreview=Visualizza anteprima cliente ShowSupplierPreview=Visualizza anteprima fornitore RefCustomer=Rif. cliente +InternalRef=Internal ref. Currency=Valuta InfoAdmin=Informazioni per gli amministratori Undo=Annulla @@ -671,7 +678,7 @@ SendMail=Invia una email Email=Email NoEMail=Nessuna email AlreadyRead=Già letto -NotRead=Non letto +NotRead=Unread NoMobilePhone=Nessun cellulare Owner=Proprietario FollowingConstantsWillBeSubstituted=Le seguenti costanti saranno sostitute con i valori corrispondenti @@ -1107,3 +1114,9 @@ UpToDate=Up-to-date OutOfDate=Out-of-date EventReminder=Event Reminder UpdateForAllLines=Update for all lines +OnHold=In attesa +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 diff --git a/htdocs/langs/it_IT/modulebuilder.lang b/htdocs/langs/it_IT/modulebuilder.lang index d15a6328f84..12630bc2936 100644 --- a/htdocs/langs/it_IT/modulebuilder.lang +++ b/htdocs/langs/it_IT/modulebuilder.lang @@ -40,6 +40,7 @@ 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=Pagina PHP per la scheda dei contatti 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=Esplora API ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=Elenco voci dizionari ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +DropTableIfEmpty=(Distruggi la tabella se vuota) TableDoesNotExists=The table %s does not exists TableDropped=Table %s deleted InitStructureFromExistingTable=Build the structure array string of an existing table @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=Il riferimento dell'oggetto deve essere generato automaticamente IncludeRefGenerationHelp=Seleziona questa opzione se desideri includere il codice per gestire la generazione automatica del riferimento IncludeDocGeneration=Desidero generare alcuni documenti da questo oggetto @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Tipo di campi: <br> varchar(99), double(24,8), real, text, html AsciiToHtmlConverter=Convertitore da Ascii a HTML AsciiToPdfConverter=Convertitore da Ascii a PDF TableNotEmptyDropCanceled=Tabella non vuota. Il rilascio è stato annullato. +ModuleBuilderNotAllowed=Il generatore di moduli è disponibile ma non è consentito all'utente. diff --git a/htdocs/langs/it_IT/mrp.lang b/htdocs/langs/it_IT/mrp.lang index e5048e22764..d169db398be 100644 --- a/htdocs/langs/it_IT/mrp.lang +++ b/htdocs/langs/it_IT/mrp.lang @@ -1,5 +1,5 @@ Mrp=Ordini di produzione -MOs=Manufacturing orders +MOs=Ordini di produzione ManufacturingOrder=Ordine di produzione MRPDescription=Modulo per la gestione degli ordini di produzione (MO). MRPArea=MRP Area @@ -76,5 +76,29 @@ ProductsToProduce=Prodotti da produrre UnitCost=Costo unitario TotalCost=Costo totale BOMTotalCost=Il costo per produrre questa distinta base in base al costo di ciascuna quantità e prodotto da consumare (utilizzare il prezzo di costo se definito, altrimenti il prezzo medio ponderato se definito, altrimenti il miglior prezzo di acquisto) -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 +GoOnTabProductionToProduceFirst=È necessario prima aver avviato la produzione per chiudere un ordine di produzione (vedere la scheda "%s"). Ma puoi annullarlo. +ErrorAVirtualProductCantBeUsedIntoABomOrMo=Un kit non può essere utilizzato in una distinta materiali o in un ordine di produzione +Workstation=Workstation +Workstations=Workstations +WorkstationsDescription=Workstations management +WorkstationSetup = Workstations setup +WorkstationSetupPage = Workstations setup page +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/it_IT/multicurrency.lang b/htdocs/langs/it_IT/multicurrency.lang index 556b727c6d6..1344eb123be 100644 --- a/htdocs/langs/it_IT/multicurrency.lang +++ b/htdocs/langs/it_IT/multicurrency.lang @@ -2,7 +2,7 @@ MultiCurrency=Multi currency ErrorAddRateFail=Error in added rate ErrorAddCurrencyFail=Error in added currency -ErrorDeleteCurrencyFail=Error delete fail +ErrorDeleteCurrencyFail=Errore! Eliminazione fallita multicurrency_syncronize_error=Synchronisation error: %s MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE=Use date of document to find currency rate, instead of using latest known rate multicurrency_useOriginTx=When an object is created from another, keep the original rate of source object (otherwise use the latest known rate) @@ -20,3 +20,19 @@ MulticurrencyPaymentAmount=Payment amount, original currency AmountToOthercurrency=Amount To (in currency of receiving account) CurrencyRateSyncSucceed=Sincronizzazione del tasso di cambio eseguita correttamente MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT=Usa la valuta del documento per i pagamenti online +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/it_IT/other.lang b/htdocs/langs/it_IT/other.lang index 1e1fe945c8f..31a5514c3b0 100644 --- a/htdocs/langs/it_IT/other.lang +++ b/htdocs/langs/it_IT/other.lang @@ -5,8 +5,6 @@ Tools=Strumenti TMenuTools=Strumenti ToolsDesc=Quest'area è dedicata agli strumenti di gruppo non disponibili in altre voci di menu.<br>Tali strumenti sono raggiungibili dal menu laterale. Birthday=Compleanno -BirthdayDate=Giorno di nascita -DateToBirth=Data di nascita BirthdayAlertOn=Attiva avviso compleanni BirthdayAlertOff=Avviso compleanni inattivo TransKey=Traduzione della chiave TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Archivio zip generato in <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Note spese convalidate (è richiesta l'approvazio Notify_EXPENSE_REPORT_APPROVE=Nota spesa approvata Notify_HOLIDAY_VALIDATE=Richiesta ferie/permesso convalidata (approvazione richiesta) Notify_HOLIDAY_APPROVE=Richiesta ferie/permesso approvata +Notify_ACTION_CREATE=Added action to Agenda SeeModuleSetup=Vedi la configurazione del modulo %s NbOfAttachedFiles=Numero di file/documenti allegati TotalSizeOfAttachedFiles=Dimensione totale dei file/documenti allegati @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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=__(Buongiorno)__\n\n\n__(Cordialmente)__\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 è un ERP/CRM compatto composto di diversi moduli funzionali. Un demo comprendente tutti i moduli non ha alcun senso, perché un caso simile non esiste nella realtà. Sono dunque disponibili diversi profili demo. ChooseYourDemoProfil=Scegli il profilo demo che corrisponde alla tua attività ... ChooseYourDemoProfilMore=...or build your own profile<br>(manual module selection) @@ -137,7 +139,7 @@ Right=Destra CalculatedWeight=Peso calcolato CalculatedVolume=volume calcolato Weight=Peso -WeightUnitton=t +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -173,7 +175,7 @@ SizeUnitinch=pollice SizeUnitfoot=piede SizeUnitpoint=punto 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=Questo modulo consente di richiedere una nuova password che verrà inviata al tuo indirizzo email. <br> Il cambiamento sarà effettivo solo dopo aver cliccato sul link di conferma contenuto nell'email. <br> Controlla la tua casella di posta. BackToLoginPage=Torna alla pagina di login AuthenticationDoesNotAllowSendNewPassword=La modalità di autenticazione è <b>%s</b>.<br/>In questa modalità Dolibarr non può sapere né cambiare la tua password.<br/>Contatta l'amministratore di sistema se desideri cambiare password. EnableGDLibraryDesc=Per usare questa opzione bisogna installare o abilitare la libreria GD in PHP. @@ -214,6 +216,7 @@ EMailTextExpenseReportValidated=Expense report %s has been validated. EMailTextExpenseReportApproved=Expense report %s has been approved. EMailTextHolidayValidated=La richiesta di ferie/permesso %s è stata convalidata. EMailTextHolidayApproved=Leave request %s has been approved. +EMailTextActionAdded=The action %s has been added to the Agenda. ImportedWithSet=Set dati importazione DolibarrNotification=Notifica automatica ResizeDesc=Ridimesiona con larghezza <b>o</b> altezza nuove. Il ridimensionamento è proporzionale, il rapporto tra le due dimenzioni verrà mantenuto. @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Utilizzare - per separare gli orari di apertura e chiusura. <br> Utilizzare uno spazio per inserire intervalli diversi. <br> Esempio: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Area esportazioni diff --git a/htdocs/langs/it_IT/products.lang b/htdocs/langs/it_IT/products.lang index 46f0bfa0c75..dfc71f3ed8f 100644 --- a/htdocs/langs/it_IT/products.lang +++ b/htdocs/langs/it_IT/products.lang @@ -104,24 +104,25 @@ SetDefaultBarcodeType=Imposta tipo di codice a barre BarcodeValue=Valore codice a barre NoteNotVisibleOnBill=Nota (non visibile su fatture, proposte ...) ServiceLimitedDuration=Se il prodotto è un servizio di durata limitata: -FillWithLastServiceDates=Fill with last service line dates +FillWithLastServiceDates=Inserisci le date dell'ultima riga di servizio MultiPricesAbility=Diversi livelli di prezzo per prodotto/servizio (ogni cliente fa parte di un livello) MultiPricesNumPrices=Numero di prezzi per il multi-prezzi DefaultPriceType=Base dei prezzi per impostazione predefinita (con contro senza tasse) quando si aggiungono nuovi prezzi di vendita -AssociatedProductsAbility=Activate kits (virtual products) +AssociatedProductsAbility=Abilita kit (set di diversi prodotti) +VariantsAbility=Abilita varianti (variazioni dei prodotti, ad esempio colore, taglia) AssociatedProducts=Kits -AssociatedProductsNumber=Number of products composing this kit +AssociatedProductsNumber=Numero di prodotti che compongono questo kit ParentProductsNumber=Numero di prodotti associati che includono questo sottoprodotto ParentProducts=Prodotti genitore -IfZeroItIsNotAVirtualProduct=If 0, this product is not a kit -IfZeroItIsNotUsedByVirtualProduct=If 0, this product is not used by any kit +IfZeroItIsNotAVirtualProduct=Se 0, questo prodotto non è un kit +IfZeroItIsNotUsedByVirtualProduct=Se 0, questo prodotto non è utilizzato da nessun kit KeywordFilter=Filtro per parola chiave CategoryFilter=Filtro categoria ProductToAddSearch=Cerca prodotto da aggiungere NoMatchFound=Nessun risultato trovato ListOfProductsServices=Elenco prodotti/servizi -ProductAssociationList=List of products/services that are component(s) of this kit -ProductParentList=List of kits with this product as a component +ProductAssociationList=Elenco dei prodotti / servizi che sono componenti(e) di questo kit +ProductParentList=Elenco dei kit con questo prodotto come componente ErrorAssociationIsFatherOfThis=Uno dei prodotti selezionati è padre dell'attuale prodotto DeleteProduct=Elimina un prodotto/servizio ConfirmDeleteProduct=Vuoi davvero eliminare questo prodotto/servizio? @@ -167,8 +168,10 @@ BuyingPrices=Prezzi di acquisto CustomerPrices=Prezzi di vendita SuppliersPrices=Prezzi fornitore SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Dogana/Merce/Codice SA +CustomCode=codice Customs|Commodity|HS CountryOrigin=Paese di origine +RegionStateOrigin=Origine della regione +StateOrigin=Stato | Provincia provenienza Nature=Natura del prodotto (materiale / finito) NatureOfProductShort=Natura del prodotto NatureOfProductDesc=Materia prima o prodotto finito @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Usa prezzo non negoziabile PriceByQuantity=Prezzi diversi in base alla quantità DisablePriceByQty=Disabilitare i prezzi per quantità PriceByQuantityRange=Intervallo della quantità -MultipriceRules=Regole del segmento di prezzo +MultipriceRules=Prezzi automatici per segmento UseMultipriceRules=Utilizza le regole del segmento di prezzo (definite nell'impostazione del modulo del prodotto) per autocalcolare i prezzi di tutti gli altri segmenti in base al primo segmento PercentVariationOver=variazione %% su %s PercentDiscountOver=sconto %% su %s @@ -287,7 +290,7 @@ PriceExpressionEditorHelp5=Valori globali disponibili: PriceMode=Modalità di prezzo PriceNumeric=Numero DefaultPrice=Prezzo predefinito -DefaultPriceLog=Log of previous default prices +DefaultPriceLog=Registro dei prezzi predefiniti precedenti ComposedProductIncDecStock=Aumenta e Diminuisci le scorte alla modifica del prodotto padre ComposedProduct=Sottoprodotto MinSupplierPrice=Prezzo d'acquisto minimo @@ -340,7 +343,7 @@ UseProductFournDesc=Add a feature to define the descriptions of products defined ProductSupplierDescription=Vendor description for the product UseProductSupplierPackaging=Utilizzare l'imballaggio sui prezzi del fornitore (ricalcolare le quantità in base all'imballaggio impostato sul prezzo del fornitore quando si aggiunge / aggiorna la riga nei documenti del fornitore) PackagingForThisProduct=Confezione -PackagingForThisProductDesc=On supplier order, you will automaticly order this quantity (or a multiple of this quantity). Cannot be less than minimum buying quantity +PackagingForThisProductDesc=Su ordine del fornitore, ordinerai automaticamente questa quantità (o un multiplo di questa quantità). Non può essere inferiore alla quantità di acquisto minima QtyRecalculatedWithPackaging=La quantità della linea è stata ricalcolata in base all'imballaggio del fornitore #Attributes @@ -364,9 +367,9 @@ SelectCombination=Selezione combinazione ProductCombinationGenerator=Generatore di varianti Features=Caratteristiche PriceImpact=Impatto sui prezzi -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=Impatto sul livello dei prezzi %s +ApplyToAllPriceImpactLevel= Applicare a tutti i livelli +ApplyToAllPriceImpactLevelHelp=Facendo clic qui si imposta lo stesso impatto sul prezzo su tutti i livelli WeightImpact=Impatto del peso NewProductAttribute=Nuovo attributo NewProductAttributeValue=Nuovo valore dell'attributo diff --git a/htdocs/langs/it_IT/projects.lang b/htdocs/langs/it_IT/projects.lang index 9d68b1ca8f8..b30159947c7 100644 --- a/htdocs/langs/it_IT/projects.lang +++ b/htdocs/langs/it_IT/projects.lang @@ -76,15 +76,16 @@ MyActivities=I miei compiti / operatività MyProjects=I miei progetti MyProjectsArea=Area progetti DurationEffective=Durata effettiva -ProgressDeclared=Avanzamento dichiarato +ProgressDeclared=Avanzamento dichiarato reale TaskProgressSummary=Avanzamento compito CurentlyOpenedTasks=Compiti attualmente aperti -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Avanzamento calcolato +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=Tempo +TimeConsumed=Consumed ListOfTasks=Elenco dei compiti GoToListOfTimeConsumed=Vai all'elenco del tempo impiegato GanttView=Vista Gantt @@ -212,8 +213,8 @@ ProjectNbTaskByMonth=Numero di attività create per mese ProjectOppAmountOfProjectsByMonth=Quantità di Lead per mese ProjectWeightedOppAmountOfProjectsByMonth=Quantità ponderata di opportunità per mese ProjectOpenedProjectByOppStatus=Open project|lead by lead status -ProjectsStatistics=Statistics on projects or leads -TasksStatistics=Statistics on tasks of projects or leads +ProjectsStatistics=Statistiche su attività di progetto/clienti potenziali +TasksStatistics=Statistiche su attività di progetto/clienti potenziali TaskAssignedToEnterTime=Compito assegnato. Inserire i tempi per questo compito dovrebbe esserre possibile. IdTaskTime=Tempo compito id YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/it_IT/propal.lang b/htdocs/langs/it_IT/propal.lang index b5b78417e8d..7eb57f84fb0 100644 --- a/htdocs/langs/it_IT/propal.lang +++ b/htdocs/langs/it_IT/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Invia preventivo via e-mail DatePropal=Data del preventivo DateEndPropal=Data di fine validità ValidityDuration=Durata validità -CloseAs=Imposta lo stato a SetAcceptedRefused=Imposta accettato/rifiutato ErrorPropalNotFound=Preventivo %s non trovato AddToDraftProposals=Aggiungi una bozza di preventivo @@ -85,3 +84,8 @@ ProposalCustomerSignature=Accettazione scritta, timbro, data e firma ProposalsStatisticsSuppliers=Statistiche preventivi fornitori CaseFollowedBy=Caso seguito da SignedOnly=Solo firmato +IdProposal=ID proposta +IdProduct=ID prodotto +PrParentLine=Riga genitore proposta +LineBuyPriceHT=Prezzo di acquisto Importo al netto delle tasse per riga + diff --git a/htdocs/langs/it_IT/receiptprinter.lang b/htdocs/langs/it_IT/receiptprinter.lang index a5fbeef5ad6..49621049ddf 100644 --- a/htdocs/langs/it_IT/receiptprinter.lang +++ b/htdocs/langs/it_IT/receiptprinter.lang @@ -54,7 +54,7 @@ DOL_DOUBLE_WIDTH=Doppia larghezza DOL_DEFAULT_HEIGHT_WIDTH=Altezza e larghezza predefinite DOL_UNDERLINE=Abilita sottolineatura DOL_UNDERLINE_DISABLED=Disabilita la sottolineatura -DOL_BEEP=Suono di Beed +DOL_BEEP=Suono di Beep DOL_PRINT_TEXT=Stampa il testo DateInvoiceWithTime=Data e ora della fattura YearInvoice=Anno della fattura diff --git a/htdocs/langs/it_IT/recruitment.lang b/htdocs/langs/it_IT/recruitment.lang index 3f136b5182e..b8e37753ea4 100644 --- a/htdocs/langs/it_IT/recruitment.lang +++ b/htdocs/langs/it_IT/recruitment.lang @@ -46,9 +46,9 @@ FutureManager=Manager futuro ResponsibleOfRecruitement=Responsabile della selezione IfJobIsLocatedAtAPartner=Se il luogo di lavoro è presso partner PositionToBeFilled=Posizione lavorativa -PositionsToBeFilled=Job positions -ListOfPositionsToBeFilled=List of job positions -NewPositionToBeFilled=New job positions +PositionsToBeFilled=Posizione lavorativa +ListOfPositionsToBeFilled=Elenco posizioni lavorative +NewPositionToBeFilled=Nuova posizione lavorativa JobOfferToBeFilled=Job position to be filled ThisIsInformationOnJobPosition=Informazioni sulla posizione lavorativa da compilare @@ -60,10 +60,10 @@ ListOfCandidatures=List of applications RequestedRemuneration=Requested remuneration ProposedRemuneration=Proposed remuneration ContractProposed=Contract proposed -ContractSigned=Contract signed +ContractSigned=Contratto firmato ContractRefused=Contract refused RecruitmentCandidature=Application -JobPositions=Job positions +JobPositions=Posizione lavorativa RecruitmentCandidatures=Applications InterviewToDo=Interview to do AnswerCandidature=Application answer @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/it_IT/sendings.lang b/htdocs/langs/it_IT/sendings.lang index 0820b5dbbe7..d902ac9d0f6 100644 --- a/htdocs/langs/it_IT/sendings.lang +++ b/htdocs/langs/it_IT/sendings.lang @@ -27,9 +27,10 @@ QtyInOtherShipments=Q.ta in altre spedizioni KeepToShip=Ancora da spedire KeepToShipShort=Rimanente OtherSendingsForSameOrder=Altre Spedizioni per questo ordine -SendingsAndReceivingForSameOrder=Spedizioni e ricezioni per questo ordini +SendingsAndReceivingForSameOrder=Spedizioni e ricezioni per questo ordine SendingsToValidate=Spedizione da convalidare StatusSendingCanceled=Annullato +StatusSendingCanceledShort=Annullata StatusSendingDraft=Bozza StatusSendingValidated=Convalidata (prodotti per la spedizione o già spediti) StatusSendingProcessed=Processato @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=È necessario convalidare l'ordine prima di pot # Sending methods # ModelDocument DocumentModelTyphon=Modello più completo di documento per le ricevute di consegna (logo. ..) +DocumentModelStorm=Modello di documento più completo per ricevute di consegna e compatibilità con campi extra (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=EXPEDITION_ADDON_NUMBER costante non definita SumOfProductVolumes=Totale volume prodotti SumOfProductWeights=Totale peso prodotti diff --git a/htdocs/langs/it_IT/stocks.lang b/htdocs/langs/it_IT/stocks.lang index 3e8770750a4..b2da8fe996d 100644 --- a/htdocs/langs/it_IT/stocks.lang +++ b/htdocs/langs/it_IT/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Imposta un magazzino sugli ordini di vendita UserDefaultWarehouse=Imposta un magazzino per gli utenti MainDefaultWarehouse=Magazzino predefinito @@ -203,8 +204,8 @@ INVENTORY_USE_INVENTORY_DATE_FOR_DATE_OF_MVT=I movimenti delle scorte avranno la 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 +TheoricalQty=Q.tà teorica +TheoricalValue=Q.tà teorica LastPA=Last BP CurrentPA=Curent BP RecordedQty=Qtà registrata @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/it_IT/suppliers.lang b/htdocs/langs/it_IT/suppliers.lang index 5138e9303e0..e178c00850b 100644 --- a/htdocs/langs/it_IT/suppliers.lang +++ b/htdocs/langs/it_IT/suppliers.lang @@ -38,7 +38,7 @@ MenuOrdersSupplierToBill=Ordini d'acquisto da fatturare NbDaysToDelivery=Tempi di consegna (giorni) DescNbDaysToDelivery=Il tempo di consegna più lungo dei prodotti di questo ordine SupplierReputation=Reputazione fornitore -ReferenceReputation=Reference reputation +ReferenceReputation=Reputazione di riferimento DoNotOrderThisProductToThisSupplier=Non ordinare NotTheGoodQualitySupplier=Bassa qualità ReputationForThisProduct=Reputazione diff --git a/htdocs/langs/it_IT/ticket.lang b/htdocs/langs/it_IT/ticket.lang index c51af811cb0..e40b57082bf 100644 --- a/htdocs/langs/it_IT/ticket.lang +++ b/htdocs/langs/it_IT/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Risoluzione -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Richiesta di aiuto funzionale TicketTypeShortISSUE=Issue, bug o problemi TicketTypeShortREQUEST=Richiesta di modifica o miglioramento @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Altro TicketSeverityShortLOW=Basso TicketSeverityShortNORMAL=Normale TicketSeverityShortHIGH=Alto -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critico, bloccante ErrorBadEmailAddress=Campo '%s' non corretto MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Non letto Read=Da leggere Assigned=Assegnato InProgress=Avviato @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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=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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Non disponibile. Il ticket non è stato creato dall'interfaccia pubblica. -PublicInterfaceNotEnabled=L'interfaccia pubblica non è stata abilitata ErrorTicketRefRequired=È richiesto il nome di riferimento del biglietto # @@ -265,7 +262,7 @@ TicketNewEmailBodyInfosTrackId=Ticket tracking number: %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=This form allows you to record a support ticket in our management system. +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 TicketTrackId=Public Tracking ID diff --git a/htdocs/langs/it_IT/users.lang b/htdocs/langs/it_IT/users.lang index f03887e2e65..199b2cb1d45 100644 --- a/htdocs/langs/it_IT/users.lang +++ b/htdocs/langs/it_IT/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Rimuovi dal gruppo PasswordChangedAndSentTo=Password cambiata ed inviata a <b>%s</b> PasswordChangeRequest=Richiesta di modifica della password per <b>%s</b> PasswordChangeRequestSent=Richiesta di cambio password per <b>%s</b> da inviare a <b>%s</b>. +IfLoginExistPasswordRequestSent=Se questo accesso è un account valido, è stata inviata un'e-mail per reimpostare la password. +IfEmailExistPasswordRequestSent=Se questa e-mail è un account valido, è stata inviata un'e-mail per reimpostare la password. ConfirmPasswordReset=Conferma la reimpostazione della password MenuUsersAndGroups=Utenti e gruppi LastGroupsCreated=Ultimi %s gruppi creati @@ -69,10 +71,11 @@ InternalUser=Utente interno ExportDataset_user_1=Users and their properties DomainUser=Utente di dominio %s Reactivate=Riattiva -CreateInternalUserDesc=This form allows you to create an internal user in your company/organization. To create an external user (customer, vendor etc. ..), use the button 'Create Dolibarr User' from that third-party's contact card. +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) PermissionInheritedFromAGroup=Autorizzazioni ereditate dall'appartenenza al gruppo. Inherited=Ereditato +UserWillBe=L'utente creato sarà UserWillBeInternalUser=L'utente sarà un utente interno (in quanto non collegato a un soggetto terzo) UserWillBeExternalUser=L'utente sarà un utente esterno (perché collegato ad un soggetto terzo) IdPhoneCaller=Id telefonico del chiamante @@ -93,8 +96,8 @@ LoginToCreate=Accedi per creare NameToCreate=Nome del soggetto terzo da creare YourRole=Il tuo ruolo YourQuotaOfUsersIsReached=Hai raggiunto la tua quota di utenti attivi! -NbOfUsers=No. of users -NbOfPermissions=No. of permissions +NbOfUsers=Numero di utenti +NbOfPermissions=Numero di autorizzazioni DontDowngradeSuperAdmin=Solo un superadmin può declassare un superadmin HierarchicalResponsible=Supervisore HierarchicView=Vista gerarchica @@ -109,12 +112,14 @@ UserAccountancyCode=Codice contabile utente UserLogoff=Logout utente UserLogged=Utente connesso DateOfEmployment=Data di assunzione -DateEmployment=Data di assunzione +DateEmployment=Dipendente +DateEmploymentstart=Data di assunzione DateEmploymentEnd=Data di fine rapporto lavorativo +RangeOfLoginValidity=Intervallo di date di validità dell'accesso CantDisableYourself=You can't disable your own user record ForceUserExpenseValidator=Forza validatore rapporto spese ForceUserHolidayValidator=Convalida richiesta di congedo forzato ValidatorIsSupervisorByDefault=Per impostazione predefinita, il validatore è il supervisore dell'utente. Mantieni vuoto per mantenere questo comportamento. UserPersonalEmail=E-mail personale UserPersonalMobile=Cellulare personale -WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s +WarningNotLangOfInterface=Attenzione, questa è la lingua principale che l'utente parla, non la lingua dell'interfaccia che ha scelto di vedere. Per cambiare la lingua dell'interfaccia visibile da questo utente, vai sulla scheda %s diff --git a/htdocs/langs/it_IT/website.lang b/htdocs/langs/it_IT/website.lang index 2037c7d7c8d..64f05d19a0a 100644 --- a/htdocs/langs/it_IT/website.lang +++ b/htdocs/langs/it_IT/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Aggiungi sito web Webpage=Web page/container AddPage=Aggiungi pagina/contenitore -HomePage=Home Page PageContainer=Pagina 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Mostra contenuto dinamico InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -135,5 +134,6 @@ ReplacementDoneInXPages=Sostituzione eseguite in%spagine o contenitori RSSFeed=Feed RSS RSSFeedDesc=Puoi ottenere un feed RSS degli articoli più recenti con il tipo "blogpost" utilizzando questo URL PagesRegenerated=%s pagina(e)/contenitore(i) rigenerato -RegenerateWebsiteContent=Regenerate web site cache files -AllowedInFrames=Allowed in Frames +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. diff --git a/htdocs/langs/it_IT/withdrawals.lang b/htdocs/langs/it_IT/withdrawals.lang index 296e0fc1975..0e83d48d9eb 100644 --- a/htdocs/langs/it_IT/withdrawals.lang +++ b/htdocs/langs/it_IT/withdrawals.lang @@ -42,6 +42,7 @@ LastWithdrawalReceipt=Latest %s direct debit receipts MakeWithdrawRequest=Effettua una richiesta di addebito diretto MakeBankTransferOrder=Invia una richiesta di bonifico WithdrawRequestsDone=%s direct debit payment requests recorded +BankTransferRequestsDone=%s credit transfer requests recorded ThirdPartyBankCode=Codice bancario del Soggetto terzo NoInvoiceCouldBeWithdrawed=No invoice debited successfully. Check that invoices are on companies with a valid IBAN and that IBAN has a UMR (Unique Mandate Reference) with mode <strong>%s</strong>. ClassCredited=Classifica come accreditata @@ -131,7 +132,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,3 +148,5 @@ 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=Non è stata impostata la modalità reale, ci fermiamo dopo questa simulazione ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorICSmissing=Missing ICS in Bank account %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/it_IT/workflow.lang b/htdocs/langs/it_IT/workflow.lang index bafaa694180..a662155b537 100644 --- a/htdocs/langs/it_IT/workflow.lang +++ b/htdocs/langs/it_IT/workflow.lang @@ -16,8 +16,10 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classifica "da spedire" l'ordine cl # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +descWORKFLOW_BILL_ON_RECEPTION=Classificare le ricezioni in "fatturate" quando un ordine fornitore collegato viene convalidato # Autoclose intervention -descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Chiudi tutti gli interventi legati al ticket quando un ticket è chiuso AutomaticCreation=Creazione automatica AutomaticClassification=Classificazione automatica +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/it_IT/zapier.lang b/htdocs/langs/it_IT/zapier.lang index 7b9ad04fa29..5ec7be329d2 100644 --- a/htdocs/langs/it_IT/zapier.lang +++ b/htdocs/langs/it_IT/zapier.lang @@ -26,4 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier per modulo Dolibarr # Admin page # ZapierForDolibarrSetup = Installazione di Zapier per Dolibarr -ZapierDescription=Interface with Zapier +ZapierDescription=Interfaccia con Zapier diff --git a/htdocs/langs/ja_JP/accountancy.lang b/htdocs/langs/ja_JP/accountancy.lang index 03fca6294e9..5b7b279db04 100644 --- a/htdocs/langs/ja_JP/accountancy.lang +++ b/htdocs/langs/ja_JP/accountancy.lang @@ -1,5 +1,5 @@ # 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 @@ -16,9 +16,11 @@ ThisService=このサービス ThisProduct=この製品 DefaultForService=サービスのデフォルト DefaultForProduct=製品のデフォルト +ProductForThisThirdparty=この取引先向けの製品 +ServiceForThisThirdparty=この取引先向けのサービス CantSuggest=提案できない AccountancySetupDoneFromAccountancyMenu=会計のほとんどの設定はメニュー%sから行われる -ConfigAccountingExpert=モジュールアカウンティングの構成(複式簿記) +ConfigAccountingExpert=モジュールアカウンティングの構成(複式簿記) Journalization=仕訳帳化 Journals=仕訳日記帳 JournalFinancial=財務仕訳帳 @@ -46,8 +48,9 @@ CountriesNotInEEC=EECにない国 CountriesInEECExceptMe=%sを除くEECの国 CountriesExceptMe=%sを除くすべての国 AccountantFiles=ソースドキュメントのエクスポート -ExportAccountingSourceDocHelp=このツールを使用すると、会計処理の生成に使用されたソースイベント(リストとPDF)をエクスポートできる。仕訳をエクスポートするには、メニューエントリ%s-%sを使用する。 +ExportAccountingSourceDocHelp=このツールを使用すると、会計処理の生成に使用されたソースイベント(リストとPDF)をエクスポートできる。仕訳をエクスポートするには、メニューエントリ%s-%sを使用する。 VueByAccountAccounting=会計科目順に表示 +VueBySubAccountAccounting=アカウンティングサブアカウントで表示 MainAccountForCustomersNotDefined=設定で定義されていない顧客のメインアカウンティング科目 MainAccountForSuppliersNotDefined=設定で定義されていないベンダーのメインアカウンティング科目 @@ -58,7 +61,7 @@ MainAccountForSubscriptionPaymentNotDefined=セットアップで定義されて AccountancyArea=経理エリア AccountancyAreaDescIntro=会計モジュールの使用は、いくつかのステップで行われる。 AccountancyAreaDescActionOnce=次のアクションは通常、1回だけ、または1年に1回実行される。 -AccountancyAreaDescActionOnceBis=次のステップは、仕訳帳化を行うときに正しいデフォルトの会計科目を提案することにより、将来の時間を節約するために実行する必要がある(仕訳帳および総勘定元帳にレコードを書き込む) +AccountancyAreaDescActionOnceBis=次のステップは、仕訳帳化を行うときに正しいデフォルトの会計科目を提案することにより、将来の時間を節約するために実行する必要がある(仕訳帳および総勘定元帳にレコードを書き込む) AccountancyAreaDescActionFreq=次のアクションは通常、非常に大規模な企業の場合、毎月、毎週、または毎日実行される。 AccountancyAreaDescJournalSetup=ステップ%s:メニュー%sから仕訳帳リストのコンテンツを作成または確認する @@ -69,7 +72,7 @@ AccountancyAreaDescVat=ステップ%s:各VAT率の会計科目を定義する AccountancyAreaDescDefault=ステップ%s:デフォルトの会計科目を定義する。これには、メニューエントリ%sを使用する。 AccountancyAreaDescExpenseReport=ステップ%s:経費報告書の種別ごとにデフォルトの会計科目を定義する。これには、メニューエントリ%sを使用する。 AccountancyAreaDescSal=ステップ%s:給与支払いのデフォルトの会計科目を定義する。これには、メニューエントリ%sを使用する。 -AccountancyAreaDescContrib=ステップ%s:特別経費(雑税)のデフォルトの会計科目を定義する。これには、メニューエントリ%sを使用する。 +AccountancyAreaDescContrib=ステップ%s:特別経費(雑税)のデフォルトの会計科目を定義する。これには、メニューエントリ%sを使用する。 AccountancyAreaDescDonation=ステップ%s:寄付のデフォルトの会計科目を定義する。これには、メニューエントリ%sを使用する。 AccountancyAreaDescSubscription=ステップ%s:メンバーサブスクリプションのデフォルトのアカウンティング科目を定義する。これには、メニューエントリ%sを使用する。 AccountancyAreaDescMisc=ステップ%s:その他のトランザクションの必須のデフォルト科目とデフォルトのアカウンティング科目を定義する。これには、メニューエントリ%sを使用する。 @@ -83,7 +86,7 @@ AccountancyAreaDescAnalyze=ステップ%s:既存のトランザクションを AccountancyAreaDescClosePeriod=ステップ%s:期間を閉じて、将来変更できないようにする。 -TheJournalCodeIsNotDefinedOnSomeBankAccount=セットアップの必須ステップが完了していない(すべての銀行口座に対して会計コード仕訳帳が定義されていない) +TheJournalCodeIsNotDefinedOnSomeBankAccount=セットアップの必須ステップが完了していない(すべての銀行口座に対して会計コード仕訳帳が定義されていない) Selectchartofaccounts=アクティブな勘定科目表を選択する ChangeAndLoad=変更してロード Addanaccount=勘定科目を追加 @@ -144,18 +147,18 @@ NotVentilatedinAccount=会計科目にバインドされていない XLineSuccessfullyBinded=%s製品/サービスがアカウンティング科目に正常にバインドされた XLineFailedToBeBinded=%s製品/サービスはどの会計科目にもバインドされていない -ACCOUNTING_LIMIT_LIST_VENTILATION=ページごとに表示される紐付けする要素の数(最大推奨:50) +ACCOUNTING_LIMIT_LIST_VENTILATION=リストおよびバインドページの最大行数(推奨:50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=「Bindingtodo」ページの最新の要素による並べ替えを開始する ACCOUNTING_LIST_SORT_VENTILATION_DONE=「製本完了」ページの最新の要素による並べ替えを開始する -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=会計科目の最後に異なる数のゼロを管理できるようにする。一部の国(スイスなど)で必要です。オフ(デフォルト)に設定すると、次の2つのパラメーターを設定して、アプリケーションに仮想ゼロを追加するように要求できる。 +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=会計科目の最後に異なる数のゼロを管理できるようにする。一部の国(スイスなど)で必要です。オフ(デフォルト)に設定すると、次の2つのパラメーターを設定して、アプリケーションに仮想ゼロを追加するように要求できる。 BANK_DISABLE_DIRECT_INPUT=銀行口座での取引の直接記録を無効にする ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=仕訳帳で下書きエクスポートを有効にする -ACCOUNTANCY_COMBO_FOR_AUX=子会社科目のコンボリストを有効にする(取引先が多数ある場合は遅くなる可能性がある) +ACCOUNTANCY_COMBO_FOR_AUX=子会社科目のコンボリストを有効にする(取引先が多数ある場合は遅くなる可能性がある) ACCOUNTING_DATE_START_BINDING=会計で紐付け力と移転を開始する日付を定義する。この日付を下回ると、トランザクションはアカウンティングに転送されない。 ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER=会計転送では、デフォルトで期間表示を選択する @@ -166,8 +169,8 @@ ACCOUNTING_EXPENSEREPORT_JOURNAL=Expense report journal ACCOUNTING_SOCIAL_JOURNAL=Social journal ACCOUNTING_HAS_NEW_JOURNAL=新規仕訳帳がある -ACCOUNTING_RESULT_PROFIT=結果会計科目(利益) -ACCOUNTING_RESULT_LOSS=結果会計科目(損失) +ACCOUNTING_RESULT_PROFIT=結果会計科目(利益) +ACCOUNTING_RESULT_LOSS=結果会計科目(損失) ACCOUNTING_CLOSURE_DEFAULT_JOURNAL=閉鎖の仕訳帳 ACCOUNTING_ACCOUNT_TRANSFER_CASH=移行銀行振込の会計科目 @@ -179,26 +182,27 @@ ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=サブスクリプションを登録す ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT=顧客預金を登録するためのデフォルトの会計科目 -ACCOUNTING_PRODUCT_BUY_ACCOUNT=購入した製品のデフォルトの会計科目(製品シートで定義されていない場合に使用) -ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=EEC域内で購入した製品のデフォルト会計科目(製品シートで定義されていない場合に使用) -ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT=購入品で、EEC域外から輸入された製品のデフォルト会計科目(製品シートで定義されていない場合に使用) -ACCOUNTING_PRODUCT_SOLD_ACCOUNT=販売された製品のデフォルトの会計科目(製品シートで定義されていない場合に使用) -ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT=EECで販売された製品のデフォルトの会計科目(製品シートで定義されていない場合に使用) -ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT=EECから販売およびエクスポートされた製品のデフォルトの会計科目(製品シートで定義されていない場合に使用) +ACCOUNTING_PRODUCT_BUY_ACCOUNT=購入した製品のデフォルトの会計科目(製品シートで定義されていない場合に使用) +ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=EEC域内で購入した製品のデフォルト会計科目(製品シートで定義されていない場合に使用) +ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT=購入品で、EEC域外から輸入された製品のデフォルト会計科目(製品シートで定義されていない場合に使用) +ACCOUNTING_PRODUCT_SOLD_ACCOUNT=販売された製品のデフォルトの会計科目(製品シートで定義されていない場合に使用) +ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT=EECで販売された製品のデフォルトの会計科目(製品シートで定義されていない場合に使用) +ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT=EECから販売およびエクスポートされた製品のデフォルトの会計科目(製品シートで定義されていない場合に使用) -ACCOUNTING_SERVICE_BUY_ACCOUNT=購入したサービスのデフォルトのアカウンティング科目(サービスシートで定義されていない場合に使用) -ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT=EECで購入したサービスのデフォルトのアカウンティング科目(サービスシートで定義されていない場合に使用) -ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT=購入したサービスおよびEECからインポートされたサービスのデフォルトのアカウンティング科目(サービスシートで定義されていない場合に使用) -ACCOUNTING_SERVICE_SOLD_ACCOUNT=販売されたサービスのデフォルトのアカウンティング科目(サービスシートで定義されていない場合に使用) -ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT=EECで販売されるサービスのデフォルトのアカウンティング科目(サービスシートで定義されていない場合に使用) -ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT=EECから販売およびエクスポートされたサービスのデフォルトのアカウンティング科目(サービスシートで定義されていない場合に使用) +ACCOUNTING_SERVICE_BUY_ACCOUNT=購入したサービスのデフォルトのアカウンティング科目(サービスシートで定義されていない場合に使用) +ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT=EECで購入したサービスのデフォルトのアカウンティング科目(サービスシートで定義されていない場合に使用) +ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT=購入したサービスおよびEECからインポートされたサービスのデフォルトのアカウンティング科目(サービスシートで定義されていない場合に使用) +ACCOUNTING_SERVICE_SOLD_ACCOUNT=販売されたサービスのデフォルトのアカウンティング科目(サービスシートで定義されていない場合に使用) +ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT=EECで販売されるサービスのデフォルトのアカウンティング科目(サービスシートで定義されていない場合に使用) +ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT=EECから販売およびエクスポートされたサービスのデフォルトのアカウンティング科目(サービスシートで定義されていない場合に使用) Doctype=ドキュメントの種別 Docdate=日付 Docref=参照 LabelAccount=ラベル科目 LabelOperation=ラベル操作 -Sens=Sens +Sens=方向 +AccountingDirectionHelp=顧客の会計科目の場合、貸方を使用して受け取った支払いを記録する。<br>仕入先の会計科目の場合、借方を使用して支払いを記録する。 LetteringCode=レタリングコード Lettering=レタリング Codejournal=仕訳帳 @@ -206,7 +210,8 @@ JournalLabel=仕訳帳ラベル NumPiece=個数番号 TransactionNumShort=数トランザクション AccountingCategory=パーソナライズされたグループ -GroupByAccountAccounting=会計科目によるグループ化 +GroupByAccountAccounting=総勘定元帳勘定によるグループ化 +GroupBySubAccountAccounting=補助元帳アカウントでグループ化 AccountingAccountGroupsDesc=ここで、会計科目のいくつかのグループを定義できる。それらは、パーソナライズされた会計レポートに使用される。 ByAccounts=科目別 ByPredefinedAccountGroups=事前定義されたグループによる @@ -217,8 +222,8 @@ DeleteMvt=アカウンティングからいくつかの操作行を削除する DelMonth=削除する月 DelYear=削除する年 DelJournal=削除する仕訳帳 -ConfirmDeleteMvt=これにより、年/月および/または特定の仕訳帳の会計のすべての操作行が削除される(少なくとも1つの基準が必要です)。削除されたレコードを元帳に戻すには、機能「%s」を再利用する必要がある。 -ConfirmDeleteMvtPartial=これにより、トランザクションがアカウンティングから削除される(同じトランザクションに関連するすべての操作ラインが削除される) +ConfirmDeleteMvt=これにより、年/月および/または特定の仕訳帳の会計のすべての操作行が削除される(少なくとも1つの基準が必要です)。削除されたレコードを元帳に戻すには、機能「%s」を再利用する必要がある。 +ConfirmDeleteMvtPartial=これにより、トランザクションがアカウンティングから削除される(同じトランザクションに関連するすべての操作ラインが削除される) FinanceJournal=財務仕訳帳 ExpenseReportsJournal=経費報告仕訳帳 DescFinanceJournal=銀行口座による全種別の支払いを含む財務仕訳帳 @@ -248,34 +253,36 @@ PaymentsNotLinkedToProduct=支払いはどの製品/サービスにもリンク OpeningBalance=期首残高 ShowOpeningBalance=期首残高を表示する HideOpeningBalance=期首残高を非表示にする -ShowSubtotalByGroup=グループごとに小計を表示 +ShowSubtotalByGroup=レベルごとに小計を表示 Pcgtype=勘定科目のグループ -PcgtypeDesc=科目のグループは、一部のアカウンティングレポートの事前定義された「フィルター」および「グループ化」基準として使用される。たとえば、「INCOME」または「EXPENSE」は、費用/収入レポートを作成するための製品の会計科目のグループとして使用される。 +PcgtypeDesc=科目のグループは、一部のアカウンティングレポートの事前定義された「フィルタ」および「グループ化」基準として使用される。たとえば、「INCOME」または「EXPENSE」は、費用/収入レポートを作成するための製品の会計科目のグループとして使用される。 Reconcilable=調整可能 TotalVente=税引前総売上高 TotalMarge=売上総利益 -DescVentilCustomer=製品会計科目にバインドされている(またはバインドされていない)顧客請求書行のリストをここで参照すること +DescVentilCustomer=製品会計科目にバインドされている(またはバインドされていない)顧客請求書行のリストをここで参照すること DescVentilMore=ほとんどの場合、事前定義された製品またはサービスを使用し、製品/サービスカードに科目番号を設定すると、アプリケーションは、請求書の行と勘定科目表の会計科目の間のすべての紐付をボタン<strong> "%s" </strong>でワンクリックする。製品/サービスカードに科目が設定されていない場合、または科目に紐付けされていない行がまだある場合は、メニュー「<strong>%s</strong>」から手動で紐付けする必要がある。 DescVentilDoneCustomer=請求書の顧客の行とその製品会計科目のリストをここで参照すること DescVentilTodoCustomer=製品会計科目にまだ紐付けされていない請求書行を紐付けする ChangeAccount=選択したラインの製品/サービス会計科目を次の会計科目に変更する。 Vide=- -DescVentilSupplier=製品会計科目にバインドされている、またはまだバインドされていない仕入先請求書明細のリストをここで参照すること(会計でまだ転送されていないレコードのみが表示される) +DescVentilSupplier=製品会計科目にバインドされている、またはまだバインドされていない仕入先請求書明細のリストをここで参照すること(会計でまだ転送されていないレコードのみが表示される) DescVentilDoneSupplier=ベンダーの請求書の行とその会計科目のリストをここで参照すること DescVentilTodoExpenseReport=まだ料金会計科目に紐付けされていない経費レポート行を紐付けする -DescVentilExpenseReport=手数料会計科目にバインドされている(またはバインドされていない)経費報告行のリストをここで参照すること +DescVentilExpenseReport=手数料会計科目にバインドされている(またはバインドされていない)経費報告行のリストをここで参照すること DescVentilExpenseReportMore=経費報告行の種別で会計科目を設定すると、アプリケーションは、ボタン<strong> "%s" </strong>をワンクリックするだけで、経費報告行と勘定科目表の会計科目の間のすべての紐付けを行うことができる。科目が料金辞書に設定されていない場合、または科目に紐付けされていない行がまだある場合は、メニュー「<strong>%s</strong>」から手動で紐付けする必要がある。 DescVentilDoneExpenseReport=経費報告書の行とその手数料会計科目のリストをここで参照すること +Closure=年次閉鎖 DescClosure=検証されていない月ごとの動きの数とすでに開いている会計年度をここで参照すること -OverviewOfMovementsNotValidated=ステップ1 /検証されていない動きの概要。 (決算期に必要) +OverviewOfMovementsNotValidated=ステップ1 /検証されていない動きの概要。 (決算期に必要) +AllMovementsWereRecordedAsValidated=すべての動きは検証済みとして記録された +NotAllMovementsCouldBeRecordedAsValidated=すべての動きを検証済みとして記録できるわけではない ValidateMovements=動きを検証する DescValidateMovements=書き込み、レタリング、削除の変更または削除は禁止される。演習のすべてのエントリを検証する必要がある。検証しないと、閉じることができない。 -SelectMonthAndValidate=月を選択し、動きを検証する ValidateHistory=自動的に紐付け AutomaticBindingDone=自動紐付けが行われた @@ -293,6 +300,7 @@ Accounted=元帳に計上 NotYetAccounted=元帳にはまだ計上されていない ShowTutorial=チュートリアルを表示 NotReconciled=調整されていない +WarningRecordWithoutSubledgerAreExcluded=警告、補助元帳アカウントが定義されていないすべての操作はフィルタリングされ、このビューから除外される ## Admin BindingOptions=製本オプション @@ -315,9 +323,9 @@ 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=経費報告書の会計における紐付け力と移転を無効にする(経費報告書は会計で考慮されない) +ACCOUNTING_DISABLE_BINDING_ON_SALES=販売の会計における紐付け力と移転を無効にする(顧客の請求書は会計に考慮されない) +ACCOUNTING_DISABLE_BINDING_ON_PURCHASES=購入時の会計における紐付け力と移転を無効にする(ベンダーの請求書は会計で考慮されない) +ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS=経費報告書の会計における紐付け力と移転を無効にする(経費報告書は会計で考慮されない) ## Export ExportDraftJournal=下書き仕訳帳のエクスポート @@ -332,15 +340,16 @@ Modelcsv_quadratus=QuadratusQuadraComptaのエクスポート Modelcsv_ebp=EBPのエクスポート Modelcsv_cogilog=Cogilogのエクスポート Modelcsv_agiris=Agirisのエクスポート -Modelcsv_LDCompta=LD Compta(v9)のエクスポート(テスト) -Modelcsv_LDCompta10=LD Compta(v10以降)のエクスポート -Modelcsv_openconcerto=OpenConcertoのエクスポート(テスト) +Modelcsv_LDCompta=LD Compta(v9)のエクスポート(テスト) +Modelcsv_LDCompta10=LD Compta(v10以降)のエクスポート +Modelcsv_openconcerto=OpenConcertoのエクスポート(テスト) Modelcsv_configurable=CSV構成可能のエクスポート Modelcsv_FEC=FECのエクスポート +Modelcsv_FEC2=FECのエクスポート(日付生成の書き込み/ドキュメントの反転あり) Modelcsv_Sage50_Swiss=セージ50スイスへのエクスポート Modelcsv_winfic=Winficのエクスポート-eWinfic-WinSisCompta -Modelcsv_Gestinumv3=Export for Gestinum (v3) -Modelcsv_Gestinumv5Export for Gestinum (v5) +Modelcsv_Gestinumv3=Gestinum(v3)のエクスポート +Modelcsv_Gestinumv5Export Gestinum(v5)の場合 ChartofaccountsId=勘定科目表ID ## Tools - Init accounting account on product / service @@ -381,7 +390,7 @@ Formula=式 ## Error SomeMandatoryStepsOfSetupWereNotDone=セットアップのいくつかの必須の手順が実行されないでした。それらを完了すること -ErrorNoAccountingCategoryForThisCountry=国%sで使用できる会計科目グループがない( ホーム - 設定 - 辞書 を参照) +ErrorNoAccountingCategoryForThisCountry=国%sで使用できる会計科目グループがない( ホーム - 設定 - 辞書 を参照) ErrorInvoiceContainsLinesNotYetBounded=請求書<strong>%s </strong>の一部の行を仕訳しようとしたが、他の一部の行はまだ会計科目にバインドされていない。この請求書のすべての請求書行の仕訳は拒否される。 ErrorInvoiceContainsLinesNotYetBoundedShort=請求書の一部の行は、会計科目にバインドされていない。 ExportNotSupported=設定されたエクスポート形式は、このページではサポートされていない diff --git a/htdocs/langs/ja_JP/admin.lang b/htdocs/langs/ja_JP/admin.lang index 489bb909061..fc6e2f4da0b 100644 --- a/htdocs/langs/ja_JP/admin.lang +++ b/htdocs/langs/ja_JP/admin.lang @@ -56,6 +56,8 @@ GUISetup=表示 SetupArea=設定 UploadNewTemplate=新規テンプレート(s)をアップロード FormToTestFileUploadForm=ファイルのアップロードをテストするために形成する ( 設定に応じて ) +ModuleMustBeEnabled=モジュール/アプリケーション<b>%s</b>を有効にする必要がある +ModuleIsEnabled=モジュール/アプリケーション<b>%s</b>が有効になった IfModuleEnabled=注:【はい】は、モジュールの<b>%sが</b>有効<b>になっ</b>ている場合にのみ有効 RemoveLock=ファイル<b>%s </b>が存在する場合、それを削除/改名することで、更新/インストール のツールが使用可能になる。 RestoreLock=ファイル<b>%s </b>を読取権限のみで復元すると、これ以上の更新/インストール のツール使用が不可になる。 @@ -85,7 +87,6 @@ ShowPreview=プレビューを表示 ShowHideDetails=詳細を 表示-非表示 PreviewNotAvailable=プレビューは利用不可 ThemeCurrentlyActive=現在有効なテーマ -CurrentTimeZone=PHP(サーバー)のタイムゾーン MySQLTimeZone=MySql(データベース)のタイムゾーン TZHasNoEffect=日付は、送信された文字列として保持されているかのように、データベースサーバーによって保存され返される。タイムゾーンは、UNIX_TIMESTAMP関数を使用する場合にのみ有効 (Dolibarrでは不使用を推奨し、そうすると、データ入力後に変更があったとしても、データベースTZの影響を受けなくなる ) 。 Space=スペース @@ -153,8 +154,8 @@ SystemToolsAreaDesc=この領域は管理機能を提供する。メニューを Purge=パージ PurgeAreaDesc=このページでは、Dolibarrによって生成または保存されたすべてのファイル ( 一時ファイルまたは<b> %s </b>ディレクトリ内のすべてのファイル ) を削除できる。通常、この機能を使用する必要はない。これは、Webサーバーによって生成されたファイルを削除する権限を提供しないプロバイダーによってDolibarrがホストされているユーザの回避策として提供されている。 PurgeDeleteLogFile=Syslogモジュール用に定義された<b>%s </b>を含むログファイルを削除する ( データを失うリスクはない ) -PurgeDeleteTemporaryFiles=すべての一時ファイルを削除する ( データを失うリスクはない ) 。注:削除は、一時ディレクトリが24時間前に作成された場合にのみ実行される。 -PurgeDeleteTemporaryFilesShort=一時ファイルを削除する +PurgeDeleteTemporaryFiles=すべてのログファイルと一時ファイルを削除する(データを失うリスクなし)。注:一時ファイルの削除は、一時ディレクトリが24時間以上前に作成された場合にのみ実行される。 +PurgeDeleteTemporaryFilesShort=ログと一時ファイルを削除する PurgeDeleteAllFilesInDocumentsDir=ディレクトリ:<b> %s</b> 内のすべてのファイルを削除する。 <br>これにより、要素 ( 取引先、請求書など ) に関連する生成されたすべてのドキュメント、ECMモジュールにアップロードされたファイル、データベースのバックアップダンプ、および一時ファイルが削除される。 PurgeRunNow=今パージ PurgeNothingToDelete=削除するディレクトリやファイルはない。 @@ -256,6 +257,7 @@ ReferencedPreferredPartners=優先パートナー OtherResources=その他のリソース ExternalResources=外部リソース SocialNetworks=ソーシャルネットワーク +SocialNetworkId=ソーシャルネットワークID ForDocumentationSeeWiki=ユーザまたは開発者のドキュメント ( DOC、よくある質問 ( FAQ ) ... ) のために、 <br> Dolibarr Wikiで見てみましょう。 <br> <a href="%s" target="_blank"><b>%s</b></a> ForAnswersSeeForum=他の質問/ヘルプについては、Dolibarrフォーラムを使用することができる。 <br> <a href="%s" target="_blank"><b>%s</b></a> HelpCenterDesc1=Dolibarrのヘルプとサポートを受けるためのリソースをいくつか紹介する。 @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=現在の構成の例 ListOfDirectories=OpenDocumentをテンプレートディレクトリのリスト ListOfDirectoriesForModelGenODT=OpenDocument形式のテンプレートファイルを含むディレクトリのリスト。 <br><br>ここにディレクトリのフルパスを入力する。 <br>eahディレクトリ間にキャリッジリターンを追加する。 <br> GEDモジュールのディレクトリを追加するには、ここに<b> DOL_DATA_ROOT / ecm / yourdirectoryname</b>を追加する。 <br> <br>これらのディレクトリ内のファイルは、<b> .odt</b>または<b>.ods</b>で終わる必要がある。 NumberOfModelFilesFound=これらのディレクトリで見つかったODT / ODSテンプレートファイルの数 -ExampleOfDirectoriesForModelGen=構文の例: <br> C:\\ mydirに<br> / home / mydirの<br> DOL_DATA_ROOT / ECM / ecmdir +ExampleOfDirectoriesForModelGen=構文の例:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br>あなたのODTドキュメントテンプレートを作成する方法を知って、それらのディレクトリに格納する前に、ウィキのドキュメントをお読みください。 FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=名/姓の位置 @@ -406,7 +408,7 @@ UrlGenerationParameters=URLを確保するためのパラメータ SecurityTokenIsUnique=各URLごとに一意securekeyパラメータを使用して、 EnterRefToBuildUrl=オブジェクト%sの参照を入力する。 GetSecuredUrl=計算されたURLを取得する -ButtonHideUnauthorized=灰色の無効なボタンを表示する代わりに、管理者以外のユーザの不正なアクションのボタンを非表示にする +ButtonHideUnauthorized=内部ユーザーに対しても不正なアクションボタンを非表示にする(それ以外の場合は灰色で表示される) OldVATRates=古いVAT率 NewVATRates=新規VAT率 PriceBaseTypeToChange=で定義された基本参照値を使用して価格を変更する @@ -442,8 +444,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 :: 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 ExtrafieldParamHelplink=パラメータはObjectName:Classpathでなければなりません<br>構文:ObjectName:Classpath ExtrafieldParamHelpSeparator=単純なセパレーターの場合は空のままにする<br>折りたたみセパレーターの場合はこれを1に設定する ( 新規セッションの場合はデフォルトで開き、ユーザセッションごとにステータスが保持される ) <br>折りたたみセパレーターの場合はこれを2に設定する ( 新規セッションの場合はデフォルトで折りたたむ。ステータスは各ユーザセッションの間保持される ) LibraryToBuildPDF=PDF生成に使用されるライブラリ @@ -668,7 +670,7 @@ Module54000Desc=Cups IPPインターフェイスを使用した ( ドキュメ Module55000Name=投票、調査または投票 Module55000Desc=オンライン投票、調査、投票を作成する ( Doodle、スタッド、RDVzなど ) Module59000Name=マージン -Module59000Desc=マージンを管理するモジュール +Module59000Desc=マージンに従うモジュール Module60000Name=手数料 Module60000Desc=手数料を管理するモジュール Module62000Name=インコタームズ @@ -836,7 +838,7 @@ Permission402=割引を作成/変更 Permission403=割引を検証する Permission404=割引を削除する。 Permission430=デバッグバーを使用する -Permission511=給与の支払いを見る(自分と部下) +Permission511=給与の支払いを見る(自分と部下) Permission512=給与の支払いを作成/変更する Permission514=給与の支払いを削除する Permission517=全員の給料支払いを見る @@ -1306,7 +1308,7 @@ YouUseBestDriver=現在利用可能な最高のドライバーであるドライ YouDoNotUseBestDriver=ドライバー%sを使用するが、ドライバー%sをお勧めする。 NbOfObjectIsLowerThanNoPb=データベースには%s%sしかない。これには、特別な最適化は必要ない。 SearchOptim=検索最適化 -YouHaveXObjectUseSearchOptim=データベースに%s%sがある。 Home-Setup-Otherで定数%sを1に追加する必要がある。検索を文字列の先頭に制限する。これにより、データベースでインデックスを使用できるようになり、すぐに応答が返される。 +YouHaveXObjectUseSearchOptim=データベースに%s%sがある。 Home-Setup-Otherで定数%sを1に追加できます。検索を文字列の先頭に制限する。これにより、データベースでインデックスを使用できるようになり、すぐに応答が返される。 YouHaveXObjectAndSearchOptimOn=データベースに%s%sがあり、Home-Setup-Otherで定数%sが1に設定されている。 BrowserIsOK=%sWebブラウザーを使用している。このブラウザは、セキュリティとパフォーマンスに問題はない。 BrowserIsKO=%sWebブラウザーを使用している。このブラウザは、セキュリティ、パフォーマンス、信頼性の点で悪い選択であることが知られている。 Firefox、Chrome、Opera、またはSafariの使用をお勧めする。 @@ -1314,7 +1316,7 @@ PHPModuleLoaded=PHPコンポーネント%sがロードされる PreloadOPCode=プリロードされたOPCodeが使用される AddRefInList=顧客/仕入先参照を表示する。情報リスト ( 選択リストまたはコンボボックス ) およびほとんどのハイパーリンク。 <br>取引先は、「CC12345-SC45678-The BigCompanycorp。」という名前の形式で表示される。 「TheBigCompanycorp」の代わりに。 AddAdressInList=顧客/仕入先の住所情報リストを表示する ( リストまたはコンボボックスを選択 ) <br>取引先は、「TheBigCompanycorp。」ではなく「TheBigCompanycorp。-21jumpstreet 123456Bigtown-USA」の名前形式で表示される。 -AddEmailPhoneTownInContactList=連絡先の電子メール(または未定義の場合は電話)と町の情報リスト(選択リストまたはコンボボックス)を表示<br>連絡先は以下の名称と形式で表記される:"Dupond Durand" の形式でなく、 "Dupond Durand - dupond.durand@email.com - Paris" または "Dupond Durand - 06 07 59 65 66 - Paris" 。 +AddEmailPhoneTownInContactList=連絡先の電子メール(または未定義の場合は電話)と町の情報リスト(選択リストまたはコンボボックス)を表示<br>連絡先は以下の名称と形式で表記される:"Dupond Durand" の形式でなく、 "Dupond Durand - dupond.durand@email.com - Paris" または "Dupond Durand - 06 07 59 65 66 - Paris" 。 AskForPreferredShippingMethod=取引先の優先配送方法を尋ねる。 FieldEdition=フィールド%sのエディション FillThisOnlyIfRequired=例:+2 ( タイムゾーンオフセットの問題が発生した場合にのみ入力 ) @@ -1501,7 +1503,7 @@ LDAPDolibarrMapping=Dolibarrマッピング LDAPLdapMapping=LDAPのマッピング LDAPFieldLoginUnix=ログイン ( UNIX ) LDAPFieldLoginExample=例:uid -LDAPFilterConnection=検索フィルター +LDAPFilterConnection=検索フィルタ LDAPFilterConnectionExample=例:& ( objectClass = inetOrgPerson ) LDAPFieldLoginSamba=ログイン ( サンバ、ActiveDirectoryを ) LDAPFieldLoginSambaExample=例:samaccountname @@ -1584,9 +1586,9 @@ CacheByClient=ブラウザによるキャッシュ CompressionOfResources=HTTP応答の圧縮 CompressionOfResourcesDesc=たとえば、Apacheディレクティブ「AddOutputFilterByTypeDEFLATE」を使用する TestNotPossibleWithCurrentBrowsers=このような自動検出は、現在のブラウザでは不可能。 -DefaultValuesDesc=ここでは、新規レコードを作成するときに使用するデフォルト値や、レコードを一覧表示するときのデフォルトのフィルターまたは並べ替え順序を定義できる。 +DefaultValuesDesc=ここでは、新規レコードを作成するときに使用するデフォルト値や、レコードを一覧表示するときのデフォルトのフィルタまたは並べ替え順序を定義できる。 DefaultCreateForm=デフォルト値 ( フォームで使用 ) -DefaultSearchFilters=デフォルトの検索フィルター +DefaultSearchFilters=デフォルトの検索フィルタ DefaultSortOrder=デフォルトのソート順 DefaultFocus=デフォルトのフォーカスフィールド DefaultMandatory=必須のフォームフィールド @@ -1596,8 +1598,13 @@ ServiceSetup=サービスモジュールの設定 ProductServiceSetup=製品とサービスモジュールの設定 NumberOfProductShowInSelect=コンボ選択リストに表示する製品の最大数 ( 0 =制限なし ) ViewProductDescInFormAbility=製品の説明をフォームに表示する ( それ以外の場合はツールチップポップアップに表示される ) +DoNotAddProductDescAtAddLines=フォームの追加行の送信時に(製品カードから)製品説明を追加しないこと +OnProductSelectAddProductDesc=ドキュメントの行として製品追加するときの、製品説明の使用方法 +AutoFillFormFieldBeforeSubmit=説明入力フィールドに製品説明を自動入力する +DoNotAutofillButAutoConcat=入力フィールドに製品説明を自動入力しない。製品説明は、入力された説明に自動的に連結される。 +DoNotUseDescriptionOfProdut=製品説明が文書の行の説明に含まれることはない MergePropalProductCard=製品/サービスが提案に含まれている場合、製品/サービスの【添付ファイル】タブで、製品のPDFドキュメントを提案のPDFazurにマージするオプションをアクティブにする -ViewProductDescInThirdpartyLanguageAbility=取引先の言語で製品の説明を表示する +ViewProductDescInThirdpartyLanguageAbility=フォームでは製品説明を取引先の言語(それ以外の場合はユーザの言語)で表示 UseSearchToSelectProductTooltip=また、製品の数が多い ( > 100 000 ) 場合は、【設定】-> 【その他】で定数PRODUCT_DONOTSEARCH_ANYWHEREを1に設定することで速度を上げることができる。その後、検索は文字列の先頭に限定される。 UseSearchToSelectProduct=キーを押すまで待ってから、製品コンボリストのコンテンツをロードすること ( これにより、製品の数が多い場合にパフォーマンスが向上する可能性があるが、あまり便利ではない ) SetDefaultBarcodeTypeProducts=製品に使用するデフォルトのバーコードの種類 @@ -1672,7 +1679,7 @@ AdvancedEditor=高度なエディタ ActivateFCKeditor=のための高度なエディタをアクティブにする。 FCKeditorForCompany=要素の説明と注意事項のWYSIWIGエディタの作成/版 ( 製品/サービスを除く ) FCKeditorForProduct=製品/サービスの説明と注意事項のWYSIWIGエディタの作成/版 -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による製品の作成/編集では、すべてのエンティティ(提案、注文、請求書など)の詳細行が示される。 <span class="warning">警告:この場合にこのオプションを使用することは、PDFファイルを作成するときに特殊文字やページの書式設定で問題が発生する可能性があるため、真剣に推奨されない。 </span> FCKeditorForMailing= 郵送のWYSIWIGエディタの作成/版 FCKeditorForUserSignature=WYSIWIGによるユーザ署名の作成/編集 FCKeditorForMail=すべてのメールのWYSIWIG作成/エディション ( 【ツール】-> 【電子メール】を除く ) @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=トップメニューエントリにリンクされ NewMenu=新メニュー MenuHandler=メニューハンドラ MenuModule=ソース·モジュール -HideUnauthorizedMenu= 不正なメニュー ( グレー ) を非表示 +HideUnauthorizedMenu=内部ユーザーに対しても許可されていないメニューを非表示にする(それ以外の場合は灰色で表示される) DetailId=idのメニュー DetailMenuHandler=新規メニューを表示するメニューハンドラ DetailMenuModule=モジュール名のメニューエントリは、モジュールから来る場合 @@ -1735,12 +1742,12 @@ PasswordTogetVCalExport=エクスポートのリンクを許可するキー PastDelayVCalExport=より古いイベントはエクスポートしない AGENDA_USE_EVENT_TYPE=イベント種別を使用する ( メニューの【設定】-> 【辞書】-> 【アジェンダイベントの種別】で管理 ) AGENDA_USE_EVENT_TYPE_DEFAULT=イベント作成フォームでイベントの種別にこのデフォルト値を自動的に設定する -AGENDA_DEFAULT_FILTER_TYPE=アジェンダビューの検索フィルターでこの種別のイベントを自動的に設定する -AGENDA_DEFAULT_FILTER_STATUS=アジェンダビューの検索フィルターでイベントのこのステータスを自動的に設定する +AGENDA_DEFAULT_FILTER_TYPE=アジェンダビューの検索フィルタでこの種別のイベントを自動的に設定する +AGENDA_DEFAULT_FILTER_STATUS=アジェンダビューの検索フィルタでイベントのこのステータスを自動的に設定する AGENDA_DEFAULT_VIEW=メニューの議題を選択するときに、デフォルトでどのビューを開くか -AGENDA_REMINDER_BROWSER=ユーザーのブラウザ</b>でイベントリマインダー<b>を有効にする(リマインダーの日付に達すると、ブラウザにポップアップが表示される。各ユーザーは、ブラウザの通知設定からそのような通知を無効にできる)。 +AGENDA_REMINDER_BROWSER=ユーザーのブラウザ</b>でイベントリマインダー<b>を有効にする(リマインダーの日付に達すると、ブラウザにポップアップが表示される。各ユーザーは、ブラウザの通知設定からそのような通知を無効にできる)。 AGENDA_REMINDER_BROWSER_SOUND=音声通知を有効にする -AGENDA_REMINDER_EMAIL=電子メール</b>でイベントリマインダー<b>を有効にする(リマインダーオプション/遅延は各イベントで定義できる)。 +AGENDA_REMINDER_EMAIL=電子メール</b>でイベントリマインダー<b>を有効にする(リマインダーオプション/遅延は各イベントで定義できる)。 AGENDA_REMINDER_EMAIL_NOTE=注:タスク%sの頻度は、リマインダーが正しいタイミングで送信されることを確認するのに十分でなければならない。 AGENDA_SHOW_LINKED_OBJECT=リンクされたオブジェクトを議題ビューに表示する ##### Clicktodial ##### @@ -1962,8 +1969,8 @@ SetToYesIfGroupIsComputationOfOtherGroups=このグループが他のグルー EnterCalculationRuleIfPreviousFieldIsYes=前のフィールドが「はい」に設定されている場合は、計算ルールを入力する ( たとえば、「CODEGRP1 + CODEGRP2」 ) SeveralLangugeVariatFound=いくつかの言語バリアントが見つかりました RemoveSpecialChars=特殊文字を削除する -COMPANY_AQUARIUM_CLEAN_REGEX=値をクリーンアップするための正規表現フィルター ( COMPANY_AQUARIUM_CLEAN_REGEX ) -COMPANY_DIGITARIA_CLEAN_REGEX=値をクリーンアップするための正規表現フィルター ( COMPANY_DIGITARIA_CLEAN_REGEX ) +COMPANY_AQUARIUM_CLEAN_REGEX=値をクリーンアップするための正規表現フィルタ ( COMPANY_AQUARIUM_CLEAN_REGEX ) +COMPANY_DIGITARIA_CLEAN_REGEX=値をクリーンアップするための正規表現フィルタ ( COMPANY_DIGITARIA_CLEAN_REGEX ) COMPANY_DIGITARIA_UNIQUE_CODE=複製は許可されていない GDPRContact=データ保護責任者 ( DPO、データプライバシーまたはGDPRの連絡先 ) GDPRContactDesc=ヨーロッパの企業/市民に関するデータを保存する場合は、ここで一般データ保護規則の責任者を指定できる @@ -1983,15 +1990,16 @@ EMailHost=電子メールIMAPサーバーのホスト MailboxSourceDirectory=メールボックスのソースディレクトリ MailboxTargetDirectory=メールボックスのターゲットディレクトリ EmailcollectorOperations=コレクターによる操作 +EmailcollectorOperationsDesc=操作は上から下の順序で実行される MaxEmailCollectPerCollect=収集ごとに収集される電子メールの最大数 CollectNow=今すぐ収集 ConfirmCloneEmailCollector=メールコレクター%sのクローンを作成してもよいか? -DateLastCollectResult=最新の収集が試行された日付 -DateLastcollectResultOk=最新の収集が成功した日付 +DateLastCollectResult=最新の取得試行の日付 +DateLastcollectResultOk=最新の取得成功の日付 LastResult=最新の結果 EmailCollectorConfirmCollectTitle=メール収集確認 EmailCollectorConfirmCollect=このコレクターのコレクションを今すぐ実行するか? -NoNewEmailToProcess=処理する新規電子メール ( 一致するフィルター ) はない +NoNewEmailToProcess=処理する新規電子メール ( 一致するフィルタ ) はない NothingProcessed=何もしていない XEmailsDoneYActionsDone=%s電子メールが修飾され、%s電子メールが正常に処理されました ( %sレコード/アクションが実行された場合 ) RecordEvent=メールイベントを記録する @@ -2005,7 +2013,7 @@ WithDolTrackingID=Dolibarrから送信された最初の電子メールによっ WithoutDolTrackingID=Dolibarrから送信されていない最初の電子メールによって開始された会話からのメッセージ WithDolTrackingIDInMsgId=Dolibarrから送信されたメッセージ WithoutDolTrackingIDInMsgId=Dolibarrからメッセージが送信されていない -CreateCandidature=候補を作成する +CreateCandidature=求人応募を作成する FormatZip=ZIP MainMenuCode=メニュー入力コード ( メインメニュー ) ECMAutoTree=自動ECMツリーを表示する @@ -2083,3 +2091,7 @@ CountryIfSpecificToOneCountry=国 ( 特定の国に固有の場合 ) YouMayFindSecurityAdviceHere=ここにセキュリティアドバイザリがある ModuleActivatedMayExposeInformation=このモジュールは機密データを公開する可能性がある。不要な場合は無効にすること。 ModuleActivatedDoNotUseInProduction=開発用に設計されたモジュールが有効になった。実稼働環境では有効にしないこと。 +CombinationsSeparator=製品の組み合わせの区切り文字 +SeeLinkToOnlineDocumentation=例については、トップメニューのオンラインドキュメントへのリンクを参照すること +SHOW_SUBPRODUCT_REF_IN_PDF=モジュール<b>%s </b>の機能「%s」を使用する場合は、キットの副産物の詳細をPDFで表示すること。 +AskThisIDToYourBank=このIDを取得するには、銀行に問い合わせること diff --git a/htdocs/langs/ja_JP/agenda.lang b/htdocs/langs/ja_JP/agenda.lang index a918ed85c32..e6c0411be42 100644 --- a/htdocs/langs/ja_JP/agenda.lang +++ b/htdocs/langs/ja_JP/agenda.lang @@ -1,26 +1,26 @@ # Dolibarr language file - Source file is en_US - agenda -IdAgenda=ID event +IdAgenda=IDイベント Actions=イベント Agenda=議題 TMenuAgenda=議題 -Agendas=アジェンダ -LocalAgenda=Internal calendar -ActionsOwnedBy=Event owned by +Agendas=議題s +LocalAgenda=内部カレンダー +ActionsOwnedBy=が所有するイベント ActionsOwnedByShort=所有者 AffectedTo=影響を受ける Event=イベント Events=イベント -EventsNb=Number of events +EventsNb=イベント数 ListOfActions=イベントのリスト -EventReports=Event reports +EventReports=イベントレポート Location=場所 -ToUserOfGroup=Event assigned to any user in group +ToUserOfGroup=グループ内の任意のユーザーに割り当てられたイベント EventOnFullDay=一日のイベント MenuToDoActions=すべての不完全なイベント MenuDoneActions=すべての終了イベント MenuToDoMyActions=私の不完全なイベント MenuDoneMyActions=私の終了イベント -ListOfEvents=List of events (internal calendar) +ListOfEvents=イベント一覧(内部カレンダー) ActionsAskedBy=によって報告されたイベント ActionsToDoBy=イベントへの影響を受けた ActionsDoneBy=によって行われたイベント @@ -28,141 +28,142 @@ ActionAssignedTo=イベントに影響を受けた ViewCal=月間表示 ViewDay=日表示 ViewWeek=週ビュー -ViewPerUser=Per user view -ViewPerType=Per type view +ViewPerUser=ユーザービューごと +ViewPerType=種別ビューごと AutoActions= 議題の自動充填 -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=このページでは、Dolibarrの議題にそれらのイベントを表示するにはカレンダーの外部ソースを宣言することができます。 +AgendaAutoActionDesc= ここで、Dolibarrが議題で自動的に作成するイベントを定義できる。何もチェックされていない場合、手動アクションのみがログに含まれ、議題に表示されます。オブジェクトに対して実行されたビジネスアクション(検証、ステータス変更)の自動追跡は保存されません。 +AgendaSetupOtherDesc= このページには、Dolibarrイベントを外部カレンダー(Thunderbird、Googleカレンダーなど)にエクスポートできるようにするオプションがある。 +AgendaExtSitesDesc=このページでは、Dolibarrの議題にそれらのイベントを表示するにはカレンダーの外部ソースを宣言することができる。 ActionsEvents=Dolibarrが自動的に議題でアクションを作成する対象のイベント -EventRemindersByEmailNotEnabled=Event reminders by email was not enabled into %s module setup. +EventRemindersByEmailNotEnabled=電子メールによるイベントリマインダーは、%sモジュールセットアップで有効になっていなかった。 ##### 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 +NewCompanyToDolibarr=取引先%sは作成済 +COMPANY_DELETEInDolibarr=取引先%sは削除済 +ContractValidatedInDolibarr=契約%sは検証済 +CONTRACT_DELETEInDolibarr=契約%sは削除済 +PropalClosedSignedInDolibarr=提案%sが署名された +PropalClosedRefusedInDolibarr=提案%sは拒否された PropalValidatedInDolibarr=提案%sは、検証 -PropalClassifiedBilledInDolibarr=Proposal %s classified billed -InvoiceValidatedInDolibarr=請求書%sは、検証 -InvoiceValidatedInDolibarrFromPos=Invoice %s validated from POS +PropalClassifiedBilledInDolibarr=提案%s分類請求済 +InvoiceValidatedInDolibarr=請求書%sは検証済 +InvoiceValidatedInDolibarrFromPos=POSから検証された請求書%s InvoiceBackToDraftInDolibarr=請求書%sはドラフトの状態に戻って -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=注文%sは、検証 -OrderDeliveredInDolibarr=Order %s classified delivered -OrderCanceledInDolibarr=ご注文はキャンセル%s -OrderBilledInDolibarr=Order %s classified billed -OrderApprovedInDolibarr=注文%sは、承認された -OrderRefusedInDolibarr=Order %s refused +InvoiceDeleteDolibarr=請求書%sは削除済 +InvoicePaidInDolibarr=請求書%sが有料に変更された +InvoiceCanceledInDolibarr=請求書%sは取消済 +MemberValidatedInDolibarr=メンバー%sは検証済 +MemberModifiedInDolibarr=メンバー%sは変更済 +MemberResiliatedInDolibarr=メンバー%sが終了した +MemberDeletedInDolibarr=メンバー%sは削除済 +MemberSubscriptionAddedInDolibarr=メンバー%sのサブスクリプション%sは追加済 +MemberSubscriptionModifiedInDolibarr=メンバー%sのサブスクリプション%sは変更済 +MemberSubscriptionDeletedInDolibarr=メンバー%sのサブスクリプション%sは削除済 +ShipmentValidatedInDolibarr=出荷%sは検証済 +ShipmentClassifyClosedInDolibarr=出荷%s分類請求済 +ShipmentUnClassifyCloseddInDolibarr=出荷%s分類再開 +ShipmentBackToDraftInDolibarr=出荷%sはドラフトステータスに戻る +ShipmentDeletedInDolibarr=出荷%sは削除済 +ReceptionValidatedInDolibarr=受信%sは検証済 +OrderCreatedInDolibarr=注文%sは作成済 +OrderValidatedInDolibarr=注文%sは検証済 +OrderDeliveredInDolibarr=分類された%sを注文して配達 +OrderCanceledInDolibarr=注文%s は取消済 +OrderBilledInDolibarr=注文 %sは分類請求済 +OrderApprovedInDolibarr=注文%sは承認済 +OrderRefusedInDolibarr=注文%sが拒否された OrderBackToDraftInDolibarr=注文%sは、ドラフトの状態に戻って -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 +ProposalSentByEMail=電子メールで送信された商用提案%s +ContractSentByEMail=メールで送信された契約%s +OrderSentByEMail=電子メールで送信された販売注文%s +InvoiceSentByEMail=電子メールで送信された顧客の請求書%s +SupplierOrderSentByEMail=電子メールで送信された注文書%s +ORDER_SUPPLIER_DELETEInDolibarr=注文書%sは削除済 +SupplierInvoiceSentByEMail=電子メールで送信された仕入先の請求書%s +ShippingSentByEMail=電子メールで送信された出荷%s +ShippingValidated= 出荷%sは検証済 +InterventionSentByEMail=電子メールで送信された介入%s +ProposalDeleted=提案は削除済 +OrderDeleted=注文は削除済 +InvoiceDeleted=請求書は削除済 +DraftInvoiceDeleted=ドラフト請求書は削除済 +CONTACT_CREATEInDolibarr=作成された連絡先%s +CONTACT_DELETEInDolibarr=連絡先%sは削除済 +PRODUCT_CREATEInDolibarr=製品%sは作成済 +PRODUCT_MODIFYInDolibarr=製品%sは変更済 +PRODUCT_DELETEInDolibarr=製品%sは削除済 +HOLIDAY_CREATEInDolibarr=休暇申請%sは作成済 +HOLIDAY_MODIFYInDolibarr=休暇申請%sを変更 +HOLIDAY_APPROVEInDolibarr=休暇申請%s承認済 +HOLIDAY_VALIDATEInDolibarr=休暇のリクエスト%sは検証済 +HOLIDAY_DELETEInDolibarr=休暇申請%sを削除 +EXPENSE_REPORT_CREATEInDolibarr=経費報告書%sは作成済 +EXPENSE_REPORT_VALIDATEInDolibarr=経費報告書%sは検証済 +EXPENSE_REPORT_APPROVEInDolibarr=経費報告書%sは承認済 +EXPENSE_REPORT_DELETEInDolibarr=経費報告書%sは削除済 +EXPENSE_REPORT_REFUSEDInDolibarr=経費報告書%sが拒否された +PROJECT_CREATEInDolibarr=プロジェクト%sは作成済 +PROJECT_MODIFYInDolibarr=プロジェクト%sは変更済 +PROJECT_DELETEInDolibarr=プロジェクト%sは削除済 +TICKET_CREATEInDolibarr=チケット%sは作成済 +TICKET_MODIFYInDolibarr=チケット%sは変更済 +TICKET_ASSIGNEDInDolibarr=割り当てられたチケット%s +TICKET_CLOSEInDolibarr=チケット%sは終了した +TICKET_DELETEInDolibarr=チケット%sは削除済 +BOM_VALIDATEInDolibarr=BOM検証済 +BOM_UNVALIDATEInDolibarr=BOMは検証されていない +BOM_CLOSEInDolibarr=BOMが無効 +BOM_REOPENInDolibarr=BOMが再開 +BOM_DELETEInDolibarr=BOMは削除済 +MRP_MO_VALIDATEInDolibarr=MO検証済 +MRP_MO_UNVALIDATEInDolibarr=MOがドラフトステータスに設定 +MRP_MO_PRODUCEDInDolibarr=MOプロデュース +MRP_MO_DELETEInDolibarr=MOは削除済 +MRP_MO_CANCELInDolibarr=MOは取消済 ##### End agenda events ##### -AgendaModelModule=Document templates for event +AgendaModelModule=イベントのドキュメントテンプレート DateActionStart=開始日 DateActionEnd=終了日 -AgendaUrlOptions1=また、出力をフィルタリングするには、次のパラメータを追加することができます。 -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=Show 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) +AgendaUrlOptions1=また、出力をフィルタリングするには、次のパラメータを追加することができる。 +AgendaUrlOptions3= <b> logina = %s </b>は、出力をユーザーが所有するアクションに制限する<b>%s</b>。 +AgendaUrlOptionsNotAdmin= <b> logina =!%s </b>は、出力をユーザーが所有していないアクションに制限する<b> %s</b>。 +AgendaUrlOptions4= <b> logint = %s </b>は、出力をユーザー<b> %s </b>(所有者など)に割り当てられたアクションに制限する。 +AgendaUrlOptionsProject= <b> project = __ PROJECT_ID__ </b>は、出力をプロジェクト<b> __PROJECT_ID__</b>にリンクされたアクションに制限する。 +AgendaUrlOptionsNotAutoEvent= 自動イベントを除外するには、<b> notactiontype = systemauto</b>。 +AgendaUrlOptionsIncludeHolidays= <b> includeholidays = 1 </b>は、休日のイベントを含む。 +AgendaShowBirthdayEvents=連絡先の誕生日を表示する +AgendaHideBirthdayEvents=連絡先の誕生日を非表示にする +Busy=忙しい +ExportDataset_event1=議題イベントのリスト +DefaultWorkingDays=デフォルトの稼働日は週単位です(例:1-5、1-6) +DefaultWorkingHours=1日のデフォルトの労働時間(例:9-18) # External Sites ical ExportCal=輸出カレンダー ExtSites=外部カレンダーをインポートする -ExtSitesEnableThisTool=Show external calendars (defined in global setup) in Agenda. Does not affect external calendars defined by users. +ExtSitesEnableThisTool=議題に外部カレンダー(グローバル設定で定義)を表示する。ユーザーが定義した外部カレンダーには影響しない。 ExtSitesNbOfAgenda=カレンダーの数 -AgendaExtNb=Calendar no. %s +AgendaExtNb=カレンダー番号%s ExtSiteUrlAgenda=。iCalファイルにアクセスするためのURL -ExtSiteNoLabel=全く説明がありません -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 -EveryWeek=Every week -EveryMonth=Every month -DayOfMonth=Day of month -DayOfWeek=Day of week -DateStartPlusOne=Date start + 1 hour -SetAllEventsToTodo=Set all events to todo -SetAllEventsToInProgress=Set all events to in progress -SetAllEventsToFinished=Set all events to finished -ReminderTime=Reminder period before the event -TimeType=Duration type -ReminderType=Callback type -AddReminder=Create an automatic reminder notification for this event -ErrorReminderActionCommCreation=Error creating the reminder notification for this event -BrowserPush=Browser Notification +ExtSiteNoLabel=説明なし +VisibleTimeRange=目に見える時間範囲 +VisibleDaysRange=目に見える日の範囲 +AddEvent=イベントを作成する +MyAvailability=私の可用性 +ActionType=イベント種別 +DateActionBegin=イベント開始日 +ConfirmCloneEvent=イベント<b>%s </b>のクローンを作成してもよろしいですか? +RepeatEvent=イベントを繰り返す +OnceOnly=一回だけ +EveryWeek=毎週 +EveryMonth=毎月 +DayOfMonth=曜日 +DayOfWeek=曜日 +DateStartPlusOne=開始日+1時間 +SetAllEventsToTodo=すべてのイベントをToDoに設定する +SetAllEventsToInProgress=すべてのイベントを進行中に設定する +SetAllEventsToFinished=すべてのイベントを終了に設定する +ReminderTime=イベント前のリマインダー期間 +TimeType=期間種別 +ReminderType=コールバック種別 +AddReminder=このイベントの自動リマインダー通知を作成する +ErrorReminderActionCommCreation=このイベントのリマインダー通知の作成中にエラーが発生した +BrowserPush=ブラウザのポップアップ通知 diff --git a/htdocs/langs/ja_JP/assets.lang b/htdocs/langs/ja_JP/assets.lang index 1e340ada3ad..756ce14ea3c 100644 --- a/htdocs/langs/ja_JP/assets.lang +++ b/htdocs/langs/ja_JP/assets.lang @@ -16,50 +16,50 @@ # # 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=削除する -DeleteAnAssetType=Delete an asset type -ConfirmDeleteAssetType=Are you sure you want to delete this asset type? -ShowTypeCard=タイプ &quot;%s&quot;を表示 +Assets = 資産 +NewAsset = 新規資産 +AccountancyCodeAsset = 会計コード(資産) +AccountancyCodeDepreciationAsset = 会計コード(減価償却資産勘定) +AccountancyCodeDepreciationExpense = 会計コード(減価償却費勘定) +NewAssetType=新規資産種別 +AssetsTypeSetup=資産種別の設定 +AssetTypeModified=資産種別変更済 +AssetType=資産種別 +AssetsLines=資産 +DeleteType=削除 +DeleteAnAssetType=資産種別を削除 +ConfirmDeleteAssetType=この資産種別を削除したいのね、いいよね? +ShowTypeCard=種別 ’%s' を表示 # Module label 'ModuleAssetsName' -ModuleAssetsName = Assets +ModuleAssetsName = 資産 # Module description 'ModuleAssetsDesc' -ModuleAssetsDesc = Assets description +ModuleAssetsDesc = 資産の説明 # # Admin page # -AssetsSetup = Assets setup -Settings = Settings -AssetsSetupPage = Assets setup page -ExtraFieldsAssetsType = Complementary attributes (Asset type) -AssetsType=Asset type -AssetsTypeId=Asset type id -AssetsTypeLabel=Asset type label -AssetsTypes=Assets types +AssetsSetup = 資産s設定 +Settings = 設定 +AssetsSetupPage = 資産s設定ページ +ExtraFieldsAssetsType = 補完属性(資産種別) +AssetsType=資産種別 +AssetsTypeId=資産種別 ID +AssetsTypeLabel=資産種別ラベル +AssetsTypes=資産種別 # # Menu # -MenuAssets = Assets -MenuNewAsset = New asset -MenuTypeAssets = Type assets -MenuListAssets = リスト -MenuNewTypeAssets = 新しい -MenuListTypeAssets = リスト +MenuAssets = 資産 +MenuNewAsset = 新規資産 +MenuTypeAssets = 種別 資産s +MenuListAssets = 一覧 +MenuNewTypeAssets = 新規 +MenuListTypeAssets = 一覧 # # Module # -NewAssetType=New asset type -NewAsset=New asset +NewAssetType=新規資産種別 +NewAsset=新規資産 diff --git a/htdocs/langs/ja_JP/banks.lang b/htdocs/langs/ja_JP/banks.lang index c04eea05179..b7097ecbc9f 100644 --- a/htdocs/langs/ja_JP/banks.lang +++ b/htdocs/langs/ja_JP/banks.lang @@ -49,7 +49,7 @@ BankAccountDomiciliation=銀行の住所 BankAccountCountry=口座国 BankAccountOwner=口座所有者名 BankAccountOwnerAddress=口座所有者のアドレス -RIBControlError=値の整合性チェックに失敗した。これは、この口座番号の情報が完全でないか、正しくないことを意味する(国、番号、およびIBANを確認)。 +RIBControlError=値の整合性チェックに失敗した。これは、この口座番号の情報が完全でないか、正しくないことを意味する(国、番号、およびIBANを確認)。 CreateAccount=口座を作成 NewBankAccount=新規口座 NewFinancialAccount=新規金融口座 @@ -109,7 +109,7 @@ SocialContributionPayment=社会/財政税の支払 BankTransfer=銀行口座振替 BankTransfers=クレジット転送 MenuBankInternalTransfer=内部転送 -TransferDesc=ある口座から別の口座に転送すると、Dolibarrは2つのレコード(ソース口座の借方とターゲット口座の貸方)を書込む。同じ金額(記号を除く)、ラベル、日付がこの取引に使用される) +TransferDesc=ある口座から別の口座に転送すると、Dolibarrは2つのレコード(ソース口座の借方とターゲット口座の貸方)を書込む。同じ金額(記号を除く)、ラベル、日付がこの取引に使用される) TransferFrom=期初 TransferTo=期末 TransferFromToDone=<b>%s %s</b> %sからの<b>%s</b>への転送が記録されています。 @@ -171,12 +171,13 @@ VariousPaymentLabel=その他の支払ラベル ConfirmCloneVariousPayment=雑費のクローンを確認 SEPAMandate=SEPA指令 YourSEPAMandate=あなたのSEPA指令 -FindYourSEPAMandate=これは、当法人が銀行に口座振替を注文することを承認するSEPA指令です。署名済(署名済ドキュメントをスキャン)で返送するか、メールで送付すること +FindYourSEPAMandate=これは、当法人が銀行に口座振替を注文することを承認するSEPA指令です。署名済(署名済ドキュメントをスキャン)で返送するか、メールで送付すること AutoReportLastAccountStatement=照合を行うときに、フィールド「銀行取引明細書の番号」に最後の取引明細書番号を自動的に入力する -CashControl=POSキャッシュフェンス -NewCashFence=新規キャッシュフェンス +CashControl=POS現金出納帳制御 +NewCashFence=新規現金出納帳の締め 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. +IfYouDontReconcileDisableProperty=一部の銀行口座で銀行照合を行わない場合は、それらのプロパティ "%s"を無効にして、この警告を削除すること。 +NoBankAccountDefined=銀行口座が定義されていない diff --git a/htdocs/langs/ja_JP/bills.lang b/htdocs/langs/ja_JP/bills.lang index 281ae230ffd..0fd32cc6afc 100644 --- a/htdocs/langs/ja_JP/bills.lang +++ b/htdocs/langs/ja_JP/bills.lang @@ -28,7 +28,7 @@ InvoiceReplacementAsk=請求書の交換請求書 InvoiceReplacementDesc= <b>交換用請求書</b>は、支払をまだ受け取っていない請求書を完全に交換するために使用される。 <br> <br>注:交換できるのは、支払のない請求書のみ。交換する請求書がまだ閉じられていない場合は、自動的に閉じられ「放棄」になる。 InvoiceAvoir=貸方表 InvoiceAvoirAsk=請求書を訂正するために貸方表 -InvoiceAvoirDesc=<b>貸方表</b>は、請求書に実際に支払われた金額とは異なる金額が表示されているという事実を修正するために使用される負の請求書です(たとえば、顧客が誤って支払った金額が多すぎる、または一部の製品が返品されたために全額を支払わない)。 。 +InvoiceAvoirDesc=<b>貸方表</b>は、請求書に実際に支払われた金額とは異なる金額が表示されているという事実を修正するために使用される負の請求書です(たとえば、顧客が誤って支払った金額が多すぎる、または一部の製品が返品されたために全額を支払わない)。 。 invoiceAvoirWithLines=元の請求書の行を使用して貸方表を作成する invoiceAvoirWithPaymentRestAmount=未払原産地請求書が残っている貸方表を作成する invoiceAvoirLineWithPaymentRestAmount=残りの未払い金額の貸方表 @@ -83,9 +83,9 @@ PaymentRule=支払ルール PaymentMode=支払種別 PaymentTypeDC=デビット/クレジットカード PaymentTypePP=PayPal -IdPaymentMode=支払種別(id) -CodePaymentMode=支払種別(コード) -LabelPaymentMode=支払種別(ラベル) +IdPaymentMode=支払種別(id) +CodePaymentMode=支払種別(コード) +LabelPaymentMode=支払種別(ラベル) PaymentModeShort=支払種別 PaymentTerm=支払条件 PaymentConditions=支払条件 @@ -120,17 +120,17 @@ DisabledBecauseRemainderToPayIsZero=未払残りがゼロであるため無効 PriceBase=価格ベース BillStatus=請求書の状況 StatusOfGeneratedInvoices=生成された請求書のステータス -BillStatusDraft=下書き(検証する必要がある) +BillStatusDraft=下書き(検証する必要がある) BillStatusPaid=有料 BillStatusPaidBackOrConverted=貸方表の払戻または利用可能なクレジットとしてマーク -BillStatusConverted=支払済(最終請求書で消費できる状態) +BillStatusConverted=支払済(最終請求書で消費できる状態) BillStatusCanceled=放棄された -BillStatusValidated=(支払する必要がある)を検証 +BillStatusValidated=(支払する必要がある)を検証 BillStatusStarted=開始 BillStatusNotPaid=未支払 BillStatusNotRefunded=未返金 -BillStatusClosedUnpaid=クローズ(無給) -BillStatusClosedPaidPartially=有料(一部) +BillStatusClosedUnpaid=クローズ(無給) +BillStatusClosedPaidPartially=有料(一部) BillShortStatusDraft=下書き BillShortStatusPaid=支払済 BillShortStatusPaidBackOrConverted=返金済または変換済 @@ -142,7 +142,7 @@ BillShortStatusStarted=開始済 BillShortStatusNotPaid=未支払 BillShortStatusNotRefunded=未返金 BillShortStatusClosedUnpaid=閉じた -BillShortStatusClosedPaidPartially=支払済(一部) +BillShortStatusClosedPaidPartially=支払済(一部) PaymentStatusToValidShort=検証するには ErrorVATIntraNotConfigured=コミュニティ内のVAT番号はまだ定義されていない ErrorNoPaiementModeConfigured=デフォルトの支払種別は定義されていない。これを修正するには、請求書モジュールのセットアップに移動。 @@ -151,7 +151,7 @@ ErrorBillNotFound=請求書%sは存在しない。 ErrorInvoiceAlreadyReplaced=エラー、請求書%sを置き換えるために請求書を検証しようとしました。しかし、これはすでに請求書%sに置き換えられている。 ErrorDiscountAlreadyUsed=既に使用されるエラー、割引 ErrorInvoiceAvoirMustBeNegative=エラーは、正しい請求書は、負の金額を持っている必要がある -ErrorInvoiceOfThisTypeMustBePositive=エラー、この種別の請求書には、正の税額(またはnull)を除いた金額が必要です +ErrorInvoiceOfThisTypeMustBePositive=エラー、この種別の請求書には、正の税額(またはnull)を除いた金額が必要です ErrorCantCancelIfReplacementInvoiceNotValidated=エラーは、下書きの状態のままで別の請求書に置き換えられている請求書を取り消すことはできない ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved=この部分または別の部分はすでに使用されているため、割引シリーズを削除することはできない。 BillFrom=期初 @@ -184,14 +184,14 @@ ConfirmCancelBill=請求書をキャンセルしてもよいか<b>%s </b>? ConfirmCancelBillQuestion=なぜこの請求書を「放棄」と分類したいのか? ConfirmClassifyPaidPartially=請求書<b>%s </b>を支払済のステータスに変更してもよいか? ConfirmClassifyPaidPartiallyQuestion=この請求書は完全には支払われていない。この請求書を閉じる理由は何ですか? -ConfirmClassifyPaidPartiallyReasonAvoir=残りの未払い<b>(%s %s)</b>は、期間前に支払が行われたために付与された割引。私はVATを貸方表で正規化。 -ConfirmClassifyPaidPartiallyReasonDiscount=残りの未払い<b>(%s %s)</b>は、期間前に支払が行われたために付与された割引。 -ConfirmClassifyPaidPartiallyReasonDiscountNoVat=残りの未払い<b>(%s %s)</b>は、期間前に支払が行われたために付与された割引。この割引でVATを失うことに同意。 -ConfirmClassifyPaidPartiallyReasonDiscountVat=残りの未払い<b>(%s %s)</b>は、期間前に支払が行われたために付与された割引。この割引のVATは、貸方表なしで回収。 +ConfirmClassifyPaidPartiallyReasonAvoir=残りの未払い<b>(%s %s)</b>は、期間前に支払が行われたために付与された割引。私はVATを貸方表で正規化。 +ConfirmClassifyPaidPartiallyReasonDiscount=残りの未払い<b>(%s %s)</b>は、期間前に支払が行われたために付与された割引。 +ConfirmClassifyPaidPartiallyReasonDiscountNoVat=残りの未払い<b>(%s %s)</b>は、期間前に支払が行われたために付与された割引。この割引でVATを失うことに同意。 +ConfirmClassifyPaidPartiallyReasonDiscountVat=残りの未払い<b>(%s %s)</b>は、期間前に支払が行われたために付与された割引。この割引のVATは、貸方表なしで回収。 ConfirmClassifyPaidPartiallyReasonBadCustomer=悪い顧客 ConfirmClassifyPaidPartiallyReasonProductReturned=製品は、部分的に返される ConfirmClassifyPaidPartiallyReasonOther=その他の理由で放棄された金額 -ConfirmClassifyPaidPartiallyReasonDiscountNoVatDesc=この選択は、請求書に適切なコメントが提供されている場合に可能。 (例«実際に支払われた価格に対応する税金のみが控除の権利を与える») +ConfirmClassifyPaidPartiallyReasonDiscountNoVatDesc=この選択は、請求書に適切なコメントが提供されている場合に可能。 (例«実際に支払われた価格に対応する税金のみが控除の権利を与える») ConfirmClassifyPaidPartiallyReasonDiscountVatDesc=一部の国では、請求書に正しいメモが含まれている場合にのみ、この選択が可能になる場合がある。 ConfirmClassifyPaidPartiallyReasonAvoirDesc=他のすべてに適合しない場合は、この選択肢を使用して、 ConfirmClassifyPaidPartiallyReasonBadCustomerDesc=<b>悪い顧客</b>とは、負債の支払を拒否する顧客。 @@ -207,8 +207,8 @@ UnvalidateBill=請求書を未検証に戻す NumberOfBills=請求書の数 NumberOfBillsByMonth=1か月あたりの請求書の数 AmountOfBills=請求書の金額 -AmountOfBillsHT=請求書の金額(税抜き) -AmountOfBillsByMonthHT=月別請求書の金額(税引後) +AmountOfBillsHT=請求書の金額(税抜き) +AmountOfBillsByMonthHT=月別請求書の金額(税引後) UseSituationInvoices=状況請求書を許可する UseSituationInvoicesCreditNote=状況請求書貸方表を許可する Retainedwarranty=保持保証 @@ -228,7 +228,7 @@ RetainedWarrantyDateLimit=保証期間の制限 RetainedWarrantyNeed100Percent=PDFに表示するには、状況請求書が100%%の進行状況である必要がある AlreadyPaid=既に支払済 AlreadyPaidBack=すでに払戻済 -AlreadyPaidNoCreditNotesNoDeposits=すでに支払済(貸方表と頭金 以外) +AlreadyPaidNoCreditNotesNoDeposits=すでに支払済(貸方表と頭金 以外) Abandoned=放棄済 RemainderToPay=未払まま RemainderToTake=残りの金額 @@ -237,10 +237,10 @@ Rest=保留中 AmountExpected=請求額 ExcessReceived=超過受領額 ExcessPaid=超過支払額 -EscompteOffered=提供される割引(前払) +EscompteOffered=提供される割引(前払) EscompteOfferedShort=割引 SendBillRef=請求書の提出%s -SendReminderBillRef=請求書の提出%s(リマインダー) +SendReminderBillRef=請求書の提出%s(リマインダー) NoDraftBills=下書きの請求なし NoOtherDraftBills=他の下書きの請求なし NoDraftInvoices=下書きの請求なし @@ -307,7 +307,7 @@ CreditNoteDepositUse=この種のクレジットを使用するには、請求 NewGlobalDiscount=新規絶対割引 NewRelativeDiscount=新規相対的な割引 DiscountType=割引種別 -NoteReason=(注)/理由 +NoteReason=(注)/理由 ReasonDiscount=理由 DiscountOfferedBy=によって付与された DiscountStillRemaining=利用可能な割引またはクレジット @@ -316,8 +316,8 @@ CustomerDiscounts=顧客割引 SupplierDiscounts=仕入先割引 BillAddress=ビル·住所 HelpEscompte=この割引は、支払が期間前に行われたために顧客に付与される割引。 -HelpAbandonBadCustomer=この金額は放棄されており(顧客は悪い顧客であると言われている)、例外的な損失と見なされる。 -HelpAbandonOther=この金額はエラーであったため放棄された(たとえば、間違った顧客または請求書が別のものに置き換えられました) +HelpAbandonBadCustomer=この金額は放棄されており(顧客は悪い顧客であると言われている)、例外的な損失と見なされる。 +HelpAbandonOther=この金額はエラーであったため放棄された(たとえば、間違った顧客または請求書が別のものに置き換えられました) IdSocialContribution=社会/財政納税ID PaymentId=支払番号 PaymentRef=支払参照 @@ -328,12 +328,12 @@ InvoiceStatus=請求書の状況 InvoiceNote=請求書に注意 InvoicePaid=支払われた請求 InvoicePaidCompletely=完全に支払われた -InvoicePaidCompletelyHelp=完全に支払われる請求書。これには、部分的に支払われる請求書は含まれない。すべての「クローズ」または「クローズ」以外の請求書のリストを取得するには、請求書のステータスにフィルターを使用することを勧める。 +InvoicePaidCompletelyHelp=完全に支払われる請求書。これには、部分的に支払われる請求書は含まれない。すべての「クローズ」または「クローズ」以外の請求書のリストを取得するには、請求書のステータスにフィルタを使用することを勧める。 OrderBilled=請求済の注文 DonationPaid=寄付金を支払ました PaymentNumber=支払番号 RemoveDiscount=割引を削除 -WatermarkOnDraftBill=下書きの請求書上にウォーターマーク(空の場合はNothing) +WatermarkOnDraftBill=下書きの請求書上にウォーターマーク(空の場合はNothing) InvoiceNotChecked=ない請求書が選択されていない ConfirmCloneInvoice=この請求書のクローンを作成してもよいか<b>%s </b>? DisabledBecauseReplacedInvoice=請求書が交換されたため、アクションを無効に @@ -411,9 +411,9 @@ PaymentCondition14D=14日間 PaymentConditionShort14DENDMONTH=月末の14日 PaymentCondition14DENDMONTH=月末から14日以内 FixAmount=固定金額-ラベル「%s」の1行 -VarAmount=可変量(%% tot。) -VarAmountOneLine=可変量(%% tot。)-ラベル「%s」の1行 -VarAmountAllLines=可変量(%% tot。)-すべて同じ行 +VarAmount=可変量(%% tot。) +VarAmountOneLine=可変量(%% tot。)-ラベル「%s」の1行 +VarAmountAllLines=可変量(%% tot。)-すべて同じ行 # PaymentType PaymentTypeVIR=銀行の転送 PaymentTypeShortVIR=銀行の転送 @@ -425,7 +425,7 @@ PaymentTypeCB=クレジットカード PaymentTypeShortCB=クレジットカード PaymentTypeCHQ=小切手 PaymentTypeShortCHQ=小切手 -PaymentTypeTIP=ヒント(支払に対する文書) +PaymentTypeTIP=ヒント(支払に対する文書) PaymentTypeShortTIP=ヒント支払 PaymentTypeVAD=オンライン支払 PaymentTypeShortVAD=オンライン支払 @@ -459,8 +459,8 @@ FullPhoneNumber=電話 TeleFax=ファックス PrettyLittleSentence=財政主管庁により承認された会計協会のメンバーとして私の名前で発行された小切手による支払の量を受け入れる。 IntracommunityVATNumber=コミュニティ内VATID -PaymentByChequeOrderedTo=小切手による支払(税込)は%sに支払う必要があり、 -PaymentByChequeOrderedToShort=小切手による支払(税込)は、 +PaymentByChequeOrderedTo=小切手による支払(税込)は%sに支払う必要があり、 +PaymentByChequeOrderedToShort=小切手による支払(税込)は、 SendTo=送り先 PaymentByTransferOnThisBankAccount=以下の銀行口座への振込による支払 VATIsNotUsedForInvoice=CGIの*非適用される付加価値税がart-293B @@ -509,7 +509,7 @@ RevenueStamp=税印紙 YouMustCreateInvoiceFromThird=このオプションは、取引先の"顧客"タブから請求書を作成する場合にのみ使用できる。 YouMustCreateInvoiceFromSupplierThird=このオプションは、取引先の"仕入先"タブから請求書を作成する場合にのみ使用できる。 YouMustCreateStandardInvoiceFirstDesc=最初に標準請求書を作成し、それを「テンプレート」に変換して、新規テンプレートの請求書を作成する必要がある -PDFCrabeDescription=請求書PDFテンプレートクレイブ。完全な請求書テンプレート(Spongeテンプレートの古い実装) +PDFCrabeDescription=請求書PDFテンプレートクレイブ。完全な請求書テンプレート(Spongeテンプレートの古い実装) PDFSpongeDescription=請求書PDFテンプレートスポンジ。完全な請求書テンプレート PDFCrevetteDescription=請求書PDFテンプレートクレベット。シチュエーション請求書の完全な請求書テンプレート TerreNumRefModelDesc1=戻る数値の書式は、標準請求書の場合は%syymm-nnnn、貸方表の場合は%syymm-nnnn、ここで yy は年、mm は月、nnnn は欠番なく連続した0に戻らない数値 @@ -534,7 +534,7 @@ InvoiceSituation=状況請求書 PDFInvoiceSituation=状況請求書 InvoiceSituationAsk=状況に応じた請求書 InvoiceSituationDesc=既存の状況に続いて新規状況を作成する -SituationAmount=状況請求額(純額) +SituationAmount=状況請求額(純額) SituationDeduction=状況減算 ModifyAllLines=すべての行を変更する CreateNextSituationInvoice=次の状況を作成する @@ -558,10 +558,10 @@ invoiceLineProgressError=請求書ラインの進行状況は、次の請求書 updatePriceNextInvoiceErrorUpdateline=エラー:請求書行の価格を更新:%s ToCreateARecurringInvoice=この契約の定期的な請求書を作成するには、最初にこの下書き請求書を作成し、次にそれを請求書テンプレートに変換して、将来の請求書を生成する頻度を定義。 ToCreateARecurringInvoiceGene=将来の請求書を定期的かつ手動で生成するには、メニュー<strong> %s --%s --%s</strong>に移動。 -ToCreateARecurringInvoiceGeneAuto=このような請求書を自動的に生成する必要がある場合は、管理者にモジュール<strong> %s</strong>を有効にしてセットアップするように依頼して。両方の方法(手動と自動)を一緒に使用すると、重複のリスクがないことに注意して。 +ToCreateARecurringInvoiceGeneAuto=このような請求書を自動的に生成する必要がある場合は、管理者にモジュール<strong> %s</strong>を有効にしてセットアップするように依頼して。両方の方法(手動と自動)を一緒に使用すると、重複のリスクがないことに注意して。 DeleteRepeatableInvoice=テンプレートの請求書を削除する ConfirmDeleteRepeatableInvoice=テンプレートの請求書を削除してもよいか? -CreateOneBillByThird=取引先ごとに1つの請求書を作成する(それ以外の場合は、注文ごとに1つの請求書を作成する) +CreateOneBillByThird=取引先ごとに1つの請求書を作成する(それ以外の場合は、注文ごとに1つの請求書を作成する) BillCreated=%s請求書(s)が作成された StatusOfGeneratedDocuments=ドキュメント生成のステータス DoNotGenerateDoc=ドキュメントファイルを生成しない diff --git a/htdocs/langs/ja_JP/blockedlog.lang b/htdocs/langs/ja_JP/blockedlog.lang index 239cc0674ba..d30b407f1d8 100644 --- a/htdocs/langs/ja_JP/blockedlog.lang +++ b/htdocs/langs/ja_JP/blockedlog.lang @@ -35,7 +35,7 @@ logDON_DELETE=寄付は論理削除済 logMEMBER_SUBSCRIPTION_CREATE=メンバーサブスクリプションは作成済 logMEMBER_SUBSCRIPTION_MODIFY=メンバーサブスクリプションは変更済 logMEMBER_SUBSCRIPTION_DELETE=メンバーサブスクリプションは論理削除済 -logCASHCONTROL_VALIDATE=キャッシュフェンスの記録 +logCASHCONTROL_VALIDATE=現金出納帳の締めを記録中 BlockedLogBillDownload=顧客請求書のダウンロード BlockedLogBillPreview=顧客請求書のプレビュー BlockedlogInfoDialog=ログの詳細 @@ -50,5 +50,5 @@ BlockedLogAreRequiredByYourCountryLegislation=変更不可能なログモジュ BlockedLogActivatedBecauseRequiredByYourCountryLegislation=あなたの国の法律により、変更不可能なログモジュールがアクティブ化済。このモジュールを無効にすると、税務監査で検証できないため、法律および法律ソフトウェアの使用に関して将来の取引が無効になる可能性あり。 BlockedLogDisableNotAllowedForCountry=このモジュールの使用が必須である国のリスト(誤ってモジュールを無効にするのを防ぐために、あなたの国がこのリストにある場合、最初にこのリストを編集しないとモジュールを無効にできない。このモジュールの有効/無効は、変更不可能なログに追跡されることに注意)。 OnlyNonValid=無効 -TooManyRecordToScanRestrictFilters=スキャン/分析するにはレコードが多すぎ。より制限の厳しいフィルターでリストを制限すること。 +TooManyRecordToScanRestrictFilters=スキャン/分析するにはレコードが多すぎ。より制限の厳しいフィルタでリストを制限すること。 RestrictYearToExport=エクスポートする月/年を制限する diff --git a/htdocs/langs/ja_JP/bookmarks.lang b/htdocs/langs/ja_JP/bookmarks.lang index 5cc7c85d517..3c8c690c6b6 100644 --- a/htdocs/langs/ja_JP/bookmarks.lang +++ b/htdocs/langs/ja_JP/bookmarks.lang @@ -15,7 +15,7 @@ UrlOrLink=URL BehaviourOnClick=ブックマークURLを選択した場合の動作 CreateBookmark=ブックマークを作成。 SetHereATitleForLink=ブックマークの名前を設定 -UseAnExternalHttpLinkOrRelativeDolibarrLink=外部/絶対リンク (https://URL) または内部/相対リンク(/DOLIBARR_ROOT/htdocs/...)を使用 +UseAnExternalHttpLinkOrRelativeDolibarrLink=外部/絶対リンク (https://URL) または内部/相対リンク(/DOLIBARR_ROOT/htdocs/...)を使用 ChooseIfANewWindowMustBeOpenedOnClickOnBookmark=リンクされたページを現在のタブで開くか、新規タブで開くかを選択 BookmarksManagement=ブックマークの管理 BookmarksMenuShortCut=Ctrl +シフト+ m diff --git a/htdocs/langs/ja_JP/boxes.lang b/htdocs/langs/ja_JP/boxes.lang index 2b6ffad8f97..6f69a9dff73 100644 --- a/htdocs/langs/ja_JP/boxes.lang +++ b/htdocs/langs/ja_JP/boxes.lang @@ -19,7 +19,7 @@ BoxLastContacts=最新の連絡先/住所 BoxLastMembers=最新のメンバー BoxFicheInter=最新の介入 BoxCurrentAccounts=口座残高 -BoxTitleMemberNextBirthdays=今月の誕生日(会員) +BoxTitleMemberNextBirthdays=今月の誕生日(会員) BoxTitleLastRssInfos=%sからの最新の%sニュース BoxTitleLastProducts=製品/サービス:最後に変更された%s BoxTitleProductsAlertStock=製品:在庫アラート @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=最新の%s変更された寄付 BoxTitleLastModifiedExpenses=最新の%s変更された経費報告書 BoxTitleLatestModifiedBoms=最新の%s変更されたBOM BoxTitleLatestModifiedMos=最新の%s変更された製造オーダー -BoxGlobalActivity=グローバルアクティビティ(請求書、提案、注文) +BoxTitleLastOutstandingBillReached=最大未払い額を超えた顧客 +BoxGlobalActivity=グローバルアクティビティ(請求書、提案、注文) BoxGoodCustomers=良い顧客 BoxTitleGoodCustomers=%s良い顧客 +BoxScheduledJobs=スケジュールジョブ +BoxTitleFunnelOfProspection=リードファンネル FailedToRefreshDataInfoNotUpToDate=RSSフラックスの更新に失敗しました。最新の正常な更新日:%s LastRefreshDate=最新の更新日 NoRecordedBookmarks=ブックマークが定義されていない。 @@ -68,7 +71,7 @@ NoContractedProducts=ない製品/サービスは、契約しない NoRecordedContracts=全く記録された契約をしない NoRecordedInterventions=記録された介入はない BoxLatestSupplierOrders=最新の注文書 -BoxLatestSupplierOrdersAwaitingReception=最新の注文書(受付待ち) +BoxLatestSupplierOrdersAwaitingReception=最新の注文書(受付待ち) NoSupplierOrder=注文書は記録されていない BoxCustomersInvoicesPerMonth=1か月あたりの顧客の請求書 BoxSuppliersInvoicesPerMonth=1か月あたりの仕入先の請求書 @@ -91,9 +94,9 @@ ForProposals=提案 LastXMonthRolling=最新の %s 月ローリング ChooseBoxToAdd=ダッシュボードにウィジェットを追加する BoxAdded=ダッシュボードにウィジェットが追加された -BoxTitleUserBirthdaysOfMonth=今月の誕生日(ユーザー) -BoxLastManualEntries=会計の最後の手動入力 -BoxTitleLastManualEntries=%s最新のマニュアルエントリ +BoxTitleUserBirthdaysOfMonth=今月の誕生日(ユーザー) +BoxLastManualEntries=手動またはソースドキュメントなしで入力された会計の最新レコード +BoxTitleLastManualEntries=%s手動またはソースドキュメントなしで入力された最新のレコード NoRecordedManualEntries=会計に手動入力の記録はない BoxSuspenseAccount=サスペンスアカウントで会計操作をカウントする BoxTitleSuspenseAccount=未割り当て回線の数 @@ -102,6 +105,7 @@ SuspenseAccountNotDefined=一時停止アカウントが定義されていない BoxLastCustomerShipments=最後の顧客の出荷 BoxTitleLastCustomerShipments=最新の%s顧客出荷 NoRecordedShipments=顧客の出荷は記録されていない +BoxCustomersOutstandingBillReached=上限に達した顧客 # Pages AccountancyHome=会計 ValidatedProjects=検証済みプロジェクト diff --git a/htdocs/langs/ja_JP/cashdesk.lang b/htdocs/langs/ja_JP/cashdesk.lang index 15f5a1bd3b0..e3dac47b1ba 100644 --- a/htdocs/langs/ja_JP/cashdesk.lang +++ b/htdocs/langs/ja_JP/cashdesk.lang @@ -1,9 +1,9 @@ # Language file - Source file is en_US - cashdesk CashDeskMenu=販売時点 CashDesk=販売時点 -CashDeskBankCash=銀行口座(現金) -CashDeskBankCB=銀行口座(カード) -CashDeskBankCheque=銀行口座(チェック) +CashDeskBankCash=銀行口座(現金) +CashDeskBankCB=銀行口座(カード) +CashDeskBankCheque=銀行口座(チェック) CashDeskWarehouse=倉庫 CashdeskShowServices=販売サービス CashDeskProducts=製品 @@ -46,11 +46,11 @@ SearchProduct=製品を検索する Receipt=領収書 Header=ヘッダ Footer=フッター -AmountAtEndOfPeriod=期末の金額(日、月、または年) +AmountAtEndOfPeriod=期末の金額(日、月、または年) TheoricalAmount=理論量 RealAmount=実数 -CashFence=キャッシュフェンス -CashFenceDone=期間中に行われたキャッシュフェンス +CashFence=現金出納帳の締め +CashFenceDone=当該期間での現金出納帳の締めが完了 NbOfInvoices=請求書のNb Paymentnumpad=支払いを入力するパッドのタイプ Numberspad=ナンバーズパッド @@ -99,8 +99,9 @@ CashDeskRefNumberingModules=POS販売用の番号付けモジュール CashDeskGenericMaskCodes6 = <br> <b> {TN} </b>タグは端末番号を追加するために使用される TakeposGroupSameProduct=同じ製品ラインをグループ化する StartAParallelSale=新規並行販売を開始する -ControlCashOpening=POSを開くときにキャッシュボックスを制御する -CloseCashFence=キャッシュフェンスを閉じる +SaleStartedAt=%sから販売開始 +ControlCashOpening=POSを開くときにキャッシュポップアップを制御する +CloseCashFence=現金出納帳制御を閉じる CashReport=現金レポート MainPrinterToUse=使用するメインプリンター OrderPrinterToUse=使用するプリンタを注文する diff --git a/htdocs/langs/ja_JP/categories.lang b/htdocs/langs/ja_JP/categories.lang index f3d63b0723d..dc3c74ec703 100644 --- a/htdocs/langs/ja_JP/categories.lang +++ b/htdocs/langs/ja_JP/categories.lang @@ -19,7 +19,8 @@ ProjectsCategoriesArea=プロジェクトタグ/カテゴリ領域 UsersCategoriesArea=ユーザータグ/カテゴリ領域 SubCats=サブカテゴリ CatList=タグ/カテゴリのリスト -NewCategory=新しいタグ/カテゴリ +CatListAll=タグ/カテゴリのリスト(すべての種別) +NewCategory=新規タグ/カテゴリ ModifCat=タグ/カテゴリを変更する CatCreated=作成されたタグ/カテゴリ CreateCat=タグ/カテゴリを作成する @@ -65,24 +66,30 @@ UsersCategoriesShort=ユーザーのタグ/カテゴリ StockCategoriesShort=倉庫のタグ/カテゴリ ThisCategoryHasNoItems=このカテゴリにはアイテムは含まれていない。 CategId=タグ/カテゴリID -CatSupList=ベンダータグ/カテゴリのリスト +ParentCategory=親タグ/カテゴリ +ParentCategoryLabel=親タグ/カテゴリのラベル +CatSupList=仕入先のタグ/カテゴリのリスト CatCusList=顧客/見込み客のタグ/カテゴリのリスト CatProdList=製品タグ/カテゴリのリスト CatMemberList=メンバーのタグ/カテゴリのリスト CatContactList=連絡先タグ/カテゴリのリスト -CatSupLinks=サプライヤーとタグ/カテゴリー間のリンク +CatProjectsList=プロジェクトのタグ/カテゴリのリスト +CatUsersList=ユーザーのタグ/カテゴリのリスト +CatSupLinks=仕入先とタグ/カテゴリ間のリンク CatCusLinks=顧客/見込み客とタグ/カテゴリ間のリンク CatContactsLinks=連絡先/アドレスとタグ/カテゴリ間のリンク CatProdLinks=製品/サービスとタグ/カテゴリ間のリンク -CatProJectLinks=プロジェクトとタグ/カテゴリ間のリンク +CatMembersLinks=メンバーとタグ/カテゴリ間のリンク +CatProjectsLinks=プロジェクトとタグ/カテゴリ間のリンク +CatUsersLinks=ユーザーとタグ/カテゴリ間のリンク DeleteFromCat=タグ/カテゴリから削除する ExtraFieldsCategories=補完的な属性 CategoriesSetup=タグ/カテゴリの設定 CategorieRecursiv=親タグ/カテゴリと自動的にリンクする CategorieRecursivHelp=オプションがオンの場合、製品をサブカテゴリに追加すると、製品も親カテゴリに追加される。 AddProductServiceIntoCategory=次の製品/サービスを追加する -AddCustomerIntoCategory=Assign category to customer -AddSupplierIntoCategory=Assign category to supplier +AddCustomerIntoCategory=顧客にカテゴリを割り当てる +AddSupplierIntoCategory=カテゴリをサプライヤに割り当てる ShowCategory=タグ/カテゴリを表示 ByDefaultInList=デフォルトでリストに ChooseCategory=カテゴリを選択 diff --git a/htdocs/langs/ja_JP/commercial.lang b/htdocs/langs/ja_JP/commercial.lang index 79dba07e867..4aca0632553 100644 --- a/htdocs/langs/ja_JP/commercial.lang +++ b/htdocs/langs/ja_JP/commercial.lang @@ -1,80 +1,80 @@ # Dolibarr language file - Source file is en_US - commercial -Commercial=Commerce -CommercialArea=Commerce area +Commercial=コマース +CommercialArea=コマースエリア Customer=顧客 -Customers=お客さま -Prospect=見通し -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? +Customers=顧客s +Prospect=見込 +Prospects=見込s +DeleteAction=イベントを削除 +NewAction=新規イベント +AddAction=イベントを作成 +AddAnAction=イベントを作成 +AddActionRendezVous=ランデブーイベントを作成 +ConfirmDeleteAction=このイベントを削除してもいいか? CardAction=イベントカード -ActionOnCompany=Related company -ActionOnContact=Related contact -TaskRDVWith=%sとの会談 -ShowTask=タスクを表示する +ActionOnCompany=関連法人 +ActionOnContact=関連連絡先 +TaskRDVWith=%sとの打合せ +ShowTask=タスクを表示 ShowAction=イベントを表示 ActionsReport=イベントレポート -ThirdPartiesOfSaleRepresentative=Third parties with sales representative -SaleRepresentativesOfThirdParty=Sales representatives of third party +ThirdPartiesOfSaleRepresentative=営業担当者との取引先 +SaleRepresentativesOfThirdParty=取引先の営業担当者 SalesRepresentative=営業担当者 SalesRepresentatives=営業担当者 -SalesRepresentativeFollowUp=営業担当者(フォローアップ) -SalesRepresentativeSignature=営業担当者(署名) -NoSalesRepresentativeAffected=特に営業担当者の影響を受けません -ShowCustomer=顧客を表示する +SalesRepresentativeFollowUp=営業担当者(フォローアップ) +SalesRepresentativeSignature=営業担当者(署名) +NoSalesRepresentativeAffected=特定の営業担当者は未割当 +ShowCustomer=顧客を表示 ShowProspect=見通しを示す ListOfProspects=見込み客リスト ListOfCustomers=顧客リスト -LastDoneTasks=Latest %s completed actions -LastActionsToDo=Oldest %s not completed actions +LastDoneTasks=最新の%s完了済アクション +LastActionsToDo=最も古い%sが未完了アクション DoneAndToDoActions=完了し、イベントを実行するには -DoneActions=完了イベント -ToDoActions=不完全なイベント -SendPropalRef=Submission of commercial proposal %s -SendOrderRef=Submission of order %s +DoneActions=完了済イベント +ToDoActions=未完了イベント +SendPropalRef=売買契約提案書%s の提出 +SendOrderRef=注文の提出%s StatusNotApplicable=適用されない StatusActionToDo=実行する StatusActionDone=完了する -StatusActionInProcess=プロセスの +StatusActionInProcess=処理中 TasksHistoryForThisContact=この連絡先のイベント -LastProspectDoNotContact=連絡しないでください -LastProspectNeverContacted=連絡しないでください -LastProspectToContact=連絡する -LastProspectContactInProcess=プロセスの連絡先 -LastProspectContactDone=行わ連絡 -ActionAffectedTo=イベントに影響を受けた -ActionDoneBy=することにより、イベントを行って +LastProspectDoNotContact=連絡しないこと +LastProspectNeverContacted=連絡未実施 +LastProspectToContact=連絡すること +LastProspectContactInProcess=連絡実施中 +LastProspectContactDone=連絡実施済 +ActionAffectedTo=イベントは割当済 +ActionDoneBy=イベントは実行済 ActionAC_TEL=電話 -ActionAC_FAX=FAXを送信 -ActionAC_PROP=メールで提案を送る +ActionAC_FAX=FAX送信 +ActionAC_PROP=メールで提案を送信 ActionAC_EMAIL=電子メールを送信 -ActionAC_EMAIL_IN=Reception of Email -ActionAC_RDV=ミーティング -ActionAC_INT=Intervention on site -ActionAC_FAC=メールでの顧客の請求書を送る -ActionAC_REL=メール(リマインダー)が顧客の請求書を送付 +ActionAC_EMAIL_IN=メールの受信 +ActionAC_RDV=打合せs +ActionAC_INT=現場での介入 +ActionAC_FAC=メールでの顧客の請求書を送信 +ActionAC_REL=メール(リマインダー)が顧客の請求書を送付 ActionAC_CLO=閉じる ActionAC_EMAILING=大量メールを送信 -ActionAC_COM=Send sales order by mail -ActionAC_SHIP=メールでの発送を送る -ActionAC_SUP_ORD=Send purchase order by mail -ActionAC_SUP_INV=Send vendor invoice by mail +ActionAC_COM=メールで販売注文を送信 +ActionAC_SHIP=メールでの発送を送信 +ActionAC_SUP_ORD=メールで注文書を送信 +ActionAC_SUP_INV=ベンダーの請求書をメールで送信 ActionAC_OTH=その他 -ActionAC_OTH_AUTO=Automatically inserted events -ActionAC_MANUAL=Manually inserted events -ActionAC_AUTO=Automatically inserted events -ActionAC_OTH_AUTOShort=Auto -Stats=Sales statistics -StatusProsp=見通しの状態 -DraftPropals=ドラフト商業の提案 -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 +ActionAC_OTH_AUTO=自動的に挿入されるイベント +ActionAC_MANUAL=手動で挿入されたイベント +ActionAC_AUTO=自動的に挿入されるイベント +ActionAC_OTH_AUTOShort=自動 +Stats=販売統計 +StatusProsp=見込の状態 +DraftPropals=売買契約提案書の下書き +NoLimit=制限なし +ToOfferALinkForOnlineSignature=オンライン署名へのリンク +WelcomeOnOnlineSignaturePage=%sからの売買契約提案書sを受諾するページへようこそ +ThisScreenAllowsYouToSignDocFrom=この画面では、見積書/売買契約提案書を受諾して署名するか、拒否することができる +ThisIsInformationOnDocumentToSign=これは、承認または拒否するドキュメントに関する情報です。 +SignatureProposalRef=見積書/売買契約提案書%s の署名 +FeatureOnlineSignDisabled=オンライン署名の機能が無効になっているか、機能が有効になる前にドキュメントが生成されました diff --git a/htdocs/langs/ja_JP/companies.lang b/htdocs/langs/ja_JP/companies.lang index 4296d39f2dd..536e29cf292 100644 --- a/htdocs/langs/ja_JP/companies.lang +++ b/htdocs/langs/ja_JP/companies.lang @@ -172,7 +172,7 @@ ProfId1ES=職 Id 1 (CIF/NIF) ProfId2ES=職 Id 2 (Social security number) ProfId3ES=職 Id 3 (CNAE) ProfId4ES=職 Id 4 (Collegiate number) -ProfId5ES=EORI number +ProfId5ES=EORI番号 ProfId6ES=- ProfId1FR=職 Id 1 (SIREN) ProfId2FR=職 Id 2 (SIRET) @@ -291,10 +291,10 @@ HasAbsoluteDiscountFromSupplier=この仕入先から、<b>%s</b> %s 相当の HasDownPaymentOrCommercialDiscountFromSupplier=この仕入先から、 <b>%s</b> %s 相当の割引が可能 (現金値引、頭金充当) HasCreditNoteFromSupplier=この仕入先から、<b>%s </b>%s相当の返金確約があり CompanyHasNoAbsoluteDiscount=この顧客は、使用可能な割引クレジットを持っていません -CustomerAbsoluteDiscountAllUsers=絶対顧客割引(すべてのユーザーで付与) -CustomerAbsoluteDiscountMy=絶対顧客割引(自身で付与) -SupplierAbsoluteDiscountAllUsers=絶対仕入先割引(すべてのユーザーで入力) -SupplierAbsoluteDiscountMy=絶対仕入先割引(自分で入力) +CustomerAbsoluteDiscountAllUsers=絶対顧客割引(すべてのユーザーで付与) +CustomerAbsoluteDiscountMy=絶対顧客割引(自身で付与) +SupplierAbsoluteDiscountAllUsers=絶対仕入先割引(すべてのユーザーで入力) +SupplierAbsoluteDiscountMy=絶対仕入先割引(自分で入力) DiscountNone=なし Vendor=仕入先 Supplier=仕入先 @@ -332,7 +332,7 @@ ListOfContactsAddresses=連絡先s/住所sの一覧 ListOfThirdParties=取引先s一覧 ShowCompany=取引先 ShowContact=連絡先-住所 -ContactsAllShort=すべて(フィルタなし) +ContactsAllShort=すべて(フィルタなし) ContactType=連絡先種別 ContactForOrders=注文の連絡先 ContactForOrdersOrShipments=注文または配送の連絡先 @@ -352,13 +352,13 @@ CapitalOf=%sの首都 EditCompany=会社を編集します。 ThisUserIsNot=このユーザは見込客でも、顧客でも、仕入先でもない VATIntraCheck=チェック -VATIntraCheckDesc=VAT IDには、国のプレフィックスを含めることが必要。リンク<b>%s </b>は、欧州VATチェッカーサービス(VIES)を使用し、そのためにはDolibarrサーバーからのインターネットアクセスが必要。 +VATIntraCheckDesc=VAT IDには、国のプレフィックスを含めることが必要。リンク<b>%s </b>は、欧州VATチェッカーサービス(VIES)を使用し、そのためにはDolibarrサーバーからのインターネットアクセスが必要。 VATIntraCheckURL=http://ec.europa.eu/taxation_customs/vies/vieshome.do VATIntraCheckableOnEUSite=欧州委員会のウェブサイトでコミュニティ間のVAT IDを確認 VATIntraManualCheck=欧州委員会のウェブサイト<a href="%s" target="_blank">%s</a>で手動で確認可能 -ErrorVATCheckMS_UNAVAILABLE=ことはできませんを確認してください。サービスは加盟国(%s)によって提供されていません確認してください。 +ErrorVATCheckMS_UNAVAILABLE=ことはできませんを確認してください。サービスは加盟国(%s)によって提供されていません確認してください。 NorProspectNorCustomer=見込客でない、顧客でない -JuridicalStatus=法的組織種別 +JuridicalStatus=事業体種別 Workforce=労働力 Staff=従業員 ProspectLevelShort=潜在的な @@ -446,7 +446,7 @@ LeopardNumRefModelDesc=顧客/サプライヤーコードは無料です。こ ManagingDirectors=管理職(s)名称 (CEO, 部長, 社長...) MergeOriginThirdparty=重複する取引先 (削除したい取引先) MergeThirdparties=仕入先sを集約 -ConfirmMergeThirdparties=この取引先を現在の取引先に融合したいのね、いいよね?リンクされたすべてのオブジェクト(請求書、注文など...)は現在の取引先に移動され、この取引先には削除されるよ。 +ConfirmMergeThirdparties=この取引先を現在の取引先に融合したいのね、いいよね?リンクされたすべてのオブジェクト(請求書、注文など...)は現在の取引先に移動され、この取引先には削除されるよ。 ThirdpartiesMergeSuccess=仕入先sは集約済み SaleRepresentativeLogin=販売担当者のログイン SaleRepresentativeFirstname=販売担当者の姓名の名 diff --git a/htdocs/langs/ja_JP/compta.lang b/htdocs/langs/ja_JP/compta.lang index 2714ed31df3..379785639bb 100644 --- a/htdocs/langs/ja_JP/compta.lang +++ b/htdocs/langs/ja_JP/compta.lang @@ -5,9 +5,9 @@ TaxModuleSetupToModifyRulesLT=<a href="%s">法人設定</a>に移動して、計 OptionMode=会計のためのオプション OptionModeTrue=オプション 収益・費用 OptionModeVirtual=オプション 債権・債務 -OptionModeTrueDesc=この文脈では、売上高は、支払(支払日)に渡って計算される。この数値の妥当性は、簿記の記帳が請求書を経由して勘定科目に 入/出 していると精査されている場合にのみ保証される。 -OptionModeVirtualDesc=この文脈では、売上高は、請求書(検証日)に渡って計算される。これらの請求書が期日になると、支払いが済んでいるかどうかに関わらず、売上高の出力に記載される。 -FeatureIsSupportedInInOutModeOnly=​​債権・債務の会計モードでのみ使用可能な機能(会計モジュール設定を参照すること) +OptionModeTrueDesc=この文脈では、売上高は、支払(支払日)に渡って計算される。この数値の妥当性は、簿記の記帳が請求書を経由して勘定科目に 入/出 していると精査されている場合にのみ保証される。 +OptionModeVirtualDesc=この文脈では、売上高は、請求書(検証日)に渡って計算される。これらの請求書が期日になると、支払いが済んでいるかどうかに関わらず、売上高の出力に記載される。 +FeatureIsSupportedInInOutModeOnly=​​債権・債務の会計モードでのみ使用可能な機能(会計モジュール設定を参照すること) VATReportBuildWithOptionDefinedInModule=ここに示されている金額は税モジュール設定によって定義されたルールを使用して計算される。 LTReportBuildWithOptionDefinedInModule=ここに表示されている金額は、法人の設定で定義されたルールを使用して計算されている。 Param=設定 @@ -25,7 +25,7 @@ PaymentsNotLinkedToInvoice=任意の請求書にリンクされていない支 PaymentsNotLinkedToUser=すべてのユーザーにリンクされていない支払 Profit=利益 AccountingResult=会計結果 -BalanceBefore=残高(前) +BalanceBefore=残高(前) Balance=残高 Debit=借方 Credit=貸方 @@ -111,7 +111,7 @@ Refund=払戻 SocialContributionsPayments=社会/財政税支払 ShowVatPayment=付加価値税支払を表示する TotalToPay=支払に合計 -BalanceVisibilityDependsOnSortAndFilters=このリストに残高が表示されるのは、テーブルが%sで昇順で並べ替えられ、1つの銀行口座でフィルタリングされている場合のみ。 +BalanceVisibilityDependsOnSortAndFilters=残高は、テーブルが%sで並べ替えられ、1つの銀行口座でフィルタリングされている場合にのみこのリストに表示される(他のフィルタはない) CustomerAccountancyCode=顧客会計コード SupplierAccountancyCode=ベンダー会計コード CustomerAccountancyCodeShort=カスト。アカウント。コード @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=この社会的/財政的納税を削除して ExportDataset_tax_1=社会的および財政的な税金と支払 CalcModeVATDebt=コミットメントアカウンティングのモード<b>%sVAT%s</b>。 CalcModeVATEngagement=収入のモード<b>%sVAT-expenses%s</b>。 -CalcModeDebt=元帳にまだ計上されていない場合でも、既知の記録された請求書の分析。 +CalcModeDebt=元帳未計上によらず、既知の記録済文書の分析。 CalcModeEngagement=元帳にまだ計上されていない場合でも、既知の記録された支払の分析。 CalcModeBookkeeping=簿記元帳テーブルにジャーナル化されたデータの分析。 CalcModeLT1= 顧客の請求書のモード<b>%sRE-サプライヤーの請求書s%s</b> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=収支差額、年次要約 AnnualByCompanies=事前定義されたアカウントグループによる収支差額 AnnualByCompaniesDueDebtMode=収支差額、事前定義されたグループによる詳細、モード<b> %sClaims-Debts%s</b>は<b>コミットメント会計</b>と言える。 AnnualByCompaniesInputOutputMode=収支差額、事前定義されたグループによる詳細、モード<b>%sIncomes-Expenses%s</b>は<b>現金会計</b>と言える。 -SeeReportInInputOutputMode=元帳にまだ計上されていない場合でも、実際に行われた支払の計算については、%s支払の分析%sを参照すること。 -SeeReportInDueDebtMode=既知の記録された請求書に基づく計算については、元帳にまだ計上されていない場合でも、請求書の%sanalysiss%sを参照すること。 -SeeReportInBookkeepingMode=<b>簿記元帳テーブル</b>の計算については、<b> %sBookeeping report%s</b>を参照すること。 +SeeReportInInputOutputMode=元帳未計上によらず、 <b>%s支払の分析%s</b> を参照すること。その対象は <b>記録済支払</b> に基づく計算。 +SeeReportInDueDebtMode=元帳未計上によらず、 <b>%s記録済文書sの分析%s</b> を参照すること。その対象は、既知の <b>記録済文書s </b> に基づく計算。 +SeeReportInBookkeepingMode=<b>%s簿記元帳テーブルの分析%s</b> を参照すること。その対象は、 <b>簿記元帳テーブル</b>基づくレポート。 RulesAmountWithTaxIncluded=-表示されている金額はすべての税金が含まれている RulesResultDue=-未払いの請求書、経費、VAT、支払の有無にかかわらず寄付が含まれる。給与も含まれている。 <br>-請求書の請求日と、経費または税金支払期日に基づいている。給与モジュールで定義された給与の場合、支払の起算日が使用される。 RulesResultInOut=-これには、請求書、経費、VAT、および給与に対して行われた実際支払が含まれる。 <br>-請求書、経費、VAT、給与支払日に基づいている。寄付の寄付日。 @@ -227,8 +227,8 @@ TurnoverPerProductInCommitmentAccountingNotRelevant=製品ごとに回収済売 TurnoverPerSaleTaxRateInCommitmentAccountingNotRelevant=売却税率ごとに回収済売上高のレポートは利用できない。このレポートは、請求済売上高に対してのみ使用できる。 CalculationMode=計算モード AccountancyJournal=会計コードジャーナル -ACCOUNTING_VAT_SOLD_ACCOUNT=販売時のVATのデフォルトの会計アカウント(VATディクショナリの設定で定義されていない場合に使用) -ACCOUNTING_VAT_BUY_ACCOUNT=購入時のVATのデフォルトの会計アカウント(VATディクショナリ設定で定義されていない場合に使用) +ACCOUNTING_VAT_SOLD_ACCOUNT=販売時のVATのデフォルトの会計アカウント(VATディクショナリの設定で定義されていない場合に使用) +ACCOUNTING_VAT_BUY_ACCOUNT=購入時のVATのデフォルトの会計アカウント(VATディクショナリ設定で定義されていない場合に使用) ACCOUNTING_VAT_PAY_ACCOUNT=VATを支払うためのデフォルトの会計アカウント ACCOUNTING_ACCOUNT_CUSTOMER=顧客の第三者に使用される会計アカウント ACCOUNTING_ACCOUNT_CUSTOMER_Desc=サードパーティカードで定義された専用の会計アカウントは、補助元帳の会計にのみ使用される。これは総勘定元帳に使用され、サードパーティの専用顧客会計勘定が定義されていない場合は補助元帳会計のデフォルト値として使用される。 @@ -237,7 +237,7 @@ ACCOUNTING_ACCOUNT_SUPPLIER_Desc=サードパーティカードで定義され ConfirmCloneTax=社会税/財政税のクローンを確認する CloneTaxForNextMonth=来月のためにそれをクローンする SimpleReport=簡単なレポート -AddExtraReport=追加レポート(海外および国内の顧客レポートを追加) +AddExtraReport=追加レポート(海外および国内の顧客レポートを追加) OtherCountriesCustomersReport=外国の顧客の報告 BasedOnTwoFirstLettersOfVATNumberBeingDifferentFromYourCompanyCountry=自法人の国コードとは異なるVAT番号の最初の2文字に基づく SameCountryCustomersWithVAT=全国の顧客レポート diff --git a/htdocs/langs/ja_JP/contracts.lang b/htdocs/langs/ja_JP/contracts.lang index c20e279a29d..869f8fe95be 100644 --- a/htdocs/langs/ja_JP/contracts.lang +++ b/htdocs/langs/ja_JP/contracts.lang @@ -35,8 +35,8 @@ ActivateAllOnContract=すべてのサービスをアクティブ化する CloseAContract=契約を閉じる ConfirmDeleteAContract=こ契約とそのすべてのサービスを削除してもよいか? ConfirmValidateContract=こ契約を<b>%s </b>という名前で検証してもよいか? -ConfirmActivateAllOnContract=これにより、すべてのサービスが開く(まだアクティブではない)。すべてのサービスを開始してもよいか? -ConfirmCloseContract=これにより、すべてのサービスが閉じられる(アクティブでもなくても)。こ契約を終了してもよいか? +ConfirmActivateAllOnContract=これにより、すべてのサービスが開く(まだアクティブではない)。すべてのサービスを開始してもよいか? +ConfirmCloseContract=これにより、すべてのサービスが閉じられる(アクティブでもなくても)。こ契約を終了してもよいか? ConfirmCloseService=日付<b>%s </b>でこのサービスを終了してもよいか? ValidateAContract=契約を検証 ActivateService=サービスをアクティブ化 @@ -49,7 +49,7 @@ ListOfInactiveServices=非アクティブサービスリスト ListOfExpiredServices=失効済アクティブサービスリスト ListOfClosedServices=クローズドサービスリスト ListOfRunningServices=実行中サービスリスト -NotActivatedServices=非アクティブなサービス(検証済み契約の中で) +NotActivatedServices=非アクティブなサービス(検証済み契約の中で) BoardNotActivatedServices=検証済み契約の中でアクティブにするサービス BoardNotActivatedServicesShort=アクティベートするサービス LastContracts=最新の%s契約 @@ -78,8 +78,8 @@ DeleteContractLine=契約の行を削除する ConfirmDeleteContractLine=こ契約行を削除してもよいか? MoveToAnotherContract=別契約にサービスを移動する。 ConfirmMoveToAnotherContract=私は、新規ターゲット契約を選びましたし、私はこ契約には、このサービスを移動することを確認する。 -ConfirmMoveToAnotherContractQuestion=このサービスを移動する(同じサードパーティの)既存契約を選択するか? -PaymentRenewContractId=契約回線(番号の%s)を​​更新 +ConfirmMoveToAnotherContractQuestion=このサービスを移動する(同じサードパーティの)既存契約を選択するか? +PaymentRenewContractId=契約回線(番号の%s)を​​更新 ExpiredSince=有効期限の日付 NoExpiredServices=失効済アクティブサービス無し ListOfServicesToExpireWithDuration=%s日で失効済になるサービスリスト diff --git a/htdocs/langs/ja_JP/cron.lang b/htdocs/langs/ja_JP/cron.lang index 431b36d9c0d..0a94274deb6 100644 --- a/htdocs/langs/ja_JP/cron.lang +++ b/htdocs/langs/ja_JP/cron.lang @@ -7,12 +7,12 @@ Permission23103 = スケジュールされたジョブを削除する Permission23104 = スケジュールされたジョブを実行する # Admin CronSetup=スケジュールされたジョブ管理のセットアップ -URLToLaunchCronJobs=修飾されたcronジョブを確認して起動するためのURL -OrToLaunchASpecificJob=または、特定のジョブを確認して起動する +URLToLaunchCronJobs=ブラウザから修飾されたcronジョブを確認して起動するためのURL +OrToLaunchASpecificJob=または、ブラウザから特定のジョブを確認して起動する KeyForCronAccess=cronジョブを起動するためのURLのセキュリティキー FileToLaunchCronJobs=修飾されたcronジョブをチェックして起動するコマンドライン CronExplainHowToRunUnix=Unix環境では、次のcrontabエントリを使用して、5分ごとにコマンドラインを実行する必要がある。 -CronExplainHowToRunWin=Microsoft(tm)Windows環境では、スケジュールされたタスクツールを使用して、5分ごとにコマンドラインを実行できる。 +CronExplainHowToRunWin=Microsoft(tm)Windows環境では、スケジュールされたタスクツールを使用して、5分ごとにコマンドラインを実行できる。 CronMethodDoesNotExists=クラス%sには、メソッド%sが含まれていない。 CronMethodNotAllowed=クラス%sのメソッド%sは、禁止されているメソッドのブラックリストに含まれています CronJobDefDesc=cronジョブプロファイルは、モジュール記述子ファイルに定義されています。モジュールがアクティブ化されると、それらがロードされて使用可能になるため、管理ツールメニュー%sからジョブを管理できる。 @@ -76,7 +76,7 @@ CronFrom=から CronType=職種 CronType_method=PHPクラスの呼び出しメソッド CronType_command=シェルコマンド -CronCannotLoadClass=クラスファイル%sをロードできない(クラス%sを使用するため) +CronCannotLoadClass=クラスファイル%sをロードできない(クラス%sを使用するため) CronCannotLoadObject=クラスファイル%sがロードされたが、オブジェクト%sが見つからなかった UseMenuModuleToolsToAddCronJobs=メニュー ”<a href="%s">ホーム - 管理ツール - スケジュールされたジョブ</a>" に移動して、スケジュールされたジョブを表示および編集する。 JobDisabled=ジョブが無効 @@ -84,3 +84,8 @@ MakeLocalDatabaseDumpShort=ローカルデータベースのバックアップ MakeLocalDatabaseDump=ローカルデータベースダンプを作成する。パラメータは次のもの: 圧縮 ('gz' or 'bz' or 'none')、バックアップ種別 ('mysql', 'pgsql', 'auto')、1、 'auto' またはビルドするファイル名、保持するバックアップファイルの数 WarningCronDelayed=注意、パフォーマンスの目的で、有効なジョブの次の実行日が何であれ、ジョブは実行される前に最大%s時間まで遅延する可能性がある。 DATAPOLICYJob=データクリーナとアノニマイザ +JobXMustBeEnabled=ジョブ%sを有効にする必要がある +# Cron Boxes +LastExecutedScheduledJob=最後に実行されたスケジュールジョブ +NextScheduledJobExecute=次に実行する予定のジョブ +NumberScheduledJobError=エラーのあるスケジュールジョブの数 diff --git a/htdocs/langs/ja_JP/dict.lang b/htdocs/langs/ja_JP/dict.lang index a699de6b8fe..38dbf01c4e3 100644 --- a/htdocs/langs/ja_JP/dict.lang +++ b/htdocs/langs/ja_JP/dict.lang @@ -11,17 +11,17 @@ CountryUK=イギリス CountryIE=アイルランド CountryCN=中国 CountryTN=チュニジア -CountryUS=、米国 +CountryUS=米国 CountryMA=モロッコ CountryDZ=アルジェリア -CountryCA=カナダの +CountryCA=カナダ CountryTG=トーゴ CountryGA=ガボン CountryNL=オランダ CountryHU=ハンガリー CountryRU=ロシア CountrySE=スウェーデン -CountryCI=Ivoiryコースト +CountryCI=コートジボワール CountrySN=セネガル CountryAR=アルゼンチン CountryCM=カメルーン @@ -69,7 +69,7 @@ CountryCF=中央アフリカ共和国 CountryTD=チャド CountryCL=チリ CountryCX=クリスマス島 -CountryCC=ココス(キーリング)諸島 +CountryCC=ココス(キーリング)諸島 CountryCO=コロンビア CountryKM=コモロ CountryCG=コンゴ @@ -113,17 +113,17 @@ CountryGW=ギニアビサウ CountryGY=ガイアナ CountryHT=ハイチ CountryHM=ハード島とマクドナルド -CountryVA=ローマ法王庁(バチカン市国) +CountryVA=ローマ法王庁(バチカン市国) CountryHN=ホンジュラス CountryHK=香港 -CountryIS=Iceland +CountryIS=アイスランド CountryIN=インド CountryID=インドネシア CountryIR=イラン CountryIQ=イラク CountryIL=イスラエル CountryJM=ジャマイカ -CountryJP=日本の +CountryJP=日本 CountryJO=ヨルダン CountryKZ=カザフスタン CountryKE=ケニア @@ -131,7 +131,7 @@ CountryKI=キリバス CountryKP=北朝鮮 CountryKR=韓国 CountryKW=クウェート -CountryKG=Kyrgyzstan +CountryKG=キルギス CountryLA=ラオ語 CountryLV=ラトビア CountryLB=レバノン @@ -147,7 +147,7 @@ CountryMG=マダガスカル CountryMW=マラウイ CountryMY=マレーシア CountryMV=モルディブ -CountryML=庭師 +CountryML=マリ CountryMT=マルタ CountryMH=マーシャル諸島共和国 CountryMQ=マルティニーク島 @@ -160,7 +160,7 @@ CountryMD=モルドバ CountryMN=モンゴル国 CountryMS=モントセラト CountryMZ=モザンビーク -CountryMM=Myanmar (Burma) +CountryMM=ミャンマー (ビルマ) CountryNA=ナミビア CountryNR=ナウル CountryNP=ネパール @@ -212,7 +212,7 @@ CountrySD=スーダン CountrySR=スリナム CountrySJ=スバールバル諸島ヤンマイエン島 CountrySZ=スワジランド -CountrySY=シリアの +CountrySY=シリア CountryTW=台湾 CountryTJ=タジキスタン CountryTZ=タンザニア @@ -223,7 +223,7 @@ CountryTO=トンガ CountryTT=トリニダードトバゴ CountryTR=トルコ CountryTM=トルクメニスタン -CountryTC=Turks and Caicos Islands +CountryTC=タークス・カイコス諸島 CountryTV=ツバル CountryUG=ウガンダ CountryUA=ウクライナ @@ -250,24 +250,24 @@ CountryMF=サンマルタン島 ##### Civilities ##### CivilityMME=ミセス -CivilityMR=氏 -CivilityMLE=さん +CivilityMR=ミスター +CivilityMLE=ミズ CivilityMTRE=マスタ -CivilityDR=医師 +CivilityDR=ドクター ##### Currencies ##### Currencyeuros=ユーロ -CurrencyAUD=AUドル -CurrencySingAUD=AUドル -CurrencyCAD=ドルは、CAN -CurrencySingCAD=ドルは、CAN +CurrencyAUD=豪ドルs +CurrencySingAUD=豪ドル +CurrencyCAD=カナダドルs +CurrencySingCAD=カナダドル CurrencyCHF=スイスフラン CurrencySingCHF=スイスフラン CurrencyEUR=ユーロ CurrencySingEUR=ユーロ CurrencyFRF=フランスのフラン CurrencySingFRF=フランスフラン -CurrencyGBP=GBのポンド -CurrencySingGBP=ギガバイトポンド +CurrencyGBP=英ポンドs +CurrencySingGBP=英ポンド CurrencyINR=インドルピー CurrencySingINR=インドルピー CurrencyMAD=ディルハム @@ -276,12 +276,12 @@ CurrencyMGA=アリアリ CurrencySingMGA=アリアリ CurrencyMUR=モーリシャスルピー CurrencySingMUR=モーリシャスルピー -CurrencyNOK=ノルウェークローネ -CurrencySingNOK=Norwegian kronas +CurrencyNOK=ノルウェークローネs +CurrencySingNOK=ノルウェークローネ CurrencyTND=チュニジアディナール CurrencySingTND=チュニジアディナール -CurrencyUSD=米ドル -CurrencySingUSD=アメリカドル +CurrencyUSD=米ドルs +CurrencySingUSD=米ドル CurrencyUAH=グリブナ CurrencySingUAH=グリブナ CurrencyXAF=CFAフランBEAC @@ -290,11 +290,11 @@ CurrencyXOF=CFAフランBCEAO CurrencySingXOF=CFAフランBCEAO CurrencyXPF=CFPフラン CurrencySingXPF=CFPフラン -CurrencyCentEUR=cents +CurrencyCentEUR=セントs CurrencyCentSingEUR=セント CurrencyCentINR=パイサ -CurrencyCentSingINR=パイサ(複数) -CurrencyThousandthSingTND=ミリーム +CurrencyCentSingINR=パイサ(複数) +CurrencyThousandthSingTND=千分の一 #### Input reasons ##### DemandReasonTypeSRC_INTE=インターネット DemandReasonTypeSRC_CAMP_MAIL=メーリングキャンペーン @@ -307,7 +307,7 @@ DemandReasonTypeSRC_WOM=口頭 DemandReasonTypeSRC_PARTNER=パートナー DemandReasonTypeSRC_EMPLOYEE=従業員 DemandReasonTypeSRC_SPONSORING=後援 -DemandReasonTypeSRC_SRC_CUSTOMER=Incoming contact of a customer +DemandReasonTypeSRC_SRC_CUSTOMER=顧客からのコンタクト #### Paper formats #### PaperFormatEU4A0=4A0 用紙 PaperFormatEU2A0=2A0 用紙 @@ -329,9 +329,9 @@ PaperFormatCAP4=P4 カナダ用紙 PaperFormatCAP5=P5 カナダ用紙 PaperFormatCAP6=P6 カナダ用紙 #### Expense report categories #### -ExpAutoCat=Car -ExpCycloCat=Moped -ExpMotoCat=Motorbike +ExpAutoCat=自動車 +ExpCycloCat=スクーター +ExpMotoCat=オートバイ ExpAuto3CV=3 CV ExpAuto4CV=4 CV ExpAuto5CV=5 CV @@ -353,7 +353,7 @@ 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 +ExpCyclo=最小容量は50cc ExpMoto12CV=Motorbike 1 or 2 CV ExpMoto345CV=Motorbike 3, 4 or 5 CV ExpMoto5PCV=Motorbike 5 CV and more diff --git a/htdocs/langs/ja_JP/donations.lang b/htdocs/langs/ja_JP/donations.lang index 6a498695940..e0b1a121335 100644 --- a/htdocs/langs/ja_JP/donations.lang +++ b/htdocs/langs/ja_JP/donations.lang @@ -4,7 +4,7 @@ Donations=寄付 DonationRef=寄付参照 Donor=ドナー AddDonation=寄付を作成する -NewDonation=新しい寄付 +NewDonation=新規寄付 DeleteADonation=寄付を削除する ConfirmDeleteADonation=この寄付を削除してもよいか? PublicDonation=義援金 diff --git a/htdocs/langs/ja_JP/ecm.lang b/htdocs/langs/ja_JP/ecm.lang index db8e84a3e50..cd0cf844f89 100644 --- a/htdocs/langs/ja_JP/ecm.lang +++ b/htdocs/langs/ja_JP/ecm.lang @@ -15,7 +15,7 @@ ECMNbOfSubDir=サブディレクトリの数 ECMNbOfFilesInSubDir=サブディレクトリ内のファイルの数 ECMCreationUser=クリエイター ECMArea=DMS / ECMエリア -ECMAreaDesc=DMS / ECM(ドキュメント管理システム/電子コンテンツ管理)エリアでは、Dolibarr内のあらゆる種類のドキュメントをすばやく保存、共有、検索できる。 +ECMAreaDesc=DMS / ECM(ドキュメント管理システム/電子コンテンツ管理)エリアでは、Dolibarr内のあらゆる種類のドキュメントをすばやく保存、共有、検索できる。 ECMAreaDesc2=要素のカードからドキュメントを追加するときに*自動ディレクトリは自動的に入力される。 <br> *マニュアルのディレクトリは、特定の要素にリンクされていないドキュメントを保存するために使用することができる。 ECMSectionWasRemoved=ディレクトリの<b>%sが</b>削除されている。 ECMSectionWasCreated=ディレクトリ<b>%s</b>が作成された。 @@ -37,7 +37,7 @@ DirNotSynchronizedSyncFirst=このディレクトリは、ECMモジュールの ReSyncListOfDir=ディレクトリのリストを再同期する HashOfFileContent=ファイルコンテンツのハッシュ NoDirectoriesFound=ディレクトリが見つからない -FileNotYetIndexedInDatabase=ファイルはまだデータベースにインデックス付けされていない(再アップロードしてみること) +FileNotYetIndexedInDatabase=ファイルはまだデータベースにインデックス付けされていない(再アップロードしてみること) ExtraFieldsEcmFiles=ExtrafieldsEcmファイル ExtraFieldsEcmDirectories=ExtrafieldsEcmディレクトリ ECMSetup=ECMセットアップ diff --git a/htdocs/langs/ja_JP/errors.lang b/htdocs/langs/ja_JP/errors.lang index 60df8eba840..40d07d1e85b 100644 --- a/htdocs/langs/ja_JP/errors.lang +++ b/htdocs/langs/ja_JP/errors.lang @@ -5,9 +5,10 @@ NoErrorCommitIsDone=エラーなし、コミットする # Errors ErrorButCommitIsDone=エラーが見つかったが、これにもかかわらず検証する ErrorBadEMail=メール%sが間違っている -ErrorBadMXDomain=メール%sが間違っているようだ(ドメインに有効なMXレコードがない) +ErrorBadMXDomain=メール%sが間違っているようだ(ドメインに有効なMXレコードがない) ErrorBadUrl=URLの%sが間違っている ErrorBadValueForParamNotAString=パラメータ の値が正しくない。通常、翻訳が欠落している場合に追加される。 +ErrorRefAlreadyExists=参照<b>%s</b>はすでに存在する。 ErrorLoginAlreadyExists=ログイン%sはすでに存在している。 ErrorGroupAlreadyExists=グループ%sはすでに存在している。 ErrorRecordNotFound=レコードが見つからなかった。 @@ -39,21 +40,22 @@ ErrorSupplierCodeAlreadyUsed=すでに使用されているベンダーコード ErrorBadParameters=パラメータ が不正で ErrorWrongParameters=パラメータ が間違っているか欠落している ErrorBadValueForParameter=パラメータ "%s" の値 "%s" が間違っている -ErrorBadImageFormat=画像ファイルはサポートされている形式ではない(PHPはこの形式の画像を変換する関数をサポートしていない) +ErrorBadImageFormat=画像ファイルはサポートされている形式ではない(PHPはこの形式の画像を変換する関数をサポートしていない) ErrorBadDateFormat=値 '%s'に間違った日付の形式になっている ErrorWrongDate=日付が正しくない! ErrorFailedToWriteInDir=ディレクトリ%sの書き込みに失敗した -ErrorFoundBadEmailInFile=ファイル内の%s線の発見誤った電子メールのシンタックス(電子メール= %sを使用したサンプルライン%s) +ErrorFoundBadEmailInFile=ファイル内の%s線の発見誤った電子メールのシンタックス(電子メール= %sを使用したサンプルライン%s) ErrorUserCannotBeDelete=ユーザーを削除することはできない。多分それはDolibarrエンティティに関連付けられている。 ErrorFieldsRequired=いくつかの必須フィールドが満たされていなかった。 ErrorSubjectIsRequired=メールトピックが必要だ -ErrorFailedToCreateDir=ディレクトリの作成に失敗した。そのWebサーバのユーザがDolibarrのドキュメントディレクトリに書き込む権限を持って確認すること。パラメータ の<b>safe_modeが</b>このPHPが有効になっている場合、Dolibarr PHPファイルは、Webサーバーのユーザー(またはグループ)に所有していることを確認すること。 +ErrorFailedToCreateDir=ディレクトリの作成に失敗した。そのWebサーバのユーザがDolibarrのドキュメントディレクトリに書き込む権限を持って確認すること。パラメータ の<b>safe_modeが</b>このPHPが有効になっている場合、Dolibarr PHPファイルは、Webサーバーのユーザー(またはグループ)に所有していることを確認すること。 ErrorNoMailDefinedForThisUser=このユーザーに定義されたメールはない +ErrorSetupOfEmailsNotComplete=メールの設定が完了していない ErrorFeatureNeedJavascript=この機能が動作するようにアクティブにするjavascriptをする必要がある。セットアップでこれを変更 - 表示される。 ErrorTopMenuMustHaveAParentWithId0=タイプは 'top'のメニューが親メニューを持つことはできない。親メニューに0を置くか、または型 &quot;左&quot;のメニューを選択する。 ErrorLeftMenuMustHaveAParentId=タイプ &quot;左&quot;のメニューは、親IDを持つ必要がある。 -ErrorFileNotFound=ファイルが見つかりませんでし<b>%s(PHP</b> openbasedirまたはセーフモードパラメータ によって拒否された不正なパスが、間違ったパーミッションやアクセス) -ErrorDirNotFound=ディレクトリが見つかりません<b>%s(PHP</b> openbasedirまたはセーフモードパラメータ によって拒否された不正なパスが、間違ったパーミッションやアクセス) +ErrorFileNotFound=ファイルが見つかりませんでし<b>%s(PHP</b> openbasedirまたはセーフモードパラメータ によって拒否された不正なパスが、間違ったパーミッションやアクセス) +ErrorDirNotFound=ディレクトリが見つかりません<b>%s(PHP</b> openbasedirまたはセーフモードパラメータ によって拒否された不正なパスが、間違ったパーミッションやアクセス) ErrorFunctionNotAvailableInPHP=関数<b>%sは、</b>この機能を使用するために必要となるが、このバージョンの/ PHPのセットアップでは使用できない。 ErrorDirAlreadyExists=この名前のディレクトリがすでに存在している。 ErrorFileAlreadyExists=この名前を持つファイルがすでに存在している。 @@ -62,8 +64,8 @@ ErrorNoTmpDir=一時的なdirectyの%sが存在しません。 ErrorUploadBlockedByAddon=PHP / Apacheプラグインによってブロックされてアップロードする。 ErrorFileSizeTooLarge=ファイルサイズが大きすぎる。 ErrorFieldTooLong=フィールド%sが長すぎる。 -ErrorSizeTooLongForIntType=(%s桁の最大値)int型に対して長すぎるサイズ -ErrorSizeTooLongForVarcharType=文字列型(%s文字最大)長すぎるサイズ +ErrorSizeTooLongForIntType=(%s桁の最大値)int型に対して長すぎるサイズ +ErrorSizeTooLongForVarcharType=文字列型(%s文字最大)長すぎるサイズ ErrorNoValueForSelectType=選択リストの値を入力すること ErrorNoValueForCheckBoxType=チェックボックスリストの値を入力すること ErrorNoValueForRadioType=ラジオリストの値を入力すること @@ -76,8 +78,8 @@ ErrorExportDuplicateProfil=このプロファイル名は、このエクスポ ErrorLDAPSetupNotComplete=Dolibarr-LDAPのマッチングは完全ではない。 ErrorLDAPMakeManualTest=.ldifファイルは、ディレクトリ%sで生成された。エラーの詳細情報を持つようにコマンドラインから手動でそれをロードしようとする。 ErrorCantSaveADoneUserWithZeroPercentage= "doneby" フィールドも入力されている場合、 "statusnotstarted" のアクションを保存できない。 -ErrorRefAlreadyExists=作成に使用refは、すでに存在している。 -ErrorPleaseTypeBankTransactionReportName=エントリを報告する必要のある銀行取引明細書名を入力すること(フォーマットYYYYMMまたはYYYYMMDD) +ErrorRefAlreadyExists=参照<b>%s</b>はすでに存在する。 +ErrorPleaseTypeBankTransactionReportName=エントリを報告する必要のある銀行取引明細書名を入力すること(フォーマットYYYYMMまたはYYYYMMDD) ErrorRecordHasChildren=子レコードがいくつかあるため、レコードの削除に失敗した。 ErrorRecordHasAtLeastOneChildOfType=オブジェクトには、タイプ%sの子が少なくとも1つある ErrorRecordIsUsedCantDelete=レコードを削除できない。すでに使用されているか、別のオブジェクトに含まれている。 @@ -88,9 +90,9 @@ ErrorWrongValueForField=フィールド<b>%s </b>: '<b> %s </b>' は、正規 ErrorFieldValueNotIn=フィールド<b> %s </b>: '<b> %s </b>' が値が<b> %s </b> <b> %s </b>の分野では見られません ErrorFieldRefNotIn=フィールド<b>%s </b>: '<b> %s</b>' は存在する <b>%s</b> 参照ではない ErrorsOnXLines=%sエラーが見つかった -ErrorFileIsInfectedWithAVirus=ウイルス対策プログラムがファイルを検証することができなかった(ファイルがウイルスに感染されるかもしれない) +ErrorFileIsInfectedWithAVirus=ウイルス対策プログラムがファイルを検証することができなかった(ファイルがウイルスに感染されるかもしれない) ErrorSpecialCharNotAllowedForField=特殊文字は、フィールド &quot;%s&quot;に許可されていない -ErrorNumRefModel=参照は、データベース(%s)に存在し、この番号規則と互換性がない。レコードを削除するか、このモジュールを有効にするために参照を変更した。 +ErrorNumRefModel=参照は、データベース(%s)に存在し、この番号規則と互換性がない。レコードを削除するか、このモジュールを有効にするために参照を変更した。 ErrorQtyTooLowForThisSupplier=このベンダーの数量が少なすぎるか、このベンダーのこの製品に価格が定義されていない ErrorOrdersNotCreatedQtyTooLow=数量が少なすぎるため、一部の注文が作成されていない ErrorModuleSetupNotComplete=モジュール%sのセットアップが完了していないようだ。ホーム-セットアップ-モジュールに移動して完了する。 @@ -106,7 +108,7 @@ ErrorFailedToSendPassword=パスワードの送信に失敗した ErrorFailedToLoadRSSFile=RSSフィードの取得に失敗した。エラーメッセージが十分な情報を提供していない場合は定数MAIN_SIMPLEXMLLOAD_DEBUGを追加しようとする。 ErrorForbidden=アクセスが拒否された。 <br>無効にされたモジュールのページ、領域、または機能にアクセスしようとしたか、認証されたセッションに参加していないか、ユーザーに許可されていない。 ErrorForbidden2=このログインの許可は、メニュー%s - &gt; %sからDolibarr管理者によって定義することができる。 -ErrorForbidden3=そのDolibarrが認証セッションを介して使用されていないようだ。認証を(htaccessファイルは、mod_authまたは他の...)を管理する方法を知ってDolibarrセットアップドキュメントを見てみよう。 +ErrorForbidden3=そのDolibarrが認証セッションを介して使用されていないようだ。認証を(htaccessファイルは、mod_authまたは他の...)を管理する方法を知ってDolibarrセットアップドキュメントを見てみよう。 ErrorNoImagickReadimage=クラスImagickが、このPHPで発見さ​​れていない。なしプレビューは利用できない。管理者は、メニューのSetupから、このタブを無効にすることができる - 表示する。 ErrorRecordAlreadyExists=レコードがすでに存在している ErrorLabelAlreadyExists=このラベルはすでに存在する @@ -118,10 +120,10 @@ ErrorFailedToRunExternalCommand=外部コマンドの実行に失敗した。そ ErrorFailedToChangePassword=パスワードの変更に失敗した ErrorLoginDoesNotExists=ログイン<b>%s</b>を持つユーザーを見つけることができなかった。 ErrorLoginHasNoEmail=このユーザーは電子メールアドレスを持っていない。プロセスが中止された。 -ErrorBadValueForCode=セキュリティコードの値が正しくない。新しい値で再試行すること... +ErrorBadValueForCode=セキュリティコードの値が正しくない。新規値で再試行すること... ErrorBothFieldCantBeNegative=フィールド%s %sとは負の両方にすることはできない -ErrorFieldCantBeNegativeOnInvoice=このタイプの請求書では、フィールド<strong> %s</strong>を負にすることはできない。割引ラインを追加する必要がある場合は、最初に割引を作成し(サードパーティカードのフィールド '%s'から)、それを請求書に適用する。 -ErrorLinesCantBeNegativeForOneVATRate=行の合計(税控除後)は、特定のnull以外のVAT率に対して負になることはできない(VAT率<b> %s </b> %%の負の合計が見つかった)。 +ErrorFieldCantBeNegativeOnInvoice=このタイプの請求書では、フィールド<strong> %s</strong>を負にすることはできない。割引ラインを追加する必要がある場合は、最初に割引を作成し(サードパーティカードのフィールド '%s'から)、それを請求書に適用する。 +ErrorLinesCantBeNegativeForOneVATRate=行の合計(税控除後)は、特定のnull以外のVAT率に対して負になることはできない(VAT率<b> %s </b> %%の負の合計が見つかった)。 ErrorLinesCantBeNegativeOnDeposits=預金でラインがマイナスになることはない。あなたがそうするならば、あなたが最終的な請求書で預金を消費する必要があるとき、あなたは問題に直面するだろう。 ErrorQtyForCustomerInvoiceCantBeNegative=顧客の請求書への明細の数量をマイナスにすることはできない ErrorWebServerUserHasNotPermission=Webサーバを実行するユーザーアカウントを使用<b>%s</b>そのための権限を持っていない @@ -133,9 +135,9 @@ ErrorModuleFileRequired=Dolibarrモジュールパッケージファイルを選 ErrorPhpCurlNotInstalled=PHPCURLがインストールされていない。これはPaypalと話すために不可欠だ。 ErrorFailedToAddToMailmanList=レコード%sをMailmanリスト%sまたはSPIPベースに追加できなかった ErrorFailedToRemoveToMailmanList=レコード%sをMailmanリスト%sまたはSPIPベースに削除できなかった -ErrorNewValueCantMatchOldValue=新しい値を古い値と等しくすることはできない -ErrorFailedToValidatePasswordReset=パスワードの再初期化に失敗した。 reinitがすでに実行されている可能性がある(このリンクは1回しか使用できない)。そうでない場合は、再初期化プロセスを再開してみること。 -ErrorToConnectToMysqlCheckInstance=データベースへの接続に失敗。データベースサーバーが実行されていることを確認する(たとえば、mysql/mariadb なら、コマンドラインから "sudo service mysql start" を使用して起動できる)。 +ErrorNewValueCantMatchOldValue=新規値を古い値と等しくすることはできない +ErrorFailedToValidatePasswordReset=パスワードの再初期化に失敗した。 reinitがすでに実行されている可能性がある(このリンクは1回しか使用できない)。そうでない場合は、再初期化プロセスを再開してみること。 +ErrorToConnectToMysqlCheckInstance=データベースへの接続に失敗。データベースサーバーが実行されていることを確認する(たとえば、mysql/mariadb なら、コマンドラインから "sudo service mysql start" を使用して起動できる)。 ErrorFailedToAddContact=連絡先の追加に失敗した ErrorDateMustBeBeforeToday=日付は今日よりも低くする必要がある ErrorDateMustBeInFuture=日付は今日より大きくなければならない @@ -144,7 +146,7 @@ ErrorPHPNeedModule=エラー、この機能を使用するには、PHPにモジ ErrorOpenIDSetupNotComplete=OpenID認証を許可するようにDolibarr構成ファイルを設定したが、OpenIDサービスのURLが定数%sに定義されていない ErrorWarehouseMustDiffers=ソースウェアハウスとターゲットウェアハウスは異なる必要がある ErrorBadFormat=悪いフォーマット! -ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=エラー、このメンバーはまだサードパーティにリンクされていない。請求書付きのサブスクリプションを作成する前に、メンバーを既存のサードパーティにリンクするか、新しいサードパーティを作成すること。 +ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=エラー、このメンバーはまだサードパーティにリンクされていない。請求書付きのサブスクリプションを作成する前に、メンバーを既存のサードパーティにリンクするか、新規サードパーティを作成すること。 ErrorThereIsSomeDeliveries=エラー、この出荷に関連するいくつかの配送がある。削除は拒否された。 ErrorCantDeletePaymentReconciliated=調整された銀行エントリを生成した支払いを削除できない ErrorCantDeletePaymentSharedWithPayedInvoice=ステータスがPaidの少なくとも1つの請求書で共有されている支払いを削除できない @@ -153,7 +155,7 @@ ErrorPriceExpression2=組み込み関数 '%s'を再定義できない ErrorPriceExpression3=関数定義の未定義変数 '%s' ErrorPriceExpression4=不正な文字 '%s' ErrorPriceExpression5=予期しない '%s' -ErrorPriceExpression6=引数の数が間違っている(%sが指定され、%sが予期されている) +ErrorPriceExpression6=引数の数が間違っている(%sが指定され、%sが予期されている) ErrorPriceExpression8=予期しない演算子 '%s' ErrorPriceExpression9=予期しないエラーが発生した ErrorPriceExpression10=演算子 '%s'にオペランドがない @@ -170,8 +172,8 @@ ErrorPriceExpressionInternal=内部エラー '%s' ErrorPriceExpressionUnknown=不明なエラー '%s' ErrorSrcAndTargetWarehouseMustDiffers=ソースウェアハウスとターゲットウェアハウスは異なる必要がある ErrorTryToMakeMoveOnProductRequiringBatchData=ロット/シリアル情報を必要とする製品 '%s'で、ロット/シリアル情報なしで在庫移動を行おうとするとエラーが発生した -ErrorCantSetReceptionToTotalDoneWithReceptionToApprove=記録されたすべての受信は、このアクションを実行する前に、まず確認(承認または拒否)する必要がある -ErrorCantSetReceptionToTotalDoneWithReceptionDenied=このアクションを実行する前に、記録されたすべての受信を最初に確認(承認)する必要がある +ErrorCantSetReceptionToTotalDoneWithReceptionToApprove=記録されたすべての受信は、このアクションを実行する前に、まず確認(承認または拒否)する必要がある +ErrorCantSetReceptionToTotalDoneWithReceptionDenied=このアクションを実行する前に、記録されたすべての受信を最初に確認(承認)する必要がある ErrorGlobalVariableUpdater0=HTTPリクエストがエラー "%s" で失敗した ErrorGlobalVariableUpdater1=無効なJSON形式 '%s' ErrorGlobalVariableUpdater2=パラメータ '%s'がない @@ -182,34 +184,34 @@ ErrorFieldMustBeANumeric=フィールド<b>%s</b>は数値である必要があ ErrorMandatoryParametersNotProvided=必須パラメータ (s)が提供されていない ErrorOppStatusRequiredIfAmount=このリードの見積もり金額を設定する。したがって、そのステータスも入力する必要がある。 ErrorFailedToLoadModuleDescriptorForXXX=%sのモジュール記述子クラスのロードに失敗した -ErrorBadDefinitionOfMenuArrayInModuleDescriptor=モジュール記述子のメニュー配列の定義が正しくない(キーfk_menuの値が正しくない) +ErrorBadDefinitionOfMenuArrayInModuleDescriptor=モジュール記述子のメニュー配列の定義が正しくない(キーfk_menuの値が正しくない) ErrorSavingChanges=変更を保存するときにエラーが発生した ErrorWarehouseRequiredIntoShipmentLine=出荷するラインには倉庫が必要だ ErrorFileMustHaveFormat=ファイルの形式は%sである必要がある ErrorFilenameCantStartWithDot=ファイル名を "。" で始めることはできない。 ErrorSupplierCountryIsNotDefined=このベンダーの国は定義されていない。最初にこれを修正すること。 ErrorsThirdpartyMerge=2つのレコードのマージに失敗した。リクエストはキャンセルされた。 -ErrorStockIsNotEnoughToAddProductOnOrder=製品%sが新しい注文に追加するには、在庫が十分ではない。 -ErrorStockIsNotEnoughToAddProductOnInvoice=製品%sが新しい請求書に追加するには、在庫が十分ではない。 -ErrorStockIsNotEnoughToAddProductOnShipment=製品%sが新しい出荷に追加するには、在庫が十分ではない。 -ErrorStockIsNotEnoughToAddProductOnProposal=製品%sが新しい提案に追加するには、在庫が十分ではない。 +ErrorStockIsNotEnoughToAddProductOnOrder=製品%sが新規注文に追加するには、在庫が十分ではない。 +ErrorStockIsNotEnoughToAddProductOnInvoice=製品%sが新規請求書に追加するには、在庫が十分ではない。 +ErrorStockIsNotEnoughToAddProductOnShipment=製品%sが新規出荷に追加するには、在庫が十分ではない。 +ErrorStockIsNotEnoughToAddProductOnProposal=製品%sが新規提案に追加するには、在庫が十分ではない。 ErrorFailedToLoadLoginFileForMode=モード "%s" のログインキーの取得に失敗した。 ErrorModuleNotFound=モジュールのファイルが見つからなかった。 -ErrorFieldAccountNotDefinedForBankLine=ソース行ID%s(%s)に対してアカウンティングアカウントの値が定義されていない -ErrorFieldAccountNotDefinedForInvoiceLine=請求書ID%s(%s)に定義されていない会計勘定の値 -ErrorFieldAccountNotDefinedForLine=行に定義されていない会計勘定の値(%s) +ErrorFieldAccountNotDefinedForBankLine=ソース行ID%s(%s)に対してアカウンティングアカウントの値が定義されていない +ErrorFieldAccountNotDefinedForInvoiceLine=請求書ID%s(%s)に定義されていない会計勘定の値 +ErrorFieldAccountNotDefinedForLine=行に定義されていない会計勘定の値(%s) ErrorBankStatementNameMustFollowRegex=エラー、銀行取引明細書名は次の構文規則に従う必要がある%s ErrorPhpMailDelivery=使用する受信者の数が多すぎないこと、および電子メールの内容がスパムに類似していないことを確認すること。詳細については、ファイアウォールとサーバーのログファイルを確認するように管理者に依頼すること。 ErrorUserNotAssignedToTask=消費時間を入力できるようにするには、ユーザーをタスクに割り当てる必要がある。 ErrorTaskAlreadyAssigned=すでにユーザーに割り当てられているタスク ErrorModuleFileSeemsToHaveAWrongFormat=モジュールパッケージの形式が間違っているようだ。 ErrorModuleFileSeemsToHaveAWrongFormat2=モジュールのzipには、少なくとも1つの必須ディレクトリが存在する必要がある:<strong> %s</strong>または<strong>%s </strong> -ErrorFilenameDosNotMatchDolibarrPackageRules=モジュールパッケージの名前(<strong> %s </strong>)が予期される名前の構文と一致しません:<strong> %s </strong> +ErrorFilenameDosNotMatchDolibarrPackageRules=モジュールパッケージの名前(<strong> %s </strong>)が予期される名前の構文と一致しません:<strong> %s </strong> ErrorDuplicateTrigger=エラー、トリガー名%sが重複している。すでに%sからロードされている。 ErrorNoWarehouseDefined=エラー、倉庫が定義されていない。 ErrorBadLinkSourceSetButBadValueForRef=使用しているリンクは無効だ。支払いの "ソース" が定義されているが、 "ref" の値が無効だ。 ErrorTooManyErrorsProcessStopped=エラーが多すぎる。プロセスが停止した。 -ErrorMassValidationNotAllowedWhenStockIncreaseOnAction=このアクションで在庫を増減するオプションが設定されている場合、一括検証はできない(増加/減少する倉庫を定義できるように、1つずつ検証する必要がある) +ErrorMassValidationNotAllowedWhenStockIncreaseOnAction=このアクションで在庫を増減するオプションが設定されている場合、一括検証はできない(増加/減少する倉庫を定義できるように、1つずつ検証する必要がある) ErrorObjectMustHaveStatusDraftToBeValidated=オブジェクト%sを検証するには、ステータスが "ドラフト" である必要がある。 ErrorObjectMustHaveLinesToBeValidated=オブジェクト%sには、検証する行が必要だ。 ErrorOnlyInvoiceValidatedCanBeSentInMassAction= "電子メールで送信" 一括アクションを使用して送信できるのは、検証済みの請求書のみだ。 @@ -217,14 +219,14 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=記事が事前定義された製 ErrorDiscountLargerThanRemainToPaySplitItBefore=あなたが適用しようとする割引は、支払うべき残りよりも大きいだ。前に割引を2つの小さな割引に分割する。 ErrorFileNotFoundWithSharedLink=ファイルが見つからなかった。共有キーが変更されたか、ファイルが最近削除された可能性がある。 ErrorProductBarCodeAlreadyExists=製品バーコード%sは、別の製品リファレンスにすでに存在する。 -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=少なくとも1つのサブ製品(またはサブ製品のサブ製品)にシリアル番号/ロット番号が必要な場合、キットを使用してサブ製品を自動的に増減させることはできないことにも注意すること。 +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=少なくとも1つのサブ製品(またはサブ製品のサブ製品)にシリアル番号/ロット番号が必要な場合、キットを使用してサブ製品を自動的に増減させることはできないことにも注意すること。 ErrorDescRequiredForFreeProductLines=無料の製品を含むラインには説明が必須だ ErrorAPageWithThisNameOrAliasAlreadyExists=ページ/コンテナ<strong>%s </strong>は、使用しようとしているものと同じ名前または代替エイリアスを持っている ErrorDuringChartLoad=勘定科目表の読み込み中にエラーが発生した。ロードされていないアカウントが少ない場合でも、手動で入力できる。 ErrorBadSyntaxForParamKeyForContent=paramkeyforcontentの構文が正しくない。 %sまたは%sで始まる値が必要だ -ErrorVariableKeyForContentMustBeSet=エラー、名前%s(表示するテキストコンテンツ付き)または%s(表示する外部URL付き)の定数を設定する必要がある。 +ErrorVariableKeyForContentMustBeSet=エラー、名前%s(表示するテキストコンテンツ付き)または%s(表示する外部URL付き)の定数を設定する必要がある。 ErrorURLMustStartWithHttp=URL %sは http:// または https:// で始まる必要がある -ErrorNewRefIsAlreadyUsed=エラー、新しい参照はすでに使用されている +ErrorNewRefIsAlreadyUsed=エラー、新規参照はすでに使用されている ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=エラー、クローズされた請求書にリンクされた支払いを削除することはできない。 ErrorSearchCriteriaTooSmall=検索条件が小さすぎる。 ErrorObjectMustHaveStatusActiveToBeDisabled=無効にするには、オブジェクトのステータスが "アクティブ" である必要がある @@ -238,35 +240,43 @@ ErrorLanguageMandatoryIfPageSetAsTranslationOfAnother=エラー、ページを ErrorLanguageOfTranslatedPageIsSameThanThisPage=エラー、翻訳されたページの言語はこれと同じだ。 ErrorBatchNoFoundForProductInWarehouse=倉庫 "%s" に製品 "%s" のロット/シリアルが見つかりません。 ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=倉庫 "%s" の製品 "%s" のこのロット/シリアルに十分な数量がない。 -ErrorOnlyOneFieldForGroupByIsPossible='Group by'のフィールドは1つだけ可能だ(他のフィールドは破棄される) -ErrorTooManyDifferentValueForSelectedGroupBy=フィールド '<b> %s </b>'に異なる値(<b> %s </b>以上)が多すぎるため、 それを図形に対する ' Group by ' として使用することはできない。フィールド "Group By" は削除された。 X軸として使用したかったのか? +ErrorOnlyOneFieldForGroupByIsPossible='Group by'のフィールドは1つだけ可能だ(他のフィールドは破棄される) +ErrorTooManyDifferentValueForSelectedGroupBy=フィールド '<b> %s </b>'に異なる値(<b> %s </b>以上)が多すぎるため、 それを図形に対する ' Group by ' として使用することはできない。フィールド "Group By" は削除された。 X軸として使用したかったのか? ErrorReplaceStringEmpty=エラー、置き換える文字列が空だ ErrorProductNeedBatchNumber=エラー、製品 '<b> %s</b>'にはロット/シリアル番号が必要だ ErrorProductDoesNotNeedBatchNumber=エラー、製品 '<b> %s</b>'はロット/シリアル番号を受け入れません ErrorFailedToReadObject=エラー、タイプ<b> %s</b>のオブジェクトの読み取りに失敗した ErrorParameterMustBeEnabledToAllwoThisFeature=エラー、パラメータ <b> %s </b>を<b>conf / conf.php <b>で有効にして、内部ジョブスケジューラでコマンドラインインターフェイスを使用できるようにする必要がある ErrorLoginDateValidity=エラー、このログインは有効期間外だ +ErrorValueLength=フィールドの長さ '<b> %s </b>'は '<b> %s</b>'より大きくなければならない +ErrorReservedKeyword=「<b>%s</b>」という単語は予約語 +ErrorNotAvailableWithThisDistribution=このディストリビューションでは利用できない +ErrorPublicInterfaceNotEnabled=パブリックインターフェイスが有効になっていない +ErrorLanguageRequiredIfPageIsTranslationOfAnother=別のページの翻訳として設定されている場合は、新しいページの言語を定義する必要がある +ErrorLanguageMustNotBeSourceLanguageIfPageIsTranslationOfAnother=新しいページの言語は、別ページの翻訳として設定されている場合、ソース言語にしないこと +ErrorAParameterIsRequiredForThisOperation=この操作にはパラメーターが必須です + # Warnings -WarningParamUploadMaxFileSizeHigherThanPostMaxSize=PHPパラメータ upload_max_filesize(%s)は、PHPパラメータ post_max_size(%s)よりも大きくなっている。これは一貫した設定ではない。 +WarningParamUploadMaxFileSizeHigherThanPostMaxSize=PHPパラメータ upload_max_filesize(%s)は、PHPパラメータ post_max_size(%s)よりも大きくなっている。これは一貫した設定ではない。 WarningPasswordSetWithNoAccount=このメンバーにパスワードが設定された。ただし、ユーザーアカウントは作成されなかった。したがって、このパスワードは保存されるが、Dolibarrへのログインには使用できない。外部モジュール/インターフェースで使用できるが、メンバーのログインやパスワードを定義する必要がない場合は、メンバーモジュールの設定から "各メンバーのログインを管理する" オプションを無効にすることができる。ログインを管理する必要があるがパスワードは必要ない場合は、このフィールドを空のままにして、この警告を回避できる。注:メンバーがユーザーにリンクされている場合は、電子メールをログインとして使用することもできる。 WarningMandatorySetupNotComplete=必須パラメータ を設定するには、ここをクリックすること WarningEnableYourModulesApplications=モジュールとアプリケーションを有効にするには、ここをクリックすること WarningSafeModeOnCheckExecDir=警告、PHPのオプション<b>セーフモードは、PHP</b>のパラメータ <b>safe_mode_exec_dirの</b>宣言されたディレクトリ内に格納する必要があるので、コマンドにある。 -WarningBookmarkAlreadyExists=この職種またはこのターゲットを使用して、ブックマーク(URL)がすでに存在している。 +WarningBookmarkAlreadyExists=この職種またはこのターゲットを使用して、ブックマーク(URL)がすでに存在している。 WarningPassIsEmpty=警告は、データベースのパスワードは空だ。これはセキュリティホールだ。あなたのデータベースにパスワードを追加し、これを反映するようにconf.phpファイルを変更する必要がある。 WarningConfFileMustBeReadOnly=警告、設定ファイル (<b>htdocs/conf/conf.php</b>) はWebサーバーによって上書きされうる。これは重大なセキュリティホールだ。 Webサーバーで使用されるオペレーティング·システム·ユーザーのために読み取り専用モードになるようにファイルのパーミッションを変更すること。あなたのディスクにWindowsとFATフォーマットを使用すると、このファイルシステムはファイルのパーミッションを追加することはできず、完全な安全を得られないことを知っている必要がある。 WarningsOnXLines=<b>%s</b>ソース行に関する警告 WarningNoDocumentModelActivated=ドキュメント生成用のモデルはアクティブ化されていない。モジュールの設定を確認するまで、デフォルトでモデルが選択される。 WarningLockFileDoesNotExists=警告、セットアップが完了したら、ファイル<b> install.lock</b>をディレクトリ<b>%s </b>に追加して、インストール/移行ツールを無効にする必要がある。このファイルの作成を省略すると、重大なセキュリティリスクが発生する。 -WarningUntilDirRemoved=すべてのセキュリティ警告(管理者ユーザーのみに表示)は、脆弱性が存在する限り(または、 設定 -> その他の設定 で定数 MAIN_REMOVE_INSTALL_WARNING が追加されている限り)アクティブなままだ。 +WarningUntilDirRemoved=すべてのセキュリティ警告(管理者ユーザーのみに表示)は、脆弱性が存在する限り(または、 設定 -> その他の設定 で定数 MAIN_REMOVE_INSTALL_WARNING が追加されている限り)アクティブなままだ。 WarningCloseAlways=警告、ソース要素とターゲット要素の間で量が異なっていても、クローズは行われる。この機能は注意して有効にすること。 WarningUsingThisBoxSlowDown=警告、このボックスを使用すると、ボックスを表示しているすべてのページの速度が大幅に低下する。 -WarningClickToDialUserSetupNotComplete=ユーザーのClickToDial情報の設定が完了していない(ユーザーカードのClickToDialタブを参照)。 +WarningClickToDialUserSetupNotComplete=ユーザーのClickToDial情報の設定が完了していない(ユーザーカードのClickToDialタブを参照)。 WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=表示設定が視覚障害者またはテキストブラウザ用に最適化されている場合、機能は無効になる。 -WarningPaymentDateLowerThanInvoiceDate=請求書%sの支払い日(%s)が請求日(%s)よりも前だ。 -WarningTooManyDataPleaseUseMoreFilters=データが多すぎる(%s行を超えている)。より多くのフィルターを使用するか、定数%sをより高い制限に設定すること。 +WarningPaymentDateLowerThanInvoiceDate=請求書%sの支払い日(%s)が請求日(%s)よりも前だ。 +WarningTooManyDataPleaseUseMoreFilters=データが多すぎる(%s行を超えている)。より多くのフィルタを使用するか、定数%sをより高い制限に設定すること。 WarningSomeLinesWithNullHourlyRate=時間料金が定義されていないときに、一部のユーザーによって記録された時間もある。 1時間あたり0%sの値が使用されたが、これにより、費やされた時間の誤った評価が発生する可能性がある。 -WarningYourLoginWasModifiedPleaseLogin=ログインが変更された。セキュリティ上の理由から、次のアクションの前に新しいログインでログインする必要がある。 +WarningYourLoginWasModifiedPleaseLogin=ログインが変更された。セキュリティ上の理由から、次のアクションの前に新規ログインでログインする必要がある。 WarningAnEntryAlreadyExistForTransKey=この言語の翻訳キーのエントリはすでに存在する WarningNumberOfRecipientIsRestrictedInMassAction=警告、リストで一括アクションを使用する場合、異なる受信者の数は<b> %s</b>に制限される WarningDateOfLineMustBeInExpenseReportRange=警告、行の日付が経費報告書の範囲内にない @@ -276,3 +286,4 @@ WarningSomeBankTransactionByChequeWereRemovedAfter=一部の銀行取引は、 WarningFailedToAddFileIntoDatabaseIndex=警告、ECMデータベースインデックステーブルにファイルエントリを追加できなかった WarningTheHiddenOptionIsOn=警告、非表示のオプション<b> %s</b>がオンになっている。 WarningCreateSubAccounts=警告、サブアカウントを直接作成することはできない。このリストでそれらを見つけるには、サードパーティまたはユーザーを作成し、それらにアカウンティングコードを割り当てる必要がある +WarningAvailableOnlyForHTTPSServers=HTTPSで保護された接続を使用している場合にのみ使用できます。 diff --git a/htdocs/langs/ja_JP/exports.lang b/htdocs/langs/ja_JP/exports.lang index 1aefed12ba1..07f956fe22d 100644 --- a/htdocs/langs/ja_JP/exports.lang +++ b/htdocs/langs/ja_JP/exports.lang @@ -10,8 +10,8 @@ SelectImportDataSet=インポートしたいデータを選択... SelectExportFields=エクスポートするフィールドを選択するか、事前定義されたエクスポートプロファイルを選択する SelectImportFields=アンカー%sを使用して上下に移動することにより、インポートするソースファイルフィールドとデータベース内のそれらのターゲットフィールドを選択するか、事前定義されたインポートプロファイルを選択する。 NotImportedFields=ソースファイルのフィールドがインポートされない -SaveExportModel=選択内容をエクスポートプロファイル/テンプレートとして保存する(再利用用)。 -SaveImportModel=このインポートプロファイルを(再利用のために)保存する... +SaveExportModel=選択内容をエクスポートプロファイル/テンプレートとして保存する(再利用用)。 +SaveImportModel=このインポートプロファイルを(再利用のために)保存する... ExportModelName=プロファイル名をエクスポートする ExportModelSaved=<b> %s</b>として保存されたエクスポートプロファイル。 ExportableFields=エクスポート可能なフィールド @@ -37,7 +37,7 @@ FormatedExportDesc1=これらのツールを使用すると、アシスタント FormatedExportDesc2=最初のステップは、事前定義されたデータセットを選択し、次にエクスポートするフィールドとその順序を選択すること 。 FormatedExportDesc3=エクスポートするデータを選択すると、出力ファイルの形式を選択できる。 Sheet=シート -NoImportableData=いいえインポート可能なデータがない(データのインポートを可能にするための定義としないモジュール) +NoImportableData=いいえインポート可能なデータがない(データのインポートを可能にするための定義としないモジュール) FileSuccessfullyBuilt=生成されたファイル SQLUsedForExport=データの抽出に使用されるSQLリクエスト LineId=行のid @@ -49,16 +49,16 @@ LineQty=線の量 LineTotalHT=除く金額ラインの税金 LineTotalTTC=ラインのための税の額 LineTotalVAT=ラインの付加価値税の額 -TypeOfLineServiceOrProduct=回線の種類(0 =製品、1 =サービス) +TypeOfLineServiceOrProduct=回線の種類(0 =製品、1 =サービス) FileWithDataToImport=インポートするデータを持つファイル FileToImport=インポートするソースファイル FileMustHaveOneOfFollowingFormat=インポートするファイルは、次のいずれかの形式である必要がある -DownloadEmptyExample=フィールドコンテンツ情報を含むテンプレートファイルをダウンロードする(*は必須フィールド ) +DownloadEmptyExample=フィールドコンテンツ情報を含むテンプレートファイルをダウンロードする(*は必須フィールド ) ChooseFormatOfFileToImport=%sアイコンをクリックして選択し、インポートファイル形式として使用するファイル形式を選択する... ChooseFileToImport=ファイルをアップロードし、%sアイコンをクリックして、ソースインポートファイルとしてファイルを選択する。 SourceFileFormat=ソースファイルの形式 FieldsInSourceFile=ソースファイル内のフィールド -FieldsInTargetDatabase=Dolibarrデータベースのターゲットフィールド(太字=必須) +FieldsInTargetDatabase=Dolibarrデータベースのターゲットフィールド(太字=必須) Field=フィールド NoFields=Noフィールド MoveField=フィールドの列番号%sを移動 @@ -70,7 +70,7 @@ FieldsTarget=対象となるフィールド FieldTarget=ターゲットとフィールド FieldSource=ソースフィールド NbOfSourceLines=ソースファイルの行数 -NowClickToTestTheImport=ファイルのファイル形式(フィールドと文字列の区切り文字)が表示されているオプションと一致していること、およびヘッダー行を省略していることを確認すること。一致していない場合、次のシミュレーションでエラーとしてフラグが付けられる。 <br>「<b>%s</b>」ボタンをクリックして、ファイル構造/コンテンツのチェックを実行し、インポートプロセスをシミュレートする。 <br><b>データベース</b>のデータは変更されない。 +NowClickToTestTheImport=ファイルのファイル形式(フィールドと文字列の区切り文字)が表示されているオプションと一致していること、およびヘッダー行を省略していることを確認すること。一致していない場合、次のシミュレーションでエラーとしてフラグが付けられる。 <br>「<b>%s</b>」ボタンをクリックして、ファイル構造/コンテンツのチェックを実行し、インポートプロセスをシミュレートする。 <br><b>データベース</b>のデータは変更されない。 RunSimulateImportFile=インポートシミュレーションを実行する FieldNeedSource=このフィールドには、ソースファイルのデータが必要 SomeMandatoryFieldHaveNoSource=いくつかの必須フィールドは、データファイルからのソースがない @@ -84,7 +84,7 @@ DataLoadedWithId=インポートされたデータには、各データベース ErrorMissingMandatoryValue=フィールド<b>%s</b>のソースファイルの必須データが空 。 TooMuchErrors=エラーのある<b>%s </b>の他のソース行がまだあるが、出力は制限されている。 TooMuchWarnings=警告のある他のソース行はまだ<b>%s </b> が、出力は制限されている。 -EmptyLine=空行(破棄される) +EmptyLine=空行(破棄される) CorrectErrorBeforeRunningImport=<b>は、</b>が最終的なインポートを実行する前に、</b>がすべてのエラー<b>を修正する必要がある。 FileWasImported=ファイルが数<b>%s</b>でインポートされた。 YouCanUseImportIdToFindRecord=フィールド<b>import_key = '%s' </b>でフィルタリングすると、データベースにインポートされたすべてのレコードを見つけることができる。 @@ -92,8 +92,8 @@ NbOfLinesOK=エラーなしで警告なしの行数<b>:%s。</b> NbOfLinesImported=正常インポートの行数<b>:%s。</b> DataComeFromNoWhere=挿入する値は、ソース·ファイル内のどこからも来ていない。 DataComeFromFileFieldNb=挿入する値は、ソースファイル内のフィールド番号<b>%s</b>から来ている。 -DataComeFromIdFoundFromRef=ソースファイルのフィールド番号<b>%s </b>からの値は、使用する親オブジェクトのIDを見つけるために使用される(したがって、オブジェクト<b> %s </b>がデータベースに存在し、ソースファイルからの参照符号を持つ必要がある)。 -DataComeFromIdFoundFromCodeId=ソースファイルのフィールド番号<b>%s </b>からのコードは、使用する親オブジェクトのIDを見つけるために使用される(したがって、ソースファイルのコードはディクショナリ<b> %s </b> に存在する必要がある)。 IDがわかっている場合、コードの代わりにソースファイルでそれを使用することもできる。インポートはどちらの場合でも機能するはず 。 +DataComeFromIdFoundFromRef=ソースファイルのフィールド番号<b>%s </b>からの値は、使用する親オブジェクトのIDを見つけるために使用される(したがって、オブジェクト<b> %s </b>がデータベースに存在し、ソースファイルからの参照符号を持つ必要がある)。 +DataComeFromIdFoundFromCodeId=ソースファイルのフィールド番号<b>%s </b>からのコードは、使用する親オブジェクトのIDを見つけるために使用される(したがって、ソースファイルのコードはディクショナリ<b> %s </b> に存在する必要がある)。 IDがわかっている場合、コードの代わりにソースファイルでそれを使用することもできる。インポートはどちらの場合でも機能するはず 。 DataIsInsertedInto=ソースファイルからのデータは、次のフィールドに挿入される。 DataIDSourceIsInsertedInto=ソースファイルのデータを使用して親オブジェクトのIDが見つかり、次のフィールドに挿入される。 DataCodeIDSourceIsInsertedInto=コー​​ドから見つかった親行のIDは、次のフィールドに挿入される。 @@ -101,11 +101,11 @@ SourceRequired=データ値は必須 。 SourceExample=可能なデータ値の例 ExampleAnyRefFoundIntoElement=要素<b>%s</b>で見つかった何らかの参照符号 ExampleAnyCodeOrIdFoundIntoDictionary=辞書<b>%s </b>で見つかった何らかのコード (またはID) -CSVFormatDesc= <b>カンマ区切り値</b>ファイル形式(.csv)。 <br>これは、フィールドが区切り文字[%s]で区切られているテキストファイル形式 。フィールドコンテンツ内に区切り文字が見つかった場合、フィールドは丸め文字[%s]で丸められる。丸め文字をエスケープするエスケープ文字は[%s] 。 -Excel95FormatDesc= <b> Excel </b>ファイル形式(.xls)<br>これはネイティブのExcel 95形式(BIFF5) 。 -Excel2007FormatDesc= <b> Excel </b>ファイル形式(.xlsx)<br>これはネイティブのExcel 2007形式(SpreadsheetML) 。 -TsvFormatDesc= <b>タブ区切り値</b>ファイル形式(.tsv)<br>これは、フィールドがタブ文字 [tab] で区切られているテキストファイル形式 。 -ExportFieldAutomaticallyAdded=フィールド<b>%s</b>が自動的に追加された。類似の行を重複レコードとして扱うのを防止するように(このフィールドを付加すると、すべての行が独自のIDを所有し、異なるものとなる)。 +CSVFormatDesc= <b>カンマ区切り値</b>ファイル形式(.csv)。 <br>これは、フィールドが区切り文字[%s]で区切られているテキストファイル形式 。フィールドコンテンツ内に区切り文字が見つかった場合、フィールドは丸め文字[%s]で丸められる。丸め文字をエスケープするエスケープ文字は[%s] 。 +Excel95FormatDesc= <b> Excel </b>ファイル形式(.xls)<br>これはネイティブのExcel 95形式(BIFF5) 。 +Excel2007FormatDesc= <b> Excel </b>ファイル形式(.xlsx)<br>これはネイティブのExcel 2007形式(SpreadsheetML) 。 +TsvFormatDesc= <b>タブ区切り値</b>ファイル形式(.tsv)<br>これは、フィールドがタブ文字 [tab] で区切られているテキストファイル形式 。 +ExportFieldAutomaticallyAdded=フィールド<b>%s</b>が自動的に追加された。類似の行を重複レコードとして扱うのを防止するように(このフィールドを付加すると、すべての行が独自のIDを所有し、異なるものとなる)。 CsvOptions=CSV形式のオプション Separator=フィールドセパレータ Enclosure=文字列区切り文字 @@ -115,11 +115,11 @@ ExportDateFilter=YYYY, YYYYMM, YYYYMMDD: 年/月/日でフィルタ<br>YYYY+YYYY ExportNumericFilter=NNNNN は1つの値でフィルタ<br>NNNNN+NNNNN は値sの範囲でフィルタ<br>< NNNNN は、より低い値でフィルタ<br>> NNNNN は、より高い値でフィルタ ImportFromLine=行番号からインポート EndAtLineNb=行番号で終了 -ImportFromToLine=制限範囲(From-To)。例えば、ヘッダー行(s)を省略する。 +ImportFromToLine=制限範囲(From-To)。例えば、ヘッダー行(s)を省略する。 SetThisValueTo2ToExcludeFirstLine=たとえば、この値を3に設定して、最初の2行を除外する。 <br>ヘッダー行が省略されていない場合、インポートシミュレーションで複数のエラーが発生する。 KeepEmptyToGoToEndOfFile=ファイルの終わりまでのすべての行を処理するには、このフィールドを空のままにする。 SelectPrimaryColumnsForUpdateAttempt=UPDATEインポートの主キーとして使用する列(s)を選択する -UpdateNotYetSupportedForThisImport=このタイプのインポートでは更新はサポートされていない(挿入のみ) +UpdateNotYetSupportedForThisImport=このタイプのインポートでは更新はサポートされていない(挿入のみ) NoUpdateAttempt=更新は実行されず、挿入のみが実行された ImportDataset_user_1=ユーザ (従業員であってもなくても) とプロパティ ComputedField=計算フィールド @@ -129,7 +129,8 @@ FilteredFields=フィルタリングされたフィールド FilteredFieldsValues=フィルタの値 FormatControlRule=フォーマット制御ルール ## imports updates -KeysToUseForUpdates=<b>が</b>の既存データを更新するために使用するキー(列) +KeysToUseForUpdates=<b>が</b>の既存データを更新するために使用するキー(列) NbInsert=挿入された行数:%s NbUpdate=更新された行数:%s -MultipleRecordFoundWithTheseFilters=これらのフィルターで複数のレコードが見つかった:%s +MultipleRecordFoundWithTheseFilters=これらのフィルタで複数のレコードが見つかった:%s +StocksWithBatch=バッチ/シリアル番号のある製品の在庫と場所(倉庫) diff --git a/htdocs/langs/ja_JP/externalsite.lang b/htdocs/langs/ja_JP/externalsite.lang index 429769e901f..e13d16f892d 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 -ExternalSiteModuleNotComplete=モジュールExternalSite(外部サイト)が正しく構成されていませんでした。 +ExternalSiteModuleNotComplete=モジュールExternalSite(外部サイト)が正しく構成されていませんでした。 ExampleMyMenuEntry=私のメニューエントリ diff --git a/htdocs/langs/ja_JP/ftp.lang b/htdocs/langs/ja_JP/ftp.lang index a95eeb0aa40..d1bf05d68c2 100644 --- a/htdocs/langs/ja_JP/ftp.lang +++ b/htdocs/langs/ja_JP/ftp.lang @@ -1,11 +1,11 @@ # Dolibarr language file - Source file is en_US - ftp FTPClientSetup=FTPまたはSFTPクライアントモジュールの設定 -NewFTPClient=新しいFTP / FTPS接続の設定 +NewFTPClient=新規FTP / FTPS接続の設定 FTPArea=FTP / FTPSエリア FTPAreaDesc=この画面には、FTPおよびSFTPサーバのビューが表示される。 SetupOfFTPClientModuleNotComplete=FTPまたはSFTPクライアントモジュールの設定が不完全なようです FTPFeatureNotSupportedByYourPHP=お使いのPHPはFTPまたはSFTP機能をサポートしていない -FailedToConnectToFTPServer=サーバ(サーバ%s、ポート%s)への接続に失敗した +FailedToConnectToFTPServer=サーバ(サーバ%s、ポート%s)への接続に失敗した FailedToConnectToFTPServerWithCredentials=定義されたログイン/パスワードでサーバにログインできなかった FTPFailedToRemoveFile=ファイルの<b>%s</b>を削除できなかった。 FTPFailedToRemoveDir=ディレクトリ<b>%s </b>の削除に失敗した:権限を確認し、ディレクトリが空であることを確認すること。 diff --git a/htdocs/langs/ja_JP/help.lang b/htdocs/langs/ja_JP/help.lang index 211b5fe6a6f..b6b9f5e69c0 100644 --- a/htdocs/langs/ja_JP/help.lang +++ b/htdocs/langs/ja_JP/help.lang @@ -1,23 +1,23 @@ # Dolibarr language file - Source file is en_US - help -CommunitySupport=フォーラム/ Wikiのサポート -EMailSupport=電子メールをサポート -RemoteControlSupport=オンラインリアルタイム/リモートサポート -OtherSupport=その他のサポート -ToSeeListOfAvailableRessources=利用可能なリソースに連絡する/表示するには: +CommunitySupport=フォーラム/ Wiki サポート +EMailSupport=メール サポート +RemoteControlSupport=オンライン 即時 / 遠隔 サポート +OtherSupport=その他 サポート +ToSeeListOfAvailableRessources=利用可能なリソースへの 連絡/表示: HelpCenter=ヘルプセンター -DolibarrHelpCenter=Dolibarr Help and Support Center -ToGoBackToDolibarr=Otherwise, <a href="%s">click here to continue to use Dolibarr</a>. -TypeOfSupport=Type of support -TypeSupportCommunauty=コミュニティ(無料) +DolibarrHelpCenter=Dolibarrヘルプとサポートセンター +ToGoBackToDolibarr=それ以外の場合、<a href="%s">ここをクリックしてDolibarrを引き続き使用</a> +TypeOfSupport=サポートの種類 +TypeSupportCommunauty=コミュニティ(無料) TypeSupportCommercial=コマーシャル TypeOfHelp=タイプ NeedHelpCenter=ヘルプやサポートが必要ですか? Efficiency=効率性 -TypeHelpOnly=唯一の助け -TypeHelpDev=+の開発を支援 -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): +TypeHelpOnly=ヘルプのみ +TypeHelpDev=ヘルプ+開発 +TypeHelpDevForm=ヘルプ+開発+トレーニング +BackToHelpCenter=それ以外の場合、<a href="%s">ヘルプセンターのホームページに戻る</a> +LinkToGoldMember=彼らのウィジェットをクリックすると(状態と最高価格は自動更新され)、Dolibarrによって事前選択されたトレーナーの1人と自分の言語 (%s) で電話できるよ。 PossibleLanguages=サポートされる言語 -SubscribeToFoundation=Help the Dolibarr project, subscribe to the foundation +SubscribeToFoundation=Dolibarrプロジェクトを支援し、財団に登録 SeeOfficalSupport=お使いの言語での公式Dolibarrサポート: <br><b><a href="%s" target="_blank">%s</a></b> diff --git a/htdocs/langs/ja_JP/holiday.lang b/htdocs/langs/ja_JP/holiday.lang index 72861294057..855d22d946f 100644 --- a/htdocs/langs/ja_JP/holiday.lang +++ b/htdocs/langs/ja_JP/holiday.lang @@ -94,7 +94,7 @@ ManualUpdate=手動更新 HolidaysCancelation=リクエストのキャンセルを残す EmployeeLastname=従業員の姓 EmployeeFirstname=従業員の名 -TypeWasDisabledOrRemoved=休暇タイプ(id %s)が無効化または削除された +TypeWasDisabledOrRemoved=休暇タイプ(id %s)が無効化または削除された LastHolidays=最新の%s休暇申請 AllHolidays=すべての休暇申請 HalfDay=半日 diff --git a/htdocs/langs/ja_JP/hrm.lang b/htdocs/langs/ja_JP/hrm.lang index 4b9b1edd9d3..a7be093eebe 100644 --- a/htdocs/langs/ja_JP/hrm.lang +++ b/htdocs/langs/ja_JP/hrm.lang @@ -16,4 +16,4 @@ DictionaryFunction=HRM - 職位 Employees=従業員s Employee=従業員 NewEmployee=新規従業員 -ListOfEmployees=List of employees +ListOfEmployees=従業員リスト diff --git a/htdocs/langs/ja_JP/install.lang b/htdocs/langs/ja_JP/install.lang index 72525b888a8..042be5d8fa0 100644 --- a/htdocs/langs/ja_JP/install.lang +++ b/htdocs/langs/ja_JP/install.lang @@ -4,7 +4,7 @@ MiscellaneousChecks=前提条件チェック ConfFileExists=コンフィギュレーションファイル<b>%sが</b>存在し<b>ている</b> 。 ConfFileDoesNotExistsAndCouldNotBeCreated=構成ファイル<b>%s </b>が存在せず、作成できなかった。 ConfFileCouldBeCreated=設定ファイルの<b>%sを</b>作成できる。 -ConfFileIsNotWritable=構成ファイル<b>%s</b>は書き込み可能ではありません。権限を確認すること。最初のインストールでは、Webサーバーが構成プロセス中にこのファイルに書き込める必要がある(たとえば、OSのようなUnixでは「chmod666」)。 +ConfFileIsNotWritable=構成ファイル<b>%s</b>は書き込み可能ではありません。権限を確認すること。最初のインストールでは、Webサーバーが構成プロセス中にこのファイルに書き込める必要がある(たとえば、OSのようなUnixでは「chmod666」)。 ConfFileIsWritable=コンフィギュレーションファイルの<b>%sは</b>書き込み可能。 ConfFileMustBeAFileNotADir=構成ファイル<b>%s </b>は、ディレクトリーではなくファイルでなければならない。 ConfFileReload=構成ファイルからパラメーターを再ロードする。 @@ -41,8 +41,8 @@ ConfigurationFile=設定ファイル WebPagesDirectory=ウェブページが保存されているディレクトリ DocumentsDirectory=アップロードし、生成されたドキュメントを格納するディレクトリ URLRoot=URLのルート -ForceHttps=力安全な接続(HTTPS) -CheckToForceHttps=セキュアな接続(https)を強制的にこのオプションをチェックすること。 <br>これは、WebサーバがSSL証明書を使用して構成されている必要がある。 +ForceHttps=力安全な接続(HTTPS) +CheckToForceHttps=セキュアな接続(https)を強制的にこのオプションをチェックすること。 <br>これは、WebサーバがSSL証明書を使用して構成されている必要がある。 DolibarrDatabase=Dolibarrデータベース DatabaseType=データベース種別 DriverType=ドライバ種別 @@ -61,8 +61,8 @@ CreateUser=Dolibarrデータベースでユーザアカウントを作成する DatabaseSuperUserAccess=データベースサーバ - スーパーユーザのアクセス CheckToCreateDatabase=データベースがまだ存在しないため、作成する必要がある場合は、チェックボックスをオンにする。 <br>この場合、このページの下部にスーパーユーザアカウントのユーザ名とパスワードも入力する必要がある。 CheckToCreateUser=次の場合にチェックボックスをオンにする。<br>データベースユーザアカウントがまだ存在しないため作成する必要がある場合、またはユーザアカウントは存在するがデータベースが存在せず、アクセス許可を付与する必要がある場合は<br>。 <br>この場合、このページの下部にユーザアカウントとパスワードを入力する必要があり、<b>も</b>スーパーユーザアカウント名とパスワードを入力する必要がある。このボックスがオフの場合、データベースの所有者とパスワードがすでに存在する必要がある。 -DatabaseRootLoginDescription=スーパーユーザアカウント名(新しいデータベースまたは新しいユーザを作成するため)。データベースまたはその所有者がまだ存在しない場合は必須。 -KeepEmptyIfNoPassword=スーパーユーザにパスワードがない場合は空のままにする(非推奨) +DatabaseRootLoginDescription=スーパーユーザアカウント名(新規データベースまたは新規ユーザを作成するため)。データベースまたはその所有者がまだ存在しない場合は必須。 +KeepEmptyIfNoPassword=スーパーユーザにパスワードがない場合は空のままにする(非推奨) SaveConfigurationFile=パラメータをに保存する ServerConnection=サーバーへの接続 DatabaseCreation=データベースの作成 @@ -80,14 +80,14 @@ PasswordsMismatch=パスワードが異なる。もう一度お試しくださ SetupEnd=設定の終了 SystemIsInstalled=このインストールは満了。 SystemIsUpgraded=Dolibarrが正常にアップグレードされている。 -YouNeedToPersonalizeSetup=あなたのニーズに合わせてDolibarrを設定する必要がある(外観、機能、...).これを行うには、下記のリンクをクリックすること。 +YouNeedToPersonalizeSetup=あなたのニーズに合わせてDolibarrを設定する必要がある(外観、機能、...).これを行うには、下記のリンクをクリックすること。 AdminLoginCreatedSuccessfuly=Dolibarr 管理者ログイン '<b>%s</b>' の作成が成功した。 GoToDolibarr=Dolibarrに行く -GoToSetupArea=Dolibarr(設定の領域)に移動する +GoToSetupArea=Dolibarr(設定の領域)に移動する MigrationNotFinished=データベースのバージョンが完全に最新ではありません。アップグレードプロセスを再実行すること。 GoToUpgradePage=アップグレードページへ再度行く WithNoSlashAtTheEnd=末尾のスラッシュ"/"なし -DirectoryRecommendation= <span class="warning">重要</span>:Webページの外部にあるディレクトリを使用する必要がある(したがって、前のパラメータのサブディレクトリは使用しないこと)。 +DirectoryRecommendation= <span class="warning">重要</span>:Webページの外部にあるディレクトリを使用する必要がある(したがって、前のパラメータのサブディレクトリは使用しないこと)。 LoginAlreadyExists=すでに存在する DolibarrAdminLogin=Dolibarr adminログイン AdminLoginAlreadyExists=Dolibarr管理者アカウント '<b> %s</b>'は既に存在する。別のものを作成したい場合は戻ってください。 @@ -95,14 +95,14 @@ FailedToCreateAdminLogin=Dolibarr管理者アカウントの作成に失敗し WarningRemoveInstallDir=警告、セキュリティ上の理由から、インストールまたはアップグレードが完了したら、インストールツールの偶発的/悪用を防ぐために、<b> install.lock</b>というファイルをDolibarrドキュメントディレクトリに追加する必要がある。 FunctionNotAvailableInThisPHP=このPHPでは使用できない ChoosedMigrateScript=移行スクリプトを選択する。 -DataMigration=データベースの移行(データ) -DatabaseMigration=データベースの移行(構造+一部のデータ) +DataMigration=データベースの移行(データ) +DatabaseMigration=データベースの移行(構造+一部のデータ) ProcessMigrateScript=スクリプト処理 ChooseYourSetupMode=設定モードを選択し、"スタート"をクリック... FreshInstall=新規インストール FreshInstallDesc=これが初めてのインストールである場合は、このモードを使用すること。そうでない場合、このモードは不完全な以前のインストールを修復できる。バージョンをアップグレードする場合は、「アップグレード」モードを選択すること。 Upgrade=アップグレード -UpgradeDesc=あなたが新しいバージョンのファイルが古いDolibarrファイルを交換した場合、このモードを使用する。これにより、データベースとデータをアップグレードする。 +UpgradeDesc=あなたが新規バージョンのファイルが古いDolibarrファイルを交換した場合、このモードを使用する。これにより、データベースとデータをアップグレードする。 Start=開始 InstallNotAllowed=設定では<b>、conf.php</b>の権限で許可されていない YouMustCreateWithPermission=あなたは、ファイル%sを作成し、インストールプロセス中にWebサーバのためにそれへの書き込み権限を設定する必要がある。 @@ -122,12 +122,12 @@ IfLoginDoesNotExistsCheckCreateUser=ユーザがまだ存在しない場合は ErrorConnection=サーバ "<b>%s</b>"、データベース名 "<b>%s</b>"、ログイン "<b>%s</b>"、またはデータベースパスワードが違う、またはPHPクライアントバージョンがデータベースバージョンのに対して古すぎる。 InstallChoiceRecommanded=あなたの現在のバージョンの<b>%s</b>からバージョン<b>%sを</b>インストールすることをお勧め選択肢 InstallChoiceSuggested=<b>インストーラによって提案されたインストール選択肢</b> 。 -MigrateIsDoneStepByStep=ターゲットバージョン(%s)には、いくつかのバージョンのギャップがある。これが完了すると、インストールウィザードが戻ってきて、さらに移行することを提案する。 +MigrateIsDoneStepByStep=ターゲットバージョン(%s)には、いくつかのバージョンのギャップがある。これが完了すると、インストールウィザードが戻ってきて、さらに移行することを提案する。 CheckThatDatabasenameIsCorrect=データベース名「<b>%s</b>」が正しいことを確認すること。 IfAlreadyExistsCheckOption=この名前が正しいこと、およびそのデータベースがまだ存在しない場合は、オプションの"データベースの作成"をチェックする必要がある。 OpenBaseDir=PHP openbasedirパラメータ -YouAskToCreateDatabaseSoRootRequired=「データベースの作成」ボックスをチェックした。このためには、スーパーユーザのログイン/パスワードを入力する必要がある(フォームの下部)。 -YouAskToCreateDatabaseUserSoRootRequired= "データベース所有者を作成する" チェックボックスをオンにした。このためには、スーパーユーザのログイン/パスワードを入力する必要がある(フォームの下部)。 +YouAskToCreateDatabaseSoRootRequired=「データベースの作成」ボックスをチェックした。このためには、スーパーユーザのログイン/パスワードを入力する必要がある(フォームの下部)。 +YouAskToCreateDatabaseUserSoRootRequired= "データベース所有者を作成する" チェックボックスをオンにした。このためには、スーパーユーザのログイン/パスワードを入力する必要がある(フォームの下部)。 NextStepMightLastALongTime=現在のステップには数分かかる場合がある。次の画面が完全に表示されるまで待ってから続行すること。 MigrationCustomerOrderShipping=販売受注保管庫のための出荷を移行 MigrationShippingDelivery=出荷の保管庫をアップグレード @@ -136,10 +136,10 @@ MigrationFinished=マイグレーションが終了した LastStepDesc= <strong>最後のステップ</strong>:Dolibarrへの接続に使用するログインとパスワードをここで定義する。 <b>他のすべての/追加のユーザアカウントを管理するためのマスターアカウントであるため、これをなくさないでください。 </b> ActivateModule=モジュール%sをアクティブにする ShowEditTechnicalParameters=高度なパラメータを表示/編集するには、ここをクリックすること (エキスパートモード) -WarningUpgrade=警告:\n最初にデータベースバックアップを実行したか?\nこれを強くお勧めする。このプロセス中にデータが失われる可能性があるため(たとえば、mysqlバージョン5.5.40 / 41/42/43のバグが原因)、移行を開始する前にデータベースの完全なダンプを取得することが不可欠。\n\n "OK" をクリックして移行プロセスを開始する... -ErrorDatabaseVersionForbiddenForMigration=データベースのバージョンは%s。重大なバグがあり、移行プロセスで必要になるなど、データベースに構造的な変更を加えるとデータが失われる可能性がある。彼の理由により、データベースをレイヤー(パッチ)バージョンにアップグレードするまで移行は許可されません(既知のバグのあるバージョンのリスト:%s) +WarningUpgrade=警告:\n最初にデータベースバックアップを実行したか?\nこれを強くお勧めする。このプロセス中にデータが失われる可能性があるため(たとえば、mysqlバージョン5.5.40 / 41/42/43のバグが原因)、移行を開始する前にデータベースの完全なダンプを取得することが不可欠。\n\n "OK" をクリックして移行プロセスを開始する... +ErrorDatabaseVersionForbiddenForMigration=データベースのバージョンは%s。重大なバグがあり、移行プロセスで必要になるなど、データベースに構造的な変更を加えるとデータが失われる可能性がある。彼の理由により、データベースをレイヤー(パッチ)バージョンにアップグレードするまで移行は許可されません(既知のバグのあるバージョンのリスト:%s) KeepDefaultValuesWamp=DoliWampのDolibarr設定ウィザードを使用したため、ここで提案されている値はすでに最適化されている。自分が何をするのかがわかっている場合にのみ、それらを変更すること。 -KeepDefaultValuesDeb=Linuxパッケージ(Ubuntu、Debian、Fedora ...)のDolibarr設定ウィザードを使用したため、ここで提案する値はすでに最適化されている。作成するデータベース所有者のパスワードのみを入力する必要がある。自分が何をするかがわかっている場合にのみ、他のパラメータを変更すること。 +KeepDefaultValuesDeb=Linuxパッケージ(Ubuntu、Debian、Fedora ...)のDolibarr設定ウィザードを使用したため、ここで提案する値はすでに最適化されている。作成するデータベース所有者のパスワードのみを入力する必要がある。自分が何をするかがわかっている場合にのみ、他のパラメータを変更すること。 KeepDefaultValuesMamp=DoliMampのDolibarr設定ウィザードを使用したため、ここで提案されている値はすでに最適化されている。自分が何をするのかがわかっている場合にのみ、それらを変更すること。 KeepDefaultValuesProxmox=Proxmox仮想アプライアンスからDolibarr設定ウィザードを使用したため、ここで提案されている値はすでに最適化されている。自分が何をするのかがわかっている場合にのみ、それらを変更すること。 UpgradeExternalModule=外部モジュールの専用アップグレードプロセスを実行する @@ -158,12 +158,12 @@ MigrationSuccessfullUpdate=成功したアップグレード MigrationUpdateFailed=失敗したアップグレード·プロセス MigrationRelationshipTables=関係テーブル (%s) のデータ移行 MigrationPaymentsUpdate=支払データ補正 -MigrationPaymentsNumberToUpdate=更新する%s支払い(秒) -MigrationProcessPaymentUpdate=更新の支払い(秒)%s +MigrationPaymentsNumberToUpdate=更新する%s支払い(秒) +MigrationProcessPaymentUpdate=更新の支払い(秒)%s MigrationPaymentsNothingToUpdate=これ以上実行すべきことはない MigrationPaymentsNothingUpdatable=訂正することができるこれ以上の支払いなし MigrationContractsUpdate=契約データの補正 -MigrationContractsNumberToUpdate=更新する%s契約(複数可) +MigrationContractsNumberToUpdate=更新する%s契約(複数可) MigrationContractsLineCreation=契約のref %sの契約回線を作成する。 MigrationContractsNothingToUpdate=これ以上実行すべきことsはない MigrationContractsFieldDontExist=フィールドfk_factureはもう存在しません。何もすることはありません。 @@ -172,7 +172,7 @@ MigrationContractsEmptyDatesUpdateSuccess=契約の空の日付の修正が正 MigrationContractsEmptyDatesNothingToUpdate=修正する契約空の日ない MigrationContractsEmptyCreationDatesNothingToUpdate=修正する契約作成日はない MigrationContractsInvalidDatesUpdate=不正な値の日付の契約補正 -MigrationContractsInvalidDateFix=正しい契約%s(契約日= %sの開始、サービス日分= %s) +MigrationContractsInvalidDateFix=正しい契約%s(契約日= %sの開始、サービス日分= %s) MigrationContractsInvalidDatesNumber=%s契約が変更された MigrationContractsInvalidDatesNothingToUpdate=修正するために不正な値を持つ日付なし MigrationContractsIncoherentCreationDateUpdate=不正な値契約の作成日付補正 @@ -203,14 +203,14 @@ MigrationRemiseExceptEntity=llx_societe_remise_except のエンティティフ MigrationUserRightsEntity=llx_user_rightsのエンティティフィールド値を更新する MigrationUserGroupRightsEntity=llx_usergroup_rightsのエンティティフィールド値を更新する MigrationUserPhotoPath=ユーザの写真パスの移行 -MigrationFieldsSocialNetworks=ユーザフィールドソーシャルネットワークの移行(%s) +MigrationFieldsSocialNetworks=ユーザフィールドソーシャルネットワークの移行(%s) MigrationReloadModule=モジュール %s を再読み込み MigrationResetBlockedLog=v7アルゴリズムのモジュールBlockedLogをリセット ShowNotAvailableOptions=利用できないオプションを表示する HideNotAvailableOptions=利用できないオプションを非表示にする ErrorFoundDuringMigration=移行プロセス中にエラーが報告されたため、次のステップは利用できない。エラーを無視するには、<a href="%s">ここをクリック</a>できるが、エラーが解決されるまで、アプリケーションまたは一部の機能が正しく動作しない場合がある。 -YouTryInstallDisabledByDirLock=アプリケーションは自己アップグレードを試みたが、インストール/アップグレードページはセキュリティのために無効になっている(ディレクトリの名前が.lockサフィックスに変更された)。 <br> -YouTryInstallDisabledByFileLock=アプリケーションは自己アップグレードを試みたが、インストール/アップグレードページはセキュリティのために無効になっている(dolibarrドキュメントディレクトリにロックファイル<strong> install.lock </strong>が存在するため)。 <br> +YouTryInstallDisabledByDirLock=アプリケーションは自己アップグレードを試みたが、インストール/アップグレードページはセキュリティのために無効になっている(ディレクトリの名前が.lockサフィックスに変更された)。 <br> +YouTryInstallDisabledByFileLock=アプリケーションは自己アップグレードを試みたが、インストール/アップグレードページはセキュリティのために無効になっている(dolibarrドキュメントディレクトリにロックファイル<strong> install.lock </strong>が存在するため)。 <br> ClickHereToGoToApp=アプリケーションに移動するには、ここをクリックすること ClickOnLinkOrRemoveManualy=アップグレードが進行中の場合は、しばらく待つこと。そうでない場合は、次のリンクをクリックすること。この同じページが常に表示される場合は、documentsディレクトリのinstall.lockファイルを削除/名前変更する必要がある。 Loaded=ロード済み diff --git a/htdocs/langs/ja_JP/interventions.lang b/htdocs/langs/ja_JP/interventions.lang index 745bd3844d9..07cf1cb44c7 100644 --- a/htdocs/langs/ja_JP/interventions.lang +++ b/htdocs/langs/ja_JP/interventions.lang @@ -42,15 +42,15 @@ DraftFichinter=ドラフト出張 LastModifiedInterventions=最新の%s修正された出張 FichinterToProcess=処理 ための出張 TypeContact_fichinter_external_CUSTOMER=フォローアップ顧客との接触 -PrintProductsOnFichinter=タイプ「製品」(サービスだけでなく)の行も出張カードに印刷 +PrintProductsOnFichinter=タイプ「製品」(サービスだけでなく)の行も出張カードに印刷 PrintProductsOnFichinterDetails=注文から生成された出張 UseServicesDurationOnFichinter=注文から生成された出張にサービス期間を使用 UseDurationOnFichinter=出張レコードの期間フィールドを非表示に UseDateWithoutHourOnFichinter=出張レコードの日付フィールドから時間と分を非表示に InterventionStatistics=出張の統計 NbOfinterventions=出張カードの数 -NumberOfInterventionsByMonth=月ごとの出張カードの数(検証日) -AmountOfInteventionNotIncludedByDefault=出張の量はデフォルトでは利益に含まれていない(ほとんどの場合、タイムシートは費やされた時間カウント のために使用される)。それらを含めるには、ホーム - 設定 - その他 にて、オプションPROJECT_INCLUDE_INTERVENTION_AMOUNT_IN_PROFITを1で追加。 +NumberOfInterventionsByMonth=月ごとの出張カードの数(検証日) +AmountOfInteventionNotIncludedByDefault=出張の量はデフォルトでは利益に含まれていない(ほとんどの場合、タイムシートは費やされた時間カウント のために使用される)。それらを含めるには、ホーム - 設定 - その他 にて、オプションPROJECT_INCLUDE_INTERVENTION_AMOUNT_IN_PROFITを1で追加。 InterId=出張ID InterRef=出張参照。 InterDateCreation=日付作成出張 diff --git a/htdocs/langs/ja_JP/intracommreport.lang b/htdocs/langs/ja_JP/intracommreport.lang index 43a43167347..5d9bdbc2a79 100644 --- a/htdocs/langs/ja_JP/intracommreport.lang +++ b/htdocs/langs/ja_JP/intracommreport.lang @@ -1,10 +1,10 @@ Module68000Name = Intracomm レポート -Module68000Desc = Intracomm レポート管理(フランス語のDEB / DES形式のサポート) +Module68000Desc = Intracomm レポート管理(フランス語のDEB / DES形式のサポート) IntracommReportSetup = Intracommreportモジュールのセットアップ IntracommReportAbout = Intracomm レポートについて # Setup -INTRACOMMREPORT_NUM_AGREMENT=Numérod'agrément(délivréparleCISD de rattachement) +INTRACOMMREPORT_NUM_AGREMENT=Numérod'agrément(délivréparleCISD de rattachement) INTRACOMMREPORT_TYPE_ACTEUR=Type d'acteur INTRACOMMREPORT_ROLE_ACTEUR=Rôlejouéparl'acteur INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION=Niveau d'obligation surlesの紹介 @@ -23,8 +23,8 @@ NewDeclaration=新規宣言 Declaration=宣言 AnalysisPeriod=分析期間 TypeOfDeclaration=宣言の種類 -DEB=商品交換申告(DEB) -DES=サービス交換宣言(DES) +DEB=商品交換申告(DEB) +DES=サービス交換宣言(DES) # Export page IntracommReportTitle=ProDouane形式のXMLファイルの準備 diff --git a/htdocs/langs/ja_JP/languages.lang b/htdocs/langs/ja_JP/languages.lang index 99d0e3d3fbb..1a4ab927428 100644 --- a/htdocs/langs/ja_JP/languages.lang +++ b/htdocs/langs/ja_JP/languages.lang @@ -1,11 +1,11 @@ # Dolibarr language file - Source file is en_US - languages Language_am_ET=エチオピア語 Language_ar_AR=アラビア語 -Language_ar_EG=アラビア語(エジプト) +Language_ar_EG=アラビア語(エジプト) Language_ar_SA=アラビア語 Language_az_AZ=アゼルバイジャン語 Language_bn_BD=ベンガル語 -Language_bn_IN=ベンガル語(インド) +Language_bn_IN=ベンガル語(インド) Language_bg_BG=ブルガリア語 Language_bs_BA=ボスニア語 Language_ca_ES=カタルにゃ語 @@ -21,11 +21,11 @@ Language_en_AU=英語 (オーストラリア) Language_en_CA=英語 (カナダ) Language_en_GB=英語 (イギリス) Language_en_IN=英語 (インド) -Language_en_NZ=英語(ニュージーランド) -Language_en_SA=英語(サウジアラビア) -Language_en_SG=英語(シンガポール) +Language_en_NZ=英語(ニュージーランド) +Language_en_SA=英語(サウジアラビア) +Language_en_SG=英語(シンガポール) Language_en_US=英語 (アメリカ) -Language_en_ZA=英語(南アフリカ) +Language_en_ZA=英語(南アフリカ) Language_es_ES=スペイン語 Language_es_AR=スペイン語 (アルゼンチン) Language_es_BO=スペイン語 (ボリビア) @@ -33,16 +33,16 @@ Language_es_CL=スペイン語 (チリ) Language_es_CO=スペイン語 (コロンビア) Language_es_DO=スペイン語 (ドミニカ共和国) Language_es_EC=スペイン語 (エクアドル) -Language_es_GT=スペイン語(グアテマラ) -Language_es_HN=スペイン語(ホンジュラス) -Language_es_MX=スペイン語(メキシコ) +Language_es_GT=スペイン語(グアテマラ) +Language_es_HN=スペイン語(ホンジュラス) +Language_es_MX=スペイン語(メキシコ) Language_es_PA=スペイン語 (パナマ) -Language_es_PY=スペイン語(パラグアイ) -Language_es_PE=スペイン語(ペルー) -Language_es_PR=スペイン語(プエルトリコ) -Language_es_US=Spanish (USA) -Language_es_UY=スペイン語(ウルグアイ) -Language_es_GT=スペイン語(グアテマラ) +Language_es_PY=スペイン語(パラグアイ) +Language_es_PE=スペイン語(ペルー) +Language_es_PR=スペイン語(プエルトリコ) +Language_es_US=スペイン語(USA) +Language_es_UY=スペイン語(ウルグアイ) +Language_es_GT=スペイン語(グアテマラ) Language_es_VE=スペイン語 (ベネズエラ) Language_et_EE=エストニア語 Language_eu_ES=バスク語 @@ -51,22 +51,22 @@ Language_fi_FI=フィンランド語 Language_fr_BE=フランス語 (ベルギー) Language_fr_CA=フランス語 (カナダ) Language_fr_CH=フランス語 (スイス) -Language_fr_CI=フランス語(コートジボワール) -Language_fr_CM=フランス語(カメルーン) +Language_fr_CI=フランス語(コートジボワール) +Language_fr_CM=フランス語(カメルーン) Language_fr_FR=フランス語 -Language_fr_GA=フランス語(ガボン) -Language_fr_NC=フランス(ニューカレドニア) -Language_fr_SN=フランス語(セネガル) +Language_fr_GA=フランス語(ガボン) +Language_fr_NC=フランス(ニューカレドニア) +Language_fr_SN=フランス語(セネガル) Language_fy_NL=フリジア語 Language_gl_ES=ガリシア語 Language_he_IL=ヘブライ語の -Language_hi_IN=ヒンディー語(インド) +Language_hi_IN=ヒンディー語(インド) Language_hr_HR=クロアチア語 Language_hu_HU=ハンガリー語 Language_id_ID=インドネシア語 Language_is_IS=アイスランド語 Language_it_IT=イタリア語 -Language_it_CH=イタリア語(スイス) +Language_it_CH=イタリア語(スイス) Language_ja_JP=日本語 Language_ka_GE=ジョージア語 Language_km_KH=クメール語 @@ -86,7 +86,7 @@ Language_pt_BR=ポルトガル語 (ブラジル) Language_pt_PT=ポルトガル語 Language_ro_RO=ルーマニア語 Language_ru_RU=ロシア語 -Language_ru_UA=ロシア語(ウクライナ) +Language_ru_UA=ロシア語(ウクライナ) Language_tr_TR=トルコ語 Language_sl_SI=スロベニア語 Language_sv_SV=スウエーデん語 @@ -100,6 +100,6 @@ Language_uk_UA=ウクライナ語 Language_uz_UZ=ウズベク語 Language_vi_VN=ベトナム語 Language_zh_CN=中国語 -Language_zh_TW=中国語(繁体字) -Language_zh_HK=中国語(香港) +Language_zh_TW=中国語(繁体字) +Language_zh_HK=中国語(香港) Language_bh_MY=マレー語 diff --git a/htdocs/langs/ja_JP/loan.lang b/htdocs/langs/ja_JP/loan.lang index a0a77be01d9..7b09bf4ef54 100644 --- a/htdocs/langs/ja_JP/loan.lang +++ b/htdocs/langs/ja_JP/loan.lang @@ -1,7 +1,7 @@ # Dolibarr language file - Source file is en_US - loan Loan=ローン Loans=ローン -NewLoan=新しいローン +NewLoan=新規ローン ShowLoan=ローンを表示 PaymentLoan=ローンの支払 LoanPayment=ローンの支払 diff --git a/htdocs/langs/ja_JP/mailmanspip.lang b/htdocs/langs/ja_JP/mailmanspip.lang index de0737ba233..73e9bc5462b 100644 --- a/htdocs/langs/ja_JP/mailmanspip.lang +++ b/htdocs/langs/ja_JP/mailmanspip.lang @@ -10,7 +10,7 @@ SynchroSpipEnabled=Spipの更新が実行される DescADHERENT_MAILMAN_ADMINPW=Mailman管理者パスワード DescADHERENT_MAILMAN_URL=MailmanサブスクリプションのURL DescADHERENT_MAILMAN_UNSUB_URL=Mailmanのサブスクリプション解除のURL -DescADHERENT_MAILMAN_LISTS=新規メンバーの自動登録用のリスト(s)(コンマで区切る) +DescADHERENT_MAILMAN_LISTS=新規メンバーの自動登録用のリスト(s)(コンマで区切る) SPIPTitle=SPIPコンテンツ管理システム DescADHERENT_SPIP_SERVEUR=SPIPサーバー DescADHERENT_SPIP_DB=SPIPデータベース名 diff --git a/htdocs/langs/ja_JP/mails.lang b/htdocs/langs/ja_JP/mails.lang index 0a8693bb1be..ac80df8e0b0 100644 --- a/htdocs/langs/ja_JP/mails.lang +++ b/htdocs/langs/ja_JP/mails.lang @@ -10,7 +10,7 @@ MailTitle=説明 MailFrom=送信者 MailErrorsTo=エラーへ MailReply=に返信 -MailTo=受信者(単数または複数) +MailTo=受信者(単数または複数) MailToUsers=ユーザ(s)へ MailCC=にコピー MailToCCUsers=ユーザs(s)にコピーする @@ -23,7 +23,7 @@ SubjectNotIn=件名にない BodyNotIn=体にない ShowEMailing=電子メールで表示 ListOfEMailings=emailingsのリスト -NewMailing=新しいメール送信 +NewMailing=新規メール送信 EditMailing=電子メールで編集 ResetMailing=電子メールで送信する再送 DeleteMailing=電子メールで送信する削除 @@ -39,20 +39,20 @@ MailingStatusSentPartialy=部分的に送信 MailingStatusSentCompletely=完全に送信 MailingStatusError=エラーが発生 MailingStatusNotSent=送信されない -MailSuccessfulySent=電子メール(%sから%sへ)の配信が正常に受け入れられた +MailSuccessfulySent=電子メール(%sから%sへ)の配信が正常に受け入れられた MailingSuccessfullyValidated=Eメールは正常に検証された MailUnsubcribe=登録を解除する MailingStatusNotContact=もう連絡しないこと MailingStatusReadAndUnsubscribe=読んで購読を解除する ErrorMailRecipientIsEmpty=電子メールの受信者は空 -WarningNoEMailsAdded=受信者のリストに追加するない新しい電子メール。 +WarningNoEMailsAdded=受信者のリストに追加するない新規電子メール。 ConfirmValidMailing=このメールを検証してもよいか? ConfirmResetMailing=警告、電子メール<b> %s </b>を再初期化することにより、この電子メールを一括メールで再送信できるようになる。これを実行してもよいか? ConfirmDeleteMailing=このメールを削除してもよいか? NbOfUniqueEMails=固有のメールの数 NbOfEMails=メールの数 TotalNbOfDistinctRecipients=異なる受信者の数 -NoTargetYet=受信者が(タブ '受信'に行く)はまだ定義されていない +NoTargetYet=受信者が(タブ '受信'に行く)はまだ定義されていない NoRecipientEmail=%sの受信者メールがない RemoveRecipient=受信者を削除する YouCanAddYourOwnPredefindedListHere=メールセレクタモジュールを作成するには、htdocsには、/ /モジュール/郵送/ READMEを含む参照すること。 @@ -72,10 +72,10 @@ ActivateCheckReadKey=「開封確認」および「退会」機能に使用さ EMailSentToNRecipients=%s受信者に送信される電子メール。 EMailSentForNElements=%s要素に対して送信された電子メール。 XTargetsAdded= <b> %s</b>受信者がターゲットリストに追加された -OnlyPDFattachmentSupported=送信するオブジェクトのPDFドキュメントがすでに生成されている場合は、電子メールに添付される。そうでない場合、電子メールは送信されない(また、このバージョンでは、大量送信の添付ファイルとしてPDFドキュメントのみがサポートされていることに注意すること)。 -AllRecipientSelected=選択された%sレコードの受信者(電子メールがわかっている場合)。 +OnlyPDFattachmentSupported=送信するオブジェクトのPDFドキュメントがすでに生成されている場合は、電子メールに添付される。そうでない場合、電子メールは送信されない(また、このバージョンでは、大量送信の添付ファイルとしてPDFドキュメントのみがサポートされていることに注意すること)。 +AllRecipientSelected=選択された%sレコードの受信者(電子メールがわかっている場合)。 GroupEmails=グループメール -OneEmailPerRecipient=受信者ごとに1つの電子メール(デフォルトでは、選択されたレコードごとに1つの電子メール) +OneEmailPerRecipient=受信者ごとに1つの電子メール(デフォルトでは、選択されたレコードごとに1つの電子メール) WarningIfYouCheckOneRecipientPerEmail=警告、このチェックボックスをオンにすると、選択した複数の異なるレコードに対して1つのメールのみが送信されるため、メッセージにレコードのデータを参照する置換変数が含まれている場合、それらを置き換えることはできなくなる。 ResultOfMailSending=大量のメール送信の結果 NbSelected=選択した番号 @@ -83,15 +83,16 @@ NbIgnored=無視された数 NbSent=送信番号 SentXXXmessages=%sメッセージ(s)が送信された。 ConfirmUnvalidateEmailing=メール<b>%s </b>をドラフトステータスに変更してもよいか? -MailingModuleDescContactsWithThirdpartyFilter=顧客フィルターとの接触 +MailingModuleDescContactsWithThirdpartyFilter=顧客フィルタとの接触 MailingModuleDescContactsByCompanyCategory=サードパーティカテゴリ別の連絡先 MailingModuleDescContactsByCategory=カテゴリ別の連絡先 MailingModuleDescContactsByFunction=位置別の連絡先 MailingModuleDescEmailsFromFile=ファイルからのメール MailingModuleDescEmailsFromUser=ユーザが入力したメール MailingModuleDescDolibarrUsers=メールを持っているユーザ -MailingModuleDescThirdPartiesByCategories=サードパーティ(カテゴリ別) +MailingModuleDescThirdPartiesByCategories=サードパーティ(カテゴリ別) SendingFromWebInterfaceIsNotAllowed=Webインターフェイスからの送信は許可されていない。 +EmailCollectorFilterDesc=メールを取得するには、すべてのフィルタが適合している必要がある # Libelle des modules de liste de destinataires mailing LineInFile=ファイル内の行%s @@ -121,7 +122,7 @@ TagCheckMail=メールの開封を追跡する TagUnsubscribe=退会リンク TagSignature=送信ユーザの署名 EMailRecipient=受信者のEメール -TagMailtoEmail=受信者の電子メール(html「mailto:」リンクを含む) +TagMailtoEmail=受信者の電子メール(html「mailto:」リンクを含む) NoEmailSentBadSenderOrRecipientEmail=メールは送信されない。送信者または受信者の電子メールが正しくない。ユーザプロファイルを確認する。 # Module Notifications Notifications=通知 @@ -129,19 +130,19 @@ NotificationsAuto=通知自動。 NoNotificationsWillBeSent=このイベントタイプと法人では、自動電子メール通知は計画されていない ANotificationsWillBeSent=1つの自動通知が電子メールで送信される SomeNotificationsWillBeSent=%s自動通知は電子メールで送信される -AddNewNotification=新しい自動電子メール通知ターゲット/イベントをアクティブ化する -ListOfActiveNotifications=自動電子メール通知のすべてのアクティブなターゲット/イベントを一覧表示する +AddNewNotification=新規自動電子メール通知を購読する(ターゲット/イベント) +ListOfActiveNotifications=自動電子メール通知のすべてのアクティブなサブスクリプション(ターゲット/イベント)を一覧表示する ListOfNotificationsDone=送信されたすべての自動電子メール通知を一覧表示する MailSendSetupIs=電子メール送信の構成は「%s」に設定されている。このモードは、大量の電子メールを送信するために使用することはできない。 MailSendSetupIs2=モード'%s'を使うには、まず、管理者アカウントを使用して、メニュー%sホーム - 設定 - メール %sに移動し、パラメーター<strong>'%s '</strong>を変更する。このモードでは、インターネットサービスプロバイダーが提供するSMTPサーバーの設定に入り、大量電子メールの機能を使用できる。 MailSendSetupIs3=SMTPサーバーの設定方法について質問がある場合は、%sに問い合わせることができる。 -YouCanAlsoUseSupervisorKeyword=キーワード<strong>__SUPERVISOREMAIL__ </strong>を追加して、ユーザのスーパーバイザーに電子メールを送信することもできる(このスーパーバイザーに電子メールが定義されている場合にのみ機能する)。 +YouCanAlsoUseSupervisorKeyword=キーワード<strong>__SUPERVISOREMAIL__ </strong>を追加して、ユーザのスーパーバイザーに電子メールを送信することもできる(このスーパーバイザーに電子メールが定義されている場合にのみ機能する)。 NbOfTargetedContacts=対象となる連絡先メールの現在の数 UseFormatFileEmailToTarget=インポートされたファイルの形式は<strong>email; name; firstname; other</strong>である必要がある UseFormatInputEmailToTarget=<strong> email; name; firstname; other</strong>の形式で文字列を入力する -MailAdvTargetRecipients=受信者(高度な選択) +MailAdvTargetRecipients=受信者(高度な選択) AdvTgtTitle=入力フィールドに入力して、ターゲットとするサードパーティまたは連絡先/アドレスを事前に選択する -AdvTgtSearchTextHelp=ワイルドカードとして%%を使用する。たとえば、<b> jean、joe、jim </b>などのすべてのアイテムを検索するには、<b> j%% </b>と入力し、;を使用することもできる。値の区切り文字として使用し、!を使用する。この値を除いて。たとえば、<b> jean; joe; jim%%;!jimo;!jima%%</b>は、すべてのjean、joe、jimで始まりますが、jimoではなく、jimaで始まるすべてのものではない。 +AdvTgtSearchTextHelp=ワイルドカードとして %% を使用。たとえば、<b>jean, joe, jim</b> のような全アイテムを探すには、 <b>j%%</b> を入力、値の区切り文字として ; を使用し、値の除外として ! を使用できる。たとえば <b>jean;joe;jim%%;!jimo;!jima%%</b> なら、すべての jean, joe と jim で始まる文字列の内で jimo でないものと jima で始まるものを除外したすべてを意味する。 AdvTgtSearchIntHelp=間隔を使用してintまたはfloat値を選択する AdvTgtMinVal=最小値 AdvTgtMaxVal=最大値 @@ -156,21 +157,23 @@ RemoveAll=すべて削除する ItemsCount=アイテム(s) AdvTgtNameTemplate=フィルタ名 AdvTgtAddContact=基準に従ってメールを追加する -AdvTgtLoadFilter=ロードフィルター +AdvTgtLoadFilter=ロードフィルタ AdvTgtDeleteFilter=フィルタを削除する AdvTgtSaveFilter=フィルタを保存 AdvTgtCreateFilter=フィルタを作成する -AdvTgtOrCreateNewFilter=新しいフィルターの名前 +AdvTgtOrCreateNewFilter=新規フィルタの名前 NoContactWithCategoryFound=カテゴリの連絡先/住所が見つからない NoContactLinkedToThirdpartieWithCategoryFound=カテゴリの連絡先/住所が見つからない OutGoingEmailSetup=送信メール InGoingEmailSetup=受信メール -OutGoingEmailSetupForEmailing=送信メール(モジュール%sの場合) +OutGoingEmailSetupForEmailing=送信メール(モジュール%sの場合) DefaultOutgoingEmailSetup=グローバルな送信メール設定と同じ構成 Information=情報 -ContactsWithThirdpartyFilter=サードパーティのフィルターを使用した連絡先 +ContactsWithThirdpartyFilter=サードパーティのフィルタを使用した連絡先 Unanswered=未回答 Answered=答えた -IsNotAnAnswer=回答でない(最初のメール) +IsNotAnAnswer=回答でない(最初のメール) IsAnAnswer=最初のメールの回答 RecordCreatedByEmailCollector=電子メールコレクター%sによって電子メール%sから作成されたレコード +DefaultBlacklistMailingStatus=一括メール送信を拒否するためのデフォルトの連絡先ステータス +DefaultStatusEmptyMandatory=空だが必須 diff --git a/htdocs/langs/ja_JP/main.lang b/htdocs/langs/ja_JP/main.lang index 3612332cbff..ef5a5e7ff91 100644 --- a/htdocs/langs/ja_JP/main.lang +++ b/htdocs/langs/ja_JP/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=このメールタイプには適用可能なテンプレー AvailableVariables=適用可能な代替変数s NoTranslation=翻訳無し Translation=翻訳 +CurrentTimeZone=PHP(サーバー)のタイムゾーン EmptySearchString=空文字以外の検索候補を入力 +EnterADateCriteria=日付基準を入力する NoRecordFound=発見レコードは無し NoRecordDeleted=削除レコードは無し NotEnoughDataYet=データが不十分 @@ -83,8 +85,10 @@ FileTransferComplete=ファイルが正常にアップロードされました FilesDeleted=ファイルが正常に削除されました FileWasNotUploaded=ファイルが添付ファイルが選択されているが、まだアップロードされませんでした。このために &quot;添付ファイル&quot;をクリックしてください。 NbOfEntries=エントリー番号 -GoToWikiHelpPage=オンラインヘルプを読む(インターネットアクセスが必要) +GoToWikiHelpPage=オンラインヘルプを読む(インターネットアクセスが必要) GoToHelpPage=ヘルプを見る +DedicatedPageAvailable=現在の画面に関連する専用のヘルプページがある +HomePage=ホームページ RecordSaved=レコード保存 RecordDeleted=レコード削除 RecordGenerated=レコード生成 @@ -110,13 +114,13 @@ ReturnCodeLastAccessInError=最新のデータベースアクセス要求エラ InformationLastAccessInError=最新のデータベースアクセス要求エラーに関する情報 DolibarrHasDetectedError=Dolibarrで技術的なエラーを検出 YouCanSetOptionDolibarrMainProdToZero=詳細については、ログファイルを読み取るか、構成ファイルでオプション$ dolibarr_main_prodを「0」に設定してください。 -InformationToHelpDiagnose=この情報は診断目的に役立ちます(オプション$ dolibarr_main_prodを「1」に設定してそのような通知を削除できます) +InformationToHelpDiagnose=この情報は診断目的に役立ちます(オプション$ dolibarr_main_prodを「1」に設定してそのような通知を削除できます) MoreInformation=もっと知りたい TechnicalInformation=技術的情報 TechnicalID=技術ID LineID=行ID -NotePublic=注(パブリック) -NotePrivate=(注)(プライベート) +NotePublic=注(パブリック) +NotePrivate=(注)(プライベート) PrecisionUnitIsLimitedToXDecimals=Dolibarrの設定により、単価の精度は小数点以下<b>%s</b>桁。 DoTest=テスト ToFilter=フィルタ @@ -218,8 +222,9 @@ Parameter=パラメーター Parameters=パラメータ Value=値 PersonalValue=個人的価値 -NewObject=新しい%s -NewValue=新しい値 +NewObject=新規%s +NewValue=新規値 +OldValue=古い値%s CurrentValue=電流値 Code=コー​​ド Type=タイプ @@ -258,7 +263,7 @@ Cards=カード Card=カード Now=現在 HourStart=開始時間 -Deadline=Deadline +Deadline=締切 Date=日付 DateAndHour=日付と時間 DateToday=今日の日付 @@ -267,10 +272,10 @@ DateStart=開始日 DateEnd=終了日 DateCreation=作成日 DateCreationShort=クリート。日付 -IPCreation=Creation IP +IPCreation=作成IP DateModification=変更日 DateModificationShort=MODIF。日付 -IPModification=Modification IP +IPModification=変更IP DateLastModification=最新の変更日 DateValidation=検証日 DateClosing=日付を閉じる @@ -285,7 +290,7 @@ DateProcess=処理日 DateBuild=日付をビルドレポート DatePayment=支払日 DateApprove=承認日 -DateApprove2=承認日(2回目の承認) +DateApprove2=承認日(2回目の承認) RegistrationDate=登録日 UserCreation=作成ユーザー UserModification=変更ユーザー @@ -347,33 +352,33 @@ Copy=コピー Paste=貼り付ける Default=デフォルト DefaultValue=デフォルト値 -DefaultValues=デフォルト値/フィルター/ソート +DefaultValues=デフォルト値/フィルタ/ソート Price=価格 -PriceCurrency=価格(通貨) +PriceCurrency=価格(通貨) UnitPrice=単価 -UnitPriceHT=単価(除く) -UnitPriceHTCurrency=単価(除く)(通貨) +UnitPriceHT=単価(除く) +UnitPriceHTCurrency=単価(除く)(通貨) UnitPriceTTC=単価 PriceU=UP -PriceUHT=UP(純額) -PriceUHTCurrency=U.P(通貨) -PriceUTTC=アップ。 (税込) +PriceUHT=UP(純額) +PriceUHTCurrency=U.P(通貨) +PriceUTTC=アップ。 (税込) Amount=量 AmountInvoice=請求額 AmountInvoiced=請求額 -AmountInvoicedHT=請求額(税抜) -AmountInvoicedTTC=請求額(税込) +AmountInvoicedHT=請求額(税抜) +AmountInvoicedTTC=請求額(税込) AmountPayment=支払金額 -AmountHTShort=金額(除く) -AmountTTCShort=金額(税込) -AmountHT=金額(税込) -AmountTTC=金額(税込) +AmountHTShort=金額(除く) +AmountTTCShort=金額(税込) +AmountHT=金額(税込) +AmountTTC=金額(税込) AmountVAT=金額税 MulticurrencyAlreadyPaid=すでに支払われた元の通貨 MulticurrencyRemainderToPay=元の通貨で支払いを続ける MulticurrencyPaymentAmount=お支払い金額、元の通貨 -MulticurrencyAmountHT=金額(税抜き)、元の通貨 -MulticurrencyAmountTTC=金額(税込み)、元の通貨 +MulticurrencyAmountHT=金額(税抜き)、元の通貨 +MulticurrencyAmountTTC=金額(税込み)、元の通貨 MulticurrencyAmountVAT=金額税、元の通貨 MulticurrencySubPrice=サブプライス多通貨の金額 AmountLT1=税額2 @@ -382,20 +387,20 @@ AmountLT1ES=量RE AmountLT2ES=量IRPF AmountTotal=合計金額 AmountAverage=平均額 -PriceQtyMinHT=価格数量最小(税抜) -PriceQtyMinHTCurrency=価格数量最小(税抜き)(通貨) +PriceQtyMinHT=価格数量最小(税抜) +PriceQtyMinHTCurrency=価格数量最小(税抜き)(通貨) Percentage=割合 Total=合計 SubTotal=小計 -TotalHTShort=合計(除く) -TotalHT100Short=合計100%%(除く) -TotalHTShortCurrency=合計(通貨を除く) -TotalTTCShort=合計(税込) -TotalHT=合計(税込) -TotalHTforthispage=このページの合計(税抜き) +TotalHTShort=合計(除く) +TotalHT100Short=合計100%%(除く) +TotalHTShortCurrency=合計(通貨を除く) +TotalTTCShort=合計(税込) +TotalHT=合計(税込) +TotalHTforthispage=このページの合計(税抜き) Totalforthispage=このページの合計 -TotalTTC=合計(税込) -TotalTTCToYourCredit=あなたのクレジットの合計(税込) +TotalTTC=合計(税込) +TotalTTCToYourCredit=あなたのクレジットの合計(税込) TotalVAT=合計税 TotalVATIN=合計IGST TotalLT1=総税2 @@ -433,6 +438,7 @@ RemainToPay=支払いを続ける Module=モジュール/アプリケーション Modules=モジュール/アプリケーション Option=オプション +Filters=フィルタ List=リスト FullList=全リスト FullConversation=完全な会話 @@ -506,7 +512,7 @@ Quantity=量 Qty=個数 ChangedBy=によって変更され ApprovedBy=によって承認された -ApprovedBy2=承認者(2回目の承認) +ApprovedBy2=承認者(2回目の承認) Approved=承認された Refused=拒否 ReCalculate=再計算 @@ -650,6 +656,7 @@ SupplierPreview=ベンダープレビュー ShowCustomerPreview=顧客のプレビューを表示する ShowSupplierPreview=ベンダープレビューを表示 RefCustomer=顧客参照符号 +InternalRef=内部参照 Currency=通貨 InfoAdmin=管理者向け情報 Undo=元に戻す @@ -671,7 +678,7 @@ SendMail=メールを送る Email=Eメール NoEMail=まだメールしない AlreadyRead=すでに読んだ -NotRead=読んでいません +NotRead=未読 NoMobilePhone=携帯電話はありません Owner=所有者 FollowingConstantsWillBeSubstituted=以下の定数は、対応する値を持つ代替となります。 @@ -705,7 +712,7 @@ NeverReceived=受信しませんでした Canceled=キャンセル YouCanChangeValuesForThisListFromDictionarySetup=このリストの値は、メニューの[設定]-[辞書]から変更できます。 YouCanChangeValuesForThisListFrom=このリストの値は、メニュー%sから変更できます。 -YouCanSetDefaultValueInModuleSetup=モジュール設定で新しいレコードを作成するときに使用されるデフォルト値を設定できます +YouCanSetDefaultValueInModuleSetup=モジュール設定で新規レコードを作成するときに使用されるデフォルト値を設定できます Color=カラー Documents=リンクされたファイル Documents2=ドキュメント @@ -716,7 +723,7 @@ MenuAWStats=AWStatsは MenuMembers=メンバー MenuAgendaGoogle=Googleの議題 MenuTaxesAndSpecialExpenses=税金|特別経費 -ThisLimitIsDefinedInSetup=Dolibarr制限(メニューホームセットアップ·セキュリティ):%s KB、PHP制限:%s KB +ThisLimitIsDefinedInSetup=Dolibarr制限(メニューホームセットアップ·セキュリティ):%s KB、PHP制限:%s KB NoFileFound=このディレクトリに保存されない文書ません CurrentUserLanguage=現在の言語 CurrentTheme=現在のテーマ @@ -732,11 +739,11 @@ DateOfSignature=署名日 HidePassword=隠されたパスワードを使用してコマンドを表示する UnHidePassword=明確なパスワードを使用して実際のコマンドを表示する Root=ルート -RootOfMedias=パブリックメディアのルート(/ medias) +RootOfMedias=パブリックメディアのルート(/ medias) Informations=情報 Page=ページ Notes=注釈 -AddNewLine=新しい行を追加します。 +AddNewLine=新規行を追加します。 AddFile=ファイルを追加します。 FreeZone=フリーテキスト製品 FreeLineOfType=フリーテキストアイテム、タイプ: @@ -755,7 +762,7 @@ ValidatePayment=支払いを検証する CreditOrDebitCard=クレジットカードまたはデビットカード FieldsWithAreMandatory=<b>%s</b>のフィールドは必須です FieldsWithIsForPublic=<b> %s </b>のフィールドは、メンバーの公開リストに表示されます。これを望まない場合は、「公開」ボックスのチェックを外してください。 -AccordingToGeoIPDatabase=(GeoIP変換による) +AccordingToGeoIPDatabase=(GeoIP変換による) Line=ライン NotSupported=サポートされていません RequiredField=必須フィールド @@ -775,7 +782,7 @@ After=後の IPAddress=IPアドレス Frequency=周波数 IM=インスタントメッセージ -NewAttribute=新しい属性 +NewAttribute=新規属性 AttributeCode=属性コード URLPhoto=写真/ロゴのURL SetLinkToAnotherThirdParty=別の第三者へのリンク @@ -823,7 +830,7 @@ Access=アクセス SelectAction=アクションを選択 SelectTargetUser=ターゲットユーザー/従業員を選択します HelpCopyToClipboard=Ctrl + Cを使用してクリップボードにコピーします -SaveUploadedFileWithMask=「<strong>%s</strong>」(それ以外の場合は「%s」)という名前でファイルをサーバーに保存します +SaveUploadedFileWithMask=「<strong>%s</strong>」(それ以外の場合は「%s」)という名前でファイルをサーバーに保存します OriginFileName=元のファイル名 SetDemandReason=ソースを設定 SetBankAccount=銀行口座を定義する @@ -857,7 +864,7 @@ Sincerely=心から ConfirmDeleteObject=このオブジェクトを削除してもよろしいですか? DeleteLine=行を削除 ConfirmDeleteLine=この行を削除してもよろしいですか? -ErrorPDFTkOutputFileNotFound=エラー:ファイルは生成されませんでした。 'pdftk'コマンドが$ PATH環境変数(linux / unixのみ)に含まれるディレクトリーにインストールされていることを確認するか、システム管理者に連絡してください。 +ErrorPDFTkOutputFileNotFound=エラー:ファイルは生成されませんでした。 'pdftk'コマンドが$ PATH環境変数(linux / unixのみ)に含まれるディレクトリーにインストールされていることを確認するか、システム管理者に連絡してください。 NoPDFAvailableForDocGenAmongChecked=チェックされたレコードの中でドキュメント生成に使用できるPDFがありませんでした TooManyRecordForMassAction=マスアクション用に選択されたレコードが多すぎます。アクションは、%sレコードのリストに制限されています。 NoRecordSelected=レコードが選択されていません @@ -892,8 +899,8 @@ 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=直接ダウンロードリンク(公開/外部) +DirectDownloadInternalLink=直接ダウンロードリンク(ログに記録する必要があり、権限が必要です) Download=ダウンロード DownloadDocument=ドキュメントをダウンロード ActualizeCurrency=為替レートを更新する @@ -924,7 +931,7 @@ Lead=鉛 Leads=リード ListOpenLeads=オープンリードのリスト ListOpenProjects=開いているプロジェクトを一覧表示する -NewLeadOrProject=新しいリードまたはプロジェクト +NewLeadOrProject=新規リードまたはプロジェクト Rights=パーミッション LineNb=行番号 IncotermLabel=インコタームズ @@ -998,7 +1005,7 @@ Select2NotFound=結果が見つかりません 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> +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=より多くの結果を読み込んでいます... Select2SearchInProgress=進行中の検索... SearchIntoThirdparties=サードパーティ @@ -1106,4 +1113,10 @@ SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry=セキュリティト UpToDate=最新の OutOfDate=時代遅れ EventReminder=イベントリマインダー -UpdateForAllLines=Update for all lines +UpdateForAllLines=すべての行を更新 +OnHold=保留 +Civility=敬称 +AffectTag=タグに影響を与える +ConfirmAffectTag=バルクタグの影響 +ConfirmAffectTagQuestion=選択した%sレコード(s)のタグに影響を与えてもよいか? +CategTypeNotFound=レコードのタイプのタグタイプが見つからない diff --git a/htdocs/langs/ja_JP/margins.lang b/htdocs/langs/ja_JP/margins.lang index e2cda1b797d..ab5f6299a45 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=購入/原価が定義されておらず、このオプションが「オン」の場合、利益はオンラインでゼロになる(購入/原価=販売価格)。それ以外の場合(「オフ」)、利益は提案されたデフォルトと等しくなる。 MARGIN_METHODE_FOR_DISCOUNT=グローバル割引の利益方式 UseDiscountAsProduct=製品として UseDiscountAsService=サービスとして @@ -30,16 +30,16 @@ UseDiscountOnTotal=小計について MARGIN_METHODE_FOR_DISCOUNT_DETAILS=グローバル割引を製品、サービスとして扱うか、利益計算の小計としてのみ扱うかを定義する。 MARGIN_TYPE=利益計算のためにデフォルトで提案された購入/原価 MargeType1=最高のベンダー価格の利益 -MargeType2=加重平均価格(WAP)の利益 +MargeType2=加重平均価格(WAP)の利益 MargeType3=原価利益 -MarginTypeDesc=*ベストバイイング価格の利益=販売価格-製品カードで定義されたベストベンダー価格<br> *加重平均価格(WAP)の利益=販売価格-製品加重平均価格(WAP)またはWAPがまだ定義されていない場合のベストベンダー価格<br> *利益onコスト価格=販売価格-コスト価格が定義されていない場合は製品カードまたはWAPで定義されたコスト価格、またはWAPがまだ定義されていない場合は最良のベンダー価格 +MarginTypeDesc=*ベストバイイング価格の利益=販売価格-製品カードで定義されたベストベンダー価格<br> *加重平均価格(WAP)の利益=販売価格-製品加重平均価格(WAP)またはWAPがまだ定義されていない場合のベストベンダー価格<br> *利益onコスト価格=販売価格-コスト価格が定義されていない場合は製品カードまたはWAPで定義されたコスト価格、またはWAPがまだ定義されていない場合は最良のベンダー価格 CostPrice=原価 UnitCharges=ユニット料金 Charges=料金 AgentContactType=商業代理店の連絡先タイプ -AgentContactTypeDetails=連絡先/住所ごとの利益レポートに使用される連絡先タイプ(請求書にリンクされている)を定義する。ほとんどの場合、連絡先が請求書で明示的に定義されていない可能性があるため、連絡先の統計の読み取りは信頼できないことに注意すること。 +AgentContactTypeDetails=連絡先/住所ごとの利益レポートに使用される連絡先タイプ(請求書にリンクされている)を定義する。ほとんどの場合、連絡先が請求書で明示的に定義されていない可能性があるため、連絡先の統計の読み取りは信頼できないことに注意すること。 rateMustBeNumeric=レートは数値でなければなりません markRateShouldBeLesserThan100=マーク率は100未満である必要がある ShowMarginInfos=利益情報を表示する CheckMargins=利益の詳細 -MarginPerSaleRepresentativeWarning=ユーザーあたりの利益のレポートは、サードパーティと営業担当者の間のリンクを使用して、各営業担当者の利益を計算する。一部のサードパーティには専任の営業担当者がいない場合や、一部のサードパーティが複数にリンクされている場合があるため、一部の金額はこのレポートに含まれない場合があり(営業担当者がいない場合)、一部は異なる行に表示される場合がある(営業担当者ごとに) 。 +MarginPerSaleRepresentativeWarning=ユーザーあたりの利益のレポートは、サードパーティと営業担当者の間のリンクを使用して、各営業担当者の利益を計算する。一部のサードパーティには専任の営業担当者がいない場合や、一部のサードパーティが複数にリンクされている場合があるため、一部の金額はこのレポートに含まれない場合があり(営業担当者がいない場合)、一部は異なる行に表示される場合がある(営業担当者ごとに) 。 diff --git a/htdocs/langs/ja_JP/members.lang b/htdocs/langs/ja_JP/members.lang index d449616166c..bbea9f1697c 100644 --- a/htdocs/langs/ja_JP/members.lang +++ b/htdocs/langs/ja_JP/members.lang @@ -11,13 +11,13 @@ MembersTickets=メンバチケット FundationMembers=Foundationのメンバ ListOfValidatedPublicMembers=検証済みのパブリックメンバのリスト ErrorThisMemberIsNotPublic=このメンバは、パブリックではない -ErrorMemberIsAlreadyLinkedToThisThirdParty=別のメンバ(名前<b>:%s、</b>ログイン<b>:%s)</b>は既に取引先製の<b>%s</b>にリンクされている。第三者が唯一のメンバ(およびその逆)にリンクすることはできないので、最初にこのリンクを削除する。 +ErrorMemberIsAlreadyLinkedToThisThirdParty=別のメンバ(名前<b>:%s、</b>ログイン<b>:%s)</b>は既に取引先製の<b>%s</b>にリンクされている。第三者が唯一のメンバ(およびその逆)にリンクすることはできないので、最初にこのリンクを削除する。 ErrorUserPermissionAllowsToLinksToItselfOnly=セキュリティ上の理由から、あなたはすべてのユーザーが自分のものでないユーザーにメンバをリンクすることができるように編集する権限を付与する必要がある。 SetLinkToUser=Dolibarrユーザーへのリンク SetLinkToThirdParty=Dolibarr第三者へのリンク MembersCards=メンバの名刺 MembersList=メンバのリスト -MembersListToValid=ドラフトのメンバのリスト(検証する) +MembersListToValid=ドラフトのメンバのリスト(検証する) MembersListValid=有効なメンバのリスト MembersListUpToDate=最新のサブスクリプションを持つ有効なメンバのリスト MembersListNotUpToDate=サブスクリプションが古くなっている有効なメンバのリスト @@ -39,9 +39,9 @@ MemberType=メンバ型 MemberTypeId=メンバの種別ID MemberTypeLabel=メンバの種別ラベル MembersTypes=メンバの種類 -MemberStatusDraft=ドラフト(検証する必要がある) +MemberStatusDraft=ドラフト(検証する必要がある) MemberStatusDraftShort=ドラフト -MemberStatusActive=検証(サブスクリプションを待っている) +MemberStatusActive=検証(サブスクリプションを待っている) MemberStatusActiveShort=検証 MemberStatusActiveLate=サブスクリプションの有効期限が切れた MemberStatusActiveLateShort=期限切れの @@ -51,7 +51,7 @@ MemberStatusResiliated=終了メンバ MemberStatusResiliatedShort=終了しました MembersStatusToValid=ドラフトのメンバ MembersStatusResiliated=終了したメンバ -MemberStatusNoSubscription=検証済み(サブスクリプションは不要) +MemberStatusNoSubscription=検証済み(サブスクリプションは不要) MemberStatusNoSubscriptionShort=検証 SubscriptionNotNeeded=サブスクリプションは必要ない NewCotisation=新規貢献 @@ -64,7 +64,7 @@ ConfirmDeleteMemberType=このメンバ種別を削除してもよいか? MemberTypeDeleted=メンバ種別が削除された MemberTypeCanNotBeDeleted=メンバ種別は削除できない NewSubscription=新規サブスクリプション -NewSubscriptionDesc=このフォームで、財団の新規メンバとして、サブスクリプションを記録することができる。あなたが(既にメンバであり)、サブスクリプションを更新したい場合は、電子メール%sではなく財団理事会に連絡すること。 +NewSubscriptionDesc=このフォームで、財団の新規メンバとして、サブスクリプションを記録することができる。あなたが(既にメンバであり)、サブスクリプションを更新したい場合は、電子メール%sではなく財団理事会に連絡すること。 Subscription=サブスクリプション Subscriptions=サブスクリプション SubscriptionLate=遅い @@ -85,7 +85,7 @@ Reenable=再度有効にする ResiliateMember=メンバを終了する ConfirmResiliateMember=このメンバを終了してもよいか? DeleteMember=メンバを削除する -ConfirmDeleteMember=このメンバを削除してもよいか(メンバを削除すると、すべてのサブスクリプションが削除される)。 +ConfirmDeleteMember=このメンバを削除してもよいか(メンバを削除すると、すべてのサブスクリプションが削除される)。 DeleteSubscription=サブスクリプションを削除する ConfirmDeleteSubscription=このサブスクリプションを削除してもよいか? Filehtpasswd=htpasswdファイル @@ -128,7 +128,7 @@ CardContent=あなたの会員カードの内容 ThisIsContentOfYourMembershipRequestWasReceived=メンバシップリクエストを受信したことをお知らせする。 <br> <br> ThisIsContentOfYourMembershipWasValidated=メンバシップが次の情報で検証されたことをお知らせする:<br> <br> ThisIsContentOfYourSubscriptionWasRecorded=新規サブスクリプションが記録されたことをお知らせする。 <br> <br> -ThisIsContentOfSubscriptionReminderEmail=サブスクリプションの有効期限が近づいているか、すでに有効期限が切れていることをお知らせする(__MEMBER_LAST_SUBSCRIPTION_DATE_END__)。更新していただければ幸いです。 <br> <br> +ThisIsContentOfSubscriptionReminderEmail=サブスクリプションの有効期限が近づいているか、すでに有効期限が切れていることをお知らせする(__MEMBER_LAST_SUBSCRIPTION_DATE_END__)。更新していただければ幸いです。 <br> <br> ThisIsContentOfYourCard=これは私たちがあなたについて持っている情報の要約です。何かが不正確であれば連絡すること。 <br> <br> DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=ゲストの自動登録の場合に受信する通知メールの件名 DescADHERENT_AUTOREGISTER_NOTIF_MAIL=ゲストの自動登録の場合に受信する通知メールの内容 @@ -142,8 +142,8 @@ DescADHERENT_ETIQUETTE_TYPE=ラベルページのフォーマット DescADHERENT_ETIQUETTE_TEXT=メンバのアドレスシートに印刷されたテキスト DescADHERENT_CARD_TYPE=カードのページのフォーマット DescADHERENT_CARD_HEADER_TEXT=メンバカードの上に印刷されたテキスト -DescADHERENT_CARD_TEXT=テキストは、(左揃え)メンバカードに印刷 -DescADHERENT_CARD_TEXT_RIGHT=テキストは(右揃え)のメンバカードに印刷 +DescADHERENT_CARD_TEXT=テキストは、(左揃え)メンバカードに印刷 +DescADHERENT_CARD_TEXT_RIGHT=テキストは(右揃え)のメンバカードに印刷 DescADHERENT_CARD_FOOTER_TEXT=メンバカードの下部に印刷されたテキスト ShowTypeCard=種別 &quot;%s&quot;を表示 HTPasswordExport=htpasswordファイルの生成 @@ -156,9 +156,9 @@ MoreActionBankViaInvoice=請求書と銀行口座での支払いを作成する MoreActionInvoiceOnly=なし支払いで請求書を作成する。 LinkToGeneratedPages=訪問カードを生成 LinkToGeneratedPagesDesc=この画面では、すべてのメンバまたは特定のメンバのためのビジネスカードを持つPDFファイルを生成することができる。 -DocForAllMembersCards=すべてのメンバ<b>(:%s</b>フォーマット出力の実際の設定)のためのビジネスカードを生成 -DocForOneMemberCards=特定のメンバの名刺を<b>(:%s</b>出力実際に設定するためのフォーマット)を生成 -DocForLabels=アドレスシート<b>(:%s</b>出力の形式は実際の設定)を生成 +DocForAllMembersCards=すべてのメンバ<b>(:%s</b>フォーマット出力の実際の設定)のためのビジネスカードを生成 +DocForOneMemberCards=特定のメンバの名刺を<b>(:%s</b>出力実際に設定するためのフォーマット)を生成 +DocForLabels=アドレスシート<b>(:%s</b>出力の形式は実際の設定)を生成 SubscriptionPayment=サブスクリプション費用の支払い LastSubscriptionDate=最新のサブスクリプション支払いの日付 LastSubscriptionAmount=最新のサブスクリプションの量 @@ -184,7 +184,7 @@ NewMemberForm=新規メンバフォーム SubscriptionsStatistics=サブスクリプションの統計 NbOfSubscriptions=サブスクリプションの数 AmountOfSubscriptions=サブスクリプションの量 -TurnoverOrBudget=売上高(法人の場合)または予算(基礎用) +TurnoverOrBudget=売上高(法人の場合)または予算(基礎用) DefaultAmount=サブスクリプションのデフォルトの量 CanEditAmount=訪問者は、そのサブスクリプションの量を選択/編集することができる MEMBER_NEWFORM_PAYONLINE=統合されたオンライン決済のページにジャンプ @@ -200,7 +200,7 @@ SubscriptionRecorded=サブスクリプションが記録された NoEmailSentToMember=メンバにメールが送信されません EmailSentToMember=%sでメンバに送信された電子メール SendReminderForExpiredSubscriptionTitle=期限切れのサブスクリプションについてメールでリマインダーを送信する -SendReminderForExpiredSubscription=サブスクリプションの有効期限が近づいたときに、メンバにメールでリマインダーを送信する(パラメーターは、リマインダーを送信するサブスクリプションの終了までの日数。セミコロンで区切った日数のリストにすることができる。 例:'10; 5; 0; -5') -MembershipPaid=現在の期間に支払われたメンバシップ(%sまで) +SendReminderForExpiredSubscription=サブスクリプションの有効期限が近づいたときに、メンバにメールでリマインダーを送信する(パラメーターは、リマインダーを送信するサブスクリプションの終了までの日数。セミコロンで区切った日数のリストにすることができる。 例:'10; 5; 0; -5') +MembershipPaid=現在の期間に支払われたメンバシップ(%sまで) YouMayFindYourInvoiceInThisEmail=このメールに請求書が添付されている場合がある XMembersClosed=%sメンバ(s)がクローズした diff --git a/htdocs/langs/ja_JP/modulebuilder.lang b/htdocs/langs/ja_JP/modulebuilder.lang index 00c0d9c6851..cd03bfe05a8 100644 --- a/htdocs/langs/ja_JP/modulebuilder.lang +++ b/htdocs/langs/ja_JP/modulebuilder.lang @@ -1,8 +1,8 @@ # Dolibarr language file - Source file is en_US - loan ModuleBuilderDesc=このツールは、経験豊富なユーザーまたは開発者のみが使用する必要がある。独自のモジュールを構築または編集するためのユーティリティを提供する。代替の<a href="%s" target="_blank">手動開発のドキュメントは、</a>にある。 -EnterNameOfModuleDesc=作成するモジュール/アプリケーションの名前をスペースなしで入力する。大文字を使用して単語を区切る(例:MyModule、EcommerceForShop、SyncWithMySystem ...) -EnterNameOfObjectDesc=作成するオブジェクトの名前をスペースなしで入力する。大文字を使用して単語を区切る(例:MyObject、Student、Teacher ...)。 CRUDクラスファイルだけでなく、APIファイル、オブジェクトを一覧表示/追加/編集/削除するページ、およびSQLファイルが生成される。 -ModuleBuilderDesc2=モジュールが生成/編集されるパス(%sに定義された外部モジュールの最初のディレクトリ):<strong> %s </strong> +EnterNameOfModuleDesc=作成するモジュール/アプリケーションの名前をスペースなしで入力する。大文字を使用して単語を区切る(例:MyModule、EcommerceForShop、SyncWithMySystem ...) +EnterNameOfObjectDesc=作成するオブジェクトの名前をスペースなしで入力する。大文字を使用して単語を区切る(例:MyObject、Student、Teacher ...)。 CRUDクラスファイルだけでなく、APIファイル、オブジェクトを一覧表示/追加/編集/削除するページ、およびSQLファイルが生成される。 +ModuleBuilderDesc2=モジュールが生成/編集されるパス(%sに定義された外部モジュールの最初のディレクトリ):<strong> %s </strong> ModuleBuilderDesc3=生成された/編集可能なモジュールが見つかった:<strong> %s </strong> ModuleBuilderDesc4=ファイル<strong>%s </strong>がモジュールディレクトリのルートに存在する場合、モジュールは「編集可能」として検出される。 NewModule=新規モジュール @@ -11,18 +11,18 @@ ModuleKey=モジュールキー ObjectKey=オブジェクトキー ModuleInitialized=モジュールが初期化された FilesForObjectInitialized=初期化された新規オブジェクト '%s'のファイル -FilesForObjectUpdated=オブジェクト「%s」のファイルが更新された(.sqlファイルおよび.class.phpファイル) +FilesForObjectUpdated=オブジェクト「%s」のファイルが更新された(.sqlファイルおよび.class.phpファイル) ModuleBuilderDescdescription=モジュールを説明するすべての一般情報をここに入力する。 -ModuleBuilderDescspecifications=まだ他のタブに構造化されていないモジュール仕様の詳細説明をここに入力できる。したがって、開発するすべてのルールに簡単にアクセスできる。また、このテキストコンテンツは、生成されたドキュメントに含まれる(最後のタブを参照)。 Markdown形式を使用できるが、Asciidoc形式を使用することをお勧めする(.mdと.asciidocの比較: http://asciidoctor.org/docs/user-manual/#compared-to-markdown )。 +ModuleBuilderDescspecifications=まだ他のタブに構造化されていないモジュール仕様の詳細説明をここに入力できる。したがって、開発するすべてのルールに簡単にアクセスできる。また、このテキストコンテンツは、生成されたドキュメントに含まれる(最後のタブを参照)。 Markdown形式を使用できるが、Asciidoc形式を使用することをお勧めする(.mdと.asciidocの比較: http://asciidoctor.org/docs/user-manual/#compared-to-markdown )。 ModuleBuilderDescobjects=ここで、モジュールで管理するオブジェクトを定義する。 CRUD DAOクラス、SQLファイル、オブジェクトのレコードを一覧表示するページ、レコードを作成/編集/表示するためのページ、およびAPIが生成される。 ModuleBuilderDescmenus=このタブは、モジュールによって提供されるメニューエントリを定義するためのもの。 ModuleBuilderDescpermissions=このタブは、モジュールに提供する新規権限を定義するためのもの。 ModuleBuilderDesctriggers=これは、モジュールによって提供されるトリガーのビュー。トリガーされたビジネスイベントの起動時に実行されるコードを含めるには、このファイルを編集するだけ。 ModuleBuilderDeschooks=このタブはフック専用。 ModuleBuilderDescwidgets=このタブは、ウィジェットの管理/構築専用。 -ModuleBuilderDescbuildpackage=ここで、モジュールの「配布準備完了」パッケージファイル(正規化された.zipファイル)と「配布準備完了」ドキュメントファイルを生成できる。ボタンをクリックするだけで、パッケージまたはドキュメントファイルを作成できる。 -EnterNameOfModuleToDeleteDesc=モジュールを削除できる。警告:モジュールのすべてのコーディングファイル(手動で生成または作成されたもの)および構造化されたデータとドキュメントは削除される! -EnterNameOfObjectToDeleteDesc=オブジェクトを削除できる。警告:オブジェクトに関連するすべてのコーディングファイル(手動で生成または作成されたもの)は削除される! +ModuleBuilderDescbuildpackage=ここで、モジュールの「配布準備完了」パッケージファイル(正規化された.zipファイル)と「配布準備完了」ドキュメントファイルを生成できる。ボタンをクリックするだけで、パッケージまたはドキュメントファイルを作成できる。 +EnterNameOfModuleToDeleteDesc=モジュールを削除できる。警告:モジュールのすべてのコーディングファイル(手動で生成または作成されたもの)および構造化されたデータとドキュメントは削除される! +EnterNameOfObjectToDeleteDesc=オブジェクトを削除できる。警告:オブジェクトに関連するすべてのコーディングファイル(手動で生成または作成されたもの)は削除される! DangerZone=危険区域 BuildPackage=パッケージをビルドする BuildPackageDesc=アプリケーションのzipパッケージを生成して、Dolibarrで配布する準備を整えることができる。また、<a href="https://www.dolistore.com"> DoliStore.com</a>のようなマーケットプレイスで配布または販売することもできる。 @@ -40,8 +40,9 @@ PageForCreateEditView=レコードを作成/編集/表示するためのPHPペ PageForAgendaTab=イベントタブのPHPページ PageForDocumentTab=ドキュメントタブのPHPページ PageForNoteTab=メモタブのPHPページ +PageForContactTab=連絡先タブのPHPページ PathToModulePackage=モジュール/アプリケーションパッケージのzipへのパス -PathToModuleDocumentation=モジュール/アプリケーションドキュメントのファイルへのパス(%s) +PathToModuleDocumentation=モジュール/アプリケーションドキュメントのファイルへのパス(%s) SpaceOrSpecialCharAreNotAllowed=スペースや特殊文字は使用できない。 FileNotYetGenerated=ファイルはまだ生成されていない RegenerateClassAndSql=.classファイルと.sqlファイルの強制更新 @@ -51,7 +52,7 @@ LanguageFile=言語のファイル ObjectProperties=オブジェクトのプロパティ ConfirmDeleteProperty=プロパティ<strong>%s </strong>を削除してもよいか?これにより、PHPクラスのコードが変更されるが、オブジェクトのテーブル定義から列も削除される。 NotNull=NULLではない -NotNullDesc=1 =データベースをNOTNULLに設定する。 -1 = null値を許可し、空( ''または0)の場合は値をNULLに強制する。 +NotNullDesc=1 =データベースをNOTNULLに設定する。 -1 = null値を許可し、空( ''または0)の場合は値をNULLに強制する。 SearchAll=「すべて検索」に使用 DatabaseIndex=データベースインデックス FileAlreadyExists=ファイル%sはすでに存在する @@ -72,7 +73,7 @@ SqlFileExtraFields=補完属性のSQLファイル SqlFileKey=キーのSQLファイル SqlFileKeyExtraFields=補完的な属性のキーのSQLファイル AnObjectAlreadyExistWithThisNameAndDiffCase=この名前と別の大文字小文字のオブジェクトはすでに存在する -UseAsciiDocFormat=Markdown形式を使用できるが、Asciidoc形式を使用することをお勧めする(.mdと.asciidocの比較: http://asciidoctor.org/docs/user-manual/#compared-to-markdown ) +UseAsciiDocFormat=Markdown形式を使用できるが、Asciidoc形式を使用することをお勧めする(.mdと.asciidocの比較: http://asciidoctor.org/docs/user-manual/#compared-to-markdown ) IsAMeasure=尺度は DirScanned=スキャンされたディレクトリ NoTrigger=トリガーなし @@ -82,20 +83,20 @@ ListOfMenusEntries=メニューエントリのリスト ListOfDictionariesEntries=辞書エントリのリスト ListOfPermissionsDefined=定義された権限のリスト SeeExamples=こちらの例をご覧ください -EnabledDesc=このフィールドをアクティブにする条件(例:1または$ conf-> global-> MYMODULE_MYOPTION) -VisibleDesc=フィールドは表示されているか? (例:0 =表示されない、1 =リストおよび作成/更新/表示フォームで表示、2 =リストでのみ表示、3 =作成/更新/表示フォームでのみ表示(リストではない)、4 =リストおよび更新/表示フォームでのみ表示(作成しない)、5 =リストおよび表示フォームでのみ表示(作成しない、更新しない)<br> <br>負の値を使用すると、フィールドはデフォルトでリストに表示されないが、表示用に選択できる)。 <br> <br>これは、次のような式にできる。例: <br> preg_match('/public/', $_SERVER['PHP_SELF'])?0:<br>($user->rights->holiday->define_holiday ? 1 : 0) +EnabledDesc=このフィールドをアクティブにする条件(例:1または$ conf-> global-> MYMODULE_MYOPTION) +VisibleDesc=フィールドは表示されているか? (例:0 =表示されない、1 =リストおよび作成/更新/表示フォームで表示、2 =リストでのみ表示、3 =作成/更新/表示フォームでのみ表示(リストではない)、4 =リストおよび更新/表示フォームでのみ表示(作成しない)、5 =リストおよび表示フォームでのみ表示(作成しない、更新しない)<br> <br>負の値を使用すると、フィールドはデフォルトでリストに表示されないが、表示用に選択できる)。 <br> <br>これは、次のような式にできる。例: <br> preg_match('/public/', $_SERVER['PHP_SELF'])?0:<br>($user->rights->holiday->define_holiday ? 1 : 0) DisplayOnPdfDesc=互換性のあるPDFドキュメントでこのフィールドを表示する。「位置」フィールドで位置を管理できる。<br/>現在、既知の互換性のあるPDFモデルは次のとおり : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)<br/><br/><strong>ドキュメントに対して :</strong><br/>0 = 非表示 <br/>1 = 表示<br/>2 = 空でない場合のみ表示<br/><br/><strong>ドキュメント行に対して :</strong><br/>0 = 非表示 <br/>1 = カラム内で表示<br/>3 = 説明欄の後の行説明カラムの中で表示<br/>4 = 空でない場合のみ、説明欄の後の行説明カラムの中で表示 DisplayOnPdf=PDFで表示 -IsAMeasureDesc=フィールドの値を累積して、合計をリストに入れることはできるか? (例:1または0) -SearchAllDesc=クイック検索ツールから検索するためにフィールドが使用されているか? (例:1または0) +IsAMeasureDesc=フィールドの値を累積して、合計をリストに入れることはできるか? (例:1または0) +SearchAllDesc=クイック検索ツールから検索するためにフィールドが使用されているか? (例:1または0) SpecDefDesc=他のタブでまだ定義されていない、モジュールで提供するすべてのドキュメントをここに入力する。豊富な.asciidoc構文である.md以上を使用できる。 LanguageDefDesc=このファイルに、各言語ファイルのすべてのキーと翻訳を入力する。 MenusDefDesc=モジュールが提供するメニューをここで定義する DictionariesDefDesc=モジュールが提供する辞書をここで定義する PermissionsDefDesc=モジュールによって提供される新規権限をここで定義する -MenusDefDescTooltip=モジュール/アプリケーションによって提供されるメニューは、モジュール記述子ファイルの配列<strong> $ this-> menus</strong>に定義されている。このファイルを手動で編集するか、埋め込みエディターを使用できる。 <br> <br>注:定義されると(およびモジュールが再アクティブ化されると)、メニューは%sの管理者ユーザーが使用できるメニューエディターにも表示される。 -DictionariesDefDescTooltip=モジュール/アプリケーションによって提供されるディクショナリは、モジュール記述子ファイルの配列<strong> $ this-> dictionaries</strong>に定義されている。このファイルを手動で編集するか、埋め込みエディターを使用できる。 <br> <br>注:定義(およびモジュールの再アクティブ化)が完了すると、%sの管理者ユーザーには辞書もセットアップ領域に表示される。 -PermissionsDefDescTooltip=モジュール/アプリケーションによって提供されるアクセス許可は、配列<strong> $ this-> rights</strong>にモジュール記述子ファイルに定義される。このファイルを手動で編集するか、埋め込みエディターを使用できる。 <br> <br>注:定義されると(およびモジュールが再アクティブ化されると)、アクセス許可はデフォルトのアクセス許可セットアップ%sに表示される。 +MenusDefDescTooltip=モジュール/アプリケーションによって提供されるメニューは、モジュール記述子ファイルの配列<strong> $ this-> menus</strong>に定義されている。このファイルを手動で編集するか、埋め込みエディターを使用できる。 <br> <br>注:定義されると(およびモジュールが再アクティブ化されると)、メニューは%sの管理者ユーザーが使用できるメニューエディターにも表示される。 +DictionariesDefDescTooltip=モジュール/アプリケーションによって提供されるディクショナリは、モジュール記述子ファイルの配列<strong> $ this-> dictionaries</strong>に定義されている。このファイルを手動で編集するか、埋め込みエディターを使用できる。 <br> <br>注:定義(およびモジュールの再アクティブ化)が完了すると、%sの管理者ユーザーには辞書もセットアップ領域に表示される。 +PermissionsDefDescTooltip=モジュール/アプリケーションによって提供されるアクセス許可は、配列<strong> $ this-> rights</strong>にモジュール記述子ファイルに定義される。このファイルを手動で編集するか、埋め込みエディターを使用できる。 <br> <br>注:定義されると(およびモジュールが再アクティブ化されると)、アクセス許可はデフォルトのアクセス許可セットアップ%sに表示される。 HooksDefDesc=定義する:管理したいフックのコンテキストを <b>module_parts['hooks']</b> プロパティのモジュール記述子の中に。 (コンテキストのリストは、コアコードで '<b>initHooks(</b>' を検索すると見つかる).<br>編集する:フックされた関数のコードを追加するためのフックファイルを。 (フック可能な関数は、コアコードで '<b>executeHooks</b>' を検索すると見つかる). TriggerDefDesc=実行されるビジネスイベントごとに実行するコードをトリガーファイルで定義する。 SeeIDsInUse=インストールで使用されているIDを確認する @@ -104,8 +105,8 @@ 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>を参照すること AddLanguageFile=言語ファイルを追加する -YouCanUseTranslationKey=ここでは、言語ファイルにある翻訳キーであるキーを使用できる(「言語」タブを参照)。 -DropTableIfEmpty=(空の場合はテーブルを削除する) +YouCanUseTranslationKey=ここでは、言語ファイルにある翻訳キーであるキーを使用できる(「言語」タブを参照)。 +DropTableIfEmpty=(空の場合はテーブルを破棄する) TableDoesNotExists=テーブル%sは存在しない TableDropped=テーブル%sが削除された InitStructureFromExistingTable=既存のテーブルの構造体配列文字列を作成する @@ -126,7 +127,6 @@ UseSpecificEditorURL = 特定のエディターURLを使用する UseSpecificFamily = 特定の家族を使用する UseSpecificAuthor = 特定の作成者を使用する UseSpecificVersion = 特定の初期バージョンを使用する -ModuleMustBeEnabled=モジュール/アプリケーションを最初に有効にする必要がある IncludeRefGeneration=オブジェクトの参照は自動的に生成される必要がある IncludeRefGenerationHelp=参照の生成を自動的に管理するコードを含める場合は、これをチェックすること IncludeDocGeneration=オブジェクトからいくつかのドキュメントを生成したい @@ -140,3 +140,4 @@ TypeOfFieldsHelp=フィールドの種別:<br>varchar(99), double(24,8), real, t AsciiToHtmlConverter=アスキーからHTMLへのコンバーター AsciiToPdfConverter=アスキーからPDFへのコンバーター TableNotEmptyDropCanceled=テーブルが空ではない。ドロップはキャンセルされた。 +ModuleBuilderNotAllowed=モジュールビルダーは利用できるが、あなたのユーザには許可されていない。 diff --git a/htdocs/langs/ja_JP/mrp.lang b/htdocs/langs/ja_JP/mrp.lang index d783dd432ac..2e3e4d06df0 100644 --- a/htdocs/langs/ja_JP/mrp.lang +++ b/htdocs/langs/ja_JP/mrp.lang @@ -1,7 +1,7 @@ Mrp=製造指図 MOs=製造指図 ManufacturingOrder=製造指図 -MRPDescription=製造および製造指図(MO)を管理するモジュール。 +MRPDescription=製造および製造指図(MO)を管理するモジュール。 MRPArea=MRPエリア MrpSetupPage=モジュールMRPのセットアップ MenuBOM=部品表 @@ -40,9 +40,9 @@ DateEndPlannedMo=終了予定日 KeepEmptyForAsap=空は「できるだけ早く」を意味する EstimatedDuration=推定所要時間 EstimatedDurationDesc=このBOMを使用してこの製品を製造するための推定期間 -ConfirmValidateBom=参照<strong>%s </strong>を使用してBOMを検証してよいか(これを使用して新規製造指図を作成できる) -ConfirmCloseBom=このBOMをキャンセルしてよいか(これを使用して新規製造指図を作成することはできなくなる)。 -ConfirmReopenBom=このBOMを再度開いてもよいか(これを使用して新規製造指図を作成できる) +ConfirmValidateBom=参照<strong>%s </strong>を使用してBOMを検証してよいか(これを使用して新規製造指図を作成できる) +ConfirmCloseBom=このBOMをキャンセルしてよいか(これを使用して新規製造指図を作成することはできなくなる)。 +ConfirmReopenBom=このBOMを再度開いてもよいか(これを使用して新規製造指図を作成できる) StatusMOProduced=生産 QtyFrozen=凍結量 QuantityFrozen=凍結数量 @@ -57,7 +57,7 @@ ToConsume=消費するには ToProduce=生産するには QtyAlreadyConsumed=すでに消費された数量 QtyAlreadyProduced=すでに生産された数量 -QtyRequiredIfNoLoss=損失がない場合は必要な数量(製造効率は100%%) +QtyRequiredIfNoLoss=損失がない場合は必要な数量(製造効率は100%%) ConsumeOrProduce=消費または生産 ConsumeAndProduceAll=すべてを消費して生産する Manufactured=製造完了 @@ -75,6 +75,30 @@ ProductsToConsume=消費する製品 ProductsToProduce=生産する製品 UnitCost=単価 TotalCost=総費用 -BOMTotalCost=消費する各数量と製品のコストに基づいてこのBOMを生成するためのコスト(定義されている場合は原価、定義されている場合は平均加重価格、それ以外の場合は最良の購入価格を使用) -GoOnTabProductionToProduceFirst=製造指図を閉じるには、最初に製造を開始しておく必要がある(タブ '%s'を参照)。ただし、キャンセルすることはできる。 -ErrorAVirtualProductCantBeUsedIntoABomOrMo=A kit can't be used into a BOM or a MO +BOMTotalCost=消費する各数量と製品のコストに基づいてこのBOMを生成するためのコスト(定義されている場合は原価、定義されている場合は平均加重価格、それ以外の場合は最良の購入価格を使用) +GoOnTabProductionToProduceFirst=製造指図を閉じるには、最初に製造を開始しておく必要がある(タブ '%s'を参照)。ただし、キャンセルすることはできる。 +ErrorAVirtualProductCantBeUsedIntoABomOrMo=キットをBOMまたはMOに使用することはできない +Workstation=ワークステーション +Workstations=ワークステーション +WorkstationsDescription=ワークステーション管理 +WorkstationSetup = ワークステーションのセットアップ +WorkstationSetupPage = ワークステーションのセットアップページ +WorkstationAbout = ワークステーションについて +WorkstationAboutPage = ページについてのワークステーション +WorkstationList=ワークステーションリスト +WorkstationCreate=新しいワークステーションを追加する +ConfirmEnableWorkstation=ワークステーション<b>%s </b>を有効にするか? +EnableAWorkstation=ワークステーションを有効にする +ConfirmDisableWorkstation=ワークステーション<b>%s </b>を無効にしてもよいか? +DisableAWorkstation=ワークステーションを無効にする +DeleteWorkstation=Supprimer +NbOperatorsRequired=必要なオペレーターの数 +THMOperatorEstimated=推定オペレーターTHM +THMMachineEstimated=推定マシンTHM +WorkstationType=ワークステーションタイプ +Human=人間 +Machine=機械 +HumanMachine=人間/機械 +WorkstationArea=ワークステーションエリア +Machines=機械 +THMEstimatedHelp=このレートにより、アイテムの予測コストを定義できます。 diff --git a/htdocs/langs/ja_JP/multicurrency.lang b/htdocs/langs/ja_JP/multicurrency.lang index b344a12d658..da5c08ced40 100644 --- a/htdocs/langs/ja_JP/multicurrency.lang +++ b/htdocs/langs/ja_JP/multicurrency.lang @@ -5,9 +5,9 @@ ErrorAddCurrencyFail=追加済通貨のエラー ErrorDeleteCurrencyFail=エラー削除失敗 multicurrency_syncronize_error=同期エラー:%s MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE=最新の既知のレートを使用する代わりに、ドキュメントの日付を使用して通貨レートを見つける -multicurrency_useOriginTx=オブジェクトが別のオブジェクトから作成される場合、ソースオブジェクトの元のレートを保持する(それ以外の場合は、最新の既知のレートを使用する) +multicurrency_useOriginTx=オブジェクトが別のオブジェクトから作成される場合、ソースオブジェクトの元のレートを保持する(それ以外の場合は、最新の既知のレートを使用する) CurrencyLayerAccount=CurrencyLayer API -CurrencyLayerAccount_help_to_synchronize=この機能を使用するには、Webサイト%sでアカウントを作成する必要がある。 <br> <b>APIキー</b>を取得する。 <br>無料のアカウントを使用している場合、<b>ソース通貨</b>(デフォルトではUSD)を変更することはできない。 <br>主通貨がUSDでない場合、アプリケーションは自動的にそれを再計算する。 <br><br> 月に1000回の同期に制限される。 +CurrencyLayerAccount_help_to_synchronize=この機能を使用するには、Webサイト%sでアカウントを作成する必要がある。 <br> <b>APIキー</b>を取得する。 <br>無料のアカウントを使用している場合、<b>ソース通貨</b>(デフォルトではUSD)を変更することはできない。 <br>主通貨がUSDでない場合、アプリケーションは自動的にそれを再計算する。 <br><br> 月に1000回の同期に制限される。 multicurrency_appId=APIキー multicurrency_appCurrencySource=ソース通貨 multicurrency_alternateCurrencySource=代替ソース通貨 @@ -17,7 +17,7 @@ rate=レート MulticurrencyReceived=受取り、元の通貨 MulticurrencyRemainderToTake=残額、元の通貨 MulticurrencyPaymentAmount=支払額、元の通貨 -AmountToOthercurrency=金額(受取口座の通貨) +AmountToOthercurrency=金額(受取口座の通貨) CurrencyRateSyncSucceed=為替レートの同期が正常に実行された MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT=オンライン支払いにはドキュメントの通貨を使用する TabTitleMulticurrencyRate=料金表 diff --git a/htdocs/langs/ja_JP/opensurvey.lang b/htdocs/langs/ja_JP/opensurvey.lang index acc17b1f3df..07cee291af1 100644 --- a/htdocs/langs/ja_JP/opensurvey.lang +++ b/htdocs/langs/ja_JP/opensurvey.lang @@ -1,61 +1,61 @@ # Dolibarr language file - Source file is en_US - opensurvey Survey=投票 -Surveys=世論調査 -OrganizeYourMeetingEasily=会議や投票を簡単に整理できます。まず、投票の種類を選択します... -NewSurvey=新しい世論調査 +Surveys=投票 +OrganizeYourMeetingEasily=会議や投票を簡単に整理できる。まず、投票の種類を選択する... +NewSurvey=新規投票 OpenSurveyArea=投票エリア -AddACommentForPoll=投票にコメントを追加できます... +AddACommentForPoll=投票にコメントを追加できる... AddComment=コメントを追加する CreatePoll=投票を作成する PollTitle=投票タイトル ToReceiveEMailForEachVote=投票ごとにメールを受け取る TypeDate=日付を入力 TypeClassic=タイプスタンダード -OpenSurveyStep2=休日(灰色)の中から日付を選択します。選択した日は緑色です。以前に選択した日をもう一度クリックすると、選択を解除できます -RemoveAllDays=すべての日を削除します +OpenSurveyStep2=休日(灰色)の中から日付を選択する。選択した日は緑色です。以前に選択した日をもう一度クリックすると、選択を解除できる +RemoveAllDays=すべての日を削除する CopyHoursOfFirstDay=初日のコピー時間 -RemoveAllHours=すべての時間を削除します +RemoveAllHours=すべての時間を削除する SelectedDays=選択した日 TheBestChoice=現在の最良の選択は TheBestChoices=現在の最良の選択は with=と -OpenSurveyHowTo=この投票に投票することに同意する場合は、名前を付け、自分に最適な値を選択し、行末のプラスボタンで検証する必要があります。 +OpenSurveyHowTo=この投票に投票することに同意する場合は、名前を付け、自分に最適な値を選択し、行末のプラスボタンで検証する必要がある。 CommentsOfVoters=有権者のコメント -ConfirmRemovalOfPoll=この投票(およびすべての投票)を削除してもよろしいですか? +ConfirmRemovalOfPoll=この投票(およびすべての投票)を削除してもよいか? RemovePoll=投票を削除する UrlForSurvey=投票に直接アクセスするために通信するURL -PollOnChoice=投票の複数の選択肢を作成するための投票を作成しています。まず、投票で可能なすべての選択肢を入力します。 +PollOnChoice=投票の複数の選択肢を作成するための投票を作成しています。まず、投票で可能なすべての選択肢を入力する。 CreateSurveyDate=日付投票を作成する CreateSurveyStandard=標準の投票を作成する CheckBox=シンプルなチェックボックス -YesNoList=リスト(空/はい/いいえ) -PourContreList=リスト(空/賛成/反対) -AddNewColumn=新しい列を追加する +YesNoList=リスト(空/はい/いいえ) +PourContreList=リスト(空/賛成/反対) +AddNewColumn=新規列を追加する TitleChoice=選択ラベル ExportSpreadsheet=結果スプレッドシートのエクスポート ExpireDate=日付を制限する NbOfSurveys=投票数 NbOfVoters=投票者数 SurveyResults=結果 -PollAdminDesc=「編集」ボタンを使用して、この投票のすべての投票行を変更できます。 %sを使用して列または行を削除することもできます。 %sを使用して新しい列を追加することもできます。 +PollAdminDesc=「編集」ボタンを使用して、この投票のすべての投票行を変更できる。 %sを使用して列または行を削除することもできる。 %sを使用して新規列を追加することもできる。 5MoreChoices=さらに5つの選択肢 Against=に対して -YouAreInivitedToVote=この投票に投票してください -VoteNameAlreadyExists=この名前はすでにこの投票に使用されていました +YouAreInivitedToVote=この投票に投票すること +VoteNameAlreadyExists=この名前はすでにこの投票に使用されていた AddADate=日付を追加する AddStartHour=開始時間を追加 AddEndHour=終了時間を追加する -votes=投票 -NoCommentYet=この投票へのコメントはまだ投稿されていません -CanComment=投票者は投票でコメントできます -CanSeeOthersVote=有権者は他の人の投票を見ることができます -SelectDayDesc=選択した各日に、次の形式で会議時間を選択するかどうかを選択できます:<br>-空、<br>-「8h」、「8H」、または「8:00」で、会議の開始時間を指定します。 11」、「8h-11h」、「8H-11H」、または「8:00-11:00」は、会議の開始時間と終了時間を示します。 15-11:15 "同じことですが、分単位です。 +votes=投票(s) +NoCommentYet=この投票へのコメントはまだ投稿されていない +CanComment=投票者は投票でコメントできる +CanSeeOthersVote=有権者は他の人の投票を見ることができる +SelectDayDesc=選択した各日に、次の形式で会議時間を選択するかどうかを選択できる:<br>- 空、<br>- "8h"、"8H" または "8:00" で、会議の開始時間を指定する。<br>- "8-11"、"8h-11h"、"8H-11H" または "8:00-11:00" で、会議の開始時間と終了時間を示する。<br>- "8h15-11h15"、"8H15-11H15" または "8:15-11:15" も分がついていて同様となる。 BackToCurrentMonth=今月に戻る -ErrorOpenSurveyFillFirstSection=投票作成の最初のセクションに記入していません -ErrorOpenSurveyOneChoice=少なくとも1つの選択肢を入力してください +ErrorOpenSurveyFillFirstSection=投票作成の最初のセクションに記入していない +ErrorOpenSurveyOneChoice=少なくとも1つの選択肢を入力すること ErrorInsertingComment=コメントの挿入中にエラーが発生しました -MoreChoices=有権者のためのより多くの選択肢を入力してください -SurveyExpiredInfo=投票が終了したか、投票の遅延が期限切れになりました。 -EmailSomeoneVoted=%sが行を埋めました。\nあなたはリンクであなたの投票を見つけることができます:\n%s +MoreChoices=有権者のためのより多くの選択肢を入力すること +SurveyExpiredInfo=投票が終了したか、投票の遅延が期限切れになった。 +EmailSomeoneVoted=%sが行を埋めました。\nあなたはリンクであなたの投票を見つけることができる:\n%s ShowSurvey=アンケートを表示 -UserMustBeSameThanUserUsedToVote=コメントを投稿するには、投票して、投票に使用したのと同じユーザー名を使用する必要があります +UserMustBeSameThanUserUsedToVote=コメントを投稿するには、投票して、投票に使用したのと同じユーザー名を使用する必要がある diff --git a/htdocs/langs/ja_JP/orders.lang b/htdocs/langs/ja_JP/orders.lang index 11c99913cd0..2699436c7ea 100644 --- a/htdocs/langs/ja_JP/orders.lang +++ b/htdocs/langs/ja_JP/orders.lang @@ -1,39 +1,39 @@ # Dolibarr language file - Source file is en_US - orders OrdersArea=お客様の注文エリア -SuppliersOrdersArea=Purchase orders area +SuppliersOrdersArea=注文書エリア OrderCard=注文カード -OrderId=Order Id -Order=オーダー -PdfOrderTitle=オーダー +OrderId=注文ID +Order=注文 +PdfOrderTitle=注文 Orders=受注 OrderLine=注文明細行 OrderDate=注文日 OrderDateShort=注文日 OrderToProcess=プロセスの順序 NewOrder=新規注文 -NewOrderSupplier=New Purchase Order +NewOrderSupplier=新規注文書 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 +SupplierOrder=注文書 +SuppliersOrders=注文書 +SuppliersOrdersRunning=現在の注文書 +CustomerOrder=販売注文 +CustomersOrders=受注 +CustomersOrdersRunning=現在の販売注文 +CustomersOrdersAndOrdersLines=販売注文と注文の詳細 +OrdersDeliveredToBill=請求書に配信された販売注文 +OrdersToBill=納品された販売注文 +OrdersInProcess=進行中の販売注文 +OrdersToProcess=処理する受注 +SuppliersOrdersToProcess=処理する注文書 +SuppliersOrdersAwaitingReception=受付待ちの注文書 +AwaitingReception=レセプション待ち StatusOrderCanceledShort=キャンセル -StatusOrderDraftShort=ドラフト +StatusOrderDraftShort=下書き StatusOrderValidatedShort=検証 StatusOrderSentShort=プロセスの -StatusOrderSent=Shipment in process -StatusOrderOnProcessShort=Ordered +StatusOrderSent=発送中 +StatusOrderOnProcessShort=順序付けられた StatusOrderProcessedShort=処理 StatusOrderDelivered=請求する StatusOrderDeliveredShort=請求する @@ -42,130 +42,131 @@ StatusOrderApprovedShort=承認された StatusOrderRefusedShort=拒否 StatusOrderToProcessShort=処理するには StatusOrderReceivedPartiallyShort=部分的に受け -StatusOrderReceivedAllShort=Products received +StatusOrderReceivedAllShort=受け取った製品 StatusOrderCanceled=キャンセル -StatusOrderDraft=ドラフト(検証する必要があります) +StatusOrderDraft=下書き(検証する必要がある) StatusOrderValidated=検証 -StatusOrderOnProcess=Ordered - Standby reception -StatusOrderOnProcessWithValidation=Ordered - Standby reception or validation +StatusOrderOnProcess=注文済み-スタンバイ受信 +StatusOrderOnProcessWithValidation=注文済み-スタンバイ受信または検証 StatusOrderProcessed=処理 StatusOrderToBill=請求する StatusOrderApproved=承認された StatusOrderRefused=拒否 StatusOrderReceivedPartially=部分的に受け -StatusOrderReceivedAll=All products received +StatusOrderReceivedAll=受け取ったすべての製品 ShippingExist=出荷が存在する QtyOrdered=数量は、注文された -ProductQtyInDraft=Product quantity into draft orders -ProductQtyInDraftOrWaitingApproved=Product quantity into draft or approved orders, not yet ordered +ProductQtyInDraft=下書き注文への製品数量 +ProductQtyInDraftOrWaitingApproved=下書き注文または承認済み注文への製品数量、まだ注文されていない MenuOrdersToBill=法案に注文 -MenuOrdersToBill2=Billable orders +MenuOrdersToBill2=請求可能な注文 ShipProduct=船積 -CreateOrder=順序を作成します。 +CreateOrder=順序を作成する。 RefuseOrder=順番を拒否 -ApproveOrder=Approve order -Approve2Order=Approve order (second level) +ApproveOrder=注文を承認する +Approve2Order=注文の承認(第2レベル) ValidateOrder=順序を検証する UnvalidateOrder=順序をUnvalidate DeleteOrder=順序を削除する CancelOrder=注文を取り消す -OrderReopened= Order %s re-open -AddOrder=Create order -AddPurchaseOrder=Create purchase order -AddToDraftOrders=Add to draft order +OrderReopened= %sを再度開くように注文する +AddOrder=注文を作成する +AddPurchaseOrder=注文書を作成する +AddToDraftOrders=下書き注文に追加 ShowOrder=順序を示す -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 +OrdersOpened=処理する注文 +NoDraftOrders=下書き注文はない +NoOrder=注文なし +NoSupplierOrder=注文書なし +LastOrders=最新の%s販売注文 +LastCustomerOrders=最新の%s販売注文 +LastSupplierOrders=最新の%s注文書 +LastModifiedOrders=最新の%s変更された注文 AllOrders=すべての注文 NbOfOrders=注文数 OrdersStatistics=注文の統計 -OrdersStatisticsSuppliers=Purchase order statistics +OrdersStatisticsSuppliers=注文書の統計 NumberOfOrdersByMonth=月別受注数 -AmountOfOrdersByMonthHT=Amount of orders by month (excl. tax) +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>? -GenerateBill=請求書を生成します。 -ClassifyShipped=Classify delivered -DraftOrders=ドラフト注文 -DraftSuppliersOrders=Draft purchase orders +ConfirmCloseOrder=この注文を配信済みに設定してもよいか?注文が配信されると、請求に設定できる。 +ConfirmDeleteOrder=この注文を削除してもよいか? +ConfirmValidateOrder=この注文を<b>%s </b>という名前で検証してもよいか? +ConfirmUnvalidateOrder=注文<b>%s </b>を下書きステータスに復元してもよいか? +ConfirmCancelOrder=この注文をキャンセルしてもよいか? +ConfirmMakeOrder=<b> %s </b>でこの注文をしたことを確認するか? +GenerateBill=請求書を生成する。 +ClassifyShipped=配信された分類 +DraftOrders=下書き注文 +DraftSuppliersOrders=注文書の下書き OnProcessOrders=プロセス受注 -RefOrder=REF。オーダー -RefCustomerOrder=Ref. order for customer -RefOrderSupplier=Ref. order for vendor -RefOrderSupplierShort=Ref. order vendor +RefOrder=REF。注文 +RefCustomerOrder=参照。顧客の注文 +RefOrderSupplier=参照。ベンダーの注文 +RefOrderSupplierShort=参照。注文ベンダー SendOrderByMail=メールで注文を送る ActionsOnOrder=ためのイベント NoArticleOfTypeProduct=この注文のため、型 '製品'なし発送の記事のない記事ません -OrderMode=オーダー·メソッド +OrderMode=注文·メソッド AuthorRequest=リクエストの作成者 UserWithApproveOrderGrant=ユーザーは、 &quot;注文を承認する&quot;権限が付与された。 -PaymentOrderRef=オーダーの%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 +PaymentOrderRef=注文の%sの支払い +ConfirmCloneOrder=この注文のクローンを作成してもよいか<b>%s </b>? +DispatchSupplierOrder=注文書の受信%s +FirstApprovalAlreadyDone=最初の承認はすでに行われている +SecondApprovalAlreadyDone=2回目の承認はすでに完了している +SupplierOrderReceivedInDolibarr=注文書%sが%sを受け取りた +SupplierOrderSubmitedInDolibarr=注文書%sが送信された +SupplierOrderClassifiedBilled=注文書%sセットの請求 OtherOrders=他の注文 ##### Types de contacts ##### -TypeContact_commande_internal_SALESREPFOLL=Representative following-up sales order +TypeContact_commande_internal_SALESREPFOLL=代表的なフォローアップ受注 TypeContact_commande_internal_SHIPPING=代表的なフォローアップ出荷 -TypeContact_commande_external_BILLING=顧客の請求書の連絡先 +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_SALESREPFOLL=代表的なフォローアップ発注書 TypeContact_order_supplier_internal_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=定数COMMANDE_SUPPLIER_ADDONが定義されていません -Error_COMMANDE_ADDON_NotDefined=定数COMMANDE_ADDONが定義されていません -Error_OrderNotChecked=No orders to invoice selected +TypeContact_order_supplier_external_BILLING=ベンダー請求書連絡先 +TypeContact_order_supplier_external_SHIPPING=仕入先配送担当者 +TypeContact_order_supplier_external_CUSTOMER=ベンダー連絡先のフォローアップ注文 +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=電子メール OrderByFax=ファックス -OrderByEMail=Email +OrderByEMail=Eメール OrderByWWW=オンライン OrderByPhone=電話 # Documents models -PDFEinsteinDescription=A complete order model -PDFEratostheneDescription=A complete order model +PDFEinsteinDescription=完全な注文モデル(エラトステネステンプレートの古い実装) +PDFEratostheneDescription=完全な注文モデル PDFEdisonDescription=単純な次のモデル -PDFProformaDescription=A complete Proforma invoice template -CreateInvoiceForThisCustomer=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 +PDFProformaDescription=完全な 見積請求書 テンプレート +CreateInvoiceForThisCustomer=請求書注文 +CreateInvoiceForThisSupplier=請求書注文 +NoOrdersToInvoice=請求可能な注文はない +CloseProcessedOrdersAutomatically=選択したすべての注文を「処理済み」に分類する。 +OrderCreation=注文の作成 +Ordered=順序付けられた +OrderCreated=注文が作成された +OrderFail=注文の作成中にエラーが発生した +CreateOrders=注文を作成する +ToBillSeveralOrderSelectCustomer=複数の注文の請求書を作成するには、最初に顧客をクリックしてから、「%s」を選択する。 +OptionToSetOrderBilledNotEnabled=モジュールワークフローのオプションで、請求書検証時に注文を自動的に「請求済み」に設定するオプションが有効になっていないため、請求書が生成された後、注文のステータスを手動で「請求済み」に設定する必要がある。 +IfValidateInvoiceIsNoOrderStayUnbilled=請求書検証が「いいえ」の場合、請求書が検証されるまで、注文はステータス「未請求」のままになる。 +CloseReceivedSupplierOrdersAutomatically=すべての製品を受け取ったら、注文を自動的にステータス「%s」に閉じる。 +SetShippingMode=配送モードを設定する +WithReceptionFinished=レセプション終了 #### supplier orders status StatusSupplierOrderCanceledShort=キャンセル -StatusSupplierOrderDraftShort=ドラフト +StatusSupplierOrderDraftShort=下書き StatusSupplierOrderValidatedShort=検証 StatusSupplierOrderSentShort=プロセスの -StatusSupplierOrderSent=Shipment in process -StatusSupplierOrderOnProcessShort=Ordered +StatusSupplierOrderSent=発送中 +StatusSupplierOrderOnProcessShort=順序付けられた StatusSupplierOrderProcessedShort=処理 StatusSupplierOrderDelivered=請求する StatusSupplierOrderDeliveredShort=請求する @@ -174,15 +175,15 @@ StatusSupplierOrderApprovedShort=承認された StatusSupplierOrderRefusedShort=拒否 StatusSupplierOrderToProcessShort=処理するには StatusSupplierOrderReceivedPartiallyShort=部分的に受け -StatusSupplierOrderReceivedAllShort=Products received +StatusSupplierOrderReceivedAllShort=受け取った製品 StatusSupplierOrderCanceled=キャンセル -StatusSupplierOrderDraft=ドラフト(検証する必要があります) +StatusSupplierOrderDraft=下書き(検証する必要がある) StatusSupplierOrderValidated=検証 -StatusSupplierOrderOnProcess=Ordered - Standby reception -StatusSupplierOrderOnProcessWithValidation=Ordered - Standby reception or validation +StatusSupplierOrderOnProcess=注文済み-スタンバイ受信 +StatusSupplierOrderOnProcessWithValidation=注文済み-スタンバイ受信または検証 StatusSupplierOrderProcessed=処理 StatusSupplierOrderToBill=請求する StatusSupplierOrderApproved=承認された StatusSupplierOrderRefused=拒否 StatusSupplierOrderReceivedPartially=部分的に受け -StatusSupplierOrderReceivedAll=All products received +StatusSupplierOrderReceivedAll=受け取ったすべての製品 diff --git a/htdocs/langs/ja_JP/other.lang b/htdocs/langs/ja_JP/other.lang index d294c7bb2a7..b3fda9e5699 100644 --- a/htdocs/langs/ja_JP/other.lang +++ b/htdocs/langs/ja_JP/other.lang @@ -1,133 +1,134 @@ # Dolibarr language file - Source file is en_US - other SecurityCode=セキュリティコード -NumberingShort=N° +NumberingShort=番号 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. +TMenuTools=ツールs +ToolsDesc=他のメニューエントリに含まれていないすべてのツールがここにグループ化される。 <br>すべてのツールは左側のメニューからアクセスできる。 Birthday=誕生日 BirthdayAlertOn=誕生日アラートアクティブ BirthdayAlertOff=非アクティブな誕生日アラート -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 +TransKey=キーTransKeyの翻訳 +MonthOfInvoice=請求日の月(数字 1-12) +TextMonthOfInvoice=請求日の月(文字列) +PreviousMonthOfInvoice=請求日の前月(数字 1-12) +TextPreviousMonthOfInvoice=請求日の前月(文字列) +NextMonthOfInvoice=請求日の翌月(数字 1-12) +TextNextMonthOfInvoice=請求日の翌月(文字列) +PreviousMonth=前月 +CurrentMonth=今月 +ZipFileGeneratedInto=<b> %s</b>に生成されたZipファイル。 +DocFileGeneratedInto=<b> %s</b>に生成されたドキュメントファイル。 +JumpToLogin=切断された。ログインページに移動... +MessageForm=オンライン支払いフォームのメッセージ +MessageOK=確認済みの支払いの返品ページのメッセージ +MessageKO=キャンセルされた支払いの返品ページのメッセージ +ContentOfDirectoryIsNotEmpty=このディレクトリの内容は空ではない。 +DeleteAlsoContentRecursively=チェックすると、すべてのコンテンツが再帰的に削除される +PoweredBy=搭載 +YearOfInvoice=請求日の年 +PreviousYearOfInvoice=請求日の前年 +NextYearOfInvoice=請求日の翌年 +DateNextInvoiceBeforeGen=次の請求書の日付(生成前) +DateNextInvoiceAfterGen=次の請求書の日付(生成後) +GraphInBarsAreLimitedToNMeasures=Grapicsは、「バー」モードの%sメジャーに制限されています。代わりに、モード「ライン」が自動的に選択された。 +OnlyOneFieldForXAxisIsPossible=現在、X軸として使用できるフィールドは1つだけ 。最初に選択されたフィールドのみが選択されています。 +AtLeastOneMeasureIsRequired=測定には少なくとも1つのフィールドが必要 +AtLeastOneXAxisIsRequired=X軸には少なくとも1つのフィールドが必要 +LatestBlogPosts=最新のブログ投稿 +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_CLOSE_SIGNED=Customer proposal closed signed -Notify_PROPAL_CLOSE_REFUSED=Customer proposal closed refused +Notify_PROPAL_CLOSE_SIGNED=顧客提案は署名された +Notify_PROPAL_CLOSE_REFUSED=顧客の提案は拒否された Notify_PROPAL_SENTBYMAIL=電子メールによって送信された商業提案 Notify_WITHDRAW_TRANSMIT=伝送撤退 Notify_WITHDRAW_CREDIT=クレジット撤退 -Notify_WITHDRAW_EMIT=撤退を実行します。 +Notify_WITHDRAW_EMIT=撤退を実行する。 Notify_COMPANY_CREATE=第三者が作成した -Notify_COMPANY_SENTBYMAIL=Mails sent from third party card +Notify_COMPANY_SENTBYMAIL=サードパーティのカードから送信されたメール Notify_BILL_VALIDATE=顧客への請求書が検証さ -Notify_BILL_UNVALIDATE=Customer invoice unvalidated +Notify_BILL_UNVALIDATE=顧客の請求書は未検証 Notify_BILL_PAYED=顧客の請求書は支払済 Notify_BILL_CANCEL=顧客への請求書が取り消さ Notify_BILL_SENTBYMAIL=メールで送信された顧客への請求書 -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=ベンダーの請求書が検証された +Notify_BILL_SUPPLIER_PAYED=支払われたベンダーの請求書 +Notify_BILL_SUPPLIER_SENTBYMAIL=メールで送信されるベンダーの請求書 +Notify_BILL_SUPPLIER_CANCELED=ベンダーの請求書がキャンセルされた Notify_CONTRACT_VALIDATE=検証済みの契約 Notify_FICHINTER_VALIDATE=介入検証 -Notify_FICHINTER_ADD_CONTACT=Added contact to Intervention -Notify_FICHINTER_SENTBYMAIL=Intervention sent by mail +Notify_FICHINTER_ADD_CONTACT=介入への連絡先を追加 +Notify_FICHINTER_SENTBYMAIL=郵送による介入 Notify_SHIPPING_VALIDATE=送料は、検証 Notify_SHIPPING_SENTBYMAIL=電子メールによって送信された商品 Notify_MEMBER_VALIDATE=メンバー検証 -Notify_MEMBER_MODIFY=Member modified +Notify_MEMBER_MODIFY=メンバーが変更された Notify_MEMBER_SUBSCRIPTION=メンバー購読 -Notify_MEMBER_RESILIATE=Member terminated +Notify_MEMBER_RESILIATE=メンバーが終了した Notify_MEMBER_DELETE=メンバーが削除さ -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_PROJECT_CREATE=プロジェクトの作成 +Notify_TASK_CREATE=作成されたタスク +Notify_TASK_MODIFY=タスクが変更された +Notify_TASK_DELETE=タスクが削除された +Notify_EXPENSE_REPORT_VALIDATE=経費報告書が検証された(承認が必要 ) +Notify_EXPENSE_REPORT_APPROVE=経費報告書が承認された +Notify_HOLIDAY_VALIDATE=リクエストを検証したままにする(承認が必要 ) +Notify_HOLIDAY_APPROVE=リクエストを承認したままにする +Notify_ACTION_CREATE=アジェンダにアクションを追加 SeeModuleSetup=モジュール%sのセットアップを参照すること NbOfAttachedFiles=添付ファイル/文書の数 TotalSizeOfAttachedFiles=添付ファイル/文書の合計サイズ MaxSize=最大サイズ -AttachANewFile=新しいファイル/文書を添付する +AttachANewFile=新規ファイル/文書を添付する LinkedObject=リンクされたオブジェクト -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) +NbOfActiveNotifications=通知の数(受信者の電子メールの数) +PredefinedMailTest=__(こんにちは)__\nこれは__EMAIL__に送信されるテストメール 。\n行はキャリッジリターンで区切られる。\n\n__USER_SIGNATURE__ +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__ +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__ +PredefinedMailContentSendSupplierOrder=__(こんにちは)__\n\n添付の注文__REF__をご覧ください\n\n\n__(誠意をこめて)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendSupplierInvoice=__(こんにちは)__\n\n添付の請求書__REF__をご覧ください\n\n\n__(誠意をこめて)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendShipping=__(こんにちは)__\n\n添付の送料__REF__をご覧ください\n\n\n__(誠意をこめて)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendFichInter=__(こんにちは)__\n\n添付の介入__REF__を見つけること\n\n\n__(誠意をこめて)__\n\n__USER_SIGNATURE__ +PredefinedMailContentLink=まだ行っていない場合は、下のリンクをクリックして支払いを行うことができる。\n\n%s\n\n +PredefinedMailContentGeneric=__(こんにちは)__\n\n\n__(誠意をこめて)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendActionComm=__EVENT_DATE__の__EVENT_TIME__のイベントリマインダー「__EVENT_LABEL __」<br><br>これは自動メッセージ 。返信しないこと。 +DemoDesc=Dolibarrは、いくつかのビジネスモジュールをサポートするコンパクトなERP / CRM 。このシナリオは決して発生しないため、すべてのモジュールを紹介するデモは意味がない(数百が利用可能)。したがって、いくつかのデモプロファイルが利用可能 。 +ChooseYourDemoProfil=ニーズに最適なデモプロファイルを選択すること... +ChooseYourDemoProfilMore=...または独自のプロファイルを作成する<br>(手動モジュール選択) DemoFundation=基礎のメンバーを管理する DemoFundation2=基礎のメンバーとの銀行口座を管理する -DemoCompanyServiceOnly=Company or freelance selling service only +DemoCompanyServiceOnly=法人またはフリーランスの販売サービスのみ DemoCompanyShopWithCashDesk=現金デスクでお店を管理する -DemoCompanyProductAndStocks=Shop selling products with Point Of Sales -DemoCompanyManufacturing=Company manufacturing products -DemoCompanyAll=Company with multiple activities (all main modules) +DemoCompanyProductAndStocks=POSで製品を販売するショップ +DemoCompanyManufacturing=製品を製造する法人 +DemoCompanyAll=複数の活動を行う法人(すべてのメインモジュール) CreatedBy=%sによって作成された ModifiedBy=%sによって変更された ValidatedBy=%sによって検証 ClosedBy=%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=ファイルの%sは削除されました -DirWasRemoved=ディレクトリの%sは削除されました -FeatureNotYetAvailable=Feature not yet available in the current version -FeaturesSupported=Supported features +CreatedById=作成したユーザーID +ModifiedById=最新の変更を行ったユーザーID +ValidatedById=検証したユーザーID +CanceledById=キャンセルしたユーザーID +ClosedById=閉じたユーザーID +CreatedByLogin=作成したユーザーログイン +ModifiedByLogin=最新の変更を加えたユーザーログイン +ValidatedByLogin=検証したユーザーログイン +CanceledByLogin=キャンセルしたユーザーログイン +ClosedByLogin=閉じたユーザーログイン +FileWasRemoved=ファイルの%sは削除された +DirWasRemoved=ディレクトリの%sは削除された +FeatureNotYetAvailable=現在のバージョンではまだ利用できない機能 +FeaturesSupported=サポートされている機能 Width=幅 Height=高さ Depth=深さ @@ -138,17 +139,17 @@ Right=右 CalculatedWeight=計算された重み CalculatedVolume=計算されたボリューム Weight=重さ -WeightUnitton=tonne -WeightUnitkg=キロ -WeightUnitg=グラム -WeightUnitmg=ミリグラム +WeightUnitton=トン +WeightUnitkg=kg +WeightUnitg=g +WeightUnitmg=mg WeightUnitpound=ポンド WeightUnitounce=オンス Length=長さ -LengthUnitm=メートル -LengthUnitdm=DM -LengthUnitcm=センチメートル -LengthUnitmm=ミリメートル +LengthUnitm=m +LengthUnitdm=dm +LengthUnitcm=cm +LengthUnitmm=mm Surface=エリア SurfaceUnitm2=m² SurfaceUnitdm2=dm² @@ -166,122 +167,124 @@ VolumeUnitinch3=in³ VolumeUnitounce=オンス VolumeUnitlitre=リットル VolumeUnitgallon=ガロン -SizeUnitm=メートル -SizeUnitdm=DM -SizeUnitcm=センチメートル -SizeUnitmm=ミリメートル -SizeUnitinch=インチの -SizeUnitfoot=足 -SizeUnitpoint=point +SizeUnitm=m +SizeUnitdm=dm +SizeUnitcm=cm +SizeUnitmm=mm +SizeUnitinch=インチ +SizeUnitfoot=フィート +SizeUnitpoint=ポイント BugTracker=バグトラッカー -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=このフォームでは、新規パスワードをリクエストできる。それはあなたのメールアドレスに送られる。 <br>メール内の確認リンクをクリックすると、変更が有効になる。 <br>受信トレイを確認すること。 BackToLoginPage=ログインページに戻る -AuthenticationDoesNotAllowSendNewPassword=認証モードは<b>%s</b>です。 <br>このモードでは、Dolibarrは知ってもパスワードを変更することはできません。 <br>あなたのパスワードを変更する場合は、システム管理者に問い合わせてください。 -EnableGDLibraryDesc=Install or enable GD library on your PHP installation to use this option. -ProfIdShortDesc=<b>教授イド%sは、</b>サードパーティの国に応じて情報です。 <br>たとえば、国<b>%s</b>のために、それはコード<b>%s</b>です。 +AuthenticationDoesNotAllowSendNewPassword=認証モードは<b>%s</b> 。 <br>このモードでは、Dolibarrは知ってもパスワードを変更することはできません。 <br>あなたのパスワードを変更する場合は、システム管理者に問い合わせてください。 +EnableGDLibraryDesc=このオプションを使用するには、PHPインストールでGDライブラリをインストールまたは有効にする。 +ProfIdShortDesc=<b>教授イド%sは、</b>サードパーティの国に応じて情報 。 <br>たとえば、国<b>%s</b>のために、それはコード<b>%s</b> 。 DolibarrDemo=Dolibarr ERP / CRMデモ -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. +StatsByNumberOfUnits=製品/サービスの数量の合計の統計 +StatsByNumberOfEntities=参照エンティティの数の統計(請求書の数、または注文...) +NumberOfProposals=提案数 +NumberOfCustomerOrders=受注数 +NumberOfCustomerInvoices=顧客の請求書の数 +NumberOfSupplierProposals=ベンダー提案の数 +NumberOfSupplierOrders=注文書の数 +NumberOfSupplierInvoices=ベンダーの請求書の数 +NumberOfContracts=契約数 +NumberOfMos=製造受注数 +NumberOfUnitsProposals=提案のユニット数 +NumberOfUnitsCustomerOrders=販売注文のユニット数 +NumberOfUnitsCustomerInvoices=顧客の請求書のユニット数 +NumberOfUnitsSupplierProposals=ベンダー提案のユニット数 +NumberOfUnitsSupplierOrders=注文書のユニット数 +NumberOfUnitsSupplierInvoices=ベンダーの請求書のユニット数 +NumberOfUnitsContracts=契約ユニット数 +NumberOfUnitsMos=製造指図で生産するユニットの数 +EMailTextInterventionAddedContact=新規介入%sが割り当てられた。 EMailTextInterventionValidated=介入%sが検証されています。 -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. +EMailTextInvoiceValidated=請求書%sが検証された。 +EMailTextInvoicePayed=請求書%sが支払われた。 +EMailTextProposalValidated=提案%sが検証された。 +EMailTextProposalClosedSigned=提案%sはクローズドサインされた。 +EMailTextOrderValidated=注文%sが検証された。 +EMailTextOrderApproved=注文%sが承認された。 +EMailTextOrderValidatedBy=注文%sは%sによって記録された。 +EMailTextOrderApprovedBy=注文%sは%sによって承認された。 +EMailTextOrderRefused=注文%sは拒否された。 +EMailTextOrderRefusedBy=注文%sは%sによって拒否された。 +EMailTextExpeditionValidated=出荷%sが検証された。 +EMailTextExpenseReportValidated=経費報告書%sが検証された。 +EMailTextExpenseReportApproved=経費報告書%sが承認された。 +EMailTextHolidayValidated=休暇申請%sが検証された。 +EMailTextHolidayApproved=休暇申請%sが承認された。 +EMailTextActionAdded=アクション%sがアジェンダに追加された。 ImportedWithSet=輸入データセット DolibarrNotification=自動通知 -ResizeDesc=新しい幅<b>または</b>新しい高さを入力します。比率は、サイズ変更時に保持されます... -NewLength=新しい幅 -NewHeight=新しい高さ -NewSizeAfterCropping=トリミング後の新しいサイズ -DefineNewAreaToPick=(あなたが反対側の角に達するまで、イメージ上で左クリックをドラッグ)選択するには、画像を新たな領域を定義します。 -CurrentInformationOnImage=This tool was designed to help you to resize or crop an image. This is the information on the current edited image +ResizeDesc=新規幅<b>または</b>新規高さを入力する。比率は、サイズ変更時に保持される... +NewLength=新規幅 +NewHeight=新規高さ +NewSizeAfterCropping=トリミング後の新規サイズ +DefineNewAreaToPick=(あなたが反対側の角に達するまで、イメージ上で左クリックをドラッグ)選択するには、画像を新たな領域を定義する。 +CurrentInformationOnImage=このツールは、画像のサイズ変更やトリミングに役立つように設計されています。これは現在編集されている画像に関する情報 ImageEditor=イメージエディタ -YouReceiveMailBecauseOfNotification=あなたのメールアドレスは%sの%sソフトウェアに特定のイベントを通知されるターゲットのリストに追加されているため、このメッセージが表示されます。 -YouReceiveMailBecauseOfNotification2=このイベントは次のとおりです。 -ThisIsListOfModules=これは、このデモ·プロファイル(唯一の最も一般的なモジュールは、このデモに表示されます)によって事前に選択したモジュールのリストです。よりパーソナライズされたデモを持って、これを編集し、 &quot;スタート&quot;をクリックしてください。 +YouReceiveMailBecauseOfNotification=あなたのメールアドレスは%sの%sソフトウェアに特定のイベントを通知されるターゲットのリストに追加されているため、このメッセージが表示される。 +YouReceiveMailBecauseOfNotification2=このイベントは次のとおり 。 +ThisIsListOfModules=これは、このデモ·プロファイル(唯一の最も一般的なモジュールは、このデモに表示される)によって事前に選択したモジュールのリスト 。よりパーソナライズされたデモを持って、これを編集し、 &quot;スタート&quot;をクリックすること。 UseAdvancedPerms=いくつかのモジュールの高度な権限を使用する FileFormat=ファイル形式 -SelectAColor=色を選択してください +SelectAColor=色を選択すること AddFiles=ファイルを追加 StartUpload=アップロード開始 CancelUpload=アップロードをキャンセル FileIsTooBig=ファイルが大きすぎる PleaseBePatient=しばらくお待ちください... -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 -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 +NewPassword=新規パスワード +ResetPassword=パスワードを再設定する +RequestToResetPasswordReceived=パスワードの変更リクエストを受け取りた。 +NewKeyIs=これはログインするための新規キー +NewKeyWillBe=ソフトウェアにログインするための新規キーは次のようになる +ClickHereToGoTo=%sに移動するには、ここをクリックすること +YouMustClickToChange=ただし、このパスワードの変更を検証するには、最初に次のリンクをクリックする必要がある +ForgetIfNothing=この変更をリクエストしなかった場合は、このメールを忘れてください。あなたの資格情報は安全に保たれる。 +IfAmountHigherThan=<strong> %s</strong>よりも多い場合 +SourcesRepository=ソースのリポジトリ +Chart=チャート +PassEncoding=パスワードエンコーディング +PermissionsAdd=追加された権限 +PermissionsDelete=権限が削除された +YourPasswordMustHaveAtLeastXChars=パスワードには、少なくとも<strong> %s</strong>文字が必要 。 +YourPasswordHasBeenReset=パスワードは正常にリセットされた +ApplicantIpAddress=申請者のIPアドレス +SMSSentTo=SMSが%sに送信された +MissingIds=IDがない +ThirdPartyCreatedByEmailCollector=電子メールMSGID%sから電子メールコレクターによって作成されたサードパーティ +ContactCreatedByEmailCollector=メールMSGID%sからメールコレクターによって作成された連絡先/アドレス +ProjectCreatedByEmailCollector=メールMSGID%sからメールコレクターによって作成されたプロジェクト +TicketCreatedByEmailCollector=メールMSGID%sからメールコレクターによって作成されたチケット +OpeningHoursFormatDesc=-を使用して、営業時間と営業時間を区切る。 <br>スペースを使用してさまざまな範囲を入力する。 <br>例:8-12 14-18 +PrefixSession=セッションIDのプレフィックス ##### Export ##### ExportsArea=輸出地域 AvailableFormats=利用可能なフォーマット LibraryUsed=ライブラリを使用 -LibraryVersion=Library version +LibraryVersion=ライブラリバージョン ExportableDatas=エクスポート可能なデータ -NoExportableData=いいえ、エクスポートデータがありません(ロード、エクスポートデータ、または欠落権限を持つモジュールなし) +NoExportableData=いいえ、エクスポートデータがない(ロード、エクスポートデータ、または欠落権限を持つモジュールなし) ##### External sites ##### -WebsiteSetup=Setup of module website -WEBSITE_PAGEURL=URL of page +WebsiteSetup=モジュールのウェブサイトのセットアップ +WEBSITE_PAGEURL=ページのURL WEBSITE_TITLE=タイトル WEBSITE_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 +WEBSITE_IMAGE=画像 +WEBSITE_IMAGEDesc=画像メディアの相対パス。これはめったに使用されないため、これを空のままにしておくことができる(動的コンテンツで使用して、ブログ投稿のリストにサムネイルを表示できる)。パスがWebサイト名に依存する場合は、パスに__WEBSITE_KEY__を使用する(例:image / __ WEBSITE_KEY __ / stories / myimage.png)。 +WEBSITE_KEYWORDS=キーワード +LinesToImport=インポートする行 -MemoryUsage=Memory usage -RequestDuration=Duration of request -ProductsPerPopularity=Products/Services by popularity -PopuProp=Products/Services by popularity in Proposals -PopuCom=Products/Services by popularity in Orders -ProductStatistics=Products/Services Statistics -NbOfQtyInOrders=Qty in orders -SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... +MemoryUsage=メモリ使用量 +RequestDuration=リクエストの期間 +ProductsPerPopularity=人気別の製品/サービス +PopuProp=提案の人気による製品/サービス +PopuCom=注文の人気別の製品/サービス +ProductStatistics=製品/サービス統計 +NbOfQtyInOrders=注文数量 +SelectTheTypeOfObjectToAnalyze=分析するオブジェクトのタイプを選択する... diff --git a/htdocs/langs/ja_JP/paybox.lang b/htdocs/langs/ja_JP/paybox.lang index d11d36a329f..76f95e52bf4 100644 --- a/htdocs/langs/ja_JP/paybox.lang +++ b/htdocs/langs/ja_JP/paybox.lang @@ -1,31 +1,30 @@ # Dolibarr language file - Source file is en_US - paybox -PayBoxSetup=PayBoxモジュールのセットアップ -PayBoxDesc=このモジュールは、上の支払いを可能にするためにページを提供して<a href="http://www.paybox.com" target="_blank">切符売り場</a>の顧客によって。これはフリーの支払いのためにまたは特定のDolibarrオブジェクトの支払いに用いることができる(請求書、発注、...) -FollowingUrlAreAvailableToMakePayments=以下のURLはDolibarrオブジェクト上で支払いをするために顧客にページを提供するために利用可能です +PayBoxSetup=PayBoxモジュールの設定 +PayBoxDesc=このモジュールは、上の支払いを可能にするためにページを提供して<a href="http://www.paybox.com" target="_blank">切符売り場</a>の顧客によって。これはフリーの支払いのためにまたは特定のDolibarrオブジェクトの支払いに用いることができる(請求書、発注、...) +FollowingUrlAreAvailableToMakePayments=以下のURLはDolibarrオブジェクト上で支払いをするために顧客にページを提供するために利用可能 PaymentForm=支払い形態 -WelcomeOnPaymentPage=Welcome to our online payment service +WelcomeOnPaymentPage=オンライン決済サービスへようこそ ThisScreenAllowsYouToPay=この画面では、%sにオンライン決済を行うことができます。 -ThisIsInformationOnPayment=これは、実行する支払いに関する情報です。 +ThisIsInformationOnPayment=これは、実行する支払いに関する情報。 ToComplete=完了する YourEMail=入金確認を受信する電子メール Creditor=債権者 PaymentCode=支払いコード -PayBoxDoPayment=Pay with Paybox -YouWillBeRedirectedOnPayBox=あなたが入力するクレジットカード情報をセキュリティで保護された切符売り場のページにリダイレクトされます。 +PayBoxDoPayment=Payboxで支払う +YouWillBeRedirectedOnPayBox=あなたが入力するクレジットカード情報をセキュリティで保護された切符売り場のページにリダイレクトされる。 Continue=次の -SetupPayBoxToHavePaymentCreatedAutomatically=Setup your Paybox with url <b>%s</b> to have payment created automatically when validated by Paybox. +SetupPayBoxToHavePaymentCreatedAutomatically=Payboxによる検証時に支払いが自動的に作成されるように、URL <b> %s</b>を使用してPayboxを設定します。 YourPaymentHasBeenRecorded=このページでは、あなたの支払が記録されていることを確認します。ありがとうございます。 -YourPaymentHasNotBeenRecorded=Your payment has NOT been recorded and the transaction has been canceled. Thank you. +YourPaymentHasNotBeenRecorded=お支払いは記録されておらず、取引はキャンセルされています。ありがとうございます。 AccountParameter=アカウントのパラメータ UsageParameter=使用パラメータ InformationToFindParameters=あなたの%sアカウント情報を見つけるのを助ける PAYBOX_CGI_URL_V2=支払いのために切符売り場CGIモジュールのurl -VendorName=ベンダーの名前 CSSUrlForPaymentForm=支払いフォームのCSSスタイルシートのURL -NewPayboxPaymentReceived=新しいPaybox支払を受け取りました -NewPayboxPaymentFailed=新しいPaybox支払を試みましたが失敗しました -PAYBOX_PAYONLINE_SENDEMAIL=Email notification after payment attempt (success or fail) +NewPayboxPaymentReceived=新規Paybox支払を受け取った +NewPayboxPaymentFailed=新規Paybox支払を試みましたが失敗した +PAYBOX_PAYONLINE_SENDEMAIL=支払い試行後の電子メール通知(成功または失敗) PAYBOX_PBX_SITE=PBX SITEの値 PAYBOX_PBX_RANG=PBX Rangの値 PAYBOX_PBX_IDENTIFIANT=PBX IDの値 -PAYBOX_HMAC_KEY=HMAC key +PAYBOX_HMAC_KEY=HMACキー diff --git a/htdocs/langs/ja_JP/paypal.lang b/htdocs/langs/ja_JP/paypal.lang index e3b365f3c2d..2e133b207a4 100644 --- a/htdocs/langs/ja_JP/paypal.lang +++ b/htdocs/langs/ja_JP/paypal.lang @@ -1,36 +1,36 @@ # Dolibarr language file - Source file is en_US - paypal PaypalSetup=ペイパルモジュールのセットアップ -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 +PaypalDesc=このモジュールでは、<a href="http://www.paypal.com" target="_blank"> PayPal</a>を介した顧客による支払いが可能です。これは、アドホック支払いまたはDolibarrオブジェクト(請求書、注文など)に関連する支払いに使用できる。 +PaypalOrCBDoPayment=PayPalで支払う(カードまたはPayPal) +PaypalDoPayment=PayPalで支払う PAYPAL_API_SANDBOX=モード試験/サンドボックス PAYPAL_API_USER=API名 PAYPAL_API_PASSWORD=APIパスワード PAYPAL_API_SIGNATURE=APIの署名 -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 +PAYPAL_SSLVERSION=カールSSLバージョン +PAYPAL_API_INTEGRAL_OR_PAYPALONLY=「統合」支払い(クレジットカード+ PayPal)または「PayPal」のみを提供 +PaypalModeIntegral=統合 +PaypalModeOnlyPaypal=PayPalのみ +ONLINE_PAYMENT_CSS_URL=オンライン支払いページのCSSスタイルシートのオプションのURL ThisIsTransactionId=<b>%s:</b>これは、トランザクションのIDです。 -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 +PAYPAL_ADD_PAYMENT_URL=メールでドキュメントを送信するときは、PayPalの支払いURLを含めること +NewOnlinePaymentReceived=受け取った新規オンライン支払い +NewOnlinePaymentFailed=新規オンライン支払いが試行されたが失敗した +ONLINE_PAYMENT_SENDEMAIL=各支払い試行後の通知の電子メールアドレス(成功および失敗の場合) +ReturnURLAfterPayment=支払い後にURLを返す +ValidationOfOnlinePaymentFailed=オンライン支払いの検証に失敗した +PaymentSystemConfirmPaymentPageWasCalledButFailed=支払いシステムによって支払い確認ページが呼び出され、エラーが返された +SetExpressCheckoutAPICallFailed=SetExpressCheckoutAPI呼び出しが失敗した。 +DoExpressCheckoutPaymentAPICallFailed=DoExpressCheckoutPaymentAPI呼び出しが失敗した。 +DetailedErrorMessage=詳細なエラーメッセージ +ShortErrorMessage=短いエラーメッセージ +ErrorCode=エラーコード +ErrorSeverityCode=エラー重大度コード +OnlinePaymentSystem=オンライン決済システム +PaypalLiveEnabled=PayPalの「ライブ」モードが有効になっています(それ以外の場合はテスト/サンドボックスモード) +PaypalImportPayment=PayPal支払いをインポートする +PostActionAfterPayment=支払い後にアクションを投稿する +ARollbackWasPerformedOnPostActions=すべてのPostアクションでロールバックが実行された。必要に応じて、投稿アクションを手動で完了する必要があります。 +ValidationOfPaymentFailed=支払いの検証に失敗した +CardOwner=カードホルダー +PayPalBalance=ペイパルクレジット diff --git a/htdocs/langs/ja_JP/products.lang b/htdocs/langs/ja_JP/products.lang index eb217d12ba6..6357a357c87 100644 --- a/htdocs/langs/ja_JP/products.lang +++ b/htdocs/langs/ja_JP/products.lang @@ -107,8 +107,9 @@ ServiceLimitedDuration=製品は、限られた期間を持つサービスの場 FillWithLastServiceDates=最後のサービスラインの日付を入力 MultiPricesAbility=製品/サービスごとに複数の価格セグメント(各顧客は1つの価格セグメントに含まれる) MultiPricesNumPrices=価格数 -DefaultPriceType=新しい販売価格を追加するときのデフォルトあたりの価格のベース(税込みと税抜き) -AssociatedProductsAbility=キット(仮想製品)をアクティブ化 +DefaultPriceType=新規販売価格を追加するときのデフォルトあたりの価格のベース(税込みと税抜き) +AssociatedProductsAbility=キットを有効にする(いくつかの製品セット) +VariantsAbility=バリエーションを有効にする(色、サイズなどの製品バリエーション) AssociatedProducts=キット AssociatedProductsNumber=このキットを構成する製品の数 ParentProductsNumber=親包装製品の数 @@ -167,8 +168,10 @@ BuyingPrices=購入価格 CustomerPrices=顧客価格 SuppliersPrices=仕入先価格 SuppliersPricesOfProductsOrServices=(製品またはサービスの)仕入先価格 -CustomCode=税関/製品/ HSコード +CustomCode=税関|商品| HSコード CountryOrigin=原産国 +RegionStateOrigin=地域 原産地 +StateOrigin=州|県 原産地 Nature=製品の性質(素材/完成品) NatureOfProductShort=製品の性質 NatureOfProductDesc=原材料または完成品 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=固定価格を使用する PriceByQuantity=数量による異なる価格 DisablePriceByQty=数量で価格を無効にする PriceByQuantityRange=数量範囲 -MultipriceRules=価格セグメントルール +MultipriceRules=セグメントの自動価格 UseMultipriceRules=価格セグメントルール(製品モジュールのセットアップで定義)を使用して、最初のセグメントに従って他のすべてのセグメントの価格を自動計算する PercentVariationOver=%sに対する%%の変動 PercentDiscountOver=%sに対する%%割引 @@ -268,7 +271,7 @@ DefinitionOfBarCodeForProductNotComplete=製品%sのバーコードのタイプ DefinitionOfBarCodeForThirdpartyNotComplete=サードパーティ%sのバーコードのタイプまたは値の定義が不完全です。 BarCodeDataForProduct=製品%sのバーコード情報: BarCodeDataForThirdparty=サードパーティのバーコード情報%s: -ResetBarcodeForAllRecords=すべてのレコードのバーコード値を定義する(これにより、新しい値ですでに定義されているバーコード値もリセットされる) +ResetBarcodeForAllRecords=すべてのレコードのバーコード値を定義する(これにより、新規値ですでに定義されているバーコード値もリセットされる) PriceByCustomer=顧客ごとに異なる価格 PriceCatalogue=製品/サービスごとの単一の販売価格 PricingRule=販売価格のルール @@ -356,9 +359,9 @@ ProductCombinations=バリアント PropagateVariant=バリアントの伝播 HideProductCombinations=製品セレクタで製品バリアントを非表示にする ProductCombination=バリアント -NewProductCombination=新しいバリアント +NewProductCombination=新規バリアント EditProductCombination=バリアントの編集 -NewProductCombinations=新しい亜種 +NewProductCombinations=新規亜種 EditProductCombinations=バリアントの編集 SelectCombination=組み合わせを選択 ProductCombinationGenerator=バリアントジェネレータ @@ -368,10 +371,10 @@ ImpactOnPriceLevel=価格水準への影響%s ApplyToAllPriceImpactLevel= すべてのレベルに適用 ApplyToAllPriceImpactLevelHelp=ここをクリックすると、すべてのレベルで同じ価格の影響を設定できる WeightImpact=重量への影響 -NewProductAttribute=新しい属性 -NewProductAttributeValue=新しい属性値 +NewProductAttribute=新規属性 +NewProductAttributeValue=新規属性値 ErrorCreatingProductAttributeValue=属性値の作成中にエラーが発生した。その参照を持つ既存の値がすでに存在するためである可能性がある -ProductCombinationGeneratorWarning=続行すると、新しいバリアントを生成前に、以前のバリアントはすべて削除される。既存のものは新しい値で更新される +ProductCombinationGeneratorWarning=続行すると、新規バリアントを生成前に、以前のバリアントはすべて削除される。既存のものは新規値で更新される TooMuchCombinationsWarning=多数のバリアントを生成と、CPU、メモリ使用量が高くなり、Dolibarrがそれらを作成できなくなる可能性がある。オプション「%s」を有効にすると、メモリ使用量を減らすのに役立つ場合がある。 DoNotRemovePreviousCombinations=以前のバリアントを削除しないこと UsePercentageVariations=パーセンテージバリエーションを使用 diff --git a/htdocs/langs/ja_JP/projects.lang b/htdocs/langs/ja_JP/projects.lang index 62bd0dc7d19..1f6b71c6b85 100644 --- a/htdocs/langs/ja_JP/projects.lang +++ b/htdocs/langs/ja_JP/projects.lang @@ -8,24 +8,24 @@ ProjectStatus=プロジェクトの状況 SharedProject=皆 PrivateProject=プロジェクトの連絡先 ProjectsImContactFor=私が明示的に連絡を取っているプロジェクト -AllAllowedProjects=私が読むことができるすべてのプロジェクト(私の+公開) +AllAllowedProjects=私が読むことができるすべてのプロジェクト(私の+公開) AllProjects=すべてのプロジェクト MyProjectsDesc=このビューは、連絡先のプロジェクトに限定される ProjectsPublicDesc=このビューには、読み取りを許可されているすべてのプロジェクトを紹介します。 TasksOnProjectsPublicDesc=このビューには、読み取りが許可されているプロジェクトのすべてのタスクが表示される。 ProjectsPublicTaskDesc=このビューには、読み取りを許可されているすべてのプロジェクトやタスクを示します。 -ProjectsDesc=このビューはすべてのプロジェクトを(あなたのユーザー権限はあなたに全てを表示する権限を付与)を提示します。 -TasksOnProjectsDesc=このビューには、すべてのプロジェクトのすべてのタスクが表示される(ユーザー権限により、すべてを表示する権限が付与される)。 +ProjectsDesc=このビューはすべてのプロジェクトを(あなたのユーザー権限はあなたに全てを表示する権限を付与)を提示します。 +TasksOnProjectsDesc=このビューには、すべてのプロジェクトのすべてのタスクが表示される(ユーザー権限により、すべてを表示する権限が付与される)。 MyTasksDesc=このビューは、連絡先のプロジェクトまたはタスクに限定される -OnlyOpenedProject=開いているプロジェクトのみが表示される(ドラフトまたはクローズステータスのプロジェクトは表示されない)。 +OnlyOpenedProject=開いているプロジェクトのみが表示される(ドラフトまたはクローズステータスのプロジェクトは表示されない)。 ClosedProjectsAreHidden=閉じたプロジェクトは表示されない。 TasksPublicDesc=このビューには、読み取りを許可されているすべてのプロジェクトやタスクを示します。 -TasksDesc=このビューは、すべてのプロジェクトとタスク(あなたのユーザー権限はあなたに全てを表示する権限を付与)を提示します。 +TasksDesc=このビューは、すべてのプロジェクトとタスク(あなたのユーザー権限はあなたに全てを表示する権限を付与)を提示します。 AllTaskVisibleButEditIfYouAreAssigned=資格のあるプロジェクトのすべてのタスクが表示されるが、選択したユーザーに割り当てられたタスクの時間のみを入力できる。時間を入力する必要がある場合は、タスクを割り当てる。 OnlyYourTaskAreVisible=自分に割り当てられたタスクのみが表示される。タスクが表示されておらず、時間を入力する必要がある場合は、自分にタスクを割り当てる。 ImportDatasetTasks=プロジェクトのタスク ProjectCategories=プロジェクトタグ/カテゴリ -NewProject=新しいプロジェクト +NewProject=新規プロジェクト AddProject=プロジェクトを作成する DeleteAProject=プロジェクトを削除します。 DeleteATask=タスクを削除する @@ -65,7 +65,7 @@ Task=タスク TaskDateStart=タスク開始日 TaskDateEnd=タスクの終了日 TaskDescription=タスクの説明 -NewTask=新しいタスク +NewTask=新規タスク AddTask=タスクを作成する AddTimeSpent=費やした時間を作成する AddHereTimeSpentForDay=この日/タスクに費やした時間をここに追加する @@ -85,6 +85,7 @@ ProgressCalculated=消費の進捗状況 WhichIamLinkedTo=私がリンクしている WhichIamLinkedToProject=私はプロジェクトにリンクしています Time=時間 +TimeConsumed=消費 ListOfTasks=タスクのリスト GoToListOfTimeConsumed=消費時間のリストに移動 GanttView=ガントビュー @@ -115,12 +116,12 @@ ChildOfTask=タスクの子 TaskHasChild=タスクには子がある NotOwnerOfProject=この民間プロジェクトの所有者でない AffectedTo=に割り当てられた -CantRemoveProject=このプロジェクトは、他のオブジェクト(請求書、注文など)によって参照されているため、削除できません。タブ「%s」を参照すること。 +CantRemoveProject=このプロジェクトは、他のオブジェクト(請求書、注文など)によって参照されているため、削除できません。タブ「%s」を参照すること。 ValidateProject=挙を検証する ConfirmValidateProject=このプロジェクトを検証してもよいか? CloseAProject=プロジェクトを閉じる ConfirmCloseAProject=このプロジェクトを終了してもよいか? -AlsoCloseAProject=また、プロジェクトを閉じます(それでも本番タスクを実行する必要がある場合は、開いたままにする) +AlsoCloseAProject=また、プロジェクトを閉じます(それでも本番タスクを実行する必要がある場合は、開いたままにする) ReOpenAProject=開いているプロジェクト ConfirmReOpenAProject=このプロジェクトを再開してもよいか? ProjectContact=プロジェクトの連絡先 @@ -138,13 +139,13 @@ NoTasks=このプロジェクトのための作業をしない LinkedToAnotherCompany=他の第三者へのリンク TaskIsNotAssignedToUser=タスクがユーザーに割り当てられていない。ボタン '<strong> %s </strong>'を使用して、今すぐタスクを割り当てる。 ErrorTimeSpentIsEmpty=費やした時間は空です -ThisWillAlsoRemoveTasks=このアクションは、プロジェクトのすべてのタスク(現時点では<b>%s</b>タスク)と過ごした時間のすべての入力を削除します。 -IfNeedToUseOtherObjectKeepEmpty=いくつかのオブジェクト(請求書、注文、...)、別の第三者に属するが、作成するプロジェクトにリンクする必要がある場合は、複数の取引先中のプロジェクトを持っているこの空を保持します。 +ThisWillAlsoRemoveTasks=このアクションは、プロジェクトのすべてのタスク(現時点では<b>%s</b>タスク)と過ごした時間のすべての入力を削除します。 +IfNeedToUseOtherObjectKeepEmpty=いくつかのオブジェクト(請求書、注文、...)、別の第三者に属するが、作成するプロジェクトにリンクする必要がある場合は、複数の取引先中のプロジェクトを持っているこの空を保持します。 CloneTasks=クローンタスク CloneContacts=連絡先のクローン CloneNotes=クローンノート CloneProjectFiles=プロジェクトに参加したファイルのクローンを作成する -CloneTaskFiles=ファイルを結合したタスク(s)をクローンする(タスク(s)がクローンされた場合) +CloneTaskFiles=ファイルを結合したタスク(s)をクローンする(タスク(s)がクローンされた場合) CloneMoveDate=今からプロジェクト/タスクの日付を更新するか? ConfirmCloneProject=このプロジェクトのクローンを作成してもよいか? ProjectReportDate=新規プロジェクトの開始日に応じてタスクの日付を変更する @@ -205,7 +206,7 @@ AssignTaskToUser=タスクを%sに割り当てる SelectTaskToAssign=割り当てるタスクを選択すること... AssignTask=割当 ProjectOverview=概要概要 -ManageTasks=プロジェクトを使用して、タスクを追跡したり、費やした時間を報告したりする(タイムシート) +ManageTasks=プロジェクトを使用して、タスクを追跡したり、費やした時間を報告したりする(タイムシート) ManageOpportunitiesStatus=プロジェクトを使用してリード/機会をフォローする ProjectNbProjectByMonth=月ごとに作成されたプロジェクトの数 ProjectNbTaskByMonth=月ごとに作成されたタスクの数 @@ -233,11 +234,11 @@ OppStatusPENDING=保留中 OppStatusWON=勝った OppStatusLOST=失われた Budget=予算 -AllowToLinkFromOtherCompany=他の会社のプロジェクトのリンクを許可する <br><br><u>サポートされる値:</u><br>- 空のままにする: 会社の任意のプロジェクトをリンクできる(デフォルト)<br>- "すべて": 任意のプロジェクトをリンクできる、たとえ他の法人のプロジェクトであっても <br>- カンマ区切りの取引先ID: これらの取引先のすべてのプロジェクトをリンクできる(例:123,4795,53)<br> +AllowToLinkFromOtherCompany=他の会社のプロジェクトのリンクを許可する <br><br><u>サポートされる値:</u><br>- 空のままにする: 会社の任意のプロジェクトをリンクできる(デフォルト)<br>- "すべて": 任意のプロジェクトをリンクできる、たとえ他の法人のプロジェクトであっても <br>- カンマ区切りの取引先ID: これらの取引先のすべてのプロジェクトをリンクできる(例:123,4795,53)<br> LatestProjects=最新の%sプロジェクト LatestModifiedProjects=最新の%s変更プロジェクト OtherFilteredTasks=その他のフィルタリングされたタスク -NoAssignedTasks=割り当てられたタスクが見つかりません(上部の選択ボックスから現在のユーザーにプロジェクト/タスクを割り当てて、時間を入力する) +NoAssignedTasks=割り当てられたタスクが見つかりません(上部の選択ボックスから現在のユーザーにプロジェクト/タスクを割り当てて、時間を入力する) ThirdPartyRequiredToGenerateInvoice=プロジェクトに請求できるようにするには、プロジェクトで取引先を定義する必要がある。 ChooseANotYetAssignedTask=まだ割り当てられていないタスクを選択すること # Comments trans @@ -254,7 +255,7 @@ TimeSpentForInvoice=に費や​​された時間は OneLinePerUser=ユーザーごとに1行 ServiceToUseOnLines=回線で利用するサービス InvoiceGeneratedFromTimeSpent=請求書%sは、プロジェクトに費やされた時間から生成された -ProjectBillTimeDescription=プロジェクトのタスクにタイムシートを入力し、タイムシートから請求書(s)を生成してプロジェクトの顧客に請求する予定があるかどうかを確認する(入力したタイムシートに基づかない請求書を作成する予定があるかどうかは確認しないこと)。注:請求書を生成するには、プロジェクトの"費やした時間"タブに移動し、含める行を選択する。 +ProjectBillTimeDescription=プロジェクトのタスクにタイムシートを入力し、タイムシートから請求書(s)を生成してプロジェクトの顧客に請求する予定があるかどうかを確認する(入力したタイムシートに基づかない請求書を作成する予定があるかどうかは確認しないこと)。注:請求書を生成するには、プロジェクトの"費やした時間"タブに移動し、含める行を選択する。 ProjectFollowOpportunity=機会を追う ProjectFollowTasks=タスクまたは費やした時間をフォローする Usage=使用法 @@ -262,7 +263,7 @@ UsageOpportunity=使用法:機会 UsageTasks=使用法:タスク UsageBillTimeShort=使用法:請求時間 InvoiceToUse=使用する請求書のドラフト -NewInvoice=新しい請求書 +NewInvoice=新規請求書 OneLinePerTask=タスクごとに1行 OneLinePerPeriod=期間ごとに1行 RefTaskParent=参照符号親タスク diff --git a/htdocs/langs/ja_JP/propal.lang b/htdocs/langs/ja_JP/propal.lang index 373ac4a2ce2..16cd30b6bfa 100644 --- a/htdocs/langs/ja_JP/propal.lang +++ b/htdocs/langs/ja_JP/propal.lang @@ -1,69 +1,68 @@ # Dolibarr language file - Source file is en_US - propal -Proposals=商用の提案 -Proposal=商業的提案 -ProposalShort=提案 -ProposalsDraft=ドラフト商業の提案 -ProposalsOpened=Open commercial proposals -CommercialProposal=商業的提案 -PdfCommercialProposalTitle=商業的提案 -ProposalCard=提案カード -NewProp=新しい商業提案 -NewPropal=新たな提案 +Proposals=売買契約提案書 +Proposal=売買契約提案書 +ProposalShort=提案書 +ProposalsDraft=下書き売買契約提案書 +ProposalsOpened=オープンな商業提案書 +CommercialProposal=売買契約提案書 +PdfCommercialProposalTitle=売買契約提案書 +ProposalCard=提案書カード +NewProp=新規商業提案書 +NewPropal=新たな提案書 Prospect=見通し -DeleteProp=商業的提案を削除します。 -ValidateProp=商業的提案を検証する -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=すべての提案 -SearchAProposal=提案を検索 -NoProposal=No proposal -ProposalsStatistics=商業的な提案の統計 -NumberOfProposalsByMonth=月ごとに数 -AmountOfProposalsByMonthHT=Amount by month (excl. tax) -NbOfProposals=商業的提案の数 -ShowPropal=提案を示す -PropalsDraft=ドラフト +DeleteProp=売買契約提案書を削除する。 +ValidateProp=売買契約提案書を検証する +AddProp=提案書を作成する +ConfirmDeleteProp=この売買契約提案書を削除してもよいか? +ConfirmValidateProp=この売買契約提案書を <b>%s </b>という名前で検証してもよいか? +LastPropals=最新の%s提案書 +LastModifiedProposals=最新の%s変更された提案書 +AllPropals=すべての提案書 +SearchAProposal=提案書を検索 +NoProposal=提案書なし +ProposalsStatistics=商業的な提案書の統計 +NumberOfProposalsByMonth=月ごとの数 +AmountOfProposalsByMonthHT=月別金額(税込) +NbOfProposals=売買契約提案書の数 +ShowPropal=提案書を示す +PropalsDraft=下書き PropalsOpened=開く -PropalStatusDraft=ドラフト(検証する必要があります) -PropalStatusValidated=(提案が開いている)を検証 -PropalStatusSigned=(要請求)署名 -PropalStatusNotSigned=(クローズ)署名されていません +PropalStatusDraft=下書き(検証する必要がある) +PropalStatusValidated=(提案書が開いている)を検証 +PropalStatusSigned=(要請求)署名 +PropalStatusNotSigned=(クローズ)署名されていない PropalStatusBilled=請求 -PropalStatusDraftShort=ドラフト -PropalStatusValidatedShort=Validated (open) +PropalStatusDraftShort=下書き +PropalStatusValidatedShort=検証済み(オープン) PropalStatusClosedShort=閉じた PropalStatusSignedShort=署名された PropalStatusNotSignedShort=署名されていない PropalStatusBilledShort=請求 -PropalsToClose=閉じるには、商用の提案 -PropalsToBill=法案に署名した商業の提案 -ListOfProposals=商業的提案のリスト -ActionsOnPropal=提案のイベント -RefProposal=商業的な提案のref -SendPropalByMail=メールでの商用の提案を送る +PropalsToClose=閉じるには、売買契約提案書 +PropalsToBill=法案に署名した売買契約提案書 +ListOfProposals=売買契約提案書のリスト +ActionsOnPropal=提案書のイベント +RefProposal=商業的な提案書のref +SendPropalByMail=メールでの売買契約提案書を送る DatePropal=提案書の日付 DateEndPropal=日付の最後の有効性 ValidityDuration=有効期間 -CloseAs=Set status to -SetAcceptedRefused=Set accepted/refused -ErrorPropalNotFound=Propalの%sが見つかりません -AddToDraftProposals=Add to draft proposal -NoDraftProposals=No draft proposals -CopyPropalFrom=既存のプロポーザルをコピーして、商用の提案を作成します。 -CreateEmptyPropal=Create empty commercial proposal or from list of products/services -DefaultProposalDurationValidity=デフォルトの商業提案の有効期間(日数) -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=商業的提案や行 -ProposalLine=提案ライン +SetAcceptedRefused=承認/拒否の設定 +ErrorPropalNotFound=Propalの%sが見つからない +AddToDraftProposals=提案書案に追加 +NoDraftProposals=提案書案はない +CopyPropalFrom=既存のプロポーザルをコピーして、売買契約提案書を作成する。 +CreateEmptyPropal=空の売買契約提案書を作成するか、製品/サービスのリストから作成する +DefaultProposalDurationValidity=デフォルトの商業提案書の有効期間(日数) +UseCustomerContactAsPropalRecipientIfExist=プロポーザルの受信者アドレスとしてサードパーティのアドレスの代わりに定義されている場合は、タイプ「連絡先フォローアッププロポーザル」の連絡先/アドレスを使用する +ConfirmClonePropal=売買契約提案書 <b>%s </b>のクローンを作成してもよいか? +ConfirmReOpenProp=売買契約提案書 <b>%s </b>を開いてよいか? +ProposalsAndProposalsLines=売買契約提案書や行 +ProposalLine=提案書ライン AvailabilityPeriod=可用性の遅延 SetAvailability=可用性の遅延を設定 AfterOrder=ご注文後 -OtherProposals=他の提案 +OtherProposals=他の提案書 ##### Availability ##### AvailabilityTypeAV_NOW=即時の AvailabilityTypeAV_1W=1週間 @@ -71,21 +70,22 @@ 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_SHIPPING=Customer contact for delivery +TypeContact_propal_external_CUSTOMER=顧客の連絡先フォローアップ提案書 +TypeContact_propal_external_SHIPPING=配達のための顧客の連絡先 # 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) +DocModelAzurDescription=完全な提案書モデル(シアンテンプレートの古い実装) +DocModelCyanDescription=完全な提案書モデル +DefaultModelPropalCreate=デフォルトのモデル作成 +DefaultModelPropalToBill=ビジネスプロポーザルを閉じるときのデフォルトテンプレート(請求対象) +DefaultModelPropalClosed=ビジネスプロポーザルを閉じるときのデフォルトテンプレート(未請求) ProposalCustomerSignature=承諾書、会社印、日付、署名 -ProposalsStatisticsSuppliers=Vendor proposals statistics -CaseFollowedBy=Case followed by -SignedOnly=Signed only -IdProposal=提案番号 +ProposalsStatisticsSuppliers=ベンダー提案書統計 +CaseFollowedBy=ケースに続いて +SignedOnly=署名のみ +IdProposal=プロポーザルID IdProduct=製品番号 -PrParentLine=提案親ライン -LineBuyPriceHT=購入価格ラインの税控除後の金額 +PrParentLine=提案書親ライン +LineBuyPriceHT=ラインの購入価格税控除後の金額 + diff --git a/htdocs/langs/ja_JP/receiptprinter.lang b/htdocs/langs/ja_JP/receiptprinter.lang index 05f67f731e7..e3d30ac5598 100644 --- a/htdocs/langs/ja_JP/receiptprinter.lang +++ b/htdocs/langs/ja_JP/receiptprinter.lang @@ -1,82 +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 +ReceiptPrinterSetup=モジュールReceiptPrinterの設定 +PrinterAdded=プリンター%sが追加された +PrinterUpdated=プリンター%sが更新された +PrinterDeleted=プリンター%sが削除された +TestSentToPrinter=プリンターに送信されたテスト%s +ReceiptPrinter=レシートプリンター +ReceiptPrinterDesc=レシートプリンターの設定 +ReceiptPrinterTemplateDesc=テンプレートの設定 +ReceiptPrinterTypeDesc=レシートプリンターの種類の説明 +ReceiptPrinterProfileDesc=レシートプリンターのプロファイルの説明 +ListPrinters=プリンタのリスト +SetupReceiptTemplate=テンプレートの設定 +CONNECTOR_DUMMY=ダミープリンター +CONNECTOR_NETWORK_PRINT=ネットワークプリンター +CONNECTOR_FILE_PRINT=ローカルプリンター +CONNECTOR_WINDOWS_PRINT=ローカルWindowsプリンター +CONNECTOR_CUPS_PRINT=カッププリンター +CONNECTOR_DUMMY_HELP=テスト用の偽のプリンタ、何もしない 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 +CONNECTOR_CUPS_PRINT_HELP=CUPSプリンター名、例:HPRT_TP805L +PROFILE_DEFAULT=デフォルトプロファイル +PROFILE_SIMPLE=シンプルなプロファイル +PROFILE_EPOSTEP=EposTepプロファイル +PROFILE_P822D=P822Dプロファイル +PROFILE_STAR=スタープロフィール +PROFILE_DEFAULT_HELP=Epsonプリンターに適したデフォルトプロファイル +PROFILE_SIMPLE_HELP=シンプルなプロファイルグラフィックなし +PROFILE_EPOSTEP_HELP=EposTepプロファイル +PROFILE_P822D_HELP=P822Dプロファイルグラフィックなし +PROFILE_STAR_HELP=スタープロフィール +DOL_LINE_FEED=行をスキップ +DOL_ALIGN_LEFT=テキストを左揃え +DOL_ALIGN_CENTER=センターテキスト +DOL_ALIGN_RIGHT=テキストを右揃え +DOL_USE_FONT_A=プリンタのフォントAを使用する +DOL_USE_FONT_B=プリンタのフォントBを使用する +DOL_USE_FONT_C=プリンターのフォントCを使用 DOL_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 +DOL_PRINT_BARCODE_CUSTOMER_ID=バーコードの顧客IDを印刷する +DOL_CUT_PAPER_FULL=チケットを完全にカット +DOL_CUT_PAPER_PARTIAL=チケットを部分的にカット +DOL_OPEN_DRAWER=キャッシュドロワーを開く +DOL_ACTIVATE_BUZZER=ブザーを鳴らする +DOL_PRINT_QRCODE=QRコードを印刷する +DOL_PRINT_LOGO=私の法人のロゴを印刷する +DOL_PRINT_LOGO_OLD=私の法人のロゴを印刷する(古いプリンター) +DOL_BOLD=大胆な +DOL_BOLD_DISABLED=太字を無効にする +DOL_DOUBLE_HEIGHT=ダブルハイトサイズ +DOL_DOUBLE_WIDTH=倍幅サイズ +DOL_DEFAULT_HEIGHT_WIDTH=デフォルトの高さと幅のサイズ +DOL_UNDERLINE=下線を有効にする +DOL_UNDERLINE_DISABLED=下線を無効にする +DOL_BEEP=ビープ音 +DOL_PRINT_TEXT=テキストを印刷する +DateInvoiceWithTime=請求書の日時 +YearInvoice=請求年 +DOL_VALUE_MONTH_LETTERS=手紙での請求月 +DOL_VALUE_MONTH=請求月 +DOL_VALUE_DAY=請求日 +DOL_VALUE_DAY_LETTERS=請求書の文字表記 +DOL_LINE_FEED_REVERSE=改行リバース +InvoiceID=請求書ID InvoiceRef=請求書参照 -DOL_PRINT_OBJECT_LINES=Invoice lines -DOL_VALUE_CUSTOMER_FIRSTNAME=Customer first name -DOL_VALUE_CUSTOMER_LASTNAME=Customer last name -DOL_VALUE_CUSTOMER_MAIL=Customer mail -DOL_VALUE_CUSTOMER_PHONE=Customer phone -DOL_VALUE_CUSTOMER_MOBILE=Customer mobile -DOL_VALUE_CUSTOMER_SKYPE=Customer Skype -DOL_VALUE_CUSTOMER_TAX_NUMBER=Customer tax number -DOL_VALUE_CUSTOMER_ACCOUNT_BALANCE=Customer account balance -DOL_VALUE_MYSOC_NAME=Your company name -VendorLastname=Vendor last name -VendorFirstname=Vendor first name -VendorEmail=Vendor email -DOL_VALUE_CUSTOMER_POINTS=Customer points -DOL_VALUE_OBJECT_POINTS=Object points +DOL_PRINT_OBJECT_LINES=請求書の行 +DOL_VALUE_CUSTOMER_FIRSTNAME=顧客の名 +DOL_VALUE_CUSTOMER_LASTNAME=顧客の姓 +DOL_VALUE_CUSTOMER_MAIL=顧客メール +DOL_VALUE_CUSTOMER_PHONE=顧客フォン +DOL_VALUE_CUSTOMER_MOBILE=顧客モバイル +DOL_VALUE_CUSTOMER_SKYPE=顧客Skype +DOL_VALUE_CUSTOMER_TAX_NUMBER=顧客税番号 +DOL_VALUE_CUSTOMER_ACCOUNT_BALANCE=顧客アカウントの残高 +DOL_VALUE_MYSOC_NAME=あなたの法人名 +VendorLastname=仕入先の姓 +VendorFirstname=仕入先の名 +VendorEmail=仕入先のメール +DOL_VALUE_CUSTOMER_POINTS=顧客ポイント +DOL_VALUE_OBJECT_POINTS=オブジェクトポイント diff --git a/htdocs/langs/ja_JP/receptions.lang b/htdocs/langs/ja_JP/receptions.lang index 2464d8c30f4..e4fdf3eb37a 100644 --- a/htdocs/langs/ja_JP/receptions.lang +++ b/htdocs/langs/ja_JP/receptions.lang @@ -15,7 +15,7 @@ StatisticsOfReceptions=受付の統計 NbOfReceptions=受付数 NumberOfReceptionsByMonth=月別の受付数 ReceptionCard=受付カード -NewReception=新しい受付 +NewReception=新規受付 CreateReception=受付を作成する QtyInOtherReceptions=他の受付の数量 OtherReceptionsForSameOrder=この注文の他の受付 @@ -23,7 +23,7 @@ ReceptionsAndReceivingForSameOrder=この注文の領収書と領収書 ReceptionsToValidate=検証する受付 StatusReceptionCanceled=キャンセル StatusReceptionDraft=ドラフト -StatusReceptionValidated=検証(製品が出荷する、またはすでに出荷されます) +StatusReceptionValidated=検証(製品が出荷する、またはすでに出荷されます) StatusReceptionProcessed=処理 StatusReceptionDraftShort=ドラフト StatusReceptionValidatedShort=検証 @@ -32,11 +32,11 @@ ReceptionSheet=受付シート ConfirmDeleteReception=この受付を削除してもよいか? ConfirmValidateReception=参照<b>%s </b>を使用して、この受付を検証してもよいか? ConfirmCancelReception=この受付をキャンセルしてもよいか? -StatsOnReceptionsOnlyValidated=受付で実施された統計は検証されただけ。使用される日付は、受付の検証日です(飛行機の配達日は常にわかっているわけではない)。 +StatsOnReceptionsOnlyValidated=受付で実施された統計は検証されただけ。使用される日付は、受付の検証日です(飛行機の配達日は常にわかっているわけではない)。 SendReceptionByEMail=メールで受付を送信する SendReceptionRef=受付の提出%s ActionsOnReception=受付のイベント -ReceptionCreationIsDoneFromOrder=今のところ、新しい受付の作成はオーダーカードから行われる。 +ReceptionCreationIsDoneFromOrder=今のところ、新規受付の作成はオーダーカードから行われる。 ReceptionLine=受付ライン ProductQtyInReceptionAlreadySent=未処理の受注からの製品数量はすでに送信された ProductQtyInSuppliersReceptionAlreadyRecevied=すでに受け取ったオープンサプライヤー注文からの製品数量 diff --git a/htdocs/langs/ja_JP/recruitment.lang b/htdocs/langs/ja_JP/recruitment.lang index 9c7def0a589..bb2081baa02 100644 --- a/htdocs/langs/ja_JP/recruitment.lang +++ b/htdocs/langs/ja_JP/recruitment.lang @@ -71,5 +71,6 @@ YourCandidature=あなたの申請 YourCandidatureAnswerMessage=お申し込みいただきありがとうございます。 <br>..。 JobClosedTextCandidateFound=求人はクローズされている。ポジションが埋まった。 JobClosedTextCanceled=求人はクローズされている。 -ExtrafieldsJobPosition=補完的な属性(職位) -ExtrafieldsCandidatures=補完的な属性(求人応募) +ExtrafieldsJobPosition=補完的な属性(職位) +ExtrafieldsCandidatures=補完的な属性(求人応募) +MakeOffer=申し出する diff --git a/htdocs/langs/ja_JP/sendings.lang b/htdocs/langs/ja_JP/sendings.lang index a8ecd193c38..0a58d6837b3 100644 --- a/htdocs/langs/ja_JP/sendings.lang +++ b/htdocs/langs/ja_JP/sendings.lang @@ -1,75 +1,76 @@ # Dolibarr language file - Source file is en_US - sendings -RefSending=REF。出荷 +RefSending=参照符号 出荷 Sending=出荷 Sendings=出荷 -AllSendings=All Shipments +AllSendings=すべての出荷 Shipment=出荷 Shipments=出荷 -ShowSending=Show Shipments -Receivings=Delivery Receipts +ShowSending=出荷を表示 +Receivings=配達領収書 SendingsArea=出荷エリア ListOfSendings=出荷のリスト SendingMethod=配送方法 -LastSendings=Latest %s shipments +LastSendings=最新の%s出荷 StatisticsOfSendings=出荷の統計 NbOfSendings=出荷数 -NumberOfShipmentsByMonth=Number of shipments by month -SendingCard=Shipment card -NewSending=新しい出荷 -CreateShipment=出荷を作成します。 -QtyShipped=個数出荷 -QtyShippedShort=Qty ship. -QtyPreparedOrShipped=Qty prepared or shipped +NumberOfShipmentsByMonth=月ごとの出荷数 +SendingCard=出荷カード +NewSending=新規出荷 +CreateShipment=出荷を作成 +QtyShipped=出荷済数量 +QtyShippedShort=出荷数量 +QtyPreparedOrShipped=準備済または出荷済 数量 QtyToShip=出荷する数量 -QtyToReceive=Qty to receive -QtyReceived=個数は、受信した -QtyInOtherShipments=Qty in other shipments -KeepToShip=Remain to ship -KeepToShipShort=Remain -OtherSendingsForSameOrder=このため、他の出荷 -SendingsAndReceivingForSameOrder=Shipments and receipts for this order -SendingsToValidate=検証するために出荷 +QtyToReceive=受領する数量 +QtyReceived=受領済数量 +QtyInOtherShipments=他の出荷の数量 +KeepToShip=出荷残 +KeepToShipShort=残 +OtherSendingsForSameOrder=当該注文に対する他の出荷 +SendingsAndReceivingForSameOrder=当該注文の出荷と受領 +SendingsToValidate=検査用に出荷 StatusSendingCanceled=キャンセル -StatusSendingDraft=ドラフト -StatusSendingValidated=検証(製品が出荷する、またはすでに出荷されます) +StatusSendingCanceledShort=キャンセル +StatusSendingDraft=下書き +StatusSendingValidated=検査済(製品で出荷用または出荷済) StatusSendingProcessed=処理 -StatusSendingDraftShort=ドラフト -StatusSendingValidatedShort=検証 +StatusSendingDraftShort=下書き +StatusSendingValidatedShort=検査 StatusSendingProcessedShort=処理 -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? +SendingSheet=出荷シート +ConfirmDeleteSending=この貨物を削除してもよいか? +ConfirmValidateSending=この出荷を参照<b>%s </b>で検査してもよいか? +ConfirmCancelSending=この出荷をキャンセルしてもよいか? DocumentModelMerou=メロウA5モデル -WarningNoQtyLeftToSend=警告は、出荷されるのを待っていない製品。 -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=日付の配信は、受信した -ClassifyReception=Classify reception -SendShippingByEMail=Send shipment by email -SendShippingRef=Submission of shipment %s +WarningNoQtyLeftToSend=警告、出荷待ちの製品はない。 +StatsOnShipmentsOnlyValidated=出荷に関して実施された統計は検査済みです。使用日は出荷の検査日です(飛行機の配達日は常にわかっているわけではない)。 +DateDeliveryPlanned=配達予定日 +RefDeliveryReceipt=参照納品書 +StatusReceipt=ステータス納品書 +DateReceived=配達受領日付 +ClassifyReception=レセプションを分類する +SendShippingByEMail=メールで出荷する +SendShippingRef=出荷の提出%s ActionsOnShipping=出荷のイベント LinkToTrackYourPackage=あなたのパッケージを追跡するためのリンク -ShipmentCreationIsDoneFromOrder=現時点では、新たな出荷の作成は、注文カードから行われます。 -ShipmentLine=Shipment line -ProductQtyInCustomersOrdersRunning=Product quantity from open sales orders -ProductQtyInSuppliersOrdersRunning=Product quantity from open purchase orders +ShipmentCreationIsDoneFromOrder=現時点では、新たな出荷の作成は、注文カードから行われる。 +ShipmentLine=出荷ライン +ProductQtyInCustomersOrdersRunning=未処理の受注からの製品数量 +ProductQtyInSuppliersOrdersRunning=未処理の発注書からの製品数量 ProductQtyInShipmentAlreadySent=未処理の受注からの製品数量はすでに送信された -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. +ProductQtyInSuppliersShipmentAlreadyRecevied=すでに受け取った未処理の発注書からの製品数量 +NoProductToShipFoundIntoStock=倉庫<b>%s</b>に出荷する製品が見つかりません。在庫を修正するか、戻って別の倉庫を選択すること。 +WeightVolShort=重量/容量 +ValidateOrderFirstBeforeShipment=出荷を行う前に、まず注文を検査する必要がある。 # Sending methods # ModelDocument -DocumentModelTyphon=配信確認のために、より完全なドキュメントモデル(logo. ..) -DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) -Error_EXPEDITION_ADDON_NUMBER_NotDefined=定数EXPEDITION_ADDON_NUMBERが定義されていません -SumOfProductVolumes=Sum of product volumes -SumOfProductWeights=Sum of product weights +DocumentModelTyphon=配信確認のために、より完全なドキュメントモデル(logo. ..) +DocumentModelStorm=入庫とフィールド外の互換性のためのより完全なドキュメントモデル(ロゴ...) +Error_EXPEDITION_ADDON_NUMBER_NotDefined=定数EXPEDITION_ADDON_NUMBERが定義されていない +SumOfProductVolumes=製品量の合計 +SumOfProductWeights=製品の重量の合計 # warehouse details -DetailWarehouseNumber= Warehouse details -DetailWarehouseFormat= W:%s (Qty: %d) +DetailWarehouseNumber= 倉庫の詳細 +DetailWarehouseFormat= W:%s(数量:%d) diff --git a/htdocs/langs/ja_JP/sms.lang b/htdocs/langs/ja_JP/sms.lang index 70e31818985..d990732438c 100644 --- a/htdocs/langs/ja_JP/sms.lang +++ b/htdocs/langs/ja_JP/sms.lang @@ -1,9 +1,9 @@ # Dolibarr language file - Source file is en_US - sms Sms=SMS -SmsSetup=SMSセットアップ -SmsDesc=このページでは、SMS機能のグローバルオプションを定義することができます +SmsSetup=SMSの設定 +SmsDesc=このページでは、SMS機能のグローバルオプションを定義できる SmsCard=SMSカード -AllSms=すべてのSMS campains +AllSms=すべてのSMSキャンペーン SmsTargets=ターゲット SmsRecipients=ターゲット SmsRecipient=ターゲット @@ -13,39 +13,39 @@ SmsTo=ターゲット SmsTopic=SMSのトピック SmsText=メッセージ SmsMessage=SMSメッセージ -ShowSms=ショーのSMS -ListOfSms=リストSMS campains -NewSms=新しいSMSキャンペーンし -EditSms=編集SMS -ResetSms=新しい送信 -DeleteSms=SMSのキャンペーンしを削除します。 -DeleteASms=SMSのキャンペーンしを削除します。 -PreviewSms=PreviuwのSMS +ShowSms=SMSを表示 +ListOfSms=SMSキャンペーンを一覧表示する +NewSms=新規SMSキャンペーン +EditSms=SMSを編集する +ResetSms=新規送信 +DeleteSms=SMSキャンペーンを削除する +DeleteASms=SMSキャンペーンを削除する +PreviewSms=前のSMS PrepareSms=SMSを準備する CreateSms=SMSを作成する -SmsResult=SMSを送信することの結果 -TestSms=テストSMS +SmsResult=SMS送信の結果 +TestSms=SMSをテストする ValidSms=SMSを検証する ApproveSms=SMSを承認する -SmsStatusDraft=ドラフト +SmsStatusDraft=下書き SmsStatusValidated=検証 SmsStatusApproved=承認された SmsStatusSent=送信 SmsStatusSentPartialy=部分的に送信 SmsStatusSentCompletely=完全に送信 SmsStatusError=エラー -SmsStatusNotSent=送信されません -SmsSuccessfulySent=正しく送信されたSMS(%sへ%sから) +SmsStatusNotSent=送信されない +SmsSuccessfulySent=SMSが正しく送信された(%sから%sへ) ErrorSmsRecipientIsEmpty=ターゲットの数が空である -WarningNoSmsAdded=ターゲットリストに追加する新しい電話番号なし -ConfirmValidSms=このキャンペーンの検証を確認しますか? -NbOfUniqueSms=Nbの自由度のユニークな電話番号 -NbOfSms=ホン番号のNbre +WarningNoSmsAdded=ターゲットリストに追加する新規電話番号なし +ConfirmValidSms=このキャンペーンの検証を確認するか? +NbOfUniqueSms=固有の電話番号の数 +NbOfSms=電話番号の数 ThisIsATestMessage=これはテストメッセージです。 SendSms=SMSを送信 -SmsInfoCharRemain=残りの文字のNb -SmsInfoNumero= (フォーマット国際例:33899701761) -DelayBeforeSending=送信する前に、遅延時間(分) -SmsNoPossibleSenderFound=有効な送信者はありません。 SMSプロバイダの設定を確認してください。 -SmsNoPossibleRecipientFound=利用可能なターゲットはありません。 SMSプロバイダの設定を確認してください。 -DisableStopIfSupported=Disable STOP message (if supported) +SmsInfoCharRemain=残りの文字数 +SmsInfoNumero= (国際フォーマット、すなわち:+33899701761) +DelayBeforeSending=送信する前に、遅延時間(分) +SmsNoPossibleSenderFound=有効な送信者はない。 SMSプロバイダの設定を確認すること。 +SmsNoPossibleRecipientFound=利用可能なターゲットはない。 SMSプロバイダの設定を確認すること。 +DisableStopIfSupported=STOPメッセージを無効にする(サポートされている場合) diff --git a/htdocs/langs/ja_JP/stocks.lang b/htdocs/langs/ja_JP/stocks.lang index e6ac2a3ec17..85fd2d27614 100644 --- a/htdocs/langs/ja_JP/stocks.lang +++ b/htdocs/langs/ja_JP/stocks.lang @@ -2,241 +2,243 @@ WarehouseCard=倉庫カード Warehouse=倉庫 Warehouses=倉庫 -ParentWarehouse=Parent warehouse -NewWarehouse=New warehouse / Stock Location +ParentWarehouse=親倉庫 +NewWarehouse=新規倉庫/在庫場所 WarehouseEdit=倉庫を変更する -MenuNewWarehouse=新倉庫 -WarehouseSource=ソースの倉庫 -WarehouseSourceNotDefined=No warehouse defined, -AddWarehouse=Create warehouse -AddOne=Add one -DefaultWarehouse=Default warehouse -WarehouseTarget=ターゲット·ウェアハウス +MenuNewWarehouse=新規倉庫 +WarehouseSource=ソース倉庫 +WarehouseSourceNotDefined=倉庫が定義されていない、 +AddWarehouse=倉庫を作成する +AddOne=1つ追加する +DefaultWarehouse=デフォルトの倉庫 +WarehouseTarget=ターゲット倉庫 ValidateSending=送信削除 CancelSending=送信キャンセル DeleteSending=送信削除 -Stock=株式 -Stocks=ストック -MissingStocks=Missing stocks -StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future -StocksByLotSerial=Stocks by lot/serial -LotSerial=Lots/Serials -LotSerialList=List of lot/serials -Movements=動作 -ErrorWarehouseRefRequired=ウェアハウスの参照名を指定する必要があります +Stock=在庫 +Stocks=在庫 +MissingStocks=在庫がない +StockAtDate=日付の在庫 +StockAtDateInPast=過去の日付 +StockAtDateInFuture=将来の日付 +StocksByLotSerial=ロット/シリアル別の在庫 +LotSerial=ロット/シリアル +LotSerialList=ロット/シリアルのリスト +Movements=移動 +ErrorWarehouseRefRequired=倉庫の参照名を指定する必要がある ListOfWarehouses=倉庫のリスト ListOfStockMovements=在庫変動のリスト -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 +ListOfInventories=在庫一覧 +MovementId=移動 ID +StockMovementForId=移動 ID%d +ListMouvementStockProject=プロジェクトに関連する在庫移動のリスト +StocksArea=倉庫エリア +AllWarehouses=すべての倉庫 +IncludeEmptyDesiredStock=未定義の希望在庫で負の在庫も含める +IncludeAlsoDraftOrders=ドラフト注文も含める Location=場所 LocationSummary=短い名前の場所 -NumberOfDifferentProducts=Number of different products +NumberOfDifferentProducts=異なる製品の数 NumberOfProducts=商品の合計数 -LastMovement=Latest movement -LastMovements=Latest movements +LastMovement=最新の動き +LastMovements=最新の動き Units=ユニット Unit=ユニット -StockCorrection=Stock correction -CorrectStock=正しい株式 -StockTransfer=Stock transfer -TransferStock=Transfer stock -MassStockTransferShort=Mass stock transfer -StockMovement=Stock movement -StockMovements=Stock movements +StockCorrection=在庫修正 +CorrectStock=正しい在庫 +StockTransfer=在庫移転 +TransferStock=在庫移転 +MassStockTransferShort=大量在庫移転 +StockMovement=在庫移動 +StockMovements=在庫移動 NumberOfUnit=ユニット数 -UnitPurchaseValue=Unit purchase price -StockTooLow=低すぎると株式 -StockLowerThanLimit=Stock lower than alert limit (%s) +UnitPurchaseValue=購入単価 +StockTooLow=低すぎる在庫 +StockLowerThanLimit=在庫がアラート制限を下回っている(%s) EnhancedValue=値 PMPValue=加重平均価格 PMPValueShort=WAP 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 -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=数量派遣 -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=ご注文はまだないか、またはこれ以上の在庫倉庫の製品の派遣ができますステータスを持っていません。 -StockDiffPhysicTeoric=Explanation for difference between physical and virtual stock -NoPredefinedProductToDispatch=このオブジェクト用に事前定義された製品がありません。そうは在庫に派遣する必要はありません。 +UserWarehouseAutoCreate=ユーザーの作成時にユーザー倉庫を自動的に作成する +AllowAddLimitStockByWarehouse=製品ごとの最小在庫と希望在庫の値に加えて、ペアリングごとの最小在庫と希望在庫の値(製品倉庫)も管理する。 +RuleForWarehouse=倉庫のルール +WarehouseAskWarehouseDuringPropal=販売推進に倉庫を設定する +WarehouseAskWarehouseDuringOrder=販売注文に倉庫を設定する +UserDefaultWarehouse=ユーザーに倉庫を設定する +MainDefaultWarehouse=デフォルトの倉庫 +MainDefaultWarehouseUser=ユーザーごとにデフォルトの倉庫を使用する +MainDefaultWarehouseUserDesc=このオプションを有効にすると、製品の作成時に、製品に割り当てられた倉庫がこのオプションで定義される。ユーザーに倉庫が定義されていない場合は、デフォルトの倉庫が定義される。 +IndependantSubProductStock=製品在庫と副製品在庫は独立している +QtyDispatched=手配済数量 +QtyDispatchedShort=手配済数量 +QtyToDispatchShort=手配する数量 +OrderDispatch=アイテムの領収書 +RuleForStockManagementDecrease=自動在庫減少のルールを選択する(自動減少ルールが有効化されている場合でも、手動減少は常に可能 ) +RuleForStockManagementIncrease=自動在庫増加のルールを選択する(自動増加ルールがアクティブ化されている場合でも、手動の増加は常に可能) +DeStockOnBill=顧客の請求書/貸方表の検証で実際の在庫を減らす +DeStockOnValidateOrder=受注の検証時に実在庫を減らす +DeStockOnShipment=出荷検証で実際の在庫を減らす +DeStockOnShipmentOnClosing=出荷がクローズに設定されている場合は、実際の在庫を減らす +ReStockOnBill=仕入先の請求書/貸方表の検証で実際の在庫を増やす +ReStockOnValidateOrder=注文書の承認時に実在庫を増やす +ReStockOnDispatchOrder=商品の発注書受領後、倉庫への手動発送で実際の在庫を増やす +StockOnReception=受信の検証で実際の在庫を増やす +StockOnReceptionOnClosing=レセプションがクローズに設定されている場合は、実際の在庫を増やす +OrderStatusNotReadyToDispatch=ご注文はまだないか、またはこれ以上の在庫倉庫の製品の派遣ができるステータスを持っていない。 +StockDiffPhysicTeoric=物理在庫と仮想在庫の違いの説明 +NoPredefinedProductToDispatch=このオブジェクト用に事前定義された製品がない。そうは在庫に派遣する必要はない。 DispatchVerb=派遣 -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 +StockLimitShort=アラートの制限 +StockLimit=アラートの在庫制限 +StockLimitDesc=(空)は警告がないことを意味する。 <br> 0は、在庫が空になるとすぐに警告として使用される。 +PhysicalStock=現物在庫 RealStock=実在庫 -RealStockDesc=Physical/real stock is the stock currently in the warehouses. -RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): +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 -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=日付での仮想在庫 +VirtualStockAtDateDesc=日付より前に行われる予定のすべての保留中の注文が終了すると、仮想在庫が発生する +VirtualStockDesc=仮想在庫は、すべてのオープン/保留アクション(在庫に影響を与える)が閉じられたときに使用可能な計算された在庫 (発注書の受領、販売注文の出荷、製造注文の作成など)。 IdWarehouse=イド倉庫 DescWareHouse=説明倉庫 LieuWareHouse=ローカリゼーション倉庫 WarehousesAndProducts=倉庫と製品 -WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) +WarehousesAndProductsBatchDetail=倉庫および製品(ロット/シリアルごとの詳細付き) AverageUnitPricePMPShort=加重平均価格 -AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=製品を在庫に入れるためにサプライヤーに支払わなければならなかった入力平均単価。 SellPriceMin=販売単価 -EstimatedStockValueSellShort=Value for sell -EstimatedStockValueSell=Value for sell -EstimatedStockValueShort=入力株式価値 -EstimatedStockValue=入力株式価値 -DeleteAWarehouse=倉庫を削除します。 -ConfirmDeleteWarehouse=Are you sure you want to delete the warehouse <b>%s</b>? -PersonalStock=個人の株式%s -ThisWarehouseIsPersonalStock=この倉庫は%s %sの個人的な株式を表す -SelectWarehouseForStockDecrease=株式の減少のために使用するために倉庫を選択します。 -SelectWarehouseForStockIncrease=在庫の増加に使用する倉庫を選択します。 -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 +EstimatedStockValueSellShort=販売価値 +EstimatedStockValueSell=販売価値 +EstimatedStockValueShort=入力在庫価値 +EstimatedStockValue=入力在庫価値 +DeleteAWarehouse=倉庫を削除する。 +ConfirmDeleteWarehouse=倉庫<b>%s </b>を削除してもよろしい か? +PersonalStock=個人の在庫%s +ThisWarehouseIsPersonalStock=この倉庫は%s %sの個人的な在庫を表す +SelectWarehouseForStockDecrease=在庫の減少のために使用する倉庫を選択する +SelectWarehouseForStockIncrease=在庫の増加に使用する倉庫を選択する。 +NoStockAction=在庫アクションなし +DesiredStock=希望在庫 +DesiredStockDesc=この在庫量は、補充機能によって在庫を埋めるために使用される値になる。 +StockToBuy=注文する +Replenishment=補充 +ReplenishmentOrders=補充注文 +VirtualDiffersFromPhysical=在庫オプションの増減に応じて、現物在庫と仮想在庫(現物在庫+未決済注文)が異なる場合がある +UseRealStockByDefault=補充機能には、仮想在庫ではなく実際の在庫を使用する +ReplenishmentCalculation=注文金額は、(希望数量-仮想在庫)ではなく(希望数量-実在庫)になる。 +UseVirtualStock=仮想在庫を使用する +UsePhysicalStock=現物在庫を使用する +CurentSelectionMode=現在の選択モード CurentlyUsingVirtualStock=仮想在庫 -CurentlyUsingPhysicalStock=物理的な在庫 -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 onto "%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=Type 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'). +CurentlyUsingPhysicalStock=現物在庫 +RuleForStockReplenishment=在庫補充のルール +SelectProductWithNotNullQty=数量がnullではない製品と仕入先を少なくとも1つ選択してください +AlertOnly= アラートのみ +IncludeProductWithUndefinedAlerts = 希望数量が定義されていない製品の負の在庫も含めて、0に戻す。 +WarehouseForStockDecrease=倉庫<b>%s</b>は在庫減少に使用される +WarehouseForStockIncrease=倉庫<b>%s</b>は在庫増加に使用される +ForThisWarehouse=この倉庫のために +ReplenishmentStatusDesc=これは、在庫が希望在庫より少ない(またはチェックボックス「アラートのみ」がチェックされている場合はアラート値より低い)すべての製品のリスト 。チェックボックスを使用して、差額を埋めるための発注書を作成できる。 +ReplenishmentStatusDescPerWarehouse=倉庫ごとに定義された希望数量に基づいて補充が必要な場合は、倉庫にフィルタを追加する必要がある。 +ReplenishmentOrdersDesc=これは、事前定義された製品を含むすべての未処理の注文書のリスト 。事前定義された製品を含む未処理の注文のみ、つまり在庫に影響を与える可能性のある注文がここに表示される。 +Replenishments=補充 +NbOfProductBeforePeriod=選択した期間の前に在庫がある製品%sの数量(<%s) +NbOfProductAfterPeriod=選択した期間後の在庫の製品%sの数量(> %s) +MassMovement=マス移動 +SelectProductInAndOutWareHouse=ソース倉庫とターゲット倉庫、製品と数量を選択し、「%s」をクリックする。必要なすべての動きに対してこれが完了したら、「%s」をクリックする。 +RecordMovement=レコード移転 +ReceivingForSameOrder=この注文の領収書 +StockMovementRecorded=記録された在庫移動 +RuleForStockAvailability=在庫要件に関する規則 +StockMustBeEnoughForInvoice=在庫レベルは、製品/サービスを請求書に追加するのに十分でなければなりません(自動在庫変更のルールに関係なく、請求書に行を追加するときに現在の実際の在庫に対してチェックが行われる) +StockMustBeEnoughForOrder=在庫レベルは、注文に製品/サービスを追加するのに十分でなければなりません(自動在庫変更のルールに関係なく、注文にラインを追加するときに現在の実際の在庫でチェックが行われる) +StockMustBeEnoughForShipment= 在庫レベルは、製品/サービスを出荷に追加するのに十分でなければなりません(自動在庫変更のルールに関係なく、出荷にラインを追加するときに現在の実際の在庫でチェックが行われる) +MovementLabel=動きのラベル +TypeMovement=動きの種類 +DateMovement=移動日 +InventoryCode=移動または在庫コード +IsInPackage=パッケージに含まれている +WarehouseAllowNegativeTransfer=在庫はマイナスになる可能性がある +qtyToTranferIsNotEnough=ソース倉庫からの十分な在庫がなく、セットアップで負の在庫が許可されていない。 +qtyToTranferLotIsNotEnough=ソース倉庫からこのロット番号に対して十分な在庫がなく、設定で負の在庫が許可されていない(製品 '%s'の数量とロット '%s'は倉庫 '%s'の%s )。 ShowWarehouse=倉庫を表示 -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 -inventoryTitle=Inventory -inventoryListTitle=Inventories -inventoryListEmpty=No inventory in progress -inventoryCreateDelete=Create/Delete inventory -inventoryCreate=Create new +MovementCorrectStock=製品%sの在庫修正 +MovementTransferStock=製品%sの別の倉庫への在庫移転 +InventoryCodeShort=Inv./Mov。コード +NoPendingReceptionOnSupplierOrder=注文書が開いているため、保留中の受付はない +ThisSerialAlreadyExistWithDifferentDate=ロット/シリアル 番号 (<strong>%s</strong>) は異なる賞味期限または販売期限で ( <strong>%s</strong> が見つかったが、入力したのは <strong>%s</strong>). +OpenAll=すべてのアクションに対して開く +OpenInternal=内部アクションのためにのみ開く +UseDispatchStatus=発注書受付の製品ラインにディスパッチステータス(承認/拒否)を使用する +OptionMULTIPRICESIsOn=オプション「セグメントごとのいくつかの価格」がオンになっている。これは、製品に複数の販売価格があるため、販売価値を計算できないことを意味する +ProductStockWarehouseCreated=アラートの在庫制限と希望する最適在庫が正しく作成された +ProductStockWarehouseUpdated=アラートの在庫制限と希望する最適在庫が正しく更新された +ProductStockWarehouseDeleted=アラートの在庫制限と希望する最適在庫が正しく削除された +AddNewProductStockWarehouse=アラートと望ましい最適在庫の新規制限を設定する +AddStockLocationLine=数量を減らしてから、クリックしてこの製品の別の倉庫を追加する +InventoryDate=在庫日 +NewInventory=新規在庫 +inventorySetup = 在庫設定 +inventoryCreatePermission=新規在庫を作成する +inventoryReadPermission=在庫を見る +inventoryWritePermission=在庫を更新する +inventoryValidatePermission=在庫を検証する +inventoryTitle=在庫 +inventoryListTitle=在庫 +inventoryListEmpty=進行中の在庫はない +inventoryCreateDelete=インベントリの作成/削除 +inventoryCreate=新規作成 inventoryEdit=編集 inventoryValidate=検証 inventoryDraft=ランニング -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 +inventorySelectWarehouse=倉庫の選択 +inventoryConfirmCreate=作成 +inventoryOfWarehouse=倉庫の在庫:%s +inventoryErrorQtyAdd=エラー:1つの数量がゼロ未満 +inventoryMvtStock=在庫別 +inventoryWarningProductAlreadyExists=この製品はすでにリストに含まれている SelectCategory=カテゴリフィルタ -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 +SelectFournisseur=仕入先フィルタ +inventoryOnDate=在庫 +INVENTORY_USE_INVENTORY_DATE_FOR_DATE_OF_MVT=在庫移動には、(在庫検証の日付ではなく)在庫の日付がある。 +inventoryChangePMPPermission=製品のPMP値の変更を許可する +ColumnNewPMP=新規ユニットPMP +OnlyProdsInStock=在庫のない製品は追加しないこと +TheoricalQty=理論量 +TheoricalValue=理論量 +LastPA=最後のBP +CurrentPA=現在のBP +RecordedQty=記録された数量 +RealQty=実数量 +RealValue=真の価値 +RegulatedQty=規制数量 +AddInventoryProduct=製品を在庫に追加する AddProduct=加える -ApplyPMP=Apply PMP -FlushInventory=Flush inventory -ConfirmFlushInventory=Do you confirm this action? -InventoryFlushed=Inventory flushed -ExitEditMode=Exit edition -inventoryDeleteLine=行を削除します -RegulateStock=Regulate Stock +ApplyPMP=PMPを適用する +FlushInventory=在庫をフラッシュする +ConfirmFlushInventory=このアクションを確認するか? +InventoryFlushed=在庫がフラッシュされた +ExitEditMode=終了版 +inventoryDeleteLine=行を削除する +RegulateStock=在庫を調整する ListInventory=リスト -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) +StockSupportServices=在庫管理はサービスをサポートする +StockSupportServicesDesc=デフォルトでは、"製品" 種別 の製品のみを在庫できる。サービスモジュールとこのオプションの両方が有効になっている場合は、"サービス"種別 の製品を在庫することもできる。 +ReceiveProducts=アイテムを受け取る +StockIncreaseAfterCorrectTransfer=修正/移転による増加 +StockDecreaseAfterCorrectTransfer=修正/移転による減少 +StockIncrease=在庫増加 +StockDecrease=在庫減少 +InventoryForASpecificWarehouse=特定の倉庫の在庫 +InventoryForASpecificProduct=特定の製品の在庫 +StockIsRequiredToChooseWhichLotToUse=使用するロットを選択するには在庫が必要 +ForceTo=強制する +AlwaysShowFullArbo=倉庫リンクのポップアップに倉庫の完全なツリーを表示する(警告:これによりパフォーマンスが大幅に低下する可能性がある) +StockAtDatePastDesc=過去の特定の日付の在庫(実際の在庫)をここで表示できる +StockAtDateFutureDesc=将来の特定の日付の在庫(仮想在庫)をここで表示できる +CurrentStock=現在の在庫 +InventoryRealQtyHelp=値を0に設定して、数量をリセットする。<br>フィールドを空のままにするか、行を削除して、変更しないこと。 +UpdateByScaning=スキャンして更新する +UpdateByScaningProductBarcode=スキャンによる更新(製品バーコード) +UpdateByScaningLot=スキャンによる更新(ロット|シリアルバーコード) +DisableStockChangeOfSubProduct=この移動中は、このキットのすべての副産物の在庫変更を無効にする。 diff --git a/htdocs/langs/ja_JP/stripe.lang b/htdocs/langs/ja_JP/stripe.lang index 90be83666f7..40fc6f89456 100644 --- a/htdocs/langs/ja_JP/stripe.lang +++ b/htdocs/langs/ja_JP/stripe.lang @@ -1,72 +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 +StripeSetup=Stripe モジュールのセットアップ +StripeDesc=<a href="http://www.stripe.com" target="_blank"> Stripe </a>を介して、クレジット/セビットカードでの支払い用のStripeオンライン支払いページを顧客に提供します。これは、顧客が臨時の支払いを行えるようにするため、または特定のDolibarrオブジェクト(請求書、注文など)に関連する支払いのために使用できる。 +StripeOrCBDoPayment=クレジットカードまたはStripeで支払う FollowingUrlAreAvailableToMakePayments=以下のURLはDolibarrオブジェクト上で支払いをするために顧客にページを提供するために利用可能です PaymentForm=支払い形態 -WelcomeOnPaymentPage=Welcome to our online payment service -ThisScreenAllowsYouToPay=この画面では、%sにオンライン決済を行うことができます。 -ThisIsInformationOnPayment=これは、実行する支払いに関する情報です。 +WelcomeOnPaymentPage=オンライン決済サービスへようこそ +ThisScreenAllowsYouToPay=この画面では、%sにオンライン決済を行うことができる。 +ThisIsInformationOnPayment=これは、実行する支払いに関する情報。 ToComplete=完了する YourEMail=入金確認を受信する電子メール -STRIPE_PAYONLINE_SENDEMAIL=Email notification after a payment attempt (success or fail) +STRIPE_PAYONLINE_SENDEMAIL=支払い試行後の電子メール通知(成功または失敗) Creditor=債権者 PaymentCode=支払いコード -StripeDoPayment=Pay with Stripe -YouWillBeRedirectedOnStripe=You will be redirected on secured Stripe page to input you credit card information +StripeDoPayment=Stripeで支払う +YouWillBeRedirectedOnStripe=クレジットカード情報を入力するために、セキュリティで保護されたStripeページにリダイレクトされる Continue=次の ToOfferALinkForOnlinePayment=%s支払いのURL -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. +ToOfferALinkForOnlinePaymentOnOrder=受注の%sオンライン支払いページを提供するURL +ToOfferALinkForOnlinePaymentOnInvoice=顧客の請求書に%sオンライン支払いページを提供するためのURL +ToOfferALinkForOnlinePaymentOnContractLine=契約ラインの%sオンライン支払いページを提供するURL +ToOfferALinkForOnlinePaymentOnFreeAmount=既存のオブジェクトのない任意の金額の%sオンライン支払いページを提供するURL +ToOfferALinkForOnlinePaymentOnMemberSubscription=メンバーサブスクリプションの%sオンライン支払いページを提供するURL +ToOfferALinkForOnlinePaymentOnDonation=寄付の支払いのために%sオンライン支払いページを提供するURL +YouCanAddTagOnUrl=また、URLパラメーター<b>&tag=<i>value</i></b>をこれらのURLのいずれかに追加して(オブジェクトにリンクされていない支払いにのみ必須)、独自の支払いコメントタグを追加することもできる。 <br>既存のオブジェクトがない支払いのURLの場合、パラメーター<strong>&noidempotency=1</strong>を追加して、同じタグを持つ同じリンクを複数回使用できるようにすることもできる(一部の支払いモードでは、このパラメータがないと、異なるリンクごとに支払いが1に制限される場合がある) +SetupStripeToHavePaymentCreatedAutomatically=Stripeによって検証されたときに支払いが自動的に作成されるように、URL <b> %s</b>を使用してStripeをセットアップします。 AccountParameter=アカウントのパラメータ UsageParameter=使用パラメータ InformationToFindParameters=あなたの%sアカウント情報を見つけるのを助ける -STRIPE_CGI_URL_V2=Url of Stripe CGI module for payment -VendorName=ベンダーの名前 +STRIPE_CGI_URL_V2=支払い用のStripe CGIモジュールのURL CSSUrlForPaymentForm=支払いフォームのCSSスタイルシートのURL -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 +NewStripePaymentReceived=新規Stripeの支払いを受け取りました +NewStripePaymentFailed=新規Stripe支払いが試行されましたが、失敗した +FailedToChargeCard=カードのチャージに失敗した +STRIPE_TEST_SECRET_KEY=秘密のテストキー +STRIPE_TEST_PUBLISHABLE_KEY=公開可能なテストキー +STRIPE_TEST_WEBHOOK_KEY=Webhookテストキー +STRIPE_LIVE_SECRET_KEY=秘密のライブキー +STRIPE_LIVE_PUBLISHABLE_KEY=公開可能なライブキー +STRIPE_LIVE_WEBHOOK_KEY=Webhookライブキー +ONLINE_PAYMENT_WAREHOUSE=オンライン支払いが行われるときに在庫減少に使用する在庫<br>(TODO請求書のアクションで在庫を減らすオプションが実行され、オンライン支払いがそれ自体で請求書を生成する場合?) +StripeLiveEnabled=Stripe ライブが有効(それ以外の場合はテスト/サンドボックスモード) +StripeImportPayment=Stripe 支払いのインポート +ExampleOfTestCreditCard=テスト用のクレジットカードの例:%s =>有効、%s =>エラーCVC、%s =>期限切れ、%s =>充電に失敗 +StripeGateways=Stripe ゲートウェイ +OAUTH_STRIPE_TEST_ID=Stripe ConnectクライアントID(ca _...) +OAUTH_STRIPE_LIVE_ID=Stripe ConnectクライアントID(ca _...) +BankAccountForBankTransfer=資金支払いのための銀行口座 +StripeAccount=Stripe アカウント +StripeChargeList=Stripe 料金のリスト +StripeTransactionList=Stripeトランザクションのリスト +StripeCustomerId=Stripe の顧客ID +StripePaymentModes=Stripe 支払いモード +LocalID=ローカルID StripeID=Stripe ID -NameOnCard=Name on card -CardNumber=Card Number -ExpiryDate=Expiry Date +NameOnCard=カードの名前 +CardNumber=カード番号 +ExpiryDate=有効期限 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 +DeleteACard=カードを削除 +ConfirmDeleteCard=このクレジットカードまたはデビットカードを削除してもよいか? +CreateCustomerOnStripe=Stripeで顧客を作成する +CreateCardOnStripe=Stripeでカードを作成する +ShowInStripe=Stripe で表示 +StripeUserAccountForActions=一部のStripeイベントの電子メール通知に使用するユーザーアカウント(Stripeペイアウト) +StripePayoutList=Stripe ペイアウトのリスト +ToOfferALinkForTestWebhook=IPNを呼び出すためのStripeWebHookのセットアップへのリンク(テストモード) +ToOfferALinkForLiveWebhook=IPNを呼び出すためのStripeWebHookのセットアップへのリンク(ライブモード) +PaymentWillBeRecordedForNextPeriod=支払いは次の期間に記録される。 +ClickHereToTryAgain= <a href="%s">ここをクリックして再試行すること... </a> +CreationOfPaymentModeMustBeDoneFromStripeInterface=強力な顧客認証ルールにより、カードの作成はStripeバックオフィスから行う必要がある。 Stripeの顧客レコードをオンにするには、ここをクリックすること:%s diff --git a/htdocs/langs/ja_JP/supplier_proposal.lang b/htdocs/langs/ja_JP/supplier_proposal.lang index ffbda838ccb..2bae204541a 100644 --- a/htdocs/langs/ja_JP/supplier_proposal.lang +++ b/htdocs/langs/ja_JP/supplier_proposal.lang @@ -1,54 +1,55 @@ # 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 -NewAskPrice=New price request -ShowSupplierProposal=Show price request -AddSupplierProposal=Create a price request -SupplierProposalRefFourn=Vendor ref +SupplierProposal=仕入先の売買契約提案書 +supplier_proposalDESC=サプライヤーへの価格要求を管理する +SupplierProposalNew=新規価格リクエスト +CommRequest=価格リクエスト +CommRequests=価格の要望 +SearchRequest=リクエストを探す +DraftRequests=ドラフトリクエスト +SupplierProposalsDraft=ドラフト仕入先提案 +LastModifiedRequests=最新の%s修正価格リクエスト +RequestsOpened=オープン価格リクエスト +SupplierProposalArea=仕入先提案エリア +SupplierProposalShort=仕入先提案 +SupplierProposals=仕入先の提案 +SupplierProposalsShort=仕入先の提案 +AskPrice=価格リクエスト +NewAskPrice=新規価格リクエスト +ShowSupplierProposal=価格リクエストを表示 +AddSupplierProposal=価格リクエストを作成する +SupplierProposalRefFourn=仕入先参照 SupplierProposalDate=配達日 -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=ドラフト(検証する必要があります) -SupplierProposalStatusValidated=Validated (request is open) +SupplierProposalRefFournNotice=「承認済み」に戻る前に、サプライヤーの参照を把握することを検討すること。 +ConfirmValidateAsk=この価格要求を<b>%s </b>という名前で検証してもよいか? +DeleteAsk=リクエストの削除 +ValidateAsk=リクエストの検証 +SupplierProposalStatusDraft=ドラフト(検証する必要がある) +SupplierProposalStatusValidated=検証済み(リクエストはオープン) SupplierProposalStatusClosed=閉じた -SupplierProposalStatusSigned=Accepted +SupplierProposalStatusSigned=承認済み SupplierProposalStatusNotSigned=拒否 SupplierProposalStatusDraftShort=ドラフト SupplierProposalStatusValidatedShort=検証 SupplierProposalStatusClosedShort=閉じた -SupplierProposalStatusSignedShort=Accepted +SupplierProposalStatusSignedShort=承認済み SupplierProposalStatusNotSignedShort=拒否 -CopyAskFrom=Create price request by copying existing a 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 +CopyAskFrom=既存のリクエストをコピーして価格リクエストを作成する +CreateEmptyAsk=空白のリクエストを作成する +ConfirmCloneAsk=価格リクエスト<b>%s </b>のクローンを作成してもよいか? +ConfirmReOpenAsk=価格リクエスト<b>%s </b>をオープンバックしてもよいか? +SendAskByMail=価格リクエストをメールで送信 +SendAskRef=価格リクエストの送信%s +SupplierProposalCard=カードをリクエストする +ConfirmDeleteAsk=この価格リクエストを削除してもよいか<b>%s </b>? +ActionsOnSupplierProposal=価格リクエストのイベント +DocModelAuroreDescription=完全なリクエストモデル(ロゴ...) +CommercialAsk=価格リクエスト +DefaultModelSupplierProposalCreate=デフォルトのモデル作成 +DefaultModelSupplierProposalToBill=価格リクエストを閉じるときのデフォルトテンプレート(承認済み) +DefaultModelSupplierProposalClosed=価格リクエストを閉じるときのデフォルトテンプレート(拒否) +ListOfSupplierProposals=仕入先提案リクエストのリスト +ListSupplierProposalsAssociatedProject=プロジェクトに関連する仕入先提案のリスト +SupplierProposalsToClose=終了する仕入先の提案 +SupplierProposalsToProcess=処理する仕入先の提案 +LastSupplierProposals=最新の%s価格リクエスト +AllPriceRequests=すべてのリクエスト diff --git a/htdocs/langs/ja_JP/suppliers.lang b/htdocs/langs/ja_JP/suppliers.lang index ce2aea9527f..09fd760b180 100644 --- a/htdocs/langs/ja_JP/suppliers.lang +++ b/htdocs/langs/ja_JP/suppliers.lang @@ -1,48 +1,48 @@ # Dolibarr language file - Source file is en_US - vendors Suppliers=仕入先s -SuppliersInvoice=ベンダー請求書 -ShowSupplierInvoice=Show Vendor Invoice -NewSupplier=New vendor +SuppliersInvoice=仕入先請求書 +ShowSupplierInvoice=仕入先の請求書を表示する +NewSupplier=新規仕入先 History=歴史 -ListOfSuppliers=List of vendors -ShowSupplier=Show vendor +ListOfSuppliers=仕入先のリスト +ShowSupplier=仕入先を表示 OrderDate=注文日 -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 +BuyingPriceMin=最高の購入価格 +BuyingPriceMinShort=最高の購入価格 +TotalBuyingPriceMinShort=サブ製品の購入価格の合計 +TotalSellingPriceMinShort=サブ製品の販売価格の合計 +SomeSubProductHaveNoPrices=一部のサブ製品には価格が定義されていない +AddSupplierPrice=購入価格を追加 +ChangeSupplierPrice=購入価格の変更 SupplierPrices=仕入先価格 -ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s -NoRecordedSuppliers=No vendor recorded -SupplierPayment=ベンダーの支払 -SuppliersArea=Vendor area +ReferenceSupplierIsAlreadyAssociatedWithAProduct=この仕入先リファレンスは、すでに製品に関連付けられています:%s +NoRecordedSuppliers=仕入先は記録されていない +SupplierPayment=仕入先の支払 +SuppliersArea=仕入先エリア RefSupplierShort=仕入先参照符号 Availability=可用性 -ExportDataset_fournisseur_1=Vendor invoices and invoice details -ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order details +ExportDataset_fournisseur_1=仕入先の請求書と請求書の詳細 +ExportDataset_fournisseur_2=仕入先の請求書と支払い +ExportDataset_fournisseur_3=注文書と注文の詳細 ApproveThisOrder=この注文を承認 -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 +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/ja_JP/ticket.lang b/htdocs/langs/ja_JP/ticket.lang index 8fdb14dc6e0..9b6e686cb03 100644 --- a/htdocs/langs/ja_JP/ticket.lang +++ b/htdocs/langs/ja_JP/ticket.lang @@ -25,7 +25,7 @@ Permission56001=チケットを見る Permission56002=チケットを変更する Permission56003=チケットを削除する Permission56004=チケットを管理する -Permission56005=すべてのサードパーティのチケットを参照すること(外部ユーザーには有効ではなく、常に依存しているサードパーティに限定される) +Permission56005=すべてのサードパーティのチケットを参照すること(外部ユーザーには有効ではなく、常に依存しているサードパーティに限定される) TicketDictType=チケット-タイプ TicketDictCategory=チケット-グループ @@ -58,7 +58,6 @@ OriginEmail=メールソース Notify_TICKET_SENTBYMAIL=メールでチケットメッセージを送信する # Status -NotRead=読んでいない Read=読む Assigned=割り当て済み InProgress=進行中 @@ -96,7 +95,7 @@ TicketsEmailMustExist=チケットを作成するには、既存のメールア TicketsEmailMustExistHelp=パブリックインターフェイスでは、新規チケットを作成するために、電子メールアドレスがデータベースにすでに入力されている必要がある。 PublicInterface=パブリックインターフェイス TicketUrlPublicInterfaceLabelAdmin=パブリックインターフェイスの代替URL -TicketUrlPublicInterfaceHelpAdmin=Webサーバーのエイリアスを定義して、別のURLでパブリックインターフェイスを利用できるようにすることができる(サーバーはこの新規URLのプロキシとして機能する必要がある) +TicketUrlPublicInterfaceHelpAdmin=Webサーバーのエイリアスを定義して、別のURLでパブリックインターフェイスを利用できるようにすることができる(サーバーはこの新規URLのプロキシとして機能する必要がある) TicketPublicInterfaceTextHomeLabelAdmin=パブリックインターフェイスのウェルカムテキスト TicketPublicInterfaceTextHome=サポートチケットを作成するか、その識別子追跡チケットから既存のものを表示できる。 TicketPublicInterfaceTextHomeHelpAdmin=ここで定義されたテキストは、パブリックインターフェイスのホームページに表示される。 @@ -116,19 +115,20 @@ TicketsShowModuleLogoHelp=このオプションを有効にすると、パブリ TicketsShowCompanyLogo=パブリックインターフェイスに法人のロゴを表示する TicketsShowCompanyLogoHelp=このオプションを有効にすると、パブリックインターフェイスのページで主要法人のロゴが非表示になる。 TicketsEmailAlsoSendToMainAddress=メインのメールアドレスにも通知を送信する -TicketsEmailAlsoSendToMainAddressHelp=このオプションを有効にすると、「通知メールの送信元」アドレスにメールが送信される(以下の設定を参照)。 -TicketsLimitViewAssignedOnly=現在のユーザーに割り当てられたチケットに表示を制限する(外部ユーザーには無効で、常に依存しているサードパーティに制限される) +TicketsEmailAlsoSendToMainAddressHelp=このオプションを有効にすると、「通知メールの送信元」アドレスにメールが送信される(以下の設定を参照)。 +TicketsLimitViewAssignedOnly=現在のユーザーに割り当てられたチケットに表示を制限する(外部ユーザーには無効で、常に依存しているサードパーティに制限される) TicketsLimitViewAssignedOnlyHelp=現在のユーザーに割り当てられているチケットのみが表示される。チケット管理権を持つユーザーには適用されない。 TicketsActivatePublicInterface=パブリックインターフェイスをアクティブ化する TicketsActivatePublicInterfaceHelp=パブリックインターフェイスにより、すべての訪問者がチケットを作成できる。 TicketsAutoAssignTicket=チケットを作成したユーザーを自動的に割り当てる TicketsAutoAssignTicketHelp=チケットを作成するときに、ユーザーを自動的にチケットに割り当てることができる。 TicketNumberingModules=チケット番号付けモジュール +TicketsModelModule=チケットのドキュメントテンプレート TicketNotifyTiersAtCreation=作成時にサードパーティに通知する TicketsDisableCustomerEmail=パブリックインターフェイスからチケットを作成するときは、常にメールを無効にすること TicketsPublicNotificationNewMessage=新規メッセージが追加されたときにメール(s)を送信する -TicketsPublicNotificationNewMessageHelp=新規メッセージがパブリックインターフェイスから追加されたときに電子メール(s)を送信する(割り当てられたユーザーまたは通知電子メールを(更新)および/または通知電子メールに) -TicketPublicNotificationNewMessageDefaultEmail=通知メール(更新) +TicketsPublicNotificationNewMessageHelp=新規メッセージがパブリックインターフェイスから追加されたときに電子メール(s)を送信する(割り当てられたユーザーまたは通知電子メールを(更新)および/または通知電子メールに) +TicketPublicNotificationNewMessageDefaultEmail=通知メール(更新) TicketPublicNotificationNewMessageDefaultEmailHelp=チケットにユーザーが割り当てられていない場合、またはユーザーに電子メールがない場合は、このアドレスに新規メッセージ通知を電子メールで送信する。 # # Index & list page @@ -177,7 +177,7 @@ TicketMessageSuccessfullyAdded=メッセージが正常に追加された TicketMessagesList=メッセージリスト NoMsgForThisTicket=このチケットのメッセージはない Properties=分類 -LatestNewTickets=最新の%s最新のチケット(未読) +LatestNewTickets=最新の%s最新のチケット(未読) TicketSeverity=重大度 ShowTicket=チケットを見る RelatedTickets=関連チケット @@ -231,7 +231,6 @@ TicketLogStatusChanged=ステータスが変更された:%sから%s TicketNotNotifyTiersAtCreate=作成時に法人に通知しない Unread=未読 TicketNotCreatedFromPublicInterface=利用不可。チケットはパブリックインターフェイスから作成されなかった。 -PublicInterfaceNotEnabled=パブリックインターフェイスが有効になっていない ErrorTicketRefRequired=チケット参照名が必要 # @@ -254,7 +253,7 @@ TicketPublicDesc=サポートチケットを作成したり、既存のIDから YourTicketSuccessfullySaved=チケットが正常に保存された! MesgInfosPublicTicketCreatedWithTrackId=ID%sおよびRef%sで新規チケットが作成された。 PleaseRememberThisId=後で尋ねる可能性のある追跡番号を保管すること。 -TicketNewEmailSubject=チケット作成の確認-Ref%s(パブリックチケットID %s) +TicketNewEmailSubject=チケット作成の確認-Ref%s(パブリックチケットID %s) TicketNewEmailSubjectCustomer=新規サポートチケット TicketNewEmailBody=これは、新規チケットを登録したことを確認するための自動メール。 TicketNewEmailBodyCustomer=これは、新規チケットがアカウントに作成されたことを確認するための自動メール。 @@ -273,7 +272,7 @@ Subject=科目 ViewTicket=チケットを見る ViewMyTicketList=チケットリストを見る ErrorEmailMustExistToCreateTicket=エラー:データベースにメールアドレスが見つからない -TicketNewEmailSubjectAdmin=新規チケットが作成された-Ref%s(パブリックチケットID %s) +TicketNewEmailSubjectAdmin=新規チケットが作成された-Ref%s(パブリックチケットID %s) TicketNewEmailBodyAdmin= <p>チケットはID#%sで作成された。情報を参照すること:</p> SeeThisTicketIntomanagementInterface=管理インターフェースでチケットを見る TicketPublicInterfaceForbidden=チケットのパブリックインターフェイスが有効になっていない diff --git a/htdocs/langs/ja_JP/trips.lang b/htdocs/langs/ja_JP/trips.lang index 9ec51fa3ea2..aa7bffd91bd 100644 --- a/htdocs/langs/ja_JP/trips.lang +++ b/htdocs/langs/ja_JP/trips.lang @@ -1,151 +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 +ShowExpenseReport=経費報告書を表示する +Trips=経費報告書 +TripsAndExpenses=経費報告書 +TripsAndExpensesStatistics=経費報告書の統計 +TripCard=経費通知表 +AddTrip=経費報告書を作成する +ListOfTrips=経費報告書のリスト ListOfFees=手数料のリスト -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=量またはキロ -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 inform for validation. -TripSociete=Information company -TripNDF=Informations expense report -PDFStandardExpenseReports=Standard template to generate a PDF document for expense report -ExpenseReportLine=Expense report line +TypeFees=料金の種類 +ShowTrip=経費報告書を表示する +NewTrip=新規経費報告書 +LastExpenseReports=最新の%s経費報告書 +AllExpenseReports=すべての経費報告書 +CompanyVisited=訪問した法人/組織 +FeesKilometersOrAmout=金額またはキロメートル +DeleteTrip=経費報告書を削除する +ConfirmDeleteTrip=この経費報告書を削除してもよいか? +ListTripsAndExpenses=経費報告書のリスト +ListToApprove=承認待ち +ExpensesArea=経費報告エリア +ClassifyRefunded=分類「返金済み」 +ExpenseReportWaitingForApproval=新規経費報告書が承認のために提出された +ExpenseReportWaitingForApprovalMessage=新規経費報告書が提出され、承認を待っている。 <br>-ユーザ:%s <br>-期間:%s <br>検証するにはここをクリック:%s +ExpenseReportWaitingForReApproval=再承認のために経費報告書が提出された +ExpenseReportWaitingForReApprovalMessage=経費報告書が提出され、再承認を待っている。 <br> %s、この理由で経費報告書の承認を拒否した:%s。 <br>新規バージョンが提案され、承認を待っている。 <br>-ユーザ:%s <br>-期間:%s <br>検証するにはここをクリック:%s +ExpenseReportApproved=経費報告書が承認された +ExpenseReportApprovedMessage=経費報告書%sが承認された。 <br>-ユーザ:%s <br>-承認者:%s <br>ここをクリックして経費報告書を表示する:%s +ExpenseReportRefused=経費報告書は拒否された +ExpenseReportRefusedMessage=経費報告書%sは拒否された。 <br>-ユーザ:%s <br>-拒否者:%s <br>-拒否の動機:%s <br>ここをクリックして経費報告書:%s を表示 +ExpenseReportCanceled=経費報告がキャンセルされた +ExpenseReportCanceledMessage=経費報告書%sはキャンセルされた。 <br>-ユーザ:%s <br>-キャンセル者:%s <br>-キャンセルの動機:%s <br>ここをクリックして経費報告書: %s を表示 +ExpenseReportPaid=経費報告書が支払われた +ExpenseReportPaidMessage=経費報告書%sが支払われた。 <br>-ユーザ:%s <br>-支払い者:%s <br>ここをクリックして経費報告書を表示する:%s +TripId=ID経費レポート +AnyOtherInThisListCanValidate=検証のために通知する人。 +TripSociete=情報法人 +TripNDF=情報経費報告書 +PDFStandardExpenseReports=経費報告書のPDFドキュメントを生成するための標準テンプレート +ExpenseReportLine=経費報告行 TF_OTHER=その他 -TF_TRIP=Transportation +TF_TRIP=交通 TF_LUNCH=ランチ -TF_METRO=Metro -TF_TRAIN=Train -TF_BUS=Bus +TF_METRO=メトロ +TF_TRAIN=列車 +TF_BUS=バス TF_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 +TF_PEAGE=通行料金 +TF_ESSENCE=燃料 +TF_HOTEL=ホテル +TF_TAXI=タクシー +EX_KME=マイレージ費用 +EX_FUE=燃料CV +EX_HOT=ホテル +EX_PAR=駐車場履歴書 +EX_TOL=料金履歴書 +EX_TAX=さまざまな税金 +EX_IND=補償輸送サブスクリプション +EX_SUM=メンテナンス用品 +EX_SUO=事務用品 +EX_CAR=レンタカー +EX_DOC=ドキュメンテーション +EX_CUR=受け取っている顧客 +EX_OTR=その他の受け取り +EX_POS=送料 +EX_CAM=CVのメンテナンスと修理 +EX_EMM=従業員の食事 +EX_GUM=ゲストの食事 +EX_BRE=朝食 +EX_FUE_VP=燃料PV +EX_TOL_VP=有料PV +EX_PAR_VP=駐車場PV +EX_CAM_VP=PVのメンテナンスと修理 +DefaultCategoryCar=デフォルトの輸送モード +DefaultRangeNumber=デフォルトの範囲番号 +UploadANewFileNow=今すぐ新規ドキュメントをアップロードする +Error_EXPENSEREPORT_ADDON_NotDefined=エラー、経費報告書の番号付け参照のルールがモジュール「経費報告書」の設定に定義されていなかった +ErrorDoubleDeclaration=同様の日付範囲で別の経費報告書を宣言した。 +AucuneLigne=経費報告書はまだ宣言されていない +ModePaiement=支払いモード +VALIDATOR=承認を担当するユーザ +VALIDOR=によって承認された +AUTHOR=によって記録された +AUTHORPAIEMENT=によって支払われた +REFUSEUR=によって拒否された +CANCEL_USER=によって削除された MOTIF_REFUS=理由 MOTIF_CANCEL=理由 -DATE_REFUS=Deny date +DATE_REFUS=拒否日 DATE_SAVE=検証日 -DATE_CANCEL=Cancelation date +DATE_CANCEL=キャンセル日 DATE_PAIEMENT=支払期日 BROUILLONNER=再開 -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 +ExpenseReportRef=参照。経費報告書 +ValidateAndSubmit=検証して承認のために送信 +ValidatedWaitingApproval=検証済み(承認待ち) +NOT_AUTHOR=あなたはこの経費報告書の作成者ではない。操作はキャンセルされた。 +ConfirmRefuseTrip=この経費報告書を拒否してもよいか? +ValideTrip=経費報告書を承認する +ConfirmValideTrip=この経費報告書を承認してもよいか? +PaidTrip=経費報告書を支払う +ConfirmPaidTrip=この経費報告書のステータスを「支払い済み」に変更してもよいか? +ConfirmCancelTrip=この経費報告書をキャンセルしてもよいか? +BrouillonnerTrip=経費報告書をステータス「ドラフト」に戻する +ConfirmBrouillonnerTrip=この経費報告書をステータス「ドラフト」に移動してもよいか? +SaveTrip=経費報告書を検証する +ConfirmSaveTrip=この経費報告書を検証してもよいか? +NoTripsToExportCSV=この期間にエクスポートする経費報告書はない。 +ExpenseReportPayment=経費報告書の支払い +ExpenseReportsToApprove=承認する経費報告書 +ExpenseReportsToPay=支払うべき経費報告書 +ConfirmCloneExpenseReport=この経費報告書のクローンを作成してもよいか? +ExpenseReportsIk=マイレージ料金の設定 +ExpenseReportsRules=経費報告規則 +ExpenseReportIkDesc=以前に定義したカテゴリと範囲ごとに、キロメートル費用の計算を変更できます。 <b> d </b>はキロメートル単位の距離です +ExpenseReportRulesDesc=任意の計算ルールを作成または更新できます。この部分は、ユーザが新規経費報告書を作成するときに使用される expenseReportOffset=オフセット -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 +expenseReportCoef=係数 +expenseReportTotalForFive=<u> d </u> = 5の例 +expenseReportRangeFromTo=%dから%dへ +expenseReportRangeMoreThan=%d以上 +expenseReportCoefUndefined=(値は定義されていない) +expenseReportCatDisabled=カテゴリが無効-c_exp_tax_cat辞書を参照 +expenseReportRangeDisabled=範囲が無効になっている-c_exp_tax_range辞書を参照すること +expenseReportPrintExample=オフセット+(d x coef)= %s +ExpenseReportApplyTo=に適用する +ExpenseReportDomain=適用するドメイン +ExpenseReportLimitOn=制限 ExpenseReportDateStart=開始日 ExpenseReportDateEnd=日付の末尾 -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 +ExpenseReportLimitAmount=制限量 +ExpenseReportRestrictive=制限的 +AllExpenseReport=あらゆる種類の経費報告書 +OnExpense=経費ライン +ExpenseReportRuleSave=経費報告ルールが保存された +ExpenseReportRuleErrorOnSave=エラー:%s +RangeNum=範囲%d +ExpenseReportConstraintViolationError=制約違反ID [%s]:%sは%s%sよりも優れている +byEX_DAY=日ごと(%sへの制限) +byEX_MON=月ごと(%sへの制限) +byEX_YEA=年ごと(%sへの制限) +byEX_EXP=行ごと(%sへの制限) +ExpenseReportConstraintViolationWarning=制約違反ID [%s]:%sは%s%sよりも優れている +nolimitbyEX_DAY=日ごと(制限なし) +nolimitbyEX_MON=月ごと(制限なし) +nolimitbyEX_YEA=年ごと(制限なし) +nolimitbyEX_EXP=行ごと(制限なし) +CarCategory=車両カテゴリー +ExpenseRangeOffset=オフセット量:%s +RangeIk=走行距離範囲 +AttachTheNewLineToTheDocument=アップロードされたドキュメントに行を添付する diff --git a/htdocs/langs/ja_JP/users.lang b/htdocs/langs/ja_JP/users.lang index 93d45a5a4d9..a4e6141c8a5 100644 --- a/htdocs/langs/ja_JP/users.lang +++ b/htdocs/langs/ja_JP/users.lang @@ -35,7 +35,7 @@ SuperAdministrator=スーパー管理者 SuperAdministratorDesc=グローバル管理者 AdministratorDesc=管理者 DefaultRights=デフォルト権限 -DefaultRightsDesc=ここで、<u>デフォルト</u>権限を定義する。これは、<u>新規</u>ユーザに自動的に付与される(既存のユーザの権限を変更するには、ユーザカードに移動する)。 +DefaultRightsDesc=ここで、<u>デフォルト</u>権限を定義する。これは、<u>新規</u>ユーザに自動的に付与される(既存のユーザの権限を変更するには、ユーザカードに移動する)。 DolibarrUsers=Dolibarrユーザ LastName=姓 FirstName=最初の名前 @@ -71,13 +71,13 @@ InternalUser=内部ユーザ ExportDataset_user_1=ユーザとそのプロパティ DomainUser=ドメインユーザ%s Reactivate=再アクティブ化 -CreateInternalUserDesc=このフォームを使用すると、法人/組織に内部ユーザを作成できる。外部ユーザ(顧客、仕入先など)を作成するには、その取引先の連絡先カードから Dolibarrユーザの作成 ボタンを使用する。 -InternalExternalDesc=<b>内部</b>ユーザは、法人/組織の一部であるユーザ。 <br> <b>外部</b>ユーザは、顧客、仕入先、またはその他(取引先の外部ユーザの作成は、取引先の連絡先レコードから実行できる)。 <br> <br>どちらの場合も、権限はDolibarrの権限を定義し、外部ユーザも内部ユーザとは異なるメニューマネージャーを持つことができる( ホーム - 設定 - 表示 を参照) +CreateInternalUserDesc=このフォームを使用すると、法人/組織に内部ユーザを作成できる。外部ユーザ(顧客、仕入先など)を作成するには、その取引先の連絡先カードから Dolibarrユーザの作成 ボタンを使用する。 +InternalExternalDesc=<b>内部</b>ユーザは、法人/組織の一部であるユーザ。 <br> <b>外部</b>ユーザは、顧客、仕入先、またはその他(取引先の外部ユーザの作成は、取引先の連絡先レコードから実行できる)。 <br> <br>どちらの場合も、権限はDolibarrの権限を定義し、外部ユーザも内部ユーザとは異なるメニューマネージャーを持つことができる( ホーム - 設定 - 表示 を参照) PermissionInheritedFromAGroup=ユーザのグループのいずれかから継承されたので、許可が付与される。 Inherited=継承された UserWillBe=作成されたユーザは -UserWillBeInternalUser=(特定の第三者にリンクされていないため)作成したユーザは、内部ユーザになる -UserWillBeExternalUser=作成したユーザ(特に取引先にリンクされているため)、外部のユーザになる +UserWillBeInternalUser=(特定の第三者にリンクされていないため)作成したユーザは、内部ユーザになる +UserWillBeExternalUser=作成したユーザ(特に取引先にリンクされているため)、外部のユーザになる IdPhoneCaller=イドの電話発信 NewUserCreated=ユーザの%s作成 NewUserPassword=%s用パスワードの変更 @@ -104,7 +104,7 @@ HierarchicView=階層ビュー UseTypeFieldToChange=フィールドタイプを使用して変更 OpenIDURL=OpenID URL LoginUsingOpenID=OpenIDを使用してログインする -WeeklyHours=労働時間(週あたり) +WeeklyHours=労働時間(週あたり) ExpectedWorkedHours=週あたりの予想労働時間 ColorUser=ユーザの色 DisabledInMonoUserMode=メンテナンスモードでは無効 diff --git a/htdocs/langs/ja_JP/website.lang b/htdocs/langs/ja_JP/website.lang index 2553493c60a..8be0c5e5529 100644 --- a/htdocs/langs/ja_JP/website.lang +++ b/htdocs/langs/ja_JP/website.lang @@ -2,24 +2,24 @@ Shortname=コー​​ド WebsiteSetupDesc=使用したいウェブサイトをここに作成する。次に、メニューのWebサイトに移動して編集する。 DeleteWebsite=ウェブサイトを削除 -ConfirmDeleteWebsite=このWebサイトを削除してもよいか?そのすべてのページとコンテンツも削除される。アップロードされたファイル(メディアディレクトリ、ECMモジュールなど)は残る。 +ConfirmDeleteWebsite=このWebサイトを削除してもよいか?そのすべてのページとコンテンツも削除される。アップロードされたファイル(メディアディレクトリ、ECMモジュールなど)は残る。 WEBSITE_TYPE_CONTAINER=ページ/コンテナのタイプ WEBSITE_PAGE_EXAMPLE=例として使用するWebページ WEBSITE_PAGENAME=ページ名/エイリアス WEBSITE_ALIASALT=代替ページ名/エイリアス -WEBSITE_ALIASALTDesc=他の名前/エイリアスのリストをここで使用して、この他の名前/エイリアスを使用してページにアクセスできるようにする(たとえば、古いリンク/名前のバックリンクを機能させるためにエイリアスの名前を変更した後の古い名前)。構文は次のとおり。<br>alternativename1、alternativename2、..。 +WEBSITE_ALIASALTDesc=他の名前/エイリアスのリストをここで使用して、この他の名前/エイリアスを使用してページにアクセスできるようにする(たとえば、古いリンク/名前のバックリンクを機能させるためにエイリアスの名前を変更した後の古い名前)。構文は次のとおり。<br>alternativename1、alternativename2、..。 WEBSITE_CSS_URL=外部CSSファイルのURL -WEBSITE_CSS_INLINE=CSSファイルの内容(すべてのページに共通) -WEBSITE_JS_INLINE=Javascriptファイルの内容(すべてのページに共通) -WEBSITE_HTML_HEADER=HTMLヘッダーの下部に追加(すべてのページに共通) -WEBSITE_ROBOT=ロボットファイル(robots.txt) +WEBSITE_CSS_INLINE=CSSファイルの内容(すべてのページに共通) +WEBSITE_JS_INLINE=Javascriptファイルの内容(すべてのページに共通) +WEBSITE_HTML_HEADER=HTMLヘッダーの下部に追加(すべてのページに共通) +WEBSITE_ROBOT=ロボットファイル(robots.txt) WEBSITE_HTACCESS=ウェブサイトの.htaccessファイル WEBSITE_MANIFEST_JSON=ウェブサイトmanifest.jsonファイル WEBSITE_README=README.mdファイル WEBSITE_KEYWORDSDesc=値を区切るにはコンマを使用する EnterHereLicenseInformation=ここにメタデータまたはライセンス情報を入力して、README.mdファイルに入力する。ウェブサイトをテンプレートとして配布する場合、ファイルは誘惑パッケージに含まれる。 -HtmlHeaderPage=HTMLヘッダー(このページにのみ固有) -PageNameAliasHelp=ページの名前またはエイリアス。 <br>このエイリアスは、WebサイトがWebサーバーの仮想ホスト(Apacke、Nginxなど)から実行されるときにSEOURLを偽造するためにも使用される。このエイリアスを編集するには、ボタン「<strong>%s</strong>」を使用する。 +HtmlHeaderPage=HTMLヘッダー(このページにのみ固有) +PageNameAliasHelp=ページの名前またはエイリアス。 <br>このエイリアスは、WebサイトがWebサーバーの仮想ホスト(Apacke、Nginxなど)から実行されるときにSEOURLを偽造するためにも使用される。このエイリアスを編集するには、ボタン「<strong>%s</strong>」を使用する。 EditTheWebSiteForACommonHeader=注:すべてのページにパーソナライズされたヘッダーを定義する場合は、ページ/コンテナーではなくサイトレベルでヘッダーを編集する。 MediaFiles=メディアライブラリ EditCss=Webサイトのプロパティを編集する @@ -30,7 +30,6 @@ EditInLine=インライン編集 AddWebsite=ウェブサイトを追加 Webpage=Webページ/コンテナ AddPage=ページ/コンテナを追加 -HomePage=ホームページ PageContainer=ページ PreviewOfSiteNotYetAvailable=あなたのウェブサイトのプレビュー<strong>%s</strong>はまだ利用できません。最初に「<strong>完全なWebサイトテンプレート</strong>」をインポートするか、「<strong>ページ/コンテナ</strong>」を追加する必要がある。 RequestedPageHasNoContentYet=ID %sの要求されたページにまだコンテンツがないか、キャッシュファイル.tpl.phpが削除された。これを解決するには、ページのコンテンツを編集すること。 @@ -38,8 +37,8 @@ SiteDeleted=Webサイト '%s'が削除された PageContent=ページ/コンテネア PageDeleted=ウェブサイト%sのページ/ Contenair'%s 'が削除された PageAdded=ページ/ Contenair'%s 'が追加された -ViewSiteInNewTab=新しいタブでサイトを表示 -ViewPageInNewTab=新しいタブでページを表示 +ViewSiteInNewTab=新規タブでサイトを表示 +ViewPageInNewTab=新規タブでページを表示 SetAsHomePage=ホームページに設定する RealURL=実際のURL ViewWebsiteInProduction=ホームURLを使用してWebサイトを表示する @@ -51,23 +50,23 @@ CheckVirtualHostPerms=また、仮想ホストが<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サーバーを使用するには他のプレビューボタンをクリックする。 +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サーバーを使用するには他のプレビューボタンをクリックする。 VirtualHostUrlNotDefined=外部Webサーバーによって提供される仮想ホストのURLが定義されていない NoPageYet=まだページはない -YouCanCreatePageOrImportTemplate=新しいページを作成するか、完全なWebサイトテンプレートをインポートできる +YouCanCreatePageOrImportTemplate=新規ページを作成するか、完全なWebサイトテンプレートをインポートできる SyntaxHelp=特定の構文のヒントに関するヘルプ YouCanEditHtmlSourceckeditor=エディタの "ソース" ボタンを使用して、HTMLソースコードを編集できる。 -YouCanEditHtmlSource=<br><span class="fa fa-bug"></span> タグ <strong>&lt;?php ?&gt;</strong> を使用して、当該ソースにPHPコードを含めることができる。次のグローバル変数が使用できる: $conf, $db, $mysoc, $user, $website, $websitepage, $weblangs, $pagelangs.<br><br><span class="fa fa-bug"></span> 以下の構文を使用して、別のページ/コンテナーのコンテンツを含めることもできる:<br><strong>&lt;?php includeContainer('alias_of_container_to_include'); ?&gt;</strong><br><br><span class="fa fa-bug"></span> 以下の構文で別のページ/コンテナへのリダイレクトを行うことができる(注:リダイレクト前には、いかなるコンテンツも出力しないこと) :<br><strong>&lt;?php redirectToContainer('alias_of_container_to_redirect_to'); ?&gt;</strong><br><br><span class="fa fa-link"></span> 別のページへのリンクを追加するには、以下の構文:<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> 含めるのが <strong>ダウンロードリンク</strong> で、ファイル保管場所が <strong>documents</strong> ディレクトリなら、使うのは <strong>document.php</strong> ラッパー:<br>例、ファイルを documents/ecm (ログ記録が必須) に置くなら、構文は:<br><strong>&lt;a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext"&gt;</strong><br>ファイルを documents/medias (パブリックアクセス用のオープンディレクトリ) に置くなら、構文は:<br><strong>&lt;a href="/document.php?modulepart=medias&file=[relative_dir/]filename.ext"&gt;</strong><br>ファイルを共有リンク (ファイルの共有ハッシュキーを使用したオープンアクセス) で共有するなら、構文は:<br><strong>&lt;a href="/document.php?hashp=publicsharekeyoffile"&gt;</strong><br><br><span class="fa fa-picture-o"></span> 含めるのが <strong>画像</strong> で、保管先が <strong>documents</strong> ディレクトリなら、使うのは <strong>viewimage.php</strong> ラッパー:<br>例、画像を documents/medias (パブリックアクセス用のオープンディレクトリ) に置くなら、構文は:<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> タグ <strong>&lt;?php ?&gt;</strong> を使用して、当該ソースにPHPコードを含めることができる。次のグローバル変数が使用できる: $conf, $db, $mysoc, $user, $website, $websitepage, $weblangs, $pagelangs.<br><br><span class="fa fa-bug"></span> 以下の構文を使用して、別のページ/コンテナーのコンテンツを含めることもできる:<br><strong>&lt;?php includeContainer('alias_of_container_to_include'); ?&gt;</strong><br><br><span class="fa fa-bug"></span> 以下の構文で別のページ/コンテナへのリダイレクトを行うことができる(注:リダイレクト前には、いかなるコンテンツも出力しないこと) :<br><strong>&lt;?php redirectToContainer('alias_of_container_to_redirect_to'); ?&gt;</strong><br><br><span class="fa fa-link"></span> 別のページへのリンクを追加するには、以下の構文:<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> 含めるのが <strong>ダウンロードリンク</strong> で、ファイル保管場所が <strong>documents</strong> ディレクトリなら、使うのは <strong>document.php</strong> ラッパー:<br>例、ファイルを documents/ecm (ログ記録が必須) に置くなら、構文は:<br><strong>&lt;a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext"&gt;</strong><br>ファイルを documents/medias (パブリックアクセス用のオープンディレクトリ) に置くなら、構文は:<br><strong>&lt;a href="/document.php?modulepart=medias&file=[relative_dir/]filename.ext"&gt;</strong><br>ファイルを共有リンク (ファイルの共有ハッシュキーを使用したオープンアクセス) で共有するなら、構文は:<br><strong>&lt;a href="/document.php?hashp=publicsharekeyoffile"&gt;</strong><br><br><span class="fa fa-picture-o"></span> 含めるのが <strong>画像</strong> で、保管先が <strong>documents</strong> ディレクトリなら、使うのは <strong>viewimage.php</strong> ラッパー:<br>例、画像を documents/medias (パブリックアクセス用のオープンディレクトリ) に置くなら、構文は:<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=画像を共有リンク (ファイルの共有ハッシュキーを使用したオープンアクセス) で共有するなら、構文は:<br><strong>&lt;img src="/viewimage.php?hashp=12345679012..."&gt;</strong><br> YouCanEditHtmlSourceMore=<br>HTMLまたは動的コードのその他の例は、 <a href="%s" target="_blank">the wiki documentation</a><br> で利用可能。 ClonePage=クローンページ/コンテナ CloneSite=クローンサイト SiteAdded=ウェブサイトを追加 -ConfirmClonePage=新しいページのコード/エイリアスを入力し、それが複製されたページの翻訳であるかどうかを入力すること。 -PageIsANewTranslation=新しいページは現在のページの翻訳ですか? -LanguageMustNotBeSameThanClonedPage=ページを翻訳として複製する。新しいページの言語は、ソースページの言語とは異なっている必要がある。 +ConfirmClonePage=新規ページのコード/エイリアスを入力し、それが複製されたページの翻訳であるかどうかを入力すること。 +PageIsANewTranslation=新規ページは現在のページの翻訳ですか? +LanguageMustNotBeSameThanClonedPage=ページを翻訳として複製する。新規ページの言語は、ソースページの言語とは異なっている必要がある。 ParentPageId=親ページID WebsiteId=ウェブサイトID CreateByFetchingExternalPage=外部URLからページをフェッチしてページ/コンテナを作成する... @@ -84,12 +83,12 @@ AddWebsiteAccount=Webサイトアカウントを作成する BackToListForThirdParty=サードパーティのリストに戻る DisableSiteFirst=最初にウェブサイトを無効にする MyContainerTitle=私のウェブサイトのタイトル -AnotherContainer=これは、別のページ/コンテナのコンテンツを含める方法です(埋め込まれたサブコンテナが存在しない可能性があるため、動的コードを有効にすると、ここでエラーが発生する可能性がある) +AnotherContainer=これは、別のページ/コンテナのコンテンツを含める方法です(埋め込まれたサブコンテナが存在しない可能性があるため、動的コードを有効にすると、ここでエラーが発生する可能性がある) SorryWebsiteIsCurrentlyOffLine=申し訳ないが、このウェブサイトは現在オフライン。後で戻ってきてください... WEBSITE_USE_WEBSITE_ACCOUNTS=Webサイトのアカウントテーブルを有効にする -WEBSITE_USE_WEBSITE_ACCOUNTSTooltip=テーブルを有効にして、各Webサイト/サードパーティの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=画像はディレクトリに保存する必要がある @@ -101,20 +100,20 @@ EmptyPage=空のページ ExternalURLMustStartWithHttp=外部URLは http:// または https:// で始まる必要がある ZipOfWebsitePackageToImport=ウェブサイトテンプレートパッケージのZipファイルをアップロードする ZipOfWebsitePackageToLoad=または利用可能な埋め込みWebサイトテンプレートパッケージを選択する -ShowSubcontainers=動的コンテンツを含める +ShowSubcontainers=動的コンテンツを表示する InternalURLOfPage=ページの内部URL ThisPageIsTranslationOf=このページ/コンテナはの翻訳です ThisPageHasTranslationPages=このページ/コンテナには翻訳がある NoWebSiteCreateOneFirst=ウェブサイトはまだ作成されていない。最初に作成する。 GoTo=に移動 -DynamicPHPCodeContainsAForbiddenInstruction=動的コンテンツとしてデフォルトで禁止されているPHP命令 '<strong> %s </strong>'を含む動的PHPコードを追加する(許可されるコマンドのリストを増やすには、非表示のオプションWEBSITE_PHP_ALLOW_xxxを参照すること)。 +DynamicPHPCodeContainsAForbiddenInstruction=動的コンテンツとしてデフォルトで禁止されているPHP命令 '<strong> %s </strong>'を含む動的PHPコードを追加する(許可されるコマンドのリストを増やすには、非表示のオプションWEBSITE_PHP_ALLOW_xxxを参照すること)。 NotAllowedToAddDynamicContent=WebサイトでPHP動的コンテンツを追加または編集する権限がない。許可を求めるか、コードを変更せずにphpタグに入れること。 ReplaceWebsiteContent=Webサイトのコンテンツを検索または置換する DeleteAlsoJs=このウェブサイトに固有のすべてのJavaScriptファイルも削除するか? DeleteAlsoMedias=このウェブサイトに固有のすべてのメディアファイルも削除するか? MyWebsitePages=私のウェブサイトのページ SearchReplaceInto=検索|に置き換える -ReplaceString=新しい文字列 +ReplaceString=新規文字列 CSSContentTooltipHelp=ここにCSSコンテンツを入力する。アプリケーションのCSSとの競合を避けるために、すべての定義に .bodywebsite クラスを前置することが必須。例:<br><br>#mycssselector, input.myclass:hover { ... }<br>は、以下のようにする。<br>.bodywebsite #mycssselector, .bodywebsite input.myclass:hover { ... }<br><br>注記: もし大きなファイルでこの前置が無いものがあれば、 'lessc' を使用して .bodywebsite の前置をすべての場所に追加する変換ができる。 LinkAndScriptsHereAreNotLoadedInEditor=警告:このコンテンツは、サーバーからサイトにアクセスした場合にのみ出力される。編集モードでは使用されないため、編集モードでもJavaScriptファイルをロードする必要がある場合は、タグ「scriptsrc = ...」をページに追加するだけ。 Dynamiccontent=動的コンテンツを含むページのサンプル @@ -124,7 +123,7 @@ ShowSubContainersOnOff=「動的コンテンツ」を実行するモードは%s GlobalCSSorJS=WebサイトのグローバルCSS / JS /ヘッダーファイル BackToHomePage=ホームページに戻る... TranslationLinks=翻訳リンク -YouTryToAccessToAFileThatIsNotAWebsitePage=利用できないページにアクセスしようとしました。 <br>(ref = %s、type = %s、status = %s) +YouTryToAccessToAFileThatIsNotAWebsitePage=利用できないページにアクセスしようとしました。 <br>(ref = %s、type = %s、status = %s) UseTextBetween5And70Chars=SEOを適切に実践するには、5〜70文字のテキストを使用する MainLanguage=主な言語 OtherLanguages=他の言語 @@ -136,4 +135,5 @@ RSSFeed=RSSフィード RSSFeedDesc=このURLを使用して、タイプ「blogpost」の最新記事のRSSフィードを取得できる。 PagesRegenerated=%sページ(s)/コンテナ(s)が再生成された RegenerateWebsiteContent=Webサイトのキャッシュファイルを再生成する -AllowedInFrames=Allowed in Frames +AllowedInFrames=フレームで許可 +DefineListOfAltLanguagesInWebsiteProperties=使用可能なすべての言語のリストをWebサイトのプロパティに定義する。 diff --git a/htdocs/langs/ja_JP/withdrawals.lang b/htdocs/langs/ja_JP/withdrawals.lang index a4f6da68897..96b9b5e37e1 100644 --- a/htdocs/langs/ja_JP/withdrawals.lang +++ b/htdocs/langs/ja_JP/withdrawals.lang @@ -1,148 +1,152 @@ # 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 +CustomersStandingOrdersArea=口座振替による支払 +SuppliersStandingOrdersArea=クレジット振込による支払 +StandingOrdersPayment=口座振替の支払注文 +StandingOrderPayment=口座振替の支払注文 +NewStandingOrder=新規口座振替の注文 +NewPaymentByBankTransfer=クレジット振込による新規支払 StandingOrderToProcess=処理するには -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=撤回する金額 -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 +PaymentByBankTransferReceipts=クレジット転送注文 +PaymentByBankTransferLines=クレジット転送オーダーライン +WithdrawalsReceipts=口座振替の注文 +WithdrawalReceipt=口座振替の注文 +BankTransferReceipts=クレジット転送注文 +BankTransferReceipt=クレジット転送注文 +LatestBankTransferReceipts=最新の%sクレジット転送注文 +LastWithdrawalReceipts=最新の%s口座振替ファイル +WithdrawalsLine=口座振替注文ライン +CreditTransferLine=クレジット転送ライン +WithdrawalsLines=口座振替注文明細 +CreditTransferLines=クレジット転送ライン +RequestStandingOrderToTreat=処理する口座振替の注文のリクエスト +RequestStandingOrderTreated=口座振替の支払注文のリクエストが処理された +RequestPaymentsByBankTransferToTreat=処理するクレジット転送のリクエスト +RequestPaymentsByBankTransferTreated=処理されたクレジット転送のリクエスト +NotPossibleForThisStatusOfWithdrawReceiptORLine=まだ不可能。特定の行で拒否を宣言する前に、撤回ステータスを「クレジット済み」に設定する必要がある。 +NbOfInvoiceToWithdraw=口座振替の注文を待っている適格な顧客の請求書の数 +NbOfInvoiceToWithdrawWithInfo=銀行口座情報が定義された口座振替の注文を含む顧客の請求書の数 +NbOfInvoiceToPayByBankTransfer=クレジット振込による支払を待っている適格なサプライヤー請求書の数 +SupplierInvoiceWaitingWithdraw=クレジット振込による支払を待っている仕入先の請求書 +InvoiceWaitingWithdraw=口座振替を待っている請求書 +InvoiceWaitingPaymentByBankTransfer=クレジット転送を待っている請求書 +AmountToWithdraw=引落とす金額 +NoInvoiceToWithdraw='%s'の未処理の請求書は待機していない。請求書カードのタブ「%s」に移動して、リクエストを行う。 +NoSupplierInvoiceToWithdraw=「直接クレジットリクエスト」が開いているサプライヤの請求書は待機していない。請求書カードのタブ「%s」に移動して、リクエストを行う。 +ResponsibleUser=ユーザ責任 +WithdrawalsSetup=口座振替の設定 +CreditTransferSetup=クレジット転送の設定 +WithdrawStatistics=口座振替の支払統計 +CreditTransferStatistics=クレジット転送統計 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 -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>. +LastWithdrawalReceipt=最新の%s口座振替の領収書 +MakeWithdrawRequest=口座振替の支払リクエストを行う +MakeBankTransferOrder=クレジット振込をリクエストする +WithdrawRequestsDone=%s口座振替の支払要求が記録された +BankTransferRequestsDone=%sクレジット転送リクエストが記録済 +ThirdPartyBankCode=サードパーティの銀行コード +NoInvoiceCouldBeWithdrawed=正常に引き落とされた請求書はない。請求書が有効なIBANを持つ会社のものであり、IBANにモード<strong> %s </strong>のUMR(一意の委任参照)があることを確認すること。 ClassCredited=入金分類 -ClassCreditedConfirm=あなたの銀行口座に入金、この撤退の領収書を分類してもよろしいですか? +ClassCreditedConfirm=あなたの銀行口座に入金、この引落しの領収書を分類してもよいか? TransData=日付伝送 TransMetod=方式伝送 Send=送信 Lines=行 StandingOrderReject=拒否を発行 -WithdrawsRefused=Direct debit refused -WithdrawalRefused=撤退は拒否されました -CreditTransfersRefused=Credit transfers refused -WithdrawalRefusedConfirm=あなたは社会のために撤退拒否を入力してもよろしいです +WithdrawsRefused=口座振替は拒否された +WithdrawalRefused=引落しは拒否された +CreditTransfersRefused=クレジット転送が拒否された +WithdrawalRefusedConfirm=協会に対する引落し拒否を入力してもよいか RefusedData=拒絶反応の日付 RefusedReason=拒否理由 RefusedInvoicing=拒絶反応を請求 -NoInvoiceRefused=拒絶反応を充電しないでください -InvoiceRefused=Invoice refused (Charge the rejection to customer) -StatusDebitCredit=Status debit/credit +NoInvoiceRefused=拒絶反応を充電しないこと +InvoiceRefused=請求書が拒否された(拒否を顧客に請求する) +StatusDebitCredit=ステータスの借方/貸方 StatusWaiting=待っている StatusTrans=送信 -StatusDebited=Debited +StatusDebited=借方記入 StatusCredited=クレジット StatusPaid=有料 StatusRefused=拒否 StatusMotif0=特定されていない StatusMotif1=提供insuffisante StatusMotif2=ティラージュconteste -StatusMotif3=No direct debit payment order -StatusMotif4=Sales Order +StatusMotif3=口座振替の注文はない +StatusMotif4=販売注文 StatusMotif5=inexploitable RIB StatusMotif6=バランスせずにアカウント StatusMotif7=裁判 StatusMotif8=他の理由 -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) +CreateForSepaFRST=口座振替ファイルの作成(SEPA FRST) +CreateForSepaRCUR=口座振替ファイルの作成(SEPA RCUR) +CreateAll=口座振替ファイルの作成(すべて) +CreateFileForPaymentByBankTransfer=クレジット転送用のファイルを作成する +CreateSepaFileForPaymentByBankTransfer=クレジット転送ファイル(SEPA)の作成 CreateGuichet=唯一のオフィス CreateBanque=唯一の銀行 OrderWaiting=治療を待っている -NotifyTransmision=Record file transmission of order -NotifyCredit=Record credit of order +NotifyTransmision=注文の記録ファイル送信 +NotifyCredit=注文のクレジットを記録する NumeroNationalEmetter=国立トランスミッタ数 WithBankUsingRIB=RIBを使用した銀行口座 WithBankUsingBANBIC=IBAN / BIC / SWIFTを使用した銀行口座 -BankToReceiveWithdraw=Receiving Bank Account -BankToPayCreditTransfer=Bank Account used as source of payments +BankToReceiveWithdraw=銀行口座の受け取り +BankToPayCreditTransfer=支払元として使用される銀行口座 CreditDate=クレジットで -WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country %s (Your country is not supported) -ShowWithdraw=Show Direct Debit Order -IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->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 +WithdrawalFileNotCapable=お住まいの国の引き出しレシートファイルを生成できない%s(お住まいの国はサポートされていない) +ShowWithdraw=口座振替の注文を表示 +IfInvoiceNeedOnWithdrawPaymentWontBeClosed=ただし、請求書にまだ処理されていない口座振替の支払注文が少なくとも1つある場合、事前の引き出し管理を可能にするために支払済みとして設定されない。 +DoStandingOrdersBeforePayments=このタブでは、口座振替の支払注文をリクエストできる。完了したら、メニューの 銀行 -> 口座振替による支払 に移動して、口座振替の注文を生成および管理する。口座振替の注文が締め切られると、請求書の支払は自動的に記録され、残りの支払がゼロの場合は請求書が締め切られる。 +DoCreditTransferBeforePayments=このタブでは、クレジット振込の注文をリクエストできる。完了したら、メニュー 銀行 -> クレジット転送による支払 に移動して、クレジット転送オーダーを生成および管理する。クレジット振込注文がクローズされると、請求書の支払が自動的に記録され、残りの支払がゼロの場合、請求書はクローズされる。 +WithdrawalFile=デビット注文ファイル +CreditTransferFile=クレジット転送ファイル +SetToStatusSent=ステータス「ファイル送信済み」に設定 +ThisWillAlsoAddPaymentOnInvoice=これはまた、請求書に支払を記録し、支払の残りがnullの場合、それらを「支払済み」として分類する +StatisticsByLineStatus=回線のステータスによる統計 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 +DateRUM=署名日を委任する +RUMLong=独自のマンデートリファレンス +RUMWillBeGenerated=空の場合、銀行口座情報が保存されると、UMR(Unique Mandate Reference)が生成される。 +WithdrawMode=口座振替モード(FRSTまたはRECUR) +WithdrawRequestAmount=口座振替リクエストの金額: +BankTransferAmount=クレジット送金リクエストの金額: +WithdrawRequestErrorNilAmount=空の金額の口座振替リクエストを作成できない。 +SepaMandate=SEPA口座振替の委任 +SepaMandateShort=SEPAマンデート +PleaseReturnMandate=この委任フォームを電子メールで%sに、または郵送でに返送すること。 +SEPALegalText=この委任フォームに署名することにより、(A)%sが銀行に口座から引き落とすように指示を送信し、(B)%sからの指示に従って銀行が口座から引き落とすように承認する。あなたの権利の一部として、あなたはあなたの銀行とのあなたの合意の条件の下であなたの銀行からの払い戻しを受ける権利がある。アカウントから引き落とされた日から8週間以内に払い戻しを請求する必要がある。上記の義務に関するあなたの権利は、あなたがあなたの銀行から入手できる残高明細で説明される。 +CreditorIdentifier=債権者識別子 +CreditorName=債権者名 +SEPAFillForm=(B)*のマークが付いているすべてのフィールドに入力すること +SEPAFormYourName=あなたの名前 +SEPAFormYourBAN=あなたの銀行口座名(IBAN) +SEPAFormYourBIC=銀行識別コード(BIC) +SEPAFrstOrRecur=支払方法 +ModeRECUR=定期支払 +ModeFRST=一回限りの支払 +PleaseCheckOne=1つだけ確認すること +CreditTransferOrderCreated=クレジット転送オーダー%sが作成された +DirectDebitOrderCreated=口座振替注文%sが作成された +AmountRequested=要求された金額 SEPARCUR=SEPA CUR SEPAFRST=SEPA FRST -ExecutionDate=Execution date -CreateForSepa=Create direct debit file -ICS=Creditor Identifier CI -END_TO_END="EndToEndId" SEPA XML tag - Unique id assigned per transaction -USTRD="Unstructured" SEPA XML tag -ADDDAYS=Add days to Execution Date -NoDefaultIBANFound=No default IBAN found for this third party +ExecutionDate=実行日 +CreateForSepa=口座振替ファイルを作成する +ICS=口座振替の貸方識別子 CI +ICSTransfer=銀行振込の貸方識別子 CI +END_TO_END=「EndToEndId」SEPAXMLタグ-トランザクションごとに割り当てられた一意のID +USTRD=「非構造化」SEPAXMLタグ +ADDDAYS=実行日に日数を追加 +NoDefaultIBANFound=このサードパーティのデフォルトのIBANは見つからなかった ### 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> +InfoCreditSubject=銀行による口座振替注文%sの支払 +InfoCreditMessage=口座振替の支払注文%sは銀行によって支払われた<br>支払のデータ:%s +InfoTransSubject=銀行への口座振替注文%sの送信 +InfoTransMessage=口座振替の支払注文%sは、%s%sによって銀行に送信された。 <br> <br> InfoTransData=金額:%s <br> Metode:%s <br>日付:%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 +InfoRejectSubject=口座振替の注文が拒否された +InfoRejectMessage=こんにちは、<br><br>法人 %s に関連する請求書%sの口座振替の注文で、金額が%sのものは、銀行によって拒否された。 <br> <br>-<br> %s ModeWarning=リアルモードのオプションが設定されていない、我々は、このシミュレーションの後に停止 -ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorCompanyHasDuplicateDefaultBAN=ID %s の法人には、複数のデフォルトの銀行口座がある。どちらを使用するかを知る方法はない。 +ErrorICSmissing=銀行口座%sにICSがない +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=口座振替の合計金額が行の合計と異なる diff --git a/htdocs/langs/ja_JP/workflow.lang b/htdocs/langs/ja_JP/workflow.lang index ab06c374860..cf1f12eb09f 100644 --- a/htdocs/langs/ja_JP/workflow.lang +++ b/htdocs/langs/ja_JP/workflow.lang @@ -1,23 +1,25 @@ # Dolibarr language file - Source file is en_US - workflow -WorkflowSetup=ワークフローモジュールのセットアップ -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. +WorkflowSetup=ワークフローモジュールの設定 +WorkflowDesc=このモジュールは、いくつかの自動アクションを提供する。デフォルトでは、ワークフローは開いている(必要な順序で実行できる)が、ここでいくつかの自動アクションをアクティブ化できる。 +ThereIsNoWorkflowToModify=アクティブ化されたモジュールで使用できるワークフローの変更はない。 # 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) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=売買契約提案書が署名された後、自動的に販売注文を作成する(新規注文は提案と同じ金額になる) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=売買契約提案書書に署名した後、顧客の請求書を自動的に作成する(新規請求書は提案書と同じ金額になる) +descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=契約が検証された後、顧客の請求書を自動的に作成する +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=受注がクローズされた後、顧客の請求書を自動的に作成する(新規請求書は注文と同じ金額になる) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal 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) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=販売注文が請求済みに設定されている場合(および注文の金額が署名されたリンクされた提案の合計金額と同じ場合)、リンクされたソース提案を請求済みとして分類する。 +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=リンクされたソースプロポーザルを、顧客の請求書が検証されたときに請求済みとして分類する(また、請求書の金額が署名されたリンクされたプロポーザルの合計金額と同じである場合) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=顧客の請求書が検証されたときに請求済みとしてリンクされたソース販売注文を分類する(請求書の金額がリンクされた注文の合計金額と同じである場合) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=顧客の請求書が支払い済みに設定されている場合(および請求書の金額がリンクされた注文の合計金額と同じである場合)、リンクされたソース販売注文を請求済みとして分類する。 +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=リンクされたソース販売注文を、出荷が検証されたときに出荷されたものとして分類する(また、すべての出荷によって出荷された数量が更新する注文と同じである場合) # Autoclassify purchase order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=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 +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=リンクされたソースベンダーの提案を、ベンダーの請求書が検証されたときに請求済みとして分類する(また、請求書の金額がリンクされた提案の合計金額と同じである場合)。 +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=ベンダーの請求書が検証されたときに請求済みとしてリンクされたソース発注書を分類する(請求書の金額がリンクされた注文の合計金額と同じである場合) +descWORKFLOW_BILL_ON_RECEPTION=リンクされたサプライヤの注文が検証されたときに、受信を「請求済み」に分類する # Autoclose intervention -descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed -AutomaticCreation=Automatic creation -AutomaticClassification=Automatic classification +descWORKFLOW_TICKET_CLOSE_INTERVENTION=チケットが閉じられたら、チケットにリンクされているすべての介入を閉じる +AutomaticCreation=自動作成 +AutomaticClassification=自動分類 +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=顧客の請求書が検証されたときに、リンクされたソース出荷をクローズとして分類する diff --git a/htdocs/langs/ka_GE/accountancy.lang b/htdocs/langs/ka_GE/accountancy.lang index 3211a0b62df..9e084932477 100644 --- a/htdocs/langs/ka_GE/accountancy.lang +++ b/htdocs/langs/ka_GE/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Date Docref=Reference LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/ka_GE/admin.lang b/htdocs/langs/ka_GE/admin.lang index f1c41a3b62b..f9a6468d94a 100644 --- a/htdocs/langs/ka_GE/admin.lang +++ b/htdocs/langs/ka_GE/admin.lang @@ -56,6 +56,8 @@ 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. @@ -85,7 +87,6 @@ ShowPreview=Show preview ShowHideDetails=Show-Hide details PreviewNotAvailable=Preview not available ThemeCurrentlyActive=Theme currently active -CurrentTimeZone=TimeZone PHP (server) MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Dates are stored and returned by database server as if they were kept as submitted string. The timezone has effect only when using the UNIX_TIMESTAMP function (that should not be used by Dolibarr, so database TZ should have no effect, even if changed after data was entered). Space=Space @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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. @@ -256,6 +257,7 @@ 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. @@ -375,7 +377,7 @@ 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:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +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 @@ -406,7 +408,7 @@ UrlGenerationParameters=Parameters to secure URLs SecurityTokenIsUnique=Use a unique securekey parameter for each URL EnterRefToBuildUrl=Enter reference for object %s GetSecuredUrl=Get calculated URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +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 @@ -668,7 +670,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 @@ -1306,7 +1308,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,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 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=New menu MenuHandler=Menu handler MenuModule=Source module -HideUnauthorizedMenu= Hide unauthorized menus (gray) +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 @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/ka_GE/banks.lang b/htdocs/langs/ka_GE/banks.lang index 9500a5b8b2e..81a23238550 100644 --- a/htdocs/langs/ka_GE/banks.lang +++ b/htdocs/langs/ka_GE/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/ka_GE/blockedlog.lang b/htdocs/langs/ka_GE/blockedlog.lang index 5afae6e9e53..0bba5605d0f 100644 --- a/htdocs/langs/ka_GE/blockedlog.lang +++ b/htdocs/langs/ka_GE/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/ka_GE/boxes.lang b/htdocs/langs/ka_GE/boxes.lang index d6fd298a3a7..9a751483fb1 100644 --- a/htdocs/langs/ka_GE/boxes.lang +++ b/htdocs/langs/ka_GE/boxes.lang @@ -46,9 +46,12 @@ 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. @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Accountancy +ValidatedProjects=Validated projects diff --git a/htdocs/langs/ka_GE/cashdesk.lang b/htdocs/langs/ka_GE/cashdesk.lang index 498baa82200..3fef645d99d 100644 --- a/htdocs/langs/ka_GE/cashdesk.lang +++ b/htdocs/langs/ka_GE/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +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 @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/ka_GE/categories.lang b/htdocs/langs/ka_GE/categories.lang index ba37a43b4ec..4ddf0d6093f 100644 --- a/htdocs/langs/ka_GE/categories.lang +++ b/htdocs/langs/ka_GE/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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 diff --git a/htdocs/langs/ka_GE/companies.lang b/htdocs/langs/ka_GE/companies.lang index dadff6a7894..8dc815b522e 100644 --- a/htdocs/langs/ka_GE/companies.lang +++ b/htdocs/langs/ka_GE/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi 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=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=Potential diff --git a/htdocs/langs/ka_GE/compta.lang b/htdocs/langs/ka_GE/compta.lang index 8f4f058bb87..1afeb6e3727 100644 --- a/htdocs/langs/ka_GE/compta.lang +++ b/htdocs/langs/ka_GE/compta.lang @@ -111,7 +111,7 @@ 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 ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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 diff --git a/htdocs/langs/ka_GE/cron.lang b/htdocs/langs/ka_GE/cron.lang index d2da7ded67e..2ebdda1e685 100644 --- a/htdocs/langs/ka_GE/cron.lang +++ b/htdocs/langs/ka_GE/cron.lang @@ -6,14 +6,15 @@ 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 -OrToLaunchASpecificJob=Or to check and launch a specific job +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 environement you can use Scheduled task tools 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 @@ -42,10 +43,11 @@ CronModule=Module CronNoJobs=No jobs registered CronPriority=Priority CronLabel=Label -CronNbRun=Nb. launch -CronMaxRun=Max number launch +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 @@ -56,16 +58,16 @@ CronNote=Comment CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Enable +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 exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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 @@ -76,8 +78,14 @@ 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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +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' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/ka_GE/errors.lang b/htdocs/langs/ka_GE/errors.lang index 893f4a35b65..5b26be724d9 100644 --- a/htdocs/langs/ka_GE/errors.lang +++ b/htdocs/langs/ka_GE/errors.lang @@ -5,8 +5,10 @@ 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. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ 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=Ref used for creation already exists. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/ka_GE/exports.lang b/htdocs/langs/ka_GE/exports.lang index 2dcf4317e00..a0eb7161ef2 100644 --- a/htdocs/langs/ka_GE/exports.lang +++ b/htdocs/langs/ka_GE/exports.lang @@ -26,6 +26,8 @@ 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. @@ -131,3 +133,4 @@ 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/ka_GE/mails.lang b/htdocs/langs/ka_GE/mails.lang index 1235eef3b27..2d02c5ddcf9 100644 --- a/htdocs/langs/ka_GE/mails.lang +++ b/htdocs/langs/ka_GE/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Notifications -NoNotificationsWillBeSent=No email notifications are planned for this event and company -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent +NotificationsAuto=Notifications Auto. +NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company +ANotificationsWillBeSent=1 automatic notification will be sent by email +SomeNotificationsWillBeSent=%s automatic notifications will be sent by email +AddNewNotification=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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +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/ka_GE/main.lang b/htdocs/langs/ka_GE/main.lang index 96c68cdcfa3..f8ba6f4073c 100644 --- a/htdocs/langs/ka_GE/main.lang +++ b/htdocs/langs/ka_GE/main.lang @@ -28,7 +28,9 @@ 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 @@ -85,6 +87,8 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C 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 @@ -220,6 +224,7 @@ Value=Value PersonalValue=Personal value NewObject=New %s NewValue=New value +OldValue=Old value %s CurrentValue=Current value Code=Code Type=Type @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Option +Filters=Filters List=List FullList=Full list FullConversation=Full conversation @@ -650,6 +656,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 @@ -671,7 +678,7 @@ SendMail=Send email Email=Email NoEMail=No email AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=No mobile phone Owner=Owner FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/ka_GE/modulebuilder.lang b/htdocs/langs/ka_GE/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/ka_GE/modulebuilder.lang +++ b/htdocs/langs/ka_GE/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/ka_GE/mrp.lang b/htdocs/langs/ka_GE/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/ka_GE/mrp.lang +++ b/htdocs/langs/ka_GE/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/ka_GE/other.lang b/htdocs/langs/ka_GE/other.lang index 54c0572d453..7a895bb1ca5 100644 --- a/htdocs/langs/ka_GE/other.lang +++ b/htdocs/langs/ka_GE/other.lang @@ -5,8 +5,6 @@ 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 -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Right CalculatedWeight=Calculated weight CalculatedVolume=Calculated volume Weight=Weight -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/ka_GE/products.lang b/htdocs/langs/ka_GE/products.lang index 97db059594f..9ecc11ed93d 100644 --- a/htdocs/langs/ka_GE/products.lang +++ b/htdocs/langs/ka_GE/products.lang @@ -108,7 +108,8 @@ 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=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +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 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/ka_GE/projects.lang b/htdocs/langs/ka_GE/projects.lang index baf0ecde17f..05aa1f5a560 100644 --- a/htdocs/langs/ka_GE/projects.lang +++ b/htdocs/langs/ka_GE/projects.lang @@ -76,15 +76,16 @@ MyActivities=My tasks/activities MyProjects=My projects MyProjectsArea=My projects Area DurationEffective=Effective duration -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Time +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/ka_GE/recruitment.lang b/htdocs/langs/ka_GE/recruitment.lang index b775e78552e..437445f25dc 100644 --- a/htdocs/langs/ka_GE/recruitment.lang +++ b/htdocs/langs/ka_GE/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/ka_GE/sendings.lang b/htdocs/langs/ka_GE/sendings.lang index 5ce3b7f67e9..73bd9aebd42 100644 --- a/htdocs/langs/ka_GE/sendings.lang +++ b/htdocs/langs/ka_GE/sendings.lang @@ -30,6 +30,7 @@ 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 @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=More complete document model for delivery receipts (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/ka_GE/stocks.lang b/htdocs/langs/ka_GE/stocks.lang index 660443bcded..a1f55010139 100644 --- a/htdocs/langs/ka_GE/stocks.lang +++ b/htdocs/langs/ka_GE/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/ka_GE/ticket.lang b/htdocs/langs/ka_GE/ticket.lang index 59519282c80..982fff90ffa 100644 --- a/htdocs/langs/ka_GE/ticket.lang +++ b/htdocs/langs/ka_GE/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Other TicketSeverityShortLOW=Low TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=High -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Read Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/ka_GE/website.lang b/htdocs/langs/ka_GE/website.lang index 03e042e4be6..f17def114b8 100644 --- a/htdocs/langs/ka_GE/website.lang +++ b/htdocs/langs/ka_GE/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/ka_GE/withdrawals.lang b/htdocs/langs/ka_GE/withdrawals.lang index 114a8d9dd6c..059b3451c11 100644 --- a/htdocs/langs/ka_GE/withdrawals.lang +++ b/htdocs/langs/ka_GE/withdrawals.lang @@ -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>. ClassCredited=Classify credited @@ -131,7 +132,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,3 +148,5 @@ 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/ka_GE/workflow.lang b/htdocs/langs/ka_GE/workflow.lang index 299be277e1d..494a0424a75 100644 --- a/htdocs/langs/ka_GE/workflow.lang +++ b/htdocs/langs/ka_GE/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 diff --git a/htdocs/langs/km_KH/accountancy.lang b/htdocs/langs/km_KH/accountancy.lang index 3211a0b62df..9e084932477 100644 --- a/htdocs/langs/km_KH/accountancy.lang +++ b/htdocs/langs/km_KH/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Date Docref=Reference LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/km_KH/admin.lang b/htdocs/langs/km_KH/admin.lang index f1c41a3b62b..f9a6468d94a 100644 --- a/htdocs/langs/km_KH/admin.lang +++ b/htdocs/langs/km_KH/admin.lang @@ -56,6 +56,8 @@ 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. @@ -85,7 +87,6 @@ ShowPreview=Show preview ShowHideDetails=Show-Hide details PreviewNotAvailable=Preview not available ThemeCurrentlyActive=Theme currently active -CurrentTimeZone=TimeZone PHP (server) MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Dates are stored and returned by database server as if they were kept as submitted string. The timezone has effect only when using the UNIX_TIMESTAMP function (that should not be used by Dolibarr, so database TZ should have no effect, even if changed after data was entered). Space=Space @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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. @@ -256,6 +257,7 @@ 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. @@ -375,7 +377,7 @@ 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:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +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 @@ -406,7 +408,7 @@ UrlGenerationParameters=Parameters to secure URLs SecurityTokenIsUnique=Use a unique securekey parameter for each URL EnterRefToBuildUrl=Enter reference for object %s GetSecuredUrl=Get calculated URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +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 @@ -668,7 +670,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 @@ -1306,7 +1308,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,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 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=New menu MenuHandler=Menu handler MenuModule=Source module -HideUnauthorizedMenu= Hide unauthorized menus (gray) +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 @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/km_KH/banks.lang b/htdocs/langs/km_KH/banks.lang index 9500a5b8b2e..81a23238550 100644 --- a/htdocs/langs/km_KH/banks.lang +++ b/htdocs/langs/km_KH/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/km_KH/blockedlog.lang b/htdocs/langs/km_KH/blockedlog.lang index 5afae6e9e53..0bba5605d0f 100644 --- a/htdocs/langs/km_KH/blockedlog.lang +++ b/htdocs/langs/km_KH/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/km_KH/boxes.lang b/htdocs/langs/km_KH/boxes.lang index d6fd298a3a7..9a751483fb1 100644 --- a/htdocs/langs/km_KH/boxes.lang +++ b/htdocs/langs/km_KH/boxes.lang @@ -46,9 +46,12 @@ 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. @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Accountancy +ValidatedProjects=Validated projects diff --git a/htdocs/langs/km_KH/cashdesk.lang b/htdocs/langs/km_KH/cashdesk.lang index 498baa82200..3fef645d99d 100644 --- a/htdocs/langs/km_KH/cashdesk.lang +++ b/htdocs/langs/km_KH/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +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 @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/km_KH/categories.lang b/htdocs/langs/km_KH/categories.lang index ba37a43b4ec..4ddf0d6093f 100644 --- a/htdocs/langs/km_KH/categories.lang +++ b/htdocs/langs/km_KH/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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 diff --git a/htdocs/langs/km_KH/companies.lang b/htdocs/langs/km_KH/companies.lang index dadff6a7894..8dc815b522e 100644 --- a/htdocs/langs/km_KH/companies.lang +++ b/htdocs/langs/km_KH/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi 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=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=Potential diff --git a/htdocs/langs/km_KH/compta.lang b/htdocs/langs/km_KH/compta.lang index 8f4f058bb87..1afeb6e3727 100644 --- a/htdocs/langs/km_KH/compta.lang +++ b/htdocs/langs/km_KH/compta.lang @@ -111,7 +111,7 @@ 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 ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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 diff --git a/htdocs/langs/km_KH/cron.lang b/htdocs/langs/km_KH/cron.lang index 1de1251831a..2ebdda1e685 100644 --- a/htdocs/langs/km_KH/cron.lang +++ b/htdocs/langs/km_KH/cron.lang @@ -7,13 +7,14 @@ Permission23103 = Delete Scheduled job Permission23104 = Execute Scheduled job # Admin CronSetup=Scheduled job management setup -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=Or to check and launch a specific job +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 @@ -46,6 +47,7 @@ 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 @@ -56,7 +58,7 @@ CronNote=Comment CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Enable +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Disable CronTaskInactive=This job is disabled CronId=Id @@ -82,3 +84,8 @@ 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/km_KH/errors.lang b/htdocs/langs/km_KH/errors.lang index 893f4a35b65..5b26be724d9 100644 --- a/htdocs/langs/km_KH/errors.lang +++ b/htdocs/langs/km_KH/errors.lang @@ -5,8 +5,10 @@ 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. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ 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=Ref used for creation already exists. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/km_KH/exports.lang b/htdocs/langs/km_KH/exports.lang index 3549e3f8b23..a0eb7161ef2 100644 --- a/htdocs/langs/km_KH/exports.lang +++ b/htdocs/langs/km_KH/exports.lang @@ -133,3 +133,4 @@ 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/km_KH/mails.lang b/htdocs/langs/km_KH/mails.lang index 1235eef3b27..2d02c5ddcf9 100644 --- a/htdocs/langs/km_KH/mails.lang +++ b/htdocs/langs/km_KH/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Notifications -NoNotificationsWillBeSent=No email notifications are planned for this event and company -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent +NotificationsAuto=Notifications Auto. +NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company +ANotificationsWillBeSent=1 automatic notification will be sent by email +SomeNotificationsWillBeSent=%s automatic notifications will be sent by email +AddNewNotification=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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +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/km_KH/main.lang b/htdocs/langs/km_KH/main.lang index 68378c28883..af9d6ca0889 100644 --- a/htdocs/langs/km_KH/main.lang +++ b/htdocs/langs/km_KH/main.lang @@ -28,7 +28,9 @@ 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 @@ -85,6 +87,8 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C 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 @@ -220,6 +224,7 @@ Value=Value PersonalValue=Personal value NewObject=New %s NewValue=New value +OldValue=Old value %s CurrentValue=Current value Code=Code Type=Type @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Option +Filters=Filters List=List FullList=Full list FullConversation=Full conversation @@ -650,6 +656,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 @@ -671,7 +678,7 @@ SendMail=Send email Email=Email NoEMail=No email AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=No mobile phone Owner=Owner FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/km_KH/modulebuilder.lang b/htdocs/langs/km_KH/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/km_KH/modulebuilder.lang +++ b/htdocs/langs/km_KH/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/km_KH/mrp.lang b/htdocs/langs/km_KH/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/km_KH/mrp.lang +++ b/htdocs/langs/km_KH/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/km_KH/other.lang b/htdocs/langs/km_KH/other.lang index 54c0572d453..7a895bb1ca5 100644 --- a/htdocs/langs/km_KH/other.lang +++ b/htdocs/langs/km_KH/other.lang @@ -5,8 +5,6 @@ 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 -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Right CalculatedWeight=Calculated weight CalculatedVolume=Calculated volume Weight=Weight -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/km_KH/products.lang b/htdocs/langs/km_KH/products.lang index 97db059594f..9ecc11ed93d 100644 --- a/htdocs/langs/km_KH/products.lang +++ b/htdocs/langs/km_KH/products.lang @@ -108,7 +108,8 @@ 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=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +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 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/km_KH/projects.lang b/htdocs/langs/km_KH/projects.lang index baf0ecde17f..05aa1f5a560 100644 --- a/htdocs/langs/km_KH/projects.lang +++ b/htdocs/langs/km_KH/projects.lang @@ -76,15 +76,16 @@ MyActivities=My tasks/activities MyProjects=My projects MyProjectsArea=My projects Area DurationEffective=Effective duration -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Time +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/km_KH/recruitment.lang b/htdocs/langs/km_KH/recruitment.lang index b775e78552e..437445f25dc 100644 --- a/htdocs/langs/km_KH/recruitment.lang +++ b/htdocs/langs/km_KH/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/km_KH/sendings.lang b/htdocs/langs/km_KH/sendings.lang index 5ce3b7f67e9..73bd9aebd42 100644 --- a/htdocs/langs/km_KH/sendings.lang +++ b/htdocs/langs/km_KH/sendings.lang @@ -30,6 +30,7 @@ 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 @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=More complete document model for delivery receipts (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/km_KH/stocks.lang b/htdocs/langs/km_KH/stocks.lang index 660443bcded..a1f55010139 100644 --- a/htdocs/langs/km_KH/stocks.lang +++ b/htdocs/langs/km_KH/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/km_KH/ticket.lang b/htdocs/langs/km_KH/ticket.lang index 59519282c80..982fff90ffa 100644 --- a/htdocs/langs/km_KH/ticket.lang +++ b/htdocs/langs/km_KH/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Other TicketSeverityShortLOW=Low TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=High -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Read Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/km_KH/website.lang b/htdocs/langs/km_KH/website.lang index 03e042e4be6..f17def114b8 100644 --- a/htdocs/langs/km_KH/website.lang +++ b/htdocs/langs/km_KH/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/km_KH/withdrawals.lang b/htdocs/langs/km_KH/withdrawals.lang index 114a8d9dd6c..059b3451c11 100644 --- a/htdocs/langs/km_KH/withdrawals.lang +++ b/htdocs/langs/km_KH/withdrawals.lang @@ -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>. ClassCredited=Classify credited @@ -131,7 +132,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,3 +148,5 @@ 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/km_KH/workflow.lang b/htdocs/langs/km_KH/workflow.lang index 299be277e1d..494a0424a75 100644 --- a/htdocs/langs/km_KH/workflow.lang +++ b/htdocs/langs/km_KH/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 diff --git a/htdocs/langs/kn_IN/accountancy.lang b/htdocs/langs/kn_IN/accountancy.lang index 3211a0b62df..9e084932477 100644 --- a/htdocs/langs/kn_IN/accountancy.lang +++ b/htdocs/langs/kn_IN/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Date Docref=Reference LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/kn_IN/admin.lang b/htdocs/langs/kn_IN/admin.lang index 77951271212..5322b65bb8f 100644 --- a/htdocs/langs/kn_IN/admin.lang +++ b/htdocs/langs/kn_IN/admin.lang @@ -56,6 +56,8 @@ 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. @@ -85,7 +87,6 @@ ShowPreview=Show preview ShowHideDetails=Show-Hide details PreviewNotAvailable=Preview not available ThemeCurrentlyActive=Theme currently active -CurrentTimeZone=TimeZone PHP (server) MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Dates are stored and returned by database server as if they were kept as submitted string. The timezone has effect only when using the UNIX_TIMESTAMP function (that should not be used by Dolibarr, so database TZ should have no effect, even if changed after data was entered). Space=Space @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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. @@ -256,6 +257,7 @@ 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. @@ -375,7 +377,7 @@ 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:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +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 @@ -406,7 +408,7 @@ UrlGenerationParameters=Parameters to secure URLs SecurityTokenIsUnique=Use a unique securekey parameter for each URL EnterRefToBuildUrl=Enter reference for object %s GetSecuredUrl=Get calculated URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +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 @@ -668,7 +670,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 @@ -1306,7 +1308,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,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 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=New menu MenuHandler=Menu handler MenuModule=Source module -HideUnauthorizedMenu= Hide unauthorized menus (gray) +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 @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/kn_IN/banks.lang b/htdocs/langs/kn_IN/banks.lang index b1816234c5a..c3c0461c34d 100644 --- a/htdocs/langs/kn_IN/banks.lang +++ b/htdocs/langs/kn_IN/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/kn_IN/blockedlog.lang b/htdocs/langs/kn_IN/blockedlog.lang index 5afae6e9e53..0bba5605d0f 100644 --- a/htdocs/langs/kn_IN/blockedlog.lang +++ b/htdocs/langs/kn_IN/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/kn_IN/boxes.lang b/htdocs/langs/kn_IN/boxes.lang index d6fd298a3a7..9a751483fb1 100644 --- a/htdocs/langs/kn_IN/boxes.lang +++ b/htdocs/langs/kn_IN/boxes.lang @@ -46,9 +46,12 @@ 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. @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Accountancy +ValidatedProjects=Validated projects diff --git a/htdocs/langs/kn_IN/cashdesk.lang b/htdocs/langs/kn_IN/cashdesk.lang index caa77612db5..a70407c989f 100644 --- a/htdocs/langs/kn_IN/cashdesk.lang +++ b/htdocs/langs/kn_IN/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +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 @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/kn_IN/categories.lang b/htdocs/langs/kn_IN/categories.lang index ba37a43b4ec..4ddf0d6093f 100644 --- a/htdocs/langs/kn_IN/categories.lang +++ b/htdocs/langs/kn_IN/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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 diff --git a/htdocs/langs/kn_IN/companies.lang b/htdocs/langs/kn_IN/companies.lang index 5a13d292ec1..63f3c11bf02 100644 --- a/htdocs/langs/kn_IN/companies.lang +++ b/htdocs/langs/kn_IN/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi 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=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=ಸಂಭವನೀಯ diff --git a/htdocs/langs/kn_IN/compta.lang b/htdocs/langs/kn_IN/compta.lang index 8f4f058bb87..1afeb6e3727 100644 --- a/htdocs/langs/kn_IN/compta.lang +++ b/htdocs/langs/kn_IN/compta.lang @@ -111,7 +111,7 @@ 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 ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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 diff --git a/htdocs/langs/kn_IN/cron.lang b/htdocs/langs/kn_IN/cron.lang index b05c7782037..4b73818c3aa 100644 --- a/htdocs/langs/kn_IN/cron.lang +++ b/htdocs/langs/kn_IN/cron.lang @@ -6,14 +6,15 @@ 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 -OrToLaunchASpecificJob=Or to check and launch a specific job +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 environement you can use Scheduled task tools 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 @@ -42,10 +43,11 @@ CronModule=Module CronNoJobs=No jobs registered CronPriority=Priority CronLabel=Label -CronNbRun=Nb. launch -CronMaxRun=Max number launch +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 @@ -56,16 +58,16 @@ CronNote=Comment CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Enable +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 exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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 @@ -76,8 +78,14 @@ 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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +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' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/kn_IN/errors.lang b/htdocs/langs/kn_IN/errors.lang index 893f4a35b65..5b26be724d9 100644 --- a/htdocs/langs/kn_IN/errors.lang +++ b/htdocs/langs/kn_IN/errors.lang @@ -5,8 +5,10 @@ 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. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ 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=Ref used for creation already exists. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/kn_IN/exports.lang b/htdocs/langs/kn_IN/exports.lang index 2dcf4317e00..a0eb7161ef2 100644 --- a/htdocs/langs/kn_IN/exports.lang +++ b/htdocs/langs/kn_IN/exports.lang @@ -26,6 +26,8 @@ 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. @@ -131,3 +133,4 @@ 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/kn_IN/mails.lang b/htdocs/langs/kn_IN/mails.lang index 1235eef3b27..2d02c5ddcf9 100644 --- a/htdocs/langs/kn_IN/mails.lang +++ b/htdocs/langs/kn_IN/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Notifications -NoNotificationsWillBeSent=No email notifications are planned for this event and company -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent +NotificationsAuto=Notifications Auto. +NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company +ANotificationsWillBeSent=1 automatic notification will be sent by email +SomeNotificationsWillBeSent=%s automatic notifications will be sent by email +AddNewNotification=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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +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/kn_IN/main.lang b/htdocs/langs/kn_IN/main.lang index 9635417e322..28a3acd9245 100644 --- a/htdocs/langs/kn_IN/main.lang +++ b/htdocs/langs/kn_IN/main.lang @@ -28,7 +28,9 @@ 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 @@ -85,6 +87,8 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C 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 @@ -220,6 +224,7 @@ Value=Value PersonalValue=Personal value NewObject=New %s NewValue=New value +OldValue=Old value %s CurrentValue=Current value Code=Code Type=Type @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Option +Filters=Filters List=List FullList=Full list FullConversation=Full conversation @@ -650,6 +656,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 @@ -671,7 +678,7 @@ SendMail=Send email Email=Email NoEMail=No email AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=No mobile phone Owner=Owner FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/kn_IN/modulebuilder.lang b/htdocs/langs/kn_IN/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/kn_IN/modulebuilder.lang +++ b/htdocs/langs/kn_IN/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/kn_IN/mrp.lang b/htdocs/langs/kn_IN/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/kn_IN/mrp.lang +++ b/htdocs/langs/kn_IN/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/kn_IN/other.lang b/htdocs/langs/kn_IN/other.lang index 66bda179f9b..4ba716c6a71 100644 --- a/htdocs/langs/kn_IN/other.lang +++ b/htdocs/langs/kn_IN/other.lang @@ -5,8 +5,6 @@ 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 -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Right CalculatedWeight=Calculated weight CalculatedVolume=Calculated volume Weight=Weight -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/kn_IN/products.lang b/htdocs/langs/kn_IN/products.lang index a4e8e169446..b4ed2eaee15 100644 --- a/htdocs/langs/kn_IN/products.lang +++ b/htdocs/langs/kn_IN/products.lang @@ -108,7 +108,8 @@ 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=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +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 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/kn_IN/projects.lang b/htdocs/langs/kn_IN/projects.lang index baf0ecde17f..05aa1f5a560 100644 --- a/htdocs/langs/kn_IN/projects.lang +++ b/htdocs/langs/kn_IN/projects.lang @@ -76,15 +76,16 @@ MyActivities=My tasks/activities MyProjects=My projects MyProjectsArea=My projects Area DurationEffective=Effective duration -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Time +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/kn_IN/recruitment.lang b/htdocs/langs/kn_IN/recruitment.lang index b775e78552e..437445f25dc 100644 --- a/htdocs/langs/kn_IN/recruitment.lang +++ b/htdocs/langs/kn_IN/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/kn_IN/sendings.lang b/htdocs/langs/kn_IN/sendings.lang index 5ce3b7f67e9..73bd9aebd42 100644 --- a/htdocs/langs/kn_IN/sendings.lang +++ b/htdocs/langs/kn_IN/sendings.lang @@ -30,6 +30,7 @@ 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 @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=More complete document model for delivery receipts (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/kn_IN/stocks.lang b/htdocs/langs/kn_IN/stocks.lang index 660443bcded..a1f55010139 100644 --- a/htdocs/langs/kn_IN/stocks.lang +++ b/htdocs/langs/kn_IN/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/kn_IN/ticket.lang b/htdocs/langs/kn_IN/ticket.lang index 1608bcb38d7..70bcd0c2f87 100644 --- a/htdocs/langs/kn_IN/ticket.lang +++ b/htdocs/langs/kn_IN/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=ಇತರ TicketSeverityShortLOW=ಕಡಿಮೆ TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=ಹೆಚ್ಚು -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Read Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/kn_IN/website.lang b/htdocs/langs/kn_IN/website.lang index 03e042e4be6..f17def114b8 100644 --- a/htdocs/langs/kn_IN/website.lang +++ b/htdocs/langs/kn_IN/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/kn_IN/withdrawals.lang b/htdocs/langs/kn_IN/withdrawals.lang index 114a8d9dd6c..059b3451c11 100644 --- a/htdocs/langs/kn_IN/withdrawals.lang +++ b/htdocs/langs/kn_IN/withdrawals.lang @@ -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>. ClassCredited=Classify credited @@ -131,7 +132,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,3 +148,5 @@ 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/kn_IN/workflow.lang b/htdocs/langs/kn_IN/workflow.lang index 299be277e1d..494a0424a75 100644 --- a/htdocs/langs/kn_IN/workflow.lang +++ b/htdocs/langs/kn_IN/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 diff --git a/htdocs/langs/ko_KR/accountancy.lang b/htdocs/langs/ko_KR/accountancy.lang index 2202ceafd92..b0285ae6cf3 100644 --- a/htdocs/langs/ko_KR/accountancy.lang +++ b/htdocs/langs/ko_KR/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=날짜 Docref=Reference LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/ko_KR/admin.lang b/htdocs/langs/ko_KR/admin.lang index 41c75987caf..6962ec7c3b3 100644 --- a/htdocs/langs/ko_KR/admin.lang +++ b/htdocs/langs/ko_KR/admin.lang @@ -56,6 +56,8 @@ GUISetup=화면 SetupArea=설정 UploadNewTemplate=Upload new template(s) FormToTestFileUploadForm=파일업로드테스트용 양식 +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. @@ -85,7 +87,6 @@ ShowPreview=Show preview ShowHideDetails=Show-Hide details PreviewNotAvailable=Preview not available ThemeCurrentlyActive=Theme currently active -CurrentTimeZone=TimeZone PHP (server) MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Dates are stored and returned by database server as if they were kept as submitted string. The timezone has effect only when using the UNIX_TIMESTAMP function (that should not be used by Dolibarr, so database TZ should have no effect, even if changed after data was entered). Space=공간 @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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=삭제할 디렉토리나 파일이 없음 @@ -256,6 +257,7 @@ 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. @@ -375,7 +377,7 @@ 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:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +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 @@ -406,7 +408,7 @@ UrlGenerationParameters=Parameters to secure URLs SecurityTokenIsUnique=Use a unique securekey parameter for each URL EnterRefToBuildUrl=Enter reference for object %s GetSecuredUrl=Get calculated URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +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 @@ -668,7 +670,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 @@ -1306,7 +1308,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,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 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=New menu MenuHandler=Menu handler MenuModule=Source module -HideUnauthorizedMenu= Hide unauthorized menus (gray) +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 @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/ko_KR/banks.lang b/htdocs/langs/ko_KR/banks.lang index cbe0734591b..b62d0312322 100644 --- a/htdocs/langs/ko_KR/banks.lang +++ b/htdocs/langs/ko_KR/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/ko_KR/blockedlog.lang b/htdocs/langs/ko_KR/blockedlog.lang index 5afae6e9e53..0bba5605d0f 100644 --- a/htdocs/langs/ko_KR/blockedlog.lang +++ b/htdocs/langs/ko_KR/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/ko_KR/boxes.lang b/htdocs/langs/ko_KR/boxes.lang index f070f401eb4..9c95a128986 100644 --- a/htdocs/langs/ko_KR/boxes.lang +++ b/htdocs/langs/ko_KR/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=최근 %s 수정 된 기부 BoxTitleLastModifiedExpenses=최근 %s 수정 된 비용 보고서 BoxTitleLatestModifiedBoms=Latest %s modified BOMs BoxTitleLatestModifiedMos=Latest %s modified Manufacturing Orders +BoxTitleLastOutstandingBillReached=Customers with maximum outstanding exceeded BoxGlobalActivity=글로벌 활동 (송장, 제안서, 주문) BoxGoodCustomers=좋은 고객 BoxTitleGoodCustomers=%s 좋은 고객 +BoxScheduledJobs=Scheduled jobs +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Failed to refresh RSS flux. Latest successful refresh date: %s LastRefreshDate=최근 새로 고침 날짜 NoRecordedBookmarks=북마크가 정의되지 않았습니다. @@ -92,8 +95,8 @@ LastXMonthRolling=최근 %s 월 롤링 ChooseBoxToAdd=대시 보드에 위젯 추가 BoxAdded=위젯이 대시 보드에 추가되었습니다. BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users) -BoxLastManualEntries=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Accountancy +ValidatedProjects=Validated projects diff --git a/htdocs/langs/ko_KR/cashdesk.lang b/htdocs/langs/ko_KR/cashdesk.lang index 266158be744..16169671a2d 100644 --- a/htdocs/langs/ko_KR/cashdesk.lang +++ b/htdocs/langs/ko_KR/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +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 @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/ko_KR/categories.lang b/htdocs/langs/ko_KR/categories.lang index 79bfe18f625..e10c2c97c83 100644 --- a/htdocs/langs/ko_KR/categories.lang +++ b/htdocs/langs/ko_KR/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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 diff --git a/htdocs/langs/ko_KR/companies.lang b/htdocs/langs/ko_KR/companies.lang index 4e623422f6e..ae5af71d69f 100644 --- a/htdocs/langs/ko_KR/companies.lang +++ b/htdocs/langs/ko_KR/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi VATIntraManualCheck=You can also check manually on the European Commission website <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=확인할 수 없습니다. 수표 서비스는 회원 국가에서 제공하지 않습니다 (%s). NorProspectNorCustomer=Not prospect, nor customer -JuridicalStatus=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=가능성 diff --git a/htdocs/langs/ko_KR/compta.lang b/htdocs/langs/ko_KR/compta.lang index 0761985d4aa..199ba3514ef 100644 --- a/htdocs/langs/ko_KR/compta.lang +++ b/htdocs/langs/ko_KR/compta.lang @@ -111,7 +111,7 @@ 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 ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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 diff --git a/htdocs/langs/ko_KR/cron.lang b/htdocs/langs/ko_KR/cron.lang index 8180e289d27..bbf04428a8c 100644 --- a/htdocs/langs/ko_KR/cron.lang +++ b/htdocs/langs/ko_KR/cron.lang @@ -6,14 +6,15 @@ 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 -OrToLaunchASpecificJob=Or to check and launch a specific job +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 environement you can use Scheduled task tools 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 @@ -42,10 +43,11 @@ CronModule=Module CronNoJobs=No jobs registered CronPriority=우선 순위 CronLabel=라벨 -CronNbRun=Nb. launch -CronMaxRun=Max number launch +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 @@ -56,16 +58,16 @@ CronNote=적요 CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Enable +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=사용 안함 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 exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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=부터 @@ -76,8 +78,14 @@ 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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +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' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/ko_KR/errors.lang b/htdocs/langs/ko_KR/errors.lang index 893f4a35b65..5b26be724d9 100644 --- a/htdocs/langs/ko_KR/errors.lang +++ b/htdocs/langs/ko_KR/errors.lang @@ -5,8 +5,10 @@ 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. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ 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=Ref used for creation already exists. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/ko_KR/exports.lang b/htdocs/langs/ko_KR/exports.lang index 203054138bd..fda64411c9f 100644 --- a/htdocs/langs/ko_KR/exports.lang +++ b/htdocs/langs/ko_KR/exports.lang @@ -26,6 +26,8 @@ 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. @@ -131,3 +133,4 @@ 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/ko_KR/mails.lang b/htdocs/langs/ko_KR/mails.lang index 14c7f27948a..2d8bd79cbf8 100644 --- a/htdocs/langs/ko_KR/mails.lang +++ b/htdocs/langs/ko_KR/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Notifications -NoNotificationsWillBeSent=No email notifications are planned for this event and company -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent +NotificationsAuto=Notifications Auto. +NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company +ANotificationsWillBeSent=1 automatic notification will be sent by email +SomeNotificationsWillBeSent=%s automatic notifications will be sent by email +AddNewNotification=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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +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/ko_KR/main.lang b/htdocs/langs/ko_KR/main.lang index cd328ee454a..82a305bbc21 100644 --- a/htdocs/langs/ko_KR/main.lang +++ b/htdocs/langs/ko_KR/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=No template available for this email type AvailableVariables=사용 가능한 대체 변수 NoTranslation=번역 없음 Translation=Translation +CurrentTimeZone=TimeZone PHP (server) EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria NoRecordFound=레코드를 찾을 수 없습니다 NoRecordDeleted=레코드가 삭제되지 않았습니다. NotEnoughDataYet=데이터가 충분하지 않습니다. @@ -85,6 +87,8 @@ FileWasNotUploaded=첨부할 파일을 선택했지만 바로 업로드할 수 NbOfEntries=No. of entries GoToWikiHelpPage=온라인 도움말 읽기 (인터넷 액세스 필요) GoToHelpPage=도움말 읽기 +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Home Page RecordSaved=저장 레코드 RecordDeleted=삭제 레코드 RecordGenerated=Record generated @@ -220,6 +224,7 @@ Value=값 PersonalValue=개인 값 NewObject=신규 %s NewValue=새 값 +OldValue=Old value %s CurrentValue=현재 값 Code=코드 Type=유형 @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=모듈 / 응용 프로그램 Modules=모듈 / 응용 프로그램 Option=옵션 +Filters=Filters List=목록 FullList=전체 목록 FullConversation=Full conversation @@ -650,6 +656,7 @@ SupplierPreview=Vendor preview ShowCustomerPreview=고객 미리보기 표시 ShowSupplierPreview=Show vendor preview RefCustomer=참조고객 +InternalRef=Internal ref. Currency=통화 InfoAdmin=관리자를위한 정보 Undo=원래대로 @@ -671,7 +678,7 @@ SendMail=Send email Email=이메일 NoEMail=이메일 없음 AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=휴대 전화 없음 Owner=소유자 FollowingConstantsWillBeSubstituted=다음 상수는 해당 값으로 바뀝니다. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/ko_KR/modulebuilder.lang b/htdocs/langs/ko_KR/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/ko_KR/modulebuilder.lang +++ b/htdocs/langs/ko_KR/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/ko_KR/mrp.lang b/htdocs/langs/ko_KR/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/ko_KR/mrp.lang +++ b/htdocs/langs/ko_KR/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/ko_KR/other.lang b/htdocs/langs/ko_KR/other.lang index a39cc328af3..0b663c08491 100644 --- a/htdocs/langs/ko_KR/other.lang +++ b/htdocs/langs/ko_KR/other.lang @@ -5,8 +5,6 @@ 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 -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Right CalculatedWeight=Calculated weight CalculatedVolume=Calculated volume Weight=Weight -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/ko_KR/products.lang b/htdocs/langs/ko_KR/products.lang index 09ec43625fa..390f2b13e95 100644 --- a/htdocs/langs/ko_KR/products.lang +++ b/htdocs/langs/ko_KR/products.lang @@ -108,7 +108,8 @@ 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=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +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 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/ko_KR/projects.lang b/htdocs/langs/ko_KR/projects.lang index f9e32599c26..d4b5dc5134b 100644 --- a/htdocs/langs/ko_KR/projects.lang +++ b/htdocs/langs/ko_KR/projects.lang @@ -76,15 +76,16 @@ MyActivities=My tasks/activities MyProjects=My projects MyProjectsArea=My projects Area DurationEffective=Effective duration -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Time +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/ko_KR/recruitment.lang b/htdocs/langs/ko_KR/recruitment.lang index 8fa737f47ff..7514f8319ca 100644 --- a/htdocs/langs/ko_KR/recruitment.lang +++ b/htdocs/langs/ko_KR/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/ko_KR/sendings.lang b/htdocs/langs/ko_KR/sendings.lang index b6045614152..50cc2143119 100644 --- a/htdocs/langs/ko_KR/sendings.lang +++ b/htdocs/langs/ko_KR/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Other shipments for this order SendingsAndReceivingForSameOrder=Shipments and receipts for this order SendingsToValidate=Shipments to validate StatusSendingCanceled=취소 된 +StatusSendingCanceledShort=취소 됨 StatusSendingDraft=초안 StatusSendingValidated=Validated (products to ship or already shipped) StatusSendingProcessed=Processed @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=More complete document model for delivery receipts (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/ko_KR/stocks.lang b/htdocs/langs/ko_KR/stocks.lang index 7fbad957f4d..3e6cd88b1b2 100644 --- a/htdocs/langs/ko_KR/stocks.lang +++ b/htdocs/langs/ko_KR/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/ko_KR/ticket.lang b/htdocs/langs/ko_KR/ticket.lang index 39194e55eea..dbcd6edb987 100644 --- a/htdocs/langs/ko_KR/ticket.lang +++ b/htdocs/langs/ko_KR/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=기타 TicketSeverityShortLOW=낮음 TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=높음 -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Read Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/ko_KR/website.lang b/htdocs/langs/ko_KR/website.lang index a3167ada553..1136b43873a 100644 --- a/htdocs/langs/ko_KR/website.lang +++ b/htdocs/langs/ko_KR/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/ko_KR/withdrawals.lang b/htdocs/langs/ko_KR/withdrawals.lang index a5301dbdf26..eef5a3b1a94 100644 --- a/htdocs/langs/ko_KR/withdrawals.lang +++ b/htdocs/langs/ko_KR/withdrawals.lang @@ -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>. ClassCredited=Classify credited @@ -131,7 +132,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,3 +148,5 @@ 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/ko_KR/workflow.lang b/htdocs/langs/ko_KR/workflow.lang index 299be277e1d..494a0424a75 100644 --- a/htdocs/langs/ko_KR/workflow.lang +++ b/htdocs/langs/ko_KR/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 diff --git a/htdocs/langs/lo_LA/accountancy.lang b/htdocs/langs/lo_LA/accountancy.lang index a0451ff066b..cfd6f41fbc9 100644 --- a/htdocs/langs/lo_LA/accountancy.lang +++ b/htdocs/langs/lo_LA/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=ວັນທີ Docref=Reference LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/lo_LA/admin.lang b/htdocs/langs/lo_LA/admin.lang index a651fd86d34..fe18cd7ac67 100644 --- a/htdocs/langs/lo_LA/admin.lang +++ b/htdocs/langs/lo_LA/admin.lang @@ -56,6 +56,8 @@ 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. @@ -85,7 +87,6 @@ ShowPreview=Show preview ShowHideDetails=Show-Hide details PreviewNotAvailable=Preview not available ThemeCurrentlyActive=Theme currently active -CurrentTimeZone=TimeZone PHP (server) MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Dates are stored and returned by database server as if they were kept as submitted string. The timezone has effect only when using the UNIX_TIMESTAMP function (that should not be used by Dolibarr, so database TZ should have no effect, even if changed after data was entered). Space=Space @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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. @@ -256,6 +257,7 @@ 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. @@ -375,7 +377,7 @@ 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:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +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 @@ -406,7 +408,7 @@ UrlGenerationParameters=Parameters to secure URLs SecurityTokenIsUnique=Use a unique securekey parameter for each URL EnterRefToBuildUrl=Enter reference for object %s GetSecuredUrl=Get calculated URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +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 @@ -668,7 +670,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 @@ -1306,7 +1308,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,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 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=New menu MenuHandler=Menu handler MenuModule=Source module -HideUnauthorizedMenu= Hide unauthorized menus (gray) +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 @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/lo_LA/banks.lang b/htdocs/langs/lo_LA/banks.lang index 116b97d3f81..4259ed5cc2d 100644 --- a/htdocs/langs/lo_LA/banks.lang +++ b/htdocs/langs/lo_LA/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/lo_LA/blockedlog.lang b/htdocs/langs/lo_LA/blockedlog.lang index 5afae6e9e53..0bba5605d0f 100644 --- a/htdocs/langs/lo_LA/blockedlog.lang +++ b/htdocs/langs/lo_LA/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/lo_LA/boxes.lang b/htdocs/langs/lo_LA/boxes.lang index d6fd298a3a7..9a751483fb1 100644 --- a/htdocs/langs/lo_LA/boxes.lang +++ b/htdocs/langs/lo_LA/boxes.lang @@ -46,9 +46,12 @@ 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. @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Accountancy +ValidatedProjects=Validated projects diff --git a/htdocs/langs/lo_LA/cashdesk.lang b/htdocs/langs/lo_LA/cashdesk.lang index 498baa82200..3fef645d99d 100644 --- a/htdocs/langs/lo_LA/cashdesk.lang +++ b/htdocs/langs/lo_LA/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +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 @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/lo_LA/categories.lang b/htdocs/langs/lo_LA/categories.lang index ba37a43b4ec..4ddf0d6093f 100644 --- a/htdocs/langs/lo_LA/categories.lang +++ b/htdocs/langs/lo_LA/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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 diff --git a/htdocs/langs/lo_LA/companies.lang b/htdocs/langs/lo_LA/companies.lang index 4e8b86a7c57..a4225bc1cfb 100644 --- a/htdocs/langs/lo_LA/companies.lang +++ b/htdocs/langs/lo_LA/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi 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=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=Potential diff --git a/htdocs/langs/lo_LA/compta.lang b/htdocs/langs/lo_LA/compta.lang index 29c2f72f5bf..a84839cd09a 100644 --- a/htdocs/langs/lo_LA/compta.lang +++ b/htdocs/langs/lo_LA/compta.lang @@ -111,7 +111,7 @@ 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 ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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 diff --git a/htdocs/langs/lo_LA/cron.lang b/htdocs/langs/lo_LA/cron.lang index c4d35d1595a..86ecd876e5a 100644 --- a/htdocs/langs/lo_LA/cron.lang +++ b/htdocs/langs/lo_LA/cron.lang @@ -6,14 +6,15 @@ 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 -OrToLaunchASpecificJob=Or to check and launch a specific job +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 environement you can use Scheduled task tools 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 @@ -42,10 +43,11 @@ CronModule=Module CronNoJobs=No jobs registered CronPriority=Priority CronLabel=Label -CronNbRun=Nb. launch -CronMaxRun=Max number launch +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 @@ -56,16 +58,16 @@ CronNote=Comment CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Enable +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=ປິດການນຳໃຊ້ 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 exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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 @@ -76,8 +78,14 @@ 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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +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' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/lo_LA/errors.lang b/htdocs/langs/lo_LA/errors.lang index 893f4a35b65..5b26be724d9 100644 --- a/htdocs/langs/lo_LA/errors.lang +++ b/htdocs/langs/lo_LA/errors.lang @@ -5,8 +5,10 @@ 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. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ 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=Ref used for creation already exists. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/lo_LA/exports.lang b/htdocs/langs/lo_LA/exports.lang index 2dcf4317e00..a0eb7161ef2 100644 --- a/htdocs/langs/lo_LA/exports.lang +++ b/htdocs/langs/lo_LA/exports.lang @@ -26,6 +26,8 @@ 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. @@ -131,3 +133,4 @@ 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/lo_LA/mails.lang b/htdocs/langs/lo_LA/mails.lang index 1235eef3b27..2d02c5ddcf9 100644 --- a/htdocs/langs/lo_LA/mails.lang +++ b/htdocs/langs/lo_LA/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Notifications -NoNotificationsWillBeSent=No email notifications are planned for this event and company -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent +NotificationsAuto=Notifications Auto. +NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company +ANotificationsWillBeSent=1 automatic notification will be sent by email +SomeNotificationsWillBeSent=%s automatic notifications will be sent by email +AddNewNotification=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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +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/lo_LA/main.lang b/htdocs/langs/lo_LA/main.lang index 026cbbb5ad7..de3709bef9f 100644 --- a/htdocs/langs/lo_LA/main.lang +++ b/htdocs/langs/lo_LA/main.lang @@ -28,7 +28,9 @@ 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 @@ -85,6 +87,8 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C 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 @@ -220,6 +224,7 @@ Value=Value PersonalValue=Personal value NewObject=New %s NewValue=New value +OldValue=Old value %s CurrentValue=Current value Code=Code Type=Type @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Option +Filters=Filters List=ລາຍການ FullList=Full list FullConversation=Full conversation @@ -650,6 +656,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 @@ -671,7 +678,7 @@ SendMail=Send email Email=Email NoEMail=No email AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=No mobile phone Owner=Owner FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/lo_LA/modulebuilder.lang b/htdocs/langs/lo_LA/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/lo_LA/modulebuilder.lang +++ b/htdocs/langs/lo_LA/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/lo_LA/mrp.lang b/htdocs/langs/lo_LA/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/lo_LA/mrp.lang +++ b/htdocs/langs/lo_LA/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/lo_LA/other.lang b/htdocs/langs/lo_LA/other.lang index 30dcda87f53..9bc54506b86 100644 --- a/htdocs/langs/lo_LA/other.lang +++ b/htdocs/langs/lo_LA/other.lang @@ -5,8 +5,6 @@ Tools=ເຄື່ອງມື TMenuTools=ເຄື່ອງມື 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 -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Right CalculatedWeight=Calculated weight CalculatedVolume=Calculated volume Weight=Weight -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/lo_LA/products.lang b/htdocs/langs/lo_LA/products.lang index fb58c2e259c..0398a6604ac 100644 --- a/htdocs/langs/lo_LA/products.lang +++ b/htdocs/langs/lo_LA/products.lang @@ -108,7 +108,8 @@ 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=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +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 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/lo_LA/projects.lang b/htdocs/langs/lo_LA/projects.lang index bfe42b3a2d0..3dfd70c6444 100644 --- a/htdocs/langs/lo_LA/projects.lang +++ b/htdocs/langs/lo_LA/projects.lang @@ -76,15 +76,16 @@ MyActivities=My tasks/activities MyProjects=My projects MyProjectsArea=My projects Area DurationEffective=Effective duration -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Time +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/lo_LA/recruitment.lang b/htdocs/langs/lo_LA/recruitment.lang index b775e78552e..437445f25dc 100644 --- a/htdocs/langs/lo_LA/recruitment.lang +++ b/htdocs/langs/lo_LA/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/lo_LA/sendings.lang b/htdocs/langs/lo_LA/sendings.lang index 5ce3b7f67e9..73bd9aebd42 100644 --- a/htdocs/langs/lo_LA/sendings.lang +++ b/htdocs/langs/lo_LA/sendings.lang @@ -30,6 +30,7 @@ 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 @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=More complete document model for delivery receipts (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/lo_LA/stocks.lang b/htdocs/langs/lo_LA/stocks.lang index 74d3d0a7efe..6397b23e96b 100644 --- a/htdocs/langs/lo_LA/stocks.lang +++ b/htdocs/langs/lo_LA/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/lo_LA/ticket.lang b/htdocs/langs/lo_LA/ticket.lang index 6c1dc94704a..b2bea2dcbcd 100644 --- a/htdocs/langs/lo_LA/ticket.lang +++ b/htdocs/langs/lo_LA/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Other TicketSeverityShortLOW=Low TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=High -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Read Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/lo_LA/website.lang b/htdocs/langs/lo_LA/website.lang index 03e042e4be6..f17def114b8 100644 --- a/htdocs/langs/lo_LA/website.lang +++ b/htdocs/langs/lo_LA/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/lo_LA/withdrawals.lang b/htdocs/langs/lo_LA/withdrawals.lang index 114a8d9dd6c..059b3451c11 100644 --- a/htdocs/langs/lo_LA/withdrawals.lang +++ b/htdocs/langs/lo_LA/withdrawals.lang @@ -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>. ClassCredited=Classify credited @@ -131,7 +132,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,3 +148,5 @@ 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/lo_LA/workflow.lang b/htdocs/langs/lo_LA/workflow.lang index 299be277e1d..494a0424a75 100644 --- a/htdocs/langs/lo_LA/workflow.lang +++ b/htdocs/langs/lo_LA/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 diff --git a/htdocs/langs/lt_LT/accountancy.lang b/htdocs/langs/lt_LT/accountancy.lang index 006e60db613..30578cf5a3c 100644 --- a/htdocs/langs/lt_LT/accountancy.lang +++ b/htdocs/langs/lt_LT/accountancy.lang @@ -16,6 +16,8 @@ ThisService=Ši paslauga ThisProduct=Ši prekė DefaultForService=Numatyta paslauga DefaultForProduct=Numatyta prekė +ProductForThisThirdparty=Product for this thirdparty +ServiceForThisThirdparty=Service for this thirdparty CantSuggest=Pasiūlyti negalima AccountancySetupDoneFromAccountancyMenu=Dauguma apskaitos nustatymo atliekama iš meniu %s ConfigAccountingExpert=Configuration of the module accounting (double entry) @@ -48,6 +50,7 @@ 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=Pagrindinė apskaitos sąskaita klientams, kurie nenustatyti sąrankos metu MainAccountForSuppliersNotDefined=Pagrindinė apskaitos sąskaita tiekėjams, kurie nenustatyti sąrankos metu @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Data Docref=Nuoroda LabelAccount=Sąskaitos etiketė LabelOperation=Label operation -Sens=Sens +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=Žurnalas @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/lt_LT/admin.lang b/htdocs/langs/lt_LT/admin.lang index ea55fbcdc54..72b82a109b5 100644 --- a/htdocs/langs/lt_LT/admin.lang +++ b/htdocs/langs/lt_LT/admin.lang @@ -56,6 +56,8 @@ GUISetup=Atvaizdavimas SetupArea=Nustatymai UploadNewTemplate=Upload new template(s) FormToTestFileUploadForm=Failo-testo įkėlimo forma (pagal nustatymus) +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled IfModuleEnabled=Pastaba: Patvirtinimas yra efektyvus tik, kai modulis <b>%s</b> yra aktyvus 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. @@ -85,7 +87,6 @@ ShowPreview=Rodyti apžiūrą ShowHideDetails=Show-Hide details PreviewNotAvailable=Apžiūra negalima ThemeCurrentlyActive=Tema yra veikli -CurrentTimeZone=Laiko juostos PHP (serveris) MySQLTimeZone=TimeZone MySQL (duomenų bazės) 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=Erdvė @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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 PurgeNothingToDelete=No directory or files to delete. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Privilegijuoti partneriai OtherResources=Other resources ExternalResources=External Resources SocialNetworks=Social Networks +SocialNetworkId=Social Network ID ForDocumentationSeeWiki=Vartotojo arba kūrėjo dokumentacijos (doc, DUK ...) <br> ieškoti Dolibarr Wiki: <br><b><a href="%s" target="_blank">%s</a></b> ForAnswersSeeForum=Dėl kitų klausimų/pagalbos galite kreiptis į Dolibarr forumą: <br><b><a href="%s" target="_blank">%s</a></b> HelpCenterDesc1=Here are some resources for getting help and support with Dolibarr. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Examples with current configuration ListOfDirectories=OpenDocument šablonų katalogų sąrašas 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=Pavyzdys: <br>c:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br>Norėdami sužinoti, kaip sukurti savo odt dokumentų šablonus, prieš išsaugant juos šiuose kataloguose, paskaityti Wiki dokumentus: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Vardo/Pavardės pozicija @@ -406,7 +408,7 @@ UrlGenerationParameters=URL apsaugos parametrai SecurityTokenIsUnique=Kiekvienam URL naudokite unikalų apsaugos rakto parametrą EnterRefToBuildUrl=Įveskite nuorodą objektui %s GetSecuredUrl=Gauti apskaičiuotą URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) OldVATRates=Senas PVM tarifas NewVATRates=Naujas PVM tarifas PriceBaseTypeToChange=Modifikuoti kainas su apibrėžta bazinės vertės nuoroda @@ -668,7 +670,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=Paraštės -Module59000Desc=Paraščių valdymo modulis +Module59000Desc=Module to follow margins Module60000Name=Komisiniai Module60000Desc=Komisinių valdymo modulis Module62000Name=Incoterms @@ -1306,7 +1308,7 @@ 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=Paieškos optimizavimas -YouHaveXObjectUseSearchOptim=You have %s %s in the database. You should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,13 @@ ServiceSetup=Paslaugų modulio nuostatos ProductServiceSetup=Produktų ir paslaugų modulių nuostatos 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=Brūkšninio kodo tipas produktams pagal nutylėjimą @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=Naujas meniu MenuHandler=Meniu prižiūrėtojas MenuModule=Pirminis modulis -HideUnauthorizedMenu= Paslėpti neleidžiamus meniu (pilki) +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=ID meniu DetailMenuHandler=Meniu prižiūrėtojas gali rodyti naują meniu DetailMenuModule=Modulio pavadinimas, jei meniu įrašas gaunamas iš modulio @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Pašto kodas MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/lt_LT/banks.lang b/htdocs/langs/lt_LT/banks.lang index 48e08a11c34..2b529a086e7 100644 --- a/htdocs/langs/lt_LT/banks.lang +++ b/htdocs/langs/lt_LT/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/lt_LT/blockedlog.lang b/htdocs/langs/lt_LT/blockedlog.lang index 0bb5b261bc1..f86bbba591f 100644 --- a/htdocs/langs/lt_LT/blockedlog.lang +++ b/htdocs/langs/lt_LT/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/lt_LT/boxes.lang b/htdocs/langs/lt_LT/boxes.lang index bed53614fc0..897ee6b984c 100644 --- a/htdocs/langs/lt_LT/boxes.lang +++ b/htdocs/langs/lt_LT/boxes.lang @@ -46,9 +46,12 @@ 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=Visuminė veikla (sąskaitos-faktūros, pasiūlymai, užsakymai) BoxGoodCustomers=Geri klientai BoxTitleGoodCustomers=%s geri klientai +BoxScheduledJobs=Suplanuoti darbai +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Failed to refresh RSS flux. Latest successful refresh date: %s LastRefreshDate=Latest refresh date NoRecordedBookmarks=Nėra apibrėžtų žymeklių @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Apskaita +ValidatedProjects=Validated projects diff --git a/htdocs/langs/lt_LT/cashdesk.lang b/htdocs/langs/lt_LT/cashdesk.lang index 00c067dd151..d9b9c68951e 100644 --- a/htdocs/langs/lt_LT/cashdesk.lang +++ b/htdocs/langs/lt_LT/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=Sąskaitų-faktūrų skaičius Paymentnumpad=Type of Pad to enter payment Numberspad=Numbers Pad @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/lt_LT/categories.lang b/htdocs/langs/lt_LT/categories.lang index eab51c93f5a..345dd6c3781 100644 --- a/htdocs/langs/lt_LT/categories.lang +++ b/htdocs/langs/lt_LT/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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=Papildomi atributai CategoriesSetup=Tags/categories setup diff --git a/htdocs/langs/lt_LT/companies.lang b/htdocs/langs/lt_LT/companies.lang index e121fe74fd6..5094a5a14dc 100644 --- a/htdocs/langs/lt_LT/companies.lang +++ b/htdocs/langs/lt_LT/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi VATIntraManualCheck=You can also check manually on the European Commission website <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=Tikrinimas negalimas. Tikrinimo paslauga nėra teikiama valstybės narės (%s). NorProspectNorCustomer=Not prospect, nor customer -JuridicalStatus=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=Potencialas diff --git a/htdocs/langs/lt_LT/compta.lang b/htdocs/langs/lt_LT/compta.lang index ba0519c1662..a0c6fe59908 100644 --- a/htdocs/langs/lt_LT/compta.lang +++ b/htdocs/langs/lt_LT/compta.lang @@ -111,7 +111,7 @@ Refund=Refund SocialContributionsPayments=Social/fiscal taxes payments ShowVatPayment=Rodyti PVM mokėjimą TotalToPay=Iš viso mokėti -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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>. -CalcModeDebt=Analysis of known recorded invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Pajamų ir išlaidų balansas, metinė suvestinė 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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=- Sumos rodomos su įtrauktais mokesčiais 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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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=Ataskaita pagal trečiosios šalies IRPF VATReport=Sale tax report VATReportByPeriods=Sale tax report by period +VATReportByMonth=Sale tax report by month VATReportByRates=Sale tax report by rates VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer diff --git a/htdocs/langs/lt_LT/cron.lang b/htdocs/langs/lt_LT/cron.lang index d7557437a6d..2433b64aa50 100644 --- a/htdocs/langs/lt_LT/cron.lang +++ b/htdocs/langs/lt_LT/cron.lang @@ -6,14 +6,15 @@ Permission23102 = sukurti / atnaujinti planinį darbą Permission23103 = Panaikinti planinį darbą Permission23104 = Vykdyti planinį darbą # Admin -CronSetup= Numatytos užduoties valdymo nustatymas -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=Arba patikrinti ir pradėti spec. darbą +CronSetup=Numatytos užduoties valdymo nustatymas +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=Apsaugos raktas URL pradėti cron darbus 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 environement you can use Scheduled task tools 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 @@ -42,10 +43,11 @@ CronModule=Modulis CronNoJobs=Nėra registruotų darbų CronPriority=Prioritetas CronLabel=Etiketė -CronNbRun=Pradėti skaičių -CronMaxRun=Max number launch +CronNbRun=Number of launches +CronMaxRun=Maximum number of launches CronEach=Kiekvienas JobFinished=Darbas pradėtas ir baigtas +Scheduled=Scheduled #Page card CronAdd= Pridėti darbus CronEvery=Execute job each @@ -56,16 +58,16 @@ CronNote=Komentaras CronFieldMandatory=Laukai %s yra privalomi CronErrEndDateStartDt=Pabaigos data negali būti ankstesnė už pradžios datą StatusAtInstall=Status at module installation -CronStatusActiveBtn=Įjungti +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Išjungti CronTaskInactive=Šis darbas yra išjungtas CronId=ID CronClassFile=Filename with class -CronModuleHelp=Name of Dolibarr module directory (also work with external Dolibarr module). <BR> For exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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=Sistemos komandinė eilutė vykdymui CronCreateJob=Create new Scheduled Job CronFrom=Nuo @@ -76,8 +78,14 @@ CronType_method=Call method of a PHP Class CronType_command=Apvalkalo komanda 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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +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' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/lt_LT/errors.lang b/htdocs/langs/lt_LT/errors.lang index e22aa414772..ee2fb18e9e6 100644 --- a/htdocs/langs/lt_LT/errors.lang +++ b/htdocs/langs/lt_LT/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=Nėra klaidos, mes įsipareigojame # Errors ErrorButCommitIsDone=Aptiktos klaidos, bet mes patvirtiname nepaisant to ErrorBadEMail=Email %s is wrong +ErrorBadMXDomain=Email %s seems wrong (domain has no valid MX record) ErrorBadUrl=URL %s yra neteisingas ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=Prisijungimas %s jau egzistuoja ErrorGroupAlreadyExists=Grupė %s jau egzistuoja ErrorRecordNotFound=Įrašo nerasta @@ -48,6 +50,7 @@ ErrorFieldsRequired=Kai kurie privalomi laukai nėra užpildyti. ErrorSubjectIsRequired=The email topic is required ErrorFailedToCreateDir=Nepavyko sukurti aplanko. Įsitikinkite, kad web serverio vartotojas turi teisę rašyti į Dolibarr dokumentų aplanką. Jei parametras <b>safe_mode</b> yra įjungtas šio PHP, patikrinkite, ar Dolibarr PHP failai priklauso web serverio vartotojui (ar jų grupei). ErrorNoMailDefinedForThisUser=Šiam klientui neapibrėžtas paštas +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=Šiai funkcijai turi būti aktyvuotas Javascript, kad galėtumėte dirbti. Pakeiskite tai meniu Nustatymai-Ekranas. ErrorTopMenuMustHaveAParentWithId0=Meniu tipas "Pagrindinis" negali turėti patronuojančio meniu. Įrašyti 0 patronuojančiame meniu arba pasirinkti meniu tipą "Kairysis". ErrorLeftMenuMustHaveAParentId=Meniu tipas "Kairysis" turi turėti patronuojantį ID. @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=Profilio vardas jau egzistuoja šiam eksporto rinkini ErrorLDAPSetupNotComplete=Dolibarr-LDAP derinimas nėra pilnas ErrorLDAPMakeManualTest=.ldif failas buvo sukurtas aplanke: %s. Pabandykite įkelti jį rankiniu būdu per komandinę eilutę, kad gauti daugiau informacijos apie klaidas ErrorCantSaveADoneUserWithZeroPercentage=Can't save an action with "status not started" if field "done by" is also filled. -ErrorRefAlreadyExists=Nuoroda, naudojama sukūrimui, jau egzistuoja. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/lt_LT/exports.lang b/htdocs/langs/lt_LT/exports.lang index 37f6167789c..b42cd43974d 100644 --- a/htdocs/langs/lt_LT/exports.lang +++ b/htdocs/langs/lt_LT/exports.lang @@ -26,6 +26,8 @@ FieldTitle=Lauko pavadinimas NowClickToGenerateToBuildExportFile=Now, select the file format in the combo box and click on "Generate" to build the export file... AvailableFormats=Available Formats LibraryShort=Biblioteka +ExportCsvSeparator=Csv caracter separator +ImportCsvSeparator=Csv caracter separator Step=Žingsnis 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. @@ -131,3 +133,4 @@ 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/lt_LT/mails.lang b/htdocs/langs/lt_LT/mails.lang index 485609c9c59..6028b9b5dac 100644 --- a/htdocs/langs/lt_LT/mails.lang +++ b/htdocs/langs/lt_LT/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Failo eilutė %s @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Pranešimai -NoNotificationsWillBeSent=Nėra numatytų e-pašto pranešimų šiam įvykiui ir įmonei -ANotificationsWillBeSent=1 pranešimas bus išsiųstas e-paštu -SomeNotificationsWillBeSent=%s pranešimai bus siunčiami e-paštu -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=Visų išsiųstų e-pašto pranešimų sąrašas +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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=Informacija ContactsWithThirdpartyFilter=Contacts with third-party filter Unanswered=Unanswered Answered=Answered IsNotAnAnswer=Is not answer (initial email) IsAnAnswer=Is an answer of an initial email +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/lt_LT/main.lang b/htdocs/langs/lt_LT/main.lang index 5b05397b5d2..20eab7ac66c 100644 --- a/htdocs/langs/lt_LT/main.lang +++ b/htdocs/langs/lt_LT/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=No template available for this email type AvailableVariables=Available substitution variables NoTranslation=Nėra vertimo Translation=Vertimas +CurrentTimeZone=Laiko juostos PHP (serveris) EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria NoRecordFound=Įrašų nerasta NoRecordDeleted=No record deleted NotEnoughDataYet=Not enough data @@ -85,6 +87,8 @@ FileWasNotUploaded=Failas prikabinimui pasirinktas, bet dar nebuvo įkeltas. Pas NbOfEntries=No. of entries GoToWikiHelpPage=Read online help (Internet access needed) GoToHelpPage=Skaityti pagalbą +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Home Page RecordSaved=Įrašas išsaugotas RecordDeleted=Įrašas ištrintas RecordGenerated=Record generated @@ -220,6 +224,7 @@ Value=Reikšmė PersonalValue=Asmeninė reikšmė NewObject=New %s NewValue=Nauja reikšmė +OldValue=Old value %s CurrentValue=Dabartinė reikšmė Code=Kodas Type=Tipas @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Opcija +Filters=Filters List=Sąrašas FullList=Pilnas sąrašas FullConversation=Full conversation @@ -650,6 +656,7 @@ SupplierPreview=Vendor preview ShowCustomerPreview=Rodyti Kliento peržiūrą ShowSupplierPreview=Show vendor preview RefCustomer=Kliento nuoroda +InternalRef=Internal ref. Currency=Valiuta InfoAdmin=Informacija administratoriams Undo=Anuliuoti @@ -671,7 +678,7 @@ SendMail=Siųsti e-laišką Email=El. paštas NoEMail=E-laiškų nėra AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=Nėra mobilaus telefono Owner=Savininkas FollowingConstantsWillBeSubstituted=Šios konstantos bus pakeistos atitinkamomis reikšmėmis @@ -1107,3 +1114,9 @@ UpToDate=Up-to-date OutOfDate=Out-of-date EventReminder=Event Reminder UpdateForAllLines=Update for all lines +OnHold=Laikomas +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 diff --git a/htdocs/langs/lt_LT/modulebuilder.lang b/htdocs/langs/lt_LT/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/lt_LT/modulebuilder.lang +++ b/htdocs/langs/lt_LT/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/lt_LT/mrp.lang b/htdocs/langs/lt_LT/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/lt_LT/mrp.lang +++ b/htdocs/langs/lt_LT/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/lt_LT/other.lang b/htdocs/langs/lt_LT/other.lang index 7e6a654fefa..3a40679f01b 100644 --- a/htdocs/langs/lt_LT/other.lang +++ b/htdocs/langs/lt_LT/other.lang @@ -5,8 +5,6 @@ Tools=Įrankiai TMenuTools=Įrankiai ToolsDesc=All tools not included in other menu entries are grouped here.<br>All the tools can be accessed via the left menu. Birthday=Gimimo diena -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=Gimtadienio perspėjimas aktyvus BirthdayAlertOff=Gimtadienio perspėjimas neaktyvus TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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=Prikabintų failų/dokumentų skaičius TotalSizeOfAttachedFiles=Iš viso prikabintų failų/dokumentų dydis @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Dešinė CalculatedWeight=Apskaičiuotas svoris CalculatedVolume=Apskaičiuotas tūris Weight=Svoris -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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=Importavimo duomenų rinkinys DolibarrNotification=Automatinis pranešimas ResizeDesc=Įveskite naują plotį <b>arba</b> naują aukštį. Santykis bus išlaikomas keičiant dydį ... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Eksporto sritis diff --git a/htdocs/langs/lt_LT/products.lang b/htdocs/langs/lt_LT/products.lang index 31a8d69bc7d..f3905beb77a 100644 --- a/htdocs/langs/lt_LT/products.lang +++ b/htdocs/langs/lt_LT/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Kainų skaičius DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +CustomCode=Customs|Commodity|HS code CountryOrigin=Kilmės šalis +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Nature of product (material/finished) NatureOfProductShort=Nature of product NatureOfProductDesc=Raw material or finished product @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Naudokite fiksuotą kainą PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Kiekio diapazonas -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/lt_LT/projects.lang b/htdocs/langs/lt_LT/projects.lang index 32e8539171e..81e5adaaefc 100644 --- a/htdocs/langs/lt_LT/projects.lang +++ b/htdocs/langs/lt_LT/projects.lang @@ -76,15 +76,16 @@ MyActivities=Mano užduotys/veikla MyProjects=Mano projektai MyProjectsArea=My projects Area DurationEffective=Efektyvi trukmė -ProgressDeclared=Paskelbta pažanga +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Apskaičiuota pažanga +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=Laikas +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/lt_LT/recruitment.lang b/htdocs/langs/lt_LT/recruitment.lang index 90e03cf6b72..c67390a9865 100644 --- a/htdocs/langs/lt_LT/recruitment.lang +++ b/htdocs/langs/lt_LT/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/lt_LT/sendings.lang b/htdocs/langs/lt_LT/sendings.lang index 74260916fb8..085e7a6c2db 100644 --- a/htdocs/langs/lt_LT/sendings.lang +++ b/htdocs/langs/lt_LT/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Kiti vežimai, skirti šiam užsakymui SendingsAndReceivingForSameOrder=Shipments and receipts for this order SendingsToValidate=Vežimai patvirtinimui StatusSendingCanceled=Atšauktas +StatusSendingCanceledShort=Atšauktas StatusSendingDraft=Projektas StatusSendingValidated=Patvirtinta (produktai siuntimui arba jau išsiųsti) StatusSendingProcessed=Apdorotas @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=Labiau išsamus dokumento modelis pristatymo kvitui (logo. ..) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Konstanta EXPEDITION_ADDON_NUMBER nėra apibrėžta SumOfProductVolumes=Produkcijos apimties suma SumOfProductWeights=Produktų svorių suma diff --git a/htdocs/langs/lt_LT/stocks.lang b/htdocs/langs/lt_LT/stocks.lang index 6956b3b8acd..bcb4de636b7 100644 --- a/htdocs/langs/lt_LT/stocks.lang +++ b/htdocs/langs/lt_LT/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/lt_LT/ticket.lang b/htdocs/langs/lt_LT/ticket.lang index 7f3e3f99310..0dbbd874bab 100644 --- a/htdocs/langs/lt_LT/ticket.lang +++ b/htdocs/langs/lt_LT/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Kiti TicketSeverityShortLOW=Žemas TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=Aukštas -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Skaityti Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/lt_LT/website.lang b/htdocs/langs/lt_LT/website.lang index df77c21ae55..6a589a71fd8 100644 --- a/htdocs/langs/lt_LT/website.lang +++ b/htdocs/langs/lt_LT/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page PageContainer=Puslapis 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/lt_LT/withdrawals.lang b/htdocs/langs/lt_LT/withdrawals.lang index 11ebeb3ab99..a81864a269e 100644 --- a/htdocs/langs/lt_LT/withdrawals.lang +++ b/htdocs/langs/lt_LT/withdrawals.lang @@ -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>. ClassCredited=Priskirti įskaitytas (credited) @@ -131,7 +132,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,3 +148,5 @@ 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=Opcija realiam režimui nebuvo nustatyta, sustabdyta po šios simuliacijos ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorICSmissing=Missing ICS in Bank account %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/lt_LT/workflow.lang b/htdocs/langs/lt_LT/workflow.lang index 0f340b1be9a..dfb6dc3193f 100644 --- a/htdocs/langs/lt_LT/workflow.lang +++ b/htdocs/langs/lt_LT/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 diff --git a/htdocs/langs/lv_LV/accountancy.lang b/htdocs/langs/lv_LV/accountancy.lang index 9d43d7bcd9a..9825eac154e 100644 --- a/htdocs/langs/lv_LV/accountancy.lang +++ b/htdocs/langs/lv_LV/accountancy.lang @@ -16,6 +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 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) @@ -48,6 +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 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 @@ -144,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=Saistīto elementu skaits, kas redzams lapā (maksimāli ieteicams: 50) +ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 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 @@ -198,7 +201,8 @@ Docdate=Datums Docref=Atsauce LabelAccount=Konta nosaukums LabelOperation=Etiķetes darbība -Sens=Sens +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=Burtu kods Lettering=Burti Codejournal=Žurnāls @@ -206,7 +210,8 @@ JournalLabel=Žurnāla etiķete NumPiece=Gabala numurs TransactionNumShort=Num. darījums AccountingCategory=Personalizētas grupas -GroupByAccountAccounting=Grupēt pēc grāmatvedības konta +GroupByAccountAccounting=Group by general ledger account +GroupBySubAccountAccounting=Group by subledger account 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 @@ -248,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=Rādīt starpsummu pa grupām +ShowSubtotalByGroup=Show subtotal by level 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. @@ -271,11 +276,13 @@ 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 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 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 -SelectMonthAndValidate=Izvēlieties mēnesi un apstipriniet kustības ValidateHistory=Piesaistiet automātiski AutomaticBindingDone=Automātiskā piesaistīšana pabeigta @@ -293,6 +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 ## Admin BindingOptions=Iesiešanas iespējas @@ -337,6 +345,7 @@ 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_Sage50_Swiss=Eksports uz Sage 50 Šveici Modelcsv_winfic=Eksportēt Winfic - eWinfic - WinSis Compta Modelcsv_Gestinumv3=Export for Gestinum (v3) diff --git a/htdocs/langs/lv_LV/admin.lang b/htdocs/langs/lv_LV/admin.lang index d4c3cc29788..88ecbad779e 100644 --- a/htdocs/langs/lv_LV/admin.lang +++ b/htdocs/langs/lv_LV/admin.lang @@ -56,6 +56,8 @@ 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 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. @@ -85,7 +87,6 @@ ShowPreview=Rādīt priekšskatījumu ShowHideDetails=Rādīt - slēpt informāciju PreviewNotAvailable=Priekšskatījums nav pieejams ThemeCurrentlyActive=aktīvā tēma -CurrentTimeZone=Laika josla PHP (servera) MySQLTimeZone=Laika zona MySql (datubāze) TZHasNoEffect=Datus uzglabā un nodod atpakaļ datubāzes serverim tā, it kā tie tiktu turēti kā iesniegtā virkne. Laika josla ir spēkā tikai tad, ja tiek izmantota funkcija UNIX_TIMESTAMP (kuru nedrīkst izmantot Dolibarr, tāpēc datubāzei TZ nedrīkst būt nekādas ietekmes, pat ja tas ir mainīts pēc datu ievadīšanas). Space=Telpa @@ -153,8 +154,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=Dzēst visus pagaidu failus (nav datu zaudēšanas riska). Piezīme. Dzēšana tiek veikta tikai tad, ja pagaidu katalogs tika izveidots pirms 24 stundām. -PurgeDeleteTemporaryFilesShort=Dzēst pagaidu failus +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 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ēš. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Ieteicamie partneri OtherResources=Citi resursi ExternalResources=Ārējie resursi SocialNetworks=Sociālie tīkli +SocialNetworkId=Social Network 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. @@ -375,7 +377,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=Piemēri sintaksei: <br> c:\\mydir<br>/Home/ mydir<br> DOL_DATA_ROOT/ECM/ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<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 @@ -406,7 +408,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=Slēpt pogas lietotājiem, kas nav administratori, par neatļautām darbībām, nevis rādīt pelēkas atspējotas pogas +ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) 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 @@ -668,7 +670,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=Moduli, lai pārvaldītu peļņu +Module59000Desc=Module to follow margins Module60000Name=Komisijas Module60000Desc=Modulis lai pārvaldītu komisijas Module62000Name=Inkoterms @@ -1306,7 +1308,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=Jums datu bāzē ir %s %s. Jums konstante %s jāpievieno vienumam mapē Mājas iestatīšana-Cits. Ierobežojiet meklēšanu līdz virkņu sākumam, kas datu bāzei ļauj izmantot indeksus, un jums vajadzētu saņemt tūlītēju atbildi. +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=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. @@ -1596,8 +1598,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 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=Attēlot produktu aprakstus trešās puses valodā +ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) 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 @@ -1689,7 +1696,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= Slēpt neatļautās izvēlnes (pelēkas) +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) 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 @@ -1983,11 +1990,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 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=Datums, kad saņemts pēdējais savākšanas mēģinājums -DateLastcollectResultOk=Pēdējais datums savāc veiksmīgi +DateLastCollectResult=Date of latest collect try +DateLastcollectResultOk=Date of latest collect success LastResult=Jaunākais rezultāts EmailCollectorConfirmCollectTitle=E-pasts apkopo apstiprinājumu EmailCollectorConfirmCollect=Vai vēlaties savākt šīs kolekcijas kolekciju tagad? @@ -2005,7 +2013,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=Izveidojiet kandidatūru +CreateCandidature=Create job application FormatZip=Pasta indekss MainMenuCode=Izvēlnes ievades kods (mainmenu) ECMAutoTree=Rādīt automātisko ECM koku @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/lv_LV/banks.lang b/htdocs/langs/lv_LV/banks.lang index cf070821b46..0bf310b3a54 100644 --- a/htdocs/langs/lv_LV/banks.lang +++ b/htdocs/langs/lv_LV/banks.lang @@ -173,10 +173,11 @@ 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 naudas žogs -NewCashFence=Jauns naudas žogs +CashControl=POS cash desk control +NewCashFence=New cash desk 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 diff --git a/htdocs/langs/lv_LV/blockedlog.lang b/htdocs/langs/lv_LV/blockedlog.lang index 237dac224bc..3318d1d334c 100644 --- a/htdocs/langs/lv_LV/blockedlog.lang +++ b/htdocs/langs/lv_LV/blockedlog.lang @@ -8,7 +8,7 @@ BrowseBlockedLog=Nepārveidojami žurnāli ShowAllFingerPrintsMightBeTooLong=Rādīt visus arhivētos žurnālus (var būt daudz) ShowAllFingerPrintsErrorsMightBeTooLong=Rādīt visus nederīgos arhīva žurnālus (var būt garš) DownloadBlockChain=Lejupielādējiet pirkstu nospiedumus -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=Arhivēts žurnāla ieraksts nav derīgs. Tas nozīmē, ka kāds (hakeris?) Ir mainījis dažus šī ieraksta datus pēc tā ierakstīšanas vai ir izdzēsis iepriekšējo arhivēto ierakstu (pārbaudiet, vai pastāv līnija ar iepriekšējo #). OkCheckFingerprintValidity=Arhivēts žurnāla ieraksts ir derīgs. Dati par šo līniju netika mainīti un ieraksts seko iepriekšējam. OkCheckFingerprintValidityButChainIsKo=Arhivētais žurnāls šķiet derīgs salīdzinājumā ar iepriekšējo, bet ķēde agrāk tika bojāta. AddedByAuthority=Uzglabāti tālvadības iestādē @@ -35,7 +35,7 @@ logDON_DELETE=Ziedojuma loģiska dzēšana logMEMBER_SUBSCRIPTION_CREATE=Dalībnieka abonements izveidots logMEMBER_SUBSCRIPTION_MODIFY=Dalībnieku abonēšana ir labota logMEMBER_SUBSCRIPTION_DELETE=Locekļu abonēšanas loģiskā dzēšana -logCASHCONTROL_VALIDATE=Naudas žogu ierakstīšana +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Klientu rēķinu lejupielāde BlockedLogBillPreview=Klienta rēķina priekšskatījums BlockedlogInfoDialog=Žurnāla detaļas diff --git a/htdocs/langs/lv_LV/boxes.lang b/htdocs/langs/lv_LV/boxes.lang index 88d7803c340..ff805fefef0 100644 --- a/htdocs/langs/lv_LV/boxes.lang +++ b/htdocs/langs/lv_LV/boxes.lang @@ -46,9 +46,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 BoxGlobalActivity=Global darbība (pavadzīmes, priekšlikumi, rīkojumi) BoxGoodCustomers=Labi klienti BoxTitleGoodCustomers=%s Labi klienti +BoxScheduledJobs=Plānoti darbi +BoxTitleFunnelOfProspection=Lead funnel 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. @@ -92,8 +95,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=Pēdējie manuālie ieraksti grāmatvedībā -BoxTitleLastManualEntries=%s jaunākie manuālie ieraksti +BoxLastManualEntries=Latest record in accountancy entered manually or without source document +BoxTitleLastManualEntries=%s latest record entered manually or without source document NoRecordedManualEntries=Grāmatvedībā nav manuālu ierakstu BoxSuspenseAccount=Grāmatvedības operācija ar pagaidu kontu BoxTitleSuspenseAccount=Nepiešķirto līniju skaits @@ -102,5 +105,7 @@ 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 # Pages AccountancyHome=Grāmatvedība +ValidatedProjects=Apstiprināti projekti diff --git a/htdocs/langs/lv_LV/cashdesk.lang b/htdocs/langs/lv_LV/cashdesk.lang index 773bfdf4601..fddd50d2bac 100644 --- a/htdocs/langs/lv_LV/cashdesk.lang +++ b/htdocs/langs/lv_LV/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Kājene AmountAtEndOfPeriod=Summa perioda beigās (diena, mēnesis vai gads) TheoricalAmount=Teorētiskā summa RealAmount=Reālā summa -CashFence=Naudas žogs -CashFenceDone=Naudas žogs veikts par periodu +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=Rēķinu skaits Paymentnumpad=Padeves veids maksājuma ievadīšanai Numberspad=Numbers Pad @@ -99,8 +99,9 @@ CashDeskRefNumberingModules=Numerācijas modulis tirdzniecības vietu tirdzniec CashDeskGenericMaskCodes6 =  <br> <b> {TN} </b> tagu izmanto, lai pievienotu termināļa numuru TakeposGroupSameProduct=Grupējiet tās pašas produktu līnijas StartAParallelSale=Sāciet jaunu paralēlu izpārdošanu -ControlCashOpening=Kontrolējiet kases atvēršanu kasē -CloseCashFence=Aizveriet naudas žogu +SaleStartedAt=Sale started at %s +ControlCashOpening=Control cash popup at opening POS +CloseCashFence=Close cash desk control CashReport=Skaidras naudas pārskats MainPrinterToUse=Galvenais izmantojamais printeris OrderPrinterToUse=Pasūtiet printeri izmantošanai @@ -121,4 +122,5 @@ GiftReceiptButton=Pievienojiet pogu Dāvanu kvīts GiftReceipt=Dāvanu kvīts ModuleReceiptPrinterMustBeEnabled=Vispirms jābūt iespējotam moduļa saņemšanas printerim AllowDelayedPayment=Atļaut kavētu maksājumu -PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts +PrintPaymentMethodOnReceipts=Izdrukājiet maksājuma veidu uz biļetēm | +WeighingScale=Svari diff --git a/htdocs/langs/lv_LV/categories.lang b/htdocs/langs/lv_LV/categories.lang index db3681c7335..bde3733eac6 100644 --- a/htdocs/langs/lv_LV/categories.lang +++ b/htdocs/langs/lv_LV/categories.lang @@ -19,6 +19,7 @@ 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) NewCategory=Jauna etiķete/sadaļa ModifCat=Labot etiķeti/sadaļu CatCreated=Etiķete/sadaļa izveidota @@ -65,16 +66,22 @@ UsersCategoriesShort=Lietotāju atzīmes / kategorijas StockCategoriesShort=Noliktavas tagi / kategorijas ThisCategoryHasNoItems=Šajā kategorijā nav nevienas preces. CategId=Tag /sadaļas ID -CatSupList=Piegādātāju tagu / kategoriju saraksts -CatCusList=Klientu / perspektīvu tagu / kategoriju saraksts +ParentCategory=Parent tag/category +ParentCategoryLabel=Label of parent tag/category +CatSupList=List of vendors tags/categories +CatCusList=List of customers/prospects tags/categories CatProdList=Produktu tagu / kategoriju saraksts CatMemberList=Dalībnieku tagu / kategoriju saraksts -CatContactList=List of contact tags/categories -CatSupLinks=Saites starp piegādātājiem un tagiem / sadaļām +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=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 -CatProJectLinks=Saiknes starp projektiem 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 DeleteFromCat=Noņemt no tagiem / kategorijas ExtraFieldsCategories=Complementary attributes CategoriesSetup=Tagu / kategoriju iestatīšana diff --git a/htdocs/langs/lv_LV/companies.lang b/htdocs/langs/lv_LV/companies.lang index 21c55893303..6790975f63a 100644 --- a/htdocs/langs/lv_LV/companies.lang +++ b/htdocs/langs/lv_LV/companies.lang @@ -358,7 +358,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=Juridiskās personas veids +JuridicalStatus=Business entity type Workforce=Darbaspēks Staff=Darbinieki ProspectLevelShort=Potenciāls diff --git a/htdocs/langs/lv_LV/compta.lang b/htdocs/langs/lv_LV/compta.lang index a4add9768be..ad769c0e9d3 100644 --- a/htdocs/langs/lv_LV/compta.lang +++ b/htdocs/langs/lv_LV/compta.lang @@ -111,7 +111,7 @@ Refund=Atmaksa SocialContributionsPayments=Sociālo/fiskālo nodokļu maksājumi ShowVatPayment=Rādīt PVN maksājumu TotalToPay=Summa -BalanceVisibilityDependsOnSortAndFilters=Bilance ir redzama šajā sarakstā tikai tad, ja tabula ir sakārtota uz augšu %s un tiek filtrēta 1 bankas kontam. +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=Klienta grāmatvedības kods SupplierAccountancyCode=Pārdevēja grāmatvedības kods CustomerAccountancyCodeShort=Klienta. konta. kods @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Vai tiešām vēlaties dzēst šo sociālo / fis 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=Zināma reģistrēto rēķinu analīze, pat ja tie vēl nav uzskaitīti virsgrāmatā. +CalcModeDebt=Analysis of known recorded documents even if they are not yet accounted in ledger. 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,9 +154,9 @@ 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=Skatīt %s maksājumu analīzi %s, lai aprēķinātu veiktos faktiskos maksājumus, pat ja tie vēl nav uzskaitīti Virsgrāmatā. -SeeReportInDueDebtMode=Skatīt %srēķinu analīzi %s, lai aprēķiniem izmantotu zināmos reģistrētos rēķinus, pat ja tie vēl nav uzskaitīti Virsgrāmatā. -SeeReportInBookkeepingMode=Lai skatītu <b> Grāmatvedības grāmatvedības tabulu </ b>, skatiet <b> %sBookBooking report%s </ 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=- 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. 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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=Tas rāda jūsu grāmatvedībā ierakstu ar g SeePageForSetup=Lai iestatītu, skatiet sadaļu <a href="%s"> %s </a> DepositsAreNotIncluded=- Sākuma rēķini nav iekļauti DepositsAreIncluded=- Down payment invoices are included +LT1ReportByMonth=2. nodokļu pārskats pa mēnešiem +LT2ReportByMonth=Nodokļu 3 pārskats pa mēnešiem LT1ReportByCustomers=Trešo personu nodokļu pārskats 2 LT2ReportByCustomers=Ziņojiet par trešās personas nodokli 3 LT1ReportByCustomersES=Report by third party RE LT2ReportByCustomersES=Ziņojumā, ko trešās puses IRPF VATReport=Pārdošanas nodokļa atskaite VATReportByPeriods=Pārdošanas nodokļu pārskats pa periodiem +VATReportByMonth=Pārdošanas nodokļa pārskats pa mēnešiem VATReportByRates=Pārdošanas nodokļu pārskats pēc likmēm VATReportByThirdParties=Trešo personu pārdošanas nodokļa pārskats VATReportByCustomers=Pārdošanas nodokļa pārskats pēc klienta diff --git a/htdocs/langs/lv_LV/cron.lang b/htdocs/langs/lv_LV/cron.lang index 4cca272f272..864165259f3 100644 --- a/htdocs/langs/lv_LV/cron.lang +++ b/htdocs/langs/lv_LV/cron.lang @@ -7,8 +7,8 @@ Permission23103 = Dzēst plānoto darbu Permission23104 = Izpildīt plānoto darbu # Admin CronSetup=Plānoto darbu iestatīšana -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=Or to check and launch a specific job +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=Drošības atslēga URL uzsākt cron darbavietas 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 @@ -84,3 +84,8 @@ MakeLocalDatabaseDumpShort=Lokālās datu bāzes dublēšana MakeLocalDatabaseDump=Izveidojiet vietējo datubāzes dump. Parametri ir: kompresija ("gz" vai "bz" vai "neviens"), dublēšanas veids ("mysql", "pgsql", "auto"), 1, "auto" vai faila nosaukums, 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=Datu tīrītājs un anonimizators +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/lv_LV/errors.lang b/htdocs/langs/lv_LV/errors.lang index 033f9ff15e9..60299570880 100644 --- a/htdocs/langs/lv_LV/errors.lang +++ b/htdocs/langs/lv_LV/errors.lang @@ -8,6 +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. ErrorLoginAlreadyExists=Lietotājs %s jau pastāv. ErrorGroupAlreadyExists=Grupa %s jau pastāv. ErrorRecordNotFound=Ierakstīt nav atrasts. @@ -49,6 +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 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. @@ -76,7 +78,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=Ref izmantot izveidot jau pastāv. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. 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 @@ -246,6 +248,14 @@ 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 + # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Jūsu PHP parametrs upload_max_filesize (%s) ir augstāks nekā PHP parametrs post_max_size (%s). Šī nav konsekventa iestatīšana. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. @@ -276,3 +286,4 @@ 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. diff --git a/htdocs/langs/lv_LV/exports.lang b/htdocs/langs/lv_LV/exports.lang index 8f3f62628ff..c7732d16a4b 100644 --- a/htdocs/langs/lv_LV/exports.lang +++ b/htdocs/langs/lv_LV/exports.lang @@ -133,3 +133,4 @@ KeysToUseForUpdates=Atslēga (sleja), ko izmantot esošo datu <b> atjaunināšan NbInsert=Ievietoto līniju skaits: %s NbUpdate=Atjaunināto līniju skaits: %s MultipleRecordFoundWithTheseFilters=Ar šiem filtriem tika atrasti vairāki ieraksti: %s +StocksWithBatch=Stocks and location (warehouse) of products with batch/serial number diff --git a/htdocs/langs/lv_LV/mails.lang b/htdocs/langs/lv_LV/mails.lang index 24e05670a05..0b05dd5c665 100644 --- a/htdocs/langs/lv_LV/mails.lang +++ b/htdocs/langs/lv_LV/mails.lang @@ -92,6 +92,7 @@ MailingModuleDescEmailsFromUser=Lietotāja ievadītie e-pasti MailingModuleDescDolibarrUsers=Lietotāji ar e-pastu MailingModuleDescThirdPartiesByCategories=Trešās personas (pēc sadaļām) SendingFromWebInterfaceIsNotAllowed=Sūtīšana no tīmekļa saskarnes nav atļauta. +EmailCollectorFilterDesc=All filters must match to have an email being collected # Libelle des modules de liste de destinataires mailing LineInFile=Līnija %s failā @@ -129,8 +130,8 @@ NotificationsAuto=Paziņojumi Automātiski. NoNotificationsWillBeSent=Šim notikuma veidam un uzņēmumam nav plānoti automātiski e-pasta paziņojumi ANotificationsWillBeSent=1 automātisks paziņojums tiks nosūtīts pa e-pastu SomeNotificationsWillBeSent=%s automātiskie paziņojumi tiks nosūtīti pa e-pastu -AddNewNotification=Aktivizējiet jaunu automātisko e-pasta paziņojumu mērķi / notikumu -ListOfActiveNotifications=Uzskaitiet visus aktīvos mērķus / notikumus automātiskai e-pasta paziņošanai +AddNewNotification=Subscribe to a new automatic email notification (target/event) +ListOfActiveNotifications=List all active subscriptions (targets/events) for automatic email notification ListOfNotificationsDone=Uzskaitiet visus nosūtītos automātiskos e-pasta paziņojumus 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. @@ -141,7 +142,7 @@ UseFormatFileEmailToTarget=Importētajam failam jābūt formatētam <strong>e-pa UseFormatInputEmailToTarget=Ievadiet virkni ar formātu <strong>e-pasts;nosaukums;vārds;cits</strong> MailAdvTargetRecipients=Saņēmēji (papildu izvēle) AdvTgtTitle=Aizpildiet ievades laukus, lai iepriekš atlasītu mērķauditoriju trešajām personām vai kontaktpersonām / adresēm -AdvTgtSearchTextHelp=Izmantojiet %% kā aizstājējzīmes. Piemēram, lai atrastu visu objektu, piemēram, <b> jean, joe, jim </ b>, jūs varat ievadīt <b> j%% </ b>, kuru varat arī izmantot; kā atdalītājs par vērtību, un izmantot! izņemot šo vērtību. Piemēram, <b> jean; joe; jim%%;! Jimo;! Jima% </ b> tiks mērķētas uz visiem jean, joe, sākt ar jim, bet ne jimo, un ne visu, kas sākas ar jima +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=Izmantojiet intervālu, lai izvēlētos int vai float vērtību AdvTgtMinVal=Minimālā vērtība AdvTgtMaxVal=Maksimālā vērtība @@ -174,3 +175,5 @@ Answered=Atbildēts IsNotAnAnswer=Nav atbildes (sākotnējais e-pasts) IsAnAnswer=Vai ir atbilde uz sākotnējo e-pastu RecordCreatedByEmailCollector=Ierakstu izveidojis e-pasta savācējs %s no e-pasta %s +DefaultBlacklistMailingStatus=Default contact status for refuse bulk emailing +DefaultStatusEmptyMandatory=Empty but mandatory diff --git a/htdocs/langs/lv_LV/main.lang b/htdocs/langs/lv_LV/main.lang index 3f1950cb761..9e137712141 100644 --- a/htdocs/langs/lv_LV/main.lang +++ b/htdocs/langs/lv_LV/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=Šim e-pasta veidam nav pieejamas veidnes AvailableVariables=Pieejamie aizstāšanas mainīgie NoTranslation=Nav iztulkots Translation=Tulkošana +CurrentTimeZone=Laika josla PHP (servera) EmptySearchString=Ievadiet meklēšanas kritērijus +EnterADateCriteria=Enter a date criteria NoRecordFound=Nav atrasti ieraksti NoRecordDeleted=Neviens ieraksts nav dzēsts NotEnoughDataYet=Nepietiek datu @@ -85,6 +87,8 @@ 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 +HomePage=Mājas lapa RecordSaved=Ieraksts saglabāts RecordDeleted=Ieraksts dzēsts RecordGenerated=Ieraksts izveidots @@ -220,6 +224,7 @@ Value=Vērtība PersonalValue=Personīgā vērtība NewObject=Jauns %s NewValue=Jaunā vērtība +OldValue=Old value %s CurrentValue=Pašreizējā vērtība Code=Kods Type=Tips @@ -433,6 +438,7 @@ RemainToPay=Vēl jāsamaksā Module=Module/Application Modules=Moduļi/lietojumprogrammas Option=Iespējas +Filters=Filters List=Saraksts FullList=Pilns saraksts FullConversation=Pilna saruna @@ -650,6 +656,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. Currency=Valūta InfoAdmin=Informācija administratoriem Undo=Atcelt @@ -671,7 +678,7 @@ SendMail=Sūtīt e-pastu Email=E-pasts NoEMail=Nav e-pasta AlreadyRead=Jau izlasīts -NotRead=Nav lasīts +NotRead=Nelasīts NoMobilePhone=Nav mob. tel. Owner=Īpašnieks FollowingConstantsWillBeSubstituted=Šādas konstantes tiks aizstāts ar atbilstošo vērtību. @@ -1107,3 +1114,9 @@ UpToDate=Aktuāls OutOfDate=Novecojis EventReminder=Atgādinājums par notikumu 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 diff --git a/htdocs/langs/lv_LV/modulebuilder.lang b/htdocs/langs/lv_LV/modulebuilder.lang index 4d3e949e746..04eba6b459c 100644 --- a/htdocs/langs/lv_LV/modulebuilder.lang +++ b/htdocs/langs/lv_LV/modulebuilder.lang @@ -40,6 +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 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. @@ -77,7 +78,7 @@ IsAMeasure=Vai pasākums DirScanned=Direktorija skenēta NoTrigger=Nav sprūda NoWidget=Nav logrīku -GoToApiExplorer=Iet uz API pētnieku +GoToApiExplorer=API pētnieks ListOfMenusEntries=Izvēlnes ierakstu saraksts ListOfDictionariesEntries=Vārdnīcu ierakstu saraksts ListOfPermissionsDefined=Noteikto atļauju saraksts @@ -105,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=(Dzēst tabulu, ja tukša) +DropTableIfEmpty=(Destroy table if empty) TableDoesNotExists=Tabula %s neeksistē TableDropped=Tabula %s dzēsta InitStructureFromExistingTable=Veidojiet esošās tabulas struktūras masīva virkni @@ -126,7 +127,6 @@ UseSpecificEditorURL = Izmantojiet konkrētu redaktora URL UseSpecificFamily = Izmantojiet noteiktu ģimeni UseSpecificAuthor = Izmantojiet noteiktu autoru UseSpecificVersion = Izmantojiet konkrētu sākotnējo versiju -ModuleMustBeEnabled=Vispirms jāaktivizē modulis / programma IncludeRefGeneration=Objekta atsauce jāģenerē automātiski IncludeRefGenerationHelp=Atzīmējiet šo, ja vēlaties iekļaut kodu, lai automātiski pārvaldītu atsauces ģenerēšanu IncludeDocGeneration=Es gribu no objekta ģenerēt dažus dokumentus @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Lauku tips: <br> varchar (99), double (24,8), real, text, html, 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. diff --git a/htdocs/langs/lv_LV/mrp.lang b/htdocs/langs/lv_LV/mrp.lang index bf03d346a2e..e56abf7d542 100644 --- a/htdocs/langs/lv_LV/mrp.lang +++ b/htdocs/langs/lv_LV/mrp.lang @@ -78,3 +78,27 @@ TotalCost=Kopējās izmaksas BOMTotalCost=Šīs BOM izgatavošanas izmaksas, pamatojoties uz katra patērētā daudzuma un produkta izmaksām (izmantojiet pašizmaksu, ja tā ir noteikta, cita - vidējā svērtā cena, ja ir noteikta, citur - labākā pirkuma cena). GoOnTabProductionToProduceFirst=Vispirms jums ir jāsāk ražošana, lai aizvērtu ražošanas pasūtījumu (sk. Cilni '%s'). Bet jūs varat to atcelt. 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/lv_LV/other.lang b/htdocs/langs/lv_LV/other.lang index 74075151ce5..73b65a6e40b 100644 --- a/htdocs/langs/lv_LV/other.lang +++ b/htdocs/langs/lv_LV/other.lang @@ -5,8 +5,6 @@ Tools=Darbarīki TMenuTools=Rīki ToolsDesc=Visi instrumenti, kas nav iekļauti citos izvēlnes ierakstos, tiek sagrupēti šeit. <br> Visiem rīkiem var piekļūt, izmantojot kreiso izvēlni. Birthday=Dzimšanas diena -BirthdayDate=Dzimšanas diena -DateToBirth=Dzimšanas datums BirthdayAlertOn=dzimšanas dienas brīdinājums aktīvs BirthdayAlertOff=dzimšanas dienas brīdinājums neaktīvs TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Rēķina datuma iepriekšējais mēnesis (no 1-12) TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Pēc mēneša (no 1-12) rēķina datums TextNextMonthOfInvoice=Pēc mēneša (teksts) rēķina datums +PreviousMonth=Iepriekšējais mēnesis +CurrentMonth=Tekošais mēnesis ZipFileGeneratedInto=Zip fails, kas ģenerēts <b> %s </b>. DocFileGeneratedInto=Doc fails ir izveidots <b> %s </b>. JumpToLogin=Atvienots. Iet uz pieteikšanās lapu ... @@ -78,6 +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 SeeModuleSetup=See setup of module %s NbOfAttachedFiles=Skaits pievienotos failus / dokumentus TotalSizeOfAttachedFiles=Kopējais apjoms pievienotos failus / dokumentus @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Labdien)__\n\nLūdzu, nosūtiet sūtījumu PredefinedMailContentSendFichInter=__(Labdien)__\n\nLūdzu, skatiet interviju __REF__\n\n\n__ (Ar cieņu) __\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Jūs varat noklikšķināt uz zemāk esošās saites, lai veiktu maksājumu, ja tas vēl nav izdarīts.\n\n%s\n\n PredefinedMailContentGeneric=__(Labdien)__\n\n\n__ (Ar cieņu) __\n\n__USER_SIGNATURE__ +PredefinedMailContentSendActionComm=Notikuma atgādinājums "__EVENT_LABEL__" __EVENT_DATE__ plkst. __EVENT_TIME__ <br> <br> Šis ir automātisks ziņojums, lūdzu, neatbildiet. DemoDesc=Dolibarr ir kompakts ERP / CRM, kas atbalsta vairākus biznesa moduļus. Demonstrācija, kas demonstrē visus moduļus, nav jēga, jo šis scenārijs nekad nenotiek (pieejami vairāki simti). Tātad, ir pieejami vairāki demo profili. ChooseYourDemoProfil=Izvēlies demo profilu, kas vislabāk atbilst jūsu vajadzībām ... ChooseYourDemoProfilMore=... vai izveidojiet savu profilu <br> (manuālā moduļa izvēle) @@ -214,6 +216,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. 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 ... @@ -258,6 +261,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 ##### Export ##### ExportsArea=Eksportēšanas sadaļa diff --git a/htdocs/langs/lv_LV/products.lang b/htdocs/langs/lv_LV/products.lang index 80aa1c66905..575c475d3b8 100644 --- a/htdocs/langs/lv_LV/products.lang +++ b/htdocs/langs/lv_LV/products.lang @@ -108,7 +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=Komplektu aktivizēšana (virtuālie produkti) +AssociatedProductsAbility=Enable Kits (set of several products) +VariantsAbility=Enable Variants (variations of products, for example color, size) AssociatedProducts=Komplekti AssociatedProductsNumber=Produktu skaits, kas veido šo komplektu ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Iepirkšanas cenas CustomerPrices=Klienta cenas SuppliersPrices=Pārdevēja cenas SuppliersPricesOfProductsOrServices=Pārdevēja cenas (produktiem vai pakalpojumiem) -CustomCode=Muita / Prece / HS kods +CustomCode=Customs|Commodity|HS code CountryOrigin=Izcelsmes valsts +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Produkta veids (materiāls / gatavs) NatureOfProductShort=Produkta veids NatureOfProductDesc=Izejviela vai gatavais produkts @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Izmantot fiksētu cenu PriceByQuantity=Dažādas cenas apjomam DisablePriceByQty=Atspējot cenas pēc daudzuma PriceByQuantityRange=Daudzuma diapazons -MultipriceRules=Cenu segmenta noteikumi +MultipriceRules=Automatic prices for segment 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 diff --git a/htdocs/langs/lv_LV/projects.lang b/htdocs/langs/lv_LV/projects.lang index 28e163375b4..d33723cf2ac 100644 --- a/htdocs/langs/lv_LV/projects.lang +++ b/htdocs/langs/lv_LV/projects.lang @@ -76,15 +76,16 @@ MyActivities=Mani uzdevumi / aktivitātes MyProjects=Mani projekti MyProjectsArea=Manu projektu sadaļa DurationEffective=Efektīvais ilgums -ProgressDeclared=Deklarētais progress +ProgressDeclared=Deklarētais reālais progress TaskProgressSummary=Uzdevuma virzība CurentlyOpenedTasks=Saudzīgi atvērti uzdevumi -TheReportedProgressIsLessThanTheCalculatedProgressionByX=Deklarētā progresija ir mazāka par %s nekā aprēķinātā progresija -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=Deklarētais progress ir vairāk %s nekā aprēķinātā progresija -ProgressCalculated=Aprēķinātais progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=Deklarētais reālais progress ir mazāks par %s nekā patēriņa progress +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=Deklarētais reālais progress ir vairāk %s nekā patēriņa progress +ProgressCalculated=Progress patēriņa jomā WhichIamLinkedTo=ar kuru esmu saistīts WhichIamLinkedToProject=kuru esmu piesaistījis projektam Time=Laiks +TimeConsumed=Consumed ListOfTasks=Uzdevumu saraksts GoToListOfTimeConsumed=Pāriet uz patērētā laika sarakstu GanttView=Ganta skats diff --git a/htdocs/langs/lv_LV/recruitment.lang b/htdocs/langs/lv_LV/recruitment.lang index a06859e2516..dc5848592fc 100644 --- a/htdocs/langs/lv_LV/recruitment.lang +++ b/htdocs/langs/lv_LV/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/lv_LV/sendings.lang b/htdocs/langs/lv_LV/sendings.lang index f43aacf6d6c..4822bca650a 100644 --- a/htdocs/langs/lv_LV/sendings.lang +++ b/htdocs/langs/lv_LV/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Citas sūtījumiem uz šo rīkojumu SendingsAndReceivingForSameOrder=Shipments and receipts for this order SendingsToValidate=Sūtījumi apstiprināšanai, StatusSendingCanceled=Atcelts +StatusSendingCanceledShort=Atcelts StatusSendingDraft=Uzmetums StatusSendingValidated=Apstiprinātas (produkti, uz kuģi vai jau nosūtīti) StatusSendingProcessed=Apstrādāts @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=Vispirms jums ir jāapstiprina pasūtījums, la # Sending methods # ModelDocument DocumentModelTyphon=Vairāk pilnīgu dokumentu modelis piegādes ieņēmumiem (logo. ..) +DocumentModelStorm=Pilnīgāks dokumentu paraugs piegādes kvīšu un ekstrahēto lauku saderībai (logotips ...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Pastāvīga EXPEDITION_ADDON_NUMBER nav noteikts SumOfProductVolumes=Produkta apjomu summa SumOfProductWeights=Summēt produkta svaru diff --git a/htdocs/langs/lv_LV/stocks.lang b/htdocs/langs/lv_LV/stocks.lang index 6c2b008b488..91412191b93 100644 --- a/htdocs/langs/lv_LV/stocks.lang +++ b/htdocs/langs/lv_LV/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Iestatiet noliktavu pārdošanas pasūtījumiem UserDefaultWarehouse=Iestatiet noliktavu lietotājiem MainDefaultWarehouse=Noklusētā noliktava @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Iestatiet vērtību 0, lai atiestatītu daudzumu <br>. Sagl UpdateByScaning=Atjauniniet, skenējot 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. diff --git a/htdocs/langs/lv_LV/ticket.lang b/htdocs/langs/lv_LV/ticket.lang index b1947dfcce0..43c18d15509 100644 --- a/htdocs/langs/lv_LV/ticket.lang +++ b/htdocs/langs/lv_LV/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Pieteikumu veids TicketDictCategory=Pieteikumu - grupas TicketDictSeverity=Pieteikuma svarīgums TicketDictResolution=Biļete - izšķirtspēja -TicketTypeShortBUGSOFT=Dysfontionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Tirdzniecības jautājums +TicketTypeShortCOM=Tirdzniecības jautājums TicketTypeShortHELP=Funkcionālās palīdzības pieprasījums TicketTypeShortISSUE=Izdošana, kļūda vai problēma TicketTypeShortREQUEST=Mainīt vai uzlabot pieprasījumu @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Cits TicketSeverityShortLOW=Zems TicketSeverityShortNORMAL=Normāls TicketSeverityShortHIGH=Augsts -TicketSeverityShortBLOCKING=Kritiski/bloķēšana +TicketSeverityShortBLOCKING=Kritisks, bloķējošs ErrorBadEmailAddress=Lauks "%s" ir nepareizs MenuTicketMyAssign=Mani pieteikumi @@ -60,7 +58,6 @@ OriginEmail=E-pasta avots Notify_TICKET_SENTBYMAIL=Sūtīt biļeti pa e-pastu # Status -NotRead=Nav lasāms Read=Lasīt Assigned=Piešķirts InProgress=Procesā @@ -126,6 +123,7 @@ 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 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Statuss mainīts: %s līdz %s TicketNotNotifyTiersAtCreate=Neinformēt uzņēmumu par radīšanu Unread=Nelasīts TicketNotCreatedFromPublicInterface=Nav pieejams. Biļete netika izveidota no publiskās saskarnes. -PublicInterfaceNotEnabled=Publiskā saskarne nebija iespējota ErrorTicketRefRequired=Nepieciešams biļetes atsauces nosaukums # diff --git a/htdocs/langs/lv_LV/website.lang b/htdocs/langs/lv_LV/website.lang index 45c5b91487f..42971c9e293 100644 --- a/htdocs/langs/lv_LV/website.lang +++ b/htdocs/langs/lv_LV/website.lang @@ -30,7 +30,6 @@ EditInLine=Rediģēt inline AddWebsite=Pievienot vietni Webpage=Web lapa / konteiners AddPage=Pievienot lapu / konteineru -HomePage=Mājas lapa PageContainer=Lappuse PreviewOfSiteNotYetAvailable=Jūsu vietnes <strong> %s </strong>priekšskatījums vēl nav pieejams. Vispirms jums ir <strong> Jāimportē pilnu vietnes veidni</strong> vai vienkārši <strong>Pievienot lapu/konteineru</strong>". RequestedPageHasNoContentYet=Pieprasītā lapa ar id %s vēl nav ievietota, vai kešatmiņas fails .tpl.php tika noņemts. Rediģējiet lapas saturu, lai to atrisinātu. @@ -101,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=Iekļaut dinamisko saturu +ShowSubcontainers=Show dynamic content InternalURLOfPage=Lapas iekšējais URL ThisPageIsTranslationOf=Šī lapa / konteiners ir tulkojums ThisPageHasTranslationPages=Šajā lapā / konteinerā ir tulkojums @@ -137,3 +136,4 @@ RSSFeedDesc=Izmantojot šo URL, varat iegūt RSS plūsmu no jaunākajiem rakstie 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. diff --git a/htdocs/langs/lv_LV/withdrawals.lang b/htdocs/langs/lv_LV/withdrawals.lang index b041cca3eff..f547e315cce 100644 --- a/htdocs/langs/lv_LV/withdrawals.lang +++ b/htdocs/langs/lv_LV/withdrawals.lang @@ -42,6 +42,7 @@ LastWithdrawalReceipt=Jaunākie %s tiešā debeta ieņēmumi MakeWithdrawRequest=Izveidojiet tiešā debeta maksājumu pieprasījumu MakeBankTransferOrder=Veiciet kredīta pārveduma pieprasījumu WithdrawRequestsDone=%s reģistrēti tiešā debeta maksājumu pieprasījumi +BankTransferRequestsDone=%s credit transfer requests recorded ThirdPartyBankCode=Trešās puses bankas kods NoInvoiceCouldBeWithdrawed=Netika veiksmīgi norakstīts rēķins. Pārbaudiet, vai rēķini ir norādīti uzĦēmumiem ar derīgu IBAN un IBAN ir UMR (unikālas pilnvaras atsauce) ar režīmu <strong> %s </strong>. ClassCredited=Klasificēt kreditēts @@ -131,7 +132,8 @@ SEPARCUR=SEPA CUR SEPAFRST=SEPA vispirms ExecutionDate=Izpildes datums CreateForSepa=Izveidojiet tiešā debeta failu -ICS=Kreditora identifikators CI +ICS=Creditor Identifier CI for direct debit +ICSTransfer=Creditor Identifier CI for bank transfer END_TO_END="EndToEndId" SEPA XML tag - katram darījumam piešķirts unikāls ID USTRD="Nestrukturēts" SEPA XML tag ADDDAYS=Pievienojiet dienas izpildes datumam @@ -146,3 +148,5 @@ InfoRejectSubject=Tiešais debeta maksājuma uzdevums ir noraidīts InfoRejectMessage=Labdien, <br> <br> banka noraidījusi rēķina %s tiešā debeta maksājuma uzdevumu saistībā ar uzņēmumu %s ar summu %s. <br> <br> - <br> %s ModeWarning=Iespēja reālā režīmā nav noteikts, mēs pārtraucam pēc šīs simulācijas ErrorCompanyHasDuplicateDefaultBAN=Uzņēmumam ar ID %s ir vairāk nekā viens noklusējuma bankas konts. Nevar uzzināt, kuru izmantot. +ErrorICSmissing=Missing ICS in Bank account %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/lv_LV/workflow.lang b/htdocs/langs/lv_LV/workflow.lang index 2e7aff69db9..460cdffc0d3 100644 --- a/htdocs/langs/lv_LV/workflow.lang +++ b/htdocs/langs/lv_LV/workflow.lang @@ -16,8 +16,10 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Klasificējiet saistīto avota pār # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Saistīto avotu pārdevēju priekšlikuma klasifikācija tiek apmaksāta, kad tiek apstiprināts piegādātāja rēķins (un ja rēķina summa ir tāda pati kā saistītā piedāvājuma kopējā summa) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Klasificēt saistīto avotu pirkuma pasūtījumu, par kuru jāmaksā, kad tiek apstiprināts piegādātāja rēķins (un ja rēķina summa ir tāda pati kā saistītā pasūtījuma summa) -descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +descWORKFLOW_BILL_ON_RECEPTION=Klasificējiet pieņemjumus uz “rēķinu”, kad ir apstiprināts saistītā piegādātāja pasūtījums # Autoclose intervention -descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Kad biļete ir slēgta, aizveriet visas ar biļeti saistītās darbības AutomaticCreation=Automātiska veidošana AutomaticClassification=Automātiskā klasifikācija +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/mk_MK/accountancy.lang b/htdocs/langs/mk_MK/accountancy.lang index 01016a2fb76..9940d0fea92 100644 --- a/htdocs/langs/mk_MK/accountancy.lang +++ b/htdocs/langs/mk_MK/accountancy.lang @@ -16,6 +16,8 @@ ThisService=Оваа услуга ThisProduct=Овој производ DefaultForService=Стандардно за услугата DefaultForProduct=Стандардно за производот +ProductForThisThirdparty=Product for this thirdparty +ServiceForThisThirdparty=Service for this thirdparty CantSuggest=Без предлози AccountancySetupDoneFromAccountancyMenu=Повеќето поставување на сметководството е направено од менито %s ConfigAccountingExpert=Configuration of the module accounting (double entry) @@ -48,6 +50,7 @@ CountriesExceptMe=Сите земји освен %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=Главна сметководствена сметка за клиенти што не се дефинирани во сетапот MainAccountForSuppliersNotDefined=Главна сметководствена сметка за трговците кои не се дефинирани во сетапот @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Date Docref=Reference LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/mk_MK/admin.lang b/htdocs/langs/mk_MK/admin.lang index 04f993c0811..b6770cce1bb 100644 --- a/htdocs/langs/mk_MK/admin.lang +++ b/htdocs/langs/mk_MK/admin.lang @@ -56,6 +56,8 @@ 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. @@ -85,7 +87,6 @@ ShowPreview=Show preview ShowHideDetails=Show-Hide details PreviewNotAvailable=Preview not available ThemeCurrentlyActive=Theme currently active -CurrentTimeZone=TimeZone PHP (server) MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Dates are stored and returned by database server as if they were kept as submitted string. The timezone has effect only when using the UNIX_TIMESTAMP function (that should not be used by Dolibarr, so database TZ should have no effect, even if changed after data was entered). Space=Space @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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. @@ -256,6 +257,7 @@ 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. @@ -375,7 +377,7 @@ 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:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +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 @@ -406,7 +408,7 @@ UrlGenerationParameters=Parameters to secure URLs SecurityTokenIsUnique=Use a unique securekey parameter for each URL EnterRefToBuildUrl=Enter reference for object %s GetSecuredUrl=Get calculated URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +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 @@ -668,7 +670,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 @@ -1306,7 +1308,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,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 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=New menu MenuHandler=Menu handler MenuModule=Source module -HideUnauthorizedMenu= Hide unauthorized menus (gray) +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 @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/mk_MK/banks.lang b/htdocs/langs/mk_MK/banks.lang index 7ed471f3c64..17caf495566 100644 --- a/htdocs/langs/mk_MK/banks.lang +++ b/htdocs/langs/mk_MK/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/mk_MK/blockedlog.lang b/htdocs/langs/mk_MK/blockedlog.lang index 5afae6e9e53..0bba5605d0f 100644 --- a/htdocs/langs/mk_MK/blockedlog.lang +++ b/htdocs/langs/mk_MK/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/mk_MK/boxes.lang b/htdocs/langs/mk_MK/boxes.lang index 98e75053287..36416e0f36c 100644 --- a/htdocs/langs/mk_MK/boxes.lang +++ b/htdocs/langs/mk_MK/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=Најнови %s изменети донации BoxTitleLastModifiedExpenses=Најнови %s изменети извештаи за трошоци BoxTitleLatestModifiedBoms=Latest %s modified BOMs BoxTitleLatestModifiedMos=Latest %s modified Manufacturing Orders +BoxTitleLastOutstandingBillReached=Customers with maximum outstanding exceeded BoxGlobalActivity=Глобална активност (фактури, понуди, нарачки) BoxGoodCustomers=Добри клиенти BoxTitleGoodCustomers=%s Добри клиенти +BoxScheduledJobs=Scheduled jobs +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Неуспешно RSS обновување. Последен успешен датум на обновување: %s LastRefreshDate=Најнов датум на обновување NoRecordedBookmarks=Нема дефинирани обележувачи. @@ -92,8 +95,8 @@ LastXMonthRolling=The latest %s month rolling ChooseBoxToAdd=Додади виџет на контролниот панел BoxAdded=Виџетот е додаден на контролниот панел BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users) -BoxLastManualEntries=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Сметководство +ValidatedProjects=Validated projects diff --git a/htdocs/langs/mk_MK/cashdesk.lang b/htdocs/langs/mk_MK/cashdesk.lang index 498baa82200..3fef645d99d 100644 --- a/htdocs/langs/mk_MK/cashdesk.lang +++ b/htdocs/langs/mk_MK/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +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 @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/mk_MK/categories.lang b/htdocs/langs/mk_MK/categories.lang index 84e5796763e..52327db3510 100644 --- a/htdocs/langs/mk_MK/categories.lang +++ b/htdocs/langs/mk_MK/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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 diff --git a/htdocs/langs/mk_MK/companies.lang b/htdocs/langs/mk_MK/companies.lang index ca5cbff55f1..2d27d1b69a4 100644 --- a/htdocs/langs/mk_MK/companies.lang +++ b/htdocs/langs/mk_MK/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi 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=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Вработените ProspectLevelShort=Potential diff --git a/htdocs/langs/mk_MK/compta.lang b/htdocs/langs/mk_MK/compta.lang index 8f4f058bb87..1afeb6e3727 100644 --- a/htdocs/langs/mk_MK/compta.lang +++ b/htdocs/langs/mk_MK/compta.lang @@ -111,7 +111,7 @@ 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 ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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 diff --git a/htdocs/langs/mk_MK/cron.lang b/htdocs/langs/mk_MK/cron.lang index a4c2e9ca7de..016dca81e7a 100644 --- a/htdocs/langs/mk_MK/cron.lang +++ b/htdocs/langs/mk_MK/cron.lang @@ -6,14 +6,15 @@ 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 -OrToLaunchASpecificJob=Or to check and launch a specific job +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 environement you can use Scheduled task tools 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 @@ -42,10 +43,11 @@ CronModule=Module CronNoJobs=No jobs registered CronPriority=Priority CronLabel=Label -CronNbRun=Nb. launch -CronMaxRun=Max number launch +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 @@ -56,16 +58,16 @@ CronNote=Comment CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Enable +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 exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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 @@ -76,8 +78,14 @@ 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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +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' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/mk_MK/errors.lang b/htdocs/langs/mk_MK/errors.lang index 893f4a35b65..5b26be724d9 100644 --- a/htdocs/langs/mk_MK/errors.lang +++ b/htdocs/langs/mk_MK/errors.lang @@ -5,8 +5,10 @@ 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. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ 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=Ref used for creation already exists. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/mk_MK/exports.lang b/htdocs/langs/mk_MK/exports.lang index 2dcf4317e00..a0eb7161ef2 100644 --- a/htdocs/langs/mk_MK/exports.lang +++ b/htdocs/langs/mk_MK/exports.lang @@ -26,6 +26,8 @@ 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. @@ -131,3 +133,4 @@ 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/mk_MK/mails.lang b/htdocs/langs/mk_MK/mails.lang index 4d668952b76..3d72192f7ce 100644 --- a/htdocs/langs/mk_MK/mails.lang +++ b/htdocs/langs/mk_MK/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Notifications -NoNotificationsWillBeSent=No email notifications are planned for this event and company -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent +NotificationsAuto=Notifications Auto. +NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company +ANotificationsWillBeSent=1 automatic notification will be sent by email +SomeNotificationsWillBeSent=%s automatic notifications will be sent by email +AddNewNotification=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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +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/mk_MK/main.lang b/htdocs/langs/mk_MK/main.lang index 12eb210b51c..5f2722a96ff 100644 --- a/htdocs/langs/mk_MK/main.lang +++ b/htdocs/langs/mk_MK/main.lang @@ -28,7 +28,9 @@ 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 @@ -85,6 +87,8 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C 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 @@ -220,6 +224,7 @@ Value=Value PersonalValue=Personal value NewObject=New %s NewValue=New value +OldValue=Old value %s CurrentValue=Current value Code=Code Type=Type @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Option +Filters=Filters List=List FullList=Full list FullConversation=Full conversation @@ -650,6 +656,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 @@ -671,7 +678,7 @@ SendMail=Send email Email=Email NoEMail=No email AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=No mobile phone Owner=Сопственик FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/mk_MK/modulebuilder.lang b/htdocs/langs/mk_MK/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/mk_MK/modulebuilder.lang +++ b/htdocs/langs/mk_MK/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/mk_MK/mrp.lang b/htdocs/langs/mk_MK/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/mk_MK/mrp.lang +++ b/htdocs/langs/mk_MK/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/mk_MK/other.lang b/htdocs/langs/mk_MK/other.lang index 54c0572d453..7a895bb1ca5 100644 --- a/htdocs/langs/mk_MK/other.lang +++ b/htdocs/langs/mk_MK/other.lang @@ -5,8 +5,6 @@ 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 -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Right CalculatedWeight=Calculated weight CalculatedVolume=Calculated volume Weight=Weight -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/mk_MK/products.lang b/htdocs/langs/mk_MK/products.lang index bf555405861..6deddbe7334 100644 --- a/htdocs/langs/mk_MK/products.lang +++ b/htdocs/langs/mk_MK/products.lang @@ -108,7 +108,8 @@ 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=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +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 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/mk_MK/projects.lang b/htdocs/langs/mk_MK/projects.lang index baf0ecde17f..05aa1f5a560 100644 --- a/htdocs/langs/mk_MK/projects.lang +++ b/htdocs/langs/mk_MK/projects.lang @@ -76,15 +76,16 @@ MyActivities=My tasks/activities MyProjects=My projects MyProjectsArea=My projects Area DurationEffective=Effective duration -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Time +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/mk_MK/recruitment.lang b/htdocs/langs/mk_MK/recruitment.lang index 85e1d55300b..c8838fc60b3 100644 --- a/htdocs/langs/mk_MK/recruitment.lang +++ b/htdocs/langs/mk_MK/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/mk_MK/sendings.lang b/htdocs/langs/mk_MK/sendings.lang index 4f7e1453e7f..e21b52f73f1 100644 --- a/htdocs/langs/mk_MK/sendings.lang +++ b/htdocs/langs/mk_MK/sendings.lang @@ -30,6 +30,7 @@ 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 @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=More complete document model for delivery receipts (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/mk_MK/stocks.lang b/htdocs/langs/mk_MK/stocks.lang index 1de1066fb67..2b36b21b77a 100644 --- a/htdocs/langs/mk_MK/stocks.lang +++ b/htdocs/langs/mk_MK/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/mk_MK/ticket.lang b/htdocs/langs/mk_MK/ticket.lang index 1353f492ef1..8b74414e186 100644 --- a/htdocs/langs/mk_MK/ticket.lang +++ b/htdocs/langs/mk_MK/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Other TicketSeverityShortLOW=Low TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=High -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Read Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/mk_MK/website.lang b/htdocs/langs/mk_MK/website.lang index 03e042e4be6..f17def114b8 100644 --- a/htdocs/langs/mk_MK/website.lang +++ b/htdocs/langs/mk_MK/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/mk_MK/withdrawals.lang b/htdocs/langs/mk_MK/withdrawals.lang index 114a8d9dd6c..059b3451c11 100644 --- a/htdocs/langs/mk_MK/withdrawals.lang +++ b/htdocs/langs/mk_MK/withdrawals.lang @@ -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>. ClassCredited=Classify credited @@ -131,7 +132,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,3 +148,5 @@ 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/mk_MK/workflow.lang b/htdocs/langs/mk_MK/workflow.lang index 299be277e1d..494a0424a75 100644 --- a/htdocs/langs/mk_MK/workflow.lang +++ b/htdocs/langs/mk_MK/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 diff --git a/htdocs/langs/mn_MN/accountancy.lang b/htdocs/langs/mn_MN/accountancy.lang index 3211a0b62df..9e084932477 100644 --- a/htdocs/langs/mn_MN/accountancy.lang +++ b/htdocs/langs/mn_MN/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Date Docref=Reference LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/mn_MN/admin.lang b/htdocs/langs/mn_MN/admin.lang index f1c41a3b62b..f9a6468d94a 100644 --- a/htdocs/langs/mn_MN/admin.lang +++ b/htdocs/langs/mn_MN/admin.lang @@ -56,6 +56,8 @@ 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. @@ -85,7 +87,6 @@ ShowPreview=Show preview ShowHideDetails=Show-Hide details PreviewNotAvailable=Preview not available ThemeCurrentlyActive=Theme currently active -CurrentTimeZone=TimeZone PHP (server) MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Dates are stored and returned by database server as if they were kept as submitted string. The timezone has effect only when using the UNIX_TIMESTAMP function (that should not be used by Dolibarr, so database TZ should have no effect, even if changed after data was entered). Space=Space @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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. @@ -256,6 +257,7 @@ 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. @@ -375,7 +377,7 @@ 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:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +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 @@ -406,7 +408,7 @@ UrlGenerationParameters=Parameters to secure URLs SecurityTokenIsUnique=Use a unique securekey parameter for each URL EnterRefToBuildUrl=Enter reference for object %s GetSecuredUrl=Get calculated URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +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 @@ -668,7 +670,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 @@ -1306,7 +1308,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,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 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=New menu MenuHandler=Menu handler MenuModule=Source module -HideUnauthorizedMenu= Hide unauthorized menus (gray) +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 @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/mn_MN/banks.lang b/htdocs/langs/mn_MN/banks.lang index 9500a5b8b2e..81a23238550 100644 --- a/htdocs/langs/mn_MN/banks.lang +++ b/htdocs/langs/mn_MN/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/mn_MN/blockedlog.lang b/htdocs/langs/mn_MN/blockedlog.lang index 5afae6e9e53..0bba5605d0f 100644 --- a/htdocs/langs/mn_MN/blockedlog.lang +++ b/htdocs/langs/mn_MN/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/mn_MN/boxes.lang b/htdocs/langs/mn_MN/boxes.lang index d6fd298a3a7..9a751483fb1 100644 --- a/htdocs/langs/mn_MN/boxes.lang +++ b/htdocs/langs/mn_MN/boxes.lang @@ -46,9 +46,12 @@ 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. @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Accountancy +ValidatedProjects=Validated projects diff --git a/htdocs/langs/mn_MN/cashdesk.lang b/htdocs/langs/mn_MN/cashdesk.lang index 498baa82200..3fef645d99d 100644 --- a/htdocs/langs/mn_MN/cashdesk.lang +++ b/htdocs/langs/mn_MN/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +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 @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/mn_MN/categories.lang b/htdocs/langs/mn_MN/categories.lang index ba37a43b4ec..4ddf0d6093f 100644 --- a/htdocs/langs/mn_MN/categories.lang +++ b/htdocs/langs/mn_MN/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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 diff --git a/htdocs/langs/mn_MN/companies.lang b/htdocs/langs/mn_MN/companies.lang index dadff6a7894..8dc815b522e 100644 --- a/htdocs/langs/mn_MN/companies.lang +++ b/htdocs/langs/mn_MN/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi 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=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=Potential diff --git a/htdocs/langs/mn_MN/compta.lang b/htdocs/langs/mn_MN/compta.lang index 8f4f058bb87..1afeb6e3727 100644 --- a/htdocs/langs/mn_MN/compta.lang +++ b/htdocs/langs/mn_MN/compta.lang @@ -111,7 +111,7 @@ 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 ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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 diff --git a/htdocs/langs/mn_MN/cron.lang b/htdocs/langs/mn_MN/cron.lang index d2da7ded67e..2ebdda1e685 100644 --- a/htdocs/langs/mn_MN/cron.lang +++ b/htdocs/langs/mn_MN/cron.lang @@ -6,14 +6,15 @@ 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 -OrToLaunchASpecificJob=Or to check and launch a specific job +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 environement you can use Scheduled task tools 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 @@ -42,10 +43,11 @@ CronModule=Module CronNoJobs=No jobs registered CronPriority=Priority CronLabel=Label -CronNbRun=Nb. launch -CronMaxRun=Max number launch +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 @@ -56,16 +58,16 @@ CronNote=Comment CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Enable +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 exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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 @@ -76,8 +78,14 @@ 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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +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' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/mn_MN/errors.lang b/htdocs/langs/mn_MN/errors.lang index 893f4a35b65..5b26be724d9 100644 --- a/htdocs/langs/mn_MN/errors.lang +++ b/htdocs/langs/mn_MN/errors.lang @@ -5,8 +5,10 @@ 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. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ 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=Ref used for creation already exists. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/mn_MN/exports.lang b/htdocs/langs/mn_MN/exports.lang index 2dcf4317e00..a0eb7161ef2 100644 --- a/htdocs/langs/mn_MN/exports.lang +++ b/htdocs/langs/mn_MN/exports.lang @@ -26,6 +26,8 @@ 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. @@ -131,3 +133,4 @@ 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/mn_MN/mails.lang b/htdocs/langs/mn_MN/mails.lang index 1235eef3b27..2d02c5ddcf9 100644 --- a/htdocs/langs/mn_MN/mails.lang +++ b/htdocs/langs/mn_MN/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Notifications -NoNotificationsWillBeSent=No email notifications are planned for this event and company -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent +NotificationsAuto=Notifications Auto. +NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company +ANotificationsWillBeSent=1 automatic notification will be sent by email +SomeNotificationsWillBeSent=%s automatic notifications will be sent by email +AddNewNotification=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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +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/mn_MN/main.lang b/htdocs/langs/mn_MN/main.lang index e22785650ad..5cf9981a8a0 100644 --- a/htdocs/langs/mn_MN/main.lang +++ b/htdocs/langs/mn_MN/main.lang @@ -28,7 +28,9 @@ 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 @@ -85,6 +87,8 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C 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 @@ -220,6 +224,7 @@ Value=Value PersonalValue=Personal value NewObject=New %s NewValue=New value +OldValue=Old value %s CurrentValue=Current value Code=Code Type=Type @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Option +Filters=Filters List=List FullList=Full list FullConversation=Full conversation @@ -650,6 +656,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 @@ -671,7 +678,7 @@ SendMail=Send email Email=Email NoEMail=No email AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=No mobile phone Owner=Owner FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/mn_MN/modulebuilder.lang b/htdocs/langs/mn_MN/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/mn_MN/modulebuilder.lang +++ b/htdocs/langs/mn_MN/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/mn_MN/mrp.lang b/htdocs/langs/mn_MN/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/mn_MN/mrp.lang +++ b/htdocs/langs/mn_MN/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/mn_MN/other.lang b/htdocs/langs/mn_MN/other.lang index 54c0572d453..7a895bb1ca5 100644 --- a/htdocs/langs/mn_MN/other.lang +++ b/htdocs/langs/mn_MN/other.lang @@ -5,8 +5,6 @@ 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 -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Right CalculatedWeight=Calculated weight CalculatedVolume=Calculated volume Weight=Weight -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/mn_MN/products.lang b/htdocs/langs/mn_MN/products.lang index 97db059594f..9ecc11ed93d 100644 --- a/htdocs/langs/mn_MN/products.lang +++ b/htdocs/langs/mn_MN/products.lang @@ -108,7 +108,8 @@ 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=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +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 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/mn_MN/projects.lang b/htdocs/langs/mn_MN/projects.lang index baf0ecde17f..05aa1f5a560 100644 --- a/htdocs/langs/mn_MN/projects.lang +++ b/htdocs/langs/mn_MN/projects.lang @@ -76,15 +76,16 @@ MyActivities=My tasks/activities MyProjects=My projects MyProjectsArea=My projects Area DurationEffective=Effective duration -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Time +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/mn_MN/recruitment.lang b/htdocs/langs/mn_MN/recruitment.lang index b775e78552e..437445f25dc 100644 --- a/htdocs/langs/mn_MN/recruitment.lang +++ b/htdocs/langs/mn_MN/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/mn_MN/sendings.lang b/htdocs/langs/mn_MN/sendings.lang index 5ce3b7f67e9..73bd9aebd42 100644 --- a/htdocs/langs/mn_MN/sendings.lang +++ b/htdocs/langs/mn_MN/sendings.lang @@ -30,6 +30,7 @@ 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 @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=More complete document model for delivery receipts (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/mn_MN/stocks.lang b/htdocs/langs/mn_MN/stocks.lang index 660443bcded..a1f55010139 100644 --- a/htdocs/langs/mn_MN/stocks.lang +++ b/htdocs/langs/mn_MN/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/mn_MN/ticket.lang b/htdocs/langs/mn_MN/ticket.lang index 59519282c80..982fff90ffa 100644 --- a/htdocs/langs/mn_MN/ticket.lang +++ b/htdocs/langs/mn_MN/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Other TicketSeverityShortLOW=Low TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=High -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Read Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/mn_MN/website.lang b/htdocs/langs/mn_MN/website.lang index 03e042e4be6..f17def114b8 100644 --- a/htdocs/langs/mn_MN/website.lang +++ b/htdocs/langs/mn_MN/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/mn_MN/withdrawals.lang b/htdocs/langs/mn_MN/withdrawals.lang index 114a8d9dd6c..059b3451c11 100644 --- a/htdocs/langs/mn_MN/withdrawals.lang +++ b/htdocs/langs/mn_MN/withdrawals.lang @@ -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>. ClassCredited=Classify credited @@ -131,7 +132,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,3 +148,5 @@ 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/mn_MN/workflow.lang b/htdocs/langs/mn_MN/workflow.lang index 299be277e1d..494a0424a75 100644 --- a/htdocs/langs/mn_MN/workflow.lang +++ b/htdocs/langs/mn_MN/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 diff --git a/htdocs/langs/nb_NO/accountancy.lang b/htdocs/langs/nb_NO/accountancy.lang index cdf26c85c07..bc97267e787 100644 --- a/htdocs/langs/nb_NO/accountancy.lang +++ b/htdocs/langs/nb_NO/accountancy.lang @@ -16,6 +16,8 @@ ThisService=Denne tjenesten ThisProduct=Denne varen DefaultForService=Standard for tjeneste DefaultForProduct=Standard for vare +ProductForThisThirdparty=Vare for denne tredjeparten +ServiceForThisThirdparty=Tjeneste for denne tredjeparten CantSuggest=Kan ikke foreslå AccountancySetupDoneFromAccountancyMenu=Mesteparten av regnskapet settes opp fra menyen %s ConfigAccountingExpert=Konfigurasjon av modulen regnskap (dobbel oppføring) @@ -25,7 +27,7 @@ JournalFinancial=Finasielle journaler BackToChartofaccounts=Returner kontotabell Chartofaccounts=Diagram over kontoer ChartOfSubaccounts=Oversikt over individuelle kontoer -ChartOfIndividualAccountsOfSubsidiaryLedger=Chart of individual accounts of the subsidiary ledger +ChartOfIndividualAccountsOfSubsidiaryLedger=Diagram over individuelle kontoer til sub-hovedboken CurrentDedicatedAccountingAccount=Nåværende dedikert konto AssignDedicatedAccountingAccount=Ny konto å tildele InvoiceLabel=Fakturaetikett @@ -46,8 +48,9 @@ CountriesNotInEEC=Land ikke i EEC CountriesInEECExceptMe=Land i EEC unntatt %s CountriesExceptMe=Alle land unntatt %s AccountantFiles=Eksporter kildedokumenter -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 +ExportAccountingSourceDocHelp=Med dette verktøyet kan du eksportere kildehendelsene (liste og PDF-filer) som ble brukt til å generere regnskapet. For å eksportere journalene, bruk menyoppføringen %s - %s. +VueByAccountAccounting=Vis etter regnskapskonto +VueBySubAccountAccounting=Vis etter regnskaps-subkonto MainAccountForCustomersNotDefined=Hoved regnskapskonto for kunder som ikke er definert i oppsettet MainAccountForSuppliersNotDefined=Hovedregnskapskonto for leverandører som ikke er definert i oppsettet @@ -93,8 +96,8 @@ SubledgerAccount=Konto i sub-hovedbok SubledgerAccountLabel=Kontoetikett i sub-hovedbok ShowAccountingAccount=Vis regnskapskonto ShowAccountingJournal=Vis regnskapsjournal -ShowAccountingAccountInLedger=Show accounting account in ledger -ShowAccountingAccountInJournals=Show accounting account in journals +ShowAccountingAccountInLedger=Vis regnskapskonto i hovedbok +ShowAccountingAccountInJournals=Vis regnskapskonto i journaler AccountAccountingSuggest=Foreslått regnskapskonto MenuDefaultAccounts=Standard kontoer MenuBankAccounts=Bankkonti @@ -118,7 +121,7 @@ UpdateMvts=Endre en transaksjon ValidTransaction=Valider transaksjonen WriteBookKeeping=Registrer transaksjoner i regnskap Bookkeeping=Hovedbok -BookkeepingSubAccount=Subledger +BookkeepingSubAccount=Sub-Hovedbok AccountBalance=Kontobalanse ObjectsRef=Kildeobjekt ref CAHTF=Samlet leverandørkjøp før skatt @@ -144,7 +147,7 @@ NotVentilatedinAccount=Ikke bundet til regnskapskontoen XLineSuccessfullyBinded=%s varer/tjenester bundet til en regnskapskonto XLineFailedToBeBinded=%s varer/tjenester ble ikke bundet til en regnskapskonto -ACCOUNTING_LIMIT_LIST_VENTILATION=Antall elementer å binde vist pr. side (maksimum anbefalt er 50) +ACCOUNTING_LIMIT_LIST_VENTILATION=Maksimalt antall linjer på listen og bindingsiden (anbefalt: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Begynn sortering av siden "Bindinger å utføre" etter de nyeste først ACCOUNTING_LIST_SORT_VENTILATION_DONE=Begynn sortering av siden "Bindinger utført" etter de nyeste først @@ -156,8 +159,8 @@ ACCOUNTING_MANAGE_ZERO=Tillat å administrere forskjellig antall nuller på slut BANK_DISABLE_DIRECT_INPUT=Deaktiver direkteregistrering av transaksjoner på bankkonto ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Aktiver eksportutkast i journal ACCOUNTANCY_COMBO_FOR_AUX=Aktiver kombinasjonsliste for datterkonto (kan være treg hvis du har mange tredjeparter) -ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. -ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER=On accountancy transfer, select period show by default +ACCOUNTING_DATE_START_BINDING=Definer en dato for å starte binding og overføring i regnskap. Etter denne datoen vil ikke transaksjonene bli overført til regnskap. +ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER=Velg regnskapsvisning som standard ved overføring av regnskap ACCOUNTING_SELL_JOURNAL=Salgsjournal ACCOUNTING_PURCHASE_JOURNAL=Innkjøpsjournal @@ -177,7 +180,7 @@ ACCOUNTING_ACCOUNT_SUSPENSE=Regnskapskonto for vent DONATION_ACCOUNTINGACCOUNT=Regnskapskonto for registrering av donasjoner ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Regnskapskonto for å registrere abonnementer -ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT=Accounting account by default to register customer deposit +ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT=Regnskapskonto som standard for å registrere kundeinnskudd ACCOUNTING_PRODUCT_BUY_ACCOUNT=Regnskapskonto som standard for de kjøpte varene (brukt hvis ikke definert i produktarket) ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=Regnskapskonto som standard for kjøpte produkter i EU (brukt hvis ikke definert i produktarket) @@ -198,7 +201,8 @@ Docdate=Dato Docref=Referanse LabelAccount=Kontoetikett LabelOperation=Etikettoperasjon -Sens=som betyr +Sens=Retning +AccountingDirectionHelp=For en regnskapskonto til en kunde, bruk Kreditt for å registrere en betaling du mottok <br> For en regnskapskonto for en leverandør, bruk Debet for å registrere en betaling du foretar LetteringCode=Korrespondansekode Lettering=Korrespondanse Codejournal=Journal @@ -206,23 +210,24 @@ JournalLabel=Journaletikett NumPiece=Del nummer TransactionNumShort=Transaksjonsnummer AccountingCategory=Personlige grupper -GroupByAccountAccounting=Grupper etter regnskapskonto +GroupByAccountAccounting=Gruppere etter hovedbokskonto +GroupBySubAccountAccounting=Gruppere etter sub-hovedbokskonto AccountingAccountGroupsDesc=Her kan du definere noen grupper regnskapskonti. De vil bli brukt til personlige regnskapsrapporter. ByAccounts=Etter kontoer ByPredefinedAccountGroups=Etter forhåndsdefinerte grupper ByPersonalizedAccountGroups=Etter personlige grupper ByYear=Etter år NotMatch=Ikke valgt -DeleteMvt=Delete some operation lines from accounting +DeleteMvt=Slett noen operasjonslinjer fra regnskapet DelMonth=Måned å slette DelYear=År som skal slettes DelJournal=Journal som skal slettes -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=Dette vil slette alle operasjonslinjene i regnskapet for året/måneden og/eller for en bestemt journal (minst ett kriterium kreves). Du må bruke funksjonen '%s' for å hente den slettede posten tilbake til hovedboken. +ConfirmDeleteMvtPartial=Dette vil slette transaksjonen fra regnskapet (alle operasjonslinjer relatert til den samme transaksjonen vil bli slettet) FinanceJournal=Finansjournal ExpenseReportsJournal=Journal for utgiftsrapporter DescFinanceJournal=Finansjournal med alle typer betalinger etter bankkonto -DescJournalOnlyBindedVisible=This is a view of record that are bound to an accounting account and can be recorded into the Journals and Ledger. +DescJournalOnlyBindedVisible=Dette er en oversikt over poster som er bundet til en regnskapskonto og kan registreres i journaler og hovedbok. VATAccountNotDefined=MVA-konto er ikke definert ThirdpartyAccountNotDefined=Konto for tredjepart er ikke definert ProductAccountNotDefined=Konto for vare er ikke definert @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Betaling ikke knyttet til noen vare/tjeneste OpeningBalance=Inngående balanse ShowOpeningBalance=Vis åpningsbalanse HideOpeningBalance=Skjul åpningsbalansen -ShowSubtotalByGroup=Vis subtotal etter gruppe +ShowSubtotalByGroup=Vis subtotal etter nivå Pcgtype=Kontogruppe PcgtypeDesc=Kontogruppe brukes som forhåndsdefinerte 'filter' og 'gruppering' kriterier for noen regnskapsrapporter. For eksempel blir 'INNTEKT' eller 'UTGIFT' brukt som grupper for regnskapsføring av varer for å lage utgifts-/inntektsrapporten. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Liste over utgiftsrapport-linjer bundet (eller ikke) til DescVentilExpenseReportMore=Hvis du setter opp regnskapskonto med type utgiftsrapport-linjer, vil programmet være i stand til å gjøre alle bindinger mellom utgiftsrapport-linjer og regnskapskontoer med et klikk på knappen <strong>"%s"</strong>. Hvis du fortsatt har noen linjer som ikke er bundet til en konto, må du foreta en manuell binding fra menyen "<strong>%s</strong>". DescVentilDoneExpenseReport=Liste over utgiftsrapport-linjer og tilhørende gebyr-regnskapskonto +Closure=Årsavslutning DescClosure=Kontroller antall bevegelser per måned som ikke er validert og regnskapsår som allerede er åpne OverviewOfMovementsNotValidated=Trinn 1 / Oversikt over bevegelser som ikke er validert. (Nødvendig for å avslutte et regnskapsår) +AllMovementsWereRecordedAsValidated=Alle bevegelser ble registrert som validert +NotAllMovementsCouldBeRecordedAsValidated=Ikke alle bevegelser kunne registreres som validert ValidateMovements=Valider bevegelser DescValidateMovements=Enhver modifisering eller fjerning av skriving, bokstaver og sletting vil være forbudt. Alle påmeldinger for en oppgave må valideres, ellers er det ikke mulig å lukke -SelectMonthAndValidate=Velg måned og valider bevegelser ValidateHistory=Bind automatisk AutomaticBindingDone=Automatisk binding utført @@ -293,9 +300,10 @@ Accounted=Regnskapsført i hovedbok NotYetAccounted=Ikke regnskapsført i hovedboken enda ShowTutorial=Vis veiledning NotReconciled=Ikke sammenslått +WarningRecordWithoutSubledgerAreExcluded=Advarsel, alle operasjoner uten definert sub-hovedbokskonto er filtrert og ekskludert fra denne visningen ## Admin -BindingOptions=Binding options +BindingOptions=Bindingsalternativer ApplyMassCategories=Masseinnlegging av kategorier AddAccountFromBookKeepingWithNoCategories=Tilgjengelig konto er ennå ikke i en personlig gruppe CategoryDeleted=Kategori for regnskapskontoen er blitt slettet @@ -315,9 +323,9 @@ ErrorAccountingJournalIsAlreadyUse=Denne journalen er allerede i bruk AccountingAccountForSalesTaxAreDefinedInto=Merk: Regnskapskonto for MVA er definert i menyen <b>%s</b> - <b>%s </b> NumberOfAccountancyEntries=Antall oppføringer NumberOfAccountancyMovements=Antall bevegelser -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=Deaktiver binding og overføring til regnskap ved salg (kundefakturaer blir ikke tatt med i regnskapet) +ACCOUNTING_DISABLE_BINDING_ON_PURCHASES=Deaktiver binding og overføring til regnskap ved kjøp (leverandørfakturaer blir ikke tatt med i regnskapet) +ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS=Deaktiver binding og overføring til regnskap på utgiftsrapporter (utgiftsrapporter blir ikke tatt med i regnskapet) ## Export ExportDraftJournal=Eksporter utkastjournal @@ -337,9 +345,10 @@ Modelcsv_LDCompta10=Eksporter for LD Compta (v10 og høyere) Modelcsv_openconcerto=Eksport for OpenConcerto (Test) Modelcsv_configurable=Eksport CSV Konfigurerbar Modelcsv_FEC=Eksporter FEC +Modelcsv_FEC2=Eksporter FEC (med datogenerering/dokument omvendt) Modelcsv_Sage50_Swiss=Eksport for Sage 50 Switzerland Modelcsv_winfic=Eksporter Winfic - eWinfic - WinSis Compta -Modelcsv_Gestinumv3=Export for Gestinum (v3) +Modelcsv_Gestinumv3=Eksport for Gestinum (v3) Modelcsv_Gestinumv5Export for Gestinum (v5) ChartofaccountsId=Kontoplan ID diff --git a/htdocs/langs/nb_NO/admin.lang b/htdocs/langs/nb_NO/admin.lang index 9f6a787ed34..a839e55d031 100644 --- a/htdocs/langs/nb_NO/admin.lang +++ b/htdocs/langs/nb_NO/admin.lang @@ -37,8 +37,8 @@ UnlockNewSessions=Fjern forbindelseslås YourSession=Din økt Sessions=Brukers økter WebUserGroup=Webserver bruker/gruppe -PermissionsOnFilesInWebRoot=Permissions on files in web root directory -PermissionsOnFile=Permissions on file %s +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). DBStoringCharset=Databasetegnsett for lagring av data DBSortingCharset=Databasetegnsett for sortering av data @@ -56,6 +56,8 @@ GUISetup=Visning SetupArea=Oppsett UploadNewTemplate=Last opp ny mal(er) FormToTestFileUploadForm=Skjema for å teste opplasting (i henhold til oppsett) +ModuleMustBeEnabled=Modulen/applikasjonen <b> %s </b> må være aktivert +ModuleIsEnabled=Modulen/applikasjonen <b> %s </b> er aktivert 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. @@ -73,7 +75,7 @@ DisableJavascriptNote=Merk: For test eller feilsøking. For optimalisering for b UseSearchToSelectCompanyTooltip=Hvis du har et stort antall tredjeparter (> 100 000), kan du øke hastigheten ved å sette konstant COMPANY_DONOTSEARCH_ANYWHERE til 1 i Oppsett-> Annet. Søket vil da være begrenset til starten av strengen. UseSearchToSelectContactTooltip=Hvis du har et stort antall tredjeparter (> 100 000), kan du øke hastigheten ved å sette konstant CONTACT_DONOTSEARCH_ANYWHERE til 1 i Oppsett-> Annet. Søket vil da være begrenset til starten av strengen. DelaiedFullListToSelectCompany=Vent med å trykke på en tast før innholdet av tredjepart-kombinasjonslisten er lastet.<br>Dette kan øke ytelsen hvis du har mange tredjeparter -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=Vent til en tast er trykket før innholdet i kontaktlisten lastes. <br> Dette kan øke ytelsen hvis du har et stort antall kontakter, men det er mindre praktisk. NumberOfKeyToSearch=Antall tegn for å starte søk: %s NumberOfBytes=Antall bytes SearchString=Søkestreng @@ -82,10 +84,9 @@ AllowToSelectProjectFromOtherCompany=På elementer av en tredjepart, kan du velg JavascriptDisabled=JavaScript er deaktivert UsePreviewTabs=Bruk faner for forhåndsvisning ShowPreview=Forhåndsvisning -ShowHideDetails=Show-Hide details +ShowHideDetails=Vis-skjul detaljer PreviewNotAvailable=Forhåndsvisning ikke tilgjengelig ThemeCurrentlyActive=Gjeldende tema -CurrentTimeZone=Tidssone for PHP (server) MySQLTimeZone=Tidssone MySql (database) TZHasNoEffect=Datoer lagres og returneres av databaseserver som innsendt streng. Tidssonen har kun effekt ved bruk av UNIX_TIMESTAMP funksjon (som ikke bør brukes av Dolibarr, slik database TZ ikke skal ha noen effekt, selv om den ble endret etter at data ble lagt inn). Space=Mellomrom @@ -153,8 +154,8 @@ 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 midlertidige filer (ingen risiko for å miste data). Merk: Slettingen gjøres bare hvis temp-katalogen ble opprettet for over 24 timer siden. -PurgeDeleteTemporaryFilesShort=Slett temporære filer +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. +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 PurgeNothingToDelete=Ingen mapper eller filer å slette. @@ -222,7 +223,7 @@ Nouveauté=Nyhet AchatTelechargement=Kjøp/Last ned GoModuleSetupArea=For å distribuere/installere en ny modul, gå til området for Moduloppsett på <a href="%s">%s</a>. DoliStoreDesc=DoliStore, den offisielle markedsplassen for eksterne moduler til 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=Liste over selskaper som tilbyr spesialutviklede moduler eller funksjoner. <br> Merk: Siden Dolibarr er et program med åpen kildekode, bør <i> alle </i> med erfaring i PHP-programmering kunne utvikle en modul. WebSiteDesc=Eksterne nettsteder for flere tilleggs- (ikke-kjerne) moduler ... DevelopYourModuleDesc=Noen løsninger for å utvikle din egen modul... URL=URL @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Foretrukne Partnere OtherResources=Andre ressurser ExternalResources=Eksterne ressurser SocialNetworks=Sosiale nettverk +SocialNetworkId=Sosialt nettverk ID ForDocumentationSeeWiki=For bruker- eller utviklerdokumentasjon (Doc, FAQs ...), <br> ta en titt på Dolibarr Wiki: <br> <a href="%s" target="_blank"><b>%s</b></a> ForAnswersSeeForum=For andre spørsmål/hjelp, kan du bruke Dolibarr forumet: <br> <a href="%s" target="_blank"><b>%s</b></a> HelpCenterDesc1=Her er noen ressurser for å få hjelp og støtte med Dolibarr. @@ -292,7 +294,7 @@ MAIN_MAIL_SMTPS_ID=SMTP-ID (hvis sending av server krever godkjenning) MAIN_MAIL_SMTPS_PW=SMTP-passord (hvis sending av server krever godkjenning) MAIN_MAIL_EMAIL_TLS=Bruk TLS (SSL) kryptering MAIN_MAIL_EMAIL_STARTTLS=Bruk TLS (STARTTL) kryptering -MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED=Authorise les certificats auto-signés +MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED=Autoriser selvsignerte sertifikater MAIN_MAIL_EMAIL_DKIM_ENABLED=Bruk DKIM til å generere epostsignatur MAIN_MAIL_EMAIL_DKIM_DOMAIN=Email Domain for bruk med DKIM MAIN_MAIL_EMAIL_DKIM_SELECTOR=Navn på DKIM-velger @@ -304,9 +306,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Standard avsender-epost for manuell sending (Bruker-e UserEmail=Bruker-epost CompanyEmail=Firma epost FeatureNotAvailableOnLinux=Funksjonen er ikke tilgjengelig på Unix/Linux. Test sendmail lokalt. -FixOnTransifex=Fix the translation on the online translation platform of project +FixOnTransifex=Rett oversettelsen på prosjektets online oversettelsesplattform SubmitTranslation=Hvis oversettelsen for dette språket ikke er fullført, eller du finner feil, kan du rette opp dette ved å redigere filer i katalogen <b>langs/%s</b> og sende inn endringen til 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=Hvis oversettelsen for dette språket ikke er komplett eller du finner feil, kan du rette dette ved å redigere filer i katalogen <b> langs/%s </b> og sende endrede filer til dolibarr.org/forum, eller, hvis du er en utvikler, med en PR på github .com / Dolibarr / dolibarr ModuleSetup=Modulinnstillinger ModulesSetup=Moduler/Applikasjonsoppsett ModuleFamilyBase=System @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Eksempler med gjeldende konfigurasjon ListOfDirectories=Liste over OpenDocument-mapper med maler ListOfDirectoriesForModelGenODT=Liste over kataloger som inneholder mal-filer med Opendocument format.<br><br>Sett inn hele banen til kataloger her.<br>Legg til et linjeskift mellom hver katalog.<br>For å legge til en katalog av GED modulen, legg til <b>DOL_DATA_ROOT/ECM/dittkatalognavn her</b>. <br><br>Filer i disse katalogene må slutte med <b>.odt</b> eller <b>.ods</b>. NumberOfModelFilesFound=Antall ODT/ODS-malfiler som finnes i disse katalogene -ExampleOfDirectoriesForModelGen=Eksempler på syntaks:<br>c:\\mydir<br>/Home/mydir<br>DOL_DATA_ROOT/ECM/ecmdir +ExampleOfDirectoriesForModelGen=Eksempler på syntaks: <br> c:\\myapp\\mydocumentdir\\mysubdir <br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br>For å lære hvordan du oppretter ODT dokumentmaler, og før du lagrer dem, les wiki-dokumentasjon: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Plassering av fornavn/etternavn @@ -406,7 +408,7 @@ UrlGenerationParameters=Parametre for å sikre nettadresser SecurityTokenIsUnique=Bruk en unik securekey parameter for hver webadresse EnterRefToBuildUrl=Oppgi referanse for objekt %s GetSecuredUrl=Få beregnet URL -ButtonHideUnauthorized=Skjul knapper for brukere uten administratorrettigheter i stedet for å vise dem som grå +ButtonHideUnauthorized=Skjul uautoriserte handlingsknapper også for interne brukere (bare gråaktig ellers) OldVATRates=Gammel MVA-sats NewVATRates=Ny MVA-sats PriceBaseTypeToChange=Endre på prisene med base referanseverdi definert på @@ -435,14 +437,14 @@ ExtrafieldCheckBox=Sjekkbokser ExtrafieldCheckBoxFromList=Avkrysningsbokser fra tabell ExtrafieldLink=Lenke til et objekt ComputedFormula=Beregnet felt -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' +ComputedFormulaDesc=Du kan legge inn en formel her ved hjelp av andre egenskaper for objekt eller hvilken som helst PHP-koding for å få en dynamisk beregnet verdi. Du kan bruke alle PHP-kompatible formler, inkludert "?" tilstandsoperatør, og følgende globale objekt: <strong> $db, $conf, $langs, $mysoc, $user, $object </strong>. <br> <strong> ADVARSEL </strong>: Bare noen egenskaper for $-objekt kan være tilgjengelige. Hvis du trenger egenskaper som ikke er lastet, er det bare å hente objektet i formelen som i det andre eksemplet. <br> Ved å bruke et beregnet felt betyr det at du ikke kan skrive inn noen verdi fra grensesnittet. Og, hvis det er en syntaksfeil, kan det hende formelen ikke returnerer noe. <br> <br> Eksempel på formel: <br> $object-> id < 10 ? round($object->id / 2, 2): ($object-> id + 2 * $user-> id) * (int) substr($mysoc-> zip, 1, 2 ) <br> <br> Eksempel på å laste inn objekt <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> Et annet eksempel på formel for å tvinge objektets belastning og dets overordnede objekt: <br>(($reloadedobj = new Task($db)) && ($reloadedobj->fetchNoCompute($object->id) > 0) && ($secondloadedobj = new Project($db)) && ($secondloadedobj->fetchNoCompute($reloadedobj->fk_project) > 0)) ? $secondloadedobj->ref: 'Overordnet prosjekt ikke funnet' Computedpersistent=Lagre beregnede felt ComputedpersistentDesc=Beregnede ekstrafelt vil bli lagret i databasen, men verdien blir bare omregnet når objektet til dette feltet endres. Hvis det beregnede feltet avhenger av andre objekter eller globale data, kan denne verdien være feil! ExtrafieldParamHelpPassword=Hvis dette feltet er tomt, vil denne verdien bli lagret uten kryptering (feltet må bare skjules med stjerne på skjermen). <br> Angi 'auto' for å bruke standard krypteringsregel for å lagre passordet i databasen (da vil verdiavlesning være bare hash, uten noen måte å hente opprinnelig verdi på) 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=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 +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 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) @@ -482,13 +484,13 @@ ModuleCompanyCodeCustomerDigitaria=%s etterfulgt av det avkortede kundenavnet me ModuleCompanyCodeSupplierDigitaria=%s etterfulgt av det avkortede leverandørnavnet med antall tegn: %s for leverandørens regnskapskode. Use3StepsApproval=Som standard må innkjøpsordrer opprettes og godkjennes av 2 forskjellige brukere (ett trinn/bruker for å opprette og ett trinn/bruker for å godkjenne. Merk at hvis brukeren har både tillatelse til å opprette og godkjenne, vil ett trinn/ bruker vil være nok). Du kan bruke dette alternativet for å innføre et tredje trinn/bruker godkjenning, hvis beløpet er høyere enn en spesifisert verdi (så vil 3 trinn være nødvendig: 1=validering, 2=første godkjenning og 3=andre godkjenning dersom beløpet er høyt nok). <br> Sett denne tom en godkjenning (2 trinn) er nok, sett den til en svært lav verdi (0,1) hvis det alltid kreves en andre godkjenning (3 trinn). UseDoubleApproval=Bruk 3-trinns godkjennelse når beløpet (eks. MVA) er høyere enn... -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. +WarningPHPMail=ADVARSEL: Oppsettet for å sende e-post fra applikasjonen bruker standard generisk oppsett. Det er ofte bedre å konfigurere utgående epost for å bruke epostserveren til tjenesteleverandøren i stedet for standardoppsettet av flere grunner: +WarningPHPMailA=- Å bruke serveren til epostleverandøren øker påliteligheten til eposten din, slik at den øker leveringsevnen uten å bli markert som spam +WarningPHPMailB=- Noen e-posttjenesteleverandører (som Yahoo) tillater ikke at du sender en e-post fra en annen server enn deres egen server. Det nåværende oppsettet ditt bruker serveren til applikasjonen til å sende e-post og ikke serveren til e-postleverandøren din, så noen mottakere (den som er kompatibel med den begrensende DMARC-protokollen) vil spørre e-postleverandøren din om de kan godta e-posten din og noen e-postleverandører (som Yahoo) kan svare "nei" fordi serveren ikke er deres. Noen av de sendte e-postene dine blir kanskje ikke akseptert for levering (vær også oppmerksom på e-postleverandørens sendekvote). +WarningPHPMailC=- Ved å bruke SMTP-serveren til din egen e-posttjenesteleverandør for å sende e-post vil alle e-postmeldinger som sendes fra applikasjonen bli lagret i "Sendt"-katalogen i postkassen din. +WarningPHPMailD=Hvis metoden 'PHP Mail' virkelig er metoden du vil bruke, kan du fjerne denne advarselen ved å legge til konstanten MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP til 1 i Hjem - Oppsett - Annet. WarningPHPMail2=Hvis din epost-SMTP-leverandør må begrense epostklienten til noen IP-adresser (svært sjelden), er dette IP-adressen til epost-brukeragenten (MUA) for ERP CRM-programmet: <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>. +WarningPHPMailSPF=Hvis domenenavnet i avsenderens epostadresse er beskyttet av en SPF-post (spør deg om domenenavnet registrert), må du legge til følgende IP-er i SPF-posten for DNS for domenet ditt: <strong> %s </strong>. ClickToShowDescription=Klikk for å vise beskrivelse DependsOn=Denne modulen trenger modulen(ene) RequiredBy=Denne modulen er påkrevd av modul(ene) @@ -554,9 +556,9 @@ Module54Desc=Forvaltning av kontrakter (tjenester eller tilbakevendende abonneme Module55Name=Strekkoder Module55Desc=Behandling av strekkoder Module56Name=Betaling med kredittoverføring -Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module56Desc=Håndtering av betaling til leverandører ved Credit Transfer-ordrer. Den inkluderer generering av SEPA-filer for europeiske land. Module57Name=Betalinger med dirketedebet -Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. +Module57Desc=Håndtering av ordrer med direktedebet. Den inkluderer generering av SEPA-filer for europeiske land. Module58Name=ClickToDial Module58Desc=ClickToDial integrasjon Module60Name=Klistremerker @@ -662,13 +664,13 @@ Module50200Desc=Gi kunderne en PayPal-betalingssideside (PayPal-konto eller kred Module50300Name=Stripe Module50300Desc=Tilbyr kunder en Stripe online betalingsside (kreditt/debetkort). Dette kan brukes til å la kundene dine foreta ad-hoc-betalinger eller betalinger knyttet til et bestemt Dolibarr-objekt (faktura, bestilling osv.) Module50400Name=Regnskap (dobbeltoppføring) -Module50400Desc=Accounting management (double entries, support General and Subsidiary Ledgers). Export the ledger in several other accounting software formats. +Module50400Desc=Regnskapsadministrasjon (dobbeltoppføringer, støtter hovedbok - og sub-hovedbøker). Eksporter hovedboken til flere andre regnskapsprogrammer. Module54000Name=PrintIPP Module54000Desc=Direkteutskrift (uten å åpne dokumentet)ved hjelp av CUPS IPP inteface (Skriveren må være synlig for serveren, og CUPS må være installert på serveren) Module55000Name=Meningsmåling, undersøkelse eller avstemming Module55000Desc=Opprett online undersøkelser eller avstemminger (som Doodle, Studs, RDVz etc ...) Module59000Name=Marginer -Module59000Desc=Modul for å administrere marginer +Module59000Desc=Modul for å følge marginer Module60000Name=Provisjoner Module60000Desc=Modul for å administrere provisjoner Module62000Name=Incotermer @@ -703,9 +705,9 @@ Permission61=Vis intervensjoner Permission62=Opprett/endre intervensjoner Permission64=Slett intervensjoner Permission67=Eksporter intervensjoner -Permission68=Send interventions by email +Permission68=Send intervensjoner på e-post Permission69=Valider intervensjoner -Permission70=Invalidate interventions +Permission70=Ugyldiggjør intervensjoner Permission71=Vis medlemmer Permission72=Opprett/endre medlemmer Permission74=Slett medlemmer @@ -728,7 +730,7 @@ Permission95=Les rapporter Permission101=Vis forsendelser Permission102=Opprett/endre forsendelser Permission104=Valider forsendelser -Permission105=Send sendings by email +Permission105=Send forsendelser på e-post Permission106=Eksporter forsendelser Permission109=Slett forsendelser Permission111=Vis kontoutdrag @@ -836,10 +838,10 @@ Permission402=Opprett/endre rabatter Permission403=Valider rabatter Permission404=Slett rabatter Permission430=Bruk Debug Bar -Permission511=Read payments of salaries (yours and subordinates) +Permission511=Les lønnsutbetalinger (dine og underordnedes) Permission512=Opprett/endre betaling av lønn Permission514=Slett utbetalinger av lønn -Permission517=Read payments of salaries of everybody +Permission517=Les alles lønnsutbetalinger Permission519=Eksporter lønn Permission520=Les lån Permission522=Opprett/endre lån @@ -851,19 +853,19 @@ Permission532=Opprett/endre tjenester Permission534=Slett tjenester Permission536=Administrer skjulte tjenester Permission538=Eksporter tjenester -Permission561=Read payment orders by credit transfer -Permission562=Create/modify payment order by credit transfer -Permission563=Send/Transmit payment order by credit transfer -Permission564=Record Debits/Rejections of credit transfer -Permission601=Read stickers -Permission602=Create/modify stickers -Permission609=Delete stickers +Permission561=Les betalingsordrer ved kredittoverføring +Permission562=Opprett/endre betalingsordre ved kredittoverføring +Permission563=Send/overfør betalingsordre ved kredittoverføring +Permission564=Registrer debet/avvisning av kredittoverføring +Permission601=Les klistremerker +Permission602=Opprett/modifiser klistremerker +Permission609=Slett klistremerker Permission650=Les BOM (Bills of Materials) Permission651=Opprett/oppdater BOM Permission652=Slett BOM -Permission660=Read Manufacturing Order (MO) -Permission661=Create/Update Manufacturing Order (MO) -Permission662=Delete Manufacturing Order (MO) +Permission660=Les produksjonsordre (MO) +Permission661=Opprett/endreproduksjonsordre (MO) +Permission662=Slett produksjonsordre (MO) Permission701=Vis donasjoner Permission702=Opprett/endre donasjoner Permission703=Slett donasjoner @@ -873,8 +875,8 @@ Permission773=Slett utgiftsrapport Permission774=Les alle utgiftsrapporter (alle brukere) Permission775=Godkjenn utgiftsrapport Permission776=Betal utgift -Permission777=Read expense reports of everybody -Permission778=Create/modify expense reports of everybody +Permission777=Les utgiftsrapporter fra alle +Permission778=Lag/endre utgiftsrapporter for alle Permission779=Eksporter utgiftsrapporter Permission1001=Vis beholdning Permission1002=Opprett/endre lager @@ -899,9 +901,9 @@ Permission1185=Godkjen innkjøpsordre Permission1186=Utfør innkjøpsordre Permission1187=Bekreft mottak av innkjøpsordre Permission1188=Slett innkjøpsordre -Permission1189=Check/Uncheck a purchase order reception +Permission1189=Merk av/fjern merket for mottak av innkjøpsordre Permission1190=Godkjenn (andre godkjenning) innkjøpsordre -Permission1191=Export supplier orders and their attributes +Permission1191=Eksporter leverandørordre og deres attributter Permission1201=Resultat av en eksport Permission1202=Opprett/endre eksport Permission1231=Les leverandørfakturaer @@ -915,8 +917,8 @@ Permission1251=Kjør masseimport av eksterne data til database (datalast) Permission1321=Eksportere kundefakturaer, attributter og betalinger Permission1322=Gjenåpne en betalt regning Permission1421=Eksporter salgsordre og attributter -Permission1521=Read documents -Permission1522=Delete documents +Permission1521=Les dokumenter +Permission1522=Slett dokumenter Permission2401=Les handlinger (hendelser eller oppgaver) knyttet til brukerkonto (hvis eier av en hendelse eller bare er tilordnet) Permission2402=Opprette/endre handlinger (hendelser eller oppgaver) knyttet til brukerkontoen (hvis eier av hendelsen) Permission2403=Slett handlinger (hendelser eller oppgaver) knyttet til brukerkontoen (hvis eier av hendelsen) @@ -931,7 +933,7 @@ Permission2515=Oppsett av dokumentmapper Permission2801=Bruk FTP-klient i lesemodus (bla gjennom og laste ned) Permission2802=Bruk FTP-klient i skrivemodus (slette eller laste opp filer) Permission3200=Les arkiverte hendelser og fingeravtrykk -Permission3301=Generate new modules +Permission3301=Generer nye moduler Permission4001=Se ansatte Permission4002=Opprett ansatte Permission4003=Slett ansatte @@ -952,12 +954,12 @@ Permission23002=Opprett/endre planlagt oppgave Permission23003=Slett planlagt oppgave Permission23004=Utfør planlagt oppgave Permission50101=Bruk salgssted (SimplePOS) -Permission50151=Use Point of Sale (TakePOS) +Permission50151=Bruk salgssted (TakePOS) Permission50201=Les transaksjoner Permission50202=Importer transaksjoner -Permission50330=Read objects of Zapier -Permission50331=Create/Update objects of Zapier -Permission50332=Delete objects of Zapier +Permission50330=Les Zapier-objekter +Permission50331=Opprett/oppdater Zapier-objekter +Permission50332=Slett Zapier-objekter Permission50401=Tilknytt varer og fakturaer til regnskapskontoer Permission50411=Les operasjoner i hovedbok Permission50412=Skriv/rediger operasjoner i hovedbok @@ -991,11 +993,11 @@ Permission941602=Opprett og endre kvitteringer Permission941603=Valider kvitteringer Permission941604=Send kvitteringer på e-post Permission941605=Eksporter kvitteringer -Permission941606=Delete receipts +Permission941606=Slett kvitteringer DictionaryCompanyType=Tredjepartstyper DictionaryCompanyJuridicalType=Tredjeparts juridiske enheter -DictionaryProspectLevel=Prospect potential level for companies -DictionaryProspectContactLevel=Prospect potential level for contacts +DictionaryProspectLevel=Prospekt potensialnivå for selskaper +DictionaryProspectContactLevel=Prospekt potensialnivå for kontakter DictionaryCanton=Stater/provinser DictionaryRegion=Region DictionaryCountry=Land @@ -1026,12 +1028,12 @@ DictionaryUnits=Enheter DictionaryMeasuringUnits=Måleenheter DictionarySocialNetworks=Sosiale nettverk DictionaryProspectStatus=Prospektstatus for selskaper -DictionaryProspectContactStatus=Prospect status for contacts +DictionaryProspectContactStatus=Prospektstatus for kontakter DictionaryHolidayTypes=Typer permisjon DictionaryOpportunityStatus=Lead status for prosjekt/lead DictionaryExpenseTaxCat=Utgiftsrapport - Transportkategorier DictionaryExpenseTaxRange=Utgiftsrapport - Rangert etter transportkategori -DictionaryTransportMode=Intracomm report - Transport mode +DictionaryTransportMode=Intracomm rapport - Transportmodus TypeOfUnit=Type enhet SetupSaved=Innstillinger lagret SetupNotSaved=Oppsettet er ikke lagret @@ -1068,9 +1070,9 @@ LocalTax2IsUsedDescES=Standard RE-sats når du oppretter prospekter, fakturaer, LocalTax2IsNotUsedDescES=Som standard er den foreslåtte IRPF er 0. Slutt på regelen. LocalTax2IsUsedExampleES=I Spania, for frilansere og selvstendige som leverer tjenester, og bedrifter som har valgt moduler for skattesystem. LocalTax2IsNotUsedExampleES=I Spania er de bedrifter som ikke er ikke skattepliktige -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. +RevenueStampDesc="Avgiftsstempelet" eller "inntektsstempelet" er en fast avgift du betaler per faktura (det avhenger ikke av fakturabeløpet). Det kan også være en prosentskatt, men å bruke den andre eller tredje typen skatt er bedre for prosentskatt, ettersom avgiftsstempler ikke gir noen rapportering. Bare få land bruker denne typen avgifter. UseRevenueStamp=Bruk et avgiftsstempel -UseRevenueStampExample=The value of tax stamp is defined by default into the setup of dictionaries (%s - %s - %s) +UseRevenueStampExample=Verdien av avgiftstempelet er definert som standard i oppsettet av ordbøker (%s - %s - %s) CalcLocaltax=Rapport over lokale avgifter CalcLocaltax1=Salg - Innkjøp CalcLocaltax1Desc=Lokale skatter-rapporter kalkuleres med forskjellen mellom kjøp og salg @@ -1078,12 +1080,12 @@ CalcLocaltax2=Innkjøp CalcLocaltax2Desc=Lokale skatter-rapportene viser totalt kjøp CalcLocaltax3=Salg CalcLocaltax3Desc=Lokale skatter-rapportene viser totalt salg -NoLocalTaxXForThisCountry=According to the setup of taxes (See %s - %s - %s), your country does not need to use such type of tax +NoLocalTaxXForThisCountry=I henhold til avgiftsoppsettet (Se %s - %s - %s), trenger ikke landet ditt å bruke en slik type skatt LabelUsedByDefault=Etiketten som brukes som standard hvis ingen oversettelse kan bli funnet for kode LabelOnDocuments=Etiketten på dokumenter LabelOrTranslationKey=Etikett eller oversettelsessnøkkel ValueOfConstantKey=Verdien av en konfigurasjonskonstant -ConstantIsOn=Option %s is on +ConstantIsOn=Alternativ %s er på NbOfDays=Antall dager AtEndOfMonth=Ved månedsslutt CurrentNext=Nåværende/Neste @@ -1170,8 +1172,8 @@ Delays_MAIN_DELAY_EXPENSEREPORTS=Utgiftsrapporter for godkjenning Delays_MAIN_DELAY_HOLIDAYS=Legg igjen forespørsler for godkjenning SetupDescription1=Før du begynner å bruke Dolibarr, må noen innledende parametere defineres og moduler aktiveres/konfigureres. SetupDescription2=Følgende to seksjoner er obligatoriske (de to første oppføringene i oppsettmenyen): -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. +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 Audit=Revisjon @@ -1182,7 +1184,7 @@ InfoWebServer=Om Webserver InfoDatabase=Om Database InfoPHP=Om PHP InfoPerf=Om ytelse -InfoSecurity=About Security +InfoSecurity=Om sikkerhet BrowserName=Navn på nettleser BrowserOS=Nettleserens operativsystem ListOfSecurityEvents=Oversikt over sikkerhetshendelser i Dolibarr @@ -1191,7 +1193,7 @@ LogEventDesc=Aktiver logging av bestemte sikkerhetshendelser. Administratorer n AreaForAdminOnly=Oppsettparametere kan bare angis av <b> administratorbrukere </b>. SystemInfoDesc=Systeminformasjon er diverse teknisk informasjon som kun vises i skrivebeskyttet modus, og som kun er synlig for administratorer. SystemAreaForAdminOnly=Dette området er kun tilgjengelig for administratorbrukere. Dolibarr brukerrettigheter kan ikke endre denne begrensningen. -CompanyFundationDesc=Edit the information of your company/organization. Click on "%s" button at the bottom of the page when done. +CompanyFundationDesc=Rediger informasjonen til din bedrift/organisasjon. Klikk på "%s" -knappen nederst på siden når du er ferdig. AccountantDesc=Hvis du har en ekstern revisor/regnskapsholder, kan du endre dennes informasjon her. AccountantFileNumber=Regnskapsførerkode DisplayDesc=Parametre som påvirker utseende og oppførsel av Dolibarr kan endres her. @@ -1199,7 +1201,7 @@ AvailableModules=Tilgjengelige apper/moduler ToActivateModule=Gå til innstillinger for å aktivere moduler. SessionTimeOut=Tidsgrense for økter SessionExplanation=Dette tallet garanterer at økten aldri utløper før denne forsinkelsen, hvis økten kjøres med intern PHP-session cleaner (og ingenting annet). Intern PHP session cleaner garanterer ikke at økten utløper like etter denne forsinkelsen. Det utløper etter denne forsinkelsen, og når session cleaner er ferdig, hver <b>%s/%s</b> tilgang, men bare under tilgang fra andre økter <br>. Merk: på noen servere med en ekstern session cleaner(cron under debian, ubuntu ...), kan øktene bli ødelagt etter en periode definert av et eksternt oppsett, uansett verdien som er angitt her. -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. +SessionsPurgedByExternalSystem=Økter på denne serveren ser ut til å bli renset av en ekstern mekanisme (cron under debian, ubuntu ...), sannsynligvis hvert <b>%s</b> sekund (= verdien av parameteren <b> session.gc_maxlifetime </b>. Du må be serveradministratoren om å endre øktforsinkelse. TriggersAvailable=Tilgjengelige utløsere TriggersDesc=Utløsere (triggers) er filer som vil påvirke Dolibarrs virkemåte og arbeidsflyt når de kopieres inn i mappen <b>htdocs/core/triggers</b>. De aktiverer nye handlinger, aktivert av Dolibarrhendelser (ny tredjepart, opprette faktura ...). TriggerDisabledByName=Utløserne i denne filen er slått av med endelsen <b>-NORUN</b> i navnet. @@ -1233,7 +1235,7 @@ RestoreDesc2=Gjenopprett sikkerhetskopifilen (f.eks. Zip-fil) i mappen "dokument RestoreDesc3=Gjenopprett databasestrukturen og dataene fra en sikkerhetskopierings-dumpfil i databasen til den nye Dolibarr-installasjonen eller i databasen til nåværende installasjonen (<b> %s </b>). Advarsel, når gjenopprettingen er fullført, må du bruke et login/passord, som eksisterte fra backup tid/installasjon for å koble til igjen. <br> For å gjenopprette en sikkerhetskopiert database til gjeldende installasjon, kan du følge denne assistenten. RestoreMySQL=MySQL import ForcedToByAModule=Denne regelen er tvunget til å <b>%s</b> av en aktivert modul -ValueIsForcedBySystem=This value is forced by the system. You can't change it. +ValueIsForcedBySystem=Denne verdien bestemmes av systemet. Du kan ikke endre det. PreviousDumpFiles=Eksisterende sikkerhetskopier PreviousArchiveFiles=Eksisterende arkivfiler WeekStartOnDay=Første dag i uken @@ -1294,8 +1296,8 @@ WarningAtLeastKeyOrTranslationRequired=Et søkekriterie er nødvendig for nøkke NewTranslationStringToShow=Ny oversettelsesstreng som skal vises OriginalValueWas=Den originale oversettelsen er overskrevet. Original verdi var:<br><br>%s TransKeyWithoutOriginalValue=Du tvang en ny oversettelse for oversettelsesnøkkelen '<strong> %s</strong>' som ikke finnes i noen språkfiler -TitleNumberOfActivatedModules=Activated modules -TotalNumberOfActivatedModules=Activated modules: <b>%s</b> / <b>%s</b> +TitleNumberOfActivatedModules=Aktiverte moduler +TotalNumberOfActivatedModules=Aktiverte moduler: <b>%s</b> / <b>%s</b> YouMustEnableOneModule=Du må minst aktivere en modul ClassNotFoundIntoPathWarning=Klasse %s ikke funnet i PHP banen YesInSummer=Ja i sommer @@ -1306,7 +1308,7 @@ YouUseBestDriver=Du bruker driver %s som er den beste driveren som er tilgjengel YouDoNotUseBestDriver=Du bruker driveren %s. Driver %s anbefales. NbOfObjectIsLowerThanNoPb=Du har bare %s %s i databasen. Dette krever ingen spesiell optimalisering. SearchOptim=Forbedre søket -YouHaveXObjectUseSearchOptim=Du har %s %s i databasen. Du bør legge til konstanten %s til 1 i Hjem-Oppsett-Annet. Begrens søket til begynnelsen av strenger som gjør det mulig for databasen å bruke indekser, og du bør få et øyeblikkelig svar. +YouHaveXObjectUseSearchOptim=Du har %s %s i databasen. Du kan legge til konstanten %s til 1 i Hjem-Oppsett-Annet. Begrens søket til begynnelsen av strenger, slik at det blir lettere for databasen å bruke indekser, og du får raskere svar. YouHaveXObjectAndSearchOptimOn=Du har %s %s i databasen og konstant %s er satt til 1 i Hjem-Oppsett-Annet. BrowserIsOK=Du bruker nettleseren %s. Denne nettleseren er ok for sikkerhet og ytelse. BrowserIsKO=Du bruker nettleseren %s. Denne nettleseren er kjent for å være et dårlig valg for sikkerhet, ytelse og pålitelighet. Vi anbefaler deg å bruke Firefox, Chrome, Opera eller Safari. @@ -1314,7 +1316,7 @@ PHPModuleLoaded=PHP-komponent %s lastet PreloadOPCode=Forhåndslastet OPCode brukes AddRefInList=Vis kunde/leverandør-ref i liste (velg liste eller kombinasjonsboks), og det meste av hyperkobling. Tredjepart vil vises med navnet "CC12345 - SC45678 - Stort selskap", i stedet for "Stort selskap". AddAdressInList=Vis liste over kunde-/leverandøradresseinfo (velg liste eller kombinasjonsboks) <br> Tredjeparter vil vises med et navnformat av "The Big Company Corp." - 21 Jump Street 123456 Big Town - USA "i stedet for" 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". +AddEmailPhoneTownInContactList=Vis kontakt-epost (eller telefoner hvis ikke definert) og poststed (velg liste eller kombinasjonsfelt) <br> Kontakter vises med navneformatet "Ola Nordmann - ola.nordmann@email.com - Bergen" eller "Ola Nordmann - 55 55 55 55 - Bergen "i stedet for"Ola Nordmann". AskForPreferredShippingMethod=Spør etter foretrukket sendingsmetode for tredjeparter FieldEdition=Endre felt %s FillThisOnlyIfRequired=Eksempel: +2 (brukes kun hvis du opplever problemer med tidssone offset) @@ -1322,7 +1324,7 @@ GetBarCode=Hent strekkode NumberingModules=Nummereringsmodeller DocumentModules=Dokumentmodeller ##### Module password generation -PasswordGenerationStandard=Return a password generated according to internal Dolibarr algorithm: %s characters containing shared numbers and characters in lowercase. +PasswordGenerationStandard=Returner et passord generert i henhold til intern Dolibarr-algoritme: %s tegn som inneholder både tall og små bokstaver. PasswordGenerationNone=Ikke foreslå å generere passord. Passord må legges inn manuelt. PasswordGenerationPerso=Returner et passord i følge din personlige konfigurasjon SetupPerso=I følge din konfigurasjon @@ -1332,7 +1334,7 @@ RuleForGeneratedPasswords=Regler for å generere og validere passord DisableForgetPasswordLinkOnLogonPage=Ikke vis koblingen "Glemt passord" på innloggingssiden UsersSetup=Oppsett av brukermodulen UserMailRequired=E-postadresse kreves for å opprette en ny bruker -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) +UserHideInactive=Skjul inaktive brukere fra alle kombinasjonslister over brukere (anbefales ikke: dette kan bety at du ikke vil kunne filtrere eller søke på gamle brukere på enkelte sider) UsersDocModules=Dokumentmaler for dokumenter generert fra brukerpost GroupsDocModules=Dokumentmaler for dokumenter generert fra en gruppeoppføring ##### HRM setup ##### @@ -1393,7 +1395,7 @@ WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER=Spør om Lagerkilde for ordre ##### Suppliers Orders ##### BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER=Be om bankkonto destinasjon for innkjøpsordre ##### Orders ##### -SuggestedPaymentModesIfNotDefinedInOrder=Suggested payments mode on sale order by default if not defined on the order +SuggestedPaymentModesIfNotDefinedInOrder=Foreslått betalingsmodus på salgsordre som standard hvis ikke definert i ordren OrdersSetup=Salgsordreoppsett OrdersNumberingModules=Nummereringsmodul for ordre OrdersModelModule=Ordremaler @@ -1421,7 +1423,7 @@ AdherentMailRequired=E-post kreves for å lage et nytt medlem MemberSendInformationByMailByDefault=Valg for å sende e-postbekreftelse til medlemmer (validering eller nytt abonnement) er krysset av som standard VisitorCanChooseItsPaymentMode=Besøkende kan velge blant tilgjengelige betalingsmåter MEMBER_REMINDER_EMAIL=Aktiver automatisk påminnelse <b> via e-post </b> av utløpte abonnementer. Merk: Modul <strong> %s </strong> må være aktivert og riktig oppsatt for å sende påminnelser. -MembersDocModules=Document templates for documents generated from member record +MembersDocModules=Dokumentmaler for dokumenter generert fra medlemsregister ##### LDAP setup ##### LDAPSetup=LDAP Setup LDAPGlobalParameters=Globale parametre @@ -1564,9 +1566,9 @@ LDAPDescValues=Eksempelverdier er designet for <b>OpenLDAP</b> med følgende las ForANonAnonymousAccess=For autentisert tilgang (f.eks skrivetilgang) PerfDolibarr=Ytelse oppsett/optimaliseringsrapport YouMayFindPerfAdviceHere=Denne siden gir noen kontroller eller råd relatert til ytelse. -NotInstalled=Not installed. -NotSlowedDownByThis=Not slowed down by this. -NotRiskOfLeakWithThis=Not risk of leak with this. +NotInstalled=Ikke installert. +NotSlowedDownByThis=Ikke bremset av dette. +NotRiskOfLeakWithThis=Ikke fare for lekkasje med dette. ApplicativeCache=Applikasjons-cache MemcachedNotAvailable=Ingen applikativ cache funnet. Du kan forbedre ytelsen ved å installere en cache-server Memcached og en modul som kan bruke denne cache-serveren. <br> Mer informasjon her <a href="http://wiki.dolibarr.org/index.php/Module_MemCached_EN">http://wiki.dolibarr.org/index.php/Module_MemCached_EN</a>.<br>Merk: Mange webhosting-leverandører har ikke en slik cache-server. MemcachedModuleAvailableButNotSetup=Modulen memcache er funnet, men oppsett er ikke komplett @@ -1596,8 +1598,13 @@ ServiceSetup=Oppsett av tjenester-modulen ProductServiceSetup=Oppsett av varer- og tjenester-modulen NumberOfProductShowInSelect=Maksimalt antall varer som skal vises i kombinasjonslister (0 = ingen grense) ViewProductDescInFormAbility=Vis produktbeskrivelser i skjemaer (ellers vist i en verktøytips-popup) +DoNotAddProductDescAtAddLines=Ikke legg til varebeskrivelse (fra varekort) på send inn tilleggslinjer på skjemaer +OnProductSelectAddProductDesc=Hvordan bruke varebeskrivelsen når du legger til en en vare som en linje i et dokument +AutoFillFormFieldBeforeSubmit=Fyll ut beskrivelsesfeltet med varebeskrivelsen automatisk +DoNotAutofillButAutoConcat=Ikke fyll inn inndatafeltet med varebeskrivelse. Varebeskrivelsen blir automatisk sammenkoblet til den angitte beskrivelsen. +DoNotUseDescriptionOfProdut=Varebeskrivelse vil aldri bli inkludert i beskrivelsen på dokumentlinjer MergePropalProductCard=I "Vedlagte filer"-fanen i "Varer og tjenester" kan du aktivere en opsjon for å flette PDF-varedokument til tilbud PDF-azur hvis varen/tjenesten er i tilbudet -ViewProductDescInThirdpartyLanguageAbility=Vis produktbeskrivelser på språket til tredjepart +ViewProductDescInThirdpartyLanguageAbility=Vis varebeskrivelser i skjemaer på tredjeparts språk (ellers på brukerens språk) UseSearchToSelectProductTooltip=Hvis du har mange varer (>100 000), kan du øke hastigeten ved å sette konstanten PRODUCT_DONOTSEARCH_ANYWHERE til 1 i Oppsett->Annet. Søket vil da begrenses til starten av søkestrengen UseSearchToSelectProduct=Vent til du trykker på en tast før du laster inn innholdet i produkt-kombinationslisten (dette kan øke ytelsen hvis du har et stort antall produkter, men det er mindre praktisk) SetDefaultBarcodeTypeProducts=Standard strekkodetype for varer @@ -1614,7 +1621,7 @@ SyslogLevel=Nivå SyslogFilename=Filnavn og bane YouCanUseDOL_DATA_ROOT=Du kan bruke DOL_DATA_ROOT / dolibarr.log som loggfil i Dolibarr "dokumenter"-mappen. Du kan angi en annen bane for å lagre denne filen. ErrorUnknownSyslogConstant=Konstant %s er ikke en kjent syslog-konstant -OnlyWindowsLOG_USER=On Windows, only the LOG_USER facility will be supported +OnlyWindowsLOG_USER=I Windows støttes bare LOG_USER-funksjonen CompressSyslogs=Komprimering og sikkerhetskopiering av feilsøkingsloggfiler (generert av modulen Log for debug) SyslogFileNumberOfSaves=Antall sikkerhetskopilogger som skal beholdes ConfigureCleaningCronjobToSetFrequencyOfSaves=Konfigurer planlagt jobb for å angi logg backupfrekvens @@ -1672,7 +1679,7 @@ AdvancedEditor=Avansert editor ActivateFCKeditor=Aktiver avansert editor for: FCKeditorForCompany=WYSIWIG opprettelse/endring av elementbeskrivelse og notater (untatt varer og tjenester) FCKeditorForProduct=WYSIWIG opprettelse/endring av vare-/tjenestebeskrivelse og notater -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 oppretting/endring av varedetaljer for alle enheter (tilbud, ordre, fakturaer, etc ...). <span class="warning"> Advarsel: Det er ikke anbefalt å bruke dette alternativet i dette tilfellet, da det kan skape problemer med spesialtegn og sideformatering når du bygger PDF-filer. </span> FCKeditorForMailing= WYSIWIG opprettelse/endring av masse-e-postutsendelser (Verktøy->E-post) FCKeditorForUserSignature=WYSIWIG-opprettelse av signatur FCKeditorForMail=WYSIWIG opprettelse/redigering for all post (unntatt Verktøy ->eMailing) @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personlige menyer som ikke er lenket til en toppmeny NewMenu=Ny meny MenuHandler=Menybehandler MenuModule=Kildemodul -HideUnauthorizedMenu= Skjul uautoriserte menyer (grå) +HideUnauthorizedMenu=Skjul uautoriserte menyer også for interne brukere (bare gråtonet ellers) DetailId=Meny-ID DetailMenuHandler=Menyhåndterer skulle vise en ny meny DetailMenuModule=Modulnavn hvis menyoppføringen kom fra en modul @@ -1737,16 +1744,16 @@ AGENDA_USE_EVENT_TYPE=Bruk hendelsestyper (administrert i menyoppsett -> Ordbøk AGENDA_USE_EVENT_TYPE_DEFAULT=Angi denne standardverdien automatisk for type hendelse i skjema for hendelsesoppretting AGENDA_DEFAULT_FILTER_TYPE=Still inn denne typen hendelse automatisk i søkefilter i agendavisning AGENDA_DEFAULT_FILTER_STATUS=Angi denne status automatisk for hendelser i søkefilter i agendavisning -AGENDA_DEFAULT_VIEW=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_DEFAULT_VIEW=Hvilken visning vil du åpne som standard når du velger menyen Agenda +AGENDA_REMINDER_BROWSER=Aktiver påminnelse om hendelse <b> i brukerens nettleser </b> (Når påminnelsesdato er nådd, vises en popup i nettleseren. Hver bruker kan deaktivere slike varsler i nettleseren). AGENDA_REMINDER_BROWSER_SOUND=Aktiver lydvarsler -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=Aktiver påminnelse om hendelse <b> via epost </b> (påminnelsesalternativ/forsinkelse kan defineres for hver hendelse). +AGENDA_REMINDER_EMAIL_NOTE=Merk: Frekvensen av oppgaven %s må være nok til å være sikker på at påminnelsen sendes i riktig øyeblikk. AGENDA_SHOW_LINKED_OBJECT=Vis koblet objekt i agendavisning ##### Clicktodial ##### ClickToDialSetup='Click To Dial' modul ClickToDialUrlDesc=Url som kalles når man klikker på telefonpiktogrammet. I URL kan du bruke koder <br> <b> __ PHONETO __ </b> som blir erstattet med telefonnummeret til personen som skal ringes <br> <b> __ PHONEFROM __ </b> som blir erstattet med telefonnummeret til den som ringer(din) <br> <b> __ LOGIN __ </b> som vil bli erstattet med clicktodial login (definert på brukerkort) <br> <b> __ PASS __ </b> som vil bli erstattet med clicktodial passord (definert på brukerkort). -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. +ClickToDialDesc=Denne modulen endrer telefonnumre, når du bruker en datamaskin, til klikkbare lenker. Et klikk vil ringe nummeret. Dette kan brukes til å starte telefonsamtalen når du har en telefon på skrivebordet eller når du for eksempel bruker et CTI-system basert på SIP-protokoll. Merk: Når du bruker en smarttelefon, er telefonnumre alltid klikkbare. ClickToDialUseTelLink=Bruk kun en lenke "tlf:" for telefonnumre ClickToDialUseTelLinkDesc=Bruk denne metoden hvis brukerne har en softphone eller et programvaregrensesnitt installert på samme datamaskin som nettleseren, og kalles når du klikker på en link i nettleseren din som starter med "tel:". Hvis du trenger en full server-løsning (uten behov for lokal installasjon av programvare), må du sette denne på "Nei" og fylle neste felt. ##### Point Of Sale (CashDesk) ##### @@ -1867,7 +1874,7 @@ TopMenuDisableImages=Skjul bilder i toppmeny LeftMenuBackgroundColor=Bakgrunnsfarge for venstre meny BackgroundTableTitleColor=Bakgrunnsfarge for tittellinje i tabellen BackgroundTableTitleTextColor=Tekstfarge for tabellens tittellinje -BackgroundTableTitleTextlinkColor=Text color for Table title link line +BackgroundTableTitleTextlinkColor=Tekstfarge for tabellens tittellink BackgroundTableLineOddColor=Bakgrunnsfarge for oddetalls-tabellinjer BackgroundTableLineEvenColor=Bakgrunnsfarge for partalls-tabellinjer MinimumNoticePeriod=Frist for beskjed (Feriesøknaden må sendes inn før denne fristen) @@ -1876,7 +1883,7 @@ EnterAnyCode=Dette feltet inneholder en referanse til identifikasjon av linje. B Enter0or1=Skriv inn 0 eller 1 UnicodeCurrency=Her legger du inn en liste med Ascii-verdier, som representerer et valutasymbol. For eksempel: $ = [36], Brasilsk real R$ = [82,36], € = [8364] ColorFormat=RGB-fargen er i HEX-format, for eksempel: FF0000 -PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) +PictoHelp=Ikonnavn i dolibarr-format ('image.png' hvis det er i den aktuelle temakatalogen, 'image.png@nom_du_module' hvis det er i katalogen /img/ til en modul) PositionIntoComboList=Plassering av linje i kombinasjonslister SellTaxRate=Salgs-skattesats RecuperableOnly=Ja for MVA"Ikke oppfattet, men gjenopprettelig" dedikert til noen steder i Frankrike. Hold verdien til "Nei" i alle andre tilfeller. @@ -1917,7 +1924,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s er tilgjengelig. Versj ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s er tilgjengelig. Versjon %s er en vedlikeholdsversjon, så den inneholder bare feilrettinger. Vi anbefaler alle brukere å oppgradere til denne versjonen. En vedlikeholdsløsning introduserer ikke nye funksjoner eller endringer i databasen. Du kan laste den ned fra nedlastingsområdet på https://www.dolibarr.org portal (underkatalog Stable versions). Du kan lese <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog"> ChangeLog </a> for fullstendig liste over endringer. MultiPriceRuleDesc=Når alternativet "Flere prisnivået pr. vare/tjeneste" er på, kan du definere forskjellige priser (ett pr prisnivå) for hvert produkt. For å spare tid, kan du lage en regel som gir pris for hvert nivå autokalkulert i forhold til prisen på første nivå, slik at du bare legger inn en pris for hvert produkt. Denne siden er laget for å spare tid og kan være nyttig hvis prisene for hvert nivå står i forhold til første nivå. Du kan ignorere denne siden i de fleste tilfeller. ModelModulesProduct=Maler for produkt-dokumenter -WarehouseModelModules=Templates for documents of warehouses +WarehouseModelModules=Maler for varehusdokumenter ToGenerateCodeDefineAutomaticRuleFirst=For å kunne generere koder automatisk, må du først definere et program for å automatisk definere strekkodenummeret. SeeSubstitutionVars=Relaterte gjentakende fakturaer SeeChangeLog=Se Endringslogg-fil (kun på engelsk) @@ -1983,10 +1990,11 @@ EMailHost=Vert for e-post IMAP-server MailboxSourceDirectory=Postkasse kildemappe MailboxTargetDirectory=Postkasse målmappe EmailcollectorOperations=Operasjoner som skal utføres av samler +EmailcollectorOperationsDesc=Operasjoner utføres i rekkefølge fra topp til bunn MaxEmailCollectPerCollect=Maks antall e-postmeldinger pr. innsamling CollectNow=Samle nå ConfirmCloneEmailCollector=Er du sikker på at du vil klone e-postsamleren %s? -DateLastCollectResult=Dato for sist forsøk på samling +DateLastCollectResult=Dato for siste forsøk på samling DateLastcollectResultOk=Dato for siste vellykkede samling LastResult=Siste resultat EmailCollectorConfirmCollectTitle=E-post-samling bekreftelse @@ -1996,20 +2004,20 @@ NothingProcessed=Ingenting gjort XEmailsDoneYActionsDone=%s e-postmeldinger kvalifiserte, %s e-postmeldinger som er vellykket behandlet (for %s-post/handlinger utført) RecordEvent=Registrer e-posthendelse CreateLeadAndThirdParty=Opprett lead (og tredjepart om nødvendig) -CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) +CreateTicketAndThirdParty=Opprett billett (og lenke til tredjepart hvis den ble lastet inn av en tidligere operasjon) CodeLastResult=Siste resultatkode NbOfEmailsInInbox=Antall e-poster i kildemappen LoadThirdPartyFromName=Legg inn tredjepartsøk på %s (bare innlasting) LoadThirdPartyFromNameOrCreate=Legg inn tredjepartsøk på %s (opprett hvis ikke funnet) WithDolTrackingID=Melding fra en samtale initiert av en første e-post sendt fra Dolibarr WithoutDolTrackingID=Melding fra en samtale initiert av en første e-post IKKE sendt fra Dolibarr -WithDolTrackingIDInMsgId=Message sent from Dolibarr -WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Opprett kandidatur +WithDolTrackingIDInMsgId=Melding sendt fra Dolibarr +WithoutDolTrackingIDInMsgId=Melding IKKE sendt fra Dolibarr +CreateCandidature=Opprett jobbsøknad FormatZip=Postnummer MainMenuCode=Meny-oppføringskode (hovedmeny) ECMAutoTree=Vis ECM-tre automatisk  -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. +OperationParamDesc=Definer verdiene som skal brukes til objektet for handlingen, eller hvordan du trekker ut verdier. For eksempel: <br> objproperty1=SET: verdien som skal settes <br> objproperty2=SET: en verdi med erstatning av __objproperty1__ <br> objproperty3=SETIFEMPTY: verdi brukt hvis objproperty3b ikke allerede er definert <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> Bruk semikolon som separator for å trekke ut eller angi flere egenskaper. OpeningHours=Åpningstider OpeningHoursDesc=Skriv inn de vanlige åpningstidene for bedriften din. ResourceSetup=Konfigurasjon av ressursmodulen @@ -2041,17 +2049,17 @@ 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 -IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. -AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +IfYouAreOnAProductionSetThis=Hvis du er i et produksjonsmiljø, bør du sette denne egenskapen til %s. +AntivirusEnabledOnUpload=Antivirus aktivert på opplastede filer EXPORTS_SHARE_MODELS=Eksportmodellene er delt med alle ExportSetup=Oppsett av modul Eksport ImportSetup=Oppsett av importmodul InstanceUniqueID=Unik ID for forekomsten SmallerThan=Mindre enn LargerThan=Større enn -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. +IfTrackingIDFoundEventWillBeLinked=Merk at hvis en sporings-ID for et objekt blir funnet i epost, eller hvis eposten er et svar på en epostadresse som er samlet og koblet til et objekt, blir den opprettede hendelsen automatisk knyttet til det kjente relaterte objektet. WithGMailYouCanCreateADedicatedPassword=Med en Gmail-konto, hvis du aktiverte 2-trinns validering, anbefales det å opprette et dedikert annet passord for applikasjonen, i stedet for å bruke ditt eget kontopassord fra https://myaccount.google.com/. -EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. +EmailCollectorTargetDir=Det kan være en ønsket oppførsel å flytte eposten til en annet merke/katalog når den er behandlet. Bare sett navnet på katalogen her for å bruke denne funksjonen (IKKE bruk spesialtegn i navnet). Vær oppmerksom på at du også må bruke en konto med lese-/skrivetillatelse . EmailCollectorLoadThirdPartyHelp=Du kan bruke denne handlingen til å bruke e-postinnholdet til å finne og laste inn en eksisterende tredjepart i databasen din. Den funnet (eller opprettede) tredjeparten vil bli brukt til å følge handlinger som trenger det. I parameterfeltet kan du bruke for eksempel 'EXTRACT:BODY:Name:\\s([^\\s]*)' hvis du vil trekke ut navnet på tredjeparten fra en streng 'Name: name to find' funnet i teksten. EndPointFor=Sluttpunkt for %s: %s DeleteEmailCollector=Slett e-postsamler @@ -2066,20 +2074,24 @@ 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_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. +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 -RssNote=Note: Each RSS feed definition provides a widget that you must enable to have it available in dashboard +RssNote=Merk: Hver definisjon av RSS-feed gir en widget som du må aktivere for å ha den tilgjengelig i dashbordet JumpToBoxes=Gå til Setup -> Widgets MeasuringUnitTypeDesc=Bruk en verdi som "størrelse", "overflate", "volum", "vekt", "tid" MeasuringScaleDesc=Skalaen er antall steder du må flytte kommaet for å samsvare med standard referansenhet. For enhetstypen "tid" er det antall sekunder. Verdier mellom 80 og 99 er reserverte verdier. TemplateAdded=Mal lagt til TemplateUpdated=Mal oppdatert TemplateDeleted=Mal slettet -MailToSendEventPush=Event reminder email -SwitchThisForABetterSecurity=Switching this value to %s is recommended for more security +MailToSendEventPush=Epospåminnelse om hendelse +SwitchThisForABetterSecurity=Det anbefales å bytte denne verdien til %s for mer sikkerhet DictionaryProductNature= Varens art CountryIfSpecificToOneCountry=Land (hvis spesifikt for et gitt land) -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. +YouMayFindSecurityAdviceHere=Du kan finne sikkerhetsrådgivning her +ModuleActivatedMayExposeInformation=Denne modulen kan avsløre sensitive data. Hvis du ikke trenger det, deaktiver det. +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 diff --git a/htdocs/langs/nb_NO/agenda.lang b/htdocs/langs/nb_NO/agenda.lang index 755d782a5e0..6cbce1b00b5 100644 --- a/htdocs/langs/nb_NO/agenda.lang +++ b/htdocs/langs/nb_NO/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Antall hendelser ListOfActions=Oversikt over hendelser EventReports=Hendelsesrapporter Location=Lokasjon -ToUserOfGroup=Event assigned to any user in group +ToUserOfGroup=Arrangement tildelt en eller flere brukere i gruppen EventOnFullDay=Hendelse over hele dagen(e) MenuToDoActions=Alle åpne handlinger MenuDoneActions=Alle avsluttede handlinger @@ -86,8 +86,8 @@ ProposalDeleted=Tilbud slettet OrderDeleted=Ordre slettet InvoiceDeleted=Faktura slettet DraftInvoiceDeleted=Fakturautkast slettet -CONTACT_CREATEInDolibarr=Contact %s created -CONTACT_DELETEInDolibarr=Contact %s deleted +CONTACT_CREATEInDolibarr=Kontakt %s opprettet +CONTACT_DELETEInDolibarr=Kontakt %s slettet PRODUCT_CREATEInDolibarr=Vare%s opprettet PRODUCT_MODIFYInDolibarr=Vare %s endret PRODUCT_DELETEInDolibarr=Vare %s slettet @@ -152,6 +152,7 @@ ActionType=Hendelsestype DateActionBegin=Startdato for hendelse ConfirmCloneEvent=Er du sikker på at du vil klone hendelsen <b>%s</b>? RepeatEvent=Gjenta hendelse +OnceOnly=Kun en gang EveryWeek=Hver uke EveryMonth=Hver måned DayOfMonth=Dag i måned @@ -160,9 +161,9 @@ DateStartPlusOne=Startdato + 1 time SetAllEventsToTodo=Sett alle hendelser til ToDo SetAllEventsToInProgress=Sett alle begivenheter til Pågår SetAllEventsToFinished=Sett alle hendelser til Ferdig -ReminderTime=Reminder period before the event -TimeType=Duration type -ReminderType=Callback type -AddReminder=Create an automatic reminder notification for this event -ErrorReminderActionCommCreation=Error creating the reminder notification for this event -BrowserPush=Browser Notification +ReminderTime=Varslingsperiode før hendelsen +TimeType=Varighetstype +ReminderType=Tilbakekallingstype +AddReminder=Opprett et automatisk varsel for denne hendelsen +ErrorReminderActionCommCreation=Feil ved oppretting av varselet for denne hendelsen +BrowserPush=Varsling om nettleser-popup diff --git a/htdocs/langs/nb_NO/banks.lang b/htdocs/langs/nb_NO/banks.lang index 4717bd50c69..3830db8bba9 100644 --- a/htdocs/langs/nb_NO/banks.lang +++ b/htdocs/langs/nb_NO/banks.lang @@ -173,10 +173,11 @@ SEPAMandate=SEPA mandat 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 cash fence -NewCashFence=Ny cash fence +CashControl=POS kassekontroll +NewCashFence=Ny kasseavslutning 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=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. +IfYouDontReconcileDisableProperty=Hvis du ikke foretar bankavstemninger på noen bankkontoer, deaktiverer du egenskapen"%s" for å fjerne denne advarselen. +NoBankAccountDefined=Ingen bankkonto definert diff --git a/htdocs/langs/nb_NO/bills.lang b/htdocs/langs/nb_NO/bills.lang index 140ab547c4d..4e1c65ac58f 100644 --- a/htdocs/langs/nb_NO/bills.lang +++ b/htdocs/langs/nb_NO/bills.lang @@ -212,10 +212,10 @@ AmountOfBillsByMonthHT=Sum fakturaer pr. mnd (eks. MVA) UseSituationInvoices=Tillat delfaktura UseSituationInvoicesCreditNote=Tillat delfaktura kreditnota Retainedwarranty=Tilbakehold -AllowedInvoiceForRetainedWarranty=Retained warranty usable on the following types of invoices +AllowedInvoiceForRetainedWarranty=Garantibeløp kan brukes på følgende typer fakturaer RetainedwarrantyDefaultPercent=Tilbakehold standardprosent -RetainedwarrantyOnlyForSituation=Make "retained warranty" available only for situation invoices -RetainedwarrantyOnlyForSituationFinal=On situation invoices the global "retained warranty" deduction is applied only on the final situation +RetainedwarrantyOnlyForSituation=Gjør "garantibeløp" tilgjengelig kun for delfakturaer +RetainedwarrantyOnlyForSituationFinal=På delfakturaer brukes det globale "garantibeløpet" bare på den avsluttende fakturaen ToPayOn=Å betale på %s toPayOn=å betale på %s RetainedWarranty=Tilbakehold @@ -578,5 +578,5 @@ CustomersInvoicesArea=Kunde-faktureringsområde SupplierInvoicesArea=Leverandør faktureringsområde FacParentLine=Faktura forelderlinje SituationTotalRayToRest=Rest å betale eks. mva -PDFSituationTitle=Situation n° %d +PDFSituationTitle=Delfaktura nr. %d SituationTotalProgress=Total progresjon%d %% diff --git a/htdocs/langs/nb_NO/blockedlog.lang b/htdocs/langs/nb_NO/blockedlog.lang index 1f7280e6ab8..554c86e4f39 100644 --- a/htdocs/langs/nb_NO/blockedlog.lang +++ b/htdocs/langs/nb_NO/blockedlog.lang @@ -8,7 +8,7 @@ BrowseBlockedLog=Uforanderlige logger ShowAllFingerPrintsMightBeTooLong=Vis alle arkiverte logger (kan være lang) ShowAllFingerPrintsErrorsMightBeTooLong=Vis alle ikke-gyldige arkivlogger (kan være lang) DownloadBlockChain=Last ned fingeravtrykk -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=Arkiverte loggoppføringer er ikke gyldige. Det betyr at noen (en hacker?) Har endret noen data fra denne posten etter at den ble spilt inn, eller har slettet den forrige arkiverte posten (sjekk at linjen med forrige # eksisterer). OkCheckFingerprintValidity=Arkivert logg er gyldig. Det betyr at ingen data på denne linjen ble endret og posten følger den forrige. OkCheckFingerprintValidityButChainIsKo=Arkivert logg ser ut til å være gyldig i forhold til den forrige, men kjeden var ødelagt tidligere. AddedByAuthority=Lagret hos ekstern myndighet @@ -35,7 +35,7 @@ logDON_DELETE=Donasjon logisk sletting logMEMBER_SUBSCRIPTION_CREATE=Medlemskap opprettet logMEMBER_SUBSCRIPTION_MODIFY=Medlemsskap endret logMEMBER_SUBSCRIPTION_DELETE=Medlemskap logisk sletting -logCASHCONTROL_VALIDATE=Cash fence recording +logCASHCONTROL_VALIDATE=Loggfør for kassaavslutning BlockedLogBillDownload=Kundefaktura nedlasting BlockedLogBillPreview=Kundefaktura forhåndsvisning BlockedlogInfoDialog=Loggdetaljer diff --git a/htdocs/langs/nb_NO/boxes.lang b/htdocs/langs/nb_NO/boxes.lang index 494febc0a2f..7f5f1011b58 100644 --- a/htdocs/langs/nb_NO/boxes.lang +++ b/htdocs/langs/nb_NO/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=Siste %s endrede donasjoner BoxTitleLastModifiedExpenses=Siste %s endrede utgiftsrapporter BoxTitleLatestModifiedBoms=Siste %s modifiserte BOM-er BoxTitleLatestModifiedMos=Siste %s endrede produksjonsordre +BoxTitleLastOutstandingBillReached=Kunder med maksimalt utestående overskredet BoxGlobalActivity=Global aktivitet (fakturaer, tilbud, ordrer) BoxGoodCustomers=Gode kunder BoxTitleGoodCustomers=%s gode kunder +BoxScheduledJobs=Planlagte jobber +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Kunne ikke oppdatere RSS-flux. Siste vellykkede oppdateringsdato: %s LastRefreshDate=Siste oppdateringsdato NoRecordedBookmarks=Ingen bokmerker definert. Trykk <a href="%s">her</a> for å legge til bokmerker. @@ -83,8 +86,8 @@ BoxTitleLatestModifiedSupplierOrders=Leverandørordre: siste %s endret BoxTitleLastModifiedCustomerBills=Kundefakturaer: siste %s endret BoxTitleLastModifiedCustomerOrders=Salgsordre: siste %s endret BoxTitleLastModifiedPropals=Siste %s endrede tilbud -BoxTitleLatestModifiedJobPositions=Latest %s modified jobs -BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures +BoxTitleLatestModifiedJobPositions=Siste %s endrede jobber +BoxTitleLatestModifiedCandidatures=Siste %s endrede kandidaturer ForCustomersInvoices=Kundefakturaer ForCustomersOrders=Kundeordrer ForProposals=Tilbud @@ -92,8 +95,8 @@ LastXMonthRolling=De siste %s måneders omsetning ChooseBoxToAdd=Legg widget til i kontrollpanelet BoxAdded=Widget ble lagt til i kontrollpanelet ditt BoxTitleUserBirthdaysOfMonth=Fødselsdager denne måneden (brukere) -BoxLastManualEntries=Siste manuelle oppføringer i regnskap -BoxTitleLastManualEntries=%s siste manuelle oppføringer +BoxLastManualEntries=Siste post i regnskapsføring angitt manuelt eller uten kildedokument +BoxTitleLastManualEntries=%s siste post skrevet inn manuelt eller uten kildedokument NoRecordedManualEntries=Ingen manuelle poster registrert i regnskap BoxSuspenseAccount=Tell regnskapsføring med spenningskonto BoxTitleSuspenseAccount=Antall ikke tildelte linjer @@ -102,5 +105,7 @@ SuspenseAccountNotDefined=Spenningskonto er ikke definert BoxLastCustomerShipments=Siste kundeforsendelser BoxTitleLastCustomerShipments=Siste %s kundeforsendelser NoRecordedShipments=Ingen registrert kundesending +BoxCustomersOutstandingBillReached=Kunder med utestående grense nådd # Pages AccountancyHome=Regnskap +ValidatedProjects=Validerte prosjekter diff --git a/htdocs/langs/nb_NO/cashdesk.lang b/htdocs/langs/nb_NO/cashdesk.lang index de0728f2754..3ec944ed126 100644 --- a/htdocs/langs/nb_NO/cashdesk.lang +++ b/htdocs/langs/nb_NO/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Bunntekst AmountAtEndOfPeriod=Beløp ved periodens slutt (dag, måned eller år) TheoricalAmount=Teoretisk beløp RealAmount=Virkelig beløp -CashFence=Cash fence -CashFenceDone=Kontantoppgjør ferdig for perioden +CashFence=Kasseavslutning +CashFenceDone=Kasseavslutning utført for perioden NbOfInvoices=Ant. fakturaer Paymentnumpad=Tastaturtype for å legge inn betaling Numberspad=Nummertastatur @@ -77,7 +77,7 @@ POSModule=POS-modul BasicPhoneLayout=Bruk grunnleggende oppsett for telefoner SetupOfTerminalNotComplete=Installasjonen av terminal %s er ikke fullført DirectPayment=Direktebetaling -DirectPaymentButton=Add a "Direct cash payment" button +DirectPaymentButton=Legg til en "Direkte kontantbetaling" -knapp InvoiceIsAlreadyValidated=Faktura er allerede validert NoLinesToBill=Ingen linjer å fakturere CustomReceipt=Tilpasset kvittering @@ -94,31 +94,33 @@ TakeposConnectorMethodDescription=Ekstern modul med ekstra funksjoner. Mulighet PrintMethod=Utskriftsmetode ReceiptPrinterMethodDescription=Metode med mange parametere. Full tilpassbar med maler. Kan ikke skrive ut fra skyen. ByTerminal=Med terminal -TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad -CashDeskRefNumberingModules=Numbering module for POS sales +TakeposNumpadUsePaymentIcon=Bruk ikon i stedet for tekst på betalingsknappene på nummertastaturet +CashDeskRefNumberingModules=Nummereringsmodul for POS-salg CashDeskGenericMaskCodes6 = <br><b>{TN}</b>-tag brukes til å legge til terminalnummeret TakeposGroupSameProduct=Grupper samme produktlinjer StartAParallelSale=Start et nytt parallellsalg -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +SaleStartedAt=Salget startet %s +ControlCashOpening=Kassekontroll popup når du åpner POS +CloseCashFence=Lukk kassekontroll CashReport=Kontantrapport MainPrinterToUse=Hovedskriver som skal brukes OrderPrinterToUse=Odreskriver som skal brukes MainTemplateToUse=Hovedmal som skal brukes OrderTemplateToUse=Ordremal som skal brukes BarRestaurant=Bar Restaurant -AutoOrder=Order by the customer himself +AutoOrder=Bestilling av kunden selv RestaurantMenu=Meny CustomerMenu=Kundemeny ScanToMenu=Skann QR-koden for å se menyen ScanToOrder=Skann QR-koden for å bestille -Appearance=Appearance -HideCategoryImages=Hide Category Images -HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines 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 +Appearance=Utseende +HideCategoryImages=Skjul kategoribilder +HideProductImages=Skjul varebilder +NumberOfLinesToShow=Antall linjer med bilder som skal vises +DefineTablePlan=Definer tabellplan +GiftReceiptButton=Legg til en "Gavekvittering" -knapp +GiftReceipt=Gavekvittering +ModuleReceiptPrinterMustBeEnabled=Modulen Kvitteringsskriver må ha blitt aktivert først +AllowDelayedPayment=Tillat forsinket betaling +PrintPaymentMethodOnReceipts=Skriv ut betalingsmåte på billetter/kvitteringer +WeighingScale=Vektskala diff --git a/htdocs/langs/nb_NO/categories.lang b/htdocs/langs/nb_NO/categories.lang index b5d42ea3eba..fcce83f42ff 100644 --- a/htdocs/langs/nb_NO/categories.lang +++ b/htdocs/langs/nb_NO/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=Prosjekters merker/kategori-område UsersCategoriesArea=Område for brukertagger/-kategorier SubCats=Underkategorier CatList=Liste over merker/kategorier +CatListAll=Liste over etiketter/kategorier (alle typer) NewCategory=Nytt merke/kategori ModifCat=Endre merke/kategori CatCreated=Merke/kategori opprettet @@ -65,24 +66,30 @@ UsersCategoriesShort=Brukere tagger/kategorier StockCategoriesShort=Lager etiketter/kategorier ThisCategoryHasNoItems=Denne kategorien inneholder ingen artikler. CategId=Merke/kategori-ID -CatSupList=Liste over selgerkoder/-kategorier -CatCusList=Liste over kunde/prospekt merker/kategorier +ParentCategory=Overordnet etikett/kategori +ParentCategoryLabel=Merke for overordnet etikett/kategori +CatSupList=Liste over leverandøretiketter/kategorier +CatCusList=Liste over kunders/prospekters etiketter/kategorier CatProdList=Liste over vare-merker/kategorier CatMemberList=Liste over medlems-merker/kategorier -CatContactList=Liste over kontakt-merker/kategorier -CatSupLinks=Lenker mellom leverandører og merker/kategorier +CatContactList=Liste over kontaktersr etiketter/kategorier +CatProjectsList=Liste over prosjekters etiketter/kategorier +CatUsersList=Liste over brukeres etiketter/kategorier +CatSupLinks=Koblinger mellom leverandører og etiketter/kategorier CatCusLinks=Lenker mellom kunder/prospekter og merker/kategorier CatContactsLinks=Koblinger mellom kontakter/adresser og koder/kategorier CatProdLinks=Lenker mellom varer/tjenester og merker/kategorier -CatProJectLinks=Lenker mellom prosjekter og merker/kategorier +CatMembersLinks=Lenker mellom medlemmer og merker/kategorier +CatProjectsLinks=Lenker mellom prosjekter og merker/kategorier +CatUsersLinks=Koblinger mellom brukere og etiketter/kategorier DeleteFromCat=Fjern fra merker/kategorier ExtraFieldsCategories=Komplementære attributter CategoriesSetup=Oppsett av merker/kategorier CategorieRecursiv=Automatisk lenke til overordnet merke/kategori CategorieRecursivHelp=Hvis alternativet er på, når du legger til et produkt i en underkategori, vil produktet også bli lagt til i overordnet kategori. AddProductServiceIntoCategory=Legg til følgende vare/tjeneste -AddCustomerIntoCategory=Assign category to customer -AddSupplierIntoCategory=Assign category to supplier +AddCustomerIntoCategory=Tilordne kategori til kunde +AddSupplierIntoCategory=Tilordne kategori til leverandør ShowCategory=Vis merke/kategori ByDefaultInList=Som standard i liste ChooseCategory=Velg kategori diff --git a/htdocs/langs/nb_NO/companies.lang b/htdocs/langs/nb_NO/companies.lang index 8a54b565605..d3302eb55c9 100644 --- a/htdocs/langs/nb_NO/companies.lang +++ b/htdocs/langs/nb_NO/companies.lang @@ -124,7 +124,7 @@ ProfId1AT=Prof Id 1 (USt.-IdNr) ProfId2AT=Prof Id 2 (USt.-IdNr) ProfId3AT=Prof Id 3 (Handelsregister-Nr.) ProfId4AT=- -ProfId5AT=EORI number +ProfId5AT=EORI-nummer ProfId6AT=- ProfId1AU=Prof ID 1 (ABN) ProfId2AU=- @@ -136,7 +136,7 @@ ProfId1BE=Prof ID 1 (Profesjonelt nummer) ProfId2BE=- ProfId3BE=- ProfId4BE=- -ProfId5BE=EORI number +ProfId5BE=EORI-nummer ProfId6BE=- ProfId1BR=- ProfId2BR=IE (Inscricao Estadual) @@ -148,7 +148,7 @@ ProfId1CH=UID-Nummer ProfId2CH=- ProfId3CH=Prof ID 1 (Føderalt nummer) ProfId4CH=Prof ID 2 (Commercial Record number) -ProfId5CH=EORI number +ProfId5CH=EORI-nummer ProfId6CH=- ProfId1CL=Prof ID 1 (RUT) ProfId2CL=- @@ -166,19 +166,19 @@ ProfId1DE=Prof ID 1 (USt.-IdNr) ProfId2DE=Prof ID 2 (USt.-Nr) ProfId3DE=Prof ID 3 (Handelsregister-Nr.) ProfId4DE=- -ProfId5DE=EORI number +ProfId5DE=EORI-nummer ProfId6DE=- ProfId1ES=Prof ID 1 (CIF / NIF) ProfId2ES=Prof ID 2 (personnummer) ProfId3ES=Prof ID 3 (CNAE) ProfId4ES=Prof ID 4 (Collegiate nummer) -ProfId5ES=EORI number +ProfId5ES=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 number +ProfId5FR=EORI-nummer ProfId6FR=- ProfId1GB=Prof Id 1 (Registreringsnummer) ProfId2GB=- @@ -202,18 +202,18 @@ ProfId1IT=- ProfId2IT=- ProfId3IT=- ProfId4IT=- -ProfId5IT=EORI number +ProfId5IT=EORI-nummer ProfId1LU=Prof. ID 1 (R.C.S Luxembourg) ProfId2LU=Prof. ID (Forretningslisens) ProfId3LU=- ProfId4LU=- -ProfId5LU=EORI number +ProfId5LU=EORI-nummer ProfId6LU=- ProfId1MA=Prof ID 1 (RC) ProfId2MA=Prof ID 2 (patent) ProfId3MA=Prof ID 3 (IF) ProfId4MA=Prof ID 4 (CNSS) -ProfId5MA=Id prof. 5 (I.C.E.) +ProfId5MA=Profesjonell ID 5 (I.C.E.) ProfId6MA=- ProfId1MX=Prof ID 1 (RFC). ProfId2MX=Prof ID 2 (R.. P. IMSS) @@ -225,13 +225,13 @@ ProfId1NL=KVK nummer ProfId2NL=- ProfId3NL=- ProfId4NL=Burgerservicenummer (BSN) -ProfId5NL=EORI number +ProfId5NL=EORI-nummer ProfId6NL=- ProfId1PT=Prof ID 1 (NIPC) ProfId2PT=Prof ID 2 (Personnummer) ProfId3PT=Prof ID 3 (Commercial Record number) ProfId4PT=Prof ID 4 (Conservatory) -ProfId5PT=EORI number +ProfId5PT=EORI-nummer ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +255,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=EORI-nummer ProfId6RO=- ProfId1RU=Prof ID 1 (OGRN) ProfId2RU=Prof ID 2 (INN) @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Sjekk internasjonal MVA-ID på EU-kommisjonens nettste VATIntraManualCheck=Du kan også sjekke manuelt på den Europeiske kommisjonens nettside <a href="%s" target="_blank"> %s </a> ErrorVATCheckMS_UNAVAILABLE=Sjekk er ikke tilgjengelig. Tjenesten er ikke tilgjengelig for landet (%s). NorProspectNorCustomer=Ikke prospekt, eller kunde -JuridicalStatus=Juridisk enhetstype +JuridicalStatus=Forretningsenhetstype Workforce=Arbeidsstyrke Staff=Ansatte ProspectLevelShort=Potensiell diff --git a/htdocs/langs/nb_NO/compta.lang b/htdocs/langs/nb_NO/compta.lang index 41a36d6b33f..81f72a4f4d7 100644 --- a/htdocs/langs/nb_NO/compta.lang +++ b/htdocs/langs/nb_NO/compta.lang @@ -111,7 +111,7 @@ Refund=Refusjon SocialContributionsPayments=Skatter- og avgiftsbetalinger ShowVatPayment=Vis MVA betaling TotalToPay=Sum å betale -BalanceVisibilityDependsOnSortAndFilters=Balanse er synlig i denne listen bare hvis tabellen er sortert stigende etter %s og filtrert for en bankkonto +BalanceVisibilityDependsOnSortAndFilters=Balanse er bare synlig i denne listen hvis tabellen er sortert på %s og filtrert på 1 bankkonto (uten andre filtre) CustomerAccountancyCode=Kunde-regnskapskode SupplierAccountancyCode=Leverandørens regnskapskode CustomerAccountancyCodeShort=Kundens regnskapskode @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Er du sikker på at du vil slette denne skatten/ ExportDataset_tax_1=Skatte- og avgiftsbetalinger CalcModeVATDebt=Modus <b>%sMVA ved commitment regnskap%s</b>. CalcModeVATEngagement=Modus <b>%sMVA på inntekt-utgifter%s</b>. -CalcModeDebt=Analyse av kjente registrerte fakturaer selv om de ennå ikke er regnskapsført i hovedbok. +CalcModeDebt=Analyse av kjente dokumenter, selv om de ennå ikke er regnskapsført i hovedbok. CalcModeEngagement=Analyse av kjente registrerte innbetalinger, selv om de ennå ikke er regnskapsført i Lhovedbokenedger. CalcModeBookkeeping=Analyse av data journalisert i hovedbokens tabell CalcModeLT1= Modus <b>%sRE på kundefakturaer - leverandørfakturaer%s</b> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Inn/ut balanse. Årlig oppsummering AnnualByCompanies=Inntekts - og utgiftsbalanse, etter forhåndsdefinerte grupper av kontoer AnnualByCompaniesDueDebtMode=Balanse over inntekt og utgifter, detalj av forhåndsdefinerte grupper, modus<b>%sKredit-Debet%s</b> viser<b>Forpliktelsesregnskap </b>. AnnualByCompaniesInputOutputMode=Inntekts- og utgiftsbalanse, detalj ved forhåndsdefinerte grupper, modus <b> %sInntekter-Utgifter%s</b> viser<b>kontantregnskap</b>. -SeeReportInInputOutputMode=Se %sanalyse av betalinger%s for en beregning av faktiske utbetalinger gjort selv om de ennå ikke er regnskapsført i hovedboken. -SeeReportInDueDebtMode=Se %sanalyse av fakturaer%s for en beregning basert på kjente registrerte fakturaer, selv om de ennå ikke er regnskapsført i hovedboken. -SeeReportInBookkeepingMode=Se <b> %sRegnskapsrapport%s </b> for en beregning på <b> Hovedbokstabell </b> +SeeReportInInputOutputMode=Se <b> %sanalyse av betalinger%s </b> for en beregning basert på <b> registrerte betalinger </b> gjort selv om de ennå ikke er bokført i hovedbok +SeeReportInDueDebtMode=Se <b> %sanalyse av registrerte dokumenter%s </b> for en beregning basert på kjente <b> registrerte dokumenter </b> selv om de ennå ikke er regnskapsført +SeeReportInBookkeepingMode=Se <b> %sanalyse av hovedboktabell%s </b> for en rapport basert på <b> hovedboktabel </b> RulesAmountWithTaxIncluded=- Viste beløp er inkludert alle avgifter RulesResultDue=- Inkluderer utestående fakturaer, utgifter, mva, donasjoner enten de er betalt eller ikke. Inkluderer også innbetalt lønn. <br> - Basert på faktureringsdato for fakturaer og på forfallsdato for utgifter eller skattebetalinger. For lønn definert med Lønnsmodul brukes valuteringsdato. RulesResultInOut=- Inkluderer betalinger gjort mot fakturaer, utgifter, MVA og lønn. <br> Basert på betalingsdato. Donasjonsdato for donasjoner diff --git a/htdocs/langs/nb_NO/cron.lang b/htdocs/langs/nb_NO/cron.lang index 22d6c9ff273..74ea3057151 100644 --- a/htdocs/langs/nb_NO/cron.lang +++ b/htdocs/langs/nb_NO/cron.lang @@ -6,14 +6,15 @@ Permission23102 = Opprett/endre planlagt jobb Permission23103 = Slett planlagt jobb Permission23104 = Utfør planlagt jobb # Admin -CronSetup= Administrasjon av planlagte oppgaver -URLToLaunchCronJobs=URL for å sjekke og kjøre kvalifiserte cron-jobber -OrToLaunchASpecificJob=eller for å sjekke og kjøre en spesifikk jobb +CronSetup=Administrasjon av planlagte oppgaver +URLToLaunchCronJobs=URL for å sjekke og starte kvalifiserte cron-jobber fra en nettleser +OrToLaunchASpecificJob=Eller for å sjekke og starte en bestemt jobb fra en nettleser KeyForCronAccess=Sikkerhetsnøkkel for URL for å starte cronjobber FileToLaunchCronJobs=Kommandolinje for å sjekke og starte kvalifiserte cron-jobber CronExplainHowToRunUnix=I Unix-miljøer bør du bruke følgende crontab-oppføring for å kjøre kommandolinje hvert 5. minutt -CronExplainHowToRunWin=I Microsoft(tm) Windows-miljø kan du bruke planlagte oppgaver-verktøyet for å kjøre kommandolinje hvert 5. minutt +CronExplainHowToRunWin=I Microsoft Windows-miljø kan du bruke Planlagt oppgaveverktøy til å kjøre kommandolinjen hvert 5. minutt CronMethodDoesNotExists=Klasse %s inneholder ingen metode %s +CronMethodNotAllowed=Metode %s av klasse %s er i svartelisten over forbudte metoder CronJobDefDesc=Cronjobbprofiler er definert i modulbeskrivelsesfilen. Når modulen er aktivert, er de lastet og tilgjengelig slik at du kan administrere jobbene fra administrasjonsmenyen %s. CronJobProfiles=Liste over forhåndsdefinerte cronjobbprofiler # Menu @@ -42,10 +43,11 @@ CronModule=Modul CronNoJobs=Ingen registrerte jobber CronPriority=Prioritet CronLabel=Etikett -CronNbRun=Antall starter -CronMaxRun=Max number launch +CronNbRun=Antall kjøringer +CronMaxRun=Maksimum antall kjøringer CronEach=Alle JobFinished=Jobb startet og fullført +Scheduled=Planlagt #Page card CronAdd= Legg til jobber CronEvery=Kjør jobb hver @@ -56,16 +58,16 @@ CronNote=Kommentar CronFieldMandatory=Feltene %s er obligatoriske CronErrEndDateStartDt=Sluttdato kan ikke være før startdato StatusAtInstall=Status for modulinstallasjon -CronStatusActiveBtn=Aktiver +CronStatusActiveBtn=Tidsplan CronStatusInactiveBtn=Deaktiver CronTaskInactive=Denne jobben er deaktivert CronId=ID CronClassFile=Filnavn med klasse -CronModuleHelp=Navn på Dolibarr-modulkatalogen (virker også med ekstern Dolibarr-modul). <BR> For eksempel å anrope hente-metoden for Dolibarr Product objektet/htdocs/<u>product</u>/class/product.class.php, er verdien for modulen<br><i> produkt </i> -CronClassFileHelp=Den relative banen og filnavnet som skal lastes (banen er i forhold til webserverens rotkatalog). <BR> For eksempel å anrope hente-metoden for Dolibarr Product objekt htdocs/product/class/<u> product.class.php</u>, er verdien for klassefilnavnet<br><i> produkt/class/product.class.php</i> -CronObjectHelp=Objektnavnet som skal lastes inn. <BR> For eksempel å anrope hente-metoden for Dolibarr Produkt-objektet /htdocs/product/class/product.class.php, er verdien for klassefilnavnet <br> <i> Product </i> -CronMethodHelp=Objektmetoden som skal kjøres. <BR> For eksempel å anrope hente-metoden for Dolibarr Product objektet /htdocs/product/class/product.class.php, er verdien for metoden <br> <i> hent </i> -CronArgsHelp=Metodeargumenter. <BR> For eksempel å anrope hente-metoden for Dolibarr Product objektet /htdocs/product/class/product.class.php, kan verdien for parametre være <br><i> 0, ProductRef </i> +CronModuleHelp=Navn på Dolibarr-modulkatalog (også arbeid med ekstern Dolibarr-modul). <BR> For eksempel å kalle hentmetoden for Dolibarr Produkt objektet /htdocs/<u>product</u>/class/product.class.php, er verdien for modulen <br><i> produkt </i> +CronClassFileHelp=Den relative banen og filnavnet som skal lastes (banen er i forhold til webserverens rotkatalog). <BR> For eksempel for å kalle hentmetoden for Dolibarr Produkt-objekt htdocs/product/class/ <u> product.class.php </u>, er verdien for klassen filnavn <br><i> produkt/klasse/product.class.php</i> +CronObjectHelp=Objektnavnet som skal lastes inn. <BR> For eksempel for å kalle hentmetoden for Dolibarr Product-objektet /htdocs/product/class/product.class.php, er verdien for klassefilenavnet <br> <i> Produkt </i> +CronMethodHelp=Objektmetoden å kjøre. <BR> For eksempel å kalle hentmetoden for Dolibarr Product-objektet /htdocs/product/class/product.class.php, er verdien for metoden <br> <i> hent </i> +CronArgsHelp=Metoden argumenter. <BR> For eksempel for å kalle hentemetoden for Dolibarr Product-objektet /htdocs/product/class/product.class.php, kan verdien for paramters være<br> <i> 0, ProductRef </i> CronCommandHelp=System kommandolinje som skal kjøres CronCreateJob=Opprett ny planlagt jobb CronFrom=Fra @@ -76,8 +78,14 @@ CronType_method=Anropsmetode for en PHP-klasse CronType_command=Shell kommando CronCannotLoadClass=Kan ikke laste klassefil %s (for å bruke klasse %s) CronCannotLoadObject=Klassefil %s ble lastet, men objektet %s ble ikke funnet i den -UseMenuModuleToolsToAddCronJobs=Gå til menyen "Hjem - Administrative verktøy - Planlagte jobber" for å se og endre planlagte jobber +UseMenuModuleToolsToAddCronJobs=Gå til menyen " <a href="%s">Hjem - Administratorverktøy - Planlagte jobber</a>" for å se og redigere planlagte jobber. JobDisabled=Jobb deaktivert MakeLocalDatabaseDumpShort=Backup av lokal database -MakeLocalDatabaseDump=Create a local database dump. Parameters are: compression ('gz' or 'bz' or 'none'), backup type ('mysql' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +MakeLocalDatabaseDump=Opprett en lokal database dump. Parametrene er: komprimering ('gz' eller 'bz' eller 'ingen'), backup type ('mysql', 'pgsql', 'auto'), 1, 'auto' eller filnavn for å bygge, antall backupfiler som skal beholdes WarningCronDelayed=NB, for ytelsesformål, uansett neste utførelsesdato for aktiverte jobber, kan jobbene dine forsinkes til maksimalt %s timer før de kjøres. +DATAPOLICYJob=Datarenser og anonymiserer +JobXMustBeEnabled=Jobb %s må være aktivert +# Cron Boxes +LastExecutedScheduledJob=Sist utførte planlagte jobb +NextScheduledJobExecute=Neste planlagte jobb som skal utføres +NumberScheduledJobError=Antall planlagte jobber med feil diff --git a/htdocs/langs/nb_NO/deliveries.lang b/htdocs/langs/nb_NO/deliveries.lang index a6d522cecfc..97f8ad9cdac 100644 --- a/htdocs/langs/nb_NO/deliveries.lang +++ b/htdocs/langs/nb_NO/deliveries.lang @@ -2,7 +2,7 @@ Delivery=Levering DeliveryRef=Leveranse ref. DeliveryCard=Kvitteringskort -DeliveryOrder=Delivery receipt +DeliveryOrder=Leveringsbekreftelse DeliveryDate=Leveringsdato CreateDeliveryOrder=Generer leveringskvittering DeliveryStateSaved=Leveringsstatus lagret @@ -27,5 +27,6 @@ Recipient=Mottaker ErrorStockIsNotEnough=Ikke nok på lager Shippable=Kan sendes NonShippable=Kan ikke sendes +ShowShippableStatus=Vis status sendingsklar ShowReceiving=Vis leveringskvittering NonExistentOrder=Ikkeeksisterende ordre diff --git a/htdocs/langs/nb_NO/ecm.lang b/htdocs/langs/nb_NO/ecm.lang index 90e2fb21512..4e037c091f6 100644 --- a/htdocs/langs/nb_NO/ecm.lang +++ b/htdocs/langs/nb_NO/ecm.lang @@ -23,7 +23,7 @@ ECMSearchByKeywords=Søk på nøkkelord ECMSearchByEntity=Søk på objekt ECMSectionOfDocuments=Mapper med dokumenter ECMTypeAuto=Automatisk -ECMDocsBy=Documents linked to %s +ECMDocsBy=Dokumenter knyttet til %s ECMNoDirectoryYet=Ingen mapper opprettet ShowECMSection=Vis mappe DeleteSection=Fjern mappe diff --git a/htdocs/langs/nb_NO/errors.lang b/htdocs/langs/nb_NO/errors.lang index 38fa5f550a7..798e6598202 100644 --- a/htdocs/langs/nb_NO/errors.lang +++ b/htdocs/langs/nb_NO/errors.lang @@ -8,6 +8,7 @@ ErrorBadEMail=E-post %s er feil ErrorBadMXDomain=E-post %s virker feil (domenet har ingen gyldig MX-post) ErrorBadUrl=Url %s er feil ErrorBadValueForParamNotAString=Feil parameterverdi. Dette skjer vanligvis når en oversettelse mangler. +ErrorRefAlreadyExists=Referanse <b> %s </b> eksisterer allerede. ErrorLoginAlreadyExists=brukernavnet %s eksisterer allerede. ErrorGroupAlreadyExists=Gruppen %s eksisterer allerede. ErrorRecordNotFound=Posten ble ikke funnet. @@ -49,6 +50,7 @@ ErrorFieldsRequired=Noen påkrevde felt er ikke fylt ut. ErrorSubjectIsRequired=Epost-emnet er påkrevd ErrorFailedToCreateDir=Kunne ikke opprette mappen. Kontroller at webserverbrukeren har skriverettigheter i dokumentmappen i Dolibarr. Hvis <b>safe_mode</b> er akivert i PHP, sjekk at webserveren eier eller er med i gruppen(eller bruker) for Dolibarr php-filer. ErrorNoMailDefinedForThisUser=Ingen e-post angitt for denne brukeren. +ErrorSetupOfEmailsNotComplete=Installasjonen av e-post er ikke fullført ErrorFeatureNeedJavascript=Denne funksjonen krever javascript for å virke. Endre dette i Oppsett - Visning. ErrorTopMenuMustHaveAParentWithId0=En meny av typen 'Topp' kan ikke ha noen foreldremeny. Skriv 0 i foreldremeny eller velg menytypen 'Venstre'. ErrorLeftMenuMustHaveAParentId=En meny av typen 'Venstre' må ha foreldre-ID. @@ -76,7 +78,7 @@ ErrorExportDuplicateProfil=Profilnavnet til dette eksport-oppsettet finnes aller ErrorLDAPSetupNotComplete=Dolibarr-LDAP oppsett er ikke komplett. ErrorLDAPMakeManualTest=En .ldif fil er opprettet i mappen %s. Prøv å lese den manuelt for å se mer informasjon om feil. ErrorCantSaveADoneUserWithZeroPercentage=Kan ikke lagre en handling med "status ikke startet" hvis feltet "ferdig innen" også er fylt ut. -ErrorRefAlreadyExists=Ref bruket til oppretting finnes allerede. +ErrorRefAlreadyExists=Referanse <b> %s </b> eksisterer allerede. ErrorPleaseTypeBankTransactionReportName=Vennligst skriv inn kontoutskriftsnavnet der oppføringen skal rapporteres (Format YYYYMM eller YYYYMMDD) ErrorRecordHasChildren=Kunne ikke slette posten fordi den har noen under-oppføringer. ErrorRecordHasAtLeastOneChildOfType=Objektet har minst under-objekt av typen %s @@ -246,6 +248,14 @@ ErrorProductDoesNotNeedBatchNumber=Feil, vare'<b> %s </b>' godtar ikke lot/serie ErrorFailedToReadObject=Feil, kunne ikke lese objektet av typen <b> %s </b> ErrorParameterMustBeEnabledToAllwoThisFeature=Feil, parameter <b> %s </b> må være aktivert i <b> conf/conf.php <b> for å tillate bruk av kommandolinjegrensesnitt av den interne jobbplanleggeren ErrorLoginDateValidity=Feil, denne påloggingen er utenfor gyldig datoområde +ErrorValueLength=Lengden på feltet '<b> %s </b>' må være høyere enn '<b> %s </b>' +ErrorReservedKeyword=Ordet '<b> %s </b>' er et reservert nøkkelord +ErrorNotAvailableWithThisDistribution=Ikke tilgjengelig i denne distribusjonen +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 + # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=PHP-parameteren upload_max_filesize (%s) er høyere enn PHP-parameteren post_max_size (%s). Dette er ikke et konsistent oppsett. WarningPasswordSetWithNoAccount=Et passord ble satt for dette medlemmet, men ingen brukerkonto ble opprettet. Det fører til at passordet ikke kan benyttes for å logge inn på Dolibarr. Det kan brukes av en ekstern modul/grensesnitt, men hvis du ikke trenger å definere noen innlogging eller passord for et medlem, kan du deaktivere alternativet "opprett en pålogging for hvert medlem" fra medlemsmodul-oppsettet. Hvis du trenger å administrere en pålogging, men ikke trenger noe passord, kan du holde dette feltet tomt for å unngå denne advarselen. Merk: E-post kan også brukes som en pålogging dersom medlemmet er knyttet til en bruker. @@ -276,3 +286,4 @@ WarningSomeBankTransactionByChequeWereRemovedAfter=Noen banktransaksjoner ble fj WarningFailedToAddFileIntoDatabaseIndex=Advarsel, kunne ikke legge til filoppføring i ECM-databasens indekstabell 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. diff --git a/htdocs/langs/nb_NO/exports.lang b/htdocs/langs/nb_NO/exports.lang index 3bf7bff58ef..e4e5740d9ee 100644 --- a/htdocs/langs/nb_NO/exports.lang +++ b/htdocs/langs/nb_NO/exports.lang @@ -26,6 +26,8 @@ FieldTitle=Felt tittel NowClickToGenerateToBuildExportFile=Velg filformatet i kombinasjonsboksen og klikk på "Generer" for å bygge eksportfilen ... AvailableFormats=Tilgjengelige formater LibraryShort=Bibliotek +ExportCsvSeparator=Csv-karakterseparator +ImportCsvSeparator=Csv-karakterseparator Step=Trinn FormatedImport=Importassistent FormatedImportDesc1=Denne modulen lar deg oppdatere eksisterende data eller legge til nye objekter i databasen fra en fil, ved hjelp av en assistent. @@ -131,3 +133,4 @@ KeysToUseForUpdates=Nøkkel (kolonne) som skal brukes til <b> oppdatering av </b NbInsert=Antall innsatte linjer: %s NbUpdate=Antall oppdaterte linjer: %s MultipleRecordFoundWithTheseFilters=Flere poster er blitt funnet med disse filtrene: %s +StocksWithBatch=Beholdning og plassering (varehus) av produkter med lot/serienummer diff --git a/htdocs/langs/nb_NO/intracommreport.lang b/htdocs/langs/nb_NO/intracommreport.lang index 09e18b987c2..83bcc175538 100644 --- a/htdocs/langs/nb_NO/intracommreport.lang +++ b/htdocs/langs/nb_NO/intracommreport.lang @@ -4,12 +4,12 @@ IntracommReportSetup = Oppsett av iIntracommrapport IntracommReportAbout = Om intracommreport # Setup -INTRACOMMREPORT_NUM_AGREMENT=Numéro d'agrément (délivré par le CISD de rattachement) +INTRACOMMREPORT_NUM_AGREMENT=Godkjenningsnummer (utstedt av vedleggets CISD) INTRACOMMREPORT_TYPE_ACTEUR=Aktørtype INTRACOMMREPORT_ROLE_ACTEUR=Aktørrolle -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_NIV_OBLIGATION_INTRODUCTION=Forpliktelsesnivå ved introduksjoner +INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION=Forpliktelsesnivå på forsendelser +INTRACOMMREPORT_CATEG_FRAISDEPORT=Servicekategori av typen "Porto" INTRACOMMREPORT_NUM_DECLARATION=Deklarantnummer @@ -31,7 +31,7 @@ IntracommReportTitle=Klargjøring av en XML-fil i ProDouane-format # List IntracommReportList=Liste over genererte deklarasjoner -IntracommReportNumber=Numero of declaration +IntracommReportNumber=Antall erklæringer IntracommReportPeriod=Analyseperiode IntracommReportTypeDeclaration=Type deklarasjon IntracommReportDownload=last ned XML-fil diff --git a/htdocs/langs/nb_NO/languages.lang b/htdocs/langs/nb_NO/languages.lang index 96839b3311b..9abffa71b5b 100644 --- a/htdocs/langs/nb_NO/languages.lang +++ b/htdocs/langs/nb_NO/languages.lang @@ -40,7 +40,7 @@ Language_es_PA=Spansk (Panama) Language_es_PY=Spansk (Paraguay) Language_es_PE=Spansk (Peru) Language_es_PR=Spansk (Puerto Rico) -Language_es_US=Spanish (USA) +Language_es_US=Spansk (USA) Language_es_UY=Spansk (Uruguay) Language_es_GT=Spansk (Guatemala) Language_es_VE=Spansk (Venezuela) diff --git a/htdocs/langs/nb_NO/mails.lang b/htdocs/langs/nb_NO/mails.lang index 5d1b285f2bb..9251f3d2386 100644 --- a/htdocs/langs/nb_NO/mails.lang +++ b/htdocs/langs/nb_NO/mails.lang @@ -92,6 +92,7 @@ MailingModuleDescEmailsFromUser=E-postmeldinger innlagt av bruker MailingModuleDescDolibarrUsers=Brukere med e-post MailingModuleDescThirdPartiesByCategories=Tredjeparter (etter kategorier) SendingFromWebInterfaceIsNotAllowed=Det er ikke tillatt å sende fra webgrensesnitt. +EmailCollectorFilterDesc=Alle filtre må samsvare for at en e-post skal hentes inn # Libelle des modules de liste de destinataires mailing LineInFile=Antall linjer i filen: %s @@ -129,8 +130,8 @@ NotificationsAuto=Påminnelser Auto. NoNotificationsWillBeSent=Ingen automatiske e-postvarsler er planlagt for denne hendelsestypen og selskap ANotificationsWillBeSent=Én automatisk varsling vil bli sendt via e-post SomeNotificationsWillBeSent=%s automatiske varsler vil bli sendt via e-post -AddNewNotification=Aktiver et nytt automatisk mål/hendelse for e-postvarsling -ListOfActiveNotifications=Liste over alle aktive mål/hendelser for automatisk e-postvarsling +AddNewNotification=Abonner på et nytt automatisk e-postvarsel (mål/hendelse) +ListOfActiveNotifications=Liste opp alle aktive abonnementer (mål/hendelser) for automatisk e-postvarsling ListOfNotificationsDone=Liste over alle automatiske e-postvarsler som er sendt MailSendSetupIs=E-postutsendelser er blitt satt opp til '%s'. Denne modusen kan ikke brukes ved masseutsendelser MailSendSetupIs2=Logg på som administrator, gå til menyen %sHjem - Oppsett - E-post%s for å endre parameter <strong>'%s'</strong> for å bruke '%s' modus. I denne modusen for du tilgang til oppsett av SMTP-server og muligheten til å bruke masseutsendelser. @@ -141,7 +142,7 @@ UseFormatFileEmailToTarget=Importert fil må følge formatet <strong>epost;navn; UseFormatInputEmailToTarget=Tast inn en streng med format <strong>epost;navn;fornavn;annet</strong> MailAdvTargetRecipients=Mottakere (avansert utvalg) AdvTgtTitle=Fyll inn felt for å forhåndsvelge tredjeparter eller kontakter/adresser som skal velges -AdvTgtSearchTextHelp=Bruk %% som jokertegn. For eksempel for å finne alle element som <b> jan, jon, jimmy </b>, kan du skrive inn <b> j%% </b>. Du kan også bruke; som separator for verdi, og bruk ! for unntatt denne verdien. For eksempel vil <b> jan; jon; jim%%;! Jimo;! Jima% </b> målrette alle jan, jon, starter med jim men ikke jimo og ikke alt som starter med jima +AdvTgtSearchTextHelp=Bruk %% som jokertegn. For eksempel for å finne alt som <b> jean, joe, jim </b>, kan du legge inn <b> j%% </b>, du kan også bruke ; som skilletegn for verdi, og bruk ! for å ekskludere denne verdien. For eksempel <b> jean; joe; jim%%;!Jimo;!Jima%% </b> vil målrette mot alle jean, joe, starter med jim, men ikke jimo og ikke alt som starter med jima AdvTgtSearchIntHelp=Bruk intervall for å velge heltall eller desimaltall AdvTgtMinVal=Minimumsverdi AdvTgtMaxVal=Maksimumsverdi @@ -174,3 +175,5 @@ Answered=Besvarte IsNotAnAnswer=Er ikke svar (første e-post) IsAnAnswer=Er et svar på en første e-post RecordCreatedByEmailCollector=Post opprettet av Email Collector %s fra e-post %s +DefaultBlacklistMailingStatus=Standard kontaktstatus for avslag på masse-e-post +DefaultStatusEmptyMandatory=Tom, men obligatorisk diff --git a/htdocs/langs/nb_NO/main.lang b/htdocs/langs/nb_NO/main.lang index 8def7e71e28..15410c383e2 100644 --- a/htdocs/langs/nb_NO/main.lang +++ b/htdocs/langs/nb_NO/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=Ingen mal tilgjengelig for denne e-posttypen AvailableVariables=Tilgjengelige erstatningsverdier NoTranslation=Ingen oversettelse Translation=Oversettelse +CurrentTimeZone=Tidssone for PHP (server) EmptySearchString=Angi ikke-tomme søkekriterier +EnterADateCriteria=Skriv inn datokriterier NoRecordFound=Ingen post funnet NoRecordDeleted=Ingen poster slettet NotEnoughDataYet=Ikke nok data @@ -85,6 +87,8 @@ FileWasNotUploaded=En fil er valgt som vedlegg, men er ennå ikke lastet opp. Kl NbOfEntries=Antall oppføringer GoToWikiHelpPage=Les online-hjelp (Du må være tilknyttet internett) GoToHelpPage=Les hjelp +DedicatedPageAvailable=Det finnes en dedikert hjelpeside relatert til din nåværende side +HomePage=Hjemmeside RecordSaved=Posten er lagret RecordDeleted=Oppføring slettet RecordGenerated=Post generert @@ -197,7 +201,7 @@ ReOpen=Gjenåpne Upload=Last opp ToLink=Lenke Select=Velg -SelectAll=Select all +SelectAll=Velg alt Choose=Velg Resize=Endre størrelse ResizeOrCrop=Endre størrelse eller beskjær @@ -220,6 +224,7 @@ Value=Verdi PersonalValue=Personlig verdi NewObject=Ny %s NewValue=Ny verdi +OldValue=Gammel verdi %s CurrentValue=Gjeldende verdi Code=Kode Type=Type @@ -258,7 +263,7 @@ Cards=Kort Card=Kort Now=Nå HourStart=Start time -Deadline=Deadline +Deadline=Frist Date=Dato DateAndHour=Dato og tid DateToday=Dagens dato @@ -267,10 +272,10 @@ DateStart=Startdato DateEnd=Sluttdato DateCreation=Opprettet den DateCreationShort=Oppr. dato -IPCreation=Creation IP +IPCreation=Opprettelses-IP DateModification=Endret den DateModificationShort=Mod. dato -IPModification=Modification IP +IPModification=Modifikasjons-IP DateLastModification=Siste endringsdato DateValidation=Validert den DateClosing=Lukket den @@ -433,6 +438,7 @@ RemainToPay=Gjenstår å betale Module=Modul/Applikasjon Modules=Moduler/Applikasjoner Option=Opsjon +Filters=Filtre List=Liste FullList=Full liste FullConversation=Full samtale @@ -650,6 +656,7 @@ SupplierPreview=Leverandør forhåndsvisning ShowCustomerPreview=Vis kundeforhåndsvisning ShowSupplierPreview=Vis leverandør forhåndsvisning RefCustomer=Kundereferanse +InternalRef=Intern ref. Currency=Valuta InfoAdmin=Informasjon for administratorer Undo=Angre @@ -671,7 +678,7 @@ SendMail=Send e-post Email=E-post NoEMail=Ingen e-post AlreadyRead=Allerede lest -NotRead=Ikke lest +NotRead=Ulest NoMobilePhone=Ingen mobiltelefon Owner=Eier FollowingConstantsWillBeSubstituted=Følgende konstanter vil bli erstattet med korresponderende verdi. @@ -1106,4 +1113,10 @@ SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry=Sikkerhetstoken har ut UpToDate=Oppdatert OutOfDate=Utdatert EventReminder=Påminnelse om hendelse -UpdateForAllLines=Update for all lines +UpdateForAllLines=Oppdatering for alle linjer +OnHold=Venter +Civility=Tiltale +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 diff --git a/htdocs/langs/nb_NO/members.lang b/htdocs/langs/nb_NO/members.lang index 8cebd358f8a..38f06382279 100644 --- a/htdocs/langs/nb_NO/members.lang +++ b/htdocs/langs/nb_NO/members.lang @@ -80,7 +80,7 @@ DeleteType=Slett VoteAllowed=Stemming tillatt Physical=Fysisk Moral=Moralsk -MorAndPhy=Moral and Physical +MorAndPhy=Moralsk og fysisk Reenable=Reaktiverer ResiliateMember=Terminer et medlem ConfirmResiliateMember=Er du sikker på at du vil terminere dette medlemmet? @@ -177,7 +177,7 @@ MenuMembersStats=Statistikk LastMemberDate=Siste medlemsdato LatestSubscriptionDate=Siste abonnementsdato MemberNature=Medlemskapets art -MembersNature=Nature of members +MembersNature=Medlemmenes art Public=Informasjon er offentlig NewMemberbyWeb=Nytt medlem lagt til. Venter på godkjenning NewMemberForm=Skjema for nytt medlem diff --git a/htdocs/langs/nb_NO/modulebuilder.lang b/htdocs/langs/nb_NO/modulebuilder.lang index d68c5733f57..24ffaf2f737 100644 --- a/htdocs/langs/nb_NO/modulebuilder.lang +++ b/htdocs/langs/nb_NO/modulebuilder.lang @@ -40,6 +40,7 @@ PageForCreateEditView=PHP-side for å lage/redigere/vise en post PageForAgendaTab=PHP-side for hendelsesfanen PageForDocumentTab=PHP-side for dokumentfan PageForNoteTab=PHP-side for notatfane +PageForContactTab=PHP-side for kontaktfanen PathToModulePackage=Sti til zip-fil av modul/applikasjonspakke PathToModuleDocumentation=Sti til fil med modul/applikasjonsdokumentasjon (%s) SpaceOrSpecialCharAreNotAllowed=Mellomrom eller spesialtegn er ikke tillatt. @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=Hvis du har kunnskap i SQL og PHP, kan du prøve å bru SeeTopRightMenu=Se <span class="fa fa-bug"></span> i øverste høyre meny AddLanguageFile=Legg til språkfil YouCanUseTranslationKey=Her kan du bruke en nøkkel som er oversettelsesnøkkelen funnet i språkfilen (se kategorien "Språk") -DropTableIfEmpty=(Slett tabell hvis tom) +DropTableIfEmpty=(Fjern tabellen hvis den er tom) TableDoesNotExists=Tabellen %s finnes ikke TableDropped=Tabell %s slettet InitStructureFromExistingTable=Bygg struktur-matrisestrengen fra en eksisterende tabell @@ -126,7 +127,6 @@ UseSpecificEditorURL = Bruk en bestemt editor-URL UseSpecificFamily = Bruk en bestemt familie UseSpecificAuthor = Bruk en bestemt forfatter UseSpecificVersion = Bruk en bestemt innledende versjon -ModuleMustBeEnabled=Modulen/applikasjonen må først aktiveres IncludeRefGeneration=Referansen til objektet må genereres automatisk IncludeRefGenerationHelp=Merk av for dette hvis du vil inkludere kode for å administrere genereringen av referansen automatisk IncludeDocGeneration=Jeg vil generere noen dokumenter fra objektet @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type felt: <br> varchar (99), dobbel (24,8), ekte, tekst, html, AsciiToHtmlConverter=Ascii til HTML konverter AsciiToPdfConverter=Ascii til PDF konverter TableNotEmptyDropCanceled=Tabellen er ikke tom. Drop har blitt kansellert. +ModuleBuilderNotAllowed=Modulbyggeren er tilgjengelig, men ikke tillatt for brukeren din. diff --git a/htdocs/langs/nb_NO/mrp.lang b/htdocs/langs/nb_NO/mrp.lang index b3a5a2c1cd2..befe91b18d4 100644 --- a/htdocs/langs/nb_NO/mrp.lang +++ b/htdocs/langs/nb_NO/mrp.lang @@ -77,4 +77,28 @@ UnitCost=Enhetskostnad TotalCost=Totalkostnad BOMTotalCost=Kostnaden for å produsere denne stykklisten basert på kostnadene for hver mengde og vare som skal konsumeres (bruk kostpris hvis definert, ellers gjennomsnittlig vektet pris hvis definert, ellers den beste kjøpesummen) GoOnTabProductionToProduceFirst=Du må først ha startet produksjonen for å lukke en produksjonsordre (se fanen '%s'). Men du kan kansellere den. -ErrorAVirtualProductCantBeUsedIntoABomOrMo=A kit can't be used into a BOM or a MO +ErrorAVirtualProductCantBeUsedIntoABomOrMo=Et sett kan ikke brukes i en BOM eller en MO +Workstation=Arbeidsstasjon +Workstations=Arbeidsstasjoner +WorkstationsDescription=Håndtering av arbeidsstasjoner +WorkstationSetup = Oppsett av arbeidsstasjoner +WorkstationSetupPage = Oppsettside for arbeidsstasjoner +WorkstationAbout = Om arbeidsstasjon +WorkstationAboutPage = Side om arbeidsstasjoner +WorkstationList=Arbeidsstasjonsliste +WorkstationCreate=Legg til ny arbeidsstasjon +ConfirmEnableWorkstation=Er du sikker på at du vil aktivere arbeidsstasjonen <b> %s </b>? +EnableAWorkstation=Aktiver en arbeidsstasjon +ConfirmDisableWorkstation=Er du sikker på at du vil deaktivere arbeidsstasjonen <b> %s </b>? +DisableAWorkstation=Deaktiver en arbeidsstasjon +DeleteWorkstation=Slett +NbOperatorsRequired=Antall operatører som kreves +THMOperatorEstimated=Anslått operatør THM +THMMachineEstimated=Anslått maskin THM +WorkstationType=Arbeidsstasjonstype +Human=Menneskelig +Machine=Maskin +HumanMachine=Menneske/maskin +WorkstationArea=Arbeidsstasjonsområde +Machines=Maskiner +THMEstimatedHelp=Denne verdien gjør det mulig å definere en prognosekostnad for varen diff --git a/htdocs/langs/nb_NO/other.lang b/htdocs/langs/nb_NO/other.lang index 975342e63b0..5f24b072d78 100644 --- a/htdocs/langs/nb_NO/other.lang +++ b/htdocs/langs/nb_NO/other.lang @@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Utgiftsrapport validert(godkjenning kreves) Notify_EXPENSE_REPORT_APPROVE=Utgiftsrapport godkjent Notify_HOLIDAY_VALIDATE=Permisjonsforespørselen er validert (godkjenning kreves) Notify_HOLIDAY_APPROVE=Permisjonsforespørsel godkjent +Notify_ACTION_CREATE=Lagt til handling i Agenda SeeModuleSetup=Se oppsett av modul %s NbOfAttachedFiles=Antall vedlagte filer/dokumenter TotalSizeOfAttachedFiles=Total størrelse på vedlagte filer/dokumenter @@ -215,6 +216,7 @@ EMailTextExpenseReportValidated=Utgiftsrapport %s er validert. EMailTextExpenseReportApproved=Utgiftsrapport %s er godkjent. EMailTextHolidayValidated=Permisjonsforespørsel %s er validert. EMailTextHolidayApproved=Permisjonsforespørsel %s er godkjent. +EMailTextActionAdded=Handlingen %s er lagt til i agendaen. ImportedWithSet=Datasett for import DolibarrNotification=Automatisk varsling ResizeDesc=Skriv inn ny bredde <b>eller</b> ny høyde. BxH forhold vil bli beholdt . @@ -259,6 +261,7 @@ ContactCreatedByEmailCollector=Kontakt/adresse opprettet av e-post samler fra e- ProjectCreatedByEmailCollector=Prosjekt opprettet av e-post samler fra e-post MSGID %s TicketCreatedByEmailCollector=Supportseddel opprettet av e-post samler fra e-post MSGID %s OpeningHoursFormatDesc=Bruk en bindestrek for å skille åpning og stengetid. <br> Bruk et mellomrom for å angi forskjellige områder. <br> Eksempel: 8-12 14-18 +PrefixSession=Prefiks for økt-ID ##### Export ##### ExportsArea=Eksportområde diff --git a/htdocs/langs/nb_NO/products.lang b/htdocs/langs/nb_NO/products.lang index f4a0610c847..de0d515bf59 100644 --- a/htdocs/langs/nb_NO/products.lang +++ b/htdocs/langs/nb_NO/products.lang @@ -104,11 +104,12 @@ SetDefaultBarcodeType=Angi strekkodetype BarcodeValue=Strekkodeverdi NoteNotVisibleOnBill=Notat (vises ikke på fakturaer, tilbud...) ServiceLimitedDuration=Hvis varen er en tjeneste med begrenset varighet: -FillWithLastServiceDates=Fill with last service line dates +FillWithLastServiceDates=Fyll ut med siste tjenestelinjedatoer MultiPricesAbility=Flere prissegmenter for hver vare/tjeneste (hver kunde er i et segment) MultiPricesNumPrices=Pris antall DefaultPriceType=Basis av priser per standard (med versus uten avgift) når nye salgspriser legges til -AssociatedProductsAbility=Aktiver sett (virtuelle varer) +AssociatedProductsAbility=Aktiver sett (sett bestående av flere varer) +VariantsAbility=Aktiver Varianter (varianter av produkter, for eksempel farge, størrelse) AssociatedProducts=Sett AssociatedProductsNumber=Antall produkter som består av dette settet ParentProductsNumber=Antall foreldre-komponentvarer @@ -167,8 +168,10 @@ BuyingPrices=Innkjøpspris CustomerPrices=Kundepriser SuppliersPrices=Leverandørpriser SuppliersPricesOfProductsOrServices=Leverandørpriser (av varer eller tjenester) -CustomCode=Toll / vare / HS-kode +CustomCode=Toll | Råvare | HS-kode CountryOrigin=Opprinnelsesland +RegionStateOrigin=Region opprinnelse +StateOrigin=Stat | Provins opprinnelse Nature=Produktets art (materiale/ferdig) NatureOfProductShort=Varens art NatureOfProductDesc=Råvare eller ferdig vare @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Bruk den faste prisen PriceByQuantity=Prisen varierer med mengde DisablePriceByQty=Deaktiver mengderabatt PriceByQuantityRange=Kvantumssatser -MultipriceRules=Prissegment-regler +MultipriceRules=Automatiske priser for segment UseMultipriceRules=Bruk prissegmentregler (definert i varemoduloppsett) for å automatisk beregne priser på alle andre segmenter i henhold til første segment PercentVariationOver=%% variasjon over %s PercentDiscountOver=%% rabatt på %s @@ -287,7 +290,7 @@ PriceExpressionEditorHelp5=Tilgjengelige globale verdier: PriceMode=Prismodus PriceNumeric=Nummer DefaultPrice=Standardpris -DefaultPriceLog=Log of previous default prices +DefaultPriceLog=Logg over tidligere standardpriser ComposedProductIncDecStock=Øk/minsk beholdning ved overordnet endring ComposedProduct=Sub-varer MinSupplierPrice=Laveste innkjøpspris diff --git a/htdocs/langs/nb_NO/projects.lang b/htdocs/langs/nb_NO/projects.lang index 962ec3ea1b5..d0c4f24d93e 100644 --- a/htdocs/langs/nb_NO/projects.lang +++ b/htdocs/langs/nb_NO/projects.lang @@ -85,6 +85,7 @@ ProgressCalculated=Progresjon på forbruk WhichIamLinkedTo=som jeg er knyttet til WhichIamLinkedToProject=som jeg er knyttet til prosjektet Time=Tid +TimeConsumed=Forbrukt ListOfTasks=Oppgaveliste GoToListOfTimeConsumed=Gå til liste for tidsbruk GanttView=Gantt visning @@ -213,7 +214,7 @@ ProjectOppAmountOfProjectsByMonth=Beløp i leads pr. måned ProjectWeightedOppAmountOfProjectsByMonth=Vektet beløp i leads pr. måned ProjectOpenedProjectByOppStatus=Åpne prosjekt|potensielle kunder etter status ProjectsStatistics=Statistikk over prosjekter eller potensielle kunder -TasksStatistics=Statistics on tasks of projects or leads +TasksStatistics=Statistikk over oppgaver til prosjekter eller potensielle kunder TaskAssignedToEnterTime=Oppgave tildelt. Tidsbruk kan legges til IdTaskTime=Oppgave-tid ID YouCanCompleteRef=Hvis du vil fullføre referansen med en suffiks, anbefales det å legge til et tegn for å skille det, slik at den automatiske nummereringen fortsatt fungerer riktig for neste prosjekt. For eksempel %s-MYSUFFIX diff --git a/htdocs/langs/nb_NO/recruitment.lang b/htdocs/langs/nb_NO/recruitment.lang index 4171ab7a120..a74389d13ff 100644 --- a/htdocs/langs/nb_NO/recruitment.lang +++ b/htdocs/langs/nb_NO/recruitment.lang @@ -47,29 +47,30 @@ ResponsibleOfRecruitement=Ansvarlig for rekruttering IfJobIsLocatedAtAPartner=Hvis jobben ligger på et partnersted PositionToBeFilled=Stilling PositionsToBeFilled=Stillinger -ListOfPositionsToBeFilled=List of job positions -NewPositionToBeFilled=New job positions +ListOfPositionsToBeFilled=Liste over stillinger +NewPositionToBeFilled=Nye stillinger -JobOfferToBeFilled=Job position to be filled +JobOfferToBeFilled=Jobbstilling som skal besettes ThisIsInformationOnJobPosition=Informasjon om stillingen som skal besettes ContactForRecruitment=Kontakt for rekruttering EmailRecruiter=E-postrekruttering ToUseAGenericEmail=For å bruke en generisk e-post. Hvis ikke definert, vil e-posten til rekrutteringsansvarlig bli brukt -NewCandidature=New application -ListOfCandidatures=List of applications +NewCandidature=Ny applikasjon +ListOfCandidatures=Liste over applikasjoner RequestedRemuneration=Ønsket godtgjørelse ProposedRemuneration=Tilbudt godtgjørelse ContractProposed=Kontraktforslag ContractSigned=Kontrakt signert -ContractRefused=Contract refused -RecruitmentCandidature=Application +ContractRefused=Kontrakten avvist +RecruitmentCandidature=Applikasjon JobPositions=Stillinger -RecruitmentCandidatures=Applications +RecruitmentCandidatures=Applikasjoner InterviewToDo=Intervju som skal gjennomføres -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) +AnswerCandidature=Søknadssvar +YourCandidature=Din søknad +YourCandidatureAnswerMessage=Takk for søknaden. <br> ... +JobClosedTextCandidateFound=Stillingen er stengt. Stillingen er besatt. +JobClosedTextCanceled=Stillingen er stengt. +ExtrafieldsJobPosition=Utfyllende attributter (stillinger) +ExtrafieldsCandidatures=Utfyllende attributter (jobbsøknader) +MakeOffer=Gi et tilbud diff --git a/htdocs/langs/nb_NO/sendings.lang b/htdocs/langs/nb_NO/sendings.lang index 714838ddeac..166b31d739a 100644 --- a/htdocs/langs/nb_NO/sendings.lang +++ b/htdocs/langs/nb_NO/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Andre leveringer på denne ordren SendingsAndReceivingForSameOrder=Forsendelser og kvitteringer for denne ordren SendingsToValidate=Leveringer til validering StatusSendingCanceled=Kansellert +StatusSendingCanceledShort=Kansellert StatusSendingDraft=Kladd StatusSendingValidated=Validert (klar til levering eller allerede levert) StatusSendingProcessed=Behandlet @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=Du må validere ordren før du kan utføre fors # Sending methods # ModelDocument DocumentModelTyphon=Mer fullstendig dokumentmodell for leveringskvitteringer (logo. ..) +DocumentModelStorm=Mer komplett dokumentmodell for leveringskvitteringer og ekstrafeltkompatibilitet (logo ...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Konstant EXPEDITION_ADDON_NUMBER ikke definert SumOfProductVolumes=Sum varevolum SumOfProductWeights=Sum varevekt diff --git a/htdocs/langs/nb_NO/stocks.lang b/htdocs/langs/nb_NO/stocks.lang index 58d833ada6c..11a434e3082 100644 --- a/htdocs/langs/nb_NO/stocks.lang +++ b/htdocs/langs/nb_NO/stocks.lang @@ -17,10 +17,10 @@ CancelSending=Avbryt levering DeleteSending=Slett levering Stock=Lagerbeholdning Stocks=Lagerbeholdning -MissingStocks=Missing stocks -StockAtDate=Stocks at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +MissingStocks=Manglende varer +StockAtDate=Varebeholdning på dato +StockAtDateInPast=Tidligere dato +StockAtDateInFuture=Senere dato StocksByLotSerial=Lager etter LOT/serienummer LotSerial=Lot/serienummer LotSerialList=Liste over lot/serienummer @@ -34,7 +34,7 @@ StockMovementForId=Bevegelse ID %d ListMouvementStockProject=Liste over varebevegelser tilknyttet prosjekt StocksArea=Område for lager AllWarehouses=Alle lager -IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock +IncludeEmptyDesiredStock=Inkluder også negativ beholdning med udefinert ønsket beholdning IncludeAlsoDraftOrders=Inkluder også ordrekladd Location=Lokasjon LocationSummary=Kort navn på lokasjon @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Sett et lager på salgsordrer UserDefaultWarehouse=Sett et lager på brukere MainDefaultWarehouse=Standard lager @@ -95,16 +96,16 @@ RealStock=Virkelig beholdning RealStockDesc=Fysisk/reelt lager er beholdningen du for øyeblikket har i dine interne lagre. RealStockWillAutomaticallyWhen=Virkelig beholdning vil bli endret i henhold til denne regelen (som definert i Lager-modulen): VirtualStock=Virtuell beholdning -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=Virtuell beholdning på dato +VirtualStockAtDateDesc=Virtuell beholdning når alle planlagte ordrer før datoen, er fullført +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.) 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=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=Gjennomsnittlig enhetspris betalt til leverandører for å få varen på lager. SellPriceMin=Utsalgspris EstimatedStockValueSellShort=Verdi å selge EstimatedStockValueSell=Verdi å selge @@ -122,9 +123,9 @@ DesiredStockDesc=Denne lagerbeholdningen vil være den verdien som brukes til å StockToBuy=For bestilling Replenishment=Påfylling av varer ReplenishmentOrders=Påfyllingsordre -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=I henhold til økning/reduksjon av varer, kan fysisk vare og virtuell vare (fysisk vare + åpne ordrer) variere +UseRealStockByDefault=Bruk reell varebeholdning i stedet for virtuell, for påfyllingsfunksjon +ReplenishmentCalculation=Beløpet på ordren vil være (ønsket mengde - reelt lager) i stedet for (ønsket antall - virtuelt lager) UseVirtualStock=Bruk teoretisk lagerbeholdning UsePhysicalStock=Bruk fysisk varebeholdning CurentSelectionMode=Gjeldende valgmodus @@ -133,7 +134,7 @@ CurentlyUsingPhysicalStock=Fysisk varebeholdning RuleForStockReplenishment=Regler for lågerpåfylling SelectProductWithNotNullQty=Velg minst en vare med et antall, ikke null, og en leverandør AlertOnly= Kun varsler -IncludeProductWithUndefinedAlerts = Include also negative stock for products with no desired quantity defined, to restore them to 0 +IncludeProductWithUndefinedAlerts = Inkluder også negativ beholdning for varer uten ønsket mengde definert, for å gjenopprette dem til 0 WarehouseForStockDecrease=Lageret <b>%s</b> vil bli brukt til reduksjon av varebeholdning WarehouseForStockIncrease=Lageret <b>%s</b> vil bli brukt til økning av varebeholdning ForThisWarehouse=For dette lageret @@ -144,7 +145,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=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=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". RecordMovement=Postoverføring ReceivingForSameOrder=Kvitteringer for denne ordren StockMovementRecorded=Registrerte varebevegelser @@ -233,10 +234,11 @@ InventoryForASpecificProduct=Varetelling for en spesifikk vare StockIsRequiredToChooseWhichLotToUse=Det kreves lagerbeholdning for å velge hvilken lot du vil bruke ForceTo=Tving til AlwaysShowFullArbo=Vis hele lagertreet med popup av lagerkoblinger (Advarsel: Dette kan redusere ytelsen dramatisk) -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) +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 +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 +UpdateByScaningProductBarcode=Oppdater ved skanning (varestrekkode) +UpdateByScaningLot=Oppdater ved skanning (LOT/seriell strekkode) +DisableStockChangeOfSubProduct=Deaktiver lagerendringen for alle delvaren til dette settet under denne bevegelsen. diff --git a/htdocs/langs/nb_NO/suppliers.lang b/htdocs/langs/nb_NO/suppliers.lang index 6dc0db586bf..c7ade0f65bb 100644 --- a/htdocs/langs/nb_NO/suppliers.lang +++ b/htdocs/langs/nb_NO/suppliers.lang @@ -38,7 +38,7 @@ MenuOrdersSupplierToBill=Innkjøpsordre til faktura NbDaysToDelivery=Leveringsforsinkelse (dager) DescNbDaysToDelivery=Den lengste leveringsforsinkelsen til produktene i denne ordre SupplierReputation=Leverandørens rykte -ReferenceReputation=Reference reputation +ReferenceReputation=Referanse omdømme DoNotOrderThisProductToThisSupplier=Ikke bestill NotTheGoodQualitySupplier=Lav kvalitet ReputationForThisProduct=Rykte diff --git a/htdocs/langs/nb_NO/ticket.lang b/htdocs/langs/nb_NO/ticket.lang index ed590491d7c..63f1717d97e 100644 --- a/htdocs/langs/nb_NO/ticket.lang +++ b/htdocs/langs/nb_NO/ticket.lang @@ -58,7 +58,6 @@ OriginEmail=Epostkilde Notify_TICKET_SENTBYMAIL=Send billettmelding via e-post # Status -NotRead=Ikke lest Read=Les Assigned=Tildelt InProgress=Pågår @@ -124,12 +123,13 @@ TicketsActivatePublicInterfaceHelp=Offentlig grensesnitt gjør det mulig for all TicketsAutoAssignTicket=Tilordne automatisk brukeren som opprettet supportseddelen TicketsAutoAssignTicketHelp=Når du lager en supportseddel, kan brukeren automatisk tildeles billetten. 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 -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) +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 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 epost med ny melding til denne adressen hvis billetten ikke er tildelt en bruker eller brukeren ikke har epost. # # Index & list page # @@ -202,7 +202,7 @@ TicketMessageMailIntroText=Hei, <br> Et nytt svar ble sendt på en billett som d TicketMessageMailIntroHelpAdmin=Denne teksten blir satt inn før teksten til svaret på en supportseddel. TicketMessageMailSignature=Signatur TicketMessageMailSignatureHelp=Denne teksten er bare lagt til i slutten av eposten og vil ikke bli lagret. -TicketMessageMailSignatureText= <p> Med vennlig hilsen </p> <p> - </p> +TicketMessageMailSignatureText=<p> Med vennlig hilsen </p> <p> - </p> TicketMessageMailSignatureLabelAdmin=Signatur på svar-epost TicketMessageMailSignatureHelpAdmin=Denne teksten vil bli satt inn etter svarmeldingen. TicketMessageHelp=Kun denne teksten blir lagret i meldingslisten på supportseddelen. @@ -231,7 +231,6 @@ TicketLogStatusChanged=Status endret: %s til %s TicketNotNotifyTiersAtCreate=Ikke gi beskjed til firmaet ved opprettelse Unread=Ulest TicketNotCreatedFromPublicInterface=Ikke tilgjengelig. Billett ble ikke opprettet fra offentlig grensesnitt. -PublicInterfaceNotEnabled=Offentlig grensesnitt var ikke aktivert ErrorTicketRefRequired=Billettreferansenavn kreves # diff --git a/htdocs/langs/nb_NO/website.lang b/htdocs/langs/nb_NO/website.lang index a80a383be93..9cdf3dc0695 100644 --- a/htdocs/langs/nb_NO/website.lang +++ b/htdocs/langs/nb_NO/website.lang @@ -30,7 +30,6 @@ EditInLine=Rediger inline AddWebsite=Legg til nettside Webpage=Nettsted/container AddPage=Legg til side/container -HomePage=Hjemmeside PageContainer=Side PreviewOfSiteNotYetAvailable=Forhåndsvisning av nettstedet ditt <strong> %s </strong> ennå ikke tilgjengelig. Du må først '<strong> Importer en full nettsidemal </strong>' eller bare '<strong> Legg til en side/container </strong>'. RequestedPageHasNoContentYet=Forespurt side med id %s har ikke noe innhold enda, eller cachefilen .tpl.php ble fjernet. Rediger innhold på siden for å løse dette. @@ -58,7 +57,7 @@ NoPageYet=Ingen sider ennå YouCanCreatePageOrImportTemplate=Du kan opprette en ny side eller importere en full nettsidemal SyntaxHelp=Hjelp med spesifikke syntakstips YouCanEditHtmlSourceckeditor=Du kan redigere HTML kildekode ved hjelp av "Kilde" -knappen i redigeringsprogrammet. -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> Du kan inkludere PHP kode i denne kilden ved hjelp av tags <strong>&lt;?php ?&gt;</strong>. Følgende globale variabler er tilgjengelige: $conf, $db, $mysoc, $user, $website, $websitepage, $weblangs, $pagelangs.<br><br><span class="fa fa-bug"></span> Du kan også inkludere innhold fra en annen side/container med følgende syntaks:<br><strong>&lt;?php includeContainer('alias_of_container_to_include'); ?&gt;</strong><br><br><span class="fa fa-bug"></span> Du kan omdirigere til en annen side/container med følgende syntaks (NB: ikke legg ut noe innhold før en omdirigering):<br><strong>&lt;?php redirectToContainer('alias_of_container_to_redirect_to'); ?&gt;</strong><br><br><span class="fa fa-link"></span> For å opprette en kobling til en annen side, bruk syntaksen:<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> For å inkludere en <strong>nedlastningslink</strong> til en fil i <strong>dokumenter</strong> mappen, bruk <strong>document.php</strong> pakkeren:<br>Eksempel, for en fil i documents/ecm (need to be loggedmå logges, er syntaksen:<br><strong>&lt;a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext"&gt;</strong><br>For en fil i documents/medias (åpen mappe for offentlig tilgang), er syntaksen:<br><strong>&lt;a href="/document.php?modulepart=medias&file=[relative_dir/]filename.ext"&gt;</strong><br>For en fil delt via en delingskobling (åpen tilgang ved bruk av deling av filens hash-nøkkel), er syntaksen:<br><strong>&lt;a href="/document.php?hashp=publicsharekeyoffile"&gt;</strong><br><br><span class="fa fa-picture-o"></span> For å inkludere et <strong>bilde</strong> lagret i <strong>dokumenter</strong> mappen, bruk <strong>viewimage.php</strong> pakkeren:<br>Eksempel, for et bilde i documents/medias (åpen mappe for offentlig tilgang), er syntaksen:<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 et bilde som deles med en delekobling (åpen tilgang ved hjelp av delings-hash-nøkkelen til filen), er syntaksen: <br> <strong>&lt;img src="/viewimage.php?hashp=12345679012..."&gt;</strong><br> YouCanEditHtmlSourceMore= <br> Flere eksempler på HTML eller dynamisk kode tilgjengelig på <a href="%s" target="_blank"> wiki-dokumentasjonen </a> <br>. @@ -101,7 +100,7 @@ EmptyPage=Tom side ExternalURLMustStartWithHttp=Ekstern nettadresse må starte med http:// eller https:// ZipOfWebsitePackageToImport=Last opp zip-filen til malpakken til nettstedet ZipOfWebsitePackageToLoad=eller velg en tilgjengelig innebygd nettsted-malpakke -ShowSubcontainers=Inkluder dynamisk innhold +ShowSubcontainers=Vis dynamisk innhold InternalURLOfPage=Intern URL til siden ThisPageIsTranslationOf=Denne siden/containeren er en oversettelse av ThisPageHasTranslationPages=Denne siden/containeren har oversettelse @@ -136,4 +135,5 @@ RSSFeed=RSS nyhetsstrøm RSSFeedDesc=Du kan få en RSS-feed med de nyeste artiklene med typen 'blogpost' ved hjelp av denne URL-en PagesRegenerated=%s side(r)/container(e) regenerert RegenerateWebsiteContent=Regenerer cache-filer på nettstedet -AllowedInFrames=Allowed in Frames +AllowedInFrames=Tillatt i frames +DefineListOfAltLanguagesInWebsiteProperties=Definer liste over alle tilgjengelige språk i nettstedsegenskaper. diff --git a/htdocs/langs/nb_NO/withdrawals.lang b/htdocs/langs/nb_NO/withdrawals.lang index 50f65e74855..a0e78bf86e7 100644 --- a/htdocs/langs/nb_NO/withdrawals.lang +++ b/htdocs/langs/nb_NO/withdrawals.lang @@ -1,36 +1,36 @@ # Dolibarr language file - Source file is en_US - withdrawals -CustomersStandingOrdersArea=Payments by Direct debit orders +CustomersStandingOrdersArea=Betalinger med direktedebetsordrer SuppliersStandingOrdersArea=Betalinger med kredittoverføring StandingOrdersPayment=Direktedebet betalingsordre StandingOrderPayment=Direktedebet betalingsordre NewStandingOrder=Ny direktedebetsordre -NewPaymentByBankTransfer=New payment by credit transfer +NewPaymentByBankTransfer=Ny betaling med kreditoverføring StandingOrderToProcess=Til behandling -PaymentByBankTransferReceipts=Credit transfer orders -PaymentByBankTransferLines=Credit transfer order lines +PaymentByBankTransferReceipts=Kredittoverføringsordrer +PaymentByBankTransferLines=Kredittoverføring ordrelinjer WithdrawalsReceipts=Direktedebetsordre WithdrawalReceipt=Direktedebiter ordre -BankTransferReceipts=Credit transfer orders +BankTransferReceipts=Kredittoverføringsordrer BankTransferReceipt=Kredittoverføringsordre -LatestBankTransferReceipts=Latest %s credit transfer orders +LatestBankTransferReceipts=Siste %s kredittoverføringsordrer LastWithdrawalReceipts=Siste %s direktedebetslinjer -WithdrawalsLine=Direct debit order line -CreditTransferLine=Credit transfer line +WithdrawalsLine=Ordrelinje for direktedebet +CreditTransferLine=Kredittoverføringslinje WithdrawalsLines=Direktedebiter ordrelinjer -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 +CreditTransferLines=Kredittoverføringslinjer +RequestStandingOrderToTreat=Forespørsler om utførelse av direktedebet betalingsordre +RequestStandingOrderTreated=Forespørsel om utførte direktedebet betalingsordre +RequestPaymentsByBankTransferToTreat=Forespørsler om behandling av kreditoverføring RequestPaymentsByBankTransferTreated=Forespørsler om kredittoverføring behandlet NotPossibleForThisStatusOfWithdrawReceiptORLine=Ennå ikke mulig. Tilbaketrekkings-status må være satt til 'kreditert' før fjerning fra spesifikke linjer. -NbOfInvoiceToWithdraw=No. of qualified customer invoices with waiting direct debit order +NbOfInvoiceToWithdraw=Antall kvalifiserte kundefakturaer med ventende direktedebet NbOfInvoiceToWithdrawWithInfo=Antall kundefakturaer med direktedebetsordre som har definert bankkontoinformasjon NbOfInvoiceToPayByBankTransfer=Antall kvalifiserte leverandørfakturaer som venter på betaling med kredittoverføring -SupplierInvoiceWaitingWithdraw=Vendor invoice waiting for payment by credit transfer +SupplierInvoiceWaitingWithdraw=Leverandørfaktura som venter på betaling med kreditoverføring InvoiceWaitingWithdraw=Faktura som venter på direktedebet -InvoiceWaitingPaymentByBankTransfer=Invoice waiting for credit transfer +InvoiceWaitingPaymentByBankTransfer=Faktura venter på kreditoverføring AmountToWithdraw=Beløp å tilbakekalle -NoInvoiceToWithdraw=No invoice open for '%s' is waiting. Go on tab '%s' on invoice card to make a request. +NoInvoiceToWithdraw=Ingen faktura åpen for '%s' venter. Gå til fanen '%s' på fakturakortet for å gjøre en forespørsel. NoSupplierInvoiceToWithdraw=Ingen leverandørfaktura med åpne 'Direkte kredittforespørsler' venter. Gå til fanen '%s' på fakturakortet for å sende en forespørsel. ResponsibleUser=Brukeransvarlig WithdrawalsSetup=Oppsett av direktedebetsbetalinger @@ -40,8 +40,9 @@ CreditTransferStatistics=Kredittoverføringsstatistikk Rejects=Avvisninger LastWithdrawalReceipt=Siste %s direktedebetskvitteringer MakeWithdrawRequest=Foreta en direktedebet betalingsforespørsel -MakeBankTransferOrder=Make a credit transfer request +MakeBankTransferOrder=Opprett en forespørsel om kreditoverføring WithdrawRequestsDone=%s direktedebet-betalingforespørsler registrert +BankTransferRequestsDone=%s forespørsler om kreditoverføring registrert ThirdPartyBankCode=Tredjeparts bankkode NoInvoiceCouldBeWithdrawed=Ingen faktura debitert. Kontroller at fakturaer mot selskaper med gyldig standard BAN, og at BAN har en RUM-modus <strong> %s </strong>. ClassCredited=Klassifiser som kreditert @@ -53,7 +54,7 @@ Lines=Linjer StandingOrderReject=Utsted en avvisning WithdrawsRefused=Direktedebet avvist WithdrawalRefused=Tilbakekalling avvist -CreditTransfersRefused=Credit transfers refused +CreditTransfersRefused=Kredittoverføringer avvist WithdrawalRefusedConfirm=Er du sikker på at du vil avvise en tilbakekallings-forespørsel for medlemmet? RefusedData=Dato for avvisning RefusedReason=Årsak til avslag @@ -63,7 +64,7 @@ InvoiceRefused=Faktura avvist (Kunden skal belastes for avvisningen) StatusDebitCredit=Status debet/kreditt StatusWaiting=Venter StatusTrans=Sendt -StatusDebited=Debited +StatusDebited=Debiterte StatusCredited=Kreditert StatusPaid=Betalt StatusRefused=Nektet @@ -79,13 +80,13 @@ StatusMotif8=Annen grunn CreateForSepaFRST=Opprett direktedebetsfil (SEPA FRST) CreateForSepaRCUR=Opprett direktedebitfil (SEPA RCUR) CreateAll=Opprett direktedebetfil (alle) -CreateFileForPaymentByBankTransfer=Create file for credit transfer +CreateFileForPaymentByBankTransfer=Opprett fil for kreditoverføring CreateSepaFileForPaymentByBankTransfer=Opprett kreditoverføringsfil (SEPA) CreateGuichet=Bare kontor CreateBanque=Bare bank OrderWaiting=Venter på behandling -NotifyTransmision=Record file transmission of order -NotifyCredit=Record credit of order +NotifyTransmision=Registrer filoverføring av ordre +NotifyCredit=Registrer kreditt av ordren NumeroNationalEmetter=National Transmitter Number WithBankUsingRIB=For bankkontoer som bruker RIB WithBankUsingBANBIC=For bankkontoer som bruker IBAN/BIC/SWIFT @@ -96,11 +97,11 @@ WithdrawalFileNotCapable=Kan ikke ikke generere kvitteringsfil for tilbaketrekki ShowWithdraw=Vis direkte debitordre IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Men, hvis fakturaen har minst én avbestillingsordre som ikke er behandlet ennå, blir den ikke satt som betalt for å tillate tidligere håndtering av tilbaketrekninger. DoStandingOrdersBeforePayments=Denne fanen lar deg be om en betalingsordre med direkte belastning. Når du er ferdig, kan du gå til menyen Bank-> Betaling med direkte belastning for å generere og administrere direkte belastning. Når ordre med direkte belastning blir stengt, blir betaling på fakturaer automatisk registrert, og fakturaer stengt hvis resten til betaling er null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Debit order file -CreditTransferFile=Credit transfer file +DoCreditTransferBeforePayments=Denne fanen lar deg be om en kreditoverføringsordre. Når du er ferdig, går du inn i menyen Bank-> Betaling ved overføring for å generere og administrere overføringsordren. Når kredittoverføringsordren er lukket, vil betaling på fakturaer automatisk bli registrert, og fakturaer stengt hvis resten av utestående er null. +WithdrawalFile=Debetordrefil +CreditTransferFile=Kredittoverføringsfil SetToStatusSent=Sett status til "Fil Sendt" -ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null +ThisWillAlsoAddPaymentOnInvoice=Dette vil også registrere betalinger på fakturaer og vil klassifisere dem som "Betalt" hvis gjenværende betaling er null StatisticsByLineStatus=Statistikk etter linjestatus RUM=UMR DateRUM=Mandats signaturdato @@ -108,7 +109,7 @@ RUMLong=Unik Mandat Referanse RUMWillBeGenerated=Hvis tomt, vil UMR (Unique Mandate Reference) bli generert når bankkontoinformasjon er lagret WithdrawMode=Direktedebetsmodus (FRST eller RECUR) WithdrawRequestAmount=Antall direktedebet-betalingforespørsler -BankTransferAmount=Amount of Credit Transfer request: +BankTransferAmount=Beløp i forespørsler om kredittoverføring: WithdrawRequestErrorNilAmount=Kan ikke opprette en tom direktedebet-betalingforespørsel SepaMandate=SEPA Direktedebet mandat SepaMandateShort=SEPA-Mandat @@ -124,18 +125,19 @@ SEPAFrstOrRecur=Betalingstype ModeRECUR=Gjentakende betaling ModeFRST=Engangsbetaling PleaseCheckOne=Vennligs kryss av kun en -CreditTransferOrderCreated=Credit transfer order %s created +CreditTransferOrderCreated=Kredittoverføringsordre %s opprettet DirectDebitOrderCreated=Direktedebet-ordre %s opprettet AmountRequested=Beløp forespurt SEPARCUR=SEPA CUR SEPAFRST=SEPA FRST ExecutionDate=Utførelsesdato CreateForSepa=Lag direkte debitfil -ICS=Kreditoridentifikator CI +ICS=Kreditoridentifikator CI for direkte belastning +ICSTransfer=Kreditoridentifikator CI for bankoverføring END_TO_END="EndToEndId" SEPA XML-tag - Unik ID tildelt per transaksjon USTRD="Ustrukturert" SEPA XML-tag ADDDAYS=Legg til dager til utførelsesdato -NoDefaultIBANFound=No default IBAN found for this third party +NoDefaultIBANFound=Ingen standard IBAN funnet for denne tredjeparten ### Notifications InfoCreditSubject=Betaling av direktedebets-betalingsordre %s utført av banken InfoCreditMessage=Direktedebet betalingsordre %s er blitt betalt av banken<br>Betalingsdata: %s @@ -145,4 +147,6 @@ InfoTransData=Beløp: %s <br> Metode: %s <br> Dato: %s InfoRejectSubject=Direktedebet betalingsordre avvist InfoRejectMessage=Hei,<br><br>direktedebet betalingsordre av faktura %s tilhørende firma %s, med beløpet %s er blitt avvist av banken.<br><br>--<br>%s ModeWarning=Opsjon for reell-modus ble ikke satt, så vi stopper etter denne simuleringen -ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorCompanyHasDuplicateDefaultBAN=Firma med ID%s har mer enn én standard bankkonto. Ingen måte å vite hvilken du skal bruke. +ErrorICSmissing=Mangler ICS i bankkonto %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Totalt beløp for direktedebet er ulik linjesum diff --git a/htdocs/langs/nb_NO/workflow.lang b/htdocs/langs/nb_NO/workflow.lang index 1c08b5b0b78..92fa39bdda2 100644 --- a/htdocs/langs/nb_NO/workflow.lang +++ b/htdocs/langs/nb_NO/workflow.lang @@ -16,8 +16,10 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Klassifiser koblet kilde-kundeordre # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Klassifiser tilsluttede kildeleverandørtilbud som fakturert når leverandørfaktura er validert (og hvis fakturabeløp er det samme som totalbeløp på koblede tilbud) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Klassifiser kildekjøpsordre (kjøpsordre) som fakturert når leverandørfakturaen er validert (og hvis fakturabeløp er det samme som totalbeløp på koblede ordre) -descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +descWORKFLOW_BILL_ON_RECEPTION=Klassifiser mottak til "fakturert" når en koblet leverandørbestilling er validert # Autoclose intervention -descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Lukk alle intervensjoner knyttet til billetten når en billett er lukket AutomaticCreation=Automatisk opprettelse AutomaticClassification=Automatisk klassifisering +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Klassifiser koblet kildesending som lukket når kundefaktura er validert diff --git a/htdocs/langs/ne_NP/accountancy.lang b/htdocs/langs/ne_NP/accountancy.lang index 3211a0b62df..9e084932477 100644 --- a/htdocs/langs/ne_NP/accountancy.lang +++ b/htdocs/langs/ne_NP/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Date Docref=Reference LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/ne_NP/admin.lang b/htdocs/langs/ne_NP/admin.lang index f1c41a3b62b..f9a6468d94a 100644 --- a/htdocs/langs/ne_NP/admin.lang +++ b/htdocs/langs/ne_NP/admin.lang @@ -56,6 +56,8 @@ 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. @@ -85,7 +87,6 @@ ShowPreview=Show preview ShowHideDetails=Show-Hide details PreviewNotAvailable=Preview not available ThemeCurrentlyActive=Theme currently active -CurrentTimeZone=TimeZone PHP (server) MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Dates are stored and returned by database server as if they were kept as submitted string. The timezone has effect only when using the UNIX_TIMESTAMP function (that should not be used by Dolibarr, so database TZ should have no effect, even if changed after data was entered). Space=Space @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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. @@ -256,6 +257,7 @@ 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. @@ -375,7 +377,7 @@ 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:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +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 @@ -406,7 +408,7 @@ UrlGenerationParameters=Parameters to secure URLs SecurityTokenIsUnique=Use a unique securekey parameter for each URL EnterRefToBuildUrl=Enter reference for object %s GetSecuredUrl=Get calculated URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +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 @@ -668,7 +670,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 @@ -1306,7 +1308,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,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 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=New menu MenuHandler=Menu handler MenuModule=Source module -HideUnauthorizedMenu= Hide unauthorized menus (gray) +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 @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/ne_NP/banks.lang b/htdocs/langs/ne_NP/banks.lang index 9500a5b8b2e..81a23238550 100644 --- a/htdocs/langs/ne_NP/banks.lang +++ b/htdocs/langs/ne_NP/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/ne_NP/blockedlog.lang b/htdocs/langs/ne_NP/blockedlog.lang index 5afae6e9e53..0bba5605d0f 100644 --- a/htdocs/langs/ne_NP/blockedlog.lang +++ b/htdocs/langs/ne_NP/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/ne_NP/boxes.lang b/htdocs/langs/ne_NP/boxes.lang index d6fd298a3a7..9a751483fb1 100644 --- a/htdocs/langs/ne_NP/boxes.lang +++ b/htdocs/langs/ne_NP/boxes.lang @@ -46,9 +46,12 @@ 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. @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Accountancy +ValidatedProjects=Validated projects diff --git a/htdocs/langs/ne_NP/cashdesk.lang b/htdocs/langs/ne_NP/cashdesk.lang index 498baa82200..3fef645d99d 100644 --- a/htdocs/langs/ne_NP/cashdesk.lang +++ b/htdocs/langs/ne_NP/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +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 @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/ne_NP/categories.lang b/htdocs/langs/ne_NP/categories.lang index ba37a43b4ec..4ddf0d6093f 100644 --- a/htdocs/langs/ne_NP/categories.lang +++ b/htdocs/langs/ne_NP/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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 diff --git a/htdocs/langs/ne_NP/companies.lang b/htdocs/langs/ne_NP/companies.lang index dadff6a7894..8dc815b522e 100644 --- a/htdocs/langs/ne_NP/companies.lang +++ b/htdocs/langs/ne_NP/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi 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=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=Potential diff --git a/htdocs/langs/ne_NP/compta.lang b/htdocs/langs/ne_NP/compta.lang index 8f4f058bb87..1afeb6e3727 100644 --- a/htdocs/langs/ne_NP/compta.lang +++ b/htdocs/langs/ne_NP/compta.lang @@ -111,7 +111,7 @@ 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 ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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 diff --git a/htdocs/langs/ne_NP/cron.lang b/htdocs/langs/ne_NP/cron.lang index 1de1251831a..2ebdda1e685 100644 --- a/htdocs/langs/ne_NP/cron.lang +++ b/htdocs/langs/ne_NP/cron.lang @@ -7,13 +7,14 @@ Permission23103 = Delete Scheduled job Permission23104 = Execute Scheduled job # Admin CronSetup=Scheduled job management setup -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=Or to check and launch a specific job +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 @@ -46,6 +47,7 @@ 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 @@ -56,7 +58,7 @@ CronNote=Comment CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Enable +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Disable CronTaskInactive=This job is disabled CronId=Id @@ -82,3 +84,8 @@ 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/ne_NP/errors.lang b/htdocs/langs/ne_NP/errors.lang index 893f4a35b65..5b26be724d9 100644 --- a/htdocs/langs/ne_NP/errors.lang +++ b/htdocs/langs/ne_NP/errors.lang @@ -5,8 +5,10 @@ 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. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ 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=Ref used for creation already exists. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/ne_NP/exports.lang b/htdocs/langs/ne_NP/exports.lang index 3549e3f8b23..a0eb7161ef2 100644 --- a/htdocs/langs/ne_NP/exports.lang +++ b/htdocs/langs/ne_NP/exports.lang @@ -133,3 +133,4 @@ 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/ne_NP/mails.lang b/htdocs/langs/ne_NP/mails.lang index 1235eef3b27..2d02c5ddcf9 100644 --- a/htdocs/langs/ne_NP/mails.lang +++ b/htdocs/langs/ne_NP/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Notifications -NoNotificationsWillBeSent=No email notifications are planned for this event and company -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent +NotificationsAuto=Notifications Auto. +NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company +ANotificationsWillBeSent=1 automatic notification will be sent by email +SomeNotificationsWillBeSent=%s automatic notifications will be sent by email +AddNewNotification=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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +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/ne_NP/main.lang b/htdocs/langs/ne_NP/main.lang index 96c68cdcfa3..f8ba6f4073c 100644 --- a/htdocs/langs/ne_NP/main.lang +++ b/htdocs/langs/ne_NP/main.lang @@ -28,7 +28,9 @@ 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 @@ -85,6 +87,8 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C 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 @@ -220,6 +224,7 @@ Value=Value PersonalValue=Personal value NewObject=New %s NewValue=New value +OldValue=Old value %s CurrentValue=Current value Code=Code Type=Type @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Option +Filters=Filters List=List FullList=Full list FullConversation=Full conversation @@ -650,6 +656,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 @@ -671,7 +678,7 @@ SendMail=Send email Email=Email NoEMail=No email AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=No mobile phone Owner=Owner FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/ne_NP/modulebuilder.lang b/htdocs/langs/ne_NP/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/ne_NP/modulebuilder.lang +++ b/htdocs/langs/ne_NP/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/ne_NP/mrp.lang b/htdocs/langs/ne_NP/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/ne_NP/mrp.lang +++ b/htdocs/langs/ne_NP/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/ne_NP/other.lang b/htdocs/langs/ne_NP/other.lang index 54c0572d453..7a895bb1ca5 100644 --- a/htdocs/langs/ne_NP/other.lang +++ b/htdocs/langs/ne_NP/other.lang @@ -5,8 +5,6 @@ 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 -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Right CalculatedWeight=Calculated weight CalculatedVolume=Calculated volume Weight=Weight -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/ne_NP/products.lang b/htdocs/langs/ne_NP/products.lang index 97db059594f..9ecc11ed93d 100644 --- a/htdocs/langs/ne_NP/products.lang +++ b/htdocs/langs/ne_NP/products.lang @@ -108,7 +108,8 @@ 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=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +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 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/ne_NP/projects.lang b/htdocs/langs/ne_NP/projects.lang index baf0ecde17f..05aa1f5a560 100644 --- a/htdocs/langs/ne_NP/projects.lang +++ b/htdocs/langs/ne_NP/projects.lang @@ -76,15 +76,16 @@ MyActivities=My tasks/activities MyProjects=My projects MyProjectsArea=My projects Area DurationEffective=Effective duration -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Time +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/ne_NP/recruitment.lang b/htdocs/langs/ne_NP/recruitment.lang index b775e78552e..437445f25dc 100644 --- a/htdocs/langs/ne_NP/recruitment.lang +++ b/htdocs/langs/ne_NP/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/ne_NP/sendings.lang b/htdocs/langs/ne_NP/sendings.lang index 5ce3b7f67e9..73bd9aebd42 100644 --- a/htdocs/langs/ne_NP/sendings.lang +++ b/htdocs/langs/ne_NP/sendings.lang @@ -30,6 +30,7 @@ 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 @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=More complete document model for delivery receipts (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/ne_NP/stocks.lang b/htdocs/langs/ne_NP/stocks.lang index 660443bcded..a1f55010139 100644 --- a/htdocs/langs/ne_NP/stocks.lang +++ b/htdocs/langs/ne_NP/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/ne_NP/ticket.lang b/htdocs/langs/ne_NP/ticket.lang index 59519282c80..982fff90ffa 100644 --- a/htdocs/langs/ne_NP/ticket.lang +++ b/htdocs/langs/ne_NP/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Other TicketSeverityShortLOW=Low TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=High -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Read Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/ne_NP/website.lang b/htdocs/langs/ne_NP/website.lang index 03e042e4be6..f17def114b8 100644 --- a/htdocs/langs/ne_NP/website.lang +++ b/htdocs/langs/ne_NP/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/ne_NP/withdrawals.lang b/htdocs/langs/ne_NP/withdrawals.lang index 114a8d9dd6c..059b3451c11 100644 --- a/htdocs/langs/ne_NP/withdrawals.lang +++ b/htdocs/langs/ne_NP/withdrawals.lang @@ -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>. ClassCredited=Classify credited @@ -131,7 +132,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,3 +148,5 @@ 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/ne_NP/workflow.lang b/htdocs/langs/ne_NP/workflow.lang index 299be277e1d..494a0424a75 100644 --- a/htdocs/langs/ne_NP/workflow.lang +++ b/htdocs/langs/ne_NP/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 diff --git a/htdocs/langs/nl_BE/accountancy.lang b/htdocs/langs/nl_BE/accountancy.lang index 080da3b8334..b778d524492 100644 --- a/htdocs/langs/nl_BE/accountancy.lang +++ b/htdocs/langs/nl_BE/accountancy.lang @@ -20,6 +20,7 @@ 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 f1308c0cdfe..9e36971311b 100644 --- a/htdocs/langs/nl_BE/admin.lang +++ b/htdocs/langs/nl_BE/admin.lang @@ -11,6 +11,7 @@ RemoteSignature=Remote distant handtekening (betrouwbaarder) FilesAdded=Bestanden toegevoegd AvailableOnlyOnPackagedVersions=Het lokale bestand voor integriteitscontrole is alleen beschikbaar als de toepassing is geïnstalleerd vanuit een officieel pakket XmlNotFound=Xml-integriteitsbestand van toepassing niet gevonden +SessionId=Sessie-ID SessionSavePath=Sessie opslaglocatie ConfirmPurgeSessions=Ben je zeker dat je alle sessies wil wissen? De connectie van elke gebruiker zal worden verbroken (uitgezonderd jezelf). NoSessionListWithThisHandler=Save session handler geconfigureerd in uw PHP staat niet toe dat alle lopende sessies worden getoond. @@ -28,23 +29,29 @@ UploadNewTemplate=Upload nieuwe template(s) RestoreLock=Herstel het bestand <b>%s</b> , met enkel leesrechten, om verder gebruik van de Update / Install-tool uit te schakelen. SecurityFilesDesc=Definieer opties met betrekking tot beveiliging voor het uploaden van bestanden. DictionarySetup=Woordenboek setup -Dictionary=Woordenboeken +ErrorReservedTypeSystemSystemAuto=De waarde 'system' en 'systemauto' als type zijn voorbehouden voor het systeem. Je kan 'user' als waarde gebruiken om je eigen gegevens-record toe te voegen. DisableJavascript=Schakel JavaScript en Ajax-functies uit. DelaiedFullListToSelectCompany=Wacht tot een toets wordt ingedrukt voordat u de inhoud van de combinatielijst van derden laadt. <br> Dit kan de prestaties verbeteren als u een groot aantal derden hebt, maar het is minder handig. SearchString=Zoekopdracht +NotAvailableWhenAjaxDisabled=Niet beschikbaar wanneer AJAX functionaliteit uitgeschakeld is AllowToSelectProjectFromOtherCompany=Op een document van een derde partij, kunt u een project kiezen dat is gekoppeld aan een andere derde partij UsePreviewTabs=Gebruik voorbeelweergavetabbladen ShowPreview=Toon voorbeelweergave -CurrentTimeZone=Huidige Tijdszone TZHasNoEffect=Datums worden opgeslagen en geretourneerd door de databaseserver alsof ze worden bewaard als verzonden string. De tijdzone heeft alleen effect bij het gebruik van de UNIX_TIMESTAMP-functie (die niet door Dolibarr mag worden gebruikt, dus database TZ zou geen effect mogen hebben, zelfs als deze wordt gewijzigd nadat gegevens zijn ingevoerd). NextValueForDeposit=Volgende waarde (aanbetaling) +ComptaSetup=Instellingen van de boekhoudkundige module UserSetup=Gebruikersbeheerinstellingen MultiCurrencySetup=Instellingen voor meerdere valuta +DetailPosition=Sorteren aantal te definiëren menupositie AllMenus=Alle NotConfigured=Module/Applicatie is niet geconfigureerd OtherSetup=Overige instellingen +CurrentValueSeparatorThousand=Duizend scheidingsteken LocalisationDolibarrParameters=Lokalisatieparameters +ClientTZ=Tijdzone van de klant (gebruiker) +ClientHour=Tijd bij de klant (gebruiker) PHPTZ=Tijdzone binnen de PHP server +DaylingSavingTime=Zomertijd (gebruiker) CurrentHour=Huidige tijd op server CurrentSessionTimeOut=Huidige sessietimeout YouCanEditPHPTZ=Om een andere PHP-tijdzone in te stellen (niet vereist), kunt u proberen een .htaccess-bestand toe te voegen met een regel als deze "SetEnv TZ Europe/Paris" @@ -63,20 +70,25 @@ PurgeNothingToDelete=Geen map of bestanden om te verwijderen. PurgeNDirectoriesFailed=Verwijderen van <b>%s-</b> bestanden of mappen is mislukt. PurgeAuditEvents=Verwijder alle gebeurtenisen ConfirmPurgeAuditEvents=Ben je zeker dat je alle veiligheidsgebeurtenissen wil verwijderen? Alle veiligheidslogboeken zullen worden verwijderd, en geen andere bestanden worden verwijderd +RunCommandSummary=Backup geïnitieerd met het volgende commando +BackupResult=Resultaat backup +BackupFileSuccessfullyCreated=Backupbestand succesvol gegenereerd NoBackupFileAvailable=Geen backupbestanden beschikbaar. ToBuildBackupFileClickHere=Om een backupbestand te maken, klik <a href="%s">hier</a>. +ImportMySqlDesc=Om een MySQL-back-upbestand te importeren, kunt u phpMyAdmin gebruiken via uw hosting of de opdracht mysql gebruiken vanaf de opdrachtregel. <br> Bijvoorbeeld: +ImportPostgreSqlDesc=Om een backupbestand te importeren, dient u het 'pg_restore' commando vanaf de opdrachtregel uit te voeren: CommandsToDisableForeignKeysForImportWarning=Verplicht als je je sql neerslag later wil gebruiken ExportUseMySQLQuickParameterHelp=De parameter '--quick' helpt het RAM-verbruik voor grote tabellen te beperken. MySqlExportParameters=MySQL exporteer instellingen ExportStructure=Struktuur NameColumn=Kollomennaam +NoLockBeforeInsert=Geen lock-opdrachten rond INSERT FeatureAvailableOnlyOnStable=Functie alleen beschikbaar op officiële stabiele versies BoxesDesc=Widgets zijn componenten die informatie tonen die u kunt toevoegen om sommige pagina's te personaliseren. U kunt kiezen tussen het weergeven van de widget of niet door de doelpagina te selecteren en op 'Activeren' te klikken, of door op de prullenbak te klikken om deze uit te schakelen. ModulesMarketPlaceDesc=Je kan meer modules vinden door te zoeken op andere externe websites, waar je ze kan downloaden ModulesMarketPlaces=Zoek externe app / modules ModulesDevelopYourModule=Ontwikkel je eigen app / modules SeeInMarkerPlace=Zie Marktplaats -Nouveauté=Nieuwigheid GoModuleSetupArea=Ga naar het gedeelte Module-instellingen om een nieuwe module te implementeren / installeren: <a href="%s">%s</a> . DoliStoreDesc=DoliStore, de officiële markt voor externe Dolibarr ERP / CRM modules WebSiteDesc=Externe websites voor meer add-on (niet-basis) modules ... @@ -88,6 +100,7 @@ OfficialWiki=Dolibarr-documentatie / Wiki OtherResources=Andere bronnen ExternalResources=Externe Bronnen SocialNetworks=Sociale Netwerken +ForDocumentationSeeWiki=Documentatie voor gebruikers of ontwikkelaars kunt u inzien door <br>te kijken op de Dolibarr Wiki-pagina's:<br><b><a href="%s" target="_blank">%s</a></b> HelpCenterDesc1=Hier zijn enkele bronnen voor hulp en ondersteuning bij Dolibarr. HelpCenterDesc2=Sommige van deze bronnen zijn alleen beschikbaar in het <b>Engels</b> . MeasuringUnit=Maateenheid @@ -111,6 +124,8 @@ MAIN_MAIL_SMTPS_ID=SMTP ID (als verzendende server authenticatie vereist) MAIN_MAIL_SMTPS_PW=SMTP-wachtwoord (als verzendende server verificatie vereist) MAIN_MAIL_EMAIL_TLS=Gebruik TLS (SSL) -versleuteling MAIN_MAIL_EMAIL_STARTTLS=Gebruik TLS (STARTTLS) -versleuteling +MAIN_MAIL_EMAIL_DKIM_ENABLED=Gebruik DKIM om een e-mailhandtekening te genereren +MAIN_MAIL_EMAIL_DKIM_DOMAIN=E-maildomein voor gebruik met dkim MAIN_MAIL_EMAIL_DKIM_SELECTOR=Naam van dkim-selector MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY=Privésleutel voor dkim-ondertekening MAIN_DISABLE_ALL_SMS=Schakel alle sms-berichten uit (voor testdoeleinden of demo's) @@ -118,9 +133,13 @@ MAIN_MAIL_SMS_FROM=Standaard telefoonnummer van afzender voor sms-verzending MAIN_MAIL_DEFAULT_FROMTYPE=Standaard afzender-e-mailadres voor handmatig verzenden (e-mailadres gebruiker of professionele e-mail) UserEmail=Email gebruiker CompanyEmail=Professionele e-mail +ModuleSetup=Module-instellingen ModulesSetup=Instellingen voor Modules / Applicaties ModuleFamilyProducts=Productbeheer (PM) ModuleFamilyHr=Personeelszaken (HR) +ModuleFamilyProjects=Projecten / Samenwerkingen +ModuleFamilyTechnic=Hulpmiddelen voor multi-modules +ModuleFamilyPortal=Websites en andere frontale toepassing ThisIsAlternativeProcessToFollow=Dit is een alternatieve configuratie om handmatig te verwerken: UnpackPackageInDolibarrRoot=Pak de verpakte bestanden uit in uw Dolibarr-servermap: <b>%s</b> UnpackPackageInModulesRoot=Om een externe module te implementeren / installeren, moet u de verpakte bestanden uitpakken / uitpakken in de servermap voor externe modules: <br> <b>%s</b> @@ -129,15 +148,23 @@ NotExistsDirect=De alternatieve hoofdmap is niet gedefinieerd voor een bestaande InfDirAlt=Sinds versie 3 is het mogelijk om een alternatieve rootmap te definiëren. Hiermee kunt u in een speciale map plug-ins en aangepaste sjablonen opslaan. <br> Maak gewoon een map aan in de root van Dolibarr (bv: aangepast). <br> 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. +UMaskExplanation=Deze parameter laat u de rechten bepalen welke standaard zijn ingesteld voor de bestanden aangemaakt door Dolibarr op de server (tijdens het uploaden, bijvoorbeeld).<br>Het moet de octale waarde zijn (bijvoorbeeld, 0666 betekent lezen en schrijven voor iedereen).<br>Deze parameter wordt NIET op een windows-server gebruikt +SeeWikiForAllTeam=Kijk op de Wiki-pagina voor een lijst met bijdragers en hun organisatie +UseACacheDelay=Ingestelde vertraging voor de cacheexport in secondes (0 of leeg voor geen cache) +DisableLinkToHelpCenter=Verberg de link "<b>ondersteuning of hulp nodig</b>" op de inlogpagina DisableLinkToHelp=Link naar online help "<b>%s</b>" <b>verbergen</b> AddCRIfTooLong=Er is geen automatische tekst terugloop, tekst die te lang is, wordt niet weergegeven op documenten. Voeg indien nodig regeleinden in het tekstgebied toe. ConfirmPurge=Weet u zeker dat u deze zuivering wilt uitvoeren? <br> Hiermee worden al uw gegevensbestanden permanent verwijderd zonder dat u ze kunt herstellen (ECM-bestanden, bijgevoegde bestanden ...). LanguageFile=Bestandstaal +ListOfDirectories=Lijst van OpenDocument sjablonenmappen ListOfDirectoriesForModelGenODT=Lijst met mappen die sjablonenbestanden met OpenDocument-indeling bevatten. <br><br> Plaats hier het volledige pad van mappen. <br> Voeg een regelterugloop toe tussen elke directory. <br> Voeg hier een map van de GED-module toe <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b> . <br><br> Bestanden in die mappen moeten eindigen op <b>.odt</b> of <b>.ods</b>. NumberOfModelFilesFound=Aantal ODT / ODS-sjabloonbestanden gevonden in deze mappen +FollowingSubstitutionKeysCanBeUsed=Door het plaatsen van de volgende velden in het sjabloon krijgt u een vervanging met de aangepaste waarde bij het genereren van het document: DescWeather=De volgende afbeeldingen worden op het dashboard weergegeven wanneer het aantal late acties de volgende waarden bereikt: ConnectionTimeout=Time-out verbinding ModuleMustBeEnabledFirst=Module <b>%s</b> moet eerst worden ingeschakeld als u deze functie nodig hebt. @@ -148,8 +175,12 @@ HideDescOnPDF=Productbeschrijving verbergen HideRefOnPDF=Verberg ref. producten HideDetailsOnPDF=Verberg details van productlijnen PlaceCustomerAddressToIsoLocation=Gebruik de Franse standaardpositie (La Poste) voor de positie van het klantadres +UrlGenerationParameters=Parameters om URL beveiligen +SecurityTokenIsUnique=Gebruik een unieke securekey parameter voor elke URL GetSecuredUrl=Get berekend URL -ButtonHideUnauthorized=Knoppen verbergen voor niet-beheerders voor ongeautoriseerde acties in plaats van grijze uitgeschakelde knoppen te tonen +OldVATRates=Oud BTW tarief +NewVATRates=Nieuw BTW tarief +PriceBaseTypeToChange=Wijzig op prijzen waarop een base reference waarde gedefiniëerd is MassConvert=Start bulkconversie Boolean=Boolean (één selectievakje) ExtrafieldUrl =url diff --git a/htdocs/langs/nl_BE/banks.lang b/htdocs/langs/nl_BE/banks.lang index 69a470c6db3..6a27c2a6715 100644 --- a/htdocs/langs/nl_BE/banks.lang +++ b/htdocs/langs/nl_BE/banks.lang @@ -1,5 +1,14 @@ # Dolibarr language file - Source file is en_US - banks +ShowAllTimeBalance=Toon saldo sinds begin +LabelBankCashAccount=label van bank of kas TransferTo=Aan +CheckTransmitter=Overboeker BankChecksToReceipt=Te innen cheques BankChecksToReceiptShort=Te innen cheques +InputReceiptNumber=Kies het bankafschrift in verband met de bemiddeling. Gebruik een sorteerbaar numerieke waarde: YYYYMM of YYYYMMDD +EventualyAddCategory=Tenslotte een categorie opgeven waarin de gegevens bewaard kunnen worden +ThenCheckLinesAndConciliate=Duid dan de lijnen aan van het bankafschrift en klik +DeleteARib=Verwijderen BAN gegeven +RejectCheck=Teruggekeerde cheque RejectCheckDate=Datum de cheque was teruggekeerd +CheckRejected=Teruggekeerde cheque diff --git a/htdocs/langs/nl_BE/cashdesk.lang b/htdocs/langs/nl_BE/cashdesk.lang index a64cdb82256..9019947e4b7 100644 --- a/htdocs/langs/nl_BE/cashdesk.lang +++ b/htdocs/langs/nl_BE/cashdesk.lang @@ -7,3 +7,4 @@ BankToPay=Betalingsaccount ShowCompany=Toon bedrijf ShowStock=Toon magazijn DolibarrReceiptPrinter=Dolibarr Ontvangsten Printer +Receipt=Ontvangst diff --git a/htdocs/langs/nl_BE/categories.lang b/htdocs/langs/nl_BE/categories.lang index cc68f1795a9..9d86adc7acd 100644 --- a/htdocs/langs/nl_BE/categories.lang +++ b/htdocs/langs/nl_BE/categories.lang @@ -46,14 +46,11 @@ ContactCategoriesShort=Contacten tags/categorieën AccountsCategoriesShort=Accounts tags/categorieën ProjectsCategoriesShort=Projecten tags/categorieën CategId=Tag/categorie id -CatCusList=Lijst van de klant/prospect tags/categorieën CatProdList=Lijst van producten tags/categorieën CatMemberList=Lijst van leden tags/categorieën -CatContactList=Lijst van contact tags/categorieën -CatSupLinks=Koppelingen tussen leveranciers en tags/categorieën CatCusLinks=Koppelingen tussen klanten/prospects en tags/categorieën CatProdLinks=Koppelingen tussen producten/diensten en tags/categorieën -CatProJectLinks=Koppelingen tussen projecten en tags/categorieën +CatProjectsLinks=Koppelingen tussen projecten en tags/categorieën CategoriesSetup=Tags/categorieën instellingen CategorieRecursiv=Automatische koppeling met bovenliggende tag/categorie ShowCategory=Toon tag / categorie diff --git a/htdocs/langs/nl_BE/exports.lang b/htdocs/langs/nl_BE/exports.lang new file mode 100644 index 00000000000..757f616a372 --- /dev/null +++ b/htdocs/langs/nl_BE/exports.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - exports +ExportStringFilter=%% laat het vervangen toe van één of meer tekens in de tekst diff --git a/htdocs/langs/nl_BE/externalsite.lang b/htdocs/langs/nl_BE/externalsite.lang new file mode 100644 index 00000000000..9fdddaacccf --- /dev/null +++ b/htdocs/langs/nl_BE/externalsite.lang @@ -0,0 +1,4 @@ +# 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/mails.lang b/htdocs/langs/nl_BE/mails.lang index c4133e0bebe..776b4ed9b2e 100644 --- a/htdocs/langs/nl_BE/mails.lang +++ b/htdocs/langs/nl_BE/mails.lang @@ -1,4 +1,30 @@ # Dolibarr language file - Source file is en_US - mails +AllEMailings=Alle EMailings MailCard=EMailings kaart +MailCC=Kopiëren naar +MailCCC=Gecachde kopie aan +MailMessage=E-mailinhoud +ShowEMailing=Toon EMailing +ListOfEMailings=EMailingenlijst +NewMailing=Nieuwe EMailing +EditMailing=Bewerk EMailing +ResetMailing=EMailing opnieuw verzenden +DeleteMailing=Verwijder EMailing +DeleteAMailing=Verwijder een EMailing +PreviewMailing=Voorbeeldweergave EMailing +CreateMailing=Creëer EMailing +ValidMailing=Geldige EMailing +MailingSuccessfullyValidated=Emailing succesvol gevalideerd +MailingStatusNotContact=Niet meer contacten +WarningNoEMailsAdded=Geen nieuw E-mailadres aan de lijst van ontvangers toe te voegen. +YouCanAddYourOwnPredefindedListHere=Om uw e-mailselectormodule te creëren, zie htdocs/core/modules/mailings/README. +XTargetsAdded=<b>%s</b> ontvangers toegevoegd in bestemming-lijst +MailingArea=EMailingsoverzicht +TargetsStatistics=Geaddresseerdenstatistieken +MailNoChangePossible=Ontvangers voor gevalideerde EMailings kunnen niet worden gewijzigd SearchAMailing=Zoek een E-mailing SendMailing=Verzend E-mailing +TargetsReset=Lijst legen +ToClearAllRecipientsClickHere=Klik hier om de lijst met ontvangers van deze EMailing te legen +NbOfEMailingsReceived=Bulk Emailings ontvangen +NbOfEMailingsSend=Mailings verstuurd diff --git a/htdocs/langs/nl_BE/main.lang b/htdocs/langs/nl_BE/main.lang index e91ff7bd44a..293c494d51e 100644 --- a/htdocs/langs/nl_BE/main.lang +++ b/htdocs/langs/nl_BE/main.lang @@ -19,6 +19,7 @@ FormatDateHourShort=%d-%m-%Y %H:%M FormatDateHourSecShort=%d/%m/%Y %I:%M:%S %p FormatDateHourTextShort=%d %b %Y %H:%M FormatDateHourText=%d %B %Y %H:%M +CurrentTimeZone=Huidige Tijdszone NoRecordFound=Geen record gevonden ErrorCanNotCreateDir=Kan dir %s niet maken ErrorCanNotReadDir=Kan dir %s niet lezen @@ -75,6 +76,7 @@ Category=Tag / categorie to=aan To=aan ApprovedBy2=Goedgekeurd door (tweede goedkeuring) +NotRead=Ongelezen Offered=Beschikbaar SetLinkToAnotherThirdParty=Link naar een derde partij SelectAction=Selecteer actie @@ -91,3 +93,4 @@ Select2SearchInProgress=Zoeken is aan de gang... SearchIntoProductsOrServices=Producten of diensten SearchIntoCustomerInvoices=Klant facturen SearchIntoExpenseReports=Uitgaven rapporten +OnHold=Tijdelijk geblokkeerd diff --git a/htdocs/langs/nl_BE/mrp.lang b/htdocs/langs/nl_BE/mrp.lang new file mode 100644 index 00000000000..a8ff138755b --- /dev/null +++ b/htdocs/langs/nl_BE/mrp.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/nl_BE/products.lang b/htdocs/langs/nl_BE/products.lang index 788278f0576..5448b609364 100644 --- a/htdocs/langs/nl_BE/products.lang +++ b/htdocs/langs/nl_BE/products.lang @@ -6,6 +6,5 @@ NotOnSell=Niet meer beschikbaar ProductStatusNotOnSell=Niet meer verkrijgbaar ProductStatusOnSellShort=Te koop ListOfStockMovements=Voorradenlijst -CustomCode=Customs / Commodity / HS code ProductSellByQuarterHT=Bruto omzetcijfer per trimester ServiceSellByQuarterHT=Bruto omzetcijfer per trimester diff --git a/htdocs/langs/nl_BE/sendings.lang b/htdocs/langs/nl_BE/sendings.lang index c29f8d65119..d6acc920084 100644 --- a/htdocs/langs/nl_BE/sendings.lang +++ b/htdocs/langs/nl_BE/sendings.lang @@ -3,6 +3,7 @@ ShowSending=Toon Verzendingen Receivings=Ontvangstbevestingen LastSendings=Laatste %s verzendingen QtyPreparedOrShipped=Aantal voorbereid of verzonden +QtyToShip=Aantal te verzenden QtyInOtherShipments=Aantal in andere verzendingen SendingsAndReceivingForSameOrder=Verzendingen en ontvangstbevestigingen van deze bestelling ConfirmDeleteSending=Weet u zeker dat u deze verzending wilt verwijderen? diff --git a/htdocs/langs/nl_BE/ticket.lang b/htdocs/langs/nl_BE/ticket.lang index 5fdcb01d6ba..943c019bd35 100644 --- a/htdocs/langs/nl_BE/ticket.lang +++ b/htdocs/langs/nl_BE/ticket.lang @@ -8,7 +8,6 @@ TicketDictSeverity=Ticket - Gradaties TicketTypeShortISSUE=Probleem, bug of probleem TicketTypeShortREQUEST=Verander- of verbeteringsverzoek TicketTypeShortOTHER=Ander -TicketSeverityShortBLOCKING=Kritisch / Blokkerend ErrorBadEmailAddress=Veld '%s' onjuist MenuTicketMyAssignNonClosed=Mijn open tickets TypeContact_ticket_external_SUPPORTCLI=Klantcontact / incident volgen diff --git a/htdocs/langs/nl_BE/withdrawals.lang b/htdocs/langs/nl_BE/withdrawals.lang new file mode 100644 index 00000000000..facdefc082f --- /dev/null +++ b/htdocs/langs/nl_BE/withdrawals.lang @@ -0,0 +1,2 @@ +# 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 c6449f8ac34..13032515f54 100644 --- a/htdocs/langs/nl_NL/accountancy.lang +++ b/htdocs/langs/nl_NL/accountancy.lang @@ -16,6 +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 CantSuggest=Geen voorstel AccountancySetupDoneFromAccountancyMenu=Meeste instellingen boekhouding worden gedaan vanuit menu %s ConfigAccountingExpert=Configuratie van boekhoud-module (dubbel boekhouden) @@ -48,6 +50,7 @@ CountriesExceptMe=Alle landen behalve %s AccountantFiles=Bron-documenten exporteren ExportAccountingSourceDocHelp=Met deze tool kunt u de lijsten en pdf bestanden exporteren die werden gebruikt om uw boekhouding te genereren. Gebruik het menu-item %s - %s om uw dagboeken te exporteren. VueByAccountAccounting=Overzicht per grootboekrekening +VueBySubAccountAccounting=Overzicht op volgorde subrekening MainAccountForCustomersNotDefined=De standaard grootboekrekening voor klanten is niet vastgelegd bij de instellingen MainAccountForSuppliersNotDefined=Hoofdrekening voor leveranciers die niet zijn gedefinieerd in de configuratie @@ -144,7 +147,7 @@ NotVentilatedinAccount=Niet gekoppeld aan grootboekrekening XLineSuccessfullyBinded=%s producten/diensten met succes gekoppeld aan een grootboekrekening XLineFailedToBeBinded=%s producten/diensten zijn niet gekoppeld aan een grootboekrekening -ACCOUNTING_LIMIT_LIST_VENTILATION=Aantal verbonden elementen per pagina (voorstel: max. 50) +ACCOUNTING_LIMIT_LIST_VENTILATION=Maximumaantal regels op lijst en bindpagina (aanbevolen: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Begin met het sorteren van de pagina nog te koppelen met de laatste boekingen ACCOUNTING_LIST_SORT_VENTILATION_DONE=Begin met het sorteren van de pagina koppelen voltooid met de laatste boekingen @@ -198,7 +201,8 @@ Docdate=Date Docref=Reference LabelAccount=Label account LabelOperation=Werking label -Sens=D/C +Sens=Richting +AccountingDirectionHelp=Voor een tegenrekening van een klant, gebruik Credit om een betaling vast te leggen die u hebt ontvangen <br> Gebruik een tegenrekening van een leverancier Debet om een betaling vast te leggen die u hebt gedaan LetteringCode=Aflettercode Lettering=Afletteren Codejournal=Journaal @@ -206,7 +210,8 @@ JournalLabel=Journaal label NumPiece=Boekingstuk TransactionNumShort=Transactienummer AccountingCategory=Gepersonaliseerde groepen -GroupByAccountAccounting=Groeperen per grootboekrekening +GroupByAccountAccounting=Groeperen op grootboekrekening +GroupBySubAccountAccounting=Groepeer op subgrootboekrekening AccountingAccountGroupsDesc=Hier kunt u enkele grootboekrekening-groepen definiëren. Deze worden gebruikt voor gepersonaliseerde boekhoudrapporten. ByAccounts=Op grootboekrekening ByPredefinedAccountGroups=Op voorgedefinieerde groepen @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Betaling niet gekoppeld aan een product / dienst OpeningBalance=Beginbalans ShowOpeningBalance=Toon beginbalans HideOpeningBalance=Verberg beginbalans -ShowSubtotalByGroup=Totaal per groep +ShowSubtotalByGroup=Toon subtotaal op niveau Pcgtype=Rekening hoofdgroep PcgtypeDesc=Cluster grootboekrekeningen welke gebruikt worden als vooraf gedefinieerde 'filter'- en' groepeer'-criteria voor sommige boekhoudrapporten. 'INKOMEN' of 'UITGAVEN' worden bijvoorbeeld gebruikt als groepen voor boekhoudrekeningen van producten om het kosten- / inkomstenrapport samen te stellen. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Hier kunt u de lijst raadplegen van kostenregels om te k DescVentilExpenseReportMore=Als u een account instelt op het type onkostendeclaratieregels, kan de toepassing alle bindingen maken tussen uw declaratieregels en de boekhoudrekening van uw rekeningschema, met één klik met de knop <strong> "%s" </ strong>. Als het account niet is ingesteld op het tarievenwoordenboek of als u nog steeds regels hebt die niet aan een account zijn gekoppeld, moet u een manuele binding maken via het menu "<strong> %s </ strong>". DescVentilDoneExpenseReport=Hier kunt u de lijst raadplegen van kostenregels met hun tegenrekening +Closure=Jaarafsluiting DescClosure=Raadpleeg hier het aantal bewegingen per maand die niet zijn gevalideerd en fiscale jaren die al open zijn OverviewOfMovementsNotValidated=Stap 1 / Overzicht van bewegingen niet gevalideerd. (Noodzakelijk om een boekjaar af te sluiten) +AllMovementsWereRecordedAsValidated=Alle boekingen zijn geregistreerd als gevalideerd +NotAllMovementsCouldBeRecordedAsValidated=Niet alle boekingen konden als gevalideerd worden geregistreerd ValidateMovements=Valideer wijzigingen DescValidateMovements=Elke wijziging of verwijdering van inboeken, afletteren en verwijderingen is verboden. Alle boekingen moeten worden gevalideerd, anders is afsluiten niet mogelijk -SelectMonthAndValidate=Selecteer een maand en valideer bewerkingen ValidateHistory=Automatisch boeken AutomaticBindingDone=Automatisch koppelen voltooid @@ -293,6 +300,7 @@ Accounted=Geboekt in grootboek NotYetAccounted=Nog niet doorgeboekt in boekhouding ShowTutorial=Handleiding weergeven NotReconciled=Niet afgestemd +WarningRecordWithoutSubledgerAreExcluded=Pas op, alle bewerkingen zonder gedefinieerde subgrootboekrekening worden gefilterd en uitgesloten van deze weergave ## Admin BindingOptions=Koppelmogelijkheden @@ -337,10 +345,11 @@ Modelcsv_LDCompta10=Exporteren voor LD Compta (v10 en hoger) Modelcsv_openconcerto=Exporteren voor OpenConcerto (test) Modelcsv_configurable=Configureerbare CSV export Modelcsv_FEC=FEC exporteren +Modelcsv_FEC2=FEC exporteren (met datumgeneratie schrijven / document omgekeerd) Modelcsv_Sage50_Swiss=Export voor Sage 50 Zwitserland Modelcsv_winfic=Export Winfic - eWinfic - WinSis Compta -Modelcsv_Gestinumv3=Export for Gestinum (v3) -Modelcsv_Gestinumv5Export for Gestinum (v5) +Modelcsv_Gestinumv3=Exporteren voor Gestinum (v3) +Modelcsv_Gestinumv5Export voor Gestinum (v5) ChartofaccountsId=Rekeningschema Id ## Tools - Init accounting account on product / service diff --git a/htdocs/langs/nl_NL/admin.lang b/htdocs/langs/nl_NL/admin.lang index 99c50f85f22..7459ec2257a 100644 --- a/htdocs/langs/nl_NL/admin.lang +++ b/htdocs/langs/nl_NL/admin.lang @@ -9,10 +9,10 @@ VersionExperimental=Experimenteel VersionDevelopment=Ontwikkeling VersionUnknown=Onbekend VersionRecommanded=Aanbevolen -FileCheck=Bestands integriteit controles -FileCheckDesc=Met deze tool kunt u de integriteit van bestanden en de installatie van uw applicatie controleren door elk bestand met het officiële bestand te vergelijken. De waarde van sommige setup-constanten kan ook worden gecontroleerd. U kunt deze tool gebruiken om te bepalen of bestanden zijn gewijzigd (bijvoorbeeld door een hacker). -FileIntegrityIsStrictlyConformedWithReference=Bestandsintegriteit is sterk conform de referentiebestanden. -FileIntegrityIsOkButFilesWereAdded=Integriteitscontrole is geslaagd, echter zijn er nieuwe bestanden toegevoegd. +FileCheck=Bestandsintegriteit controles +FileCheckDesc=Met deze tool kunt u de integriteit van bestanden en de installatie van uw applicatie controleren door elk bestand met het officiële bestand te vergelijken. De waarde van sommige set-up constanten kan ook worden gecontroleerd. U kunt deze tool gebruiken om te bepalen of bestanden zijn gewijzigd (bijvoorbeeld door een hacker). +FileIntegrityIsStrictlyConformedWithReference=De integriteit van bestanden is strikt in overeenstemming met de referentie. +FileIntegrityIsOkButFilesWereAdded=Integriteitscontrole is geslaagd, er zijn echter nieuwe bestanden toegevoegd. FileIntegritySomeFilesWereRemovedOrModified=Controle op integriteit van de bestanden is mislukt. Sommige bestanden zijn gewijzigd, verwijderd of toegevoegd. GlobalChecksum=Globaal controlegetal MakeIntegrityAnalysisFrom=Maak integriteitsanalyse van toepassingsbestanden van @@ -24,27 +24,27 @@ FilesModified=Gewijzigde bestanden FilesAdded=Toegevoegde bestanden FileCheckDolibarr=Controleer de integriteit van applicatiebestanden AvailableOnlyOnPackagedVersions=Het lokale bestand voor integriteitscontrole is alleen beschikbaar wanneer de toepassing wordt geïnstalleerd vanuit een officieel pakket -XmlNotFound=Xml-integriteitsbestand van de toepassing is niet gevonden -SessionId=Sessie-ID +XmlNotFound=XML integriteitsbestand van de toepassing is niet gevonden +SessionId=Sessie ID SessionSaveHandler=Wijze van sessieopslag SessionSavePath=Sessie opslag locatie PurgeSessions=Verwijderen van sessies ConfirmPurgeSessions=Wilt u werkelijk alle sessies sluiten? Dit zal elke gebruikerssessie afbreken (behalve die van uzelf). NoSessionListWithThisHandler=Save session handler geconfigureerd in uw PHP staat niet toe dat alle lopende sessies worden vermeld. LockNewSessions=Blokkeer nieuwe sessies -ConfirmLockNewSessions=Weet je zeker dat je elke nieuwe Dolibarr-verbinding wilt beperken tot jezelf? Alleen gebruiker <b>%s</b> kan daarna verbinding maken. +ConfirmLockNewSessions=Weet je zeker dat je elke nieuwe Dolibarr verbinding wilt beperken tot jezelf? Alleen gebruiker <b>%s</b> kan daarna verbinding maken. UnlockNewSessions=Verwijder sessieblokkering YourSession=Uw sessie -Sessions=Gebruikersessies +Sessions=Gebruikerssessies WebUserGroup=Webserver gebruiker / groep 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). +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). DBStoringCharset=Database karakterset voor het opslaan van gegevens DBSortingCharset=Database karakterset voor het sorteren van gegevens -HostCharset=Host-tekenset -ClientCharset=Cliënt tekenset -ClientSortingCharset=Cliënt vergelijking +HostCharset=Host karakterset +ClientCharset=Cliënt karakterset +ClientSortingCharset=Cliënt collatie WarningModuleNotActive=<b>Module %s</b> dient te worden ingeschakeld WarningOnlyPermissionOfActivatedModules=Hier worden alleen de rechten van geactiveerde modules weergegeven. U kunt andere modules activeren in het menu Home > Instellingen > Modules DolibarrSetup=Installatie of update van Dolibarr @@ -56,6 +56,8 @@ GUISetup=Weergave SetupArea=Instellingen UploadNewTemplate=Nieuwe template(s) uploaden FormToTestFileUploadForm=Formulier waarmee bestandsupload kan worden getest (afhankelijk van de gekozen opties) +ModuleMustBeEnabled=Module / applicatie <b>%s</b> moet ingeschakeld zijn +ModuleIsEnabled=Module / applicatie <b>%s</b> is ingeschakeld IfModuleEnabled=Opmerking: Ja, is alleen effectief als module <b>%s</b> is geactiveerd 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. @@ -64,9 +66,9 @@ SecurityFilesDesc=Definieer hier de opties met betrekking tot beveiliging bij he ErrorModuleRequirePHPVersion=Fout, deze module vereist PHP versie %s of hoger. ErrorModuleRequireDolibarrVersion=Fout, deze module vereist Dolibarr versie %s of hoger. ErrorDecimalLargerThanAreForbidden=Fout, een nauwkeurigheid van meer dan <b>%s</b> wordt niet ondersteund. -DictionarySetup=Veldwaarde instellingen -Dictionary=Veld waarden -ErrorReservedTypeSystemSystemAuto=De waarde 'system' en 'systemauto' als type zijn voorbehouden voor het systeem. Je kan 'user' als waarde gebruiken om je eigen gegevens-record toe te voegen. +DictionarySetup=Woordenboek instellingen +Dictionary=Woordenboeken +ErrorReservedTypeSystemSystemAuto=De waarde 'system' en 'systemauto' als type zijn voorbehouden aan het systeem. Je kan 'user' als waarde gebruiken om je eigen record toe te voegen. ErrorCodeCantContainZero=Code mag geen 0 bevatten DisableJavascript=Schakel JavaScript en AJAX-functionaliteit uit DisableJavascriptNote=Opmerking: voor test- of foutopsporingsdoeleinden. Voor optimalisatie voor blinden of tekstbrowsers, kunt u ervoor kiezen om de instellingen op het profiel van de gebruiker te gebruiken @@ -76,17 +78,16 @@ DelaiedFullListToSelectCompany=Wacht tot een toets wordt ingedrukt voordat inhou DelaiedFullListToSelectContact=Wacht tot een toets wordt ingedrukt voordat de inhoud van de combo-lijst met contactpersonen wordt geladen. <br> Dit kan de prestaties verbeteren als u een groot aantal contacten heeft, maar het is minder handig. NumberOfKeyToSearch=Aantal tekens om de zoekopdracht te activeren: %s NumberOfBytes=Aantal bytes -SearchString=Zoekstring -NotAvailableWhenAjaxDisabled=Niet beschikbaar wanneer AJAX functionaliteit uitgeschakeld is -AllowToSelectProjectFromOtherCompany=Bij een document van een relatiej, kan een project worden gekozen dat is gekoppeld aan een relatie +SearchString=Zoekreeks +NotAvailableWhenAjaxDisabled=Niet beschikbaar wanneer AJAX functionaliteit is uitgeschakeld +AllowToSelectProjectFromOtherCompany=Bij een document van een relatie, kan een project worden gekozen dat gekoppeld is aan een andere relatie JavascriptDisabled=JavaScript uitgeschakeld -UsePreviewTabs=Gebruik voorbeeld tabbladen +UsePreviewTabs=Gebruik voorbeeldtabbladen ShowPreview=Toon voorbeeldweergave ShowHideDetails=Toon of verberg details PreviewNotAvailable=Voorbeeldweergave niet beschikbaar ThemeCurrentlyActive=Huidige thema -CurrentTimeZone=Huidige tijdzone (server) -MySQLTimeZone=Huidige tijdzone (database) +MySQLTimeZone=Huidige tijdzone MySQL (database) TZHasNoEffect=Datums worden opgeslagen en geretourneerd door de databaseserver alsof ze werden bewaard als ingeleverde reeks. De tijdzone heeft alleen effect wanneer de UNIX_TIMESTAMP-functie wordt gebruikt (die niet door Dolibarr zou moeten worden gebruikt, dus database-TZ zou geen effect moeten hebben, zelfs als deze werd gewijzigd nadat gegevens waren ingevoerd). Space=Ruimte Table=Tabel @@ -106,13 +107,13 @@ AntiVirusCommand=Het volledige pad naar het antiviruscommando AntiVirusCommandExample=Voorbeeld voor ClamAv Daemon (vereist clamav-daemon): / usr / bin / clamdscan<br>Voorbeeld voor ClamWin (erg langzaam): c: \\ Progra ~ 1 \\ ClamWin \\ bin \\ clamscan.exe AntiVirusParam= Aanvullende parameters op de opdrachtregel AntiVirusParamExample=Voorbeeld voor ClamAv Daemon: --fdpass<br>Voorbeeld voor ClamWin: --database = "C: \\ Program Files (x86) \\ ClamWin \\ lib" -ComptaSetup=Instellingen van de boekhoudkundige module +ComptaSetup=Instellingen van de boekhoud module UserSetup=Gebruikersbeheer instellingen -MultiCurrencySetup=Setup meerdere valuta's +MultiCurrencySetup=Set-up meerdere valuta's MenuLimits=Limieten en nauwkeurigheid MenuIdParent=ID van het bovenliggende menu DetailMenuIdParent=ID van het bovenliggend menu (0 voor een hoogste menu) -DetailPosition=Sorteren aantal te definiëren menupositie +DetailPosition=Sorteer nummer dat de volgorde van menupositie bepaalt AllMenus=Alles NotConfigured=Module/applicatie niet geconfigureerd Active=Actief @@ -120,20 +121,20 @@ SetupShort=Instellingen OtherOptions=Overige opties OtherSetup=Andere instellingen CurrentValueSeparatorDecimal=Decimaal scheidingsteken -CurrentValueSeparatorThousand=Duizend scheidingsteken +CurrentValueSeparatorThousand=Duizendtal scheidingsteken Destination=Bestemming IdModule=Module ID IdPermissions=Rechten ID LanguageBrowserParameter=Instelling %s -LocalisationDolibarrParameters=Localisatie-instellingen -ClientTZ=Tijdzone van de klant (gebruiker) -ClientHour=Tijd bij de klant (gebruiker) +LocalisationDolibarrParameters=Lokalisatie instellingen +ClientTZ=Tijdzone van de gebruiker +ClientHour=Tijd bij de gebruiker OSTZ=Server OS tijdzone PHPTZ=Tijdzone PHP server -DaylingSavingTime=Zomertijd (gebruiker) -CurrentHour=Huidige tijd (server) -CurrentSessionTimeOut=Huidige sessie timeout -YouCanEditPHPTZ=Om een ​​andere PHP-tijdzone in te stellen (niet verplicht), kunt u proberen een .htaccess-bestand toe te voegen met de volgende regel: "SetEnv TZ Europe / Paris" +DaylingSavingTime=Zomertijd +CurrentHour=PHP tijd (server) +CurrentSessionTimeOut=Huidige sessie time-out +YouCanEditPHPTZ=Om een ​​andere PHP tijdzone in te stellen (niet verplicht), kunt u proberen een .htaccess bestand toe te voegen met de volgende regel: "SetEnv TZ Europe / Paris" HoursOnThisPageAreOnServerTZ=Waarschuwing, in tegenstelling tot andere schermen, bevinden de uren op deze pagina zich niet in uw lokale tijdzone, maar in de tijdzone van de server. Box=Widget Boxes=Widgets @@ -142,7 +143,7 @@ AllWidgetsWereEnabled=Alle beschikbare widgets zijn geactiveerd PositionByDefault=Standaard volgorde Position=Positie MenusDesc=Menu-managers bepalen de inhoud van de twee menubalken in (horizontaal en verticaal). -MenusEditorDesc=Met behulp van de menu-editor kunt u gepersonaliseerde items in menu's instellen. Gebruik deze functionaliteit zorgvuldig om te vermijden dat Dolibarr instabiel wordt en menu-items permanent onbereikbaar worden.<br>Sommige modules voegen items toe in de menu's (in de meeste gevallen in het menu <b>Alle</b>). Als u sommige van deze items abusievelijk verwijderd, dan kunt u ze herstellen door de module eerst uit te schakelen en daarna opnieuw in te schakelen. +MenusEditorDesc=Met behulp van de menu-editor kunt u gepersonaliseerde items in menu's instellen. Gebruik deze functionaliteit zorgvuldig om te vermijden dat Dolibarr instabiel wordt en menu-items permanent onbereikbaar worden.<br>Sommige modules voegen items toe in de menu's (in de meeste gevallen in het menu <b>Alle</b>). Wanneer u sommige van deze items abusievelijk verwijdert, dan kunt u ze herstellen door de module eerst uit te schakelen en daarna weer opnieuw in te schakelen. MenuForUsers=Gebruikersmenu LangFile=.lang bestand Language_en_US_es_MX_etc=Taal (en_US, es_MX, ...) @@ -153,9 +154,9 @@ 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 tijdelijke bestanden (geen risico op gegevensverlies). Opmerking: verwijdering vindt alleen plaats als de tijdelijke map 24 uur geleden is gemaakt. -PurgeDeleteTemporaryFilesShort=Verwijder 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. +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. +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 PurgeNothingToDelete=Geen directory of bestanden om te verwijderen. PurgeNDirectoriesDeleted=<b>%s</b> bestanden of mappen verwijderd. @@ -163,18 +164,18 @@ PurgeNDirectoriesFailed=Kan <b>%s</b>bestanden of mappen niet verwijderen. PurgeAuditEvents=Verwijder alle beveiligingsgerelateerde gebeurtenissen ConfirmPurgeAuditEvents=Weet u zeker dat u alle beveiligingsgerelateerde gebeurtenissen wilt verwijderen? Alle beveiligingsgerelateerde logbestanden zullen worden verwijderd. Er zullen geen andere gegevens worden verwijderd. GenerateBackup=Genereer backup -Backup=Backup +Backup=Back-up Restore=Herstellen -RunCommandSummary=Backup geïnitieerd met het volgende commando -BackupResult=Resultaat backup -BackupFileSuccessfullyCreated=Backupbestand succesvol gegenereerd +RunCommandSummary=Back-up geïnitieerd met het volgende commando +BackupResult=Resultaat back-up +BackupFileSuccessfullyCreated=Back-upbestand succesvol gegenereerd YouCanDownloadBackupFile=Het gegenereerde bestand kan nu worden gedownload NoBackupFileAvailable=Geen back-up bestanden beschikbaar. ExportMethod=Exporteer methode ImportMethod=Importeer methode ToBuildBackupFileClickHere=Om een back-up bestand te maken, klik <a href="%s">hier</a>. -ImportMySqlDesc=Om een MySQL-back-upbestand te importeren, kunt u phpMyAdmin gebruiken via uw hosting of de opdracht mysql gebruiken vanaf de opdrachtregel. <br> Bijvoorbeeld: -ImportPostgreSqlDesc=Om een backupbestand te importeren, dient u het 'pg_restore' commando vanaf de opdrachtregel uit te voeren: +ImportMySqlDesc=Om een MySQL back-upbestand te importeren, kunt u phpMyAdmin gebruiken via uw hosting of de opdracht mysql gebruiken vanaf de opdrachtregel. <br> Bijvoorbeeld: +ImportPostgreSqlDesc=Om een back-upbestand te importeren, dient u het 'pg_restore' commando vanaf de opdrachtregel uit te voeren: ImportMySqlCommand=%s %s < mijnbackupbestand.sql ImportPostgreSqlCommand=%s %s mijnbackupbestand.sql FileNameToGenerate=Bestandsnaam voor back-up: @@ -194,7 +195,7 @@ AddDropTable=Voeg 'DROP TABLE' commando toe ExportStructure=Structuur NameColumn=Naam kolommen ExtendedInsert=Uitgebreide (extended) INSERT -NoLockBeforeInsert=Geen lock-opdrachten rond INSERT +NoLockBeforeInsert=Geen lock opdrachten rond INSERT DelayedInsert=Vertraagde (delayed) INSERT EncodeBinariesInHexa=Codeer binaire data in hexadecimalen IgnoreDuplicateRecords=Negeer fouten van dubbele tabelregels (INSERT negeren) @@ -218,11 +219,11 @@ CompatibleAfterUpdate=Deze module vereist een update van uw Dolibarr %s (Min %s SeeInMarkerPlace=Bekijk in winkel SeeSetupOfModule=Zie setup van module%s Updated=Bijgewerkt -Nouveauté=Nieuwsitems +Nouveauté=Nieuwigheid AchatTelechargement=Kopen / Downloaden GoModuleSetupArea=Ga naar het gedeelte Module-instellingen om een nieuwe module te implementeren/installeren: <a href="%s">%s</a> . DoliStoreDesc=DoliStore, de officiële markt voor externe Dolibarr ERP / CRM modules. -DoliPartnersDesc=Lijst met bedrijven die op maat ontwikkelde modules of functies leveren. <br>Opmerking: aangezien Dolibarr een open source-applicatie is, moet <i>iedereen</i> die ervaring heeft met PHP-programmering een module moeten kunnen ontwikkelen. +DoliPartnersDesc=Lijst met bedrijven die op maat ontwikkelde modules of functies leveren. <br>Opmerking: aangezien Dolibarr een open source-applicatie is, moet <i>iedereen</i> die ervaring heeft met PHP-programmering een module kunnen ontwikkelen. WebSiteDesc=Externe websites voor meer add-on (niet-core) modules ... DevelopYourModuleDesc=Enkele oplossingen om uw eigen module te ontwikkelen ... URL=URL @@ -246,17 +247,18 @@ ProtectAndEncryptPdfFilesDesc=Bescherming van PDF files, deze kunnen nog gelezen Feature=Functionaliteit DolibarrLicense=Licentie Developpers=Ontwikkelaars / mensen die bijgedragen hebben -OfficialWebSite=Officiële Dolibarr-website +OfficialWebSite=Officiële Dolibarr website OfficialWebSiteLocal=Lokale website (%s) OfficialWiki=Dolibarr documentatie / Wiki OfficialDemo=Online demonstratie van Dolibarr OfficialMarketPlace=Officiële markt voor externe modules / addons OfficialWebHostingService=Verwezen web hosting diensten (Cloud hosting) -ReferencedPreferredPartners=Preferred Partners +ReferencedPreferredPartners=Voorkeur Partners OtherResources=Andere middelen ExternalResources=Externe bronnen SocialNetworks=Sociale netwerken -ForDocumentationSeeWiki=Documentatie voor gebruikers of ontwikkelaars kunt u inzien door <br>te kijken op de Dolibarr Wiki-pagina's:<br><b><a href="%s" target="_blank">%s</a></b> +SocialNetworkId=Sociale netwerk ID +ForDocumentationSeeWiki=Documentatie voor gebruikers of ontwikkelaars kunt u inzien door <br>te kijken op de Dolibarr Wiki pagina's:<br><b><a href="%s" target="_blank">%s</a></b> ForAnswersSeeForum=Voor alle andere vragen / hulp, kunt u gebruik maken van het Dolibarr forum:<br><b><a href="%s" target="_blank">%s</a></b> HelpCenterDesc1=Hier enkele bronnen voor hulp en ondersteuning met Dolibarr. HelpCenterDesc2=Enkele bronnen zijn alleen beschikbaar in het <b>Engels</b>. @@ -277,8 +279,8 @@ EMailsSetup=E-mail instellingen EMailsDesc=Op deze pagina kunt u parameters of opties instellen voor het verzenden van e-mail. EmailSenderProfiles=Verzender e-mails profielen EMailsSenderProfileDesc=U kunt deze sectie leeg houden. Als u hier enkele e-mails invoert, worden deze toegevoegd aan de lijst met mogelijke afzenders in de combobox wanneer u een nieuwe e-mail schrijft. -MAIN_MAIL_SMTP_PORT=SMTP / SMTPS-poort (standaardwaarde in php.ini: <b>%s</b>) -MAIN_MAIL_SMTP_SERVER=SMTP / SMTPS-host (standaardwaarde in php.ini: <b>%s</b>) +MAIN_MAIL_SMTP_PORT=SMTP / SMTPS-poort (standaard waarde in php.ini: <b>%s</b>) +MAIN_MAIL_SMTP_SERVER=SMTP / SMTPS-host (standaard waarde in php.ini: <b>%s</b>) MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike=SMTP/SMTPS-poort (niet gedefinieerd in PHP op Unix-achtige systemen) MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike=SMTP/SMTPS Host (niet gedefinieerd in PHP op Unix-achtige systemen) MAIN_MAIL_EMAIL_FROM=E-mail afzender voor automatische e-mails (standaardwaarde in php.ini: <b>%s</b>) @@ -289,17 +291,17 @@ MAIN_MAIL_FORCE_SENDTO=Stuur alle e-mails naar (in plaats van echte ontvangers, MAIN_MAIL_ENABLED_USER_DEST_SELECT=Stel e-mails van werknemers (indien gedefinieerd) voor in de lijst met vooraf gedefinieerde ontvangers bij het schrijven van een nieuwe e-mail MAIN_MAIL_SENDMODE=E-mail verzendmethode MAIN_MAIL_SMTPS_ID=SMTP ID (als het verzenden vanaf de server authenticatie vereist) -MAIN_MAIL_SMTPS_PW=SMTP-wachtwoord (als het verzenden vanaf de server authenticatie vereist) +MAIN_MAIL_SMTPS_PW=SMTP wachtwoord (als het verzenden vanaf de server authenticatie vereist) MAIN_MAIL_EMAIL_TLS=Gebruik TLS (SSL) encryptie MAIN_MAIL_EMAIL_STARTTLS=Gebruik TLS (STARTTLS) -codering -MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED=Authorise les certificats auto-signés -MAIN_MAIL_EMAIL_DKIM_ENABLED=Gebruik DKIM om een e-mailhandtekening te genereren -MAIN_MAIL_EMAIL_DKIM_DOMAIN=E-maildomein voor gebruik met dkim -MAIN_MAIL_EMAIL_DKIM_SELECTOR=Naam van dkim selector -MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY=Persoonlijke sleutel voor dkim-ondertekening +MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED=Autoriseer zelfondertekende certificaten +MAIN_MAIL_EMAIL_DKIM_ENABLED=Gebruik DKIM om een e-mail handtekening te genereren +MAIN_MAIL_EMAIL_DKIM_DOMAIN=E-maildomein voor gebruik met DKIM +MAIN_MAIL_EMAIL_DKIM_SELECTOR=Naam van DKIM selector +MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY=Persoonlijke sleutel voor DKIM ondertekening MAIN_DISABLE_ALL_SMS=Schakel alle sms-verzending uit (voor testdoeleinden of demo's) MAIN_SMS_SENDMODE=Methode te gebruiken om SMS te verzenden -MAIN_MAIL_SMS_FROM=Standaard afzender telefoonnummer voor SMS-verzending +MAIN_MAIL_SMS_FROM=Standaard afzender telefoonnummer voor SMS verzending MAIN_MAIL_DEFAULT_FROMTYPE=Standaard afzender e-mail voor handmatig verzenden (gebruikers e-mail of bedrijf e-mail) UserEmail=E-mailadres gebruiker CompanyEmail=E-mailadres bedrijf @@ -307,46 +309,46 @@ FeatureNotAvailableOnLinux=Functionaliteit niet beschikbaar op Unix-achtige syst FixOnTransifex=Verbeter de vertaling op het online vertaalplatform van het project SubmitTranslation=Als de vertaling voor deze taal niet compleet is of als u fouten vindt, kunt u dit corrigeren door bestanden in directory <b>langs / %s te bewerken</b> en uw wijziging in te dienen op www.transifex.com/dolibarr-association/dolibarr/ SubmitTranslationENUS=Als de vertaling voor deze taal niet compleet is of als je fouten tegenkomt, kun je dit corrigeren door bestanden te bewerken in de directory <b> langs / %s </b> en aangepaste bestanden in te dienen op dolibarr.org/forum of, als je een ontwikkelaar bent, met een PR op github .com / Dolibarr / dolibarr -ModuleSetup=Module-instellingen +ModuleSetup=Module instellingen ModulesSetup=Instellingen van modules & applicatie ModuleFamilyBase=Systeem ModuleFamilyCrm=Customer Relationship Management (CRM) ModuleFamilySrm=Vendor Relationship Management (VRM) ModuleFamilyProducts=Product Management (PM) ModuleFamilyHr=Human Resource Management (HR) -ModuleFamilyProjects=Projecten / Samenwerkingen +ModuleFamilyProjects=Projecten / Samenwerking ModuleFamilyOther=Ander -ModuleFamilyTechnic=Hulpmiddelen voor multi-modules +ModuleFamilyTechnic=Hulpmiddelen voor multi modules ModuleFamilyExperimental=Experimentele modules ModuleFamilyFinancial=Financiële Modules (Boekhouding / Bedrijfsfinanciën) ModuleFamilyECM=Electronic Content Management (ECM) -ModuleFamilyPortal=Websites en andere frontale toepassing +ModuleFamilyPortal=Websites en andere toepassingen met gebruikersinterface ModuleFamilyInterface=Interfaces met externe systemen MenuHandlers=Menuverwerkers MenuAdmin=Menu wijzigen DoNotUseInProduction=Niet in productie gebruiken ThisIsProcessToFollow=Upgradeprocedure: -ThisIsAlternativeProcessToFollow=Dit is een alternatieve setup om handmatig te verwerken: +ThisIsAlternativeProcessToFollow=Dit is een alternatieve set-up om handmatig te verwerken: StepNb=Stap %s FindPackageFromWebSite=Zoek een pakket met de functies die u nodig hebt (bijvoorbeeld op de officiële website %s). DownloadPackageFromWebSite=Downloadpakket (bijvoorbeeld van de officiële website %s). -UnpackPackageInDolibarrRoot=Pak de ingepakte bestanden uit in uw Dolibarr-servermap: <b>%s</b> -UnpackPackageInModulesRoot=Om een externe module te implementeren / installeren, moet u de verpakte bestanden uitpakken in de servermap voor externe modules: <br> <b>%s</b> -SetupIsReadyForUse=Module-implementatie is voltooid. U moet de module in uw toepassing echter inschakelen en instellen door naar de pagina-instellingsmodules te gaan: <a href="%s">%s</a>. +UnpackPackageInDolibarrRoot=Pak de ingepakte bestanden uit in uw Dolibarr servermap: <b>%s</b> +UnpackPackageInModulesRoot=Om een externe module te implementeren / installeren, moet u de gezipte bestanden uitpakken in de servermap voor externe modules: <br> <b>%s</b> +SetupIsReadyForUse=Module-implementatie is voltooid. U moet de module in uw toepassing echter inschakelen en configureren door naar de pagina Instellingen / modules te gaan: <a href="%s">%s</a>. NotExistsDirect=De alternatieve hoofdmap is niet gedefinieerd in een bestaande map.<br> InfDirAlt=Vanaf versie 3 is het mogelijk om een alternatieve root directory te definiëren. Dit stelt je in staat om op dezelfde plaats zowel plug-ins als eigen templates te bewaren. <br>Maak gewoon een directory op het niveau van de root van Dolibarr (bv met de naam: aanpassing).<br> -InfDirExample=<br>Leg dit vast in het bestand <strong>conf.php</strong><br> $dolibarr_main_url_root_alt='/custom'<br>$dolibarr_main_document_root_alt='/path/of/dolibarr/htdocs/custom'<br>Als deze lijnen zijn inactief gemaakt met een "#" teken, verwijder dit teken dan om ze te activeren. -YouCanSubmitFile=U kunt het .zip-bestand van het modulepakket vanaf hier uploaden: +InfDirExample=<br>Leg dit vast in het bestand <strong>conf.php</strong><br> $dolibarr_main_url_root_alt='/custom'<br>$dolibarr_main_document_root_alt='/path/of/dolibarr/htdocs/custom'<br>Als deze regels inactief zijn gemaakt met een "#" teken, verwijder dit teken dan om ze te activeren. +YouCanSubmitFile=U kunt het .zip bestand van het modulepakket vanaf hier uploaden: CurrentVersion=Huidige versie van Dolibarr CallUpdatePage=Blader naar de pagina die de databasestructuur en gegevens bijwerkt: %s. LastStableVersion=Laatste stabiele versie LastActivationDate=Laatste activeringsdatum LastActivationAuthor=Laatste activeringsauteur -LastActivationIP=Laatste activerings-IP +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 clientcode 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 - Setup - Woordenboek - Soorten derden) . Als u deze label toevoegt, is de teller anders voor elk type derde partij.<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> GenericMaskCodes3=Alle andere karakters in het masker zullen intact blijven.<br>Spaties zijn niet toegestaan.<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> @@ -360,23 +362,23 @@ DoTestSend=Test verzenden DoTestSendHTML=Test het verzenden van HTML ErrorCantUseRazIfNoYearInMask=Fout, kan optie @ niet gebruiken om teller te resetten als sequence {yy} or {yyyy} niet in het masker. ErrorCantUseRazInStartedYearIfNoYearMonthInMask=Fout, kan optie @ niet gebruiken wanneer de volgorde {jj}{mm} of {jjjj}{mm} niet is opgenomen in het masker. -UMask=Umask parameter voor nieuwe bestanden op een Unix- / Linux- / BSD-bestandssysteem. -UMaskExplanation=Deze parameter laat u de rechten bepalen welke standaard zijn ingesteld voor de bestanden aangemaakt door Dolibarr op de server (tijdens het uploaden, bijvoorbeeld).<br>Het moet de octale waarde zijn (bijvoorbeeld, 0666 betekent lezen en schrijven voor iedereen).<br>Deze parameter wordt NIET op een windows-server gebruikt -SeeWikiForAllTeam=Kijk op de Wiki-pagina voor een lijst met bijdragers en hun organisatie -UseACacheDelay= Ingestelde vertraging voor de cacheexport in secondes (0 of leeg voor geen cache) -DisableLinkToHelpCenter=Verberg de link "<b>ondersteuning of hulp nodig</b>" op de inlogpagina +UMask=Umask parameter voor nieuwe bestanden op een Unix- / Linux- / BSD bestandssysteem. +UMaskExplanation=Deze parameter laat u de rechten bepalen welke standaard zijn ingesteld voor de bestanden aangemaakt door Dolibarr op de server (tijdens het uploaden, bijvoorbeeld).<br>Het moet de octale waarde zijn (bijvoorbeeld, 0666 betekent lezen en schrijven voor iedereen).<br>Deze parameter wordt NIET op een Windows server gebruikt +SeeWikiForAllTeam=Kijk op de Wiki pagina voor een lijst met bijdragers en hun organisatie +UseACacheDelay= Ingestelde vertraging voor de cache export in secondes (0 of leeg voor geen cache) +DisableLinkToHelpCenter=Verberg de link "<b>Ondersteuning of hulp nodig</b>" op de inlogpagina DisableLinkToHelp=Verberg de link naar online hulp "<b>%s</b>" -AddCRIfTooLong=Er is geen automatische tekstterugloop, tekst die te lang is, wordt niet weergegeven in documenten. Voeg zo nodig carriage returns toe in het tekstgebied. -ConfirmPurge=Weet u zeker dat u deze zuivering wilt uitvoeren? <br> Hiermee worden al uw gegevensbestanden permanent verwijderd zonder dat ze worden teruggezet (ECM-bestanden, bijgevoegde bestanden ...). +AddCRIfTooLong=Er is geen automatische tekst terugloop, tekst die te lang is, wordt niet weergegeven in documenten. Voeg zo nodig carriage returns toe in het tekstgebied. +ConfirmPurge=Weet u zeker dat u deze opschoning wilt uitvoeren? <br> Hiermee worden al uw gegevensbestanden permanent verwijderd zonder dat ze worden teruggezet (ECM-bestanden, bijgevoegde bestanden ...). MinLength=Minimale lengte LanguageFilesCachedIntoShmopSharedMemory=Bestanden .lang in het gedeelde geheugen LanguageFile=Taalbestand ExamplesWithCurrentSetup=Voorbeelden met huidige configuratie -ListOfDirectories=Lijst van OpenDocument sjablonenmappen -ListOfDirectoriesForModelGenODT=Lijst van de directorie's die de templates bevatten in OpenDocument formaat.<br><br>Plaats hier het volledige pad van de directorie.<br>Voeg een nieuwe lijn tussen elke directorie.<br>Om een directorie van de GED module bij te voegen, voeg hier <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b> toe.<br><br>Bestanden in deze directorie's moeten eindigen op <b>.odt</b> of <b>.ods</b>. -NumberOfModelFilesFound=Aantal gevonden ODT/ODS-sjabloonbestanden -ExampleOfDirectoriesForModelGen=Voorbeelden van de syntaxis: <br>c:\\mijndir<br>/home/mijndir<br>DOL_DATA_ROOT/ECM/ecmdir -FollowingSubstitutionKeysCanBeUsed=Door het plaatsen van de volgende velden in het sjabloon krijgt u een vervanging met de aangepaste waarde bij het genereren van het document: +ListOfDirectories=Lijst van OpenDocument sjabloonmappen +ListOfDirectoriesForModelGenODT=Lijst van de directory's die de templates bevatten in OpenDocument formaat.<br><br>Plaats hier het volledige pad van de directory.<br>Voeg een nieuwe lijn tussen elke directory.<br>Om een directory van de GED module bij te voegen, voeg hier <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b> toe.<br><br>Bestanden in deze directory's moeten eindigen op <b>.odt</b> of <b>.ods</b>. +NumberOfModelFilesFound=Aantal gevonden ODT/ODS sjabloonbestanden +ExampleOfDirectoriesForModelGen=Syntax-voorbeeld: <br> c: \\ myapp \\ mydocumentdir \\ mysubdir <br> / home / myapp / mydocumentdir / mysubdir <br> DOL_DATA_ROOT / ecm / ecmdir +FollowingSubstitutionKeysCanBeUsed=Lees de Wiki documentatie om te weten hoe u uw odt documentsjablonen moet maken voordat u ze in die mappen opslaat FullListOnOnlineDocumentation=De complete lijst met beschikbare velden is te vinden in de gebruikersdocumentatie op de Wiki van Dolibar: http://wiki.dolibarr.org. FirstnameNamePosition=Positie van voornaam / achternaam DescWeather=De volgende afbeeldingen worden op het dashboard weergegeven wanneer het aantal late acties de volgende waarden bereiken: @@ -389,28 +391,28 @@ ResponseTimeout=Time-out antwoord SmsTestMessage=Testbericht van __PHONEFROM__ naar __PHONETO__ ModuleMustBeEnabledFirst=Module <b>%s</b> moet eerst worden ingeschakeld als je deze functie wilt gebruiken. SecurityToken=Sleutel tot URL beveiligen -NoSmsEngine=Geen SMS-afzende-rbeheerder beschikbaar. Een SMS-afzenderbeheer is niet geïnstalleerd met de standaarddistributie omdat deze afhankelijk zijn van een externe leverancier, maar u kunt er enkele vinden op %s +NoSmsEngine=Geen SMS afzender beheerder beschikbaar. Een SMS afzender beheerder is niet geïnstalleerd met de standaarddistributie omdat deze afhankelijk zijn van een externe leverancier, maar u kunt er enkele vinden op %s PDF=PDF PDFDesc=Algemene opties voor het genereren van PDF's PDFAddressForging=Regels voor adres sectie -HideAnyVATInformationOnPDF=Verberg alle informatie met betrekking tot omzetbelasting / BTW -PDFRulesForSalesTax=Regels voor omzet-belasting/btw +HideAnyVATInformationOnPDF=Verberg alle informatie met betrekking tot omzetbelasting / Btw +PDFRulesForSalesTax=Regels voor omzet-belasting/Btw PDFLocaltax=Regels voor %s -HideLocalTaxOnPDF=Verberg het %s-tarief in de kolom Verkoopbelasting / btw +HideLocalTaxOnPDF=Verberg het %s-tarief in de kolom Verkoopbelasting / Btw HideDescOnPDF=Verberg productomschrijving HideRefOnPDF=Verberg productreferentie HideDetailsOnPDF=Verberg productdetails PlaceCustomerAddressToIsoLocation=Gebruik de Franse standaardpositie (La Poste) als positie van het klant-adres Library=Bibliotheek -UrlGenerationParameters=Parameters om URL beveiligen -SecurityTokenIsUnique=Gebruik een unieke securekey parameter voor elke URL +UrlGenerationParameters=Parameters om URL's te beveiligen +SecurityTokenIsUnique=Gebruik een unieke secure key parameter voor elke URL EnterRefToBuildUrl=Geef referentie voor object %s -GetSecuredUrl=Get berekende URL -ButtonHideUnauthorized=Verberg de knoppen voor niet-beheerders bij ongeoorloofde acties in plaats van grijs gekleurde, uitgeschakelde knoppen -OldVATRates=Oud BTW tarief -NewVATRates=Nieuw BTW tarief -PriceBaseTypeToChange=Wijzig op prijzen waarop een base reference waarde gedefiniëerd is -MassConvert=Start conversie +GetSecuredUrl=Verkrijg berekende URL +ButtonHideUnauthorized=Verberg ongeautoriseerde actieknoppen ook voor interne gebruikers (anders alleen grijs) +OldVATRates=Oud Btw tarief +NewVATRates=Nieuw Btw tarief +PriceBaseTypeToChange=Wijzig op prijzen waarop een basis referentie waarde gedefinieerd is +MassConvert=Start bulk conversie PriceFormatInCurrentLanguage=Prijsindeling in huidige taal String=String String1Line=String (1 regel) @@ -420,7 +422,7 @@ HtmlText=HTML-tekst Int=Integer Float=Float DateAndTime=Datum en uur -Unique=Unique +Unique=Uniek Boolean=Boolean (één checkbox) ExtrafieldPhone = Telefoon ExtrafieldPrice = Prijs @@ -435,16 +437,16 @@ ExtrafieldCheckBox=Checkboxen ExtrafieldCheckBoxFromList=Checkboxen uit tabel ExtrafieldLink=Link naar een object ComputedFormula=Berekend veld -ComputedFormulaDesc=U kunt hier een formule invoeren met andere eigenschappen van het object of een PHP-codering om een dynamisch berekende waarde te krijgen. U kunt alle PHP-compatibele formules gebruiken, inclusief de "?" condition operator en volgend globaal object: <strong> $ db, $ conf, $ langs, $ mysoc, $ user, $ object </strong>. <br> <strong> WAARSCHUWING </strong>: Mogelijk zijn slechts enkele eigenschappen van $ object beschikbaar. Als je eigenschappen nodig hebt die niet zijn geladen, haal dan gewoon het object in je formule zoals in het tweede voorbeeld. <br> Als u een berekend veld gebruikt, betekent dit dat u geen enkele waarde uit de interface kunt invoeren. Als er een syntaxisfout is, retourneert de formule mogelijk ook niets. <br> <br> Voorbeeld van formule: <br> $ object-> id < 10 ? round($object-> id / 2, 2): ($ object-> id + 2 * $ user-> id) * (int) substr ($ mysoc-> zip, 1, 2 ) <br> <br> Voorbeeld om object <br> (($ $ reloadedobj = new Societe ($ db)) && ($ reloadedobj-> fetchNoCompute ($ obj-> id? $ obj-> id> ($ obj-> id: ($ obj-)) te herladen > rowid: $ object-> id))> 0))? $ reloadedobj-> array_options ['options_extrafieldkey'] * $ reloadedobj-> capital / 5: '-1' <br> <br> Ander voorbeeld van formule om het laden van een object en het bovenliggende object te forceren: <br> (($ reloadedbj0) )) && ($ reloadedobj-> fetchNoCompute ($ object-> id)> 0) && ($ secondloadedobj = nieuw project ($ db)) && ($ secondloadedobj-> fetchNoCompute ($ reloadedobj-> fk_project)> 0))? $ secondloadedobj-> ref: 'Parent project not found' +ComputedFormulaDesc=U kunt hier een formule invoeren met andere eigenschappen van het object of een PHP-codering om een dynamisch berekende waarde te krijgen. U kunt alle PHP compatibele formules gebruiken, inclusief de "?" condition operator en volgend globaal object: <strong> $ db, $ conf, $ langs, $ mysoc, $ user, $ object </strong>. <br> <strong> WAARSCHUWING </strong>: Mogelijk zijn slechts enkele eigenschappen van $ object beschikbaar. Als je eigenschappen nodig hebt die niet zijn geladen, haal dan gewoon het object in je formule zoals in het tweede voorbeeld. <br> Als u een berekend veld gebruikt, betekent dit dat u geen enkele waarde uit de interface kunt invoeren. Als er een syntaxisfout is, retourneert de formule mogelijk ook niets. <br> <br> Voorbeeld van formule: <br> $ object-> id < 10 ? round($object-> id / 2, 2): ($ object-> id + 2 * $ user-> id) * (int) substr ($ mysoc-> zip, 1, 2 ) <br> <br> Voorbeeld om object <br> (($ $ reloadedobj = new Societe ($ db)) && ($ reloadedobj-> fetchNoCompute ($ obj-> id? $ obj-> id> ($ obj-> id: ($ obj-)) te herladen > rowid: $ object-> id))> 0))? $ reloadedobj-> array_options ['options_extrafieldkey'] * $ reloadedobj-> capital / 5: '-1' <br> <br> Ander voorbeeld van formule om het laden van een object en het bovenliggende object te forceren: <br> (($ reloadedbj0) )) && ($ reloadedobj-> fetchNoCompute ($ object-> id)> 0) && ($ secondloadedobj = nieuw project ($ db)) && ($ secondloadedobj-> fetchNoCompute ($ reloadedobj-> fk_project)> 0))? $ secondloadedobj-> ref: 'Parent project not found' Computedpersistent=Berekend veld opslaan ComputedpersistentDesc=Berekende extra velden worden opgeslagen in de database, maar de waarde wordt alleen opnieuw berekend als het object van dit veld wordt gewijzigd. Als het berekende veld afhankelijk is van andere objecten of algemene gegevens, kan deze waarde onjuist zijn !! ExtrafieldParamHelpPassword=Dit veld leeg laten betekent dat deze waarde zonder codering wordt opgeslagen (veld mag alleen worden verborgen met een ster op het scherm). <br> Stel 'auto' in om de standaard coderingsregel te gebruiken om het wachtwoord in de database op te slaan (waarde lezen is dan alleen de hash, geen manier om de oorspronkelijke waarde op te halen) -ExtrafieldParamHelpselect=Waardenlijst moet 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=Waardenlijst moet 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=Waardenlijst moet 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=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 +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 -ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath +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 LocalTaxDesc=Sommige landen kunnen twee of drie belastingen toepassen op elke factuurregel. Als dit het geval is, kiest u het type voor de tweede en derde belasting en het tarief. Mogelijk type zijn: <br> 1: lokale belasting van toepassing op producten en diensten zonder btw (lokale belasting wordt berekend op bedrag zonder btw) <br> 2: lokale belasting van toepassing op producten en diensten inclusief btw (lokale belasting wordt berekend op bedrag + hoofdbelasting) <br> 3: lokale belasting van toepassing op producten zonder btw (lokale belasting wordt berekend op bedrag zonder btw) <br> 4: lokale belasting van toepassing op producten inclusief btw (lokale belasting wordt berekend op bedrag + hoofd btw) <br> 5: lokale belasting van toepassing op diensten zonder btw (lokale belasting wordt berekend op bedrag zonder btw) <br> 6: lokale belasting van toepassing op diensten inclusief btw (lokale belasting wordt berekend op bedrag + belasting) @@ -554,9 +556,9 @@ Module54Desc=Beheer van contracten (diensten of terugkerende abonnementen) Module55Name=Streepjescodes Module55Desc=Streepjescodesbeheer Module56Name=Betaling via overschrijving -Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module56Desc=Beheer van de betaling van leveranciers door middel van overboekingsopdrachten. Het omvat het genereren van SEPA-bestanden voor Europese landen. Module57Name=Betalingen via automatische incasso -Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. +Module57Desc=Beheer van incasso-opdrachten. Het omvat het genereren van SEPA-bestanden voor Europese landen. Module58Name=ClickToDial Module58Desc=Integratie van een 'ClickToDial' systeem (Asterisk, etc) Module60Name=stickers @@ -662,13 +664,13 @@ Module50200Desc=Bied klanten een PayPal-online betaalpagina (PayPal-account of c Module50300Name=Stripe Module50300Desc=Bied klanten een Stripe online betaalpagina (credit / debit cards). Dit kan worden gebruikt om uw klanten toe te staan ad-hocbetalingen te doen of betalingen gerelateerd aan een specifiek Dolibarr-object (factuur, bestelling, enz ...) Module50400Name=Boekhouding (dubbele invoer) -Module50400Desc=Accounting management (double entries, support General and Subsidiary Ledgers). Export the ledger in several other accounting software formats. +Module50400Desc=Boekhoudkundig beheer (dubbele boekingen, ondersteuning van algemene en dochterondernemingen). Exporteer het grootboek in verschillende andere boekhoudsoftware-indelingen. Module54000Name=PrintIPP Module54000Desc=Direct afdrukken (zonder de documenten te openen) met behulp van Cups IPP-interface (printer moet zichtbaar zijn vanaf de server en CUPS moet op de server zijn geïnstalleerd). Module55000Name=Poll, Onderzoek of Stemmen Module55000Desc=Maak online polls, enquêtes of stemmen (zoals Doodle, Studs, RDVz enz ...) Module59000Name=Marges -Module59000Desc=Module om de marges te beheren +Module59000Desc=Module to follow margins Module60000Name=Commissies Module60000Desc=Module om commissies te beheren Module62000Name=Incoterms @@ -854,16 +856,16 @@ Permission538=Diensten exporteren Permission561=Inlezen betalingsopdrachten via overschrijving Permission562=Betaalopdracht aanmaken/wijzigen via overschrijving Permission563=Betaalopdracht verzenden -Permission564=Record Debits/Rejections of credit transfer +Permission564=Vastleggen verwerkingen/weigeringen van overboekingen Permission601=Lees stickers Permission602=Stickers maken/wijzigen Permission609=Verwijder etiketten Permission650=Lees stuklijsten Permission651=Materiaalrekeningen maken / bijwerken Permission652=Materiaalrekeningen verwijderen -Permission660=Read Manufacturing Order (MO) -Permission661=Create/Update Manufacturing Order (MO) -Permission662=Delete Manufacturing Order (MO) +Permission660=Lees productieorder (MO) +Permission661=Aanmaken/bijwerken productieorder (MO) +Permission662=Verwijder productieorder (MO) Permission701=Bekijk donaties Permission702=Creëren / wijzigen donaties Permission703=Verwijderen donaties @@ -873,8 +875,8 @@ Permission773=Verwijderen onkostennota's Permission774=Lees alle onkostennota's (ook voor de gebruiker niet ondergeschikten) Permission775=Goedkeuren onkostennota's Permission776=Betalen onkostennota's -Permission777=Read expense reports of everybody -Permission778=Create/modify expense reports of everybody +Permission777=Lees onkostendeclaraties van iedereen +Permission778=Aanmaken/wijzigen onkostendeclaraties van iedereen Permission779=Export onkostennota's Permission1001=Bekijk voorraden Permission1002=Toevoegen/wijzigen van een magazijn @@ -899,9 +901,9 @@ Permission1185=Aankooporders goedkeuren Permission1186=Verwerk inkooporders Permission1187=Bevestig de ontvangst van inkooporders Permission1188=Bestellingen verwijderen -Permission1189=Check/Uncheck a purchase order reception +Permission1189=Vink de ontvangst van een inkooporder aan / uit Permission1190=Goedkeuren (tweede goedkeuring) inkooporders -Permission1191=Export supplier orders and their attributes +Permission1191=Exporteer bestellingen van leveranciers en hun attributen Permission1201=Geef het resultaat van een uitvoervergunning Permission1202=Creëren/wijzigen een uitvoervergunning Permission1231=Lees leveranciersfacturen @@ -955,8 +957,8 @@ Permission50101=Gebruik kassaonderdeel (SimplePOS) Permission50151=Gebruik verkooppunt (TakePOS) Permission50201=Lees transacties Permission50202=Importeer transacties -Permission50330=Read objects of Zapier -Permission50331=Create/Update objects of Zapier +Permission50330=Lees objecten van Zapier +Permission50331=Maak/update objecten van Zapier Permission50332=Verwijder objecten van Zapier Permission50401=Bind producten en facturen met boekhoudrekeningen Permission50411=Bewerkingen lezen in grootboek @@ -986,15 +988,15 @@ Permission67000=Printen kassabon toestaan Permission68001=Lees intracomm rapport Permission68002=Intracomm-rapport maken/wijzigen Permission68004=Intracomm-rapport verwijderen -Permission941601=Read receipts +Permission941601=Bonnen inlezen Permission941602=Bonnen aanmaken en wijzigen -Permission941603=Validate receipts -Permission941604=Send receipts by email -Permission941605=Export receipts -Permission941606=Delete receipts +Permission941603=Bonnen valideren +Permission941604=Verzend bonnen per e-mail +Permission941605=Bonnen exporteren +Permission941606=Verwijder bonnen DictionaryCompanyType=Relatietype DictionaryCompanyJuridicalType=Externe rechtspersonen -DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectLevel=Potentieel niveau voor bedrijven DictionaryProspectContactLevel=Prospect potentieel niveau voor contacten DictionaryCanton=Staten / Provincies DictionaryRegion=Regio @@ -1025,14 +1027,14 @@ DictionaryEMailTemplates=E-mailsjablonen DictionaryUnits=Eenheden DictionaryMeasuringUnits=Meeteenheden DictionarySocialNetworks=Sociale netwerken -DictionaryProspectStatus=Prospect status for companies +DictionaryProspectStatus=Prospectstatus van bedrijven DictionaryProspectContactStatus=Prospect-status voor contacten DictionaryHolidayTypes=Soorten verlof DictionaryOpportunityStatus=Leadstatus voor project / lead DictionaryExpenseTaxCat=Onkostenoverzicht - Vervoerscategorieën DictionaryExpenseTaxRange=Onkostenoverzicht - bereik per transportcategorie -DictionaryTransportMode=Intracomm report - Transport mode -TypeOfUnit=Type of unit +DictionaryTransportMode=Intracomm rapport - Transportmodus +TypeOfUnit=Type eenheid SetupSaved=Instellingen opgeslagen SetupNotSaved=Installatie niet opgeslagen BackToModuleList=Terug naar modulelijst @@ -1083,7 +1085,7 @@ LabelUsedByDefault=Standaard te gebruiken label indien er geen vertaling kan wor LabelOnDocuments=Etiket op documenten LabelOrTranslationKey=Label- of vertaalsleutel ValueOfConstantKey=Waarde van een configuratieconstante -ConstantIsOn=Option %s is on +ConstantIsOn=Optie %s is ingeschakeld NbOfDays=Aantal dagen AtEndOfMonth=Aan het einde van de maand CurrentNext=Huidige/volgende @@ -1128,7 +1130,7 @@ LoginPage=Inlogpagina BackgroundImageLogin=Achtergrond afbeelding PermanentLeftSearchForm=Permanent zoekformulier in linker menu DefaultLanguage=Standaard taal -EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships +EnableMultilangInterface=Schakel meertalige ondersteuning in voor klant- of leveranciersrelaties EnableShowLogo=Toon het bedrijfslogo in het menu CompanyInfo=Bedrijf/Organisatie CompanyIds=Bedrijfs-/organisatie-identiteiten @@ -1182,7 +1184,7 @@ InfoWebServer=Over Web Server InfoDatabase=Over Database InfoPHP=Over PHP InfoPerf=Over Prestaties -InfoSecurity=About Security +InfoSecurity=Over beveiliging BrowserName=Browser naam BrowserOS=Browser OS ListOfSecurityEvents=Lijst van Dolibarr veiligheidgebeurtenisen @@ -1233,7 +1235,7 @@ RestoreDesc2=Herstel het back-upbestand (zip-bestand bijvoorbeeld) van de map &q RestoreDesc3=Herstel de databasestructuur en gegevens van een back-up dumpbestand in de database van de nieuwe Dolibarr-installatie of in de database van deze huidige installatie ( <b>%s</b> ). Waarschuwing, zodra het herstel is voltooid, moet u een login / wachtwoord gebruiken dat bestond uit de back-uptijd / installatie om opnieuw verbinding te maken. <br> Om een back-updatabase te herstellen in deze huidige installatie, kunt u deze assistent volgen. RestoreMySQL=MySQL import ForcedToByAModule=Geforceerd tot <b>%s</b> door een geactiveerde module -ValueIsForcedBySystem=This value is forced by the system. You can't change it. +ValueIsForcedBySystem=Vaste waarde door het systeem. U kunt deze niet aanpassen. PreviousDumpFiles=Bestaande back-upbestanden PreviousArchiveFiles=Bestaande archiefbestanden WeekStartOnDay=Eerste dag van de week @@ -1306,7 +1308,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=U hebt %s %s in de database. U moet de constante %s toevoegen aan 1 in Home-Setup-Other. Beperk de zoekopdracht tot het begin van tekenreeksen, waardoor de database indexen kan gebruiken en u onmiddellijk antwoord moet krijgen. +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=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. @@ -1314,7 +1316,7 @@ PHPModuleLoaded=PHP component %s is geladen PreloadOPCode=Voorgeladen OPCode wordt gebruikt AddRefInList=Weergave klant/leverancier ref. infolijst (selecteer lijst of combobox) en de meeste hyperlinks. <br> Derden zullen verschijnen met een naamnotatie van "CC12345 - SC45678 - The Big Company corp." in plaats van "The Big Company corp". AddAdressInList=Toon klant / leverancier adres infolijst (selecteer lijst of combobox) <br> Derden zullen verschijnen met een naamnotatie van &quot;The Big Company corp. - 21 jump street 123456 Big town - USA&quot; in plaats van &quot;The Big Company corp&quot;. -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=E-mailadres van contactpersoon (of telefoons indien niet gedefinieerd) en stadsinfo-lijst (selecteer lijst of combobox) weergeven <br> Contacten worden weergegeven met de naamindeling "Dupond Durand - dupond.durand@email.com - Parijs" of "Dupond Durand - 06 07 59 65 66 - Paris "in plaats van" Dupond Durand ". AskForPreferredShippingMethod=Vraag de gewenste verzendmethode voor derden. FieldEdition=Wijziging van het veld %s FillThisOnlyIfRequired=Voorbeeld: +2 (alleen invullen als tijdzone offset problemen worden ervaren) @@ -1322,7 +1324,7 @@ GetBarCode=Haal barcode NumberingModules=Nummeringsmodellen DocumentModules=Documentmodellen ##### Module password generation -PasswordGenerationStandard=Return a password generated according to internal Dolibarr algorithm: %s characters containing shared numbers and characters in lowercase. +PasswordGenerationStandard=Retourneer een wachtwoord dat is gegenereerd volgens het interne Dolibarr-algoritme: %s-tekens met gedeelde cijfers en tekens in kleine letters. PasswordGenerationNone=Stel geen gegenereerd wachtwoord voor. Wachtwoord moet handmatig worden ingevoerd. PasswordGenerationPerso=Retourneer een wachtwoord volgens uw persoonlijk gedefinieerde configuratie. SetupPerso=Volgens uw configuratie @@ -1421,7 +1423,7 @@ AdherentMailRequired=E-mail vereist om een nieuw lid te maken MemberSendInformationByMailByDefault=Vinkvakje om een bevestigingse-mail te sturen naar leden (validatie van nieuwe abonnementen). Staat standaard aan. VisitorCanChooseItsPaymentMode=Bezoeker kan kiezen uit beschikbare betalingsmodi MEMBER_REMINDER_EMAIL=Automatische herinnering <b>per e-mail</b> inschakelen voor verlopen abonnementen. Opmerking: Module <strong>%s</strong> moet zijn ingeschakeld en correct zijn ingesteld om herinneringen te verzenden. -MembersDocModules=Document templates for documents generated from member record +MembersDocModules=Documentsjablonen voor documenten die zijn gegenereerd op basis van een ledenrecord ##### LDAP setup ##### LDAPSetup=LDAP-instellingen LDAPGlobalParameters=Algemene instellingen @@ -1565,8 +1567,8 @@ ForANonAnonymousAccess=Voor een geautoriseerde verbinding (bijvoorbeeld om over PerfDolibarr=Prestaties setup / optimaliseren rapport YouMayFindPerfAdviceHere=Deze pagina biedt enkele controles of advies met betrekking tot prestaties. NotInstalled=Niet geïnstalleerd. -NotSlowedDownByThis=Not slowed down by this. -NotRiskOfLeakWithThis=Not risk of leak with this. +NotSlowedDownByThis=Hierdoor niet vertraagd. +NotRiskOfLeakWithThis=Hiermee geen risico op lekken. ApplicativeCache=Applicatieve cache MemcachedNotAvailable=Geen applicatieve cache gevonden. U kunt de prestaties verbeteren door een cacheserver Memcached te installeren en een module die deze cacheserver kan gebruiken. <br> Meer informatie hier <a href="http://wiki.dolibarr.org/index.php/Module_MemCached_EN">http://wiki.dolibarr.org/index.php/Module_MemCached_EN</a> . <br> Merk op dat veel webhostingproviders dergelijke cacheserver niet bieden. MemcachedModuleAvailableButNotSetup=Module in memcache voor applicatieve cache gevonden, maar installatie van module is niet voltooid. @@ -1596,8 +1598,13 @@ ServiceSetup=Services module setup ProductServiceSetup=Producten en Diensten modules setup NumberOfProductShowInSelect=Maximaal aantal producten om weer te geven in keuzelijsten met combo's (0 = geen limiet) ViewProductDescInFormAbility=Productbeschrijvingen weergeven in formulieren (anders weergegeven in een pop-up met knopinfo) +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=Activeer op het tabblad Bijgevoegde bestanden product / dienst een optie om product PDF-document samen te voegen met voorstel PDF azur als product / dienst in het voorstel staat -ViewProductDescInThirdpartyLanguageAbility=Geef productbeschrijvingen weer in de taal van de derde partij +ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) UseSearchToSelectProductTooltip=Als u een groot aantal producten (>100.000) hebt, kunt u de snelheid verhogen door constant PRODUCT_DONOTSEARCH_ANYWHERE in te stellen op 1 in Setup-> Other. Het zoeken is dan beperkt tot het begin van de reeks. UseSearchToSelectProduct=Wacht tot je op een toets drukt voordat je de inhoud van de productcombo-lijst laadt (dit kan de prestaties verbeteren als je een groot aantal producten hebt, maar het is minder handig) SetDefaultBarcodeTypeProducts=Standaard streepjescodetype voor produkten @@ -1614,9 +1621,9 @@ SyslogLevel=Level SyslogFilename=Bestandsnaam en -pad YouCanUseDOL_DATA_ROOT=U kunt DOL_DATA_ROOT/dolibarr.log gebruiken voor een logbestand in de Dolibarr "documenten"-map. U kunt ook een ander pad gebruiken om dit bestand op te slaan. ErrorUnknownSyslogConstant=Constante %s is geen bekende 'syslog' constante -OnlyWindowsLOG_USER=On Windows, only the LOG_USER facility will be supported +OnlyWindowsLOG_USER=Op Windows wordt alleen de LOG_USER-faciliteit ondersteund CompressSyslogs=Compressie en back-up van foutopsporingslogbestanden (gegenereerd door module Log voor foutopsporing) -SyslogFileNumberOfSaves=Number of backup logs to keep +SyslogFileNumberOfSaves=Aantal back-uplogboeken dat moet worden bewaard ConfigureCleaningCronjobToSetFrequencyOfSaves=Configureer de geplande taak opschonen om de frequentie van de logboekback-up in te stellen ##### Donations ##### DonationsSetup=Donatiemoduleinstellingen @@ -1672,7 +1679,7 @@ AdvancedEditor=Geavanceerde editor ActivateFCKeditor=Activeer FCKeditor voor: FCKeditorForCompany=WYSIWIG creatie / bewerking van bedrijfsomschrijving en notities FCKeditorForProduct=WYSIWIG creatie / bewerking van product- / dienstomschrijving en notities -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 creatie / editie van productdetails regels voor alle entiteiten (voorstellen, bestellingen, facturen, enz ...). <span class="warning"> Waarschuwing: het gebruik van deze optie in dit geval wordt serieus niet aanbevolen, aangezien het problemen kan veroorzaken met speciale tekens en paginaopmaak bij het samenstellen van PDF-bestanden. </span> FCKeditorForMailing= WYSIWIG creatie / bewerking van mailings FCKeditorForUserSignature=WYSIWIG creatie /aanpassing van ondertekening FCKeditorForMail=WYSIWIG creatie / bewerking voor alle e-mail (behalve Gereedschap-> E-mailing) @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Gepersonaliseerde menu&#39;s niet gekoppeld aan een h NewMenu=Nieuw menu MenuHandler=Menuverwerker MenuModule=Bronmodule -HideUnauthorizedMenu= Verberg ongeautoriseerde menu's (grijs) +HideUnauthorizedMenu=Verberg ongeautoriseerde menu's ook voor interne gebruikers (anders alleen grijs) DetailId=Menu ID DetailMenuHandler=Menuverwerker waar het nieuwe menu getoond moet worden DetailMenuModule=Modulenaam als menu-item van een module afkomstig is @@ -1737,11 +1744,11 @@ AGENDA_USE_EVENT_TYPE=Gebruik gebeurtenistypen (beheerd in menu Setup -&gt; Woor AGENDA_USE_EVENT_TYPE_DEFAULT=Stel deze standaardwaarde automatisch in voor het type evenement in het formulier voor het maken van een evenement AGENDA_DEFAULT_FILTER_TYPE=Stel dit type evenement automatisch in het zoekfilter van de agendaweergave in AGENDA_DEFAULT_FILTER_STATUS=Stel deze status automatisch in voor evenementen in het zoekfilter van de agendaweergave -AGENDA_DEFAULT_VIEW=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_DEFAULT_VIEW=Welke weergave wil je standaard openen als je menu Agenda selecteert +AGENDA_REMINDER_BROWSER=Schakel gebeurtenisherinnering <b> in de browser van de gebruiker </b> in (wanneer de herinneringsdatum wordt bereikt, wordt een pop-up weergegeven door de browser. Elke gebruiker kan dergelijke meldingen uitschakelen via de instellingen van de browser). AGENDA_REMINDER_BROWSER_SOUND=Schakel geluidsmelding in -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=Schakel gebeurtenisherinnering <b> per e-mail in </b> (herinneringsoptie / vertraging kan voor elke gebeurtenis worden gedefinieerd). +AGENDA_REMINDER_EMAIL_NOTE=Opmerking: De frequentie van de taak %s moet voldoende zijn om er zeker van te zijn dat de herinnering op het juiste moment wordt verzonden. AGENDA_SHOW_LINKED_OBJECT=Gekoppeld object weergeven in agendaweergave ##### Clicktodial ##### ClickToDialSetup='Click-To-Dial' moduleinstellingen @@ -1876,7 +1883,7 @@ EnterAnyCode=Dit veld bevat een referentie om de lijn te identificeren. Voer een Enter0or1=Voer 0 of 1 in UnicodeCurrency=Voer hier tussen accolades in, lijst met byte-nummers die het valutasymbool vertegenwoordigen. Bijvoorbeeld: voer voor $ [36] in - voor Brazilië real R $ [82,36] - voer voor € [8364] in ColorFormat=De RGB-kleur heeft het HEX-formaat, bijvoorbeeld: FF0000 -PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) +PictoHelp=Pictogramnaam in dolibarr-formaat ('image.png' indien in de huidige themamap, 'image.png@nom_du_module' indien in de directory / img / van een module) PositionIntoComboList=Positie van regel in combolijst SellTaxRate=BTW tarief RecuperableOnly=Ja voor BTW "Niet waargemaakt maar herstelbaar", bestemd voor een deelstaat in Frankrijk. Houd in alle andere gevallen de waarde "Nee" aan. @@ -1917,7 +1924,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP &amp; CRM %s is beschikbaar. Ve ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP &amp; CRM %s is beschikbaar. Versie %s is een onderhoudsversie, dus bevat alleen bugfixes. We raden alle gebruikers aan om naar deze versie te upgraden. Een onderhoudsrelease introduceert geen nieuwe functies of wijzigingen in de database. U kunt het downloaden van het downloadgedeelte van de https://www.dolibarr.org portal (submap Stabiele versies). U kunt de <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog">ChangeLog</a> lezen voor een volledige lijst met wijzigingen. MultiPriceRuleDesc=Wanneer de optie &quot;Meerdere prijsniveaus per product / service&quot; is ingeschakeld, kunt u verschillende prijzen (één per prijsniveau) voor elk product definiëren. Om u tijd te besparen, kunt u hier een regel invoeren om een prijs voor elk niveau automatisch te berekenen op basis van de prijs van het eerste niveau, dus u hoeft alleen een prijs voor het eerste niveau voor elk product in te voeren. Deze pagina is ontworpen om u tijd te besparen, maar is alleen nuttig als uw prijzen voor elk niveau relatief zijn aan het eerste niveau. U kunt deze pagina in de meeste gevallen negeren. ModelModulesProduct=Sjablonen voor productdocumenten -WarehouseModelModules=Templates for documents of warehouses +WarehouseModelModules=Sjablonen voor magazijndocumenten ToGenerateCodeDefineAutomaticRuleFirst=Om codes automatisch te kunnen genereren, moet u eerst een manager definiëren om het barcodenummer automatisch te definiëren. SeeSubstitutionVars=Zie * opmerking voor een lijst met mogelijke substitutievariabelen SeeChangeLog=Zie ChangeLog bestand (alleen in het Engels) @@ -1983,11 +1990,12 @@ EMailHost=Host van e-mail IMAP-server MailboxSourceDirectory=Brondirectory van mailbox MailboxTargetDirectory=Doeldirectory voor mailbox EmailcollectorOperations=Operaties te doen door verzamelaar +EmailcollectorOperationsDesc=Bewerkingen worden op volgorde begin tot eind uitgevoerd MaxEmailCollectPerCollect=Max aantal verzamelde e-mails per verzameling CollectNow=Verzamel nu ConfirmCloneEmailCollector=Weet je zeker dat je de e-mailverzamelaar %s wilt klonen? -DateLastCollectResult=Laatste datum geprobeerd te verzamelen -DateLastcollectResultOk=Datum laatste verzamelen succesvol +DateLastCollectResult=Datum laatste poging van verzamelen +DateLastcollectResultOk=Datum van laatste succesvolle verzamelen LastResult=Laatste resultaat EmailCollectorConfirmCollectTitle=E-mail verzamelbevestiging EmailCollectorConfirmCollect=Wil je de collectie voor deze verzamelaar nu runnen? @@ -1996,16 +2004,16 @@ NothingProcessed=Niets gedaan XEmailsDoneYActionsDone=%s e-mails gekwalificeerd, %s e-mails succesvol verwerkt (voor %s record / acties gedaan) RecordEvent=E-mail gebeurtenis opnemen CreateLeadAndThirdParty=Creëer lead (en relatie indien nodig) -CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) +CreateTicketAndThirdParty=Maak een ticket aan (en link naar een relatie als het door een eerdere bewerking is geladen) CodeLastResult=Laatste resultaatcode NbOfEmailsInInbox=Aantal e-mails in bronmap LoadThirdPartyFromName=Zoeken van derden laden op %s (alleen laden) LoadThirdPartyFromNameOrCreate=Zoeken van derden laden op %s (maken indien niet gevonden) -WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr -WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr -WithDolTrackingIDInMsgId=Message sent from Dolibarr -WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +WithDolTrackingID=Bericht inzake een gesprek geïnitieerd door een eerste e-mail verzonden vanuit Dolibarr +WithoutDolTrackingID=Bericht van een gesprek geïnitieerd door een eerste e-mail die NIET is verzonden vanuit Dolibarr +WithDolTrackingIDInMsgId=Bericht verzonden vanuit Dolibarr +WithoutDolTrackingIDInMsgId=Bericht NIET verzonden vanuit Dolibarr +CreateCandidature=Maak een sollicitatie FormatZip=Zip MainMenuCode=Menu toegangscode (hoofdmenu) ECMAutoTree=Toon automatische ECM-structuur @@ -2019,7 +2027,7 @@ DisabledResourceLinkContact=Schakel functie uit om een ​​bron te koppelen aa EnableResourceUsedInEventCheck=Schakel de functie in om te controleren of een bron in een gebeurtenis wordt gebruikt ConfirmUnactivation=Bevestig de module-reset OnMobileOnly=Alleen op klein scherm (smartphone) -DisableProspectCustomerType=Disable the "Prospect + Customer" third party type (so third party must be "Prospect" or "Customer", but can't be both) +DisableProspectCustomerType=Schakel het derde type 'Prospect + klant' uit (de derde moet dus 'Prospect' of 'Klant' zijn, maar kan niet beide zijn) MAIN_OPTIMIZEFORTEXTBROWSER=Vereenvoudig de interface voor blinden MAIN_OPTIMIZEFORTEXTBROWSERDesc=Schakel deze optie in als u een blinde persoon bent of als u de toepassing gebruikt vanuit een tekstbrowser zoals Lynx of Links. MAIN_OPTIMIZEFORCOLORBLIND=Wijzig de kleur van de interface voor kleurenblinde persoon @@ -2041,15 +2049,15 @@ 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 -IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. -AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +IfYouAreOnAProductionSetThis=Als u zich in een productieomgeving bevindt, moet u deze eigenschap instellen op %s. +AntivirusEnabledOnUpload=Antivirus ingeschakeld op geüploade bestanden EXPORTS_SHARE_MODELS=Exportmodellen zijn met iedereen te delen ExportSetup=Installatie van exportmodule ImportSetup=Instellen van module Import InstanceUniqueID=Uniek ID van de instantie SmallerThan=Kleiner dan LargerThan=Groter dan -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. +IfTrackingIDFoundEventWillBeLinked=Houd er rekening mee dat als een tracking-ID van een object in e-mail wordt gevonden, of als de e-mail een antwoord is van een e-mail die al is verzameld en aan een object is gekoppeld, de gemaakte gebeurtenis automatisch wordt gekoppeld aan het bekende gerelateerde object. WithGMailYouCanCreateADedicatedPassword=Als u bij een GMail-account de validatie in 2 stappen hebt ingeschakeld, wordt aanbevolen om een speciaal tweede wachtwoord voor de toepassing te maken in plaats van uw eigen wachtwoord van https://myaccount.google.com/. EmailCollectorTargetDir=Het kan een gewenst gedrag zijn om de e-mail naar een andere tag / directory te verplaatsen wanneer deze met succes is verwerkt. Stel hier gewoon de naam van de map in om deze functie te gebruiken (gebruik GEEN speciale tekens in de naam). Houd er rekening mee dat u ook een inlogaccount voor lezen / schrijven moet gebruiken. EmailCollectorLoadThirdPartyHelp=U kunt deze actie gebruiken om de e-mailinhoud te gebruiken om een bestaande relatie in uw database te zoeken en te laden. De gevonden (of gecreëerde) relatie zal worden gebruikt voor het volgen van acties die het nodig hebben. In het parameterveld kunt u bijvoorbeeld 'EXTRACT: BODY: Name: \\ s ([^ \\ s] *)' gebruiken als u de naam van de relatie wilt extraheren uit een string 'Name: name to find' gevonden in de bron. @@ -2076,10 +2084,14 @@ MeasuringScaleDesc=De schaal is het aantal plaatsen dat u nodig heeft om het dec TemplateAdded=Sjabloon toegevoegd TemplateUpdated=Sjabloon bijgewerkt TemplateDeleted=Sjabloon verwijderd -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. +MailToSendEventPush=E-mail ter herinnering voor een evenement +SwitchThisForABetterSecurity=Het wijzigen van deze waarde naar %s wordt aanbevolen voor meer beveiliging +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. +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 diff --git a/htdocs/langs/nl_NL/agenda.lang b/htdocs/langs/nl_NL/agenda.lang index 83cf46b9711..4c6bbdab045 100644 --- a/htdocs/langs/nl_NL/agenda.lang +++ b/htdocs/langs/nl_NL/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Aantal gebeurtenissen ListOfActions=Gebeurtenissenlijst EventReports=Overzicht gebeurtenissen Location=Locatie -ToUserOfGroup=Event assigned to any user in group +ToUserOfGroup=Gebeurtenis toegewezen aan elke gebruiker in de groep EventOnFullDay=Gebeurtenis volledige dag MenuToDoActions=Alle openstaande acties MenuDoneActions=Alle beëindigde acties @@ -63,7 +63,7 @@ ShipmentClassifyClosedInDolibarr=Verzending %s geclassificeerd als gefactureerd ShipmentUnClassifyCloseddInDolibarr=Zending %s geclassificeerd, opnieuw openen ShipmentBackToDraftInDolibarr=Zending %s ga terug naar conceptstatus ShipmentDeletedInDolibarr=Verzending %s verwijderd -ReceptionValidatedInDolibarr=Reception %s validated +ReceptionValidatedInDolibarr=Ontvangst %s gevalideerd OrderCreatedInDolibarr=Bestelling %s aangemaakt OrderValidatedInDolibarr=Opdracht %s gevalideerd OrderDeliveredInDolibarr=Bestelling %s is geleverd @@ -86,8 +86,8 @@ ProposalDeleted=Voorstel verwijderd OrderDeleted=Bestelling verwijderd InvoiceDeleted=Factuur verwijderd DraftInvoiceDeleted=Conceptfactuur verwijderd -CONTACT_CREATEInDolibarr=Contact %s created -CONTACT_DELETEInDolibarr=Contact %s deleted +CONTACT_CREATEInDolibarr=Contact %s gemaakt +CONTACT_DELETEInDolibarr=Contact %s verwijderd PRODUCT_CREATEInDolibarr=Product %s aangemaakt PRODUCT_MODIFYInDolibarr=Product %s aangepast PRODUCT_DELETEInDolibarr=Product %s verwijderd @@ -152,6 +152,7 @@ ActionType=Taak type DateActionBegin=Begindatum ConfirmCloneEvent=Weet u zeker dat u gebeurtenis <b> %s </b> wilt klonen? RepeatEvent=Herhaal gebeurtenis/taak +OnceOnly=Eenmalig EveryWeek=Elke week EveryMonth=Elke maand DayOfMonth=Dag van de maand @@ -160,9 +161,9 @@ DateStartPlusOne=Begindatum + 1 uur SetAllEventsToTodo=Zet alle evenementen op te doen SetAllEventsToInProgress=Stel alle evenementen in proces SetAllEventsToFinished=Stel alle evenementen in op voltooid -ReminderTime=Reminder period before the event -TimeType=Duration type -ReminderType=Callback type -AddReminder=Create an automatic reminder notification for this event -ErrorReminderActionCommCreation=Error creating the reminder notification for this event -BrowserPush=Browser Notification +ReminderTime=Herinneringsperiode voor het evenement +TimeType=Duur +ReminderType=Terugbellen +AddReminder=Maak een automatische herinneringsmelding voor deze afspraak +ErrorReminderActionCommCreation=Fout bij het maken van de herinneringsmelding voor deze afspraak +BrowserPush=Browser pop-up melding diff --git a/htdocs/langs/nl_NL/banks.lang b/htdocs/langs/nl_NL/banks.lang index 2bdc1c80373..5350f4939a7 100644 --- a/htdocs/langs/nl_NL/banks.lang +++ b/htdocs/langs/nl_NL/banks.lang @@ -7,7 +7,7 @@ BankName=Banknaam FinancialAccount=Rekening BankAccount=Bankrekening BankAccounts=Bankrekeningen -BankAccountsAndGateways=Bankrekeningen | gateways +BankAccountsAndGateways=Bankrekeningen | Gateways ShowAccount=Toon rekening AccountRef=Financiële rekening referentie AccountLabel=Financiële rekening label @@ -25,19 +25,19 @@ InitialBankBalance=Beginbalans EndBankBalance=Eindbalans CurrentBalance=Huidig saldo FutureBalance=Toekomstig saldo -ShowAllTimeBalance=Toon saldo sinds begin +ShowAllTimeBalance=Toon saldo vanaf begin AllTime=Vanaf het begin Reconciliation=Overeenstemming RIB=Bankrekeningnummer -IBAN=IBAN-nummer -BIC=BIC/SWIFT-code +IBAN=IBAN nummer +BIC=BIC/SWIFT code SwiftValid=BIC / SWIFT geldig -SwiftVNotalid=BIC / SWIFT is niet geldig +SwiftVNotalid=BIC / SWIFT code onjuist IbanValid=IBAN geldig -IbanNotValid=IBAN is niet geldig -StandingOrders=Incasso-opdrachten -StandingOrder=Incasso-opdracht -PaymentByDirectDebit=Automatische incasso +IbanNotValid=IBAN onjuist +StandingOrders=Incasso opdrachten +StandingOrder=Automatische incasso +PaymentByDirectDebit=Betaling via automatische incasso PaymentByBankTransfers=Betalingen via overschrijving PaymentByBankTransfer=Betaling via overschrijving AccountStatement=Rekeningafschrift @@ -55,7 +55,7 @@ NewBankAccount=Nieuwe rekening NewFinancialAccount=Nieuwe financiële rekening MenuNewFinancialAccount=Nieuwe financiële rekening EditFinancialAccount=Wijzig rekening -LabelBankCashAccount=label van bank of kas +LabelBankCashAccount=Label van bank of kas AccountType=Rekeningtype BankType0=Spaarrekening BankType1=Betaalrekening @@ -63,9 +63,9 @@ BankType2=Kasrekening AccountsArea=Rekeningenoverzicht AccountCard=Rekeningdetailkaart DeleteAccount=Rekening verwijderen -ConfirmDeleteAccount=Weet u deze dat u dit account wilt verwijderen? +ConfirmDeleteAccount=Weet u zeker dat u deze rekening wilt verwijderen? Account=Rekening -BankTransactionByCategories=Bankregels op categorie +BankTransactionByCategories=Bankboekingen per categorie BankTransactionForCategory=Bankboekingen voor categorie <b>%s</b> RemoveFromRubrique=Verwijder link met categorie RemoveFromRubriqueConfirm=Weet u zeker dat u de link tussen het item en de categorie wilt wissen? @@ -75,7 +75,7 @@ BankTransactions=Bankmutaties BankTransaction=Bankmutatie ListTransactions=Mutatieoverzicht ListTransactionsByCategory=Mutaties per categorie -TransactionsToConciliate=Items af te stemmen +TransactionsToConciliate=Af te stemmen transacties TransactionsToConciliateShort=Af te stemmen Conciliable=Kunnen worden afgestemd Conciliate=Afstemmen @@ -83,7 +83,7 @@ Conciliation=Afstemming SaveStatementOnly=Afschrift alleen opslaan ReconciliationLate=Later afstemmen IncludeClosedAccount=Inclusief opgeheven rekeningen -OnlyOpenedAccount=Alleen open accounts +OnlyOpenedAccount=Alleen open rekeningen AccountToCredit=Te crediteren rekening AccountToDebit=Te debiteren rekening DisableConciliation=Afstemming van deze rekening uitschakelen @@ -93,36 +93,36 @@ StatusAccountOpened=Open StatusAccountClosed=Opgeheven AccountIdShort=Aantal LineRecord=Transactie -AddBankRecord=Item toevoegen -AddBankRecordLong=Item handmatig toevoegen +AddBankRecord=Transactie toevoegen +AddBankRecordLong=Transactie handmatig toevoegen Conciliated=Afgestemd ConciliatedBy=Afgestemd door DateConciliating=Afgestemd op -BankLineConciliated=Boeking afgestemd met afschrift +BankLineConciliated=Boeking afgestemd met bankafschrift Reconciled=Afgestemd NotReconciled=Niet afgestemd CustomerInvoicePayment=Afnemersbetaling -SupplierInvoicePayment=Betaling van de leverancier +SupplierInvoicePayment=Leveranciersbetaling SubscriptionPayment=Betaling van abonnement WithdrawalPayment=Debet betalingsopdracht SocialContributionPayment=Sociale/fiscale belastingbetaling -BankTransfer=Credit transfer -BankTransfers=Credit transfers +BankTransfer=Overschrijving +BankTransfers=Overschrijvingen MenuBankInternalTransfer=Interne overboeking TransferDesc=Overdracht van de ene rekening naar de andere. Dolibarr zal twee records schrijven (een debet in de bronaccount en een tegoed in het doelaccount). Hetzelfde bedrag (behalve aanduiding), label en datum worden gebruikt voor deze transactie) TransferFrom=Van TransferTo=T/m TransferFromToDone=Een overboeking van <b>%s</b> naar <b>%s</b> van <b>%s</b> is geregistreerd. -CheckTransmitter=Overboeker +CheckTransmitter=Verzender ValidateCheckReceipt=Betaling met cheque goedkeuren? ConfirmValidateCheckReceipt=Weet u zeker dat u deze cheque wilt valideren? Hierna is het niet meer mogelijk dit te wijzigen. -DeleteCheckReceipt=Dit chequebewijs verwijderen? +DeleteCheckReceipt=Deze cheque ontvangst verwijderen? ConfirmDeleteCheckReceipt=Weet u zeker dat u deze betaling via cheque wilt verwijderen? BankChecks=Bankcheque BankChecksToReceipt=Cheques in afwachting van storting BankChecksToReceiptShort=Cheques in afwachting van storting ShowCheckReceipt=Toon controleren stortingsbewijs -NumberOfCheques=Checknr. +NumberOfCheques=Check nr. DeleteTransaction=Ingave verwijderen ConfirmDeleteTransaction=Weet u zeker dat u deze boeking wilt verwijderen? ThisWillAlsoDeleteBankRecord=Hiermee wordt ook de boeking in de bank verwijderd @@ -143,40 +143,41 @@ BackToAccount=Terug naar rekening ShowAllAccounts=Toon alle rekeningen FutureTransaction=Toekomstige transactie. Nog niet mogelijk af te stemmen SelectChequeTransactionAndGenerate=Selecteer/ filter cheques om op te nemen in de chequebetaling en klik op "Aanmaken" -InputReceiptNumber=Kies het bankafschrift in verband met de bemiddeling. Gebruik een sorteerbaar numerieke waarde: YYYYMM of YYYYMMDD -EventualyAddCategory=Tenslotte een categorie opgeven waarin de gegevens bewaard kunnen worden +InputReceiptNumber=Kies het bankafschrift in verband met de bemiddeling. Gebruik een sorteerbare numerieke waarde: YYYYMM of YYYYMMDD +EventualyAddCategory=Geef tenslotte een categorie op waarin de gegevens bewaard kunnen worden ToConciliate=Afstemmen? -ThenCheckLinesAndConciliate=Duid dan de lijnen aan van het bankafschrift en klik +ThenCheckLinesAndConciliate=Controleer vervolgens de regels op het bankafschrift en klik DefaultRIB=Standaard BAN AllRIB=Alle BAN LabelRIB=BAN label NoBANRecord=Geen BAN gegeven -DeleteARib=Verwijderen BAN gegeven -ConfirmDeleteRib=Weet u zeker dat u dit BAN-record wilt verwijderen? -RejectCheck=Teruggekeerde cheque -ConfirmRejectCheck=Weet u zeker dat u deze controle wilt markeren als afgewezen? -RejectCheckDate=Teruggave datum cheque -CheckRejected=Teruggekeerde cheque +DeleteARib=Verwijderen BAN record +ConfirmDeleteRib=Weet u zeker dat u dit BAN record wilt verwijderen? +RejectCheck=Geretourneerde cheque +ConfirmRejectCheck=Weet u zeker dat u deze cheque wilt markeren als afgewezen? +RejectCheckDate=Datum dat cheque is geretourneerd +CheckRejected=Geretourneerde cheque CheckRejectedAndInvoicesReopened=Cheque geretourneerd en facturen worden opnieuw geopend BankAccountModelModule=Documentsjablonen voor bankrekeningen -DocumentModelSepaMandate=Sjabloon van SEPA-mandaat. Alleen bruikbaar voor Europese landen in de Europese Unie. -DocumentModelBan=Sjabloon om een pagina met BAN-informatie af te drukken. +DocumentModelSepaMandate=Sjabloon van SEPA mandaat. Alleen bruikbaar voor Europese landen in de Europese Unie. +DocumentModelBan=Sjabloon om een pagina met BAN informatie af te drukken. NewVariousPayment=Nieuwe overige betaling VariousPayment=Overige betaling VariousPayments=Diverse betalingen ShowVariousPayment=Laat overige betaling zien AddVariousPayment=Overige betaling toevoegen -VariousPaymentId=Miscellaneous payment ID -VariousPaymentLabel=Miscellaneous payment label -ConfirmCloneVariousPayment=Confirm the clone of a miscellaneous payment -SEPAMandate=SEPA-mandaat -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 afschriftnummer. -CashControl=POS kasopmaak -NewCashFence=Kasopmaak +VariousPaymentId=Diverse betalings-ID +VariousPaymentLabel=Diversen betaalomschrijving +ConfirmCloneVariousPayment=Bevestig maken kopie van een diverse betaling +SEPAMandate=SEPA mandaat +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 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=If you don't make the bank reconciliations on some bank accounts, disable the property "%s" on them to remove this warning. +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 diff --git a/htdocs/langs/nl_NL/bills.lang b/htdocs/langs/nl_NL/bills.lang index 20d977e1cf6..845323b0228 100644 --- a/htdocs/langs/nl_NL/bills.lang +++ b/htdocs/langs/nl_NL/bills.lang @@ -441,8 +441,8 @@ BankAccountNumberKey=checksum Residence=Adres IBANNumber=IBAN-rekeningnummer IBAN=IBAN -CustomerIBAN=IBAN of customer -SupplierIBAN=IBAN of vendor +CustomerIBAN=IBAN van klant +SupplierIBAN=IBAN van leverancier BIC=BIC / SWIFT BICNumber=BIC/SWIFT-code ExtraInfos=Extra info @@ -576,7 +576,7 @@ BILL_SUPPLIER_DELETEInDolibarr=Leverancierfactuur verwijderd UnitPriceXQtyLessDiscount=Eenheidsprijs x Aantal - Korting CustomersInvoicesArea=Factureringsgebied voor klanten SupplierInvoicesArea=Factureringsgebied leverancier -FacParentLine=Invoice Line Parent -SituationTotalRayToRest=Remainder to pay without taxe -PDFSituationTitle=Situation n° %d -SituationTotalProgress=Total progress %d %% +FacParentLine=Hoofd factuurregel +SituationTotalRayToRest=Netto restant te betalen +PDFSituationTitle=Situatie n ° %d +SituationTotalProgress=Totale voortgang %d %% diff --git a/htdocs/langs/nl_NL/blockedlog.lang b/htdocs/langs/nl_NL/blockedlog.lang index f455e80d1d6..1507f2b3991 100644 --- a/htdocs/langs/nl_NL/blockedlog.lang +++ b/htdocs/langs/nl_NL/blockedlog.lang @@ -35,7 +35,7 @@ logDON_DELETE=Donatie logische verwijdering logMEMBER_SUBSCRIPTION_CREATE=Lid abonnement gemaakt logMEMBER_SUBSCRIPTION_MODIFY=Lid abonnement gewijzigd logMEMBER_SUBSCRIPTION_DELETE=Lid abonnement logische verwijdering -logCASHCONTROL_VALIDATE=Contant geïnd +logCASHCONTROL_VALIDATE=Kassa afsluiten BlockedLogBillDownload=Klant factuur downloaden BlockedLogBillPreview=Voorbeeld van klant factuur BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/nl_NL/boxes.lang b/htdocs/langs/nl_NL/boxes.lang index 71c851c2c3b..49eff98a42e 100644 --- a/htdocs/langs/nl_NL/boxes.lang +++ b/htdocs/langs/nl_NL/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=Laatste %s aangepaste donaties BoxTitleLastModifiedExpenses=Laatste gewijzigde %s onkostendeclaraties BoxTitleLatestModifiedBoms=Laatste %s gemodificeerde stuklijsten BoxTitleLatestModifiedMos=Laatste %s gewijzigde productieorders +BoxTitleLastOutstandingBillReached=Klanten met meer dan maximaal toegestaan krediet BoxGlobalActivity=Globale activiteit (facturen, offertes, bestellingen) BoxGoodCustomers=Goede klanten BoxTitleGoodCustomers=%s Goede klanten +BoxScheduledJobs=Geplande taken +BoxTitleFunnelOfProspection=Lood trechter FailedToRefreshDataInfoNotUpToDate=Vernieuwen van RSS-flux is mislukt. Laatste succesvolle vernieuwingsdatum: %s LastRefreshDate=Laatste bijwerkingsdatum NoRecordedBookmarks=Geen weblinks ingesteld. Klik <a href="%s">weblinks</a> aan om deze toe te voegen. @@ -83,8 +86,8 @@ BoxTitleLatestModifiedSupplierOrders=Orders van leveranciers: laatste %s gewijzi BoxTitleLastModifiedCustomerBills=Klantfacturen: laatste %s gewijzigd BoxTitleLastModifiedCustomerOrders=Klantorders: laatste %s gewijzigd BoxTitleLastModifiedPropals=Laatste %s aangepaste offertes -BoxTitleLatestModifiedJobPositions=Latest %s modified jobs -BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures +BoxTitleLatestModifiedJobPositions=Laatste %s gewijzigde taken +BoxTitleLatestModifiedCandidatures=Laatste %s gewijzigde kandidaturen ForCustomersInvoices=Afnemersfacturen ForCustomersOrders=Klantenbestellingen ForProposals=Zakelijke voorstellen / Offertes @@ -92,8 +95,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=Laatste handmatige invoer in accountancy -BoxTitleLastManualEntries=%s laatste handmatige invoer +BoxLastManualEntries=Latest record in accountancy entered manually or without source document +BoxTitleLastManualEntries=%s latest record entered manually or without source document NoRecordedManualEntries=Geen handmatige invoer opgenomen in boekhouding BoxSuspenseAccount=Tel boekhoudkundige bewerking met tussenrekening BoxTitleSuspenseAccount=Aantal niet-toegewezen lijnen @@ -102,5 +105,7 @@ SuspenseAccountNotDefined=Suspense-account is niet gedefinieerd BoxLastCustomerShipments=Laatste klantzendingen BoxTitleLastCustomerShipments=Laatste %s klantverzendingen NoRecordedShipments=Geen geregistreerde klantverzending +BoxCustomersOutstandingBillReached=Klanten met bereikt limiet # Pages AccountancyHome=Boekhouden +ValidatedProjects=Gevalideerde projecten diff --git a/htdocs/langs/nl_NL/cashdesk.lang b/htdocs/langs/nl_NL/cashdesk.lang index 18a7e03de51..24bff1481e4 100644 --- a/htdocs/langs/nl_NL/cashdesk.lang +++ b/htdocs/langs/nl_NL/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Voetnoot AmountAtEndOfPeriod=Bedrag aan het einde van de periode (dag, maand of jaar) TheoricalAmount=Theoretisch bedrag RealAmount=Aanwezig bedrag -CashFence=Cash hek -CashFenceDone=Kas te ontvangen voor de periode +CashFence=Kassa sluiten +CashFenceDone=Kassa gesloten voor de periode NbOfInvoices=Aantal facturen Paymentnumpad=Soort betaling om de betaling in te voeren Numberspad=Cijferblok @@ -94,13 +94,14 @@ TakeposConnectorMethodDescription=Externe module met extra functies. Mogelijkhei PrintMethod=Afdrukmethode ReceiptPrinterMethodDescription=Krachtige methode met veel parameters. Volledig aanpasbaar met sjablonen. Kan niet afdrukken vanuit de cloud. ByTerminal=Per terminal -TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad +TakeposNumpadUsePaymentIcon=Gebruik pictogram in plaats van tekst op betalingsknoppen van numpad CashDeskRefNumberingModules=Nummeringsmodule voor POS-verkoop CashDeskGenericMaskCodes6 =  <br><b>{TN}</b> tag wordt gebruikt om het terminalnummer toe te voegen TakeposGroupSameProduct=Groepeer dezelfde productlijnen StartAParallelSale=Start een nieuwe parallelle verkoop -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Sluit de kassa +SaleStartedAt=Verkoop begon op %s +ControlCashOpening=Controle contant geld pop-up bij het openen van POS +CloseCashFence=Sluit de kassa-bediening CashReport=Kassa verslag MainPrinterToUse=Hoofdprinter om te gebruiken OrderPrinterToUse=Bestel printer om te gebruiken @@ -115,11 +116,11 @@ ScanToOrder=Scan de QR code om te bestellen Appearance=Weergave HideCategoryImages=Verberg categorie afbeeldingen HideProductImages=Verberg productafbeeldingen -NumberOfLinesToShow=Number of lines of images to show -DefineTablePlan=Define tables plan -GiftReceiptButton=Add a "Gift receipt" button -GiftReceipt=Gift receipt -ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first -AllowDelayedPayment=Allow delayed payment -PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts +NumberOfLinesToShow=Aantal regels met afbeeldingen dat moet worden weergegeven +DefineTablePlan=Definieer tafelschikking +GiftReceiptButton=Voeg een knop "Cadeaubon" toe +GiftReceipt=Cadeaubon +ModuleReceiptPrinterMustBeEnabled=Module Bonprinter moet eerst zijn ingeschakeld +AllowDelayedPayment=Laat uitgestelde betaling toe +PrintPaymentMethodOnReceipts=Betaalmethode afdrukken op tickets | bonnen WeighingScale=Weegschaal diff --git a/htdocs/langs/nl_NL/categories.lang b/htdocs/langs/nl_NL/categories.lang index c4008fe1ce5..1f1c51d1027 100644 --- a/htdocs/langs/nl_NL/categories.lang +++ b/htdocs/langs/nl_NL/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=Labels/categorieën projecten UsersCategoriesArea=Gebruikers tags / categorieën gebied SubCats=Sub-categorieën CatList=Lijst van kenmerken/categorieën +CatListAll=Lijst met groepen /categorieën (alle typen) NewCategory=Nieuw label/categorie ModifCat=Wijzigen label/categorie CatCreated=Label/categorie gecreëerd @@ -65,28 +66,34 @@ UsersCategoriesShort=Gebruikers tags / categorieën StockCategoriesShort=Magazijn-tags / categorieën ThisCategoryHasNoItems=Deze categorie bevat geen items. CategId=Label/categorie id -CatSupList=Lijst met leverancierslabels/categorieën -CatCusList=Lijst van de klant/prospect kenmerken/categorieën +ParentCategory=Bovenliggende groep/categorie +ParentCategoryLabel=Label van bovenliggende groep/categorie +CatSupList=Lijst met leveranciers groepen/ categorieën +CatCusList=Lijst met klant groepen/categorieën CatProdList=Lijst van product kenmerken/categorieën CatMemberList=Lijst leden kenmerken/categorieën -CatContactList=Lijst met contactpersoon labels/-categorieën -CatSupLinks=Koppelingen tussen leveranciers en kenmerken/categorieën +CatContactList=Lijst met groepen/categorieën voor contacten +CatProjectsList=Lijst met projectgroepen/-categorieën +CatUsersList=Lijst met groepen/categorieën van gebruikers +CatSupLinks=Koppelingen tussen leveranciers en groepen/categorieën CatCusLinks=Koppelingen tussen klanten/prospects en labels/categorieën CatContactsLinks=Koppelingen tussen contacten / adressen en tags / categorieën CatProdLinks=Koppelingen tussen producten/diensten en labels/categorieën -CatProJectLinks=Koppelingen tussen projecten en labels/categorieën +CatMembersLinks=Koppelingen tussen leden en tags / categorieën +CatProjectsLinks=Koppelingen tussen projecten en labels/categorieën +CatUsersLinks=Koppelingen tussen gebruikers en groepen/categorieën DeleteFromCat=Verwijderen uit labels/categorie ExtraFieldsCategories=Complementaire kenmerken CategoriesSetup=Labels/categorieën instelling CategorieRecursiv= Automatische koppeling met bovenliggende label/categorie CategorieRecursivHelp=Als de optie is ingeschakeld, wordt het product ook toegevoegd aan de bovenliggende categorie wanneer u een product toevoegt aan een subcategorie. AddProductServiceIntoCategory=Voeg het volgende product/dienst toe -AddCustomerIntoCategory=Assign category to customer -AddSupplierIntoCategory=Assign category to supplier +AddCustomerIntoCategory=Wijs categorie toe aan klant +AddSupplierIntoCategory=Wijs categorie toe aan leverancier ShowCategory=Toon label/categorie ByDefaultInList=Standaard in de lijst ChooseCategory=Kies categorie -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories -WebsitePagesCategoriesArea=Page-Container Categories +StocksCategoriesArea=Categorieën voor magazijnen +ActionCommCategoriesArea=Categorieën voor gebeurtenissen +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 2b4e7b136b4..c310afcbe4b 100644 --- a/htdocs/langs/nl_NL/companies.lang +++ b/htdocs/langs/nl_NL/companies.lang @@ -124,7 +124,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-nummer ProfId6AT=- ProfId1AU=Prof. id 1 (ABN) ProfId2AU=- @@ -136,7 +136,7 @@ ProfId1BE=Prof. id 1 (Professioneel nummer) ProfId2BE=- ProfId3BE=- ProfId4BE=- -ProfId5BE=EORI number +ProfId5BE=EORI-nummer ProfId6BE=- ProfId1BR=- ProfId2BR=IE (Belastingsnummer staat) @@ -144,11 +144,11 @@ ProfId3BR=IM (Belastingsnummer stad) ProfId4BR=CPF #ProfId5BR=CNAE #ProfId6BR=INSS -ProfId1CH=UID-Nummer +ProfId1CH=UID-nummer ProfId2CH=- ProfId3CH=Prof id 1 (Federale nummer) ProfId4CH=Handelsregisternummer -ProfId5CH=EORI number +ProfId5CH=EORI-nummer ProfId6CH=- ProfId1CL=Prof Id 1 (RUT) ProfId2CL=- @@ -166,19 +166,19 @@ ProfId1DE=Prof. id 1 (USt.-IdNr) ProfId2DE=Prof. id 2 (USt.-Nr) ProfId3DE=Prof. Id 3 (Handelsregisternummer) ProfId4DE=- -ProfId5DE=EORI number +ProfId5DE=EORI-nummer 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=EORI number +ProfId5ES=EORI-nummer 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 number +ProfId5FR=EORI-nummer ProfId6FR=- ProfId1GB=Prof. id 1 (Registratienummer) ProfId2GB=- @@ -202,12 +202,12 @@ ProfId1IT=- ProfId2IT=- ProfId3IT=- ProfId4IT=- -ProfId5IT=EORI number +ProfId5IT=EORI-nummer ProfId1LU=Id. prof. 1 (R.C.S. Luxemburg) ProfId2LU=Id. prof. 2 (Business permit) ProfId3LU=- ProfId4LU=- -ProfId5LU=EORI number +ProfId5LU=EORI-nummer ProfId6LU=- ProfId1MA=Id prof. 1 (R.C.) ProfId2MA=Id prof. 2 (Patente) @@ -225,13 +225,13 @@ ProfId1NL=KVK nummer ProfId2NL== ProfId3NL== ProfId4NL=Burgerservicenummer (BSN) -ProfId5NL=EORI number +ProfId5NL=EORI-nummer ProfId6NL=- 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 number +ProfId5PT=EORI-nummer ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +255,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=EORI-nummer ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -358,8 +358,8 @@ VATIntraCheckableOnEUSite=Controleer het intracommunautaire btw-nummer op de web VATIntraManualCheck=U kunt het ook handmatig controleren op de website van de Europese Commissie <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=Controle niet mogelijk. Controleerdienst wordt niet verleend door lidstaat (%s). NorProspectNorCustomer=Geen prospect, noch klant -JuridicalStatus=Type juridische entiteit -Workforce=Workforce +JuridicalStatus=Soort bedrijf +Workforce=Personeelsbestand Staff=Werknemers ProspectLevelShort=Potentieel ProspectLevel=Prospectpotentieel @@ -462,8 +462,8 @@ PaymentTermsSupplier=Betalingstermijn - Leverancier PaymentTypeBoth=Betaalwijze - Klant en leverancier MulticurrencyUsed=Gebruik meerdere valuta MulticurrencyCurrency=Valuta -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=Europa (EEG) +RestOfEurope=Rest van Europa (EEG) +OutOfEurope=Buiten Europa (EEG) +CurrentOutstandingBillLate=Openstaande factuur met vervallen betaaldatum +BecarefullChangeThirdpartyBeforeAddProductToInvoice=Wees voorzichtig, afhankelijk van uw productprijsinstellingen, moet u van relatie veranderen voordat u een product aan POS toevoegt. diff --git a/htdocs/langs/nl_NL/compta.lang b/htdocs/langs/nl_NL/compta.lang index c811965f35d..79d8621996a 100644 --- a/htdocs/langs/nl_NL/compta.lang +++ b/htdocs/langs/nl_NL/compta.lang @@ -69,7 +69,7 @@ SocialContribution=Sociale of fiscale heffingen/belasting SocialContributions=Sociale of fiscale heffingen/belastingen SocialContributionsDeductibles=Aftrekbare sociale/fiscale lasten/belastingen SocialContributionsNondeductibles=Niet aftrekbare sociale/fiscale lasten/belastingen -DateOfSocialContribution=Date of social or fiscal tax +DateOfSocialContribution=Datum van sociale of fiscale belasting LabelContrib=Labelbijdrage TypeContrib=Type bijdrage MenuSpecialExpenses=Speciale uitgaven @@ -111,9 +111,9 @@ Refund=Terugbetaling SocialContributionsPayments=Betaling Sociale/fiscale lasten ShowVatPayment=Toon BTW-betaling TotalToPay=Totaal te voldoen -BalanceVisibilityDependsOnSortAndFilters=Saldo is alleen zichtbaar in deze lijst als de tabel oplopend is gesorteerd op %s en is gefilterd op 1 bankrekening +BalanceVisibilityDependsOnSortAndFilters=Saldo is alleen zichtbaar in deze lijst als de tabel is gesorteerd op %s en gefilterd op 1 bankrekening (zonder andere filters) CustomerAccountancyCode=Debiteurenrekening -SupplierAccountancyCode=Leveranciersboekhoudingscode +SupplierAccountancyCode=Boekcode leverancier CustomerAccountancyCodeShort=Klant account. code SupplierAccountancyCodeShort=Lev. account. code AccountNumber=Rekeningnummer @@ -140,8 +140,8 @@ ConfirmDeleteSocialContribution=Weet u zeker dat u deze sociale- of fiscale bela 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> -CalcModeDebt=Analyse van bekende geregistreerde facturen, zelfs als deze nog niet in het grootboek zijn opgenomen. -CalcModeEngagement=Analyse van bekende geregistreerde betalingen, zelfs als deze nog niet in Ledger zijn geregistreerd. +CalcModeDebt=Analyse van bekende geregistreerde documenten, zelfs als ze nog niet in het grootboek zijn geboekt. +CalcModeEngagement=Analyse van bekende geregistreerde betalingen welke nog niet zijn doorgeboekt in de boekhouding. CalcModeBookkeeping=Analyse van gegevens gejournaliseerd in de boekhoudboekentabel. CalcModeLT1= <b>Modus %s RE op klant- leveranciers facturen %s</b> CalcModeLT1Debt=Modus <b>%sRE op klantfacturen%s</b> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Balans van inkomsten en uitgaven, jaarlijks overzic AnnualByCompanies=Saldo van baten en lasten, per vooraf gedefinieerde rekeninggroepen AnnualByCompaniesDueDebtMode=Evenwicht tussen baten en lasten, gedetailleerd per vooraf gedefinieerde groepen, modus <b>%sClaims-Debts%s</b> zei <b>Commitment accounting</b> . AnnualByCompaniesInputOutputMode=Saldo van baten en lasten, detail door vooraf gedefinieerde groepen, mode <b>%sIncomes-Expenses%s</b> zei <b>cash accounting.</b> -SeeReportInInputOutputMode=Zie %sanalyse van betalingen%s voor een berekening van werkelijke betalingen, zelfs als deze nog niet in Ledger zijn geregistreerd. -SeeReportInDueDebtMode=Zie %sanalyse van facturen%s voor een berekening op basis van bekende geregistreerde facturen, zelfs als deze nog niet in Ledger zijn geregistreerd. -SeeReportInBookkeepingMode=Zie <b>%s Boekhoudverslag%s</b> voor een berekening op de <b>boekhoudboekentabel</b> +SeeReportInInputOutputMode=Zie <b>%s analyse van betalingen%s </b>voor een berekening op basis van<b>geregistreerde betalingen</b>gedaan, zelfs als ze nog niet het grootboek zijn opgenomen +SeeReportInDueDebtMode=Zie <b>%s analyse van geregistreerde documenten%s</b> voor een berekening op basis van bekende<b> geregistreerde documenten </b> zelfs als ze nog niet zijn geboekt +SeeReportInBookkeepingMode=Zie <b>%s analyse van de boekhoudtabel %s</b> voor een rapport gebaseerd op<b>Boekhoudkundige grootboektabel </b> RulesAmountWithTaxIncluded=- Bedragen zijn inclusief alle belastingen RulesResultDue=- Het omvat openstaande facturen, uitgaven, BTW, donaties, of ze nu betaald zijn of niet. Bevat ook betaalde salarissen. <br> - Het is gebaseerd op de factuurdatum van facturen en op de vervaldatum voor uitgaven of belastingbetalingen. Voor salarissen gedefinieerd met Salaris module, wordt de valutadatum van betaling gebruikt. RulesResultInOut=- Het omvat de echte betalingen op facturen, uitgaven, btw en salarissen. <br> - Het is gebaseerd op de betalingsdatums van de facturen, uitgaven, btw en salarissen. De donatiedatum voor donatie. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=Het toont record in uw grootboek met boekhoud SeePageForSetup=Zie menu <a href="%s">%s</a> voor instellingen DepositsAreNotIncluded=- Vooruitbetalingsfacturen zijn niet inbegrepen DepositsAreIncluded=- Facturen met vooruitbetaling zijn inbegrepen +LT1ReportByMonth=BTW 2-rapport per maand +LT2ReportByMonth=BTW 3 rapport per maand LT1ReportByCustomers=Belasting 2 rapporteren door relatie LT2ReportByCustomers=Belasting 3 rapporteren door derden LT1ReportByCustomersES=Rapport door derde partij RE LT2ReportByCustomersES=Verslag van derden IRPF VATReport=Verkoop belasting rapportage VATReportByPeriods=Verkoopbelastingrapport per periode +VATReportByMonth=BTW-overzicht per maand VATReportByRates=BTW overzicht per tarief VATReportByThirdParties=Verkoopbelastingrapport door relatie VATReportByCustomers=BTW-overzicht per klant diff --git a/htdocs/langs/nl_NL/contracts.lang b/htdocs/langs/nl_NL/contracts.lang index 9cbf6c3b23e..835a44f62a1 100644 --- a/htdocs/langs/nl_NL/contracts.lang +++ b/htdocs/langs/nl_NL/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Actieve diensten MenuExpiredServices=Verlopen diensten MenuClosedServices=Gesloten diensten NewContract=Nieuw contract -NewContractSubscription=New contract or subscription +NewContractSubscription=Nieuw contract of abonnement AddContract=Nieuw contract DeleteAContract=Verwijder een contract ActivateAllOnContract=Activeer alle services @@ -99,6 +99,6 @@ TypeContact_contrat_internal_SALESREPFOLL=Vertegenwoordiger opvolging contract TypeContact_contrat_external_BILLING=Afnemersfactuurcontactpersoon TypeContact_contrat_external_CUSTOMER=Contactpersoon die follow-up doet voor deze afnemer TypeContact_contrat_external_SALESREPSIGN=Ondertekening contract contactpersoon -HideClosedServiceByDefault=Hide closed services by default -ShowClosedServices=Show Closed Services -HideClosedServices=Hide Closed Services +HideClosedServiceByDefault=Verberg gesloten services als default +ShowClosedServices=Toon gesloten services +HideClosedServices=Verberg gesloten services diff --git a/htdocs/langs/nl_NL/cron.lang b/htdocs/langs/nl_NL/cron.lang index 235ff89766f..a44efab9516 100644 --- a/htdocs/langs/nl_NL/cron.lang +++ b/htdocs/langs/nl_NL/cron.lang @@ -7,13 +7,14 @@ Permission23103 = Verwijder geplande taak Permission23104 = Voer geplande taak uit # Admin CronSetup=Beheer taakplanning -URLToLaunchCronJobs=URL om gekwalificeerde cron-taken te controleren en te starten -OrToLaunchASpecificJob=Of om een specifieke taak te controleren en te starten +URLToLaunchCronJobs=URL om gekwalificeerde cron-taken vanuit een browser te controleren en te starten +OrToLaunchASpecificJob=Of om een specifieke taak vanuit een browser te controleren en te starten KeyForCronAccess=Beveiligingssleutel voor URL om cron-taken te starten FileToLaunchCronJobs=Opdrachtregel om gekwalificeerde cron-taken te controleren en te starten CronExplainHowToRunUnix=In een Unix-omgeving moet u het volgende crontab-item gebruiken om de opdrachtregel elke 5 minuten uit te voeren CronExplainHowToRunWin=In een Microsoft (tm) Windows-omgeving kunt u de geplande taakhulpmiddelen gebruiken om de opdrachtregel elke 5 minuten uit te voeren CronMethodDoesNotExists=Class%sbevat geen methode%s +CronMethodNotAllowed=Methode %s van class %s staat op de zwarte lijst met verboden methoden CronJobDefDesc=Cron-taakprofielen worden gedefinieerd in het modulebeschrijvingsbestand. Wanneer de module is geactiveerd, zijn ze geladen en beschikbaar, zodat u de taken kunt beheren vanuit het menu admin tools %s. CronJobProfiles=Lijst met vooraf gedefinieerde cron-functieprofielen # Menu @@ -46,6 +47,7 @@ CronNbRun=Aantal lanceringen CronMaxRun=Maximaal aantal lanceringen CronEach=Elke JobFinished=Taak gestart en be-eindigd +Scheduled=Gepland #Page card CronAdd= Taak toevoegen CronEvery=Alle taken uitvoeren @@ -56,7 +58,7 @@ CronNote=Reactie CronFieldMandatory=Velden %s zijn verplicht CronErrEndDateStartDt=Einddatum kan niet vóór startdatum liggen StatusAtInstall=Status bij module-installatie -CronStatusActiveBtn=Activeren +CronStatusActiveBtn=Schema CronStatusInactiveBtn=Deactiveren CronTaskInactive=Deze taak is uitgeschakeld CronId=Id @@ -82,3 +84,8 @@ MakeLocalDatabaseDumpShort=Back-up van lokale database MakeLocalDatabaseDump=Maak een lokale database dump. Parameters zijn: compressie ('gz' of 'bz' of 'none'), back-uptype ('mysql', 'pgsql', 'auto'), 1, 'auto' of te creëren bestandsnaam, aantal te bewaren back-upbestanden WarningCronDelayed=Opgelet, voor prestatiedoeleinden, ongeacht de volgende datum van uitvoering van ingeschakelde taken, kunnen uw taken worden vertraagd tot maximaal %s uur voordat ze worden uitgevoerd. DATAPOLICYJob=Gegevens opschonen en anonimiseren +JobXMustBeEnabled=Taak %s moet zijn ingeschakeld +# Cron Boxes +LastExecutedScheduledJob=Laatst uitgevoerde geplande taak +NextScheduledJobExecute=Volgende geplande taak om uit te voeren +NumberScheduledJobError=Aantal foutieve geplande taken diff --git a/htdocs/langs/nl_NL/deliveries.lang b/htdocs/langs/nl_NL/deliveries.lang index 8a8382da107..329c2b74ad0 100644 --- a/htdocs/langs/nl_NL/deliveries.lang +++ b/htdocs/langs/nl_NL/deliveries.lang @@ -27,5 +27,6 @@ Recipient=Ontvanger ErrorStockIsNotEnough=Er is niet genoeg voorraad Shippable=Zendklaar NonShippable=Niet verzendbaar +ShowShippableStatus=Toon verzendstatus ShowReceiving=Toon afleverbon NonExistentOrder=Niet bestaande order diff --git a/htdocs/langs/nl_NL/ecm.lang b/htdocs/langs/nl_NL/ecm.lang index 0fe01fa5726..b0b224d1835 100644 --- a/htdocs/langs/nl_NL/ecm.lang +++ b/htdocs/langs/nl_NL/ecm.lang @@ -23,7 +23,7 @@ ECMSearchByKeywords=Zoeken op trefwoorden ECMSearchByEntity=Zoek op object ECMSectionOfDocuments=Mappen van documenten ECMTypeAuto=Automatisch -ECMDocsBy=Documents linked to %s +ECMDocsBy=Documenten gekoppeld aan %s ECMNoDirectoryYet=Geen map aangemaakt ShowECMSection=Toon map DeleteSection=Verwijder map @@ -38,6 +38,6 @@ ReSyncListOfDir=Hersynchroniseer de lijst met mappen HashOfFileContent=Hash van bestandsinhoud NoDirectoriesFound=Geen mappen gevonden FileNotYetIndexedInDatabase=Bestand nog niet geïndexeerd in database (probeer deze opnieuw te uploaden) -ExtraFieldsEcmFiles=Extrafields Ecm Files -ExtraFieldsEcmDirectories=Extrafields Ecm Directories -ECMSetup=ECM Setup +ExtraFieldsEcmFiles=Extrafields Ecm-bestanden +ExtraFieldsEcmDirectories=Extrafields Ecm-mappen +ECMSetup=ECM-instellingen diff --git a/htdocs/langs/nl_NL/errors.lang b/htdocs/langs/nl_NL/errors.lang index d9b7214e8d9..e829cd22faf 100644 --- a/htdocs/langs/nl_NL/errors.lang +++ b/htdocs/langs/nl_NL/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=Geen fout, wij bevestigen # Errors ErrorButCommitIsDone=Fouten gevonden maar we valideren toch ErrorBadEMail=E-mail %s is verkeerd +ErrorBadMXDomain=E-mail %s lijkt verkeerd (domein heeft geen geldige MX-record) ErrorBadUrl=Ongeldige Url %s ErrorBadValueForParamNotAString=Slechte parameterwaarde. Wordt over het algemeen gegenereerd als de vertaling ontbreekt. +ErrorRefAlreadyExists=Referentie <b>%s</b> bestaat al. ErrorLoginAlreadyExists=Inlog %s bestaat reeds. ErrorGroupAlreadyExists=Groep %s bestaat reeds. ErrorRecordNotFound=Tabelregel niet gevonden. @@ -48,6 +50,7 @@ ErrorFieldsRequired=Enkele verplichte velden zijn niet ingevuld. ErrorSubjectIsRequired=Het e-mail onderwerp is verplicht ErrorFailedToCreateDir=Creëren van een map mislukt. Controleer of de Webservergebruiker toestemming heeft om te schrijven in Dolibarr documentenmap. Wanneer de parameter <b>safe_mode</b> is ingeschakeld in PHP, controleer dan dat de Dolibarr php bestanden eigendom zijn van de de webserve gebruiker (of groep). ErrorNoMailDefinedForThisUser=Geen e-mailadres ingesteld voor deze gebruiker +ErrorSetupOfEmailsNotComplete=Het instellen van e-mails is niet voltooid ErrorFeatureNeedJavascript=Voor deze functie moet Javascript geactiveerd zijn. Verander dit in het Instellingen - scherm. ErrorTopMenuMustHaveAParentWithId0=Een menu van het type 'Top' kan niet beschikken over een bovenliggend menu. Stel 0 in in het 'Top' menu of kies een menu van het type 'Left'. ErrorLeftMenuMustHaveAParentId=Een menu van het type 'Left' moeten een id van een bovenliggend menu hebben. @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=Deze profile naam bestaat al voor deze export set. ErrorLDAPSetupNotComplete=De Dolibarr-LDAP installatie is niet compleet. ErrorLDAPMakeManualTest=Een .ldif bestand is gegenereerd in de map %s. Probeer het handmatig te laden vanuit een opdrachtregel om meer informatie over fouten te verkrijgen. ErrorCantSaveADoneUserWithZeroPercentage=Kan een actie met "status niet gestart" niet opslaan als het veld "gedaan door" ook is ingevuld. -ErrorRefAlreadyExists=De referentie gebruikt voor het maken bestaat al +ErrorRefAlreadyExists=Referentie <b>%s</b> bestaat al. ErrorPleaseTypeBankTransactionReportName=Voer de naam van het bankafschrift in waar de boeking moet worden gerapporteerd (formaat YYYYMM of YYYYMMDD) ErrorRecordHasChildren=Kan record niet verwijderen omdat het enkele onderliggende records heeft. ErrorRecordHasAtLeastOneChildOfType=Object heeft ten minste één kind van het type %s @@ -120,7 +123,7 @@ ErrorLoginHasNoEmail=Deze gebruiker heeft geen e-mail adres. Proces afgebroken. ErrorBadValueForCode=Onjuist waardetypen voor code. Probeer het opnieuw met een nieuwe waarde ErrorBothFieldCantBeNegative=Velden %s %s en kan niet beide negatief ErrorFieldCantBeNegativeOnInvoice=Veld <strong> %s </strong> mag niet negatief zijn voor dit type factuur. Als u een kortingsregel moet toevoegen, maakt u eerst de korting (uit veld '%s' op de kaart van een derde partij) en past u deze toe op de factuur. -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>%%). +ErrorLinesCantBeNegativeForOneVATRate=Totaal aantal regels (na aftrek van belastingen) kan niet negatief zijn voor een bepaald btw-tarief dat niet nul is (negatief totaal gevonden voor btw-tarief <b>%s</b>%%). ErrorLinesCantBeNegativeOnDeposits=Lijnen kunnen niet negatief zijn in een storting. U zult problemen ondervinden wanneer u de aanbetaling in de eindfactuur moet verbruiken als u dit doet. ErrorQtyForCustomerInvoiceCantBeNegative=Aantal voor regel in klantfacturen kan niet negatief zijn ErrorWebServerUserHasNotPermission=User account <b>%s</b> gebruikt om web-server uit te voeren heeft geen toestemming voor die @@ -136,8 +139,8 @@ ErrorNewValueCantMatchOldValue=Nieuwe waarde kan niet gelijk is aan de oude ErrorFailedToValidatePasswordReset=Mislukt om wachtwoord opnieuw te initialiseren. Misschien werd de her-init al gedaan (deze link kan slechts een keer worden). Zo niet, probeer dan het her-init proces opnieuw te starten. ErrorToConnectToMysqlCheckInstance=Verbinding maken met database mislukt. Controleer of de databaseserver actief is (bijvoorbeeld, met mysql / mariadb, kunt u het starten vanaf de opdrachtregel met 'sudo service mysql start'). ErrorFailedToAddContact=Mislukt om contact toe te voegen -ErrorDateMustBeBeforeToday=The date must be lower than today -ErrorDateMustBeInFuture=The date must be greater than today +ErrorDateMustBeBeforeToday=De datum moet eerder zijn dan vandaag +ErrorDateMustBeInFuture=De datum moet later zijn dan vandaag ErrorPaymentModeDefinedToWithoutSetup=Er is een betalingsmodus ingesteld om %s te typen, maar het instellen van de module Factuur is niet voltooid om te definiëren welke informatie moet worden weergegeven voor deze betalingsmodus. ErrorPHPNeedModule=Fout, op uw PHP moet module <b>%s zijn</b> geïnstalleerd om deze functie te gebruiken. ErrorOpenIDSetupNotComplete=U stelt het Dolibarr-configuratiebestand in om OpenID-authenticatie toe te staan, maar de URL van de OpenID-service is niet gedefinieerd als een constante %s @@ -185,7 +188,7 @@ ErrorBadDefinitionOfMenuArrayInModuleDescriptor=Onjuiste definitie van menureeks ErrorSavingChanges=Er is een fout opgetreden bij het opslaan van de wijzigingen ErrorWarehouseRequiredIntoShipmentLine=Magazijn is vereist op de lijn om te verzenden ErrorFileMustHaveFormat=Bestand moet het formaat %s hebben -ErrorFilenameCantStartWithDot=Filename can't start with a '.' +ErrorFilenameCantStartWithDot=Bestandsnaam mag niet beginnen met een '.' ErrorSupplierCountryIsNotDefined=Land voor deze leverancier is niet gedefinieerd. Corrigeer dit eerst. ErrorsThirdpartyMerge=Kan de twee records niet samenvoegen. Verzoek geannuleerd. ErrorStockIsNotEnoughToAddProductOnOrder=De voorraad is niet voldoende om het product %s toe te voegen aan een nieuwe bestelling. @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=U moet kiezen of het artikel een ErrorDiscountLargerThanRemainToPaySplitItBefore=De korting die u probeert toe te passen is groter dan u nog moet betalen. Verdeel de korting eerder in 2 kleinere kortingen. ErrorFileNotFoundWithSharedLink=Bestand is niet gevonden. Mogelijk is de gedeelde sleutel gewijzigd of is het bestand onlangs verwijderd. ErrorProductBarCodeAlreadyExists=De productstreepjescode %s bestaat al op een andere productreferentie. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Merk ook op dat het gebruik van een virtueel product voor het automatisch verhogen / verlagen van subproducten niet mogelijk is wanneer ten minste één subproduct (of subproduct van subproducten) een serie- / partijnummer nodig heeft. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Merk ook op dat het gebruik van kits voor het automatisch verhogen / verlagen van subproducten niet mogelijk is wanneer ten minste één subproduct (of subproduct van subproducten) een serie-/lotnummer nodig heeft. ErrorDescRequiredForFreeProductLines=Beschrijving is verplicht voor lijnen met gratis product ErrorAPageWithThisNameOrAliasAlreadyExists=De pagina / container <strong>%s</strong> heeft dezelfde naam of alternatieve alias die u probeert te gebruiken ErrorDuringChartLoad=Fout bij het laden van een rekeningschema. Als enkele accounts niet werden geladen, kunt u ze nog steeds handmatig invoeren. @@ -240,9 +243,19 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=Geen voorraad voor dit lot ErrorOnlyOneFieldForGroupByIsPossible=Slechts 1 veld voor de 'Groepeer op' is mogelijk (andere worden weggegooid) ErrorTooManyDifferentValueForSelectedGroupBy=Te veel verschillende waarden gevonden (meer dan <b> %s </b>) voor het veld '<b> %s </b>', dus we kunnen het niet gebruiken voor afbeeldingen als '. Het veld 'Goepeer op' is verwijderd. Misschien wil je het gebruiken als een X-as? ErrorReplaceStringEmpty=Fout, de tekenreeks waarin moet worden vervangen, is leeg -ErrorProductNeedBatchNumber=Error, product '<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> +ErrorProductNeedBatchNumber=Fout, product '<b>%s</b>' heeft een lot/serienummer nodig +ErrorProductDoesNotNeedBatchNumber=Fout, product '<b>%s</b>' accepteert geen lot- /serienummer +ErrorFailedToReadObject=Fout, kan object van het type<b>%s</b> niet lezen +ErrorParameterMustBeEnabledToAllwoThisFeature=Fout, parameter <b>%s</b> moet zijn ingeschakeld in<b>conf / conf.php<b>om het gebruik van de opdrachtregelinterface door de interne taakplanner mogelijk te maken +ErrorLoginDateValidity=Fout, deze login valt buiten de geldigheidsperiode +ErrorValueLength=Lengte van veld '<b>%s</b>' moet hoger zijn dan '<b>%s</b>' +ErrorReservedKeyword=Het woord '<b>%s</b>' is een gereserveerd trefwoord +ErrorNotAvailableWithThisDistribution=Niet beschikbaar in deze distributie +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 + # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Uw PHP-parameter upload_max_filesize (%s) is hoger dan PHP-parameter post_max_size (%s). Dit is geen consistente opstelling. WarningPasswordSetWithNoAccount=Er is een wachtwoord ingesteld voor dit lid. Er is echter geen gebruikersaccount gemaakt. Dus dit wachtwoord is opgeslagen maar kan niet worden gebruikt om in te loggen bij Dolibarr. Het kan worden gebruikt door een externe module / interface, maar als u geen gebruikersnaam of wachtwoord voor een lid hoeft aan te maken, kunt u de optie "Beheer een login voor elk lid" in de module-setup van Member uitschakelen. Als u een login moet beheren maar geen wachtwoord nodig heeft, kunt u dit veld leeg houden om deze waarschuwing te voorkomen. Opmerking: e-mail kan ook worden gebruikt als login als het lid aan een gebruiker is gekoppeld. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Uw login is gewijzigd. Om veiligheidsrede WarningAnEntryAlreadyExistForTransKey=Er bestaat al een vermelding voor de vertaalsleutel voor deze taal WarningNumberOfRecipientIsRestrictedInMassAction=Waarschuwing, het aantal verschillende ontvangers is beperkt tot <b>%s</b> wanneer u de massa-acties op lijsten gebruikt WarningDateOfLineMustBeInExpenseReportRange=Waarschuwing, de datum van de regel valt niet binnen het bereik van het onkostenoverzicht +WarningProjectDraft=Het project bevindt zich nog in de conceptmodus. Vergeet niet om het te valideren als u van plan bent taken te gebruiken. WarningProjectClosed=Project is afgesloten. U moet het eerst opnieuw openen. WarningSomeBankTransactionByChequeWereRemovedAfter=Sommige banktransacties werden verwijderd nadat het ontvangstbewijs inclusief deze was gegenereerd. Het aantal cheques en het totaal van de ontvangst kan dus verschillen van het aantal en het totaal in de lijst. -WarningFailedToAddFileIntoDatabaseIndex=Pasop., Kan geen bestandsinvoer toevoegen aan de ECM-database-indextabel +WarningFailedToAddFileIntoDatabaseIndex=Pas op, het toevoegen van bestandsinvoer aan de ECM-database-indextabel is mislukt +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. diff --git a/htdocs/langs/nl_NL/exports.lang b/htdocs/langs/nl_NL/exports.lang index af7fa1643d8..5ea7b305541 100644 --- a/htdocs/langs/nl_NL/exports.lang +++ b/htdocs/langs/nl_NL/exports.lang @@ -110,7 +110,7 @@ CsvOptions=CSV-formaatopties Separator=Veldscheider Enclosure=Stringscheidingsteken SpecialCode=Speciale code -ExportStringFilter=%% laat het vervangen toe van één of meer tekens in de tekst +ExportStringFilter=Gebruik%% voor het vervangen van één of meer tekens in de tekst ExportDateFilter=JJJJ, JJJJMM, JJJJMMDD: filters per jaar/maand/dag <br> JJJJ + JJJJ, JJJJMM + JJJJMM, JJJJMMDD + JJJJMMDD: filters over een periode van jaren/maanden/dagen <br> > JJJJ, >JJJJMM, >JJJJMMDD: filters op alle volgende jaren/maanden/dagen <br><JJJJ, <JJJJMM, <JJJJMMDD: filters op alle voorgaande jaren/maanden/dagen ExportNumericFilter=NNNNN filters met één waarde <br> NNNNN + NNNNN filters over een bereik van waarden <br>< NNNNN filters met lagere waarden <br>> NNNNN filters met hogere waarden ImportFromLine=Importeren vanaf regelnummer @@ -133,3 +133,4 @@ KeysToUseForUpdates=Sleutel (kolom) om te gebruiken voor het <b>bijwerken van</b NbInsert=Aantal ingevoegde regels: %s NbUpdate=Aantal bijgewerkte regels: %s MultipleRecordFoundWithTheseFilters=Meerdere records zijn gevonden met deze filters: %s +StocksWithBatch=Voorraden en locatie (magazijn) van producten met batch- / serienummer diff --git a/htdocs/langs/nl_NL/externalsite.lang b/htdocs/langs/nl_NL/externalsite.lang index e3cb3ba9869..1a4033fb34b 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=Setup link naar externe website -ExternalSiteURL=Externe Site URL -ExternalSiteModuleNotComplete=Module ExternalSite werd niet correct geconfigureerd. +ExternalSiteSetup=Instellingen voor de link naar een externe website +ExternalSiteURL=Externe website URL +ExternalSiteModuleNotComplete=Module Externe Site werd niet correct geconfigureerd. ExampleMyMenuEntry=Mijn menu-item diff --git a/htdocs/langs/nl_NL/ftp.lang b/htdocs/langs/nl_NL/ftp.lang index 14fbe8e04d9..6d3bee48b51 100644 --- a/htdocs/langs/nl_NL/ftp.lang +++ b/htdocs/langs/nl_NL/ftp.lang @@ -1,14 +1,14 @@ # Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Instellen van de FTP-client module -NewFTPClient=Nieuwe FTP-client -FTPArea=FTP gedeelte -FTPAreaDesc=Dit scherm toont een weergave van een FTP-server. -SetupOfFTPClientModuleNotComplete=De installatie van de FTP-cliëntmodule lijkt onvolledig te zijn -FTPFeatureNotSupportedByYourPHP=Uw PHP-installatie ondersteunt niet de juiste FTP-functies -FailedToConnectToFTPServer=Kon geen verbinding maken met de server (FTP-server: %s, poort: %s) -FailedToConnectToFTPServerWithCredentials=Inloggen op FTP met ingestelde gebruikernaam / wachtwoord mislukt +FTPClientSetup=FTP of SFTP Client module setup +NewFTPClient=Nieuwe FTP/SFTP connectie instellen +FTPArea=FTP/SFTP omgeving +FTPAreaDesc=Dit scherm geeft een voorbeeld van een FTP of SFTP server weer +SetupOfFTPClientModuleNotComplete=De setup van de FTP- of SFTP-clientmodule lijkt niet volledig +FTPFeatureNotSupportedByYourPHP=Uw PHP ondersteunt geen FTP- of SFTP-functies +FailedToConnectToFTPServer=Kan geen verbinding maken met server (server%s, poort%s) +FailedToConnectToFTPServerWithCredentials=Inloggen op server met gedefinieerde login / wachtwoord is mislukt FTPFailedToRemoveFile=Bestand <b>%s</b> kon niet verwijderd worden. FTPFailedToRemoveDir=Kan map <b>%s</b> niet verwijderen: controleer de machtigingen en of de map leeg is. FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Kies een FTP-site in het menu ... +ChooseAFTPEntryIntoMenu=Kies een FTP / SFTP-site uit het menu ... FailedToGetFile=%sBestanden niet ontvangen diff --git a/htdocs/langs/nl_NL/hrm.lang b/htdocs/langs/nl_NL/hrm.lang index 00b91ece0f6..479157a79aa 100644 --- a/htdocs/langs/nl_NL/hrm.lang +++ b/htdocs/langs/nl_NL/hrm.lang @@ -1,19 +1,19 @@ # Dolibarr language file - en_US - hrm # Admin -HRM_EMAIL_EXTERNAL_SERVICE=E-mail om externe HRM services te verhinderen. -Establishments=Bedrijven -Establishment=Bedrijf -NewEstablishment=Nieuw bedrijf -DeleteEstablishment=Verwijder bedrijf +HRM_EMAIL_EXTERNAL_SERVICE=E-mail om externe HRM service te verhinderen. +Establishments=Vestigingen +Establishment=Vestiging +NewEstablishment=Nieuwe Vestiging +DeleteEstablishment=Verwijder vestiging ConfirmDeleteEstablishment=Weet u zeker dat u deze vestiging wilt verwijderen? -OpenEtablishment=Open bedrijf -CloseEtablishment=Sluit bedrijf +OpenEtablishment=Open vestiging +CloseEtablishment=Sluit vestiging # Dictionary DictionaryPublicHolidays=HRM - Feestdagen DictionaryDepartment=HRM - Afdelingslijst -DictionaryFunction=HRM - Functies +DictionaryFunction=HRM - Vacatures # Module Employees=Werknemers Employee=Werknemer NewEmployee=Nieuwe werknemer -ListOfEmployees=List of employees +ListOfEmployees=Werknemers lijst diff --git a/htdocs/langs/nl_NL/interventions.lang b/htdocs/langs/nl_NL/interventions.lang index ca03ab08ba8..b984fa9206f 100644 --- a/htdocs/langs/nl_NL/interventions.lang +++ b/htdocs/langs/nl_NL/interventions.lang @@ -1,18 +1,18 @@ # Dolibarr language file - Source file is en_US - interventions Intervention=Interventie Interventions=Interventies -InterventionCard=Interventiedetails +InterventionCard=Interventie details NewIntervention=Nieuwe interventie -AddIntervention=Nieuwe interventie +AddIntervention=Creëer interventie ChangeIntoRepeatableIntervention=Schakel over naar herhaalbare interventie ListOfInterventions=Interventielijst ActionsOnFicheInter=Acties bij interventie LastInterventions=Laatste %s interventies AllInterventions=Alle interventies CreateDraftIntervention=Creëer conceptinterventie -InterventionContact=Interventiecontactpersoon +InterventionContact=Interventie contactpersoon DeleteIntervention=Interventie verwijderen -ValidateIntervention=Inteverntie valideren +ValidateIntervention=Interventie valideren ModifyIntervention=Interventie aanpassen DeleteInterventionLine=Interventieregel verwijderen ConfirmDeleteIntervention=Weet u zeker dat u deze interventie wilt verwijderen? @@ -22,13 +22,13 @@ ConfirmDeleteInterventionLine=Weet u zeker dat u deze interventieregel wilt verw ConfirmCloneIntervention=Weet je zeker dat je deze interventie wilt klonen? NameAndSignatureOfInternalContact=Naam en handtekening van de tussenkomende partij: NameAndSignatureOfExternalContact=Naam en handtekening van klant: -DocumentModelStandard=Standaard modeldocument voor interventies -InterventionCardsAndInterventionLines=Inteventiebladen en -regels +DocumentModelStandard=Standaard model document voor interventies +InterventionCardsAndInterventionLines=Interventies en interventie -regels InterventionClassifyBilled=Classificeer "gefactureerd" InterventionClassifyUnBilled=Classificeer "Nog niet gefactureerd" InterventionClassifyDone=Classificeer "Klaar" StatusInterInvoiced=Gefactureerd -SendInterventionRef=Indiening van de interventie %s +SendInterventionRef=Inzending van de interventie %s SendInterventionByMail=Stuur interventie per e-mail InterventionCreatedInDolibarr=Interventie %s gecreëerd InterventionValidatedInDolibarr=Interventie %s gevalideerd @@ -38,10 +38,10 @@ InterventionClassifiedUnbilledInDolibarr=Interventie %s als nog niet gefactureer InterventionSentByEMail=Interventie %s verzonden per e-mail InterventionDeletedInDolibarr=Interventie %s verwijderd InterventionsArea=Interventies onderdeel -DraftFichinter=Concept-interventies +DraftFichinter=Concept interventies LastModifiedInterventions=Laatste %s aangepaste interventies FichinterToProcess=Interventies om te verwerken -TypeContact_fichinter_external_CUSTOMER=Nabehandeling afnemerscontact +TypeContact_fichinter_external_CUSTOMER=Opvolgen klantcontact PrintProductsOnFichinter=Print ook regels van het type "product" (niet alleen diensten) op de interventiekaart PrintProductsOnFichinterDetails=Interventies gegenereerd op basis van bestellingen UseServicesDurationOnFichinter=Gebruik de duur van de services voor interventies die zijn gegenereerd op basis van bestellingen @@ -51,16 +51,18 @@ InterventionStatistics=Interventie statistieken NbOfinterventions=Aantal interventiekaarten NumberOfInterventionsByMonth=Aantal interventiekaarten per maand (datum van validatie) AmountOfInteventionNotIncludedByDefault=Het bedrag voor interventie is niet standaard opgenomen in de winst (in de meeste gevallen worden de urenstaten gebruikt om de bestede tijd te tellen). Voeg optie PROJECT_INCLUDE_INTERVENTION_AMOUNT_IN_PROFIT toe aan 1 in home-setup-diversen om ze op te nemen. -InterId=Interventie-ID +InterId=Interventie ID InterRef=Interventie ref. InterDateCreation=Aanmaakdatum interventie InterDuration=Interventieduur InterStatus=Interventiestatus InterNote=Opmerking interventie -InterLine=Lijn van interventie -InterLineId=Regel ID-interventie +InterLine=Lijn/regel van interventie +InterLineId=Regel ID interventie InterLineDate=Datum regel interventie InterLineDuration=Duur regel interventie InterLineDesc=Opmerking regel interventie RepeatableIntervention=Sjabloon voor interventie ToCreateAPredefinedIntervention=Als u een vooraf gedefinieerde of terugkerende interventie wilt maken, maakt u een gemeenschappelijke interventie en converteert u deze naar een interventiesjabloon +Reopen=Heropenen +ConfirmReopenIntervention=Weet u zeker dat u de interventie <b>%s</b> weer wilt openen? diff --git a/htdocs/langs/nl_NL/intracommreport.lang b/htdocs/langs/nl_NL/intracommreport.lang index e30b5fe8ff2..f7a16dc291f 100644 --- a/htdocs/langs/nl_NL/intracommreport.lang +++ b/htdocs/langs/nl_NL/intracommreport.lang @@ -31,10 +31,10 @@ IntracommReportTitle=Voorbereiding van een XML-bestand in ProDouane formaat # List IntracommReportList=Lijst met gegenereerde aangiften -IntracommReportNumber=Numero of declaration -IntracommReportPeriod=Period of nalysis +IntracommReportNumber=Nummer van aangifte +IntracommReportPeriod=Analyseperiode IntracommReportTypeDeclaration=Type aangifte -IntracommReportDownload=download XML file +IntracommReportDownload=download XML-bestand # Invoice IntracommReportTransportMode=Transport methode diff --git a/htdocs/langs/nl_NL/languages.lang b/htdocs/langs/nl_NL/languages.lang index e6b9fa70658..4d1ee5150ff 100644 --- a/htdocs/langs/nl_NL/languages.lang +++ b/htdocs/langs/nl_NL/languages.lang @@ -1,11 +1,11 @@ # Dolibarr language file - Source file is en_US - languages -Language_am_ET=Ethiopian +Language_am_ET=Ethiopisch Language_ar_AR=Arabisch Language_ar_EG=Arabisch (Egyptisch) Language_ar_SA=Arabisch -Language_az_AZ=Azerbaijani +Language_az_AZ=Azerbeidzjaans Language_bn_BD=Bengaals -Language_bn_IN=Bengali (India) +Language_bn_IN=Bengaals (India) Language_bg_BG=Bulgaars Language_bs_BA=Bosnisch Language_ca_ES=Catalaans @@ -40,7 +40,7 @@ Language_es_PA=Spaans (Panama) Language_es_PY=Spaans (Paraguay) Language_es_PE=Spaans (Peru) Language_es_PR=Spaans (Puerto Rico) -Language_es_US=Spanish (USA) +Language_es_US=Spaans (VS) Language_es_UY=Spaans (Uruguay) Language_es_GT=Spaans (Guatemala) Language_es_VE=Spaans (Venezuela) @@ -54,11 +54,11 @@ Language_fr_CH=Frans (Zwitserland) Language_fr_CI=Frans (Ivoorkust) Language_fr_CM=Frans (Kameroen) Language_fr_FR=Frans (Frankrijk) -Language_fr_GA=French (Gabon) +Language_fr_GA=Frans (Gabon) Language_fr_NC=Frans (Nieuw-Caledonië) Language_fr_SN=Frans (Senegal) Language_fy_NL=Frisian -Language_gl_ES=Galician +Language_gl_ES=Galicisch Language_he_IL=Hebreeuws Language_hi_IN=Hindi (India) Language_hr_HR=Kroatisch @@ -78,7 +78,7 @@ Language_lv_LV=Lets Language_mk_MK=Macedonisch Language_mn_MN=Mongools Language_nb_NO=Noors (Bokmål) -Language_ne_NP=Nepali +Language_ne_NP=Nepalees Language_nl_BE=Nederlands (België) Language_nl_NL=Nederlands Language_pl_PL=Pools diff --git a/htdocs/langs/nl_NL/loan.lang b/htdocs/langs/nl_NL/loan.lang index 82892fa1a0f..82c7adbae4e 100644 --- a/htdocs/langs/nl_NL/loan.lang +++ b/htdocs/langs/nl_NL/loan.lang @@ -23,9 +23,9 @@ AddLoan=Aanmaken lening FinancialCommitment=Financiële verplichting InterestAmount=Rente CapitalRemain=Saldo kapitaal -TermPaidAllreadyPaid = This term is allready paid -CantUseScheduleWithLoanStartedToPaid = Can't use scheduler for a loan with payment started -CantModifyInterestIfScheduleIsUsed = You can't modify interest if you use schedule +TermPaidAllreadyPaid = Deze termijn is al betaald +CantUseScheduleWithLoanStartedToPaid = Kan planner niet gebruiken voor een lening waarvan de betaling is gestart +CantModifyInterestIfScheduleIsUsed = U kunt de rente niet wijzigen indien u een schema gebruikt # Admin ConfigLoan=Configuratie van de module lening LOAN_ACCOUNTING_ACCOUNT_CAPITAL=Standaard grootboekrekening kapitaal diff --git a/htdocs/langs/nl_NL/mails.lang b/htdocs/langs/nl_NL/mails.lang index 0d1eca7a0ff..84dbbc2a4a2 100644 --- a/htdocs/langs/nl_NL/mails.lang +++ b/htdocs/langs/nl_NL/mails.lang @@ -92,6 +92,7 @@ MailingModuleDescEmailsFromUser=E-mails door gebruiker opgemaakt MailingModuleDescDolibarrUsers=Gebruikers met e-mails MailingModuleDescThirdPartiesByCategories=Derden (op categorieën) SendingFromWebInterfaceIsNotAllowed=Verzenden vanuit de web interface is niet toegestaan. +EmailCollectorFilterDesc=Alle filters moeten overeenkomen om een e-mail te kunnen verzamelen # Libelle des modules de liste de destinataires mailing LineInFile=Regel %s in bestand @@ -129,8 +130,8 @@ NotificationsAuto=Automatisch meldingen NoNotificationsWillBeSent=Er staan geen e-mail kennisgevingen gepland voor dit type evenement en bedrijf ANotificationsWillBeSent=1 automatische notificatie zal worden verstuurd per e-mail SomeNotificationsWillBeSent=%s automatische notificatie zal per e-mail worden verstuurd -AddNewNotification=Activeer een nieuw doel / evenement voor e-mailmeldingen -ListOfActiveNotifications=Lijst met alle actieve doelen / evenementen voor e-mail melding +AddNewNotification=Abonneer u op een nieuwe automatische e-mailmelding (doel/gebeurtenis) +ListOfActiveNotifications=Lijst van alle actieve abonnementen (doelen/evenementen) voor automatische e-mailmelding ListOfNotificationsDone=Lijst met alle automatisch verstuurde e-mail kennisgevingen MailSendSetupIs=Configuratie van e-mailverzending is ingesteld op '%s'. Deze modus kan niet worden gebruikt om bulk e-mails te verzenden. MailSendSetupIs2=Ga eerst met een beheerdersaccount naar menu %s Home - Set-up - E-mails%s om de parameter <strong>'%s'</strong> te wijzigen om de modus '%s' te gebruiken. Met deze modus kunt u de installatie van de SMTP-server van uw internetprovider openen en de functie Bulk e-mails gebruiken. @@ -141,7 +142,7 @@ UseFormatFileEmailToTarget=Het geïmporteerde bestand moet de indeling <strong>e UseFormatInputEmailToTarget=Voer een string in met het formaat <strong>e-mail; naam; voornaam; andere</strong> MailAdvTargetRecipients=Ontvangers (geavanceerde selectie) AdvTgtTitle=Vul invoervelden in om de derde partijen of contacten / adressen voor te selecteren -AdvTgtSearchTextHelp=Gebruik %% als jokertekens. Om bijvoorbeeld alle items zoals <b>jean, joe, jim te vinden</b> , kun je <b>j%% invoeren</b> , je kunt ook ; gebruiken als scheidingsteken voor waarde en gebruik ! voor behalve deze waarde. Voorbeeld <b>jean; joe; jim%%;! Jimo;! Jima%</b> richt zich op alle jean, joe, start met jim maar niet jimo en niet alles wat met jima begint +AdvTgtSearchTextHelp=Gebruik %% als joker-teken. Om bijvoorbeeld alle items zoals <b>jean, joe, jim</b> te vinden, kun je <b> j%%</b> invoeren Je kunt ook een ; gebruiken als scheidingsteken voor de waarde, en gebruik ! alleen hiervoor. Voorbeeld<b>jean;joe;jim%%;!Jimo;!Jima%%</b> zal alle jean, joe, beginnen met jim maar niet met jimo en niet alles dat begint met jima AdvTgtSearchIntHelp=Gebruik interval om de waarde int of float te selecteren AdvTgtMinVal=Minimum waarde AdvTgtMaxVal=Maximum waarde @@ -174,3 +175,5 @@ Answered=Beantwoord IsNotAnAnswer=Is geen antwoord (initiële e-mail) IsAnAnswer=Is een antwoord van een initiële e-mail RecordCreatedByEmailCollector=Record aangemaakt door de E-mail Collector %s van e-mail %s +DefaultBlacklistMailingStatus=Default contact status for refuse bulk emailing +DefaultStatusEmptyMandatory=Empty but mandatory diff --git a/htdocs/langs/nl_NL/main.lang b/htdocs/langs/nl_NL/main.lang index 34b50571fb7..e55cb6e1942 100644 --- a/htdocs/langs/nl_NL/main.lang +++ b/htdocs/langs/nl_NL/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=Geen sjabloon beschikbaar voor dit e-mailtype AvailableVariables=Beschikbare substitutievariabelen NoTranslation=Geen vertaling Translation=Vertaling +CurrentTimeZone=Huidige tijdzone (server) EmptySearchString=Voer geen lege zoekcriteria in +EnterADateCriteria=Voer een datumcriterium in NoRecordFound=Geen item gevonden NoRecordDeleted=Geen record verwijderd NotEnoughDataYet=Niet genoeg data @@ -85,6 +87,8 @@ FileWasNotUploaded=Een bestand is geselecteerd als bijlage, maar is nog niet ge NbOfEntries=Aantal inzendingen GoToWikiHelpPage=Lees de online hulptekst (internettoegang vereist) GoToHelpPage=Lees de hulptekst +DedicatedPageAvailable=Er is een speciale help-pagina die betrekking heeft op uw huidige scherm +HomePage=Startpagina RecordSaved=Item opgeslagen RecordDeleted=Item verwijderd RecordGenerated=Record gegenereerd @@ -197,7 +201,7 @@ ReOpen=Heropenen Upload=Uploaden ToLink=Link Select=Selecteer -SelectAll=Select all +SelectAll=Selecteer alles Choose=Kies Resize=Schalen ResizeOrCrop=Formaat wijzigen of bijsnijden @@ -220,6 +224,7 @@ Value=Waarde PersonalValue=Persoonlijke waarde NewObject=Nieuw %s NewValue=Nieuwe waarde +OldValue=Old value %s CurrentValue=Huidige waarde Code=Code Type=Type @@ -267,10 +272,10 @@ DateStart=Begindatum DateEnd=Einddatum DateCreation=Aanmaakdatum DateCreationShort=Aanmaakdatum -IPCreation=Creation IP +IPCreation=Creatie IP DateModification=Wijzigingsdatum DateModificationShort=Wijzigingsdatum -IPModification=Modification IP +IPModification=Wijziging IP DateLastModification=Laatste wijzigingsdatum DateValidation=Validatiedatum DateClosing=Sluitingsdatum @@ -324,7 +329,7 @@ Morning=Ochtend Afternoon=Namiddag Quadri=Trimester MonthOfDay=Maand van de dag -DaysOfWeek=Days of week +DaysOfWeek=Dagen van de week HourShort=U MinuteShort=mn Rate=Tarief @@ -362,7 +367,7 @@ Amount=Hoeveelheid AmountInvoice=Factuurbedrag AmountInvoiced=Gefactureerd bedrag AmountInvoicedHT=Gefactureerd bedrag (excl. BTW) -AmountInvoicedTTC=Amount invoiced (inc. tax) +AmountInvoicedTTC=Gefactureerd bedrag (incl. BTW) AmountPayment=Betalingsbedrag AmountHTShort=Bedrag (excl.) AmountTTCShort=Bedrag met BTW @@ -375,7 +380,7 @@ MulticurrencyPaymentAmount=Betalingsbedrag, originele valuta MulticurrencyAmountHT=Bedrag (excl. BTW), oorspronkelijke valuta MulticurrencyAmountTTC=Bedrag (incl. BTW), oorspronkelijke valuta MulticurrencyAmountVAT=BTW bedrag, oorspronkelijke valuta -MulticurrencySubPrice=Amount sub price multi currency +MulticurrencySubPrice=Bedrag subprijs in meerdere valuta AmountLT1=Bedrag tax 2 AmountLT2=Bedrag tax 3 AmountLT1ES=Bedrag RE @@ -433,6 +438,7 @@ RemainToPay=Restant te betalen Module=Module/Applicatie Modules=Modules / Applicaties Option=Optie +Filters=Filters List=Lijstoverzicht FullList=Volledig overzicht FullConversation=Volledig gesprek @@ -494,7 +500,7 @@ By=Door From=Van FromDate=Van FromLocation=Van -at=at +at=Bij to=t/m To=t/m and=en @@ -517,7 +523,7 @@ Draft=Concept Drafts=Concepten StatusInterInvoiced=gefactureerd Validated=Gevalideerd -ValidatedToProduce=Validated (To produce) +ValidatedToProduce=Gevalideerd (om te produceren) Opened=Open OpenAll=Open (alles) ClosedAll=Gesloten (alles) @@ -650,6 +656,7 @@ SupplierPreview=Voorbeeld van leverancier ShowCustomerPreview=Toon afnemersvoorbeeldweergave ShowSupplierPreview=Laat voorbeeld leverancier zien RefCustomer=Referentie afnemer +InternalRef=Internal ref. Currency=Valuta InfoAdmin=Informatie voor beheerders Undo=Ongedaan maken @@ -698,7 +705,7 @@ Method=Methode Receive=Ontvangen CompleteOrNoMoreReceptionExpected=Voltooid of niets meer verwacht ExpectedValue=Verwachte waarde -ExpectedQty=Expected Qty +ExpectedQty=Verwacht aantal PartialWoman=Gedeeltelijke TotalWoman=Totaal NeverReceived=Nooit ontvangen @@ -715,7 +722,7 @@ MenuECM=Documenten MenuAWStats=AWStats MenuMembers=Leden MenuAgendaGoogle=Google-agenda -MenuTaxesAndSpecialExpenses=Taxes | Special expenses +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 CurrentUserLanguage=Huidige taal @@ -738,7 +745,7 @@ Page=Pagina Notes=Notitie AddNewLine=Voeg nieuwe regel toe AddFile=Voeg bestand toe -FreeZone=Free-text product +FreeZone=Product met vrije tekst FreeLineOfType=Vrije omschrijving, type: CloneMainAttributes=Kloon het object met de belangrijkste kenmerken ReGeneratePDF=PDF opnieuw genereren @@ -888,8 +895,8 @@ Miscellaneous=Diversen Calendar=Kalender GroupBy=Groeperen op ... ViewFlatList=Weergeven als lijst -ViewAccountList=View ledger -ViewSubAccountList=View subaccount ledger +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) @@ -958,39 +965,39 @@ ShortThursday=Do ShortFriday=Vr ShortSaturday=Za ShortSunday=Zo -one=one -two=two -three=three -four=four -five=five -six=six -seven=seven -eight=eight -nine=nine -ten=ten -eleven=eleven -twelve=twelve -thirteen=thirdteen -fourteen=fourteen -fifteen=fifteen -sixteen=sixteen -seventeen=seventeen -eighteen=eighteen -nineteen=nineteen -twenty=twenty -thirty=thirty -forty=forty -fifty=fifty -sixty=sixty -seventy=seventy -eighty=eighty -ninety=ninety -hundred=hundred -thousand=thousand -million=million -billion=billion -trillion=trillion -quadrillion=quadrillion +one=één +two=twee +three=drie +four=vier +five=vijf +six=zes +seven=zeven +eight=acht +nine=negen +ten=tien +eleven=elf +twelve=twaalf +thirteen=dertien +fourteen=veertien +fifteen=vijftien +sixteen=zestien +seventeen=zeventien +eighteen=achttien +nineteen=negentien +twenty=twintig +thirty=dertig +forty=veertig +fifty=vijftig +sixty=zestig +seventy=zeventig +eighty=tachtig +ninety=negentig +hundred=honderd +thousand=duizend +million=miljoen +billion=miljard +trillion=biljoen +quadrillion=biljard SelectMailModel=Selecteer een e-mail template SetRef=Stel ref in Select2ResultFoundUseArrows=Resultaten gevonden. Gebruik de pijlen om te selecteren. @@ -1021,7 +1028,7 @@ SearchIntoCustomerShipments=Klantzendingen SearchIntoExpenseReports=Onkostennota's SearchIntoLeaves=Vertrekken SearchIntoTickets=Tickets -SearchIntoCustomerPayments=Customer payments +SearchIntoCustomerPayments=Betalingen door klanten SearchIntoVendorPayments=Leveranciersbetalingen SearchIntoMiscPayments=Diverse betalingen CommentLink=Opmerkingen @@ -1092,18 +1099,24 @@ NotUsedForThisCustomer=Niet gebruikt voor deze klant AmountMustBePositive=Bedrag moet positief zijn ByStatus=Op status InformationMessage=Informatie -Used=Used -ASAP=As Soon As Possible -CREATEInDolibarr=Record %s 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=Gebruikt +ASAP=Zo spoedig mogelijk +CREATEInDolibarr=Record %s aangemaakt +MODIFYInDolibarr=Record %s gewijzigd +DELETEInDolibarr=Record %s verwijderd +VALIDATEInDolibarr=Record %s gevalideerd +APPROVEDInDolibarr=Record %s goedgekeurd +DefaultMailModel=Standaard mailmodel +PublicVendorName=Openbare naam van de leverancier DateOfBirth=Geboortedatum -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=Beveiligingstoken is verlopen, dus actie is geannuleerd. Probeer het a.u.b. opnieuw. +UpToDate=Bijgewerkt +OutOfDate=Verouderd +EventReminder=Herinnering voor evenement +UpdateForAllLines=Update voor alle lijnen +OnHold=In de wacht +Civility=Civility +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 diff --git a/htdocs/langs/nl_NL/members.lang b/htdocs/langs/nl_NL/members.lang index 405b9331dba..ee9c303d352 100644 --- a/htdocs/langs/nl_NL/members.lang +++ b/htdocs/langs/nl_NL/members.lang @@ -19,8 +19,8 @@ MembersCards=Visitekaarten van leden MembersList=Ledenlijst MembersListToValid=Lijst van conceptleden (te valideren) MembersListValid=Lijst van geldige leden -MembersListUpToDate=List of valid members with up-to-date subscription -MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListUpToDate=Geldige leden met een up-to-date abonnement +MembersListNotUpToDate=Geldige leden met een verouderd abonnement MembersListResiliated=Lijst verwijderde leden MembersListQualified=Lijst van gekwalificeerde leden MenuMembersToValidate=Conceptleden @@ -32,7 +32,7 @@ DateSubscription=Inschrijvingsdatum DateEndSubscription=Einddatum abonnement EndSubscription=Einde abonnement SubscriptionId=Inschrijvings-ID -WithoutSubscription=Without subscription +WithoutSubscription=Zonder abonnement MemberId=Lid ID NewMember=Nieuw lid MemberType=Type lid @@ -80,7 +80,7 @@ DeleteType=Verwijderen VoteAllowed=Stemming toegestaan Physical=Fysiek Moral=Moreel -MorAndPhy=Moral and Physical +MorAndPhy=Moreel en fysiek Reenable=Opnieuw inschakelen ResiliateMember=Verwijder een lid ConfirmResiliateMember=Weet je zeker dat je dit lidmaatschap wilt beëindigen? @@ -116,7 +116,7 @@ SendingEmailOnMemberValidation=E-mail verzenden bij validatie van nieuwe leden SendingEmailOnNewSubscription=E-mail verzenden bij nieuw abonnement SendingReminderForExpiredSubscription=Herinnering verzenden voor verlopen abonnementen SendingEmailOnCancelation=Verzenden van e-mail bij annulering -SendingReminderActionComm=Sending reminder for agenda event +SendingReminderActionComm=Herinnering verzenden voor agenda-evenement # Topic of email templates YourMembershipRequestWasReceived=Je lidmaatschap is ontvangen. YourMembershipWasValidated=Uw lidmaatschap is gevalideerd @@ -167,7 +167,7 @@ MembersStatisticsByState=Leden statistieken per staat / provincie MembersStatisticsByTown=Leden van de statistieken per gemeente MembersStatisticsByRegion=Leden statistieken per regio NbOfMembers=Aantal leden -NbOfActiveMembers=Number of current active members +NbOfActiveMembers=Aantal huidige actieve leden NoValidatedMemberYet=Geen gevalideerde leden gevonden MembersByCountryDesc=Dit scherm tonen statistieken over de leden door de landen. Grafisch is echter afhankelijk van Google online grafiek service en is alleen beschikbaar als een internet verbinding is werkt. MembersByStateDesc=Dit scherm tonen statistieken over de leden door de staat / provincies / kanton. @@ -177,7 +177,7 @@ MenuMembersStats=Statistiek LastMemberDate=Laatste liddatum LatestSubscriptionDate=Laatste abonnementsdatum MemberNature=Aard van het lid -MembersNature=Nature of members +MembersNature=Aard van de leden Public=Informatie zijn openbaar (no = prive) NewMemberbyWeb=Nieuw lid toegevoegd. In afwachting van goedkeuring NewMemberForm=Nieuw lid formulier diff --git a/htdocs/langs/nl_NL/modulebuilder.lang b/htdocs/langs/nl_NL/modulebuilder.lang index 1b4a871f69f..767bee4b08a 100644 --- a/htdocs/langs/nl_NL/modulebuilder.lang +++ b/htdocs/langs/nl_NL/modulebuilder.lang @@ -40,6 +40,7 @@ PageForCreateEditView=PHP-pagina om een ​​record te maken / bewerken / bekij PageForAgendaTab=PHP-pagina voor evenemententabblad PageForDocumentTab=PHP-pagina voor documenttabblad PageForNoteTab=PHP-pagina voor notitietabblad +PageForContactTab=PHP-pagina voor tabblad contact PathToModulePackage=Pad naar zip van module / applicatiepakket PathToModuleDocumentation=Pad naar bestand van module / applicatiedocumentatie (%s) SpaceOrSpecialCharAreNotAllowed=Spaties of speciale tekens zijn niet toegestaan. @@ -77,7 +78,7 @@ IsAMeasure=Is een maat DirScanned=Directory gescand NoTrigger=Geen trigger NoWidget=Geen widget -GoToApiExplorer=Ga naar API explorer +GoToApiExplorer=API-verkenner ListOfMenusEntries=Lijst met menu-items ListOfDictionariesEntries=Lijst met woordenboekingangen ListOfPermissionsDefined=Lijst met gedefinieerde machtigingen @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=Als u kennis van SQL en PHP hebt, kunt u de wizard voor SeeTopRightMenu=Zien <span class="fa fa-bug"></span> in het menu rechtsboven AddLanguageFile=Taalbestand toevoegen YouCanUseTranslationKey=U kunt hier een sleutel gebruiken die de vertaalsleutel is die in het taalbestand is gevonden (zie tabblad "Talen") -DropTableIfEmpty=(Verwijder tabel indien leeg) +DropTableIfEmpty=(Vernietig de tabel als deze leeg is) TableDoesNotExists=Tabel %s bestaat niet TableDropped=Tabel %s verwijderd InitStructureFromExistingTable=Bouw de reeks structuurstructuren van een bestaande tabel @@ -126,7 +127,6 @@ UseSpecificEditorURL = Gebruik een specifieke editor-URL UseSpecificFamily = Gebruik een specifieke familie UseSpecificAuthor = Gebruik een specifieke auteur UseSpecificVersion = Gebruik een specifieke eerste versie -ModuleMustBeEnabled=De module / toepassing moet eerst worden ingeschakeld IncludeRefGeneration=De referentie van het object moet automatisch worden gegenereerd IncludeRefGenerationHelp=Vink dit aan als u code wilt opnemen om het genereren van de referentie automatisch te beheren IncludeDocGeneration=Ik wil enkele documenten genereren van het object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type velden: <br> varchar (99), dubbel (24,8), real, tekst, htm AsciiToHtmlConverter=Ascii naar HTML converter AsciiToPdfConverter=Ascii naar PDF converter TableNotEmptyDropCanceled=Tabel is niet leeg. Drop is geannuleerd. +ModuleBuilderNotAllowed=De modulebouwer is beschikbaar maar niet toegestaan voor uw gebruiker. diff --git a/htdocs/langs/nl_NL/mrp.lang b/htdocs/langs/nl_NL/mrp.lang index d6ad354427d..ec0e4244c19 100644 --- a/htdocs/langs/nl_NL/mrp.lang +++ b/htdocs/langs/nl_NL/mrp.lang @@ -1,6 +1,6 @@ Mrp=Productieorders -MOs=Manufacturing orders -ManufacturingOrder=Manufacturing Order +MOs=Productieopdrachten +ManufacturingOrder=Productieorder MRPDescription=Module om productie- en productieorders (PO) te beheren. MRPArea=MRP-gebied MrpSetupPage=Installatie van module MRP @@ -76,5 +76,29 @@ ProductsToProduce=Te produceren producten UnitCost=De kosten per eenheid TotalCost=Totale prijs BOMTotalCost=De kosten voor het produceren van deze stuklijst op basis van de kosten van elke hoeveelheid en elk te consumeren product (gebruik kostprijs indien gedefinieerd, anders gemiddelde gewogen prijs indien gedefinieerd, anders de beste aankoopprijs) -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 +GoOnTabProductionToProduceFirst=U moet eerst de productie hebben gestart om een Productieorder te sluiten (zie tabblad '%s'). Maar u kunt het annuleren. +ErrorAVirtualProductCantBeUsedIntoABomOrMo=Een kit kan niet worden gebruikt in een stuklijst of een MO +Workstation=Workstation +Workstations=Workstations +WorkstationsDescription=Workstations management +WorkstationSetup = Workstations setup +WorkstationSetupPage = Workstations setup page +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/nl_NL/multicurrency.lang b/htdocs/langs/nl_NL/multicurrency.lang index 342ced55f1b..dcf54838389 100644 --- a/htdocs/langs/nl_NL/multicurrency.lang +++ b/htdocs/langs/nl_NL/multicurrency.lang @@ -20,3 +20,19 @@ MulticurrencyPaymentAmount=Betalingsbedrag, originele valuta AmountToOthercurrency=Bedrag in (in valuta van ontvangende account) CurrencyRateSyncSucceed=Synchronisatie van valutakoersen is geslaagd MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT=Gebruik de valuta van het document voor online betalingen +TabTitleMulticurrencyRate=Koerslijst +ListCurrencyRate=Lijst met wisselkoersen voor de valuta +CreateRate=Koers aanmaken +FormCreateRate=Aanmaken koers +FormUpdateRate=Aanpassen koers +successRateCreate=Koers voor valuta %s is toegevoegd aan de database +ConfirmDeleteLineRate=Weet u zeker dat u de %s-koers voor valuta %s op %s-datum wilt verwijderen? +DeleteLineRate=Opschonen koers +successRateDelete=Koers verwijderd +errorRateDelete=Fout bij het verwijderen van de koers +successUpdateRate=Wijziging aangebracht +ErrorUpdateRate=Fout bij het wijzigen van de koers +Codemulticurrency=valuta code +UpdateRate=wijzig de koers +CancelUpdate=annuleren +NoEmptyRate=Het koersveld mag niet leeg zijn diff --git a/htdocs/langs/nl_NL/orders.lang b/htdocs/langs/nl_NL/orders.lang index 63befed613c..9ec42fd206a 100644 --- a/htdocs/langs/nl_NL/orders.lang +++ b/htdocs/langs/nl_NL/orders.lang @@ -87,7 +87,7 @@ NbOfOrders=Aantal opdrachten OrdersStatistics=Opdrachtenstatistieken OrdersStatisticsSuppliers=Inkooporder statistieken NumberOfOrdersByMonth=Aantal opdrachten per maand -AmountOfOrdersByMonthHT=Aantal bestellingen per maand (excl. BTW) +AmountOfOrdersByMonthHT=Totaalbedrag bestellingen per maand (excl. BTW) ListOfOrders=Opdrachtenlijst CloseOrder=Opdracht sluiten ConfirmCloseOrder=Weet u zeker dat u deze bestelling wilt instellen op afgeleverd? Zodra een bestelling is afgeleverd, kan deze worden ingesteld op gefactureerd. diff --git a/htdocs/langs/nl_NL/other.lang b/htdocs/langs/nl_NL/other.lang index d6bbceb831c..3b019f24cb7 100644 --- a/htdocs/langs/nl_NL/other.lang +++ b/htdocs/langs/nl_NL/other.lang @@ -5,8 +5,6 @@ Tools=Gereedschap TMenuTools=Gereedschap ToolsDesc=Alle tools die niet in andere menu-items zijn opgenomen, zijn hier gegroepeerd. <br> Alle tools zijn toegankelijk via het linkermenu. Birthday=Verjaardag -BirthdayDate=Geboorte datum -DateToBirth=Geboortedatum BirthdayAlertOn=Verjaardagskennisgeving actief BirthdayAlertOff=Verjaardagskennisgeving inactief TransKey=Vertaling van de sleutel TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Vorige maand (nummer 1-12) van factuurdatum TextPreviousMonthOfInvoice=Voorgaande maand (tekst) van factuurdatum. NextMonthOfInvoice=Volgende maand (nummer 1-12) van factuurdatum TextNextMonthOfInvoice=Volgende maand (tekst) van factuurdatum +PreviousMonth=Vorige maand +CurrentMonth=Deze maand ZipFileGeneratedInto=ZIP bestand aangemaakt in <b>%s</b>. DocFileGeneratedInto=Doc-bestand aangemaakt in <b>%s</b>. JumpToLogin=Verbinding verbroken. Ga naar het loginscherm... @@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Onkosten rapport gevalideerd (goedkeuring vereist Notify_EXPENSE_REPORT_APPROVE=Onkosten rapport goedgekeurd Notify_HOLIDAY_VALIDATE=Verlofaanvraag gevalideerd (goedkeuring vereist) Notify_HOLIDAY_APPROVE=Verzoek goedgekeurd laten +Notify_ACTION_CREATE=Added action to Agenda SeeModuleSetup=Zie setup van module %s NbOfAttachedFiles=Aantal bijgevoegde bestanden / documenten TotalSizeOfAttachedFiles=Totale omvang van de bijgevoegde bestanden / documenten @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__ (Hallo) __ Vind verzending __REF__ bijgevoe PredefinedMailContentSendFichInter=__ (Hallo) __ Zoek interventie __REF__ bijgevoegd __ (Met vriendelijke groet) __ __USER_SIGNATURE__ PredefinedMailContentLink=Indien u nog niet heeft betaald kunt u op de onderstaande link klikken. %s PredefinedMailContentGeneric=__ (Hallo) __ __ (Met vriendelijke groet) __ __USER_SIGNATURE__ +PredefinedMailContentSendActionComm=Herinnering "__EVENT_LABEL__" op __EVENT_DATE__ om __EVENT_TIME__ <br> <br> Dit is een automatisch bericht, gelieve niet te antwoorden. DemoDesc=Dolibarr is een compacte ERP / CRM die verschillende bedrijfsmodules ondersteunt. Een demo met alle modules heeft geen zin omdat dit scenario zich nooit voordoet (enkele honderden beschikbaar). Er zijn dus verschillende demoprofielen beschikbaar. ChooseYourDemoProfil=Kies het demoprofiel dat het beste bij u past ... ChooseYourDemoProfilMore=... of bouw je eigen profiel <br> (handmatige moduleselectie) @@ -214,6 +216,7 @@ EMailTextExpenseReportValidated=Onkostendeclaratie %s is gevalideerd. EMailTextExpenseReportApproved=Onkostendeclaratie %s is goedgekeurd. EMailTextHolidayValidated=Verlofaanvraag %s is gevalideerd. EMailTextHolidayApproved=Verlofaanvraag %s is goedgekeurd. +EMailTextActionAdded=The action %s has been added to the Agenda. ImportedWithSet=Invoer dataset DolibarrNotification=Automatische kennisgeving ResizeDesc=Voer een nieuwe breedte <b>of</b> nieuwe hoogte in. Verhoudingen zullen intact blijven tijdens het schalen @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact / adres gecreëerd door e-mailverzamelaar ProjectCreatedByEmailCollector=Project gemaakt door e-mailverzamelaar uit e-mail MSGID %s TicketCreatedByEmailCollector=Ticket gemaakt door e-mailverzamelaar vanuit e-mail MSGID %s OpeningHoursFormatDesc=Gebruik a - om de openings- en sluitingsuren te scheiden. <br> Gebruik een spatie om verschillende bereiken in te voeren. <br> Voorbeeld: 8-12 14-18 +PrefixSession=Voorloper sessie-ID ##### Export ##### ExportsArea=Uitvoeroverzicht @@ -278,9 +282,9 @@ LinesToImport=Regels om te importeren MemoryUsage=Geheugengebruik RequestDuration=Duur van het verzoek -ProductsPerPopularity=Products/Services by popularity +ProductsPerPopularity=Producten/diensten op populariteit PopuProp=Producten / diensten op populariteit in voorstellen PopuCom=Producten / services op populariteit in Orders ProductStatistics=Producten / diensten Statistieken NbOfQtyInOrders=Aantal in bestellingen -SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... +SelectTheTypeOfObjectToAnalyze=Selecteer het type object dat u wilt analyseren ... diff --git a/htdocs/langs/nl_NL/products.lang b/htdocs/langs/nl_NL/products.lang index 27d14439fea..0e20bb8eea2 100644 --- a/htdocs/langs/nl_NL/products.lang +++ b/htdocs/langs/nl_NL/products.lang @@ -104,24 +104,25 @@ SetDefaultBarcodeType=Stel type streepjescode in BarcodeValue=Waarde streepjescode NoteNotVisibleOnBill=Notitie (niet zichtbaar op facturen, offertes, etc) ServiceLimitedDuration=Als product een dienst is met een beperkte houdbaarheid: -FillWithLastServiceDates=Fill with last service line dates +FillWithLastServiceDates=Vul de data van de laatste servicelijn in MultiPricesAbility=Meerdere prijssegmenten per product / dienst (elke klant bevindt zich in één prijssegment) MultiPricesNumPrices=Aantal prijzen DefaultPriceType=Basisprijzen per standaard (met versus zonder belasting) bij het toevoegen van nieuwe verkoopprijzen -AssociatedProductsAbility=Activate kits (virtual products) +AssociatedProductsAbility=Enable Kits (set of several products) +VariantsAbility=Varianten inschakelen (variaties van producten, bijvoorbeeld kleur, maat) AssociatedProducts=Kits -AssociatedProductsNumber=Number of products composing this kit +AssociatedProductsNumber=Aantal producten waaruit deze kit bestaat ParentProductsNumber=Aantal ouder pakket producten ParentProducts=Gerelateerde producten -IfZeroItIsNotAVirtualProduct=If 0, this product is not a kit -IfZeroItIsNotUsedByVirtualProduct=If 0, this product is not used by any kit +IfZeroItIsNotAVirtualProduct=Indien 0, is dit product geen kit +IfZeroItIsNotUsedByVirtualProduct=Indien 0, wordt dit product door geen enkele kit gebruikt KeywordFilter=Trefwoord filter CategoryFilter=Categorie filter ProductToAddSearch=Zoek product om toe te voegen NoMatchFound=Geen resultaten gevonden ListOfProductsServices=Producten/diensten lijst -ProductAssociationList=List of products/services that are component(s) of this kit -ProductParentList=List of kits with this product as a component +ProductAssociationList=Lijst met producten/diensten die onderdeel zijn van deze kit +ProductParentList=Lijst van kits met dit product als onderdeel ErrorAssociationIsFatherOfThis=Een van de geselecteerde product is de ouder van het huidige product DeleteProduct=Verwijderen een product / dienst ConfirmDeleteProduct=Weet u zeker dat u dit product / deze dienst wilt verwijderen? @@ -167,11 +168,13 @@ BuyingPrices=Inkoop prijzen CustomerPrices=Consumenten prijzen SuppliersPrices=Prijzen van leveranciers SuppliersPricesOfProductsOrServices=Leverancierprijzen (van producten of services) -CustomCode=Douane / Commodity / HS-code +CustomCode=Douane | Goederen | HS-code CountryOrigin=Land van herkomst +RegionStateOrigin=Regio oorsprong +StateOrigin=Staat | Provincie oorsprong Nature=Aard van het product (materiaal / afgewerkt) -NatureOfProductShort=Nature of product -NatureOfProductDesc=Raw material or finished product +NatureOfProductShort=Aard van het product +NatureOfProductDesc=Grondstof of afgewerkt product ShortLabel=Kort label Unit=Eenheid p=u. @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Gebruik vaste prijs PriceByQuantity=Verschillende prijzen per hoeveelheid DisablePriceByQty=Prijs per hoeveelheid uitschakelen PriceByQuantityRange=Aantal bereik -MultipriceRules=Regels voor prijssegmenten +MultipriceRules=Automatische prijzen voor segment UseMultipriceRules=Gebruik regels voor prijssegmenten (gedefinieerd in de configuratie van de productmodule) om automatisch de prijzen van alle andere segmenten te berekenen op basis van het eerste segment PercentVariationOver=%% variatie over %s PercentDiscountOver=%% korting op meer dan %s @@ -287,7 +290,7 @@ PriceExpressionEditorHelp5=Beschikbare globale waarden: PriceMode=Prijs-modus PriceNumeric=Nummer DefaultPrice=Standaard prijs -DefaultPriceLog=Log of previous default prices +DefaultPriceLog=Logboek van eerdere standaardprijzen ComposedProductIncDecStock=Verhogen/verlagen voorraad bij de ouder verandering ComposedProduct=Producten voor kinderen MinSupplierPrice=Minimum aankoopprijs @@ -340,7 +343,7 @@ UseProductFournDesc=Voeg een functie toe om de beschrijvingen van producten te d ProductSupplierDescription=Leveranciersbeschrijving voor het product UseProductSupplierPackaging=Gebruik verpakkingen op leveranciersprijzen (herbereken hoeveelheden volgens verpakking ingesteld op leveranciersprijs bij toevoegen / bijwerken van regel in leveranciersdocumenten) PackagingForThisProduct=Verpakking -PackagingForThisProductDesc=On supplier order, you will automaticly order this quantity (or a multiple of this quantity). Cannot be less than minimum buying quantity +PackagingForThisProductDesc=Bij een leveranciersbestelling bestelt u automatisch deze hoeveelheid (of een veelvoud van deze hoeveelheid). Mag niet minder zijn dan de minimumaankoophoeveelheid QtyRecalculatedWithPackaging=De hoeveelheid van de lijn werd herberekend volgens de verpakking van de leverancier #Attributes @@ -364,9 +367,9 @@ SelectCombination=Selecteer combinatie ProductCombinationGenerator=Variatie generator Features=Kenmerken PriceImpact=Gevolgen voor prijs -ImpactOnPriceLevel=Impact on price level %s -ApplyToAllPriceImpactLevel= Apply to all levels -ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels +ImpactOnPriceLevel=Impact op prijsniveau %s +ApplyToAllPriceImpactLevel= Toepassen op alle niveaus +ApplyToAllPriceImpactLevelHelp=Door hier te klikken, stelt u dezelfde prijsimpact in op alle niveaus WeightImpact=Gevolgen voor gewicht NewProductAttribute=Nieuwe attribuut NewProductAttributeValue=Waarde nieuw attribuut diff --git a/htdocs/langs/nl_NL/projects.lang b/htdocs/langs/nl_NL/projects.lang index d7c0b9b1ba6..f0262ca798c 100644 --- a/htdocs/langs/nl_NL/projects.lang +++ b/htdocs/langs/nl_NL/projects.lang @@ -7,7 +7,7 @@ ProjectsArea=Project omgeving ProjectStatus=Project status SharedProject=Iedereen PrivateProject=Projectcontacten -ProjectsImContactFor=Projects for which I am explicitly a contact +ProjectsImContactFor=Projecten waarvoor ik expliciet contactpersoon ben AllAllowedProjects=Alle projecten die ik kan lezen (mine + public) AllProjects=Alle projecten MyProjectsDesc=Deze weergave is beperkt tot projecten waarvan u een contactpersoon bent @@ -79,12 +79,13 @@ DurationEffective=Effectieve duur ProgressDeclared=Aangekondigd echte vooruitgang TaskProgressSummary=Taakvoortgang CurentlyOpenedTasks=Momenteel openstaande taken -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 +TheReportedProgressIsLessThanTheCalculatedProgressionByX=De aangegeven werkelijke vooruitgang is minder %s dan de voortgang op consumptie +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=De aangegeven echte vooruitgang is meer %s dan de vooruitgang op het gebied van consumptie +ProgressCalculated=Vooruitgang in consumptie WhichIamLinkedTo=waaraan ik gekoppeld ben WhichIamLinkedToProject=die ik ben gekoppeld aan het project Time=Tijd +TimeConsumed=Consumed ListOfTasks=Lijst met taken GoToListOfTimeConsumed=Ga naar de lijst met tijd die is verbruikt GanttView=Gantt-weergave @@ -211,9 +212,9 @@ ProjectNbProjectByMonth=Aantal gemaakte projecten per maand ProjectNbTaskByMonth=Aantal gemaakte taken per maand ProjectOppAmountOfProjectsByMonth=Aantal leads per maand ProjectWeightedOppAmountOfProjectsByMonth=Gewogen aantal leads per maand -ProjectOpenedProjectByOppStatus=Open project|lead by lead status -ProjectsStatistics=Statistics on projects or leads -TasksStatistics=Statistics on tasks of projects or leads +ProjectOpenedProjectByOppStatus=Open project | geleid door lead-status +ProjectsStatistics=Statistieken over projecten of leads +TasksStatistics=Statistieken over taken van projecten of leads TaskAssignedToEnterTime=Taak toegewezen. Tijd invoeren voor deze taak moet mogelijk zijn. IdTaskTime=Id taak tijd YouCanCompleteRef=Als je de ref met een achtervoegsel wilt voltooien, wordt aanbevolen om een - -teken toe te voegen om het te scheiden, zodat de automatische nummering nog steeds correct werkt voor volgende projecten. Bijvoorbeeld %s-MYSUFFIX diff --git a/htdocs/langs/nl_NL/propal.lang b/htdocs/langs/nl_NL/propal.lang index c2efc292ccf..ed9e284c461 100644 --- a/htdocs/langs/nl_NL/propal.lang +++ b/htdocs/langs/nl_NL/propal.lang @@ -83,9 +83,9 @@ DefaultModelPropalClosed=Standaard sjabloon bij het sluiten van een zakelijk voo ProposalCustomerSignature=Schriftelijke aanvaarding , stempel , datum en handtekening ProposalsStatisticsSuppliers=Leveranciersoffertes statistieken CaseFollowedBy=Geval gevolgd door -SignedOnly=Signed only -IdProposal=Proposal ID -IdProduct=Product ID -PrParentLine=Proposal Parent Line -LineBuyPriceHT=Buy Price Amount net of tax for line +SignedOnly=Alleen gesigneerd +IdProposal=Offerte-ID +IdProduct=Product-ID +PrParentLine=Voorstel bovenliggende lijn +LineBuyPriceHT=Koopprijs bedrag exclusief BTW voor regel diff --git a/htdocs/langs/nl_NL/receiptprinter.lang b/htdocs/langs/nl_NL/receiptprinter.lang index 0da7647a6c9..f0598541b6b 100644 --- a/htdocs/langs/nl_NL/receiptprinter.lang +++ b/htdocs/langs/nl_NL/receiptprinter.lang @@ -54,7 +54,7 @@ DOL_DOUBLE_WIDTH=Dubbele breedte DOL_DEFAULT_HEIGHT_WIDTH=Standaard hoogte en breedte DOL_UNDERLINE=Activeer onderstrepen DOL_UNDERLINE_DISABLED=Deactiveer onderstrepen -DOL_BEEP=Beed geluid +DOL_BEEP=Geluid DOL_PRINT_TEXT=Afdrukken tekst DateInvoiceWithTime=Factuur datum en tijd YearInvoice=Factuur jaar @@ -77,6 +77,6 @@ DOL_VALUE_CUSTOMER_ACCOUNT_BALANCE=Saldo klant account DOL_VALUE_MYSOC_NAME=Uw bedrijfsnaam VendorLastname=Achternaam leverancier VendorFirstname=Voornaam leverancier -VendorEmail=Vendor email +VendorEmail=E-mailadres van leverancier DOL_VALUE_CUSTOMER_POINTS=Klantpunten DOL_VALUE_OBJECT_POINTS=Objectpunten diff --git a/htdocs/langs/nl_NL/recruitment.lang b/htdocs/langs/nl_NL/recruitment.lang index dbf7e374eba..4ad441ecff0 100644 --- a/htdocs/langs/nl_NL/recruitment.lang +++ b/htdocs/langs/nl_NL/recruitment.lang @@ -29,8 +29,8 @@ RecruitmentSetup = Werving instellingen Settings = Instellingen RecruitmentSetupPage = Stel hier de hoofdopties voor de recruitment module in RecruitmentArea=Werving gebied -PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. -EnablePublicRecruitmentPages=Enable public pages of open jobs +PublicInterfaceRecruitmentDesc=Openbare pagina's met vacatures zijn openbare URL's om openstaande vacatures weer te geven en te beantwoorden. Er is een verschillende link voor elke openstaande vacature, te vinden op elk vacatureblad. +EnablePublicRecruitmentPages=Schakel openbare pagina's van open vacatures in # # About page @@ -47,29 +47,30 @@ ResponsibleOfRecruitement=Verantwoordelijk voor werving IfJobIsLocatedAtAPartner=Als baan zich op een partnerlocatie bevindt PositionToBeFilled=Functie PositionsToBeFilled=Vacature -ListOfPositionsToBeFilled=List of job positions -NewPositionToBeFilled=New job positions +ListOfPositionsToBeFilled=Lijst met vacatures +NewPositionToBeFilled=Nieuwe vacatures -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 +JobOfferToBeFilled=Functie die moet worden vervuld +ThisIsInformationOnJobPosition=Informatie over de te vervullen vacature +ContactForRecruitment=Contactpersoon voor werving +EmailRecruiter=E-mail de recruiter +ToUseAGenericEmail=Om een generiek e-mailadres te gebruiken. Indien niet gedefinieerd, wordt het e-mailadres van de rekruteringsverantwoordelijke gebruikt +NewCandidature=Nieuwe applicatie +ListOfCandidatures=Lijst met applicaties +RequestedRemuneration=Gevraagde vergoeding +ProposedRemuneration=Voorgestelde vergoeding ContractProposed=Contractvoorstel gedaan ContractSigned=Contract getekend -ContractRefused=Contract refused -RecruitmentCandidature=Application +ContractRefused=Contract geweigerd +RecruitmentCandidature=Toepassing JobPositions=Vacature -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) +RecruitmentCandidatures=Toepassingen +InterviewToDo=Te maken interview +AnswerCandidature=Toepassing antwoord +YourCandidature=Jouw toepassing +YourCandidatureAnswerMessage=Bedankt voor je aanmelding. <br> ... +JobClosedTextCandidateFound=De vacature is gesloten. De functie is vervuld. +JobClosedTextCanceled=De vacature is gesloten. +ExtrafieldsJobPosition=Complementaire attributen (functieposities) +ExtrafieldsCandidatures=Aanvullende attributen (sollicitaties) +MakeOffer=Doe een aanbod diff --git a/htdocs/langs/nl_NL/salaries.lang b/htdocs/langs/nl_NL/salaries.lang index 7e29f0ff949..5f91fe4db8b 100644 --- a/htdocs/langs/nl_NL/salaries.lang +++ b/htdocs/langs/nl_NL/salaries.lang @@ -1,21 +1,21 @@ # Dolibarr language file - Source file is en_US - salaries SALARIES_ACCOUNTING_ACCOUNT_PAYMENT=Grootboekrekening voor medewerker derde partij -SALARIES_ACCOUNTING_ACCOUNT_PAYMENT_Desc=De specifieke account die op de gebruikerskaart is gedefinieerd, wordt alleen voor de boekhouding van subgrootboek gebruikt. Deze wordt gebruikt voor grootboek en als standaardwaarde voor subgrootboek-boekhouding als specifieke gebruikersaccount voor de account op gebruiker niet is gedefinieerd. +SALARIES_ACCOUNTING_ACCOUNT_PAYMENT_Desc=De boekhoudrekening die in het gebruikersbestand is gedefinieerd, wordt alleen gebruikt voor aanvullende boekhouding. Deze wordt gebruikt voor het grootboek en als standaardwaarde voor aanvullende boekhouding als de speciale rekening van de gebruiker niet is gedefinieerd. SALARIES_ACCOUNTING_ACCOUNT_CHARGE=Standaard grootboekrekening voor salaris betalingen Salary=Salaris Salaries=Salarissen NewSalaryPayment=Nieuwe salarisbetaling AddSalaryPayment=Salarisbetaling toevoegen SalaryPayment=Salarisbetaling -SalariesPayments=Salarissen betalingen +SalariesPayments=Salarisbetalingen ShowSalaryPayment=Toon salarisbetaling THM=Gemiddeld uurtarief TJM=Gemiddeld dagtarief CurrentSalary=Huidig salaris -THMDescription=Deze waarde kan worden gebruikt om de kosten te berekenen van de tijd die wordt besteed aan een project dat door gebruikers is ingevoerd als het moduleproject wordt gebruikt +THMDescription=Deze waarde kan worden gebruikt om de kosten te berekenen van de tijd die wordt besteed aan een project dat door gebruikers is ingevoerd als de module Project wordt gebruikt TJMDescription=Deze waarde is momenteel alleen ter informatie en wordt niet gebruikt voor enige berekening -LastSalaries=Laatste %s salaris betalingen +LastSalaries=Laatste %s salarisbetalingen AllSalaries=Alle salarisbetalingen -SalariesStatistics=Salarisstatistieken +SalariesStatistics=Salaris statistieken # Export -SalariesAndPayments=Lonen en betalingen +SalariesAndPayments=Salarissen en betalingen diff --git a/htdocs/langs/nl_NL/sendings.lang b/htdocs/langs/nl_NL/sendings.lang index 2c3d237a2db..b16b9726c7d 100644 --- a/htdocs/langs/nl_NL/sendings.lang +++ b/htdocs/langs/nl_NL/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Andere verzendingen voor deze opdracht SendingsAndReceivingForSameOrder=Verzendingen en ontvangsten voor deze bestelling SendingsToValidate=Te valideren verzendingen StatusSendingCanceled=Geannuleerd +StatusSendingCanceledShort=Geannuleerd StatusSendingDraft=Concept StatusSendingValidated=Gevalideerd (producten te verzenden of reeds verzonden) StatusSendingProcessed=Verwerkt @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=U moet eerst de bestelling valideren voordat u # Sending methods # ModelDocument DocumentModelTyphon=Completer leveringsbewijs documentmodel (logo, etc) +DocumentModelStorm=Compleet documentmodel voor ontvangstbewijzen en compatibiliteit met extrafields (logo ...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER niet gedefinieerd SumOfProductVolumes=Som van alle productvolumes SumOfProductWeights=Som van product-gewichten diff --git a/htdocs/langs/nl_NL/stocks.lang b/htdocs/langs/nl_NL/stocks.lang index 1a21ab2c3b2..db940c6cf37 100644 --- a/htdocs/langs/nl_NL/stocks.lang +++ b/htdocs/langs/nl_NL/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Verwijder verzending Stock=Voorraad Stocks=Voorraden MissingStocks=Ontbrekende voorraad -StockAtDate=Stocks at date +StockAtDate=Voorraden op datum StockAtDateInPast=Datum uit het verleden StockAtDateInFuture=Toekomstige datum StocksByLotSerial=Voorraad volgorde op lot/serienummer @@ -34,7 +34,7 @@ StockMovementForId=Verplaatsing ID %d ListMouvementStockProject=Lijst met voorraad verplaatsingen die aan het project zijn gekoppeld StocksArea=Magazijnen AllWarehouses=Alle magazijnen -IncludeEmptyDesiredStock=Include also negative stock with undefined desired stock +IncludeEmptyDesiredStock=Voeg ook een negatieve voorraad toe met een ongedefinieerde gewenste voorraad IncludeAlsoDraftOrders=Neem ook conceptorders op Location=Locatie LocationSummary=Korte naam locatie @@ -62,11 +62,12 @@ 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 WarehouseAskWarehouseDuringOrder=Stel een magazijn in op Verkooporders UserDefaultWarehouse=Stel een magazijn in op gebruikers MainDefaultWarehouse=Standaardmagazijn MainDefaultWarehouseUser=Gebruik standaard magazijn voor elke gebruiker -MainDefaultWarehouseUserDesc=By activating this option, during creation of a product, the warehouse assigned to the product will be defined on this one. If no warehouse is defined on the user, the default warehouse is defined. +MainDefaultWarehouseUserDesc=Door deze optie te activeren, wordt tijdens het aanmaken van een product het magazijn dat aan het product is toegewezen op deze bepaald. Als er geen magazijn is gedefinieerd voor de gebruiker, wordt het standaardmagazijn gedefinieerd. IndependantSubProductStock=Product voorraad en subproduct voorraad zijn onafhankelijk QtyDispatched=Hoeveelheid verzonden QtyDispatchedShort=Aantal verzonden @@ -95,16 +96,16 @@ RealStock=Werkelijke voorraad RealStockDesc=Fysieke/echte voorraad is de voorraad die momenteel in de magazijnen aanwezig is. RealStockWillAutomaticallyWhen=De werkelijke voorraad wordt aangepast volgens deze regel (zoals gedefinieerd in de module Voorraad): VirtualStock=Virtuele voorraad -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=Virtuele voorraad op datum +VirtualStockAtDateDesc=Virtuele voorraad zodra alle lopende bestellingen die volgens de planning vóór de datum moeten worden gedaan, zijn voltooid +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.) 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=The input average unit price we had to pay to suppliers to get the product into our stock. +AverageUnitPricePMPDesc=De input gemiddelde eenheidsprijs die we aan leveranciers moesten betalen om het product in onze voorraad te krijgen. SellPriceMin=Verkopen Prijs per Eenheid EstimatedStockValueSellShort=Verkoopwaarde EstimatedStockValueSell=Verkoopwaarde @@ -122,9 +123,9 @@ DesiredStockDesc=Dit voorraadbedrag is de waarde die wordt gebruikt om de voorra StockToBuy=Te bestellen Replenishment=Bevoorrading ReplenishmentOrders=Bevoorradingsorder -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=Afhankelijk van de opties voor het verhogen / verlagen van de voorraad, kunnen fysieke voorraad en virtuele voorraad (fysieke voorraad + openstaande bestellingen) verschillen +UseRealStockByDefault=Gebruik echte voorraad in plaats van virtuele voorraad voor de aanvullingsfunctie +ReplenishmentCalculation=Het te bestellen bedrag is (gewenste hoeveelheid - echte voorraad) in plaats van (gewenste hoeveelheid - virtuele voorraad) UseVirtualStock=Gebruik virtuele voorraad UsePhysicalStock=Gebruik fysieke voorraad CurentSelectionMode=Huidige selectiemodus @@ -133,7 +134,7 @@ CurentlyUsingPhysicalStock=Fysieke voorraad RuleForStockReplenishment=Regels voor bevoorrading SelectProductWithNotNullQty=Selecteer ten minste één product met een aantal niet nul en een leverancier AlertOnly= Enkel waarschuwingen -IncludeProductWithUndefinedAlerts = Include also negative stock for products with no desired quantity defined, to restore them to 0 +IncludeProductWithUndefinedAlerts = Neem ook een negatieve voorraad op voor producten waarvoor geen gewenste hoeveelheid is gedefinieerd, om deze op 0 te zetten WarehouseForStockDecrease=De voorraad van magazijn <b>%s</b> zal verminderd worden WarehouseForStockIncrease=De voorraad van magazijn <b>%s</b> zal verhoogd worden ForThisWarehouse=Voor dit magazijn @@ -144,7 +145,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=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=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". RecordMovement=Vastleggen verplaatsing ReceivingForSameOrder=Ontvangsten voor deze bestelling StockMovementRecorded=Geregistreerde voorraadbewegingen @@ -231,12 +232,13 @@ StockDecrease=Voorraad afnemen InventoryForASpecificWarehouse=Voorraad voor een specifiek magazijn InventoryForASpecificProduct=Voorraad voor een specifiek product StockIsRequiredToChooseWhichLotToUse=Voorraad is vereist om te kiezen welk lot te gebruiken -ForceTo=Dwingen tot +ForceTo=Toevoegen aan AlwaysShowFullArbo=Volledige boomstructuur van magazijn weergeven op pop-up van magazijnkoppelingen (Waarschuwing: dit kan de prestaties drastisch verminderen) -StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past -StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future +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 CurrentStock=Huidige voorraad -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) +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 +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. diff --git a/htdocs/langs/nl_NL/suppliers.lang b/htdocs/langs/nl_NL/suppliers.lang index bff19a2422c..dd087ffdb83 100644 --- a/htdocs/langs/nl_NL/suppliers.lang +++ b/htdocs/langs/nl_NL/suppliers.lang @@ -38,11 +38,11 @@ MenuOrdersSupplierToBill=Te factureren inkooporders NbDaysToDelivery=Levertijd (dagen) DescNbDaysToDelivery=De langste leveringstermijn van de producten van deze bestelling SupplierReputation=Reputatie van de leverancier -ReferenceReputation=Reference reputation +ReferenceReputation=Referentie reputatie DoNotOrderThisProductToThisSupplier=Niet bestellen NotTheGoodQualitySupplier=Lage kwaliteit ReputationForThisProduct=Reputatie BuyerName=Afnemer AllProductServicePrices=Prijzen alle producten/diensten -AllProductReferencesOfSupplier=All references of vendor +AllProductReferencesOfSupplier=Alle referenties van leverancier BuyingPriceNumShort=Prijzen van leveranciers diff --git a/htdocs/langs/nl_NL/ticket.lang b/htdocs/langs/nl_NL/ticket.lang index 9af5045058e..51f8fe3a18c 100644 --- a/htdocs/langs/nl_NL/ticket.lang +++ b/htdocs/langs/nl_NL/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Types TicketDictCategory=Groepen TicketDictSeverity=Prioriteit TicketDictResolution=Ticket - resolutie -TicketTypeShortBUGSOFT=Foutmelding -TicketTypeShortBUGHARD=Storing hardware -TicketTypeShortCOM=Commerciële vraag +TicketTypeShortCOM=Commerciële vraag TicketTypeShortHELP=Verzoek om functionele hulp TicketTypeShortISSUE=Probleem of bug TicketTypeShortREQUEST=Verander- of verbeteringsverzoek @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Overig TicketSeverityShortLOW=Laag TicketSeverityShortNORMAL=Normaal TicketSeverityShortHIGH=Hoog -TicketSeverityShortBLOCKING=Kritiek/Bokkerend +TicketSeverityShortBLOCKING=Kritiek, blokkerend ErrorBadEmailAddress=Veld '%s' foutief MenuTicketMyAssign=Mijn tickets @@ -60,7 +58,6 @@ OriginEmail=E-mail bron Notify_TICKET_SENTBYMAIL=Verzend ticketbericht per e-mail # Status -NotRead=Niet gelezen Read=Gelezen Assigned=Toegekend InProgress=Reeds bezig @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Met de openbare interface kunnen bezoekers ti TicketsAutoAssignTicket=Wijs automatisch de gebruiker toe die het ticket heeft aangemaakt TicketsAutoAssignTicketHelp=Bij het maken van een ticket kan de gebruiker automatisch aan het ticket worden toegewezen. 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status gewijzigd: %s in %s TicketNotNotifyTiersAtCreate=Geen bedrijf melden bij aanmaken Unread=Niet gelezen TicketNotCreatedFromPublicInterface=Niet beschikbaar. Ticket is niet gemaakt vanuit de openbare interface. -PublicInterfaceNotEnabled=Publieke interface was niet ingeschakeld ErrorTicketRefRequired=Naam van ticket is vereist # diff --git a/htdocs/langs/nl_NL/trips.lang b/htdocs/langs/nl_NL/trips.lang index 642842482c6..8d07d7709ad 100644 --- a/htdocs/langs/nl_NL/trips.lang +++ b/htdocs/langs/nl_NL/trips.lang @@ -110,7 +110,7 @@ ExpenseReportPayment=Onkostendeclaratie ExpenseReportsToApprove=Onkostendeclaraties te accorderen ExpenseReportsToPay=Declaraties te betalen ConfirmCloneExpenseReport=Weet u zeker dat u dit onkostenrapport wilt klonen? -ExpenseReportsIk=Onkostendeclaratie kilometrage index +ExpenseReportsIk=Configuratie van kilometervergoedingen ExpenseReportsRules=Regels voor onkostendeclaraties ExpenseReportIkDesc=U kunt de berekening van de kilometerkosten wijzigen per categorie en bereik die eerder zijn gedefinieerd. <b>d</b> is de afstand in kilometers ExpenseReportRulesDesc=U kunt berekeningsregels maken of bijwerken. Dit onderdeel wordt gebruikt wanneer de gebruiker een nieuw onkostenrapport maakt @@ -145,7 +145,7 @@ nolimitbyEX_DAY=per dag (geen beperking) nolimitbyEX_MON=per maand (geen beperking) nolimitbyEX_YEA=per jaar (geen beperking) nolimitbyEX_EXP=per regel (geen beperking) -CarCategory=Auto categorie +CarCategory=Voertuig categorie ExpenseRangeOffset=Offset-bedrag: %s RangeIk=Afstand in km. AttachTheNewLineToTheDocument=Koppel de regel aan een geüpload document diff --git a/htdocs/langs/nl_NL/users.lang b/htdocs/langs/nl_NL/users.lang index 20ea6e8fba2..d22bd138009 100644 --- a/htdocs/langs/nl_NL/users.lang +++ b/htdocs/langs/nl_NL/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Verwijderen uit groep PasswordChangedAndSentTo=Wachtwoord veranderd en verstuurd naar <b>%s</b>. PasswordChangeRequest=Wachtwoord aanpassing verzoek voor <b>%s</b> PasswordChangeRequestSent=Verzoek om wachtwoord te wijzigen van <b>%s</b> verstuurt naar <b>%s</b>. +IfLoginExistPasswordRequestSent=Bij een geldig account is er een e-mail gestuurd om het wachtwoord opnieuw in te stellen. +IfEmailExistPasswordRequestSent=Bij een geldig account is er een e-mail verzonden om het wachtwoord opnieuw in te stellen. ConfirmPasswordReset=Bevestig wachtwoord reset MenuUsersAndGroups=Gebruikers & groepen LastGroupsCreated=Laatste %s groepen aangemaakt @@ -73,6 +75,7 @@ CreateInternalUserDesc=Met dit formulier kunt u een interne gebruiker in uw bedr 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) PermissionInheritedFromAGroup=Toestemming verleend, omdat geërfd van een bepaalde gebruikersgroep. Inherited=Overgeërfd +UserWillBe=De aangemaakte gebruiker zal zijn UserWillBeInternalUser=Gemaakt gebruiker een interne gebruiker te zijn (want niet gekoppeld aan een bepaalde derde partij) UserWillBeExternalUser=Gemaakt gebruiker zal een externe gebruiker (omdat gekoppeld aan een bepaalde derde partij) IdPhoneCaller=Beller ID (telefoon) @@ -108,13 +111,15 @@ DisabledInMonoUserMode=Uitgeschakeld in onderhoudsmodus UserAccountancyCode=Gebruiker accounting code UserLogoff=Gebruiker uitgelogd UserLogged=Gebruiker gelogd -DateOfEmployment=Employment date -DateEmployment=Startdatum dienstverband +DateOfEmployment=Datum indiensttreding +DateEmployment=Werkgelegenheid +DateEmploymentstart=Startdatum dienstverband DateEmploymentEnd=Einddatum dienstverband +RangeOfLoginValidity=Datumbereik van inloggeldigheid CantDisableYourself=U kunt uw eigen gebruikersrecord niet uitschakelen ForceUserExpenseValidator=Validatierapport valideren ForceUserHolidayValidator=Forceer verlofaanvraag validator ValidatorIsSupervisorByDefault=Standaard is de validator de supervisor van de gebruiker. Blijf leeg om dit gedrag te behouden. UserPersonalEmail=Persoonlijke e-mail UserPersonalMobile=Persoonlijke mobiele telefoon -WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s +WarningNotLangOfInterface=Pas op, dit is de hoofdtaal die de gebruiker spreekt, niet de taal van de interface die hij wil zien. Ga naar het tabblad %s om de de taal van de interface, die voor deze gebruiker zichtbaar is, te wijzigen diff --git a/htdocs/langs/nl_NL/website.lang b/htdocs/langs/nl_NL/website.lang index 855e09828b2..a2424762f54 100644 --- a/htdocs/langs/nl_NL/website.lang +++ b/htdocs/langs/nl_NL/website.lang @@ -30,7 +30,6 @@ EditInLine=Inline bewerken AddWebsite=Website toevoegen Webpage=Webpagina/container AddPage=Voeg pagina/container toe -HomePage=Startpagina PageContainer=Pagina PreviewOfSiteNotYetAvailable=Voorbeeld van uw website <strong>%s</strong> is nog niet beschikbaar. U moet eerst '<strong>Een volledige websitesjabloon importeren</strong>' of alleen '<strong>Een pagina / container toevoegen</strong>'. RequestedPageHasNoContentYet=Gevraagde pagina met id %s heeft nog geen inhoud of cachebestand .tpl.php is verwijderd. Bewerk de inhoud van de pagina om dit op te lossen. @@ -101,7 +100,7 @@ EmptyPage=Lege pagina ExternalURLMustStartWithHttp=Externe URL moet beginnen met http: // of https: // ZipOfWebsitePackageToImport=Upload het zipbestand van het website-sjabloonpakket ZipOfWebsitePackageToLoad=of Kies een beschikbaar ingesloten websitesjabloonpakket -ShowSubcontainers=Neem dynamische inhoud op +ShowSubcontainers=Toon dynamische inhoud InternalURLOfPage=Interne URL van pagina ThisPageIsTranslationOf=Deze pagina / container is een vertaling van ThisPageHasTranslationPages=Deze pagina / container heeft vertaling @@ -135,5 +134,6 @@ ReplacementDoneInXPages=Vervanging gedaan in %s pagina's of containers RSSFeed=RSS-feeds RSSFeedDesc=U kunt via deze URL een RSS-feed krijgen van de nieuwste artikelen met het type 'blogpost' PagesRegenerated=%s pagina ('s) / container (s) her-aangemaakt -RegenerateWebsiteContent=Regenerate web site cache files -AllowedInFrames=Allowed in Frames +RegenerateWebsiteContent=Genereer cachebestanden van websites opnieuw +AllowedInFrames=Toegestaan in frames +DefineListOfAltLanguagesInWebsiteProperties=Definieer een lijst van alle beschikbare talen in website-eigenschappen. diff --git a/htdocs/langs/nl_NL/withdrawals.lang b/htdocs/langs/nl_NL/withdrawals.lang index fe5dc16fe25..d2aabfb1334 100644 --- a/htdocs/langs/nl_NL/withdrawals.lang +++ b/htdocs/langs/nl_NL/withdrawals.lang @@ -11,7 +11,7 @@ PaymentByBankTransferLines=Overschrijvingsorderregels WithdrawalsReceipts=Incasso-opdrachten WithdrawalReceipt=Incasso-opdracht BankTransferReceipts=Overboekingsopdrachten -BankTransferReceipt=Credit transfer order +BankTransferReceipt=Betalingsopdracht LatestBankTransferReceipts=Laatste %s overboekingsopdrachten LastWithdrawalReceipts=Laatste %s incassobestanden WithdrawalsLine=Incasso-orderregel @@ -40,8 +40,9 @@ CreditTransferStatistics=Overboeking statistieken Rejects=Verworpen LastWithdrawalReceipt=Laatste %s ontvangen incasso's MakeWithdrawRequest=Automatische incasso aanmaken -MakeBankTransferOrder=Make a credit transfer request +MakeBankTransferOrder=Maak een verzoek tot overboeking WithdrawRequestsDone=%s Betalingsverzoeken voor automatische incasso geregistreerd +BankTransferRequestsDone=%s overboekingsverzoeken geregistreerd ThirdPartyBankCode=Bankcode van derden NoInvoiceCouldBeWithdrawed=Geen factuur afgeschreven. Controleer of de facturen betrekking hebben op bedrijven met een geldige IBAN en dat IBAN een UMR (Unique Mandate Reference) met modus <strong>%s heeft</strong> . ClassCredited=Classificeer creditering @@ -63,7 +64,7 @@ InvoiceRefused=Factuur geweigerd (de afwijzing door belasten aan de klant) StatusDebitCredit=Status debet / credit StatusWaiting=Wachtend StatusTrans=Verzonden -StatusDebited=Debited +StatusDebited=Afgeschreven StatusCredited=Gecrediteerd StatusPaid=Betaald StatusRefused=Geweigerd @@ -79,13 +80,13 @@ StatusMotif8=Andere reden CreateForSepaFRST=Maak een domiciliëringsbestand (SEPA FRST) CreateForSepaRCUR=Maak een domiciliëringsbestand (SEPA RCUR) CreateAll=Maak een domiciliëringsbestand (alles) -CreateFileForPaymentByBankTransfer=Create file for credit transfer +CreateFileForPaymentByBankTransfer=Maak bestand aan met overboekingen CreateSepaFileForPaymentByBankTransfer=Maak een overboekingsbestand (SEPA) aan CreateGuichet=Alleen kantoor CreateBanque=Alleen de bank OrderWaiting=Wachtend op behandeling -NotifyTransmision=Record file transmission of order -NotifyCredit=Record credit of order +NotifyTransmision=Registreer bestandsoverdracht van bestelling +NotifyCredit=Vastleggen credit order NumeroNationalEmetter=Nationale zender nummer WithBankUsingRIB=Voor bankrekeningen die gebruik maken van RIB WithBankUsingBANBIC=Voor bankrekeningen die gebruik maken van IBAN / BIC / SWIFT @@ -95,10 +96,10 @@ CreditDate=Crediteer op WithdrawalFileNotCapable=Kan geen ontvangstbewijsbestand voor uw land genereren %s (uw land wordt niet ondersteund) ShowWithdraw=Incasso-opdracht weergeven IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Als de factuur echter ten minste één betalingsopdracht voor automatische incasso bevat die nog niet is verwerkt, wordt deze niet ingesteld als betaald om voorafgaand opnamebeheer mogelijk te maken. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->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 +DoStandingOrdersBeforePayments=Op dit tabblad kunt u een betalingsopdracht voor automatische incasso aanvragen. Als u klaar bent, gaat u naar het menu Bank-> Betaling via automatische incasso om de incasso-opdracht te genereren en te beheren. Wanneer de automatische incasso-opdracht wordt afgesloten, wordt de betaling op facturen automatisch geregistreerd en worden de facturen gesloten als het te betalen restant nul is. +DoCreditTransferBeforePayments=Op dit tabblad kunt u een overboekingsopdracht aanvragen. Als u klaar bent, gaat u naar het menu Bank-> Betaling via overschrijving om de overschrijvingsopdracht te genereren en te beheren. Wanneer de overboekingsopdracht is gesloten, wordt de betaling op facturen automatisch geregistreerd en worden de facturen gesloten als het te betalen restant nul is. +WithdrawalFile=Debet orderbestand +CreditTransferFile=Credit overdrachtbestand SetToStatusSent=Stel de status in &quot;Bestand verzonden&quot; ThisWillAlsoAddPaymentOnInvoice=Dit registreert ook betalingen op facturen en classificeert ze als "Betaald" als het resterende bedrag niet is betaald StatisticsByLineStatus=Statistieken per status van lijnen @@ -124,14 +125,15 @@ SEPAFrstOrRecur=Soort betaling ModeRECUR=Terugkomende betaling ModeFRST=Eenmalige incasso PleaseCheckOne=Alleen één controleren -CreditTransferOrderCreated=Credit transfer order %s created +CreditTransferOrderCreated=Overboekingsopdracht %s gemaakt DirectDebitOrderCreated=Incasso-opdracht %s gemaakt AmountRequested=Aangevraagde hoeveelheid SEPARCUR=SEPA CUR SEPAFRST=SEPA FRST ExecutionDate=Uitvoeringsdatum CreateForSepa=Aanmaken incassobestand -ICS=Creditor Identifier CI +ICS=Crediteur Identifier CI voor automatische incasso +ICSTransfer=Crediteur Identifier CI voor bankoverschrijving END_TO_END=&quot;EndToEndId&quot; SEPA XML-tag - Uniek ID toegewezen per transactie USTRD=&quot;Ongestructureerde&quot; SEPA XML-tag ADDDAYS=Dagen toevoegen aan uitvoeringsdatum @@ -145,4 +147,6 @@ InfoTransData=Bedrag: %s<br>Wijze: %s<br>Datum: %s InfoRejectSubject=Betalingsopdracht voor automatische incasso geweigerd InfoRejectMessage=M,<br><br>de incasso van factuur %s voor bedrijf %s, met een bedrag van %s is geweigerd door de bank.<br><br>--<br>%s ModeWarning=Optie voor echte modus was niet ingesteld, we stoppen na deze simulatie -ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorCompanyHasDuplicateDefaultBAN=Bedrijf met id %s heeft meer dan één standaard bankrekening. Er is geen manier aanwezig om te weten welke u moet gebruiken. +ErrorICSmissing=ICS ontbreekt op bankrekening %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/nl_NL/workflow.lang b/htdocs/langs/nl_NL/workflow.lang index 9d4ed65e55b..5aaea7ee12d 100644 --- a/htdocs/langs/nl_NL/workflow.lang +++ b/htdocs/langs/nl_NL/workflow.lang @@ -1,23 +1,25 @@ # Dolibarr language file - Source file is en_US - workflow -WorkflowSetup=Workflow module setup +WorkflowSetup=Workflow module set-up WorkflowDesc=Deze module biedt enkele automatische acties. Standaard is de workflow open (u kunt dingen doen in de gewenste volgorde), maar hier kunt u enkele automatische acties activeren. ThereIsNoWorkflowToModify=Er zijn geen wijzigingen in de workflow beschikbaar met de geactiveerde modules. # Autocreate descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatisch een verkooporder maken nadat een offerte is ondertekend (de nieuwe bestelling heeft hetzelfde bedrag als offerte) descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Creëer automatisch een klantfactuur nadat een offerte is ondertekend (de nieuwe factuur heeft hetzelfde bedrag als de offerte) -descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Maak automatisch een klant factuur aan nadat contract is gevalideerd. +descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Maak automatisch een klant factuur aan nadat een contract is gevalideerd. descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Creëer automatisch een klantfactuur nadat een verkooporder is gesloten (de nieuwe factuur heeft hetzelfde bedrag als de bestelling) # Autoclassify customer proposal or order descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classificeer gekoppeld bronvoorstel als gefactureerd wanneer verkooporder is ingesteld op gefactureerd (en als het bedrag van de bestelling gelijk is aan het totale bedrag van het ondertekende gekoppelde voorstel) descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classificeer het gekoppelde bronvoorstel als gefactureerd wanneer de klantfactuur is gevalideerd (en als het factuurbedrag gelijk is aan het totale bedrag van het ondertekende gekoppelde voorstel) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classificeer gekoppelde bronverkooporder als gefactureerd wanneer klantfactuur is gevalideerd (en als het factuurbedrag gelijk is aan het totale bedrag van de gekoppelde bestelling) descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classificeer gekoppelde bronverkooporder als gefactureerd wanneer klantfactuur is ingesteld op betaald (en als het factuurbedrag gelijk is aan het totale bedrag van de gekoppelde bestelling) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classificeer gekoppelde bronverkooporder zoals verzonden wanneer een zending is gevalideerd (en als de hoeveelheid die door alle zendingen is verzonden dezelfde is als in de te updaten bestelling) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classificeer gekoppelde bronverkooporder als verzonden wanneer een zending is gevalideerd (en als de hoeveelheid die door alle zendingen is verzonden dezelfde is als in de te updaten bestelling) # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classificeer het gekoppelde bronvoorstel als gefactureerd wanneer de leveranciersfactuur is gevalideerd (en als het factuurbedrag gelijk is aan het totale bedrag van het gekoppelde voorstel) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classificeer gekoppelde inkooporder als gefactureerd wanneer leveranciersfactuur is gevalideerd (en als het factuurbedrag gelijk is aan het totale bedrag van de gekoppelde order) -descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +descWORKFLOW_BILL_ON_RECEPTION=Classificeer ontvangsten als "gefactureerd" wanneer een gekoppelde leveranciersorder wordt gevalideerd # Autoclose intervention -descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Sluit alle interventies die aan het ticket zijn gekoppeld wanneer een ticket is gesloten AutomaticCreation=Automatisch aanmaken AutomaticClassification=Automatisch classificeren +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/nl_NL/zapier.lang b/htdocs/langs/nl_NL/zapier.lang index 770a821038b..f9f576f9fbe 100644 --- a/htdocs/langs/nl_NL/zapier.lang +++ b/htdocs/langs/nl_NL/zapier.lang @@ -26,4 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier voor Dolibarr-module # Admin page # ZapierForDolibarrSetup = Installatie van Zapier voor Dolibarr -ZapierDescription=Interface with Zapier +ZapierDescription=Interface met Zapier diff --git a/htdocs/langs/pl_PL/accountancy.lang b/htdocs/langs/pl_PL/accountancy.lang index f7abea4f251..f7345886c7e 100644 --- a/htdocs/langs/pl_PL/accountancy.lang +++ b/htdocs/langs/pl_PL/accountancy.lang @@ -16,6 +16,8 @@ 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 CantSuggest=Nie mogę zasugerować AccountancySetupDoneFromAccountancyMenu=Most setup of the accountancy is done from the menu %s ConfigAccountingExpert=Configuration of the module accounting (double entry) @@ -48,6 +50,7 @@ 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 MainAccountForCustomersNotDefined=Główne konto księgowe dla klientów nie zdefiniowane w ustawieniach MainAccountForSuppliersNotDefined=Główne konto rozliczeniowe dla dostawców niezdefiniowane w konfiguracji @@ -144,7 +147,7 @@ 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=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=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 @@ -198,7 +201,8 @@ Docdate=Data Docref=Odniesienie LabelAccount=Etykieta konta LabelOperation=Label operation -Sens=Sens +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=Dziennik @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=ilość sztuk TransactionNumShort=Numer transakcji AccountingCategory=Personalized groups -GroupByAccountAccounting=Grupuj według konta księgowego +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=Według kont ByPredefinedAccountGroups=By predefined groups @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +ShowSubtotalByGroup=Show subtotal by level 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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Dowiąż automatycznie AutomaticBindingDone=Automatyczne dowiązanie ukończone @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/pl_PL/admin.lang b/htdocs/langs/pl_PL/admin.lang index cfd5007cf51..68fdfa7587f 100644 --- a/htdocs/langs/pl_PL/admin.lang +++ b/htdocs/langs/pl_PL/admin.lang @@ -56,6 +56,8 @@ 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 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. @@ -85,7 +87,6 @@ ShowPreview=Pokaż podgląd ShowHideDetails=Show-Hide details PreviewNotAvailable=Podgląd niedostępny ThemeCurrentlyActive=Temat obecnie aktywny -CurrentTimeZone=Strefa czasowa PHP (server) MySQLTimeZone=Strefa czasowa MySQL (baza danych) TZHasNoEffect=Daty są przechowywane i zwracane przez serwer bazy danych tak, jakby były przechowywane jako przesłany ciąg. Strefa czasowa działa tylko przy użyciu funkcji UNIX_TIMESTAMP (która nie powinna być używana przez Dolibarr, więc baza danych TZ nie powinna mieć żadnego efektu, nawet jeśli zostanie zmieniona po wprowadzeniu danych). Space=Przestrzeń @@ -153,8 +154,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=Usuń wszystkie pliki tymczasowe (bez ryzyka utraty danych). Uwaga: Usuwanie odbywa się tylko wtedy, gdy katalog tymczasowy został utworzony 24 godziny temu. -PurgeDeleteTemporaryFilesShort=Usuń pliki tymczasowe +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 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. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Preferowani Partnerzy OtherResources=Inne zasoby ExternalResources=Zasoby zewnętrzne SocialNetworks=Sieci społecznościowe +SocialNetworkId=Social Network ID 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. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Examples with current configuration 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=Przykłady składni: <br> c: \\ mydir <br> / Home / mydir <br> DOL_DATA_ROOT / ECM / ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<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 @@ -406,7 +408,7 @@ 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 buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) OldVATRates=Poprzednia stawka VAT NewVATRates=Nowa stawka VAT PriceBaseTypeToChange=Zmiana dla cen opartych na wartości referencyjnej ustalonej na @@ -668,7 +670,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=Marże -Module59000Desc=Moduł do zarządzania marżami +Module59000Desc=Module to follow margins Module60000Name=Prowizje Module60000Desc=Moduł do zarządzania prowizjami Module62000Name=Formuły handlowe @@ -1306,7 +1308,7 @@ 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=Pozycjonowanie -YouHaveXObjectUseSearchOptim=You have %s %s in the database. You should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,13 @@ 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 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=Domyślny kod kreskowy typu użyć do produktów @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=Nowe menu MenuHandler=Menu obsługi MenuModule=Źródło modułu -HideUnauthorizedMenu= Ukryj nieautoryzowane menu (wyszarz) +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=Id menu DetailMenuHandler=Menu obsługi gdzie pokazać nowe menu DetailMenuModule=Moduł nazwę w menu, jeśli pochodzą z modułem @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Kod pocztowy MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/pl_PL/banks.lang b/htdocs/langs/pl_PL/banks.lang index 58fe92e5f58..31fa178b5f7 100644 --- a/htdocs/langs/pl_PL/banks.lang +++ b/htdocs/langs/pl_PL/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/pl_PL/blockedlog.lang b/htdocs/langs/pl_PL/blockedlog.lang index 8ca78fd8046..dae949d1149 100644 --- a/htdocs/langs/pl_PL/blockedlog.lang +++ b/htdocs/langs/pl_PL/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/pl_PL/boxes.lang b/htdocs/langs/pl_PL/boxes.lang index 3c3730b9e9c..7dd168a0e77 100644 --- a/htdocs/langs/pl_PL/boxes.lang +++ b/htdocs/langs/pl_PL/boxes.lang @@ -46,9 +46,12 @@ 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 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 LastRefreshDate=Data ostatniego odświeżenia NoRecordedBookmarks=Brak zdefiniowanych zakładek @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Księgowość +ValidatedProjects=Validated projects diff --git a/htdocs/langs/pl_PL/cashdesk.lang b/htdocs/langs/pl_PL/cashdesk.lang index 337d7d5708e..f420c946b3c 100644 --- a/htdocs/langs/pl_PL/cashdesk.lang +++ b/htdocs/langs/pl_PL/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=Ilość faktur Paymentnumpad=Type of Pad to enter payment Numberspad=Numbers Pad @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/pl_PL/categories.lang b/htdocs/langs/pl_PL/categories.lang index a6dfccaf849..b0372678bc6 100644 --- a/htdocs/langs/pl_PL/categories.lang +++ b/htdocs/langs/pl_PL/categories.lang @@ -19,6 +19,7 @@ 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) NewCategory=Nowy tag / kategoria ModifCat=Modyfikuj tag/kategorię CatCreated=Tag / kategoria stworzona @@ -65,16 +66,22 @@ UsersCategoriesShort=Znaczniki/kategorie użytkowników StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag / ID kategorii -CatSupList=List of vendor tags/categories -CatCusList=Lista klientów / perspektywa tagów / kategorii +ParentCategory=Parent tag/category +ParentCategoryLabel=Label of parent tag/category +CatSupList=List of vendors tags/categories +CatCusList=List of customers/prospects tags/categories CatProdList=Lista tagów/kategorii produktów CatMemberList=Lista tagów/kategorii członków -CatContactList=Lista tagów/kategorii kontaktu -CatSupLinks=Powiązania między dostawcami i tagami/kategoriami +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=Powiązania między klientami / perspektyw i tagów / kategorii CatContactsLinks=Links between contacts/addresses and tags/categories CatProdLinks=Powiązania między produktami/usługami i tagami/kategoriami -CatProJectLinks=Połączenia pomiędzy projektami a 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 DeleteFromCat=Usuń z tagów/kategorii ExtraFieldsCategories=Atrybuty uzupełniające CategoriesSetup=Tagi / kategorie Konfiguracja diff --git a/htdocs/langs/pl_PL/companies.lang b/htdocs/langs/pl_PL/companies.lang index 0c7c3c2eb09..c5d2714854e 100644 --- a/htdocs/langs/pl_PL/companies.lang +++ b/htdocs/langs/pl_PL/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi VATIntraManualCheck=You can also check manually on the European Commission website <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=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Pracownicy ProspectLevelShort=Potencjał diff --git a/htdocs/langs/pl_PL/compta.lang b/htdocs/langs/pl_PL/compta.lang index 1596c31aaa7..cb71232d049 100644 --- a/htdocs/langs/pl_PL/compta.lang +++ b/htdocs/langs/pl_PL/compta.lang @@ -111,7 +111,7 @@ 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 ascending on %s and filtered for 1 bank account +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=Kod księg. klienta @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Jesteś pewien/a, że chcesz oznaczyć tą opła 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 invoices even if they are not yet accounted in ledger. +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= <b>Tryb% SRE faktur klienta - dostawcy wystawia faktury% s</b> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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=- 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. 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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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=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 diff --git a/htdocs/langs/pl_PL/cron.lang b/htdocs/langs/pl_PL/cron.lang index 745767075eb..68a5f84d9e3 100644 --- a/htdocs/langs/pl_PL/cron.lang +++ b/htdocs/langs/pl_PL/cron.lang @@ -6,14 +6,15 @@ Permission23102 = Stwórz/zaktualizuj zaplanowane zadanie Permission23103 = Usuń zaplanowane zadanie Permission23104 = Wykonaj zaplanowane zadanie # Admin -CronSetup= Konfiguracja zarządzania zaplanowanymi zadaniami -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=Albo sprawdzić i uruchomić określonej pracy +CronSetup=Konfiguracja zarządzania zaplanowanymi zadaniami +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=Klucz zabezpieczeń dla URL, aby uruchomić cron FileToLaunchCronJobs=Command line to check and launch qualified cron jobs CronExplainHowToRunUnix=W środowisku Unix należy użyć następującego wpisu crontab, aby uruchomić wiersz poleceń co 5 minut -CronExplainHowToRunWin=W środowisku Microsoft Windows(tm) można użyć narzędzia Zaplanowane zadania, aby uruchomić linię poleceń co 5 minut +CronExplainHowToRunWin=On Microsoft(tm) Windows environment you can use Scheduled Task tools to run the command line each 5 minutes CronMethodDoesNotExists=Klasa %s nie zawiera żadnej metody %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 @@ -42,10 +43,11 @@ CronModule=Moduł CronNoJobs=Brak zarejestrowanych zadań CronPriority=Priorytet CronLabel=Etykieta -CronNbRun=Ilość uruchomień -CronMaxRun=Max number launch +CronNbRun=Number of launches +CronMaxRun=Maximum number of launches CronEach=Każdy JobFinished=Zadania uruchomione i zakończone +Scheduled=Scheduled #Page card CronAdd= Dodaj zadanie CronEvery=Wykonaj każde zadanie @@ -56,16 +58,16 @@ CronNote=Komentarz CronFieldMandatory=Pole %s jest obowiązkowe CronErrEndDateStartDt=Data zakończenia nie może być wcześniejsza niż data rozpoczęcia StatusAtInstall=Status at module installation -CronStatusActiveBtn=Włączone +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Wyłączone CronTaskInactive=To zadanie jest wyłączone CronId=ID CronClassFile=Filename with class -CronModuleHelp=Name of Dolibarr module directory (also work with external Dolibarr module). <BR> For exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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=System linii poleceń do wykonania. CronCreateJob=Utwórz nowe zaplanowane zadanie CronFrom=Z @@ -76,8 +78,14 @@ CronType_method=Call method of a PHP Class CronType_command=Polecenie powłoki 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=Idź do "Strona główna - Narzędzia administracyjne - Zaplanowane zadania" aby zobaczyć i zmieniać zaplanowane zadania +UseMenuModuleToolsToAddCronJobs=Go into menu "<a href="%s">Home - Admin tools - Scheduled jobs</a>" to see and edit scheduled jobs. JobDisabled=Zadanie wyłączone MakeLocalDatabaseDumpShort=Backup lokalnej bazy danych -MakeLocalDatabaseDump=Create a local database dump. Parameters are: compression ('gz' or 'bz' or 'none'), backup type ('mysql' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/pl_PL/errors.lang b/htdocs/langs/pl_PL/errors.lang index 13d89600986..bd9179e37d9 100644 --- a/htdocs/langs/pl_PL/errors.lang +++ b/htdocs/langs/pl_PL/errors.lang @@ -5,8 +5,10 @@ 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) 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. ErrorLoginAlreadyExists=Zaloguj %s już istnieje. ErrorGroupAlreadyExists=Grupa %s już istnieje. ErrorRecordNotFound=Rekord nie został znaleziony. @@ -48,6 +50,7 @@ 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 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. @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=Ta nazwa profil już istnieje dla tego zestawu ekspor 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=Numer identyfikacyjny używany do tworzenia już istnieje. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=Hasło zostało ustawione dla tego użytkownika. Jednakże nie Konto użytkownika zostało utworzone. Więc to hasło jest przechowywane, ale nie mogą być używane do logowania do Dolibarr. Może być stosowany przez zewnętrzny moduł / interfejsu, ale jeśli nie trzeba definiować dowolną logowania ani hasła do członka, można wyłączyć opcję "Zarządzaj login dla każdego członka" od konfiguracji modułu użytkownika. Jeśli potrzebujesz zarządzać logowanie, ale nie wymagają hasła, możesz zachować to pole puste, aby uniknąć tego ostrzeżenia. Uwaga: E może być również stosowany jako login, jeśli element jest połączony do użytkownika. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Twój login został zmodyfikowany. Z powo 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/pl_PL/exports.lang b/htdocs/langs/pl_PL/exports.lang index dd5e8ee3731..4a291b908d4 100644 --- a/htdocs/langs/pl_PL/exports.lang +++ b/htdocs/langs/pl_PL/exports.lang @@ -26,6 +26,8 @@ FieldTitle=pole tytuł NowClickToGenerateToBuildExportFile=Now, select the file format in the combo box and click on "Generate" to build the export file... AvailableFormats=Available Formats LibraryShort=Biblioteka +ExportCsvSeparator=Csv caracter separator +ImportCsvSeparator=Csv caracter separator Step=Krok 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. @@ -131,3 +133,4 @@ KeysToUseForUpdates=Key (column) to use for <b>updating</b> existing data NbInsert=ilość wprowadzonych linii: %s NbUpdate=Ilość zaktualizowanych linii: %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/pl_PL/mails.lang b/htdocs/langs/pl_PL/mails.lang index 10ef6063468..54209fa28ee 100644 --- a/htdocs/langs/pl_PL/mails.lang +++ b/htdocs/langs/pl_PL/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Linia w pliku %s @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=Nie wysłano wiadomości email. Zły email nadawcy lub odbiorcy. Sprawdź profil użytkownika. # Module Notifications Notifications=Powiadomienia -NoNotificationsWillBeSent=Brak planowanych powiadomień mailowych dla tego wydarzenia i firmy -ANotificationsWillBeSent=1 zgłoszenie zostanie wysłane pocztą elektroniczną -SomeNotificationsWillBeSent=%s powiadomienia będą wysyłane przez e-mail -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=Lista wszystkich powiadomień wysłanych maili +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=Konfiguracja poczty e-mail wysyłającego musi być połączone z '% s'. Tryb ten może być wykorzystywany do wysyłania masowego wysyłania. MailSendSetupIs2=Najpierw trzeba przejść, z konta administratora, w menu% sHome - Ustawienia - e-maile% s, aby zmienić parametr <strong>'% s'</strong> na tryb '% s' używać. W tym trybie można wprowadzić ustawienia serwera SMTP dostarczonych przez usługodawcę internetowego i używać funkcji e-maila Mszę św. MailSendSetupIs3=Jeśli masz jakieś pytania na temat konfiguracji serwera SMTP, możesz zapytać %s. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=Informacja ContactsWithThirdpartyFilter=Contacts with third-party filter Unanswered=Unanswered Answered=Answered IsNotAnAnswer=Is not answer (initial email) IsAnAnswer=Is an answer of an initial email +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/pl_PL/main.lang b/htdocs/langs/pl_PL/main.lang index 401ac7b9b3c..8d654d34ccd 100644 --- a/htdocs/langs/pl_PL/main.lang +++ b/htdocs/langs/pl_PL/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=Szablon niedostępny dla tego typu wiadomości email 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 NoRecordFound=Rekord nie został znaleziony. NoRecordDeleted=Brak usuniętych rekordów NotEnoughDataYet=Za mało danych @@ -85,6 +87,8 @@ FileWasNotUploaded=Wybrano pliku do zamontowaia, ale jeszcze nie wysłano. W tym NbOfEntries=No. of entries GoToWikiHelpPage=Przeczytaj pomoc online (wymaga połączenia z internetem) GoToHelpPage=Przeczytaj pomoc +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Strona główna RecordSaved=Rekord zapisany RecordDeleted=Rekord usunięty RecordGenerated=Rekord wygenerowany @@ -220,6 +224,7 @@ Value=Wartość PersonalValue=Osobiste wartości NewObject=Nowy %s NewValue=Nowa wartość +OldValue=Old value %s CurrentValue=Aktualna wartość Code=Kod Type=Typ @@ -433,6 +438,7 @@ RemainToPay=Pozostało do zapłaty Module=Moduł/Aplikacja Modules=Moduły/Aplikacje Option=Opcja +Filters=Filters List=Lista FullList=Pełna lista FullConversation=Full conversation @@ -650,6 +656,7 @@ SupplierPreview=Podgląd dostawcy ShowCustomerPreview=Pokaż podgląd klienta ShowSupplierPreview=Pokaż podgląd dostawcy RefCustomer=Nr ref. klient +InternalRef=Internal ref. Currency=Waluta InfoAdmin=Informacje dla administratorów Undo=Cofnij @@ -671,7 +678,7 @@ SendMail=Wyślij wiadomość email Email=Adres e-mail NoEMail=Brak e-mail AlreadyRead=Obecnie przeczytane -NotRead=Nie przeczytane +NotRead=Unread NoMobilePhone=Brak telefonu komórkowego Owner=Właściciel FollowingConstantsWillBeSubstituted=Kolejna zawartość będzie zastąpiona wartością z korespondencji. @@ -1107,3 +1114,9 @@ UpToDate=Up-to-date OutOfDate=Out-of-date EventReminder=Event Reminder UpdateForAllLines=Update for all lines +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 diff --git a/htdocs/langs/pl_PL/modulebuilder.lang b/htdocs/langs/pl_PL/modulebuilder.lang index d9d1d794c77..e2346e75b40 100644 --- a/htdocs/langs/pl_PL/modulebuilder.lang +++ b/htdocs/langs/pl_PL/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/pl_PL/mrp.lang b/htdocs/langs/pl_PL/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/pl_PL/mrp.lang +++ b/htdocs/langs/pl_PL/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/pl_PL/other.lang b/htdocs/langs/pl_PL/other.lang index 42937a4dc0d..22befcd2e4c 100644 --- a/htdocs/langs/pl_PL/other.lang +++ b/htdocs/langs/pl_PL/other.lang @@ -5,8 +5,6 @@ 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. Birthday=Urodziny -BirthdayDate=Data urodzin -DateToBirth=Birth date BirthdayAlertOn=urodziny wpisu aktywnych BirthdayAlertOff=urodziny wpisu nieaktywne TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Rozłączono. Idź do strony logowania... @@ -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=Zobacz konfigurację modułu% s NbOfAttachedFiles=Liczba załączonych plików / dokumentów TotalSizeOfAttachedFiles=Całkowita wielkość załączonych plików / dokumentów @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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=Wybierz profil demo najlepiej odzwierciedlający twoje potrzeby... ChooseYourDemoProfilMore=...or build your own profile<br>(manual module selection) @@ -137,7 +139,7 @@ Right=Prawo CalculatedWeight=Obliczona waga CalculatedVolume=Obliczona wartość Weight=Waga -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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=Przywóz zestaw danych DolibarrNotification=Automatyczne powiadomienie ResizeDesc=Skriv inn ny <b>bredde</b> eller ny høyde. Forhold vil bli holdt under resizing ... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Wywóz obszarze diff --git a/htdocs/langs/pl_PL/products.lang b/htdocs/langs/pl_PL/products.lang index bac16142cef..3317f16ba9a 100644 --- a/htdocs/langs/pl_PL/products.lang +++ b/htdocs/langs/pl_PL/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Ilość cen DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=Liczba dominującej opakowaniu produktu @@ -167,8 +168,10 @@ BuyingPrices=Cena zakupu CustomerPrices=Ceny klienta SuppliersPrices=Ceny dostawców SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +CustomCode=Customs|Commodity|HS code 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 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Zastosuj stałą cenę PriceByQuantity=Różne ceny według ilości DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Zakres ilości -MultipriceRules=Price segment rules +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=%% Zmiany na% s PercentDiscountOver=%% Rabatu na% s diff --git a/htdocs/langs/pl_PL/projects.lang b/htdocs/langs/pl_PL/projects.lang index 05a7af17809..6a19404be3c 100644 --- a/htdocs/langs/pl_PL/projects.lang +++ b/htdocs/langs/pl_PL/projects.lang @@ -76,15 +76,16 @@ MyActivities=Moje zadania / aktywności MyProjects=Moje projekty MyProjectsArea=Obszar moich projektów DurationEffective=Efektywny czas trwania -ProgressDeclared=Deklarowany postęp +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Obliczony postęp +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=Czas +TimeConsumed=Consumed ListOfTasks=Lista zadań GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/pl_PL/recruitment.lang b/htdocs/langs/pl_PL/recruitment.lang index 8faa1e9912f..d1f573b8bf9 100644 --- a/htdocs/langs/pl_PL/recruitment.lang +++ b/htdocs/langs/pl_PL/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/pl_PL/sendings.lang b/htdocs/langs/pl_PL/sendings.lang index 69db52a7677..1b1f4fc5baf 100644 --- a/htdocs/langs/pl_PL/sendings.lang +++ b/htdocs/langs/pl_PL/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Inne wysyłki do tego zamówienia SendingsAndReceivingForSameOrder=Shipments and receipts for this order SendingsToValidate=Transporty do zatwierdzenia StatusSendingCanceled=Anulowany +StatusSendingCanceledShort=Anulowany StatusSendingDraft=Szkic StatusSendingValidated=Zatwierdzone (produkty do wysyłki lub już wysłane) StatusSendingProcessed=Przetwarzany @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=W pierwszej kolejności musisz zatwierdzić zam # Sending methods # ModelDocument DocumentModelTyphon=Więcej kompletny dokument model dostawy wpływy (logo. ..) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Stała EXPEDITION_ADDON_NUMBER nie zdefiniowano SumOfProductVolumes=Suma wolumenów SumOfProductWeights=Suma wag produktów diff --git a/htdocs/langs/pl_PL/stocks.lang b/htdocs/langs/pl_PL/stocks.lang index b7b0ba0716a..889b96b4be4 100644 --- a/htdocs/langs/pl_PL/stocks.lang +++ b/htdocs/langs/pl_PL/stocks.lang @@ -62,6 +62,7 @@ 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 MainDefaultWarehouse=Domyślny magazyn @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/pl_PL/ticket.lang b/htdocs/langs/pl_PL/ticket.lang index e33e54c62e2..457e5110c6b 100644 --- a/htdocs/langs/pl_PL/ticket.lang +++ b/htdocs/langs/pl_PL/ticket.lang @@ -18,23 +18,21 @@ # Generic # -Module56000Name=Tickets +Module56000Name=Bilety Module56000Desc=System biletów do zarządzania kwestiami lub żądaniami -Permission56001=See tickets -Permission56002=Modify tickets -Permission56003=Delete tickets -Permission56004=Manage tickets +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) -TicketDictType=Ticket - Types +TicketDictType=Bilet - Typ TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Inne TicketSeverityShortLOW=Niski TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=Wysoki -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Czytać Assigned=Assigned InProgress=W trakcie @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/pl_PL/website.lang b/htdocs/langs/pl_PL/website.lang index 2d9b4e9aa97..bb7ff022723 100644 --- a/htdocs/langs/pl_PL/website.lang +++ b/htdocs/langs/pl_PL/website.lang @@ -30,7 +30,6 @@ EditInLine=Edytuj w linii AddWebsite=Dodaj witrynę Webpage=Strona/pojemnik AddPage=Dodaj stronę -HomePage=Strona główna PageContainer=Strona PreviewOfSiteNotYetAvailable=Podgląd Twej witryny <strong>%s</strong> nie jest jeszcze dostępny. Użyj wpierw '<strong>Załaduj szablon witryny</strong>' lub '<strong>Dodaj stronę/pojemnik</strong>'. RequestedPageHasNoContentYet=Żądana strona o identyfikatorze %s nie ma jeszcze treści lub plik pamięci podręcznej .tpl.php został usunięty. Edytuj zawartość strony, aby to rozwiązać. @@ -101,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=Uwzględnij zawartość dynamiczną +ShowSubcontainers=Show dynamic content InternalURLOfPage=Wewnętrzny adres URL strony ThisPageIsTranslationOf=Ta strona/pojemnik to tłumaczenie ThisPageHasTranslationPages=Ta strona/pojemnik ma tłumaczenie @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/pl_PL/withdrawals.lang b/htdocs/langs/pl_PL/withdrawals.lang index a9750a149e1..4d30e8d9c2e 100644 --- a/htdocs/langs/pl_PL/withdrawals.lang +++ b/htdocs/langs/pl_PL/withdrawals.lang @@ -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>. ClassCredited=Klasyfikacja zapisane @@ -131,7 +132,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,3 +148,5 @@ 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=Opcja dla trybu rzeczywistego nie był ustawiony, zatrzymujemy po tej symulacji ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorICSmissing=Missing ICS in Bank account %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/pl_PL/workflow.lang b/htdocs/langs/pl_PL/workflow.lang index 384e999ce1e..2fe7a50b80e 100644 --- a/htdocs/langs/pl_PL/workflow.lang +++ b/htdocs/langs/pl_PL/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=Automatyczne utworzenie AutomaticClassification=Automatyczne zaklasyfikowanie +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/pt_AO/main.lang b/htdocs/langs/pt_AO/main.lang new file mode 100644 index 00000000000..2e691473326 --- /dev/null +++ b/htdocs/langs/pt_AO/main.lang @@ -0,0 +1,21 @@ +# Dolibarr language file - Source file is en_US - main +DIRECTION=ltr +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 diff --git a/htdocs/langs/pt_AO/mrp.lang b/htdocs/langs/pt_AO/mrp.lang new file mode 100644 index 00000000000..e65383ffd8f --- /dev/null +++ b/htdocs/langs/pt_AO/mrp.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +NewBOM=New bill of material diff --git a/htdocs/langs/pt_BR/accountancy.lang b/htdocs/langs/pt_BR/accountancy.lang index d453360b552..e4b7f6b2454 100644 --- a/htdocs/langs/pt_BR/accountancy.lang +++ b/htdocs/langs/pt_BR/accountancy.lang @@ -87,7 +87,6 @@ VentilatedinAccount=Vinculado a conta contábil com sucesso NotVentilatedinAccount=Não vinculado a conta contábil XLineSuccessfullyBinded=%s produtos / serviços vinculados com sucesso a uma conta contábil XLineFailedToBeBinded=%s produtos/serviços não estão vinculados a qualquer conta da Contabilidade -ACCOUNTING_LIMIT_LIST_VENTILATION=Número de elementos a vincular mostrados por página (máximo recomendado: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Iniciar a página "Vinculações a fazer" ordenando pelos elementos mais recentes ACCOUNTING_LIST_SORT_VENTILATION_DONE=Iniciar a página "Vinculações feitas" ordenando pelos elementos mais recentes ACCOUNTING_LENGTH_DESCRIPTION=Truncar a descrição de Produtos & Serviços nas listagens, após x caracteres (Melhor = 50) @@ -122,10 +121,8 @@ ACCOUNTING_SERVICE_SOLD_ACCOUNT=Conta contábil padrão para os serviços vendid ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT=Conta contábil por padrão para os serviços vendidos na EEC (usada se não definida na ficha de serviço) ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT=Conta contábil por padrão para os serviços vendidos e exportados para fora do EEC (usados ​​se não definidos na ficha de serviço) LabelAccount=Conta rótulo -Sens=Significado JournalLabel=Rótulo de jornal TransactionNumShort=Nº da transação -GroupByAccountAccounting=Agrupar pela conta da Contabilidade AccountingAccountGroupsDesc=Você pode definir aqui alguns grupos de contabilidade. Eles serão usados ​​para relatórios contábeis personalizados. NotMatch=Não Definido DelMonth=Mês a excluir @@ -153,7 +150,6 @@ UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking=Conta de terceiro OpeningBalance=Saldo inicial ShowOpeningBalance=Mostrar saldo inicial HideOpeningBalance=Ocultar saldo inicial -ShowSubtotalByGroup=Mostrar subtotal por grupo Pcgtype=Plano de Contas PcgtypeDesc=O grupo de contas é usado como critério predefinido de 'filtro' e 'agrupamento' para alguns relatórios contábeis. Por exemplo, 'RENDA' ou 'DESPESA' são usados ​​como grupos para contas contábeis de produtos para criar o relatório de despesas / receitas. Reconcilable=Reconciliável @@ -172,7 +168,6 @@ DescClosure=Consulte aqui o número de movimentos por mês que não são validad OverviewOfMovementsNotValidated=Etapa 1 / Visão geral dos movimentos não validados. (Necessário para fechar um ano fiscal) ValidateMovements=Validar movimentações DescValidateMovements=Qualquer modificação ou exclusão de escrita, letras e exclusões será proibida. Todas as entradas para um exercício devem ser validadas, caso contrário, o fechamento não será possível -SelectMonthAndValidate=Selecionar mês e validar movimentações ValidateHistory=Vincular Automaticamente AutomaticBindingDone=Vinculação automática realizada ErrorAccountancyCodeIsAlreadyUse=Erro, você não pode excluir esta conta contábil, pois ela esta em uso diff --git a/htdocs/langs/pt_BR/admin.lang b/htdocs/langs/pt_BR/admin.lang index a6c2222a0d7..74da419d9fb 100644 --- a/htdocs/langs/pt_BR/admin.lang +++ b/htdocs/langs/pt_BR/admin.lang @@ -33,6 +33,8 @@ UnlockNewSessions=Remover Bloqueio de Conexão YourSession=Sua Sessão Sessions=Sessões de Usuários WebUserGroup=Servidor Web para usuário/grupo +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"). DBStoringCharset=Charset base de dados para armazenamento de dados (Database charset to store data) DBSortingCharset=Charset base de dados para classificar os dados (Database charset to sort data) @@ -71,7 +73,6 @@ UsePreviewTabs=Usar previsão de digitação na tecla 'tab' ShowPreview=Mostrar Previsão PreviewNotAvailable=Previsão Indisponível ThemeCurrentlyActive=Tema Ativo -CurrentTimeZone=Timezone PHP (do servidor apache) MySQLTimeZone=Timezone Mysql (do servidor sql) NextValue=Próximo Valor NextValueForInvoices=Próximo Valor (Faturas) @@ -121,7 +122,6 @@ 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) -PurgeDeleteTemporaryFilesShort=Excluir arquivos 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 @@ -214,6 +214,7 @@ MAIN_MAIL_AUTOCOPY_TO=Copiar (Cco) todos os e-mails enviados para MAIN_DISABLE_ALL_MAILS=Desativar todo o envio de e-mail (para fins de teste ou demonstrações) MAIN_MAIL_FORCE_SENDTO=Envie todos os e-mails para (em vez de destinatários reais, para fins de teste) MAIN_MAIL_ENABLED_USER_DEST_SELECT=Sugira e-mails de funcionários (se definidos) na lista de destinatários predefinidos ao escrever um novo e-mail +MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED=Autorizar certificados auto-assinados MAIN_MAIL_EMAIL_DKIM_ENABLED=Use o DKIM para gerar assinatura de e-mail MAIN_MAIL_EMAIL_DKIM_DOMAIN=Domínio de e-mail para uso com o dkim MAIN_SMS_SENDMODE=Método usado para enviar SMS @@ -272,7 +273,6 @@ LanguageFilesCachedIntoShmopSharedMemory=Os arquivos .lang foram carregados na m LanguageFile=Arquivo de idioma ListOfDirectories=Lista de diretórios com templates de documentos abertos(.odt) ListOfDirectoriesForModelGenODT=A lista de diretórios contém modelos de arquivos no formato OpenDocument.<br><br>Insira aqui o caminho dos diretórios.<br>Adicione uma quebra de linha entre cada diretório.<br>Para adicionar um diretório do módulo GED, adicione aqui <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b>.<br><br>Os arquivos nestes diretórios devem terminar com <b>.odt</b> ou <b>.ods</b>. -ExampleOfDirectoriesForModelGen=Exemplo de sintaxe:<br>c:\\meudir<br>/home/meudir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br>Para saber como criar seus temas de documento em ODT, antes de armazená-los nesses diretórios, leia a documentação wiki: FirstnameNamePosition=Posição do Nome/Sobrenome KeyForWebServicesAccess=Chave para usar o Serviços Web (parâmetro "dolibarrkey" no serviço web) @@ -467,7 +467,6 @@ Module50400Name=Contabilidade (entrada dupla) Module54000Name=ImprimirIPP Module55000Name=Pesquisa Aberta Module55000Desc=Criar pesquisas, enquetes ou votos on-line (como Doodle, Studs, RDVz etc ...) -Module59000Desc=Módulo para gerenciar margens Module60000Desc=Módulo para gerenciar comissão Module63000Desc=Gerenciar recursos (impressoras, carros, salas, ...) para alocar eventos Permission11=Ler Faturas de Clientes @@ -1183,7 +1182,6 @@ MenuDeleted=Menu Deletado NotTopTreeMenuPersonalized=Menus personalizados não conectados à uma entrada do menu superior NewMenu=Novo Menu MenuModule=Fonte do módulo -HideUnauthorizedMenu=Esconder menus não autorizados (cinza) 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 @@ -1380,8 +1378,6 @@ EmailCollectorDescription=Adicione um trabalho agendado e uma página de configu NewEmailCollector=Novo coletor de e-mail 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 coleta testada -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? @@ -1449,4 +1445,7 @@ RssNote=Nota: Cada definição de feed RSS fornece um widget que você deve ativ JumpToBoxes=Vá para Configuração -> Widgets MeasuringUnitTypeDesc=Use aqui um valor como "tamanho", "superfície", "volume", "peso", "tempo" MeasuringScaleDesc=A escala é o número de casas que você precisa mover a parte decimal para corresponder à unidade de referência padrão. Para o tipo de unidade "time", é o número de segundos. Valores entre 80 e 99 são valores reservados. +TemplateAdded=Modelo adicionado +TemplateUpdated=Modelo atualizado +TemplateDeleted=Modelo excluído DictionaryProductNature=Natureza do produto diff --git a/htdocs/langs/pt_BR/banks.lang b/htdocs/langs/pt_BR/banks.lang index 8b5063b041d..e57792e9621 100644 --- a/htdocs/langs/pt_BR/banks.lang +++ b/htdocs/langs/pt_BR/banks.lang @@ -134,8 +134,6 @@ ShowVariousPayment=Mostrar pagamento diverso AddVariousPayment=Adicionar 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=Caixa de dinheiro PDV -NewCashFence=Nova 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 diff --git a/htdocs/langs/pt_BR/bills.lang b/htdocs/langs/pt_BR/bills.lang index 34fb1404b65..a20be8fd4bd 100644 --- a/htdocs/langs/pt_BR/bills.lang +++ b/htdocs/langs/pt_BR/bills.lang @@ -2,11 +2,8 @@ BillsCustomer=Fatura de cliente BillsCustomersUnpaid=Faturas de clientes não pagos BillsCustomersUnpaidForCompany=Faturas de clientes não pagas para %s -BillsSuppliersUnpaid=Faturas de fornecedores não pagas -BillsSuppliersUnpaidForCompany=Faturas de fornecedores não pagas para %s BillsLate=Pagamentos atrasados BillsStatistics=Estatísticas de faturas de clientes -BillsStatisticsSuppliers=Estatísticas de faturas de fornecedores DisabledBecauseDispatchedInBookkeeping=Desativado porque a nota fiscal foi despachada na contabilidade DisabledBecauseNotLastInvoice=Desativado porque a fatura não é apagável. Algumas faturas foram gravadas após esta e ele criará buracos no balcão. DisabledBecauseNotErasable=Desativada já que não pode ser apagada @@ -42,16 +39,13 @@ InvoiceCustomer=Fatura de cliente CustomerInvoice=Fatura de cliente CustomersInvoices=Faturas de clientes SupplierInvoice=Fatura do fornecedores -SuppliersInvoices=Faturas de fornecedores SupplierBill=Fatura do fornecedores SupplierBills=Faturas de fornecedores PaymentBack=Reembolso CustomerInvoicePaymentBack=Reembolso -PaymentsBack=Reembolsos PaidBack=Reembolso pago DeletePayment=Deletar pagamento ConfirmDeletePayment=Você tem certeza que deseja excluir este pagamento? -ConfirmConvertToReduc=Deseja converter este %s em um crédito disponível? ConfirmConvertToReduc2=O valor será salvo junto a todos os descontos e poderá ser usado como desconto em uma fatura atual ou futura deste cliente. ConfirmConvertToReducSupplier=Deseja converter este %s em um crédito disponível? ConfirmConvertToReducSupplier2=O valor será salvo junto a todos os descontos e poderá ser usado como desconto em uma fatura atual ou futura deste fornecedor. @@ -63,15 +57,12 @@ PaymentsReportsForYear=Relatórios de pagamentos por %s PaymentsAlreadyDone=Pagamentos já feitos PaymentsBackAlreadyDone=Reembolsos já realizados PaymentRule=Regra de pagamento -PaymentMode=Tipo de pagamento PaymentTypeDC=Cartão de débito / crédito IdPaymentMode=Tipo de pagamento (id) CodePaymentMode=Tipo de pagamento (código) LabelPaymentMode=Tipo de pagamento (etiqueta) PaymentModeShort=Tipo de pagamento PaymentTerm=Termo de pagamento -PaymentConditions=Termos de pagamento -PaymentConditionsShort=Termos de pagamento PaymentAmount=Valor a ser pago PaymentHigherThanReminderToPay=Pagamento superior ao valor a ser pago ClassifyPaid=Classificar 'pago' @@ -199,7 +190,6 @@ SendReminderBillByMail=Enviar o restante por e-mail RelatedRecurringCustomerInvoices=Faturas recorrentes relacionadas ao cliente MenuToValid=Validar ClassifyBill=Classificar fatura -SupplierBillsToPay=Faturas de fornecedores não pagas CustomerBillsUnpaid=Faturas de clientes não pagos SetConditions=Definir condições de pagamento SetMode=Definir tipo de pagamento @@ -217,7 +207,6 @@ ExportDataset_invoice_1=Faturas do cliente e detalhes da fatura ExportDataset_invoice_2=Faturas de clientes e pagamentos ProformaBill=Conta pro-forma: Reductions=Reduções -ReductionsShort=Disco. AddDiscount=Criar desconto EditGlobalDiscounts=Editar desconto fixo ShowDiscount=Mostrar desconto @@ -252,7 +241,6 @@ DescTaxAndDividendsArea=Esta área apresenta um resumo de todos os pagamentos fe NbOfPayments=Nº. de pagamentos SplitDiscount=Dividir desconto em dois ConfirmSplitDiscount=Tem certeza de que deseja dividir este desconto de <b>%s</b> %s em dois descontos menores? -TotalOfTwoDiscountMustEqualsOriginal=O total dos dois novos descontos deve ser igual ao valor do desconto original. ConfirmRemoveDiscount=Você tem certeza que deseja remover este desconto? RelatedSupplierInvoices=Faturas de fornecedores relacionadas LatestRelatedBill=Últimas fatura correspondente @@ -296,11 +284,9 @@ PaymentTypeTRA=Cheque administrativo PaymentTypeShortTRA=Minuta BankDetails=Detalhes bancário BankCode=Código bancário -DeskCode=Código da Agência BankAccountNumber=Número da conta BankAccountNumberKey=Soma de verificação Residence=Endereço -IBANNumber=Número da conta IBAN IBAN=Agencia CustomerIBAN=IBAN do cliente SupplierIBAN=IBAN do fornecedor @@ -319,7 +305,6 @@ IntracommunityVATNumber=ID do IVA intracomunitário PaymentByChequeOrderedTo=Cheque pagamentos (incluindo impostos) são pagas para %s, enviar para PaymentByChequeOrderedToShort=Cheque pagamentos (incl. Imposto) são pagas para SendTo=Enviar para -PaymentByTransferOnThisBankAccount=Pagamento por transferência para a seguinte conta bancária VATIsNotUsedForInvoice=* Não aplicável ICMS art-293B de CGI LawApplicationPart1=Pela aplicação da lei 80.335 de 12/05/80 LawApplicationPart2=os bens permanece propriedade de @@ -371,7 +356,6 @@ TypeContact_facture_external_SERVICE=Contato de serviço de cliente TypeContact_invoice_supplier_internal_SALESREPFOLL=Fatura de fornecedor subsequente representativa TypeContact_invoice_supplier_external_BILLING=Contato da fatura do fornecedor TypeContact_invoice_supplier_external_SHIPPING=Contato de remessa do fornecedor -TypeContact_invoice_supplier_external_SERVICE=Contato de serviço 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 diff --git a/htdocs/langs/pt_BR/blockedlog.lang b/htdocs/langs/pt_BR/blockedlog.lang index 390258dcf55..0a12ec89ee3 100644 --- a/htdocs/langs/pt_BR/blockedlog.lang +++ b/htdocs/langs/pt_BR/blockedlog.lang @@ -8,6 +8,7 @@ BrowseBlockedLog=Logs nao modificaveis ShowAllFingerPrintsMightBeTooLong=Mostrar todos os Logs Arquivados (pode ser demorado) ShowAllFingerPrintsErrorsMightBeTooLong=Mostrar todos os arquivos de log inválidos (pode demorar) DownloadBlockChain=Baixar impressoes digitais +KoCheckFingerprintValidity=A entrada de log arquivada não é válida. Isso significa que alguém (um hacker?) Modificou alguns dados desse registro depois que ele foi gravado ou apagou o registro arquivado anterior (verifique se existe a linha com o número anterior). OkCheckFingerprintValidity=O registro de log arquivado é válido. Os dados nesta linha não foram modificados e a entrada segue a anterior. OkCheckFingerprintValidityButChainIsKo=O log arquivado parece válido em comparação com o anterior, mas a cadeia foi previamente corrompida. AddedByAuthority=Salvo na autoridade remota @@ -17,7 +18,6 @@ logPAYMENT_VARIOUS_MODIFY=Pagamento (não atribuído a uma fatura) modificado logPAYMENT_VARIOUS_DELETE=Pagamento (não atribuído a uma fatura) exclusão lógica logBILL_VALIDATE=Fatura de cliente confirmada logBILL_SENTBYMAIL=Fatura do cliente enviada por email -logCASHCONTROL_VALIDATE=Gravação de caixa Fingerprint=Impressao digial logDOC_PREVIEW=Pré -visualização de um documento validado para imprimir ou baixar DataOfArchivedEvent=Dados completos do evento arquivado diff --git a/htdocs/langs/pt_BR/boxes.lang b/htdocs/langs/pt_BR/boxes.lang index 77eb32557aa..0d2b4f7a911 100644 --- a/htdocs/langs/pt_BR/boxes.lang +++ b/htdocs/langs/pt_BR/boxes.lang @@ -35,25 +35,22 @@ BoxTitleLastModifiedDonations=Últimas %s doações modificadas BoxTitleLatestModifiedBoms=%s BOMs modificadas recentemente BoxTitleLatestModifiedMos=%s ordens de fabricação modificadas recentemente BoxGlobalActivity=Atividade global (faturas, propostas, pedidos) +BoxScheduledJobs=Tarefas agendadas 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. NoRecordedContacts=Nenhum contato registrado NoActionsToDo=Nenhuma ação para fazer -NoRecordedOrders=Nenhum pedido de venda registrado NoRecordedProposals=Nenhum possível cliente registrado NoRecordedInvoices=Nenhuma nota fiscal registrada NoUnpaidCustomerBills=Não há notas fiscais de clientes não pagas NoUnpaidSupplierBills=Nenhuma fatura de fornecedor não paga -NoModifiedSupplierBills=Nenhuma fatura de fornecedor registrada NoRecordedProducts=Nenhum registro de produtos/serviços NoRecordedProspects=Nenhum registro de possíveis clientes NoContractedProducts=Nenhum produtos/serviços contratados NoRecordedContracts=Nenhum registro de contratos NoRecordedInterventions=Nenhum registro de intervenções -BoxLatestSupplierOrders=Últimos pedidos de compra BoxLatestSupplierOrdersAwaitingReception=Últimos pedidos (com uma recepção pendente) -NoSupplierOrder=Nenhum pedido de compra registrado BoxCustomersInvoicesPerMonth=Faturas do cliente por mês BoxSuppliersInvoicesPerMonth=Faturas do fornecedor por mês BoxCustomersOrdersPerMonth=Pedidos de vendas por mês @@ -73,8 +70,6 @@ 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=Últimas entradas manuais em contabilidade -BoxTitleLastManualEntries=%s últimas entradas manuais NoRecordedManualEntries=Nenhuma entrada manual registrada na contabilidade BoxSuspenseAccount=Operação de contabilidade com conta suspensa BoxTitleSuspenseAccount=Número de linhas não alocadas diff --git a/htdocs/langs/pt_BR/cashdesk.lang b/htdocs/langs/pt_BR/cashdesk.lang index ff2e4bbd438..3a5201ded49 100644 --- a/htdocs/langs/pt_BR/cashdesk.lang +++ b/htdocs/langs/pt_BR/cashdesk.lang @@ -25,8 +25,6 @@ Footer=Rodapé AmountAtEndOfPeriod=Montante no final do período (dia, mês ou ano) TheoricalAmount=Quantidade teórica RealAmount=Quantidade real -CashFence=Cerca de dinheiro -CashFenceDone=Caixa feito para o período NbOfInvoices=Núm. de faturas Paymentnumpad=Tipo de Pad para inserir pagamento Numberspad=Números de Pad @@ -70,7 +68,6 @@ CashDeskRefNumberingModules=Módulo de numeração para vendas PDV CashDeskGenericMaskCodes6 =<br>A tag {TN} é usada para adicionar o número do terminal TakeposGroupSameProduct=Agrupe as mesmas linhas de produtos StartAParallelSale=Iniciar uma nova venda paralela -CloseCashFence=Fechar cerca de dinheiro CashReport=Relatório de caixa MainPrinterToUse=Impressora principal a ser usada OrderPrinterToUse=Solicite impressora a ser usada diff --git a/htdocs/langs/pt_BR/categories.lang b/htdocs/langs/pt_BR/categories.lang index fd9c6ce0047..daab834c237 100644 --- a/htdocs/langs/pt_BR/categories.lang +++ b/htdocs/langs/pt_BR/categories.lang @@ -56,15 +56,13 @@ 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 -CatCusList=Lista de cliente / perspectivas de tags / categorias CatProdList=Lista de produtos tags / categorias CatMemberList=Lista de membros tags / categorias -CatContactList=Lista de contatos tags / categorias -CatSupLinks=Ligações 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 -CatProJectLinks=Links entre projetos e tags/categorias +CatMembersLinks=Ligações entre os membros e tags / categorias +CatProjectsLinks=Links entre projetos e tags/categorias ExtraFieldsCategories=atributos complementares CategoriesSetup=Configuração Tags / categorias CategorieRecursiv=Fazer a ligação com os pais tag/categoria automaticamente diff --git a/htdocs/langs/pt_BR/compta.lang b/htdocs/langs/pt_BR/compta.lang index a7001066d5f..1dadb249b1e 100644 --- a/htdocs/langs/pt_BR/compta.lang +++ b/htdocs/langs/pt_BR/compta.lang @@ -54,6 +54,7 @@ SocialContribution=Contribuição fiscal ou social SocialContributions=Encargos sociais e fiscais SocialContributionsDeductibles=Contribuições fiscais ou sociais dedutíveis SocialContributionsNondeductibles=Contribuições fiscais ou sociais não dedutíveis +DateOfSocialContribution=Data do imposto social ou fiscal LabelContrib=Rótulo da contribuição TypeContrib=Tipo de contribuição MenuSpecialExpenses=Despesas especiais @@ -85,7 +86,6 @@ VATRefund=Reembolso da taxa sobre vendas SocialContributionsPayments=Pagamentos de impostos sociais / fiscais ShowVatPayment=Ver Pagamentos ICMS TotalToPay=Total a pagar -BalanceVisibilityDependsOnSortAndFilters=O saldo é visível nessa lista somente se a tabela for ordenada ascendendo em %s e filtrada por 1 conta bancária CustomerAccountancyCode=Código contábil do cliente SupplierAccountancyCode=Código contábil do fornecedor CustomerAccountancyCodeShort=Cod. cont. cli. @@ -176,3 +176,5 @@ RulesPurchaseTurnoverIn=- Inclui todos os pagamentos efetivos das faturas feitas RulesPurchaseTurnoverTotalPurchaseJournal=Inclui todas as linhas de débito no diário de compras. ReportPurchaseTurnover=Volume de negócios de compra faturada ReportPurchaseTurnoverCollected=Rotatividade de compras coletadas +IncludeVarpaysInResults =Incluir vários pagamentos nos relatórios +IncludeLoansInResults =Incluir empréstimos nos relatórios diff --git a/htdocs/langs/pt_BR/cron.lang b/htdocs/langs/pt_BR/cron.lang index 343355e7a5f..eed6598232e 100644 --- a/htdocs/langs/pt_BR/cron.lang +++ b/htdocs/langs/pt_BR/cron.lang @@ -4,8 +4,6 @@ Permission23102 =Criar / atualização de tarefa agendada Permission23103 =Excluir trabalho agendado Permission23104 =Executar trabalho agendado CronSetup=Configuração do gerenciamento de trabalho agendado -URLToLaunchCronJobs=URL para verificar e iniciar os cron jobs qualificados -OrToLaunchASpecificJob=Ou checkar e iniciar um specifico trabalho KeyForCronAccess=Chave seguranca para URL que lanca tarefas cron FileToLaunchCronJobs=Linha de comando para checar e iniciar tarefas cron qualificadas CronExplainHowToRunUnix=No ambiente Unix você deve usar a seguinte entrada crontab para executar a linha de comando a cada 5 minutos @@ -29,7 +27,6 @@ CronNbRun=Número de lançamentos CronMaxRun=Número máximo de lançamentos JobFinished=Trabalho iniciado e terminado CronAdd=Adicionar tarefa -CronEvery=Executar cada tarefa CronObject=Instância/Objeto a se criar CronSaveSucess=Salvo com sucesso CronFieldMandatory=O campo %s é obrigatório @@ -44,12 +41,13 @@ CronMethodHelp=O método do objeto a ser lançado. <BR> Por exemplo, para chamar CronArgsHelp=Os argumentos do método. <BR> Por exemplo, para chamar o método fetch do objeto Dolibarr Product /htdocs/product/class/product.class.php, o valor dos parâmetros pode ser <i> 0, ProductRef </ i> CronCommandHelp=A linha de comando de sistema que deve ser executada. CronCreateJob=Criar uma nova Tarefa agendada -CronType=Tipo de tarefa CronType_method=Chamar método de uma Classe PHP CronType_command=Comando Shell CronCannotLoadClass=Não é possível carregar o arquivo de classe %s (para usar a classe %s) CronCannotLoadObject=O arquivo de classe %s foi carregado, mas o objeto %s não foi encontrado nele +UseMenuModuleToolsToAddCronJobs=Vá para o menu "<a href="%s">Página inicial - Ferramentas administrativas - Trabalhos agendados</a>" para ver e editar os trabalhos agendados. JobDisabled=Tarefa desativada MakeLocalDatabaseDumpShort=Backup do banco de dados local MakeLocalDatabaseDump=Crie um despejo de banco de dados local. Os parâmetros são: compression ('gz' ou 'bz' ou 'none'), tipo de backup ('mysql', 'pgsql', 'auto'), 1, 'auto' ou nome de arquivo para construir, número de arquivos de backup para manter WarningCronDelayed=Atenção, para fins de desempenho, seja qual for a próxima data de execução de tarefas habilitadas, suas tarefas podem ser atrasadas em até um máximo de %s horas, antes de serem executadas. +DATAPOLICYJob=Limpador de dados e anonimizador diff --git a/htdocs/langs/pt_BR/errors.lang b/htdocs/langs/pt_BR/errors.lang index afe2c1ac0b2..971fb3d2fe0 100644 --- a/htdocs/langs/pt_BR/errors.lang +++ b/htdocs/langs/pt_BR/errors.lang @@ -60,7 +60,6 @@ ErrorNoAccountancyModuleLoaded=Módulo de Contabilidade não ativado ErrorExportDuplicateProfil=Este nome de perfil já existe para este lote de exportação. ErrorLDAPSetupNotComplete=A correspondência Dolibarr-LDAP não está completa. ErrorLDAPMakeManualTest=foi criado unn Arquivo .ldif na pasta %s. Trate de gastor manualmente este Arquivo a partir da linha de comandos para Obter mais detalles acerca do error. -ErrorRefAlreadyExists=A ref. utilizada para a criação já existe. ErrorRecordHasAtLeastOneChildOfType=Object tem pelo menos um filho do tipo %s ErrorModuleRequireJavascript=Javascript não deve ser desativado para ter esse recurso funcionando. Para ativar / desativar o Javascript, vá ao menu Home-> Configuração-> Display. ErrorPasswordsMustMatch=Deve existir correspondência entre as senhas digitadas @@ -163,6 +162,7 @@ ErrorBatchNoFoundForProductInWarehouse=Nenhum lote / série encontrado para o pr ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=Quantidade insuficiente para este lote / série para o produto "%s" "no armazém"%s ". ErrorOnlyOneFieldForGroupByIsPossible=Apenas 1 campo para o 'Agrupar por' é possível (outros são descartados) ErrorReplaceStringEmpty=Erro, a cadeia de caracteres para substituir está vazia +ErrorPublicInterfaceNotEnabled=A interface pública não foi ativada WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Seu parâmetro PHP upload_max_filesize (%s) é maior que o parâmetro PHP post_max_size (%s). Esta não é uma configuração consistente. WarningPasswordSetWithNoAccount=A senha foi definida para esse membro. No entanto, nenhuma conta de usuário foi criada. Portanto, esta senha é armazenada, mas não pode ser usado para acessar Dolibarr. Ele pode ser usado por um módulo / interface externa, mas se você não precisa definir qualquer login nem palavra-passe para um membro, você pode desabilitar a opção "Gerenciar um login para cada membro" da configuração do módulo-Membro. Se você precisa para gerenciar um login, mas não precisa de qualquer senha, você pode manter este campo em branco para evitar este aviso. Nota: E-mail pode também ser utilizado como uma entre o membro se está ligado a um utilizador. WarningMandatorySetupNotComplete=Clique aqui para configurar os parâmetros obrigatórios @@ -183,4 +183,3 @@ WarningSomeLinesWithNullHourlyRate=Algumas vezes foram registrados por alguns us WarningYourLoginWasModifiedPleaseLogin=O seu login foi modificado. Por questões de segurança, você terá de autenticar-se com o seu novo login antes da próxima ação. WarningProjectClosed=O projeto está fechado. Você deve reabri-lo primeiro. WarningSomeBankTransactionByChequeWereRemovedAfter=Algumas transações bancárias foram removidas após geração do recebimento, incluindo elas. Portanto, o número de cheques e o total de recebimento podem diferir do número e do total na lista. -WarningFailedToAddFileIntoDatabaseIndex=Aviso, falha ao adicionar entrada de arquivo na tabela de índice do banco de dados ECM diff --git a/htdocs/langs/pt_BR/exports.lang b/htdocs/langs/pt_BR/exports.lang index 63bff69e01d..4475adb3a39 100644 --- a/htdocs/langs/pt_BR/exports.lang +++ b/htdocs/langs/pt_BR/exports.lang @@ -6,6 +6,8 @@ NotImportedFields=Os campos de arquivo de origem não importado ExportModelSaved=Exportar perfil salvo como <b> %s </b>. ImportModelName=Nome do perfil de importação DatasetToImport=Conjunto de dados a importar +ExportCsvSeparator=Separador de caracteres csv +ImportCsvSeparator=Separador de caracteres csv FormatedImportDesc1=Este módulo permite atualizar dados existentes ou adicionar novos objetos ao banco de dados a partir de um arquivo sem conhecimento técnico, usando um assistente. NoImportableData=Não existe tipo de dados importavel (não existe nenhum módulo com definições de dados importavel ativado) FileSuccessfullyBuilt=Arquivo gerado diff --git a/htdocs/langs/pt_BR/mails.lang b/htdocs/langs/pt_BR/mails.lang index e0efe3c7f34..54faf80d28a 100644 --- a/htdocs/langs/pt_BR/mails.lang +++ b/htdocs/langs/pt_BR/mails.lang @@ -71,9 +71,6 @@ TagUnsubscribe=Atalho para se desenscrever EMailRecipient=E-mail do destinatário TagMailtoEmail=E-mail do destinatário (incluindo o link "mailto:" em html) NoEmailSentBadSenderOrRecipientEmail=Nenhum e-mail enviado. Bad remetente ou destinatário de e-mail. Verifique perfil de usuário. -AddNewNotification=Ativar um novo alvo / evento de notificação por e-mail -ListOfActiveNotifications=Listar todos os destinos/eventos ativos para notificação por e-mail -ListOfNotificationsDone=Listar todas as notificações de e-mail enviadas MailSendSetupIs=Configuração do envio de e-mails foi configurado a '%s'. Este modo não pode ser usado para envios de massa de e-mails. MailSendSetupIs2=Voçê precisa primeiramente acessar com uma conta de Administrador o menu %sInicio - Configurações - E-mails%s para mudar o parâmetro <strong>'%s'</strong> para usar o modo '%s'. Neste modo você pode entrar a configuração do servidor SMTP fornecido pelo seu Provedor de Acesso a Internet e usar a funcionalidade de envios de massa de e-mails. MailSendSetupIs3=Se tiver perguntas sobre como configurar o seu servidor SMTP voçê pode perguntar %s. @@ -94,8 +91,4 @@ AdvTgtDeleteFilter=Excluir filtro AdvTgtSaveFilter=Salvar filtro NoContactWithCategoryFound=Nenhum foi encontrado nenhum contato/endereço com uma categoria NoContactLinkedToThirdpartieWithCategoryFound=Nenhum foi encontrado nenhum contato/endereço com uma categoria -OutGoingEmailSetup=Configuração de e-mail de saída -InGoingEmailSetup=Configuração de e-mail de entrada -OutGoingEmailSetupForEmailing=Configuração de email de saída (para o módulo %s) -DefaultOutgoingEmailSetup=Configuração de e-mail de saída padrão ContactsWithThirdpartyFilter=Contatos com filtro de terceiros diff --git a/htdocs/langs/pt_BR/main.lang b/htdocs/langs/pt_BR/main.lang index c0d7d0ed2ac..7792b3ddc3c 100644 --- a/htdocs/langs/pt_BR/main.lang +++ b/htdocs/langs/pt_BR/main.lang @@ -21,6 +21,7 @@ FormatDateHourTextShort=%d %b, %Y, %I:%M %p FormatDateHourText=%d %B, %Y, %I:%M %p DatabaseConnection=Login à Base de Dados NoTemplateDefined=Nenhum modelo disponível para este tipo de email +CurrentTimeZone=Timezone PHP (do servidor apache) EmptySearchString=Digite critérios na pesquisa NoRecordFound=Nenhum registro encontrado NoRecordDeleted=Nenhum registro foi deletado @@ -65,6 +66,7 @@ FileWasNotUploaded=O arquivo foi selecionado, mas nao foi ainda enviado. Clique NbOfEntries=N°. de entradas GoToWikiHelpPage=Ler a ajuda online (necessário acesso a Internet) GoToHelpPage=Consulte a ajuda (pode necessitar de acesso à internet) +HomePage=Pagina inicial RecordDeleted=Registro apagado RecordGenerated=Registro gerado LevelOfFeature=Nível de funções @@ -532,3 +534,4 @@ NotUsedForThisCustomer=Não usado para este cliente AmountMustBePositive=O valor deve ser positivo ByStatus=Por status DateOfBirth=Data de nascimento +OnHold=Em espera diff --git a/htdocs/langs/pt_BR/modulebuilder.lang b/htdocs/langs/pt_BR/modulebuilder.lang index 3c474204a64..e5120fa2996 100644 --- a/htdocs/langs/pt_BR/modulebuilder.lang +++ b/htdocs/langs/pt_BR/modulebuilder.lang @@ -51,7 +51,6 @@ UseSpecificEditorURL =Use um URL de editor específico UseSpecificFamily =Use uma família específica UseSpecificAuthor =Use um autor específico UseSpecificVersion =Use uma versão inicial específica -ModuleMustBeEnabled=O módulo/aplicativo deve ser ativado primeiro IncludeRefGeneration=A referência do objeto deve ser gerada automaticamente IncludeRefGenerationHelp=Marque aqui se desejar incluir código para gerenciar a geração automaticamente da referência IncludeDocGeneration=Gerar alguns documentos a partir do objeto diff --git a/htdocs/langs/pt_BR/other.lang b/htdocs/langs/pt_BR/other.lang index 2c7d8cbc922..3bb86856d85 100644 --- a/htdocs/langs/pt_BR/other.lang +++ b/htdocs/langs/pt_BR/other.lang @@ -92,7 +92,7 @@ DirWasRemoved=a pasta foi eliminado FeatureNotYetAvailable=Funcionalidade ainda não disponível na versão atual Left=Esquerda Right=Direita -WeightUnitton=tonelada +WeightUnitton=t VolumeUnitgallon=gallão SizeUnitfoot=pe BugTracker=Incidências diff --git a/htdocs/langs/pt_BR/products.lang b/htdocs/langs/pt_BR/products.lang index 6f9b9ca7a94..ca73468eb49 100644 --- a/htdocs/langs/pt_BR/products.lang +++ b/htdocs/langs/pt_BR/products.lang @@ -115,7 +115,6 @@ AlwaysUseNewPrice=Usar sempre preço atual do produto/serviço AlwaysUseFixedPrice=Usar preço fixo PriceByQuantity=Diferentes preços por quantidade PriceByQuantityRange=Intervalo de quantidade -MultipriceRules=Regras de preços por segmento PercentVariationOver=%% variação sobre %s PercentDiscountOver=%% disconto sobre %s VariantRefExample=Exemplos: COR, TAMANHO diff --git a/htdocs/langs/pt_BR/projects.lang b/htdocs/langs/pt_BR/projects.lang index 716fa43b767..cee7bda314e 100644 --- a/htdocs/langs/pt_BR/projects.lang +++ b/htdocs/langs/pt_BR/projects.lang @@ -47,12 +47,8 @@ AddHereTimeSpentForWeek=Adicione aqui o tempo gasto para esta semana / tarefa Activities=Tarefas/atividades MyActivities=Minhas Tarefas/Atividades MyProjectsArea=Minha Área de projetos -ProgressDeclared=o progresso declarado TaskProgressSummary=Progresso tarefa CurentlyOpenedTasks=Tarefas atualmente abertas -TheReportedProgressIsLessThanTheCalculatedProgressionByX=O progresso declarado é menos %s do que a progressão calculada -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=O progresso declarado é mais %s do que a progressão calculada -ProgressCalculated=calculado do progresso WhichIamLinkedTo=ao qual estou ligado WhichIamLinkedToProject=ao qual estou vinculado ao projeto GoToListOfTimeConsumed=Ir para a lista de dispêndios de tempo diff --git a/htdocs/langs/pt_BR/sendings.lang b/htdocs/langs/pt_BR/sendings.lang index c686aba270c..88024602add 100644 --- a/htdocs/langs/pt_BR/sendings.lang +++ b/htdocs/langs/pt_BR/sendings.lang @@ -17,6 +17,7 @@ KeepToShip=Permaneça para enviar KeepToShipShort=Permanecer SendingsAndReceivingForSameOrder=Envios e recibos para esse pedido SendingsToValidate=Envios a Confirmar +StatusSendingCanceledShort=Cancelada StatusSendingValidated=Validado (produtos a enviar o enviados) SendingSheet=Folha de embarque ConfirmDeleteSending=Tem certeza que quer remover este envio? diff --git a/htdocs/langs/pt_BR/ticket.lang b/htdocs/langs/pt_BR/ticket.lang index 14a27fd797e..2f52343c451 100644 --- a/htdocs/langs/pt_BR/ticket.lang +++ b/htdocs/langs/pt_BR/ticket.lang @@ -97,7 +97,6 @@ TicketChangeStatus=Alterar status TicketConfirmChangeStatus=Confirma alteração de situação %s ? TicketLogStatusChanged=Situação modificada de%s para %s TicketNotCreatedFromPublicInterface=Não disponível. O ticket não foi criado a partir da interface pública. -PublicInterfaceNotEnabled=A interface pública não foi ativada ErrorTicketRefRequired=O nome de referência do ticket é obrigatório TicketLogMesgReadBy=Tíquete %s lido por %s TicketLogAssignedTo=Tíquete %s assinalado para %s diff --git a/htdocs/langs/pt_BR/withdrawals.lang b/htdocs/langs/pt_BR/withdrawals.lang index 5d560f9548b..dd45990f9a9 100644 --- a/htdocs/langs/pt_BR/withdrawals.lang +++ b/htdocs/langs/pt_BR/withdrawals.lang @@ -64,7 +64,6 @@ ModeRECUR=Pagamento recorrente PleaseCheckOne=Favor marcar apenas um DirectDebitOrderCreated=Pedido de débito direto %s criado CreateForSepa=Crie um arquivo de débito direto -ICS=Identificador do credor END_TO_END=Tag SEPA XML "EndToEndId" - ID exclusivo atribuído por transação USTRD=Tag SEPA XML "não estruturada" ADDDAYS=Adicionar dias à data de execução diff --git a/htdocs/langs/pt_PT/accountancy.lang b/htdocs/langs/pt_PT/accountancy.lang index c94ba9653ef..5f98a41fc2e 100644 --- a/htdocs/langs/pt_PT/accountancy.lang +++ b/htdocs/langs/pt_PT/accountancy.lang @@ -16,6 +16,8 @@ ThisService=Este serviço ThisProduct=Este produto DefaultForService=Padrão para o serviço DefaultForProduct=Padrão para o produto +ProductForThisThirdparty=Product for this thirdparty +ServiceForThisThirdparty=Service for this thirdparty CantSuggest=Não pode sugerir AccountancySetupDoneFromAccountancyMenu=A maioria da configuração da contabilidade é efetuada a partir do menu %s ConfigAccountingExpert=Configuration of the module accounting (double entry) @@ -48,6 +50,7 @@ CountriesExceptMe=Todos os países, exceto %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=Principal conta contábil para clientes não definidos na configuração MainAccountForSuppliersNotDefined=Conta contábil principal para fornecedores não definidos na configuração @@ -144,7 +147,7 @@ NotVentilatedinAccount=Não vinculado à conta contabilística XLineSuccessfullyBinded=produtos / serviços %s vinculados com êxito a uma conta contábil XLineFailedToBeBinded=%s produtos/serviços não foram vinculados a uma conta contabilística -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=Comece a ordenação da página "Vinculação a efetuar" pelos elementos mais recentes ACCOUNTING_LIST_SORT_VENTILATION_DONE=Comece a ordenação da página "Vinculação efetuada" pelos elementos mais recentes @@ -198,7 +201,8 @@ Docdate=Data Docref=Referência LabelAccount=Etiqueta de conta LabelOperation=Operação de etiqueta -Sens=Sentido +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=Código de rotulação Lettering=Lettering Codejournal=Diário @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Número da peça TransactionNumShort=Núm. de transação AccountingCategory=Grupos personalizados -GroupByAccountAccounting=Agrupar por conta contabilística +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. ByAccounts=Por contas ByPredefinedAccountGroups=Por grupos predefinidos @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Pagamento não vinculado a nenhum produto / serviço OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +ShowSubtotalByGroup=Show subtotal by level Pcgtype=Grupo de conta PcgtypeDesc=Group of account are used as predefined 'filter' and 'grouping' criteria for some accounting reports. For example, 'INCOME' or 'EXPENSE' are used as groups for accounting accounts of products to build the expense/income report. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consulte aqui a lista de linhas do relatório de despesa DescVentilExpenseReportMore=Se você configurar uma conta contábil no tipo de linhas de relatório de despesas, o aplicativo poderá fazer toda a ligação entre suas linhas de relatório de despesas e a conta contábil do seu plano de contas, em apenas um clique com o botão <strong> "%s" </ strong>. Se a conta não foi definida no dicionário de taxas ou se você ainda tiver algumas linhas não vinculadas a nenhuma conta, será necessário fazer uma ligação manual no menu "<strong> %s </ strong>". DescVentilDoneExpenseReport=Consulte aqui a lista das linhas de relatórios de despesas e os seus honorários da conta contabilística +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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Vincular automaticamente AutomaticBindingDone=Vinculação automática efetuada @@ -293,6 +300,7 @@ Accounted=Contabilizado no ledger NotYetAccounted=Ainda não contabilizado no razão 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 @@ -337,6 +345,7 @@ Modelcsv_LDCompta10=Export for LD Compta (v10 & higher) Modelcsv_openconcerto=Export for OpenConcerto (Test) Modelcsv_configurable=Exportar CSV configurável 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) diff --git a/htdocs/langs/pt_PT/admin.lang b/htdocs/langs/pt_PT/admin.lang index b2961d731ca..6db6d8a49dc 100644 --- a/htdocs/langs/pt_PT/admin.lang +++ b/htdocs/langs/pt_PT/admin.lang @@ -56,6 +56,8 @@ GUISetup=Aparência SetupArea=Configuração UploadNewTemplate=Carregar novo(s) modelo(s) FormToTestFileUploadForm=Formulário para testar o envio de ficheiro (de acordo com a configuração) +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled 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. @@ -85,7 +87,6 @@ ShowPreview=Mostrar pré-visualização ShowHideDetails=Show-Hide details PreviewNotAvailable=Pré-visualização não disponível ThemeCurrentlyActive=Tema atualmente ativo -CurrentTimeZone=Zona Horária PHP (servidor) MySQLTimeZone=Fuso Horário MySQL (base de dados) TZHasNoEffect=As datas são armazenadas e retornadas pelo servidor de banco de dados como se fossem mantidas como uma string enviada. O fuso horário só tem efeito ao usar a função UNIX_TIMESTAMP (que não deve ser usada pelo Dolibarr, portanto, o banco de dados TZ não deve ter efeito, mesmo se for alterado depois que os dados forem inseridos). Space=Área @@ -153,8 +154,8 @@ 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=Exclua todos os arquivos temporários (sem risco de perder dados). Nota: A exclusão é feita apenas se o diretório temporário foi criado 24 horas atrás. -PurgeDeleteTemporaryFilesShort=Eliminar ficheiros temporários +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 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 PurgeNothingToDelete=Nenhuma diretoria ou ficheiros para eliminar. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Parceiros preferidos OtherResources=Outros recursos ExternalResources=External Resources SocialNetworks=Redes sociais +SocialNetworkId=Social Network ID ForDocumentationSeeWiki=Para a documentação de utilizador, programador ou Perguntas Frequentes (FAQ), consulte o wiki do Dolibarr<br><b><a href="%s" target="_blank">%s</a></b> ForAnswersSeeForum=Para outras questões, como efectuar as consultas, pode utilizar o forum do Dolibarr:<br><b><a href="%s" target="_blank">%s</a></b> HelpCenterDesc1=Aqui estão alguns recursos para obter ajuda e suporte com o Dolibarr. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Exemplos com configuração atual ListOfDirectories=Lista de diretórios com modelos OpenDocument ListOfDirectoriesForModelGenODT=Lista de diretórios que contêm ficheiros template com formato OpenDocument.<br><br>Digite aqui o caminho completo dos diretórios.<br>Adicione um "Enter" entre cada diratório.<br>Para adicionar um diretório do módulo GCE, adicione aqui <b>DOL_DATA_ROOT/ecm/seudiretorio</b>.<br><br>Ficheiros nesses diretórios têm de acabar com <b>.odt</b> ou <b>.ods</b>. NumberOfModelFilesFound=Número de arquivos de modelo ODT / ODS encontrados nesses diretórios -ExampleOfDirectoriesForModelGen=Exemplos de sintaxe: <br>c:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br>Para saber como criar os seus modelos de documentos ODT, antes de armazená-los nestes diretórios, leia a documentação no wiki: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Posição do primeiro nome/último nome @@ -406,7 +408,7 @@ UrlGenerationParameters=Parâmetros para tornar URLs seguros SecurityTokenIsUnique=Use um parâmetro securekey único para cada URL EnterRefToBuildUrl=Digite a referência para o objeto %s GetSecuredUrl=Obter URL seguro -ButtonHideUnauthorized=Ocultar botões para usuários não administradores para ações não autorizadas, em vez de mostrar botões desativados acinzentados +ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) OldVATRates=Taxa de IVA antiga NewVATRates=Nova taxa de IVA PriceBaseTypeToChange=Modificar nos preços com valor de referência base definido em @@ -668,7 +670,7 @@ Module54000Desc=Impressão direta (sem abrir os documentos) usando a interface C Module55000Name=Votação ou Questionário Module55000Desc=Create online polls, surveys or votes (like Doodle, Studs, RDVz etc...) Module59000Name=Margens -Module59000Desc=Módulo para gerir margens +Module59000Desc=Module to follow margins Module60000Name=Comissões Module60000Desc=Módulo para gerir comissões Module62000Name=Incoterms @@ -1306,7 +1308,7 @@ YouUseBestDriver=You use driver %s which is the best driver currently available. YouDoNotUseBestDriver=Você usa o driver %s, mas o driver %s é recomendado. NbOfObjectIsLowerThanNoPb=You have only %s %s in the database. This does not require any particular optimization. SearchOptim=Optimização da pesquisa -YouHaveXObjectUseSearchOptim=You have %s %s in the database. You should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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=Você está usando o navegador da web %s. Este navegador está ok para segurança e desempenho. BrowserIsKO=Você está usando o navegador da web %s. Este navegador é conhecido por ser uma má escolha para segurança, desempenho e confiabilidade. Recomendamos o uso do Firefox, Chrome, Opera ou Safari. @@ -1596,8 +1598,13 @@ ServiceSetup=Configuração do módulo "Serviços" ProductServiceSetup=Configuração do módulo "Produtos e Serviços" NumberOfProductShowInSelect=Número máximo de produtos a serem exibidos nas listas de seleção de combinação (0 = sem limite) ViewProductDescInFormAbility=Exibir descrições de produtos em formulários (caso contrário, mostrado em um pop-up de dica) +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=Ative no separador "Ficheiros Anexados" do produto/serviço uma opção para unir o documento em PDF ao orçamento em PDF, se o produto/serviço estiver no orçamento -ViewProductDescInThirdpartyLanguageAbility=Exibir descrições de produtos no idioma do terceiro +ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) UseSearchToSelectProductTooltip=Além disso, se você tiver um grande número de produtos (> 100 000), poderá aumentar a velocidade definindo PRODUCT_DONOTSEARCH_ANYWHERE como 1 em Setup-> Other. A pesquisa será limitada ao início da string. UseSearchToSelectProduct=Espere até pressionar uma tecla antes de carregar o conteúdo da lista de combinação de produtos (isso pode aumentar o desempenho se você tiver um grande número de produtos, mas for menos conveniente) SetDefaultBarcodeTypeProducts=Tipo de código de barras predefinido para produtos @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Menus personalizados não ligados a uma entrada do me NewMenu=Novo menu MenuHandler=Gestor de menus MenuModule=Módulo origem -HideUnauthorizedMenu= Ocultar menus não autorizados (cinza) +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=Id do menu DetailMenuHandler=Gestor de menus onde será exibido o novo menu DetailMenuModule=Nome do módulo, no caso da entrada do menu ser resultante de um módulo @@ -1983,11 +1990,12 @@ EMailHost=Host do servidor IMAP de e-mail MailboxSourceDirectory=Diretório de origem da caixa de correio MailboxTargetDirectory=Diretório de destino da caixa de correio EmailcollectorOperations=Operações para fazer pelo coletor +EmailcollectorOperationsDesc=Operations are executed from top to bottom order MaxEmailCollectPerCollect=Max number of emails collected per collect CollectNow=Recolher agora ConfirmCloneEmailCollector=Are you sure you want to clone the Email collector %s ? -DateLastCollectResult=Date latest collect tried -DateLastcollectResultOk=Date latest collect successfull +DateLastCollectResult=Date of latest collect try +DateLastcollectResultOk=Date of latest collect success LastResult=Latest result EmailCollectorConfirmCollectTitle=Confirmação de recebimento de email EmailCollectorConfirmCollect=Do you want to run the collection for this collector now ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Código postal MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/pt_PT/banks.lang b/htdocs/langs/pt_PT/banks.lang index 2401d4caf2a..93df84b3707 100644 --- a/htdocs/langs/pt_PT/banks.lang +++ b/htdocs/langs/pt_PT/banks.lang @@ -173,10 +173,11 @@ SEPAMandate=Mandato SEPA 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/pt_PT/bills.lang b/htdocs/langs/pt_PT/bills.lang index 9489ccfabda..ce7dadc46fc 100644 --- a/htdocs/langs/pt_PT/bills.lang +++ b/htdocs/langs/pt_PT/bills.lang @@ -6,11 +6,11 @@ BillsCustomer=Fatura a cliente BillsSuppliers=Faturas do fornecedor BillsCustomersUnpaid=Faturas a receber de clientes BillsCustomersUnpaidForCompany=Faturas a clientes não pagas para %s -BillsSuppliersUnpaid=Unpaid vendor invoices -BillsSuppliersUnpaidForCompany=Unpaid vendors invoices for %s +BillsSuppliersUnpaid=Faturas de fornecedores não pagas +BillsSuppliersUnpaidForCompany=Faturas de fornecedores não pagas para %s BillsLate=Pagamentos em atraso BillsStatistics=Estatísticas das faturas a clientes -BillsStatisticsSuppliers=Vendors invoices statistics +BillsStatisticsSuppliers=Estatísticas de faturas de fornecedores DisabledBecauseDispatchedInBookkeeping=Desativado porque a fatura foi enviada para a contabilidade DisabledBecauseNotLastInvoice=Desativado porque a fatura não pode ser apagada. Algumas faturas foram registradas após esta e irão criar furos no contador. DisabledBecauseNotErasable=Desativar porque não pode ser eliminado @@ -25,10 +25,10 @@ InvoiceProFormaAsk=Fatura Pró-Forma InvoiceProFormaDesc=A <b>Fatura Pró-Forma</b> é uma imagem de uma fatura, mas não tem valor contabilístico. InvoiceReplacement=Fatura de Substituição InvoiceReplacementAsk=Fatura de Substituição para a Fatura -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> Fatura de substituição </b> é usada para substituir completamente uma fatura sem pagamento já recebido. <br> <br> Nota: Apenas as faturas sem pagamento podem ser substituídas. Se a fatura que você substituiu ainda não foi fechada, ela será automaticamente encerrada como 'abandonada'. InvoiceAvoir=Nota de Crédito InvoiceAvoirAsk=Nota de crédito para corrigir a fatura -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=A nota de crédito <b> </b> é uma fatura negativa usada para corrigir o fato de que uma fatura mostra um valor diferente do valor efetivamente pago (por exemplo, o cliente pagou muito por engano ou não pagará o valor completo porque alguns produtos foram devolvidos) . invoiceAvoirWithLines=Criar Nota de Crédito com as linhas da fatura de origem invoiceAvoirWithPaymentRestAmount=Criar nota de crédito com fatura não paga de origem invoiceAvoirLineWithPaymentRestAmount=Nota de crédito para o restante valor não pago @@ -41,7 +41,7 @@ CorrectionInvoice=Correção da Fatura UsedByInvoice=Utilizado para pagar a fatura %s ConsumedBy=Consumida por NotConsumed=Não consumiu -NoReplacableInvoice=No replaceable invoices +NoReplacableInvoice=Sem faturas substituíveis NoInvoiceToCorrect=Nenhuma Fatura para corrigir InvoiceHasAvoir=Era fonte de uma ou várias notas de crédito CardBill=Ficha da Fatura @@ -54,23 +54,23 @@ InvoiceCustomer=Fatura a cliente CustomerInvoice=Fatura a cliente CustomersInvoices=Faturas a clientes SupplierInvoice=Fatura de fornecedor -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Faturas de fornecedores SupplierBill=Fatura de fornecedor SupplierBills=faturas de fornecedores Payment=Pagamento -PaymentBack=Refund +PaymentBack=Restituição CustomerInvoicePaymentBack=Refund Payments=Pagamentos -PaymentsBack=Refunds +PaymentsBack=Reembolsos paymentInInvoiceCurrency=na moeda das faturas PaidBack=Reembolsada DeletePayment=Eliminar pagamento ConfirmDeletePayment=Tem a certeza que deseja eliminar este pagamento? -ConfirmConvertToReduc=Do you want to convert this %s into an available credit? +ConfirmConvertToReduc=Deseja converter este %s em um crédito disponível? 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 +SupplierPayments=Pagamentos a fornecedores ReceivedPayments=Pagamentos recebidos ReceivedCustomersPayments=Pagamentos recebidos dos clientes PayedSuppliersPayments=Payments paid to vendors @@ -78,9 +78,9 @@ ReceivedCustomersPaymentsToValid=Pagamentos recebidos dos clientes para validar PaymentsReportsForYear=Relatórios de pagamentos para %s PaymentsReports=Relatórios de pagamentos PaymentsAlreadyDone=Pagamentos já efetuados -PaymentsBackAlreadyDone=Refunds already done +PaymentsBackAlreadyDone=Reembolsos já feitos PaymentRule=Estado do Pagamento -PaymentMode=Payment Type +PaymentMode=Tipo de pagamento PaymentTypeDC=Cartão de débito/crédito PaymentTypePP=PayPal IdPaymentMode=Payment Type (id) @@ -88,8 +88,8 @@ CodePaymentMode=Payment Type (code) LabelPaymentMode=Payment Type (label) PaymentModeShort=Payment Type PaymentTerm=Payment Term -PaymentConditions=Payment Terms -PaymentConditionsShort=Payment Terms +PaymentConditions=Termos de pagamento +PaymentConditionsShort=Termos de pagamento PaymentAmount=Montante a Pagar PaymentHigherThanReminderToPay=Pagamento superior ao valor a pagar HelpPaymentHigherThanReminderToPay=Atenção, o valor do pagamento de uma ou mais contas é maior do que o valor pendente a pagar. <br> Edite sua entrada, caso contrário, confirme e considere a criação de uma nota de crédito para o excesso recebido para cada fatura paga em excesso. @@ -106,7 +106,7 @@ AddBill=Criar fatura ou nota de crédito AddToDraftInvoices=Adicionar à fatura rascunho DeleteBill=Eliminar fatura SearchACustomerInvoice=Procurar por uma fatura a cliente -SearchASupplierInvoice=Search for a vendor invoice +SearchASupplierInvoice=Pesquise uma fatura de fornecedor CancelBill=Cancelar uma fatura SendRemindByMail=Enviar um lembrete por E-Mail DoPayment=Inserir pagamento @@ -145,17 +145,17 @@ BillShortStatusClosedUnpaid=Fechada por pagar BillShortStatusClosedPaidPartially=Paga (parcialmente) PaymentStatusToValidShort=Por validar ErrorVATIntraNotConfigured=Número de IVA intracomunitário ainda não definido -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 +ErrorNoPaiementModeConfigured=Nenhum tipo de pagamento padrão definido. Vá para a configuração do módulo de fatura para corrigir isso. +ErrorCreateBankAccount=Crie uma conta bancária e vá para o painel Configuração do módulo Fatura para definir os tipos de pagamento ErrorBillNotFound=Fatura %s inexistente ErrorInvoiceAlreadyReplaced=Erro, você tentou validar uma fatura para substituir a fatura %s. Mas este já foi substituído pela nota fiscal %s. ErrorDiscountAlreadyUsed=Erro, a remessa está já assignada ErrorInvoiceAvoirMustBeNegative=Erro, uma fatura deste tipo deve ter um montante negativo -ErrorInvoiceOfThisTypeMustBePositive=Error, this type of invoice must have an amount excluding tax positive (or null) +ErrorInvoiceOfThisTypeMustBePositive=Erro, este tipo de fatura deve ter um valor sem imposto positivo (ou nulo) ErrorCantCancelIfReplacementInvoiceNotValidated=Erro, não pode cancelar uma fatura que tenha sido substituída por uma outra fatura e que se encontra ainda em rascunho ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved=Essa parte ou outra já é usada para que as séries de descontos não possam ser removidas. BillFrom=Emissor -BillTo=Enviar a +BillTo=Cliente ActionsOnBill=Ações sobre a fatura RecurringInvoiceTemplate=Fatura de modelo / recorrente NoQualifiedRecurringInvoiceTemplateFound=Nenhuma fatura de modelo recorrente qualificada para geração. @@ -167,13 +167,13 @@ LatestTemplateInvoices=Últimas facturas modelo %s LatestCustomerTemplateInvoices=Últimas facturas de modelo de cliente %s LatestSupplierTemplateInvoices=Latest %s vendor template invoices LastCustomersBills=Últimas %s faturas a clientes -LastSuppliersBills=Latest %s vendor invoices +LastSuppliersBills=Faturas de fornecedor %s mais recentes AllBills=Todas as faturas AllCustomerTemplateInvoices=Todas as faturas modelo OtherBills=Outras faturas DraftBills=Faturas rascunho CustomersDraftInvoices=Faturas provisórias a cliente -SuppliersDraftInvoices=Vendor draft invoices +SuppliersDraftInvoices=Rascunho de faturas de fornecedor Unpaid=Pendentes ErrorNoPaymentDefined=Error No payment defined ConfirmDeleteBill=Tem a certeza que deseja eliminar esta fatura? @@ -183,7 +183,7 @@ ConfirmClassifyPaidBill=Tem a certeza que pretende alterar a fatura <b>%s</b> pa ConfirmCancelBill=Tem a certeza que pretende cancelar a fatura <b>%s</b>? ConfirmCancelBillQuestion=Porque é que pretende classificar esta fatura como 'abandonada'? ConfirmClassifyPaidPartially=Tem a certeza que pretende alterar a fatura <b>%s</b> para o estado de paga? -ConfirmClassifyPaidPartiallyQuestion=This invoice has not been paid completely. What is the reason for closing this invoice? +ConfirmClassifyPaidPartiallyQuestion=Esta fatura não foi totalmente paga. Qual o motivo do fechamento desta fatura? ConfirmClassifyPaidPartiallyReasonAvoir=O restante <b> (%s %s) </ b> é um desconto concedido porque o pagamento foi feito antes do prazo. Regularizo o IVA com uma nota de crédito. ConfirmClassifyPaidPartiallyReasonDiscount=O restante <b> (%s %s) </ b> é um desconto concedido porque o pagamento foi feito antes do prazo. ConfirmClassifyPaidPartiallyReasonDiscountNoVat=O restante <b> (%s %s) </ b> é um desconto concedido porque o pagamento foi feito antes do prazo. Aceito perder o IVA sobre esse desconto. @@ -257,11 +257,11 @@ DateInvoice=Data da fatura DatePointOfTax=Ponto de imposto NoInvoice=Nenhuma fatura ClassifyBill=Classificar a fatura -SupplierBillsToPay=Unpaid vendor invoices +SupplierBillsToPay=Faturas de fornecedores não pagas CustomerBillsUnpaid=Faturas a receber de clientes NonPercuRecuperable=Não recuperável -SetConditions=Set Payment Terms -SetMode=Set Payment Type +SetConditions=Definir termos de pagamento +SetMode=Definir Tipo de Pagamento SetRevenuStamp=Definir selo fiscal Billed=Faturado RecurringInvoices=Faturas recorrentes @@ -278,9 +278,9 @@ ExportDataset_invoice_1=Faturas de clientes e detalhes da fatura ExportDataset_invoice_2=Faturas a clientes e pagamentos ProformaBill=Fatura pró-forma: Reduction=Redução -ReductionShort=Disc. +ReductionShort=Disco. Reductions=Descontos -ReductionsShort=Disc. +ReductionsShort=Disco. Discounts=Descontos AddDiscount=Adicionar Desconto AddRelativeDiscount=Criar desconto relativo @@ -289,7 +289,7 @@ AddGlobalDiscount=Criar desconto fixo EditGlobalDiscounts=Editar descontos fixos AddCreditNote=Criar nota de crédito ShowDiscount=Ver o deposito -ShowReduc=Show the discount +ShowReduc=Mostre o desconto ShowSourceInvoice=Show the source invoice RelativeDiscount=Desconto relativo GlobalDiscount=Desconto fixo @@ -337,12 +337,12 @@ WatermarkOnDraftBill=Marca de agua em faturas rascunho (nada sem está vazia) InvoiceNotChecked=Nenhuma fatura selecionada ConfirmCloneInvoice=Tem a certeza que pretende clonar esta fatura <b>%s</b>? DisabledBecauseReplacedInvoice=Ação desativada porque a fatura foi substituída -DescTaxAndDividendsArea=This area presents a summary of all payments made for special expenses. Only records with payments during the fixed year are included here. +DescTaxAndDividendsArea=Esta área apresenta um resumo de todos os pagamentos feitos para despesas especiais. Somente registros com pagamentos durante o ano fixo são incluídos aqui. NbOfPayments=N.ª de pagamentos SplitDiscount=Dividido em duas desconto -ConfirmSplitDiscount=Are you sure you want to split this discount of <b>%s</b> %s into two smaller discounts? +ConfirmSplitDiscount=Tem certeza de que deseja dividir este desconto de <b> %s </b> %s em dois descontos menores? TypeAmountOfEachNewDiscount=Quantidade de entrada para cada uma das duas partes: -TotalOfTwoDiscountMustEqualsOriginal=The total of the two new discounts must be equal to the original discount amount. +TotalOfTwoDiscountMustEqualsOriginal=O total dos dois novos descontos deve ser igual ao valor do desconto original. ConfirmRemoveDiscount=Tem certeza que deseja remover este desconto? RelatedBill=Fatura relacionada RelatedBills=Faturas relacionadas @@ -410,7 +410,7 @@ PaymentConditionShort14D=14 dias PaymentCondition14D=14 dias PaymentConditionShort14DENDMONTH=14 dias do final do mês PaymentCondition14DENDMONTH=Dentro de 14 dias após o final do mês -FixAmount=Fixed amount - 1 line with label '%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 @@ -435,16 +435,16 @@ PaymentTypeFAC=Fator PaymentTypeShortFAC=Fator BankDetails=Dados bancários BankCode=Código banco -DeskCode=Branch code +DeskCode=Código da Agência BankAccountNumber=Número conta BankAccountNumberKey=Checksum Residence=Direcção -IBANNumber=IBAN account number +IBANNumber=Número da conta IBAN IBAN=IBAN CustomerIBAN=IBAN of customer SupplierIBAN=IBAN of vendor BIC=BIC/SWIFT -BICNumber=BIC/SWIFT code +BICNumber=Código BIC / SWIFT ExtraInfos=Informações complementarias RegulatedOn=Regulado em ChequeNumber=Cheque nº @@ -458,11 +458,11 @@ PhoneNumber=Tel. FullPhoneNumber=telefone TeleFax=Fax PrettyLittleSentence=Aceito o pagamento mediante cheques a meu nome dos valores em divida, na qualidade de membro de uma empresa autorizada por a Administração Fiscal. -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=ID de IVA intracomunitário +PaymentByChequeOrderedTo=Os pagamentos em cheque (incluindo impostos) devem ser pagos a %s, enviar para +PaymentByChequeOrderedToShort=Pagamentos de cheques (incluindo impostos) devem ser pagos a SendTo=- Enviando Para -PaymentByTransferOnThisBankAccount=Payment by transfer to the following bank account +PaymentByTransferOnThisBankAccount=Pagamento por transferência para a seguinte conta bancária VATIsNotUsedForInvoice=* IVA não aplicável art-293B do CGI LawApplicationPart1=Por aplicação da lei 80.335 de 12/05/80 LawApplicationPart2=As mercadorias permanecem em propriedade de @@ -473,18 +473,18 @@ UseLine=Aplicar UseDiscount=Aplicar Desconto UseCredit=Uso de crédito UseCreditNoteInInvoicePayment=Reduzir o pagamento com este deposito -MenuChequeDeposits=Check Deposits +MenuChequeDeposits=Depósitos de cheques MenuCheques=Gestão cheques -MenuChequesReceipts=Check receipts +MenuChequesReceipts=Verifique os recibos NewChequeDeposit=Novo deposito -ChequesReceipts=Check receipts -ChequesArea=Check deposits area -ChequeDeposits=Check deposits +ChequesReceipts=Verifique os recibos +ChequesArea=Área de depósitos de cheques +ChequeDeposits=Depósitos de cheques Cheques=Cheques DepositId=Depósito de identificação NbCheque=Número de cheques CreditNoteConvertedIntoDiscount=Esta nota de crédito %s, foi convertida no desconto %s -UsBillingContactAsIncoiveRecipientIfExist=Use contact/address with type 'billing contact' instead of third-party address as recipient for invoices +UsBillingContactAsIncoiveRecipientIfExist=Use o contato / endereço com o tipo 'contato para cobrança' em vez do endereço de terceiros como destinatário das faturas ShowUnpaidAll=Mostrar todas as faturas não pagas ShowUnpaidLateOnly=Mostrar apenas faturas atrasadas não pagas PaymentInvoiceRef=Pagamento da fatura %s @@ -497,19 +497,19 @@ CantRemovePaymentWithOneInvoicePaid=Não é possível remover o pagamento, uma v ExpectedToPay=Pagamento esperado CantRemoveConciliatedPayment=Não é possível remover o pagamento reconciliado PayedByThisPayment=Pago por esse pagamento -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. +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. -AllCompletelyPayedInvoiceWillBeClosed=All invoices with no remainder to pay will be automatically closed with status "Paid". +AllCompletelyPayedInvoiceWillBeClosed=Todas as faturas sem sobras a pagar serão automaticamente encerradas com o status "Pago". ToMakePayment=Pagar ToMakePaymentBack=Reembolsar ListOfYourUnpaidInvoices=Lista de faturas não pagas NoteListOfYourUnpaidInvoices=Nota: Esta lista apenas contém fatura de terceiros dos quais você está definido como representante de vendas. -RevenueStamp=Tax stamp +RevenueStamp=Selo fiscal 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=Você precisa criar uma fatura padrão primeiro e convertê-la em "modelo" para criar uma nova fatura modelo -PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) +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 @@ -523,14 +523,15 @@ TypeContact_facture_internal_SALESREPFOLL=Representante que dá seguimento à fa TypeContact_facture_external_BILLING=Contacto na fatura do cliente TypeContact_facture_external_SHIPPING=Contacto com o transporte do cliente TypeContact_facture_external_SERVICE=Contactar o serviço ao cliente -TypeContact_invoice_supplier_internal_SALESREPFOLL=Representative following-up vendor invoice +TypeContact_invoice_supplier_internal_SALESREPFOLL=Fatura de fornecedor de acompanhamento representativo TypeContact_invoice_supplier_external_BILLING=Contacto da fatura do fornecedor TypeContact_invoice_supplier_external_SHIPPING=Contacto da expedição do fornecedor -TypeContact_invoice_supplier_external_SERVICE=Vendor service contact +TypeContact_invoice_supplier_external_SERVICE=Contato de serviço do fornecedor # Situation invoices InvoiceFirstSituationAsk=Fatura da primeira situação InvoiceFirstSituationDesc=As <b> faturas de situação </ b> estão vinculadas a situações relacionadas a uma progressão, por exemplo, a progressão de uma construção. Cada situação está vinculada a uma fatura. InvoiceSituation=Fatura de situação +PDFInvoiceSituation=Fatura de situação InvoiceSituationAsk=Fatura seguindo a situação InvoiceSituationDesc=Crie uma nova situação seguindo uma já existente SituationAmount=Valor da fatura da situação (líquida) @@ -575,3 +576,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/pt_PT/blockedlog.lang b/htdocs/langs/pt_PT/blockedlog.lang index d50a1d77f48..798b7e6a075 100644 --- a/htdocs/langs/pt_PT/blockedlog.lang +++ b/htdocs/langs/pt_PT/blockedlog.lang @@ -35,7 +35,7 @@ logDON_DELETE=Exclusão lógica de doação logMEMBER_SUBSCRIPTION_CREATE=Inscrição de membro criada logMEMBER_SUBSCRIPTION_MODIFY=Inscrição de membro modificada logMEMBER_SUBSCRIPTION_DELETE=Exclusão lógica de assinatura de membro -logCASHCONTROL_VALIDATE=Cash fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Download da fatura do cliente BlockedLogBillPreview=Pré-visualização da fatura do cliente BlockedlogInfoDialog=Detalhes do log diff --git a/htdocs/langs/pt_PT/boxes.lang b/htdocs/langs/pt_PT/boxes.lang index bfe70c39c7e..494becf8c75 100644 --- a/htdocs/langs/pt_PT/boxes.lang +++ b/htdocs/langs/pt_PT/boxes.lang @@ -1,18 +1,18 @@ # Dolibarr language file - Source file is en_US - boxes BoxLoginInformation=Login Information -BoxLastRssInfos=RSS Information -BoxLastProducts=Latest %s Products/Services +BoxLastRssInfos=Informação RSS +BoxLastProducts=Produtos / serviços %s mais recentes BoxProductsAlertStock=Alertas de stock para produtos BoxLastProductsInContract=Os %s últimos produtos/serviços contratados -BoxLastSupplierBills=Latest Vendor invoices -BoxLastCustomerBills=Latest Customer invoices +BoxLastSupplierBills=Últimas faturas do fornecedor +BoxLastCustomerBills=Últimas faturas do cliente BoxOldestUnpaidCustomerBills=Faturas a clientes não pagas mais antigas -BoxOldestUnpaidSupplierBills=Oldest unpaid vendor invoices +BoxOldestUnpaidSupplierBills=Faturas de fornecedores não pagas mais antigas BoxLastProposals=Últimos orçamentos BoxLastProspects=Últimas prospeções modificadas BoxLastCustomers=Últimos clientes modificados BoxLastSuppliers=Últimos fornecedores modificados -BoxLastCustomerOrders=Latest sales orders +BoxLastCustomerOrders=Últimos pedidos de venda BoxLastActions=Últimas ações BoxLastContracts=Últimos contratos BoxLastContacts=Últimos contactos/endereços @@ -21,23 +21,23 @@ BoxFicheInter=Últimas intervenções BoxCurrentAccounts=Saldo de abertura das contas BoxTitleMemberNextBirthdays=Birthdays of this month (members) BoxTitleLastRssInfos=Últimas %s notícias de %s -BoxTitleLastProducts=Products/Services: last %s modified +BoxTitleLastProducts=Produtos / serviços: último %s modificado BoxTitleProductsAlertStock=Produtos: alerta de stock BoxTitleLastSuppliers=Últimos %s fornecedores registados -BoxTitleLastModifiedSuppliers=Vendors: last %s modified -BoxTitleLastModifiedCustomers=Customers: last %s modified +BoxTitleLastModifiedSuppliers=Fornecedores: última modificação %s +BoxTitleLastModifiedCustomers=Clientes: última modificação %s BoxTitleLastCustomersOrProspects=Últimos %s clientes ou prospeções -BoxTitleLastCustomerBills=Latest %s modified Customer invoices -BoxTitleLastSupplierBills=Latest %s modified Vendor invoices -BoxTitleLastModifiedProspects=Prospects: last %s modified +BoxTitleLastCustomerBills=Faturas do cliente modificadas %s mais recentes +BoxTitleLastSupplierBills=Faturas de fornecedor modificadas %s mais recentes +BoxTitleLastModifiedProspects=Perspectivas: última modificação %s BoxTitleLastModifiedMembers=Últimos %s membros BoxTitleLastFicheInter=Últimas %s intervenções modificadas -BoxTitleOldestUnpaidCustomerBills=Customer Invoices: oldest %s unpaid -BoxTitleOldestUnpaidSupplierBills=Vendor Invoices: oldest %s unpaid +BoxTitleOldestUnpaidCustomerBills=Faturas do cliente: %s mais antiga não paga +BoxTitleOldestUnpaidSupplierBills=Faturas do fornecedor: %s mais antigo não pago BoxTitleCurrentAccounts=Contas em aberto: saldos BoxTitleSupplierOrdersAwaitingReception=Supplier orders awaiting reception -BoxTitleLastModifiedContacts=Contacts/Addresses: last %s modified -BoxMyLastBookmarks=Bookmarks: latest %s +BoxTitleLastModifiedContacts=Contatos / endereços: último %s modificado +BoxMyLastBookmarks=Marcadores: último %s BoxOldestExpiredServices=Mais antigos ativos de serviços vencidos BoxLastExpiredServices=Últimos %s contactos mais antigos com serviços ativos expirados BoxTitleLastActionsToDo=Últimas %s ações a fazer @@ -46,36 +46,39 @@ BoxTitleLastModifiedDonations=Últimos %s donativos modificados BoxTitleLastModifiedExpenses=Últimos %s relatórios de despesas modificados BoxTitleLatestModifiedBoms=Latest %s modified BOMs BoxTitleLatestModifiedMos=Latest %s modified Manufacturing Orders +BoxTitleLastOutstandingBillReached=Customers with maximum outstanding exceeded BoxGlobalActivity=Atividade global (faturas, orçamentos, encomendas) BoxGoodCustomers=Bons clientes BoxTitleGoodCustomers=%s bons clientes -FailedToRefreshDataInfoNotUpToDate=Failed to refresh RSS flux. Latest successful refresh date: %s +BoxScheduledJobs=Trabalhos agendadas +BoxTitleFunnelOfProspection=Lead funnel +FailedToRefreshDataInfoNotUpToDate=Falha ao atualizar o fluxo RSS. Data da última atualização bem-sucedida: %s LastRefreshDate=Última data de atualização NoRecordedBookmarks=Não existem marcadores definidos. ClickToAdd=Clique aqui para adicionar. NoRecordedCustomers=Nenhum cliente registado NoRecordedContacts=Nenhum contacto registado NoActionsToDo=Sem ações a realizar -NoRecordedOrders=No recorded sales orders +NoRecordedOrders=Nenhum pedido de venda registrado NoRecordedProposals=Sem orçamentos registados NoRecordedInvoices=Nenhuma fatura a cliente registada NoUnpaidCustomerBills=Nenhuma fatura a clientes pendente de pagamento -NoUnpaidSupplierBills=No unpaid vendor invoices -NoModifiedSupplierBills=No recorded vendor invoices +NoUnpaidSupplierBills=Sem faturas de fornecedores não pagas +NoModifiedSupplierBills=Nenhuma fatura de fornecedor registrada NoRecordedProducts=Nenhum produto/serviço registado NoRecordedProspects=Nenhuma prospecção registada NoContractedProducts=Não contractados produtos / serviços NoRecordedContracts=Sem contratos registrados NoRecordedInterventions=Nenhuma intervenção registada -BoxLatestSupplierOrders=Latest purchase orders +BoxLatestSupplierOrders=Últimos pedidos de compra BoxLatestSupplierOrdersAwaitingReception=Latest Purchase Orders (with a pending reception) -NoSupplierOrder=No recorded purchase order +NoSupplierOrder=Nenhum pedido de compra registrado BoxCustomersInvoicesPerMonth=Customer Invoices per month BoxSuppliersInvoicesPerMonth=Vendor Invoices per month BoxCustomersOrdersPerMonth=Sales Orders per month BoxSuppliersOrdersPerMonth=Vendor Orders per month BoxProposalsPerMonth=Orçamentos por mês -NoTooLowStockProducts=No products are under the low stock limit +NoTooLowStockProducts=Nenhum produto está abaixo do limite mínimo de estoque BoxProductDistribution=Products/Services Distribution ForObject=On %s BoxTitleLastModifiedSupplierBills=Vendor Invoices: last %s modified @@ -92,8 +95,8 @@ LastXMonthRolling=Balanço dos últimos %s meses ChooseBoxToAdd=Adicionar widget ao painel de controlo BoxAdded=O Widget foi adicionado ao seu painel BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users) -BoxLastManualEntries=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Contabilidade +ValidatedProjects=Validated projects diff --git a/htdocs/langs/pt_PT/cashdesk.lang b/htdocs/langs/pt_PT/cashdesk.lang index d1dba40375b..4c30714cba3 100644 --- a/htdocs/langs/pt_PT/cashdesk.lang +++ b/htdocs/langs/pt_PT/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=Nº de faturas Paymentnumpad=Type of Pad to enter payment Numberspad=Numbers Pad @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/pt_PT/categories.lang b/htdocs/langs/pt_PT/categories.lang index bd0e39a4308..57c37b4515a 100644 --- a/htdocs/langs/pt_PT/categories.lang +++ b/htdocs/langs/pt_PT/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=Área de etiquetas/categorias de projetos UsersCategoriesArea=Users tags/categories area SubCats=Subcategorias CatList=Lista de etiquetas/categorias +CatListAll=List of tags/categories (all types) NewCategory=Nova etiqueta/categoria ModifCat=Modificar etiqueta/categoria CatCreated=Etiqueta/categoria criada @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=ID de etiqueta/categoria -CatSupList=Lista de tags / categorias de fornecedores -CatCusList=Lista de etiquetas/categorias de clientes/prospecções +ParentCategory=Parent tag/category +ParentCategoryLabel=Label of parent tag/category +CatSupList=List of vendors tags/categories +CatCusList=List of customers/prospects tags/categories CatProdList=Lista de etiquetas/categorias de produtos CatMemberList=Lista de etiquetas/categorias de membros -CatContactList=Lista de etiquetas/categorias de contactos -CatSupLinks=Ligações entre fornecedores e etiquetas/categorias +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=Ligações entre clientes/prospecções e etiquetas/categorias CatContactsLinks=Links between contacts/addresses and tags/categories CatProdLinks=Ligações entre produtos/serviços e etiquetas/categorias -CatProJectLinks=Ligações entre os projetos e etiquetas/categorias +CatMembersLinks=Links between members and tags/categories +CatProjectsLinks=Ligações entre os projetos e etiquetas/categorias +CatUsersLinks=Links between users and tags/categories DeleteFromCat=Remover das etiquetas/categoria ExtraFieldsCategories=Atributos Complementares CategoriesSetup=Configuração de etiquetas/categorias diff --git a/htdocs/langs/pt_PT/companies.lang b/htdocs/langs/pt_PT/companies.lang index 0c75b753e4c..6e9e1163487 100644 --- a/htdocs/langs/pt_PT/companies.lang +++ b/htdocs/langs/pt_PT/companies.lang @@ -358,7 +358,7 @@ 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=Tipo de Entidade Legal +JuridicalStatus=Business entity type Workforce=Workforce Staff=Funcionários ProspectLevelShort=Cli. Potenc. diff --git a/htdocs/langs/pt_PT/compta.lang b/htdocs/langs/pt_PT/compta.lang index 429e6922009..03ccdc3308f 100644 --- a/htdocs/langs/pt_PT/compta.lang +++ b/htdocs/langs/pt_PT/compta.lang @@ -11,7 +11,7 @@ FeatureIsSupportedInInOutModeOnly=Função disponível somente ao modo contas CR VATReportBuildWithOptionDefinedInModule=Montantes apresentados aqui são calculadas usando as regras definidas pelo Imposto de configuração do módulo. LTReportBuildWithOptionDefinedInModule=Os valores mostrados aqui são calculados usando regras definidas pela configuração da empresa. Param=Parametrização -RemainingAmountPayment=Amount payment remaining: +RemainingAmountPayment=Valor do pagamento restante: Account=Conta Accountparent=Conta pai Accountsparent=Contas pai @@ -111,9 +111,9 @@ Refund=Reembolso SocialContributionsPayments=Pagamentos de impostos sociais/fiscais ShowVatPayment=Ver Pagamentos IVA TotalToPay=Total a Pagar -BalanceVisibilityDependsOnSortAndFilters=O saldo é visível nesta lista apenas se a tabela estiver classificada como ascendente no %s e filtrada para uma conta bancária +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=Código de contabilidade do cliente -SupplierAccountancyCode=Vendor accounting code +SupplierAccountancyCode=Código de contabilidade do fornecedor CustomerAccountancyCodeShort=Cust. conta. código SupplierAccountancyCodeShort=Sup. conta. código AccountNumber=Número de conta @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Tem certeza de que deseja eliminar este pagament 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>. -CalcModeDebt=Análise de faturas registradas, mesmo que ainda não estejam contabilizadas no razão. +CalcModeDebt=Analysis of known recorded documents even if they are not yet accounted in ledger. CalcModeEngagement=Análise de pagamentos registrados conhecidos, mesmo que eles ainda não sejam contabilizados no Ledger. CalcModeBookkeeping=Análise de dados com periodicidade na tabela Ledger de contabilidade. CalcModeLT1= Modo <b> %sRE nas faturas do cliente - fornecedores invoices%s </ b> @@ -154,11 +154,11 @@ AnnualSummaryInputOutputMode=Balanço da receita e despesas, resumo anual AnnualByCompanies=Saldo de receitas e despesas, por grupos predefinidos de conta AnnualByCompaniesDueDebtMode=Saldo de receitas e despesas, detalhe por grupos predefinidos, modo <b> %sClaims-Debts%s </ b> disse <b> Contabilidade de compromisso </ b>. AnnualByCompaniesInputOutputMode=Saldo de receitas e despesas, detalhe por grupos predefinidos, modo <b> %sIncomes-Expenses%s </ b> disse <b> contabilidade de caixa </ b>. -SeeReportInInputOutputMode=Consulte %sanálise de payments%s para um cálculo de pagamentos reais efetuados, mesmo que eles ainda não tenham sido contabilizados no Ledger. -SeeReportInDueDebtMode=Consulte %sanálise de invoices%s para um cálculo baseado em faturas registradas conhecidas, mesmo que elas ainda não tenham sido contabilizadas no Ledger. -SeeReportInBookkeepingMode=Consulte <b> %sRelatório de reservas%s </ b> para um cálculo na <b> tabela Razão da contabilidade </ 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=- Os montantes exibidos contêm todas as taxas incluídas -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=- Inclui faturas pendentes, despesas, IVA, doações pagas ou não. Inclui também salários pagos. <br> - Baseia-se na data de cobrança das faturas e na data de vencimento das despesas ou pagamentos de impostos. Para salários definidos com o módulo Salários, é utilizada a data-valor de pagamento. RulesResultInOut=- Inclui os pagamentos reais feitos em faturas, despesas, IVA e salários. <br> - Baseia-se nas datas de pagamento das faturas, despesas, IVA e salários. A data de doação para doação. 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> @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=Ele mostra um registro em seu livro contábil SeePageForSetup=Veja o menu <a href="%s"> %s </a> para configuração DepositsAreNotIncluded=- As faturas de adiantamento não estão incluídas DepositsAreIncluded=- As faturas de adiantamento estão incluídas +LT1ReportByMonth=Tax 2 report by month +LT2ReportByMonth=Tax 3 report by month LT1ReportByCustomers=Denunciar imposto 2 por terceiros LT2ReportByCustomers=Denunciar imposto 3 por terceiros LT1ReportByCustomersES=Relatório de terceiros RE LT2ReportByCustomersES=Relatório de terceiros IRPF VATReport=Relatório fiscal de venda VATReportByPeriods=Relatório fiscal de vendas por período +VATReportByMonth=Sale tax report by month VATReportByRates=Relatório fiscal de venda por taxas VATReportByThirdParties=Relatório fiscal de vendas de terceiros VATReportByCustomers=Relatório fiscal de venda por cliente diff --git a/htdocs/langs/pt_PT/cron.lang b/htdocs/langs/pt_PT/cron.lang index 4f3f47748fe..d6f7062e193 100644 --- a/htdocs/langs/pt_PT/cron.lang +++ b/htdocs/langs/pt_PT/cron.lang @@ -1,19 +1,20 @@ # Dolibarr language file - Source file is en_US - cron # About page # Right -Permission23101 = Ler trabalho 'Agendado' -Permission23102 = Criar/atualizar trabalho agendado -Permission23103 = Eliminar trabalho agendado -Permission23104 = Executar Trabalho Agendado +Permission23101 = Ler tarefa 'Agendada' +Permission23102 = Criar/atualizar tarefa 'Agendada' +Permission23103 = Eliminar tarefa 'Agendada' +Permission23104 = Executar tarefa 'Agendada' # Admin -CronSetup= Configuração da gestão de tarefas agendadas -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=Or to check and launch a specific job -KeyForCronAccess=Security key for URL to launch cron jobs +CronSetup=Configuração da gestão de tarefas agendadas +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=Código de segurança para URL para iniciar tarefas qualificadas 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 environement you can use Scheduled task tools 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 @@ -22,12 +23,12 @@ EnabledAndDisabled=Ativado e desativado CronLastOutput=Latest run output CronLastResult=Latest result code CronCommand=Comando -CronList=Tarefas agendadas -CronDelete=Delete scheduled jobs -CronConfirmDelete=Tem certeza de que deseja eliminar estes trabalhos agendados? -CronExecute=Launch scheduled job -CronConfirmExecute=Tem certeza de que deseja executar esses trabalhos agendados agora? -CronInfo=Módulo de trabalhos agendados permite agendar trabalhos para executá-los automaticamente. Os trabalhos também podem ser iniciados manualmente. +CronList=Trabalhos agendadas +CronDelete=Eliminar tarefas agendadas +CronConfirmDelete=Tem a certeza que deseja eliminar estas tarefas agendadas? +CronExecute=Iniciar tarefa agendada +CronConfirmExecute=Tem a certeza de que deseja executar agora estas tarefas agendadas? +CronInfo=O módulo de tarefas agendadas permite agendar tarefas para executá-las automaticamente. As tarefas também podem ser iniciadas manualmente. CronTask=Tarefa CronNone=Nenhuma CronDtStart=Não antes @@ -39,16 +40,17 @@ CronFrequency=Frequência CronClass=Classe CronMethod=Método CronModule=Módulo -CronNoJobs=Nenhumas tarefas registadas +CronNoJobs=Sem tarefas registadas CronPriority=Prioridade CronLabel=Etiqueta -CronNbRun=N.º de Execução -CronMaxRun=Max number launch +CronNbRun=Number of launches +CronMaxRun=Maximum number of launches CronEach=Cada -JobFinished=Terafa lançada e concluída +JobFinished=Tarefa iniciada e concluída +Scheduled=Scheduled #Page card CronAdd= Adicionar tarefas -CronEvery=Executar cada trabalho +CronEvery=Executar cada tarefa CronObject=Instância/Objeto para criar CronArgs=Parâmetros CronSaveSucess=Guardado com sucesso @@ -56,28 +58,34 @@ CronNote=Comentário CronFieldMandatory=Os campos %s são obrigatórios CronErrEndDateStartDt=A data de fim não pode ser anterior à data de início StatusAtInstall=Estado da instalação do módulo -CronStatusActiveBtn=Ativar +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Desativar -CronTaskInactive=Esta tarefa está desactivada +CronTaskInactive=Esta tarefa está desativada CronId=Id CronClassFile=Filename with class -CronModuleHelp=Name of Dolibarr module directory (also work with external Dolibarr module). <BR> For exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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 +CronCreateJob=Criar nova 'Tarefa Agendada' CronFrom=De # Info # Common -CronType=Tipo de trabalho +CronType=Tipo de tarefa 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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +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' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/pt_PT/errors.lang b/htdocs/langs/pt_PT/errors.lang index 1750e06b3f6..57f8d93ee48 100644 --- a/htdocs/langs/pt_PT/errors.lang +++ b/htdocs/langs/pt_PT/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=Nenhum erro # Errors ErrorButCommitIsDone=Erros encontrados, mas a validação foi efetuada apesar disso ErrorBadEMail=Email %s is wrong +ErrorBadMXDomain=Email %s seems wrong (domain has no valid MX record) ErrorBadUrl=O url %s está errado ErrorBadValueForParamNotAString=Valor ruim para o seu parâmetro. Acrescenta geralmente quando falta a tradução. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=O login %s já existe. ErrorGroupAlreadyExists=O grupo %s já existe. ErrorRecordNotFound=Registo não foi encontrado. @@ -48,6 +50,7 @@ ErrorFieldsRequired=Não se indicaram alguns campos obrigatórios ErrorSubjectIsRequired=O tópico do email é obrigatório ErrorFailedToCreateDir=Erro na criação de uma pasta. Verifique se o usuário do servidor Web tem acesso de escrita aos documentos Dolibarr. Se o parâmetro <b> safe_mode </ b> está ativo no PHP, Verifique se os arquivos php do Dolibarr são da propriedade do usuário do servidor web. ErrorNoMailDefinedForThisUser=E-Mail não definido para este utilizador +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=Esta Funcionalidade precisa de javascript activo para funcionar. Modifique em configuração->ambiente. ErrorTopMenuMustHaveAParentWithId0=Um menu do tipo 'Superior' não pode ter um menu pai. Coloque 0 ao ID pai ou busque um menu do tipo 'esquerdo' ErrorLeftMenuMustHaveAParentId=Um menu do tipo 'esquerdo' deve de ter um ID de pai @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=Este nome de perfil já existe para este conjunto de ErrorLDAPSetupNotComplete=A configuração Dolibarr-LDAP é incompleta. ErrorLDAPMakeManualTest=Foi criado um Ficheiro .ldif na pasta %s. Trate de gerir manualmente este Ficheiro desde a linha de comandos para Obter mais detalhes acerca do erro. ErrorCantSaveADoneUserWithZeroPercentage=Não é possível salvar uma ação com "status não iniciado" se o campo "concluído por" também estiver preenchido. -ErrorRefAlreadyExists=A referencia utilizada para a criação já existe +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorPleaseTypeBankTransactionReportName=Por favor, insira o nome do extrato bancário onde a entrada deve ser relatada (Formato AAAA ou AAAAMMDD) ErrorRecordHasChildren=Falha ao excluir registro, pois possui alguns registros filhos. ErrorRecordHasAtLeastOneChildOfType=O objeto tem pelo menos um elemento do tipo %s @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=Você deve escolher se o artigo ErrorDiscountLargerThanRemainToPaySplitItBefore=O desconto que você tenta aplicar é maior do que continuar a pagar. Divida o desconto em 2 descontos menores antes. ErrorFileNotFoundWithSharedLink=Ficheiro não encontrado. É possível que a chave de partilha tenha sido modificada ou o ficheiro tenha sido removido recentemente. ErrorProductBarCodeAlreadyExists=O código de barras do produto %s já existe em outra referência de produto. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Observe também que não é possível usar o produto virtual para aumentar / diminuir automaticamente subprodutos quando pelo menos um subproduto (ou subproduto de subprodutos) precisa de um número de série / lote. +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=A descrição é obrigatória para linhas com produto livre ErrorAPageWithThisNameOrAliasAlreadyExists=A página / container <strong> %s </ strong> tem o mesmo nome ou alias alternativo que você usa ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were not loaded, you can still enter them manually. @@ -243,6 +246,16 @@ 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 + # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=Uma senha foi definida para este membro. No entanto, nenhuma conta de usuário foi criada. Portanto, essa senha é armazenada, mas não pode ser usada para fazer login no Dolibarr. Pode ser usado por um módulo externo / interface, mas se você não precisa definir nenhum login nem senha para um membro, você pode desativar a opção "Gerenciar um login para cada membro" da configuração do módulo de membro. Se você precisar gerenciar um login, mas não precisar de nenhuma senha, poderá manter esse campo vazio para evitar esse aviso. Nota: O email também pode ser usado como um login se o membro estiver vinculado a um usuário. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=O seu login foi modificado. Por motivos d WarningAnEntryAlreadyExistForTransKey=Já existe uma entrada para a chave de tradução para este idioma WarningNumberOfRecipientIsRestrictedInMassAction=Atenção, o número de destinatários diferentes é limitado a <b> %s </ b> ao usar as ações em massa nas listas WarningDateOfLineMustBeInExpenseReportRange=Atenção, a data da linha não está no intervalo do relatório de despesas +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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/pt_PT/exports.lang b/htdocs/langs/pt_PT/exports.lang index 519f3985bc9..083e48f5527 100644 --- a/htdocs/langs/pt_PT/exports.lang +++ b/htdocs/langs/pt_PT/exports.lang @@ -26,6 +26,8 @@ FieldTitle=Campo título NowClickToGenerateToBuildExportFile=Agora, selecione o formato de arquivo na caixa de combinação e clique em "Generate" para construir o arquivo de exportação ... AvailableFormats=Formatos Disponíveis LibraryShort=Biblioteca +ExportCsvSeparator=Csv caracter separator +ImportCsvSeparator=Csv caracter separator Step=Passo FormatedImport=Assistente de Importação FormatedImportDesc1=Este módulo permite-lhe atualizar os dados existentes ou adicionar novos objetos na base de dados a partir de um ficheiro sem conhecimentos técnicos, utilizando um assistente. @@ -131,3 +133,4 @@ KeysToUseForUpdates=Chave (coluna) a ser usada para <b> atualizar </ b> dados ex NbInsert=Número de linhas inseridas: %s NbUpdate=Número de linhas atualizadas: %s MultipleRecordFoundWithTheseFilters=Foram encontrados vários registos com esses filtros: %s +StocksWithBatch=Stocks and location (warehouse) of products with batch/serial number diff --git a/htdocs/langs/pt_PT/mails.lang b/htdocs/langs/pt_PT/mails.lang index 4711f17de75..df6212dc07b 100644 --- a/htdocs/langs/pt_PT/mails.lang +++ b/htdocs/langs/pt_PT/mails.lang @@ -92,6 +92,7 @@ MailingModuleDescEmailsFromUser=Entrada de e-mails pelo usuário MailingModuleDescDolibarrUsers=Usuários com e-mails MailingModuleDescThirdPartiesByCategories=Terceiros (por categorias) SendingFromWebInterfaceIsNotAllowed=Envio de interface web não é permitido. +EmailCollectorFilterDesc=All filters must match to have an email being collected # Libelle des modules de liste de destinataires mailing LineInFile=Linha %s em Ficheiro @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=Nenhum email enviado. Remetente incorreto ou email do destinatário. Verifique o perfil do usuário. # Module Notifications Notifications=Notificações -NoNotificationsWillBeSent=Nenhuma notificação por e-mail está prevista para este evento e empresa -ANotificationsWillBeSent=1 notificação vai a ser enviada por e-mail -SomeNotificationsWillBeSent=%s Notificações vão ser enviadas por e-mail -AddNewNotification=Ativar um novo alvo/evento de notificação por e-mail -ListOfActiveNotifications=Listar todos os destinos / eventos ativos para notificação por email -ListOfNotificationsDone=Lista de todas as notificações de e-mail enviado +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=A configuração do envio de email foi configurada para '%s'. Este modo não pode ser usado para enviar e-mails em massa. MailSendSetupIs2=Você deve primeiro ir, com uma conta admin, no menu %sHome - Setup - EMails%s para alterar o parâmetro <strong> '%s' </ strong> para usar o modo '%s'. Com esse modo, você pode inserir a configuração do servidor SMTP fornecido pelo seu provedor de serviços de Internet e usar o recurso de envio de email em massa. MailSendSetupIs3=Se você tiver alguma dúvida sobre como configurar seu servidor SMTP, você pode perguntar para %s. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=O arquivo importado deve ter formato <strong> email; UseFormatInputEmailToTarget=Insira uma string com o formato <strong> email; nome; nome; outro </ strong> MailAdvTargetRecipients=Destinatários (seleção avançada) AdvTgtTitle=Preencha os campos de entrada para pré-selecionar os terceiros ou contatos / endereços para segmentar -AdvTgtSearchTextHelp=Use %% como curingas. Por exemplo, para encontrar todos os itens como <b> jean, joe, jim </ b>, você pode inserir <b> j%% </ b>, você também pode usar; como separador por valor e use! por exceto este valor. Por exemplo, <b> jean; joe; jim%%;! Jimo;! Jima% </ b> terá como alvo todo o jean, joe, comece com jim mas não jimo e nem tudo que começar com jima +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 para selecionar int ou valor float AdvTgtMinVal=Valor mínimo AdvTgtMaxVal=Valor máximo @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Criar filtro AdvTgtOrCreateNewFilter=Nome do novo filtro NoContactWithCategoryFound=Nenhum contato / endereço com uma categoria encontrada NoContactLinkedToThirdpartieWithCategoryFound=Nenhum contato / endereço com uma categoria encontrada -OutGoingEmailSetup=Configuração de email de saída -InGoingEmailSetup=Configuração de email de entrada -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Configuração de email de saída padrão +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=Informação ContactsWithThirdpartyFilter=Contacts with third-party filter Unanswered=Unanswered Answered=Answered IsNotAnAnswer=Is not answer (initial email) IsAnAnswer=Is an answer of an initial email +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/pt_PT/main.lang b/htdocs/langs/pt_PT/main.lang index d49765da4c1..69cfcbc202c 100644 --- a/htdocs/langs/pt_PT/main.lang +++ b/htdocs/langs/pt_PT/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=Nenhum modelo disponível para este tipo de e-mail AvailableVariables=Variáveis de substituição disponíveis NoTranslation=Sem tradução Translation=Tradução +CurrentTimeZone=Zona Horária PHP (servidor) EmptySearchString=Introduza alguns critérios de pesquisa +EnterADateCriteria=Enter a date criteria NoRecordFound=Nenhum foi encontrado nenhum registo NoRecordDeleted=Nenhum registo eliminado NotEnoughDataYet=Não existe dados suficientes @@ -85,6 +87,8 @@ FileWasNotUploaded=Um ficheiro foi seleccionada para ser anexado, mas ainda não NbOfEntries=N.º de entradas GoToWikiHelpPage=Consultar ajuda online (necessita de acesso à Internet) GoToHelpPage=Ir para páginas de ajuda +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Página Inicial RecordSaved=Registo Guardado RecordDeleted=Registo eliminado RecordGenerated=Registo gerado @@ -220,6 +224,7 @@ Value=Valor PersonalValue=Valor pessoal NewObject=Novo %s NewValue=Novo valor +OldValue=Old value %s CurrentValue=Valor actual Code=Código Type=Tipo @@ -433,6 +438,7 @@ RemainToPay=Montante por pagar Module=Módulo/Aplicação Modules=Módulos/Aplicações Option=Opção +Filters=Filters List=Lista FullList=Lista Completa FullConversation=Conversa completa @@ -650,6 +656,7 @@ SupplierPreview=Pré-visualização do fornecedor ShowCustomerPreview=Ver Historial Cliente ShowSupplierPreview=Mostrar pré-visualização do fornecedor RefCustomer=Ref. Cliente +InternalRef=Internal ref. Currency=Moeda InfoAdmin=Informação para os administradores Undo=Desfazer @@ -671,7 +678,7 @@ SendMail=Enviar e-mail Email=Email NoEMail=Sem e-mail AlreadyRead=Já lido -NotRead=Não lido +NotRead=Unread NoMobilePhone=Sem telefone móvel Owner=Proprietário FollowingConstantsWillBeSubstituted=As seguintes constantes serão substituidas pelo seu valor correspondente. @@ -1107,3 +1114,9 @@ UpToDate=Actualizado OutOfDate=Desactualizado EventReminder=Lembrete de evento 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 diff --git a/htdocs/langs/pt_PT/modulebuilder.lang b/htdocs/langs/pt_PT/modulebuilder.lang index 416c94c117f..f4005f2db69 100644 --- a/htdocs/langs/pt_PT/modulebuilder.lang +++ b/htdocs/langs/pt_PT/modulebuilder.lang @@ -40,6 +40,7 @@ PageForCreateEditView=Página PHP para criar/editar/visualizar um registo PageForAgendaTab=Página PHP para guia de evento PageForDocumentTab=Página PHP para guia do documento PageForNoteTab=Página do PHP para a guia de nota +PageForContactTab=PHP page for contact tab PathToModulePackage=Caminho para o ficheiro pacote .zip do módulo/aplicação PathToModuleDocumentation=Path to file of module/application documentation (%s) SpaceOrSpecialCharAreNotAllowed=Espaços ou caracteres especiais não são permitidos. @@ -77,7 +78,7 @@ IsAMeasure=É uma medida DirScanned=Diretório varrido NoTrigger=Nenhum gatilho NoWidget=Nenhum widget -GoToApiExplorer=Ir para o explorador de API +GoToApiExplorer=API explorer ListOfMenusEntries=Lista de entradas do menu ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=Lista de permissões definidas @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=Se você tem conhecimento de SQL e PHP, você pode usar SeeTopRightMenu=Veja <span class = "fa fa-bug"> </ span> no menu superior direito AddLanguageFile=Adicionar ficheiro de idiomas YouCanUseTranslationKey=Você pode usar aqui uma chave que é a chave de tradução encontrada no arquivo de idioma (veja a aba "Idiomas") -DropTableIfEmpty=(Excluir tabela se vazia) +DropTableIfEmpty=(Destroy table if empty) TableDoesNotExists=A tabela %s não existe TableDropped=Tabela %s excluída InitStructureFromExistingTable=Construir a cadeia de matriz de estrutura de uma tabela existente @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/pt_PT/mrp.lang b/htdocs/langs/pt_PT/mrp.lang index 60409d454a7..9e4293a072e 100644 --- a/htdocs/langs/pt_PT/mrp.lang +++ b/htdocs/langs/pt_PT/mrp.lang @@ -78,3 +78,27 @@ TotalCost=Custo total BOMTotalCost=The cost to produce this BOM based on cost of each quantity and product to consume (use Cost price if defined, else Average Weighted Price if defined, else the Best purchase price) 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/pt_PT/other.lang b/htdocs/langs/pt_PT/other.lang index ce2b87ce1ac..58dad92008d 100644 --- a/htdocs/langs/pt_PT/other.lang +++ b/htdocs/langs/pt_PT/other.lang @@ -5,8 +5,6 @@ Tools=Utilidades TMenuTools=Ferramentas ToolsDesc=Todas as ferramentas não incluídas em outras entradas do menu estão agrupadas aqui. Todas as ferramentas podem ser acessadas através do menu à esquerda. Birthday=Aniversario -BirthdayDate=Data de nascimento -DateToBirth=Birth date BirthdayAlertOn=Alerta de aniversário activo BirthdayAlertOff=Alerta aniversário inativo TransKey=Tradução da chave TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Mês anterior (número 1-12) à data da fatura TextPreviousMonthOfInvoice=Mês anterior (texto) da data da fatura NextMonthOfInvoice=Mês seguinte (número 1-12) à data da fatura TextNextMonthOfInvoice=Mês seguinte (texto) à data da fatura +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Ficheiro zip gerado em <b>%s</b>. DocFileGeneratedInto=Ficheiro doc gerado em <b>%s</b>. JumpToLogin=Desconectado. Vá para a página de inicio de sessão... @@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Relatório de despesas validado (aprovação obri Notify_EXPENSE_REPORT_APPROVE=Relatório de despesas aprovado Notify_HOLIDAY_VALIDATE=Deixe o pedido validado (aprovação obrigatória) Notify_HOLIDAY_APPROVE=Deixe o pedido aprovado +Notify_ACTION_CREATE=Added action to Agenda SeeModuleSetup=Veja a configuração do módulo %s NbOfAttachedFiles=Número Ficheiros/Documentos anexos TotalSizeOfAttachedFiles=Tamanho Total dos Ficheiros/Documentos anexos @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Você pode clicar no link abaixo para fazer seu pagamento, se ainda não estiver pronto.\n\n%s\n\n PredefinedMailContentGeneric=__(Olá)__\n\n\n__(Atenciosamente)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendActionComm=Event reminder "__EVENT_LABEL__" on __EVENT_DATE__ at __EVENT_TIME__<br><br>This is an automatic message, please do not reply. DemoDesc=O Dolibarr é um ERP/CRM compacto que suporta vários módulos de negócios. Uma demonstração mostrando todos os módulos não faz sentido porque esse cenário nunca ocorre (várias centenas disponíveis). Assim, vários perfis de demonstração estão disponíveis. ChooseYourDemoProfil=Escolha o perfil de demonstração que melhor se adequa às suas necessidades ... ChooseYourDemoProfilMore=...ou crie o seu próprio perfil <br> (seleção manual de módulo) @@ -137,7 +139,7 @@ Right=Direito CalculatedWeight=Peso calculado CalculatedVolume=Volume calculado Weight=Peso -WeightUnitton=Toneladas +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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=Importação conjunto de dados DolibarrNotification=Notificação automática ResizeDesc=Insira a nova largura <b>OU</b> altura. A proporção será mantida durante o redimensionamento... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Área de Exportações diff --git a/htdocs/langs/pt_PT/products.lang b/htdocs/langs/pt_PT/products.lang index c3b0fc3d5eb..45ba3d7cb6a 100644 --- a/htdocs/langs/pt_PT/products.lang +++ b/htdocs/langs/pt_PT/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Nº de preços DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=Número de produtos de embalagem fonte @@ -167,8 +168,10 @@ BuyingPrices=Preços de compra CustomerPrices=Preços aos clientes SuppliersPrices=Preços de fornecedor SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Código Aduaneiro / Commodity / HS +CustomCode=Customs|Commodity|HS code CountryOrigin=País de origem +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Nature of product (material/finished) NatureOfProductShort=Nature of product NatureOfProductDesc=Raw material or finished product @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Utilizar o preço fixo PriceByQuantity=Preços diferentes por quantidade DisablePriceByQty=Desativar preços por quantidade PriceByQuantityRange=Gama de quantidades -MultipriceRules=Regras de segmento de preço +MultipriceRules=Automatic prices for segment UseMultipriceRules=Utilizar regras de segmento de preço (definidas na configuração do módulo do produto) para calcular automaticamente os preços de todos os outros segmentos de acordo com o primeiro segmento PercentVariationOver=variação %% sobre %s PercentDiscountOver=%% desconto sobre %s diff --git a/htdocs/langs/pt_PT/projects.lang b/htdocs/langs/pt_PT/projects.lang index bc1713523d8..77cd1521bfe 100644 --- a/htdocs/langs/pt_PT/projects.lang +++ b/htdocs/langs/pt_PT/projects.lang @@ -76,15 +76,16 @@ MyActivities=As Minhas Tarefas/Atividades MyProjects=Os Meus Projetos MyProjectsArea=A Minha Área de Projetos DurationEffective=Duração Efetiva -ProgressDeclared=Progresso declarado +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Progresso calculado +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=Tempo +TimeConsumed=Consumed ListOfTasks=Lista de tarefas GoToListOfTimeConsumed=Ir para a lista de tempo consumido GanttView=Vista de Gantt diff --git a/htdocs/langs/pt_PT/recruitment.lang b/htdocs/langs/pt_PT/recruitment.lang index b11245de51e..eb48df47240 100644 --- a/htdocs/langs/pt_PT/recruitment.lang +++ b/htdocs/langs/pt_PT/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/pt_PT/sendings.lang b/htdocs/langs/pt_PT/sendings.lang index 156fc7a9c54..f66f4fbc0fe 100644 --- a/htdocs/langs/pt_PT/sendings.lang +++ b/htdocs/langs/pt_PT/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Outros Envios deste Pedido SendingsAndReceivingForSameOrder=Envios e receções para esta encomenda SendingsToValidate=Expedições por validar StatusSendingCanceled=Cancelado +StatusSendingCanceledShort=Cancelado StatusSendingDraft=Rascunho StatusSendingValidated=Validado (produtos a enviar ou enviados) StatusSendingProcessed=Processado @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=Deve validar a encomenda antes de poder efetuar # Sending methods # ModelDocument DocumentModelTyphon=Modelo de documento mais completo para a entrega recibos (logo. ..) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=EXPEDITION_ADDON_NUMBER constante não definida SumOfProductVolumes=Soma dos volumes dos produtos SumOfProductWeights=Soma dos pesos dos produtos diff --git a/htdocs/langs/pt_PT/stocks.lang b/htdocs/langs/pt_PT/stocks.lang index 2ad95e6aadc..f45b0a7d580 100644 --- a/htdocs/langs/pt_PT/stocks.lang +++ b/htdocs/langs/pt_PT/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Armazém predefinido @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/pt_PT/ticket.lang b/htdocs/langs/pt_PT/ticket.lang index 4ef4dab738e..3b45f4471c9 100644 --- a/htdocs/langs/pt_PT/ticket.lang +++ b/htdocs/langs/pt_PT/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Lógica do sistema de desconexão -TicketTypeShortBUGHARD=Disfonctionnement matériel -TicketTypeShortCOM=Questão comercial +TicketTypeShortCOM=Questão comercial TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Outro TicketSeverityShortLOW=Baixo TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=Alto -TicketSeverityShortBLOCKING=Crítico / Bloqueio +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Campo '%s' incorreto MenuTicketMyAssign=Os meus tickets @@ -60,7 +58,6 @@ OriginEmail=Fonte de e-mail Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Não lido Read=Ler Assigned=Atribuído InProgress=Em progresso @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=A interface pública permite que qualquer vis TicketsAutoAssignTicket=Atribuir automaticamente o usuário que criou o ticket TicketsAutoAssignTicketHelp=Ao criar um ticket, o usuário pode ser atribuído automaticamente ao ticket. TicketNumberingModules=Módulo de numeração de ingressos +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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Não notificar a empresa na criação Unread=Não lida TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/pt_PT/website.lang b/htdocs/langs/pt_PT/website.lang index c18079450fb..9b4a56eab98 100644 --- a/htdocs/langs/pt_PT/website.lang +++ b/htdocs/langs/pt_PT/website.lang @@ -30,7 +30,6 @@ EditInLine=Editar em linha AddWebsite=Adicionar site da Web Webpage=Página/recipiente da Web AddPage=Adicionar página/recipiente -HomePage=Página Inicial PageContainer=Página PreviewOfSiteNotYetAvailable=Pré-visualização do seu site <strong> %s </ strong> ainda não disponível. Você deve primeiro '<strong> Importar um modelo de site completo </ strong>' ou apenas '<strong> Adicionar uma página / contêiner </ strong>'. RequestedPageHasNoContentYet=Página solicitada com o ID %s ainda não tem conteúdo, ou o arquivo de cache .tpl.php foi removido. Edite o conteúdo da página para resolver isso. @@ -101,7 +100,7 @@ EmptyPage=Página vazia ExternalURLMustStartWithHttp=O URL externo deve começar com http: // ou https: // ZipOfWebsitePackageToImport=Upload the Zip file of the website template package ZipOfWebsitePackageToLoad=or Choose an available embedded website template package -ShowSubcontainers=Incluir conteúdo dinâmico +ShowSubcontainers=Show dynamic content InternalURLOfPage=URL interno da página ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=Esta página / contêiner tem tradução @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/pt_PT/withdrawals.lang b/htdocs/langs/pt_PT/withdrawals.lang index 56a6745c1c0..fba7a0e8227 100644 --- a/htdocs/langs/pt_PT/withdrawals.lang +++ b/htdocs/langs/pt_PT/withdrawals.lang @@ -42,6 +42,7 @@ LastWithdrawalReceipt=Últimos recibos de débito direto %s MakeWithdrawRequest=Efetuar um pedido de pagamento por débito direto MakeBankTransferOrder=Make a credit transfer request WithdrawRequestsDone=Pedidos de pagamento por débito direto %s registrados +BankTransferRequestsDone=%s credit transfer requests recorded ThirdPartyBankCode=Third-party bank code NoInvoiceCouldBeWithdrawed=Nenhuma fatura debitada com sucesso. Verifique se as faturas estão em empresas com um IBAN válido e se o IBAN tem uma UMR (Unique Mandate Reference) com o modo <strong> %s </ strong>. ClassCredited=Classificar como creditado @@ -131,7 +132,8 @@ SEPARCUR=SEPA CUR SEPAFRST=SEPA FRST ExecutionDate=Data de execução CreateForSepa=Criar ficheiro de débito direto -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,3 +148,5 @@ InfoRejectSubject=Pedido de pagamento por débito direto recusado InfoRejectMessage=Olá, <br> <br> a ordem de pagamento de débito directo da factura %s relacionada com a empresa %s, com uma quantidade de %s foi recusada pelo banco. <br> <br> <br> <br>%s ModeWarning=Opção para o modo real não foi definido, nós paramos depois desta simulação ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorICSmissing=Missing ICS in Bank account %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/pt_PT/workflow.lang b/htdocs/langs/pt_PT/workflow.lang index c657d1eb8c2..15b30e7f6ac 100644 --- a/htdocs/langs/pt_PT/workflow.lang +++ b/htdocs/langs/pt_PT/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=Criação automática AutomaticClassification=Classificação automática +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/ro_RO/accountancy.lang b/htdocs/langs/ro_RO/accountancy.lang index db1f0e59b3f..390a4165131 100644 --- a/htdocs/langs/ro_RO/accountancy.lang +++ b/htdocs/langs/ro_RO/accountancy.lang @@ -16,6 +16,8 @@ ThisService=Acest serviciu ThisProduct=Acest produs DefaultForService=Implicit pentru serviciu DefaultForProduct=Implicit pentru produs +ProductForThisThirdparty=Produs pentru acest terţ +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ă) @@ -48,6 +50,7 @@ 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. VueByAccountAccounting=Vizualizare după contul contabil +VueBySubAccountAccounting=Vizualizați după subcont contabil MainAccountForCustomersNotDefined=Contul contabil principal pentru clienții care nu sunt definiți în configurare MainAccountForSuppliersNotDefined=Contul contabil principal pentru furnizorii care nu sunt definiți în configurare @@ -144,7 +147,7 @@ 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 -ACCOUNTING_LIMIT_LIST_VENTILATION=Număr de elemente de legat afișate de pagină (maximum recomandat: 50) +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 @@ -198,7 +201,8 @@ Docdate=Data Docref=Referinţă LabelAccount=Etichetă cont LabelOperation=Etichetarea operaţiei -Sens=Sens +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 Lettering=Numerotare Codejournal=Journal @@ -206,7 +210,8 @@ JournalLabel=Eticheta jurnalului NumPiece=Număr nota contabila TransactionNumShort=Numărul tranzacţiei AccountingCategory=Grupuri personalizate -GroupByAccountAccounting=Grupează după contul contabil +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Plata nu legată de vreun produs/serviciu OpeningBalance=Sold iniţial de deschidere ShowOpeningBalance=Afişează soldurile de deschidere HideOpeningBalance=Ascunde soldurile de deschidere -ShowSubtotalByGroup=Afişare subtotal după grupă +ShowSubtotalByGroup=Afișează subtotalul după nivel 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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consultați aici lista liniilor de raportare a cheltuiel 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 +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 OverviewOfMovementsNotValidated=Pasul 1 / Prezentarea generală a tranzacţiilor nevalidate. (Necesar pentru a închide un an fiscal) +AllMovementsWereRecordedAsValidated=Toate mișcările au fost înregistrate ca validate +NotAllMovementsCouldBeRecordedAsValidated=Nu toate mișcările au putut fi înregistrate ca validate ValidateMovements=Vallidare trasferuri DescValidateMovements= Orice modificare sau ștergere a înregistrărilor va fi interzisă. Toate intrările pentru un exercițiu financiar trebuie validate, altfel închiderea nu va fi posibilă -SelectMonthAndValidate=Selectează luna şi validează trasferurile ValidateHistory=Asociază automat AutomaticBindingDone=Asociere automată făcută @@ -293,6 +300,7 @@ Accounted=Contabilizat în jurnal - Cartea Mare NotYetAccounted=Nu a fost încă înregistrată în jurnal - Cartea Mare ShowTutorial=Arată tutorial NotReconciled=Nu este conciliat +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 @@ -337,6 +345,7 @@ Modelcsv_LDCompta10=Export pentru LD Compta (v10 & mai nou) Modelcsv_openconcerto=Export pentru OpenConcerto (Test) Modelcsv_configurable=Exportați CSV configurabil Modelcsv_FEC=Exportă fişier FEC +Modelcsv_FEC2=Export FEC (cu scriere de date generate/document inversat) Modelcsv_Sage50_Swiss=Export pentru Sage 50 Switzerland Modelcsv_winfic=Export Winfic - eWinfic - WinSis Compta Modelcsv_Gestinumv3=Export pentru Gestinum (v3) diff --git a/htdocs/langs/ro_RO/admin.lang b/htdocs/langs/ro_RO/admin.lang index 604e4a99a94..2ae296c86f8 100644 --- a/htdocs/langs/ro_RO/admin.lang +++ b/htdocs/langs/ro_RO/admin.lang @@ -56,6 +56,8 @@ 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) +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. @@ -85,7 +87,6 @@ ShowPreview=Arată previzualizare ShowHideDetails=Afişare-Ascundere detalii PreviewNotAvailable=Preview nu este disponibil ThemeCurrentlyActive=Tema activă în prezent -CurrentTimeZone=TimeZone PHP (server) MySQLTimeZone=TimeZone MySql (database) 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 @@ -153,8 +154,8 @@ SystemToolsAreaDesc=Această zonă oferă funcții de administrare. Utilizați m 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 temporare (fără riscul de a pierde date). Notă: Ștergerea se face numai dacă directorul temporar a fost creat acum 24 de ore. -PurgeDeleteTemporaryFilesShort=Sterge fisiere temporare +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.  +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. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Parteneri preferati OtherResources=Alte resurse ExternalResources=Resurse externe SocialNetworks=Retele 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> HelpCenterDesc1=Iată câteva resurse pentru a obține ajutor și asistență cu Dolibarr. @@ -375,7 +377,7 @@ 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 -ExampleOfDirectoriesForModelGen=Exemple de sintaxa: <br> c: mydir \\ <br> / Home / mydir <br> DOL_DATA_ROOT / ECM / ecmdir +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: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Poziţia Prenume / Nume @@ -406,7 +408,7 @@ 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 GetSecuredUrl=Obţineţi URL-ul calculat -ButtonHideUnauthorized=Ascundeți butoanele pentru utilizatorii care nu sunt administratori pentru acțiuni neautorizate, în loc să apară butoane dezactivate în culoarea gri +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 @@ -668,7 +670,7 @@ Module54000Desc=Imprimare directă (fără a deschide documentele) utilizând in Module55000Name=Sondaj, supraveghere sau vot Module55000Desc=Creați sondaje online, sondaje sau voturi (cum ar fi Doodle, Studs, RDVz etc ...) Module59000Name=Marje -Module59000Desc=Modul management marje +Module59000Desc=Modul pentru urmărirea marjelor Module60000Name=Comisioane Module60000Desc=Modul management comisioane Module62000Name=Incoterm @@ -1306,7 +1308,7 @@ YouUseBestDriver=Utilizați driverul %s, care este cel mai bun driver disponibil YouDoNotUseBestDriver=Utilizați driverul %s dar driverul %s este recomandat. NbOfObjectIsLowerThanNoPb=Aveţi doar %s%s în baza de date. Aceasta nu necesită nicio optimizare specială. SearchOptim=Optimizare căutare -YouHaveXObjectUseSearchOptim=Aveţi %s%s în baza de date. Ar trebui să adăgaţi constanta %scu valoarea 1 în Acasă-Setup-Altele. Limitați căutarea la începutul șirurilor, ceea ce face posibilă utilizarea bazei de date cu indecşi și ar trebui să obțineți un răspuns imediat. +YouHaveXObjectUseSearchOptim=Aveți %s %s în baza de date. Puteți adăuga constanta %s la 1 în Acasă-Configurare-Altele. Limitați căutarea la începutul șirurilor, ceea ce face posibilă utilizarea indecşilor în baza de date și ar trebui să primiți un răspuns mai rapid. YouHaveXObjectAndSearchOptimOn=Aveţi %s%s în baza de date şi constanta %s este setată la valoarea 1 în Acasă-Setup-Altele. BrowserIsOK=Utilizați browserul web %s. Acest browser este ok pentru securitate și performanţă. BrowserIsKO=Utilizați browserul web %s. Acest browser este cunoscut ca fiind o alegere proastă pentru securitate, fiabilitate și performanță. Vă recomandăm să utilizați Firefox, Chrome, Opera sau Safari. @@ -1596,8 +1598,13 @@ ServiceSetup=Servicii de modul de configurare ProductServiceSetup=Produse şi Servicii de module de configurare 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ă.  +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 limba părții terțea +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 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Meniuri personalizate care nu sunt legate de o intrar NewMenu=New meniul MenuHandler=Meniu manipulant MenuModule=Sursa de modul -HideUnauthorizedMenu= Ascunde meniuri neautorizate (gri) +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 @@ -1983,11 +1990,12 @@ EMailHost=Gazdă a serverului de email IMAP MailboxSourceDirectory=Directorul sursă al cutiei poștale MailboxTargetDirectory=Directorul ţintă al cutiei poștale EmailcollectorOperations=Operațiuni de făcut de către colector +EmailcollectorOperationsDesc=Operațiunile sunt executate în ordinea de sus în jos MaxEmailCollectPerCollect=Număr maxim de email-uri colectae per operaţiune CollectNow=Colectați acum ConfirmCloneEmailCollector=Eşti sigur că vrei să clonezi colectorul de email %s? -DateLastCollectResult=Data ultimei încercări de colectare -DateLastcollectResultOk=Data ultimei colectări efectuate cu succes +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? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Mesaj dintr-o conversație inițiată de un prim e-mail trimis 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 -CreateCandidature=Creare candidatură +CreateCandidature=Creare aplicare la job FormatZip=Zip MainMenuCode=Codul de introducere a meniului (meniu principal) ECMAutoTree=Afișați arborele ECM automat @@ -2083,3 +2091,7 @@ 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. 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 diff --git a/htdocs/langs/ro_RO/banks.lang b/htdocs/langs/ro_RO/banks.lang index 5e85e7eb2bc..0ca440a7b50 100644 --- a/htdocs/langs/ro_RO/banks.lang +++ b/htdocs/langs/ro_RO/banks.lang @@ -173,10 +173,11 @@ SEPAMandate=Mandat SEPA YourSEPAMandate=Mandatul dvs. SEPA FindYourSEPAMandate=Acesta este mandatul dvs. SEPA pentru a autoriza compania noastră să efectueze un ordin de debitare directă către banca dvs. Reveniți semnat (scanarea documentului semnat) sau trimiteți-l prin poștă la AutoReportLastAccountStatement=Completați automat câmpul "numărul extrasului de cont" cu ultimul număr al declarației atunci când efectuați reconcilierea -CashControl= Limită de numerar POS -NewCashFence= Limită nouă de numerar +CashControl=Control POS casierie +NewCashFence=Închidere nouă de casierie 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.  +NoBankAccountDefined=Nu a fost definit niciun cont bancar diff --git a/htdocs/langs/ro_RO/blockedlog.lang b/htdocs/langs/ro_RO/blockedlog.lang index fb1ab84c5eb..aadcbc5379c 100644 --- a/htdocs/langs/ro_RO/blockedlog.lang +++ b/htdocs/langs/ro_RO/blockedlog.lang @@ -35,7 +35,7 @@ logDON_DELETE=Ştergerea logică a donaţiei logMEMBER_SUBSCRIPTION_CREATE=Abonamentul de membru a fost creat logMEMBER_SUBSCRIPTION_MODIFY=Abonamentul de membru a fost modificat logMEMBER_SUBSCRIPTION_DELETE=Ștergerea logică a abonamentului de membru -logCASHCONTROL_VALIDATE=Înregistrarea limitei de bani +logCASHCONTROL_VALIDATE= Înregistrare închidere casierie BlockedLogBillDownload=Descărcarea facturii clientului BlockedLogBillPreview=Previzualizarea facturii clientului BlockedlogInfoDialog=Detalii înregistrare diff --git a/htdocs/langs/ro_RO/boxes.lang b/htdocs/langs/ro_RO/boxes.lang index c258d9aee69..6cc341fa46f 100644 --- a/htdocs/langs/ro_RO/boxes.lang +++ b/htdocs/langs/ro_RO/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=Ultimele %s donaţii modificate BoxTitleLastModifiedExpenses=Ultimele %s deconturi modificare BoxTitleLatestModifiedBoms=Ultimile %sbonuri 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) BoxGoodCustomers=Clienţi buni BoxTitleGoodCustomers=%s Clienţi buni +BoxScheduledJobs=Joburi programate +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Actualizarea fluxului RSS a eșuat. Ultima actualizare reușită: %s LastRefreshDate=Ultima dată reîmprospătare NoRecordedBookmarks=Niciun bookmark definit. @@ -92,8 +95,8 @@ LastXMonthRolling=Rulaj ultimele %s luni ChooseBoxToAdd=Adăugați widget în tabloul dvs. de bord BoxAdded=Widget a fost adăugat în tabloul dvs. de bord BoxTitleUserBirthdaysOfMonth=Aniversări în această lună (utilizatori) -BoxLastManualEntries=Ultimele înregistrări manuale în contabilitate -BoxTitleLastManualEntries=Ultimile %s înregistrări contabile manule +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ă  NoRecordedManualEntries=Nici o înregistrare manuală în contabilitate BoxSuspenseAccount=Contorizează operaţiunea contabilă cu contul suspendat BoxTitleSuspenseAccount=Număr linii nealocate @@ -102,5 +105,7 @@ SuspenseAccountNotDefined=Contul suspendat nu este definit BoxLastCustomerShipments=Ultimile livrări către clienţi BoxTitleLastCustomerShipments=Ultimile %s livrări către clienţi NoRecordedShipments=Nici o livrare către clienţi +BoxCustomersOutstandingBillReached=Clienţi care au epuizat limita de credit # Pages AccountancyHome=Contabilitate +ValidatedProjects=Proiecte validate diff --git a/htdocs/langs/ro_RO/cashdesk.lang b/htdocs/langs/ro_RO/cashdesk.lang index a1d61daa35e..d8622b9d3ee 100644 --- a/htdocs/langs/ro_RO/cashdesk.lang +++ b/htdocs/langs/ro_RO/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Subsol AmountAtEndOfPeriod=Valoare la sfârșitul perioadei (zi, lună sau an) TheoricalAmount=Valoare teoretică RealAmount=Sumă reală -CashFence=Limită cash -CashFenceDone=Limita de bani realizată pentru perioada +CashFence=Închidere casierie +CashFenceDone=Închiderea casei de marcat efectuată pentru perioada respectivă NbOfInvoices=Nr facturi Paymentnumpad=Tipul de pad utilizat pentru introducerea plăţii Numberspad=Suport de numere @@ -99,8 +99,9 @@ CashDeskRefNumberingModules=Modul de numerotare pentru vânzările POS CashDeskGenericMaskCodes6 = Tag-ul <br><b>{TN}</b> este utilizat pentru adăugarea numărului de terminal TakeposGroupSameProduct=Grupează liniile cu produse identice StartAParallelSale=Iniţiază o vânzare paralelă -ControlCashOpening=Controlează sertarul de bani la deschiderea POS -CloseCashFence=Închidere plafon de numerar +SaleStartedAt=Vânzarea a început la %s +ControlCashOpening=Controlați sertarul de numerar la deschiderea POS +CloseCashFence= Închideți controlul casieriei CashReport=Raport numerar MainPrinterToUse=Imprimantă principală de utilizat OrderPrinterToUse=Imprimantă utilizată pentru comenzi @@ -121,4 +122,5 @@ GiftReceiptButton=Adaugă un buton "Bon cadou" GiftReceipt=Bon cadou ModuleReceiptPrinterMustBeEnabled= \nModulul Imprimanta bonuri trebuie să fi fost activat mai întâi AllowDelayedPayment= Permite plata cu întârziere -PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts +PrintPaymentMethodOnReceipts=Tipăriți metoda de plată pe bonuri|chitanțe +WeighingScale=Cântar diff --git a/htdocs/langs/ro_RO/categories.lang b/htdocs/langs/ro_RO/categories.lang index 921c1fbbdb8..5bce5a6db56 100644 --- a/htdocs/langs/ro_RO/categories.lang +++ b/htdocs/langs/ro_RO/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=Tag-uri/categorii proiecte UsersCategoriesArea=Tag-uri/categorii utilizatori SubCats=Subcategorii CatList=Lista tag-uri/categorii +CatListAll=Listă tag-uri/categorii (toate tipurile) NewCategory=Tag/categorie nouă ModifCat=Modifică tag/categorie CatCreated=Tag/categorie creată @@ -65,16 +66,22 @@ UsersCategoriesShort=Tag-uri/categorii utilizatori StockCategoriesShort=Tag-uri/categorii depozite ThisCategoryHasNoItems=Această categorie nu conţine nici un element. CategId=ID tag/categorie +ParentCategory=Tag/categorie părinte +ParentCategoryLabel=Etichetă tag/categorie părinte CatSupList=Listă tag-uri/categorii furnizori -CatCusList=Listă taguri/categorii clienţi/prospecţi +CatCusList=Listă tag-uri/categorii clienţi/prospecţi CatProdList=Listă tag-uri/categorii produse CatMemberList=Listă tag-uri/categorii membri CatContactList=Listă tag-uri/categorii contacte -CatSupLinks=Asocieri între furnizori şi tag-uri/categorii +CatProjectsList=Listă tag-uri/categorii proiecte +CatUsersList=Listă tag-uri/categorii utilizatori +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 -CatProJectLinks=Asocieri între proiecte și tag-uri/categorii +CatMembersLinks=Legături î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 ExtraFieldsCategories=Atribute complementare CategoriesSetup=Configurare tag-uri/categorii diff --git a/htdocs/langs/ro_RO/companies.lang b/htdocs/langs/ro_RO/companies.lang index 08129c19f16..044d0a52957 100644 --- a/htdocs/langs/ro_RO/companies.lang +++ b/htdocs/langs/ro_RO/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Verificați codul TV intracomunitar pe site-ul web al 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=Tip entitate juridică +JuridicalStatus=Tipul entității comerciale Workforce=Forţa de muncă Staff=Angajati ProspectLevelShort=Potenţial diff --git a/htdocs/langs/ro_RO/compta.lang b/htdocs/langs/ro_RO/compta.lang index ea0496677f0..bd3bde9e637 100644 --- a/htdocs/langs/ro_RO/compta.lang +++ b/htdocs/langs/ro_RO/compta.lang @@ -111,7 +111,7 @@ Refund=Rambursare SocialContributionsPayments=Plata taxe sociale sau fiscale ShowVatPayment=Arata plata TVA TotalToPay=Total de plată -BalanceVisibilityDependsOnSortAndFilters=Soldul este vizibil în această listă numai dacă tabelul este sortat ascendent pe %s și filtrat pentru 1 cont bancar +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 CustomerAccountancyCodeShort=Cont contabil client @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Sunteţi sigur că doriţi să ştergeţi aceast 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> -CalcModeDebt=Analiza facturilor înregistrate cunoscute, chiar dacă acestea nu sunt încă înregistrate în registru. +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> @@ -154,9 +154,9 @@ 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>. -SeeReportInInputOutputMode=Vedeți %sanaliza plăților%s pentru un calcul al plăților actuale efectuate chiar dacă acestea nu sunt încă înregistrate în registru. -SeeReportInDueDebtMode=Vedeți %sanaliza facturilor%s pentru un calcul bazat pe facturi înregistrate cunoscute, chiar dacă acestea nu sunt încă înregistrate în registru. -SeeReportInBookkeepingMode=Vedeți <b> %sraportul contabil%s </b> pentru un calcul la <b> Tabelul registrului contabil </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 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 . @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=Se înregistrează în registrul dvs. cu cont SeePageForSetup=Vedeți 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ț 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ă +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 diff --git a/htdocs/langs/ro_RO/cron.lang b/htdocs/langs/ro_RO/cron.lang index 352feb51e3e..fbfafaf8424 100644 --- a/htdocs/langs/ro_RO/cron.lang +++ b/htdocs/langs/ro_RO/cron.lang @@ -7,13 +7,14 @@ Permission23103 = Şterge Job programat Permission23104 = Execută Job programat # Admin CronSetup=Setare Managementul joburilor programate -URLToLaunchCronJobs=URL pentru a verifica și a lansa sarcini cron calificate -OrToLaunchASpecificJob=Sau pentru a verifica și a lansa un anumit job +URLToLaunchCronJobs=Adresă URL pentru a verifica și lansa joburi cron calificate din browser +OrToLaunchASpecificJob=Sau pentru a verifica și lansa un anumit task dintr-un browser KeyForCronAccess=Cheie de securitate pentru URL de lansare a joburilor cron FileToLaunchCronJobs=Linie de comanda pentru a verifica și a lansa sarcini cron calificate CronExplainHowToRunUnix=Pe mediul Unix veţi utiliza instrumentul crontab pentru a rula urmatoarea linia de comanda la fiecare 5 minute CronExplainHowToRunWin=În mediul Microsoft (tm) Windows, puteți utiliza instrumentele programate pentru a executa linia de comandă la fiecare 5 minute CronMethodDoesNotExists= Clasa %s nu conține metoda %s +CronMethodNotAllowed=Metoda %s clasei %seste în lista neagră a metodelor interzise CronJobDefDesc=Profilele sarcinilor Cron sunt definite în fișierul descriptor de module. Când modulul este activat, acestea sunt încărcate și disponibile, astfel încât să puteți administra lucrările din meniul instrumentelor de administrare%s. CronJobProfiles=Lista profilurilor sarcinilor cron predefinite # Menu @@ -46,6 +47,7 @@ CronNbRun=Numărul de lansări CronMaxRun=Număr maxim de lansări CronEach=Fiecare JobFinished=Job lansat şi terminat +Scheduled=Programat #Page card CronAdd= Adaugă joburi CronEvery=Executa fiecare job @@ -56,7 +58,7 @@ CronNote=Comenteaza CronFieldMandatory=Câmpurile %s sunt obligatorii CronErrEndDateStartDt=Data de sfârşit nu poate fi înaintea datei de început StatusAtInstall=Stare la instalarea modulului -CronStatusActiveBtn=Activare +CronStatusActiveBtn=Programare CronStatusInactiveBtn=Dezactivare CronTaskInactive=Acest post este dezactivat CronId=Id @@ -82,3 +84,8 @@ MakeLocalDatabaseDumpShort=Backup local baza de date MakeLocalDatabaseDump=Creați o bază de date locală. Parametrii sunt: ​​compresie ("gz" sau "bz" sau "none"), tipul de backup (mysql, pgsql, auto) 1, "auto" sau nume de fișier de construit, număr de fișiere de rezervă de păstrat WarningCronDelayed=Atenție, în scopul performanței, indiferent de data următoare a executării activităţilor activate, este posibil ca activităţile dvs. să fie întârziate la maximum %s ore înainte de a rula DATAPOLICYJob=Curățător de date și anonimizator +JobXMustBeEnabled=Jobul %s trebuie să fie activat +# Cron Boxes +LastExecutedScheduledJob=Ultima execuţie a jobului programat  +NextScheduledJobExecute=Următoarea execuţie a jobului programat +NumberScheduledJobError=Numărul de joburi programate cu eroare diff --git a/htdocs/langs/ro_RO/errors.lang b/htdocs/langs/ro_RO/errors.lang index 2a7f2df8659..01159bce39a 100644 --- a/htdocs/langs/ro_RO/errors.lang +++ b/htdocs/langs/ro_RO/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=Ncio eroare, dăm commit # Errors ErrorButCommitIsDone=Erori constatate dar încă nevalidate ErrorBadEMail=Emailul %s este greșit +ErrorBadMXDomain=Email-ul %s pare greșit (domeniul nu are nicio înregistrare MX validă) 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. ErrorGroupAlreadyExists=Grupul %s există deja. ErrorRecordNotFound=Înregistrarea nu a fost găsit. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=Acest profil nume există deja pentru acest set de ex 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. ErrorCantSaveADoneUserWithZeroPercentage=Nu se poate salva o acțiune cu "starea nu a început" dacă se completează și câmpul "efectuat de". -ErrorRefAlreadyExists=Ref utilizate pentru crearea există deja. +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. ErrorRecordHasAtLeastOneChildOfType=Obiectul are cel puțin o copie de tipul %s @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=Trebuie să alegeți dacă artico 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. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Rețineți, de asemenea, că utilizarea produsului virtual pentru a avea o creștere / scădere automată a subproduselor nu este posibilă atunci când cel puțin un subprodus (sau subprodus de subproduse) are nevoie de un număr serial / lot. +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 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. @@ -243,6 +246,16 @@ ErrorReplaceStringEmpty=Eroare, şirul înlocuitor este gol ErrorProductNeedBatchNumber=Eroare, produsul '<b>%s</b>' necesită un număr de lot/serie ErrorProductDoesNotNeedBatchNumber=Eroare, produsul '<b>%s</b>' nu acceptă un număr de lot/serie ErrorFailedToReadObject=Eroare, nu am putut citi tipul obiectului <b>%s</b> +ErrorParameterMustBeEnabledToAllwoThisFeature=Eroare, parametrul <b>%s</b> trebuie să fie activat în <b>conf / conf.php<b> pentru a permite utilizarea interfeței de linie de comandă de către programatorul de job-uri intern +ErrorLoginDateValidity=Eroare, această conectare se află în afara intervalului temporal valabil +ErrorValueLength=Lungimea câmpului '<b>%s</b>' trebuie să fie mai mare de '<b>%s</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  +ErrorAParameterIsRequiredForThisOperation=Un parametru este obligatoriu pentru această operațiune + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Utilizatorul-ul a fost modificat. Din mot 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. 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=Avertizare, nu am putut adăuga fişierul în tabela index a ECM +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. diff --git a/htdocs/langs/ro_RO/exports.lang b/htdocs/langs/ro_RO/exports.lang index 34a37b99469..08f9a64d27e 100644 --- a/htdocs/langs/ro_RO/exports.lang +++ b/htdocs/langs/ro_RO/exports.lang @@ -133,3 +133,4 @@ KeysToUseForUpdates=Tastă (coloană) de utilizat pentru <b>actualizarea </b>dat NbInsert=Numărul liniilor inserate: %s NbUpdate=Numărul liniilor actualizate: %s MultipleRecordFoundWithTheseFilters=Au fost găsite mai multe înregistrări cu ajutorul acestor filtre: %s +StocksWithBatch=Stocuri și locație (depozit) a produselor cu număr de lot/serie diff --git a/htdocs/langs/ro_RO/mails.lang b/htdocs/langs/ro_RO/mails.lang index c021a5391ca..ae1db7a2f66 100644 --- a/htdocs/langs/ro_RO/mails.lang +++ b/htdocs/langs/ro_RO/mails.lang @@ -92,6 +92,7 @@ MailingModuleDescEmailsFromUser=Emailuri introduse de utilizator MailingModuleDescDolibarrUsers=Utilizatorii cu emailuri MailingModuleDescThirdPartiesByCategories=Terți (pe categorii) SendingFromWebInterfaceIsNotAllowed=Trimiterea de pe interfața web nu este permisă. +EmailCollectorFilterDesc=Toate filtrele trebuie să se potrivească pentru ca un email să fie colectat # Libelle des modules de liste de destinataires mailing LineInFile=Linia %s în fişierul @@ -125,12 +126,13 @@ TagMailtoEmail=Email destinatar (inclusiv linkul html "mailto:") NoEmailSentBadSenderOrRecipientEmail=Nu a fost trimis niciun email. Expeditor sau destinatar email greșit . Verificați profilul utilizatorului. # Module Notifications Notifications=Anunturi -NoNotificationsWillBeSent=Nu notificări prin email sunt planificate pentru acest eveniment şi a companiei -ANotificationsWillBeSent=1 notificarea va fi trimis prin e-mail -SomeNotificationsWillBeSent=%s notificări vor fi trimise prin e-mail -AddNewNotification=Activați o nouă țintă/eveniment de notificare prin email -ListOfActiveNotifications=Afișați toate țintele / evenimentele active pentru notificarea prin email -ListOfNotificationsDone=Lista toate notificările e-mail trimis +NotificationsAuto=Notificări automate +NoNotificationsWillBeSent=Nu sunt planificate notificări automate prin e-mail pentru acest tip de eveniment și companie +ANotificationsWillBeSent=1 notificare automată va fi transmisă pe email +SomeNotificationsWillBeSent=%s notificări automate vor fi transmise pe email +AddNewNotification=Abonare la o nouă notificare automată prin email (țintă/eveniment) +ListOfActiveNotifications=Enumerați toate abonamentele active (ținte/evenimente) pentru notificări automate prin email +ListOfNotificationsDone=Afişaţi toate notificările automate trimise prin email MailSendSetupIs=Configurarea trimiterii e-mail a fost de configurat la '%s'. Acest mod nu poate fi utilizat pentru a trimite email-uri în masă. MailSendSetupIs2=Trebuie mai întâi să mergi, cu un cont de administrator, în meniu%sHome - Setup - EMails%s pentru a schimba parametrul <strong>'%s'</strong> de utilizare în modul '%s'. Cu acest mod, puteți introduce configurarea serverului SMTP furnizat de furnizorul de servicii Internet și de a folosi facilitatea Mass email . MailSendSetupIs3=Daca aveti intrebari cu privire la modul de configurare al serverului SMTP, puteți cere la %s. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Fișierul importat trebuie să aibă format <strong> UseFormatInputEmailToTarget=Introduceți un șir cu formatul de email <strong>; nume; prenume; altul </strong> MailAdvTargetRecipients=Destinatari (selecție avansată) AdvTgtTitle=Completați câmpurile de introducere pentru a preselecta terții sau contactele/adresele vizate -AdvTgtSearchTextHelp=Utilizați %% ca metacaractere. De exemplu, pentru a găsi toate elementele cum ar fi <b> jean, joe, jim </b>, puteți introduce <b> j%% </b>, de asemenea, puteți utiliza; ca separator pentru valoare și utilizați ! pentru excepția acestei valori. De exemplu, <b> jean; joe; jim%%;! Jimo;! Jima% </b> va viza toate jean, joe, începe cu jim dar nu jimo și nu tot ce începe cu jima +AdvTgtSearchTextHelp= Se utilizează %% ca metacaracter. De exemplu, pentru a găsi toate articolele cum ar fi j<b>ean, joe, jim</b>, puteți introduce <b>j%%</b>, puteți utiliza și; ca separator pentru valoare și folosiți ! pentru exceptarea acestei valori. De exemplu <b>jean; joe; jim%%;!Jimo;!Jima%%</b> va viza toate jean, joe, cele care încep cu jim dar nu jimo și tot ce nu începe cu jima AdvTgtSearchIntHelp=Utilizați intervalul pentru a selecta valoarea int sau float AdvTgtMinVal=Valoare minima AdvTgtMaxVal=Valoare maxima @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Creare filtru AdvTgtOrCreateNewFilter=Numele noului filtru NoContactWithCategoryFound=Nu s-a găsit niciun contact / adresă cu o categorie NoContactLinkedToThirdpartieWithCategoryFound=Nu s-a găsit niciun contact / adresă cu o categorie -OutGoingEmailSetup=Setarea emailului de ieșire -InGoingEmailSetup=Configurarea emailului de primire -OutGoingEmailSetupForEmailing=Setup email de ieşire( pentru modulul %s) -DefaultOutgoingEmailSetup=Configurarea implicită a emailurilor de ieșire +OutGoingEmailSetup= Email-uri trimise +InGoingEmailSetup=Email-uri primite +OutGoingEmailSetupForEmailing=Email-uri trimise (pentru modulul %s) +DefaultOutgoingEmailSetup=Aceeași configurație ca şi configurarea globală de trimitere email Information=Informatie ContactsWithThirdpartyFilter=Contacte cu filtrul terț Unanswered=Fără răspuns Answered=Răspuns IsNotAnAnswer=Nu răspunde (e-mail inițial) IsAnAnswer= Este un răspuns al unui email inițial +RecordCreatedByEmailCollector=Înregistrare creată de colectorul de email %sdin adresa %s +DefaultBlacklistMailingStatus=Stare implicită a contactului care refuză primirea de email-uri bulk +DefaultStatusEmptyMandatory= Necompletat, dar obligatoriu  diff --git a/htdocs/langs/ro_RO/main.lang b/htdocs/langs/ro_RO/main.lang index 58dea3a79cb..8edaaa8f73e 100644 --- a/htdocs/langs/ro_RO/main.lang +++ b/htdocs/langs/ro_RO/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=Nu există șablon disponibil pentru acest tip de email AvailableVariables=Variabile de substituţie disponibile NoTranslation=Fără traducere Translation=Traduceri +CurrentTimeZone=TimeZone PHP (server) EmptySearchString=Introdu criterii de căutare valide +EnterADateCriteria= Introduceți un criteriu de tip dată NoRecordFound=Nicio înregistrare gasită NoRecordDeleted=Nu s-au șters înregistrări NotEnoughDataYet=Nu sunt date @@ -85,6 +87,8 @@ FileWasNotUploaded=Un fișier este selectat pentru atașament, dar nu a fost în NbOfEntries=Numărul de intrări GoToWikiHelpPage=Citeşte ajutorul online (Acces la Internet necesar) GoToHelpPage=Citeşte Ajutorul +DedicatedPageAvailable=Există o pagină de ajutor dedicată legată de ecranul curent +HomePage=Acasă RecordSaved=Înregistrare salvată RecordDeleted=Înregistrare ştearsă RecordGenerated=Înregistrată generată @@ -220,6 +224,7 @@ Value=Valoare PersonalValue=Valoare personalizată NewObject=Nou %s NewValue=Valoare nouă +OldValue=Valoare anterioară %s CurrentValue=Valoarea curentă Code=Cod Type=Tip @@ -433,6 +438,7 @@ RemainToPay=Rămas de plată Module=Modul/Aplicaţie Modules=Module/Aplicații Option=Opţiune +Filters=Filtre List=Listă FullList=Listă completă FullConversation=Conversaţie integrală @@ -650,6 +656,7 @@ SupplierPreview=Previzualizare furnizor ShowCustomerPreview=Afişează Preview client ShowSupplierPreview=Afișați previzualizarea furnizorului RefCustomer=Ref. client +InternalRef=Ref. internă Currency=Moneda InfoAdmin=Informaţii pentru administratori Undo=Anulaţi @@ -671,7 +678,7 @@ SendMail=Trimite un email Email=Email NoEMail=Niciun email AlreadyRead=Citit deja -NotRead=Necitit +NotRead=Necitită NoMobilePhone=Fără număr mobil Owner=Proprietar FollowingConstantsWillBeSubstituted=Următoarele constante vor fi înlocuite cu valoarea corespunzătoare. @@ -1107,3 +1114,9 @@ UpToDate=Actualizat la zi OutOfDate=Expirat EventReminder=Memento eveniment UpdateForAllLines=Actualizare pentru toate liniile +OnHold=În aşteptare +Civility=Formulă de adresare +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 diff --git a/htdocs/langs/ro_RO/modulebuilder.lang b/htdocs/langs/ro_RO/modulebuilder.lang index 090269ab52f..219513f661d 100644 --- a/htdocs/langs/ro_RO/modulebuilder.lang +++ b/htdocs/langs/ro_RO/modulebuilder.lang @@ -40,6 +40,7 @@ PageForCreateEditView=Pagina PHP pentru a crea/edita/vizualiza o î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 PathToModuleDocumentation=Calea către fişierul documentaţie al modulului/aplicaţiei (%s) SpaceOrSpecialCharAreNotAllowed=Spațiile sau caracterele speciale nu sunt permise. @@ -77,7 +78,7 @@ IsAMeasure=Este o măsură DirScanned=Directorul scanat NoTrigger=Niciun declanșator NoWidget=Nu există widget -GoToApiExplorer=Mergeți la exploratorul API +GoToApiExplorer=Explorer API ListOfMenusEntries=Lista intrărilor din meniu ListOfDictionariesEntries=Listă înregistrări dicţionare ListOfPermissionsDefined=Lista permisiunilor definite @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=Dacă aveți cunoștințe despre SQL și PHP, puteți f 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") -DropTableIfEmpty=(Ștergeți tabelul dacă este gol) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Utilizează un URL specificat de editor UseSpecificFamily = Utilizează o familie specifică UseSpecificAuthor = Utilizează un autor specific UseSpecificVersion = Utilizează o versiune iniţială specifică -ModuleMustBeEnabled=Modulul/aplicaţia trebuie activată mai întâi IncludeRefGeneration=Referinţa obiectului trebuie să fie generată automat IncludeRefGenerationHelp=Bifează aceasta dacă vrei să incluzi cod de management pentru generarea automată a referinţei IncludeDocGeneration=Vreau să generez documente din obiect @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Tip de câmpuri: <br>varchar (99), double(24,8), real, text, ht 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. diff --git a/htdocs/langs/ro_RO/mrp.lang b/htdocs/langs/ro_RO/mrp.lang index ca6af90cf80..7e8c774e52d 100644 --- a/htdocs/langs/ro_RO/mrp.lang +++ b/htdocs/langs/ro_RO/mrp.lang @@ -78,3 +78,27 @@ TotalCost=Cost total BOMTotalCost=Costul pentru fabricaţia acestui Bon de consum în funcție de costul fiecărei cantități și produs de consumat (utilizați Prețul de cost, dacă este definit, altfel Prețul mediu ponderat, dacă este definit, altfel cel mai bun preț de achiziție) GoOnTabProductionToProduceFirst=Mai întâi trebuie să fi început producția pentru a închide o Comandă de fabricație (Vezi fila '%s'). Puteți anula. ErrorAVirtualProductCantBeUsedIntoABomOrMo=Un kit nu poate fi folosit într-un BOM sau MO +Workstation=Staţie de lucru +Workstations=Staţii de lucru +WorkstationsDescription=Management staţii de lucru +WorkstationSetup = Configurare staţii de lucru +WorkstationSetupPage = Pagină setup Staţii de lucru +WorkstationAbout = Despre Staţie de lucru +WorkstationAboutPage = Pagină Despre Staţii de lucru +WorkstationList=Listă staţii de lucru +WorkstationCreate=Adăugare staţie de lucru nouă +ConfirmEnableWorkstation=Eşti sigur că vrei să activezi staţia de lucru <b>%s</b> ? +EnableAWorkstation=Activare staţie de lucru +ConfirmDisableWorkstation=Eşti sigur că vrei să dezactivezi staţia de lucru <b>%s</b> ? +DisableAWorkstation=Dezactivare staţie de lucru +DeleteWorkstation=Ştergere +NbOperatorsRequired=Nr. de operatori necesar +THMOperatorEstimated=Total ore minute estimat per operator +THMMachineEstimated=Total ore minute estimat per maşină +WorkstationType=Tip staţie de lucru +Human=Uman +Machine=Maşină +HumanMachine=Uman / Maşină +WorkstationArea=Staţii de lucru +Machines=Maşini +THMEstimatedHelp=Această rată face posibilă definirea unui cost prognozat al articolului diff --git a/htdocs/langs/ro_RO/other.lang b/htdocs/langs/ro_RO/other.lang index 545383cb7a3..1f6709568f6 100644 --- a/htdocs/langs/ro_RO/other.lang +++ b/htdocs/langs/ro_RO/other.lang @@ -5,8 +5,6 @@ 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 -BirthdayDate=Data naştere -DateToBirth=Data naşterii BirthdayAlertOn=ziua de nastere de alertă activă BirthdayAlertOff=ziua de nastere de alertă inactiv TransKey=Traducerea cheii TransKey @@ -16,6 +14,8 @@ 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 +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 ... @@ -78,6 +78,7 @@ 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_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 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Salut)__\n\nVeți găsi transportul __REF__ 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) @@ -137,7 +139,7 @@ Right=Dreapta CalculatedWeight=Calculat în greutate CalculatedVolume=Calculat volum Weight=Greutate -WeightUnitton=tonner +WeightUnitton=tonă WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,7 @@ EMailTextExpenseReportValidated=Raportul 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 ... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/adresă creată de colectorul de email-ur ProjectCreatedByEmailCollector=Proiect creat de colectorul de email-uri din email-ul cu MSGID %s TicketCreatedByEmailCollector=Tichet creat de colectorul de email-uri din email-ul cu MSGID %s OpeningHoursFormatDesc=Foloseşte un - pentru a separa orele de lucru.<br>Foloseşte un spaţiu pentru a introduce intervale oarare diferite.<br>Exemplu: 8-12 14-18 +PrefixSession=Prefix pentru ID-ul sesiunii ##### Export ##### ExportsArea=Export diff --git a/htdocs/langs/ro_RO/products.lang b/htdocs/langs/ro_RO/products.lang index b65779946bc..dec5f4abd1c 100644 --- a/htdocs/langs/ro_RO/products.lang +++ b/htdocs/langs/ro_RO/products.lang @@ -108,7 +108,8 @@ 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=Activeaz kit-uri (produse virtuale) +AssociatedProductsAbility=Activare kituri (set de mai multe produse)  +VariantsAbility=Activare variante (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 @@ -169,6 +170,8 @@ SuppliersPrices=Prețurile furnizorului SuppliersPricesOfProductsOrServices=Prețurile furnizorilor (de produse sau servicii) CustomCode=Cod vamal/Marfă/Cod HS CountryOrigin=Ţara de origine +RegionStateOrigin=Regiune de origine +StateOrigin=Judeţ/regiune de origine Nature=Natură produs(materie primă/produs finit) NatureOfProductShort=Natură produs NatureOfProductDesc=Materie primă sau produs finit @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Foloseşte preţul fix PriceByQuantity=Preţuri diferite pe cantitate DisablePriceByQty=Dezactivați prețurile în funcție de cantitate PriceByQuantityRange=Interval cantitate -MultipriceRules=Regulile segmentului de prețuri +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 PercentVariationOver=Variația %% peste %s PercentDiscountOver=%% reducere peste %s diff --git a/htdocs/langs/ro_RO/projects.lang b/htdocs/langs/ro_RO/projects.lang index 25a12b3f4cd..f56ec6dd958 100644 --- a/htdocs/langs/ro_RO/projects.lang +++ b/htdocs/langs/ro_RO/projects.lang @@ -76,15 +76,16 @@ MyActivities=Activităţile / Taskurile mele MyProjects=Proiectele mele MyProjectsArea=Zona proiectelor mele DurationEffective=Durata efectivă -ProgressDeclared=Progres calculat +ProgressDeclared=Progres real declarat TaskProgressSummary=Progres task CurentlyOpenedTasks=Taskuri deschise recent -TheReportedProgressIsLessThanTheCalculatedProgressionByX=Progresul declarat este mai mic cu %s decât cel calculat -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=Progresul declarat este mai mare cu %s decât cel calculat -ProgressCalculated=Progres calculat +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 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ă GanttView=Vizualizare Gantt diff --git a/htdocs/langs/ro_RO/recruitment.lang b/htdocs/langs/ro_RO/recruitment.lang index d2fb1c6d642..b09ecb6b976 100644 --- a/htdocs/langs/ro_RO/recruitment.lang +++ b/htdocs/langs/ro_RO/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=Oferta de job este închisă. Postul a fost ocupat. JobClosedTextCanceled=Oferta de job este închisă. ExtrafieldsJobPosition=Atribute complementare (oferte job) ExtrafieldsCandidatures=Atribute complementare (aplicări job) +MakeOffer=Fă o ofertă diff --git a/htdocs/langs/ro_RO/sendings.lang b/htdocs/langs/ro_RO/sendings.lang index 763d028c91f..8e18a146120 100644 --- a/htdocs/langs/ro_RO/sendings.lang +++ b/htdocs/langs/ro_RO/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Alte livrări pentru această comandă SendingsAndReceivingForSameOrder=Expedieri și documente pentru această comandă SendingsToValidate=Livrări de validat StatusSendingCanceled=Anulată +StatusSendingCanceledShort=Anulata StatusSendingDraft=Schiţă StatusSendingValidated=Validată (produse de livrat sau deja livrate) StatusSendingProcessed=Procesată @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=Mai întâi trebuie să validezi comanda înain # Sending methods # ModelDocument DocumentModelTyphon=Model complet pentru dispoziţie de livrare (logo. ..) +DocumentModelStorm=Modele de documente mult mai complete pentru chitanțe de livrare și compatibilitate cu câmpurile suplimentare(sigla ...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constanta EXPEDITION_ADDON_NUMBER nu este definită SumOfProductVolumes=Volumul total al produselor SumOfProductWeights=Greutatea totală a produselor diff --git a/htdocs/langs/ro_RO/stocks.lang b/htdocs/langs/ro_RO/stocks.lang index ae3b0d063aa..50d0128e8fc 100644 --- a/htdocs/langs/ro_RO/stocks.lang +++ b/htdocs/langs/ro_RO/stocks.lang @@ -62,6 +62,7 @@ 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 RuleForWarehouse=Reguli pentru depozite +WarehouseAskWarehouseDuringPropal=Setează un depozit pe oferta comercială WarehouseAskWarehouseDuringOrder=Setează un depozit pe comenzile de vânzare UserDefaultWarehouse=Setează un depozit pe utilizatori MainDefaultWarehouse=Depozit implicit @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Setați valoarea la 0 pentru a reseta câmpul cantitate<br> UpdateByScaning=Actualizare 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. diff --git a/htdocs/langs/ro_RO/ticket.lang b/htdocs/langs/ro_RO/ticket.lang index 6c582307da8..70ee1b31ebd 100644 --- a/htdocs/langs/ro_RO/ticket.lang +++ b/htdocs/langs/ro_RO/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Tipuri de tichete TicketDictCategory=Tichet - Grupuri TicketDictSeverity=Tichet - Severități TicketDictResolution=Tichet - Rezoluție -TicketTypeShortBUGSOFT=Logică disfuncţională -TicketTypeShortBUGHARD=Material disfuncţional -TicketTypeShortCOM=Întrebare comercială +TicketTypeShortCOM=Întrebare comercială TicketTypeShortHELP=Solicitare funcţionalitate TicketTypeShortISSUE=Solicitare, eroare sau problemă TicketTypeShortREQUEST=Solicitare de modificare sau îmbunătăţire @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Altele TicketSeverityShortLOW=Scăzut TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=Mare -TicketSeverityShortBLOCKING=Critic / Blocaj +TicketSeverityShortBLOCKING=Critic, blocant ErrorBadEmailAddress=Câmpul "%s" este incorect MenuTicketMyAssign=Tichetele mele @@ -60,7 +58,6 @@ OriginEmail=Sursa emailului Notify_TICKET_SENTBYMAIL=Trimite mesaj tichet pe email # Status -NotRead=Necitit Read=Citit Assigned=Atribuit InProgress=In progres @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Interfața publică permite vizitatorilor să TicketsAutoAssignTicket=Desemnați automat utilizatorul care a creat tichetul TicketsAutoAssignTicketHelp=La crearea unui tichet, utilizatorul poate fi automat alocat tichetului. TicketNumberingModules=Modul de numerotare a tichetelor +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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Starea modificată: %s la %s TicketNotNotifyTiersAtCreate=Nu notificați compania la crearea Unread=Necitită TicketNotCreatedFromPublicInterface=Indisponibil. Tichetul nu a fost creat din interfaţa publică. -PublicInterfaceNotEnabled=Interfaţa publică nu a fost activată ErrorTicketRefRequired=Denumirea de referință al tichetului este necesară # diff --git a/htdocs/langs/ro_RO/website.lang b/htdocs/langs/ro_RO/website.lang index 5e2dab5d97a..f1ca739ae33 100644 --- a/htdocs/langs/ro_RO/website.lang +++ b/htdocs/langs/ro_RO/website.lang @@ -30,7 +30,6 @@ EditInLine=Editați inline AddWebsite=Adaugă pagina web Webpage=Pagina web / container AddPage=Adăugați o pagină / un container -HomePage=Acasă 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ă. @@ -101,7 +100,7 @@ EmptyPage=Pagina 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=Includeți conținut dinamic +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 @@ -137,3 +136,4 @@ RSSFeedDesc=Puteți obține un flux RSS al celor mai recente articole cu tipul ' 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. diff --git a/htdocs/langs/ro_RO/withdrawals.lang b/htdocs/langs/ro_RO/withdrawals.lang index d0c4e6162c6..27cce1a4c2e 100644 --- a/htdocs/langs/ro_RO/withdrawals.lang +++ b/htdocs/langs/ro_RO/withdrawals.lang @@ -42,6 +42,7 @@ LastWithdrawalReceipt=Ultimele încasări de debit direct %s MakeWithdrawRequest=Efectuați o solicitare de plată cu debit direct MakeBankTransferOrder=Solicitare transfer de credit WithdrawRequestsDone=%s au fost înregistrate cererile de debitare directă +BankTransferRequestsDone=%s solicitări de transfer de credit înregistrate ThirdPartyBankCode=Codul bancar al terțului NoInvoiceCouldBeWithdrawed=Nici o factură nu a fost debitată cu succes. Verificați dacă facturile sunt pe companiile cu un IBAN valabil și că IBAN are un UMR (referință unică de mandat) cu modul <strong> %s </strong>. ClassCredited=Clasifica creditat @@ -131,7 +132,8 @@ SEPARCUR=SEPA CUR SEPAFRST=SEPA FRST ExecutionDate=Data executării CreateForSepa=Creați un fișier de debit direct -ICS=Identificatorul creditorului CI +ICS=Identificator creditor CI pentru debit direct +ICSTransfer=Identificator creditor CI pentru transfer bancar END_TO_END=Eticheta "EndToEndId" SEPA XML - Id unic atribuit pentru fiecare tranzacție USTRD=Eticheta XML "nestructurată" SEPA ADDDAYS=Adăugați zile la data de executare @@ -146,3 +148,5 @@ InfoRejectSubject=Comanda de debitare directă a fost refuzată InfoRejectMessage=Bună ziua, <br> <br> ordinul de plată prin debit direct al facturii %s aferente companiei %s, cu o sumă de %s a fost refuzată de bancă. <br> <br> - <br> %s ModeWarning=Opţiunea pentru modul real, nu a fost stabilit, ne oprim după această simulare ErrorCompanyHasDuplicateDefaultBAN=Compania cu id %s are mai multe conturi bancare implicite. Nu se poate determina cel care se doreşte a fi utilizat. +ErrorICSmissing=ICS lipsă în contul bancar %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Suma totală a ordinului de debitare directă diferă de suma liniilor diff --git a/htdocs/langs/ro_RO/workflow.lang b/htdocs/langs/ro_RO/workflow.lang index d463b4a8433..de679361c0f 100644 --- a/htdocs/langs/ro_RO/workflow.lang +++ b/htdocs/langs/ro_RO/workflow.lang @@ -16,8 +16,10 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Clasificați comanda de vânzări s # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Clasificați propunerea furnizorului sursă asociată ca fiind facturată atunci când factura furnizorului este validată (și dacă valoarea facturii este aceeași cu valoarea totală a propunerii asociate) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Clasificați comanda de vânzări sursă asociată ca fiind facturată atunci când factura furnizorului este validată (și dacă valoarea facturii este aceeași cu valoarea totală a comenzii asociate) -descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +descWORKFLOW_BILL_ON_RECEPTION=Clasificați recepțiile la "facturate" atunci când este validată o comandă de achiziţie asociată # Autoclose intervention -descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Închideți toate intervențiile legate de tichet atunci când tichetul este închis AutomaticCreation=Creare automată AutomaticClassification=Clasificare automată +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE= Clasificați livrarea asociată ca închisă atunci când factura clientului este validată diff --git a/htdocs/langs/ru_RU/accountancy.lang b/htdocs/langs/ru_RU/accountancy.lang index bc73a4d82a0..2b44d84c585 100644 --- a/htdocs/langs/ru_RU/accountancy.lang +++ b/htdocs/langs/ru_RU/accountancy.lang @@ -16,6 +16,8 @@ ThisService=This service ThisProduct=This product DefaultForService=По умолчанию для услуги DefaultForProduct=По умолчанию для товара +ProductForThisThirdparty=Product for this thirdparty +ServiceForThisThirdparty=Service for this thirdparty CantSuggest=Can't suggest AccountancySetupDoneFromAccountancyMenu=Больше настроек бухгалтерии выполняется из меню %s ConfigAccountingExpert=Configuration of the module accounting (double entry) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Дата Docref=Ссылка LabelAccount=Метка бухгалтерского счёта LabelOperation=Label operation -Sens=Sens +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=Журнал @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ Accounted=Accounted in ledger NotYetAccounted=Not yet accounted in ledger ShowTutorial=Show Tutorial NotReconciled=Не согласовано +WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view ## Admin BindingOptions=Binding options @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/ru_RU/admin.lang b/htdocs/langs/ru_RU/admin.lang index 8894f182715..621f545e086 100644 --- a/htdocs/langs/ru_RU/admin.lang +++ b/htdocs/langs/ru_RU/admin.lang @@ -56,6 +56,8 @@ GUISetup=Внешний вид SetupArea=Настройка UploadNewTemplate=Загрузить новый шаблон(ы) FormToTestFileUploadForm=Форма для проверки загрузки файлов (в зависимости от настройки) +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled IfModuleEnabled=Примечание: "Да" влияет только тогда, когда модуль <b>%s</b> включен RemoveLock=Удалите/переименуйте файл <b>%s</b>, если он существует, чтобы разрешить использование инструмента обновления/установки. RestoreLock=Восстановите файл <b>%s</b> с разрешением только для чтение, чтобы отключить дальнейшее использование инструмента обновления/установки. @@ -85,7 +87,6 @@ ShowPreview=Предварительный просмотр ShowHideDetails=Show-Hide details PreviewNotAvailable=Предварительный просмотр не доступен ThemeCurrentlyActive=Текущая тема -CurrentTimeZone=Текущий часовой пояс в настройках PHP MySQLTimeZone=Часовой пояс БД (MySQL) TZHasNoEffect=Даты хранятся и возвращаются сервером базы данных, как если бы они хранились в виде переданной строки. Часовой пояс действует только при использовании функции UNIX_TIMESTAMP (которая не должна использоваться Dolibarr, поэтому часовая зона (TZ) базы данных не должна иметь никакого эффекта, даже если она изменилась после ввода данных). Space=Пробел @@ -153,8 +154,8 @@ SystemToolsAreaDesc=Эта область обеспечивает функци Purge=Очистить PurgeAreaDesc=Эта страница позволяет вам удалить все файлы, созданные или сохраненные Dolibarr (временные файлы или все файлы в каталоге <b> %s</b> ). Использование этой функции обычно не требуется. Он предоставляется в качестве обходного пути для пользователей, чей Dolibarr размещен поставщиком, который не предлагает разрешения на удаление файлов, созданных веб-сервером. PurgeDeleteLogFile=Удаление файлов журналов, включая <b>%s</b> определенный для модуля Syslog (без риска потери данных) -PurgeDeleteTemporaryFiles=Удалить все временные файлы (без риска потери данных). Примечание: Удаление выполняется только в том случае, если временный каталог был создан 24 часа назад. -PurgeDeleteTemporaryFilesShort=Удаление временных файлов +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 PurgeDeleteAllFilesInDocumentsDir=Удалить все файлы в каталоге: <b>%s</b> . <br> Это удалит все сгенерированные документы, связанные с элементами (контрагенты, счета и т.д.), файлы, загруженные в модуль ECM, резервные копии базы данных и временные файлы. PurgeRunNow=Очистить сейчас PurgeNothingToDelete=Нет директории или файла для удаления. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Предпочитаемые партнёры OtherResources=Другие источники ExternalResources=Внешние Ресурсы SocialNetworks=Социальные сети +SocialNetworkId=Social Network ID ForDocumentationSeeWiki=Для получения документации пользователя или разработчика (документация, часто задаваемые вопросы...),<br> посетите Dolibarr Wiki:<br><b><a href="%s" target="_blank">%s</a></b> ForAnswersSeeForum=Для любых других вопросов / помощи, вы можете использовать форум Dolibarr:<br><b><a href="%s" target="_blank">%s</b></a> HelpCenterDesc1=Вот некоторые ресурсы для получения помощи и поддержки с Dolibarr. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Примеры с текущей конфигураци ListOfDirectories=Список каталогов с шаблонами OpenDocument ListOfDirectoriesForModelGenODT=Список каталогов, содержащих файлы шаблонов в формате OpenDocument. <br><br> Укажите здесь полный путь к каталогу. <br> Каждый каталог с новой строки. <br> Чтобы добавить каталог GED-модуля, добавьте здесь <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b> . <br><br> Файлы в этих каталогах должны заканчиваться на <b>.odt</b> или <b>.ods</b> . NumberOfModelFilesFound=Количество файлов шаблонов ODT/ODS, найденных в этих каталогах -ExampleOfDirectoriesForModelGen=Примеры синтаксиса: <br> C: \\ MYDIR <br> / home / mydir <br> DOL_DATA_ROOT / ecm / ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br> Прежде чем сохранить шаблоны в этих каталогах прочитайте документацию на Wiki чтобы узнать, как создать свой шаблоны ODT документов: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Расположение Имени / Фамилиии @@ -406,7 +408,7 @@ UrlGenerationParameters=Параметры безопасных URL`ов SecurityTokenIsUnique=Использовать уникальный параметр securekey для каждого URL EnterRefToBuildUrl=Введите ссылку на объект %s GetSecuredUrl=Получить рассчитанный URL -ButtonHideUnauthorized=Скрыть кнопки для пользователей без прав администратора для несанкционированных действий вместо отображения серых отключенных кнопок +ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) OldVATRates=Предыдущее значение НДС NewVATRates=Новое значение НДС PriceBaseTypeToChange=Изменять базовые цены на определенную величину @@ -668,7 +670,7 @@ Module54000Desc=Прямая печать (без открытия докуме Module55000Name=Голосование, обзор или голосование Module55000Desc=Создавайте онлайн-опросы, обзоры или голосования (например, Doodle, Studs, RDVz и т. Д.) Module59000Name=Наценки -Module59000Desc=Модуль управления наценками +Module59000Desc=Module to follow margins Module60000Name=Комиссии Module60000Desc=Модуль управления комиссиями Module62000Name=Обязанности по доставке товаров @@ -1306,7 +1308,7 @@ YouUseBestDriver=Вы используете драйвер %s, который YouDoNotUseBestDriver=Вы используете драйвер %s, но рекомендуется драйвер %s. NbOfObjectIsLowerThanNoPb=You have only %s %s in the database. This does not require any particular optimization. SearchOptim=Поисковая оптимизация -YouHaveXObjectUseSearchOptim=You have %s %s in the database. You should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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=Вы используете веб-браузер %s. Этот браузер подходит в отношении безопасности и производительности. BrowserIsKO=Вы используете веб-браузер %s. Этот браузер, как известно, является плохим выбором по безопасности, производительности и надежности. Мы рекомендуем использовать Firefox, Chrome, Opera или Safari. @@ -1596,8 +1598,13 @@ ServiceSetup=Настройка модуля Услуг ProductServiceSetup=Настройка модулей Продуктов и Услуг NumberOfProductShowInSelect=Максимальное количество товаров для отображения в комбинированных списках выбора (0 = без ограничений) ViewProductDescInFormAbility=Отображать описания продуктов в формах (в противном случае отображается во всплывающей подсказке) +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=Активировать в продукте/услуге Вложенные файлы вставить опцию объединить PDF-документ продукта в предложение PDF azur, если продукт/услуга находится в предложении -ViewProductDescInThirdpartyLanguageAbility=Отображать описания продуктов на языке контрагентов +ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) UseSearchToSelectProductTooltip=Также, если у вас есть большое количество продуктов (> 100 000), вы можете увеличить скорость, установив постоянное значение PRODUCT_DONOTSEARCH_ANYWHERE равное 1 в меню «Настройка» - «Другие настройки». Поиск будет ограничен началом строки. 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=Стандартный вид штрих-кода, используемого для продуктов @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Персонализированные меню, не NewMenu=Новое меню MenuHandler=Меню обработчик MenuModule=Исходный модуль -HideUnauthorizedMenu= Скрыть несанкционированного меню (серый) +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=Идентификатор меню DetailMenuHandler=Обработчик меню, где показывать новое меню DetailMenuModule=Имя модуля, если пункт меню взят из модуля @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Индекс MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/ru_RU/banks.lang b/htdocs/langs/ru_RU/banks.lang index 8c02e198885..c5f91b7749e 100644 --- a/htdocs/langs/ru_RU/banks.lang +++ b/htdocs/langs/ru_RU/banks.lang @@ -173,10 +173,11 @@ SEPAMandate=Мандат SEPA 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/ru_RU/blockedlog.lang b/htdocs/langs/ru_RU/blockedlog.lang index 99bf472eed0..74164531cae 100644 --- a/htdocs/langs/ru_RU/blockedlog.lang +++ b/htdocs/langs/ru_RU/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/ru_RU/boxes.lang b/htdocs/langs/ru_RU/boxes.lang index b8e47954693..7cfe3e8a6e7 100644 --- a/htdocs/langs/ru_RU/boxes.lang +++ b/htdocs/langs/ru_RU/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=Последние %sизмененные пож 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=Хорошие клиенты BoxTitleGoodCustomers=%s Good customers +BoxScheduledJobs=Запланированные задания +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Failed to refresh RSS flux. Latest successful refresh date: %s LastRefreshDate=Дата последнего обновления NoRecordedBookmarks=Закладки не созданы. @@ -92,8 +95,8 @@ LastXMonthRolling=The latest %s month rolling ChooseBoxToAdd=Добавить виджет на вашу панель BoxAdded=Виджет был добавлен на вашу панель BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users) -BoxLastManualEntries=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Бухгалтерия +ValidatedProjects=Validated projects diff --git a/htdocs/langs/ru_RU/cashdesk.lang b/htdocs/langs/ru_RU/cashdesk.lang index 9b2073aed88..4a435be4e06 100644 --- a/htdocs/langs/ru_RU/cashdesk.lang +++ b/htdocs/langs/ru_RU/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Нижний колонтитул AmountAtEndOfPeriod=Сумма на конец периода (день, месяц или год) TheoricalAmount=Теоретическая сумма RealAmount=Действительная сумма -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=Кол-во счетов-фактур Paymentnumpad=Type of Pad to enter payment Numberspad=Numbers Pad @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/ru_RU/categories.lang b/htdocs/langs/ru_RU/categories.lang index c1fd9fc39d7..fc188dff315 100644 --- a/htdocs/langs/ru_RU/categories.lang +++ b/htdocs/langs/ru_RU/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=Раздел тегов/категорий проекто UsersCategoriesArea=Раздел тегов/категорий пользователей SubCats=Подкатегории CatList=Список тегов/категорий +CatListAll=List of tags/categories (all types) NewCategory=Новый тег/категория ModifCat=Изменить тег/категорию CatCreated=Тег/категория созданы @@ -65,16 +66,22 @@ UsersCategoriesShort=Теги/категории пользователей StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=ID тега/категории -CatSupList=List of vendor tags/categories -CatCusList=Список тегов/категорий клиента/потенциального клиента +ParentCategory=Parent tag/category +ParentCategoryLabel=Label of parent tag/category +CatSupList=List of vendors tags/categories +CatCusList=List of customers/prospects tags/categories CatProdList=Список тегов/категорий товаров CatMemberList=Список тегов/категорий участников -CatContactList=Список тегов/категорий контактов -CatSupLinks=Связи между поставщиками и тегами/категориями +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=Связи между клиентами/потенц. клиентами и тегами/категориями CatContactsLinks=Links between contacts/addresses and tags/categories CatProdLinks=Связи между продуктами/услугами и тегами/категориями -CatProJectLinks=Связи между проектами и тегами/категориями +CatMembersLinks=Связи между участниками и тегами/категориями +CatProjectsLinks=Связи между проектами и тегами/категориями +CatUsersLinks=Links between users and tags/categories DeleteFromCat=Удалить из тега/категории ExtraFieldsCategories=Дополнительные атрибуты CategoriesSetup=Настройка тегов/категорий diff --git a/htdocs/langs/ru_RU/companies.lang b/htdocs/langs/ru_RU/companies.lang index 53e53122d77..2f8f9c2005b 100644 --- a/htdocs/langs/ru_RU/companies.lang +++ b/htdocs/langs/ru_RU/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Проверьте идентификатора НДС VATIntraManualCheck=Вы также можете проверить его вручную на сайте Европейской Комиссии <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=Проверка невозможна. Сервис проверки не предоставляется государством-членом ЕС (%s). NorProspectNorCustomer=Не потенциальный клиент, не клиент -JuridicalStatus=Тип юридического лица +JuridicalStatus=Business entity type Workforce=Workforce Staff=Сотрудники ProspectLevelShort=Потенциальный diff --git a/htdocs/langs/ru_RU/compta.lang b/htdocs/langs/ru_RU/compta.lang index f9002c431a6..c7e9361c99f 100644 --- a/htdocs/langs/ru_RU/compta.lang +++ b/htdocs/langs/ru_RU/compta.lang @@ -111,7 +111,7 @@ Refund=Refund SocialContributionsPayments=Social/fiscal taxes payments ShowVatPayment=Показать оплате НДС TotalToPay=Всего к оплате -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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= Режим <b>%sRE на счетах клиентов - счетах поставщиков%s</b> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Баланс доходов и расходов, г 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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= - Суммы даны с учётом всех налогов 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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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=Доклад третьей стороной IRPF VATReport=Sale tax report VATReportByPeriods=Sale tax report by period +VATReportByMonth=Sale tax report by month VATReportByRates=Sale tax report by rates VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer diff --git a/htdocs/langs/ru_RU/cron.lang b/htdocs/langs/ru_RU/cron.lang index c21b1597510..d65f1c21c33 100644 --- a/htdocs/langs/ru_RU/cron.lang +++ b/htdocs/langs/ru_RU/cron.lang @@ -7,13 +7,14 @@ Permission23103 = Удалить Запланированную задачу Permission23104 = Выполнить запланированную задачу # Admin CronSetup=Настройки запланированных заданий -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=Или проверить и запустить специальную задачу +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=Ключ безопасности для запуска запланированных заданий FileToLaunchCronJobs=Command line to check and launch qualified cron jobs CronExplainHowToRunUnix=В системах Unix-like вы должны задать crontab для выполнения команды каждые 5 минут. 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 @@ -46,6 +47,7 @@ CronNbRun=Number of launches CronMaxRun=Maximum number of launches CronEach=Каждый JobFinished=Задание запущено и завершено +Scheduled=Scheduled #Page card CronAdd= Добавить задание CronEvery=Execute job each @@ -56,7 +58,7 @@ CronNote=Комментарий CronFieldMandatory=Поле %s является обязательным CronErrEndDateStartDt=Дата окончания не может быть раньше даты начала StatusAtInstall=Status at module installation -CronStatusActiveBtn=Включено +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Выключать CronTaskInactive=Задание отключено CronId=ID @@ -76,8 +78,14 @@ CronType_method=Call method of a PHP Class CronType_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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +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/ru_RU/errors.lang b/htdocs/langs/ru_RU/errors.lang index d9a8f880d67..3bcf15212e8 100644 --- a/htdocs/langs/ru_RU/errors.lang +++ b/htdocs/langs/ru_RU/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=Нет ошибок, мы принимаем # Errors ErrorButCommitIsDone=Обнаружены ошибки, но мы подтвердиле несмотря на это ErrorBadEMail=Email %s is wrong +ErrorBadMXDomain=Email %s seems wrong (domain has no valid MX record) ErrorBadUrl=Url %s неправильно ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=Логин %s уже существует. ErrorGroupAlreadyExists=Группа %s уже существует. ErrorRecordNotFound=Запись не найдена. @@ -48,6 +50,7 @@ ErrorFieldsRequired=Некоторые обязательные поля не б ErrorSubjectIsRequired=The email topic is required ErrorFailedToCreateDir=Не удалось создать каталог. Убедитесь, что веб-сервер пользователь имеет разрешения на запись в каталог Dolibarr документы. Если параметр <b>safe_mode</b> включен по этому PHP, проверьте, что Dolibarr PHP файлы принадлежат к веб-серверу пользователей (или группы). ErrorNoMailDefinedForThisUser=Нет определена почта для этого пользователя +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=Эта функция JavaScript должны быть активированы на работу. Изменить это в настройки - дисплей. ErrorTopMenuMustHaveAParentWithId0=Меню типа 'Top' не может быть родителем меню. Положить 0 родителей в меню или выбрать меню типа 'левых'. ErrorLeftMenuMustHaveAParentId=Меню типа 'левых' должен иметь родителя ID. @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=Имя этого профиля уже сущесв ErrorLDAPSetupNotComplete=Dolibarr-LDAP соответствия не является полной. ErrorLDAPMakeManualTest=. LDIF файл был создан в директории %s. Попробуйте загрузить его вручную из командной строки, чтобы иметь больше информации об ошибках. ErrorCantSaveADoneUserWithZeroPercentage=Can't save an action with "status not started" if field "done by" is also filled. -ErrorRefAlreadyExists=Ссылки, используемые для создания, уже существует. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/ru_RU/exports.lang b/htdocs/langs/ru_RU/exports.lang index 380635eca51..5fbbcfd4665 100644 --- a/htdocs/langs/ru_RU/exports.lang +++ b/htdocs/langs/ru_RU/exports.lang @@ -26,6 +26,8 @@ FieldTitle=Поле название NowClickToGenerateToBuildExportFile=Now, select the file format in the combo box and click on "Generate" to build the export file... AvailableFormats=Available Formats LibraryShort=Библиотека +ExportCsvSeparator=Csv caracter separator +ImportCsvSeparator=Csv caracter separator 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. @@ -131,3 +133,4 @@ 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/ru_RU/mails.lang b/htdocs/langs/ru_RU/mails.lang index 1da962648ec..6470dc1dddc 100644 --- a/htdocs/langs/ru_RU/mails.lang +++ b/htdocs/langs/ru_RU/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Линия %s в файл @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Уведомления -NoNotificationsWillBeSent=Нет электронной почте уведомления, планируется к этому мероприятию и компании -ANotificationsWillBeSent=1 уведомление будет отправлено по электронной почте -SomeNotificationsWillBeSent=%s уведомления будут отправлены по электронной почте -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=Список всех уведомлений по электронной почте отправлено +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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=Информация ContactsWithThirdpartyFilter=Contacts with third-party filter Unanswered=Unanswered Answered=Answered IsNotAnAnswer=Is not answer (initial email) IsAnAnswer=Is an answer of an initial email +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/ru_RU/main.lang b/htdocs/langs/ru_RU/main.lang index bcd5f1ea608..ac8383b1f2f 100644 --- a/htdocs/langs/ru_RU/main.lang +++ b/htdocs/langs/ru_RU/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=Для этого типа электронной почты AvailableVariables=Доступны переменные для замены NoTranslation=Нет перевода Translation=Перевод +CurrentTimeZone=Текущий часовой пояс в настройках PHP EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria NoRecordFound=Запись не найдена NoRecordDeleted=Нет удаленных записей NotEnoughDataYet=Недостаточно данных @@ -85,6 +87,8 @@ FileWasNotUploaded=Файл выбран как вложение, но пока NbOfEntries=Кол-во записей GoToWikiHelpPage=Читать интернет-справку (необходим доступ к Интернету) GoToHelpPage=Читать помощь +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Home Page RecordSaved=Запись сохранена RecordDeleted=Запись удалена RecordGenerated=Запись сгенерирована @@ -220,6 +224,7 @@ Value=Значение PersonalValue=Личное значение NewObject=Новый %s NewValue=Новое значение +OldValue=Old value %s CurrentValue=Текущее значение Code=Код Type=Тип @@ -433,6 +438,7 @@ RemainToPay=Осталось заплатить Module=Модуль/Приложение Modules=Модули/Приложения Option=Опция +Filters=Filters List=Список FullList=Полный список FullConversation=Full conversation @@ -650,6 +656,7 @@ SupplierPreview=Предварительный просмотр поставщи ShowCustomerPreview=Показать обзор клиента ShowSupplierPreview=Показать предварительный просмотр поставщика RefCustomer=Ref. клиента +InternalRef=Internal ref. Currency=Валюта InfoAdmin=Информация для администраторов Undo=Отмена @@ -671,7 +678,7 @@ SendMail=Отправить письмо Email=Адрес электронной почты NoEMail=Нет Email AlreadyRead=Прочитано -NotRead=Не прочитано +NotRead=Unread NoMobilePhone=Нет мобильного телефона Owner=Владелец FollowingConstantsWillBeSubstituted=Следующие константы будут подменять соответствующие значения. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/ru_RU/modulebuilder.lang b/htdocs/langs/ru_RU/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/ru_RU/modulebuilder.lang +++ b/htdocs/langs/ru_RU/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/ru_RU/mrp.lang b/htdocs/langs/ru_RU/mrp.lang index 5c5ff627f11..5a772a7147d 100644 --- a/htdocs/langs/ru_RU/mrp.lang +++ b/htdocs/langs/ru_RU/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/ru_RU/other.lang b/htdocs/langs/ru_RU/other.lang index 390b2716c41..2a5bf106504 100644 --- a/htdocs/langs/ru_RU/other.lang +++ b/htdocs/langs/ru_RU/other.lang @@ -5,8 +5,6 @@ Tools=Инструменты TMenuTools=Инструменты ToolsDesc=All tools not included in other menu entries are grouped here.<br>All the tools can be accessed via the left menu. Birthday=День рождения -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=рождения активного оповещения BirthdayAlertOff=рождения оповещения неактивные TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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=Посмотреть настройку модуля %s NbOfAttachedFiles=Количество прикрепленных файлов / документов TotalSizeOfAttachedFiles=Общий размер присоединенных файлов / документы @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Право CalculatedWeight=расчетный вес CalculatedVolume=Beregnet volum Weight=Вес -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=кг WeightUnitg=G WeightUnitmg=мг @@ -214,6 +216,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=Импорт данных DolibarrNotification=Автоматические уведомления ResizeDesc=Skriv inn ny <b>bredde</b> eller ny høyde. Forhold vil bli holdt under resizing ... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Экспорт области diff --git a/htdocs/langs/ru_RU/products.lang b/htdocs/langs/ru_RU/products.lang index dd1b39584f5..105d51de4e7 100644 --- a/htdocs/langs/ru_RU/products.lang +++ b/htdocs/langs/ru_RU/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Кол-во цен DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=Количество родительских упаковочных продуктов @@ -167,8 +168,10 @@ BuyingPrices=Цены на покупку CustomerPrices=Цены клиентов SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Таможенный / Товарный / HS код +CustomCode=Customs|Commodity|HS code CountryOrigin=Страна происхождения +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Nature of product (material/finished) NatureOfProductShort=Nature of product NatureOfProductDesc=Raw material or finished product @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Использовать фиксированную цену PriceByQuantity=Разные цены по количеству DisablePriceByQty=Отключить цены по количеству PriceByQuantityRange=Диапазон количества -MultipriceRules=Правила ценового сегмента +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=%% вариация над %s PercentDiscountOver=%% скидка на %s diff --git a/htdocs/langs/ru_RU/projects.lang b/htdocs/langs/ru_RU/projects.lang index c1f34e89f14..2b752094276 100644 --- a/htdocs/langs/ru_RU/projects.lang +++ b/htdocs/langs/ru_RU/projects.lang @@ -76,15 +76,16 @@ MyActivities=Мои задачи / мероприятия MyProjects=Мои проекты MyProjectsArea=My projects Area DurationEffective=Эффективная длительность -ProgressDeclared=Заданный ход выполнения проекта +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Вычисленный ход выполнения проекта +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=Время +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/ru_RU/recruitment.lang b/htdocs/langs/ru_RU/recruitment.lang index f113cfbe396..71fa83a3e38 100644 --- a/htdocs/langs/ru_RU/recruitment.lang +++ b/htdocs/langs/ru_RU/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/ru_RU/sendings.lang b/htdocs/langs/ru_RU/sendings.lang index 83633eb27c1..8f423ba15d8 100644 --- a/htdocs/langs/ru_RU/sendings.lang +++ b/htdocs/langs/ru_RU/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Другие поставки для этого зак SendingsAndReceivingForSameOrder=Shipments and receipts for this order SendingsToValidate=Поставки для проверки StatusSendingCanceled=Отменена +StatusSendingCanceledShort=Отменена StatusSendingDraft=Черновик StatusSendingValidated=Утверждена (товары для отправки или уже отправлены) StatusSendingProcessed=Обработано @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=Более полная модель документа для доставки квитанций (logo. ..) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Постоянное EXPEDITION_ADDON_NUMBER не определена SumOfProductVolumes=Сумма сторон товара SumOfProductWeights=Вес товара в сумме diff --git a/htdocs/langs/ru_RU/stocks.lang b/htdocs/langs/ru_RU/stocks.lang index e06e1cebd17..25e96f3910c 100644 --- a/htdocs/langs/ru_RU/stocks.lang +++ b/htdocs/langs/ru_RU/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/ru_RU/ticket.lang b/htdocs/langs/ru_RU/ticket.lang index 99c9e52ce56..708af1e5769 100644 --- a/htdocs/langs/ru_RU/ticket.lang +++ b/htdocs/langs/ru_RU/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Другое TicketSeverityShortLOW=Низкий TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=Высокий -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Не прочитано Read=Читать Assigned=Assigned InProgress=Выполняется @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/ru_RU/website.lang b/htdocs/langs/ru_RU/website.lang index 4b46043e5a1..775344b328a 100644 --- a/htdocs/langs/ru_RU/website.lang +++ b/htdocs/langs/ru_RU/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page PageContainer=Страница 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/ru_RU/withdrawals.lang b/htdocs/langs/ru_RU/withdrawals.lang index e7d2417a55d..2b878111e01 100644 --- a/htdocs/langs/ru_RU/withdrawals.lang +++ b/htdocs/langs/ru_RU/withdrawals.lang @@ -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>. ClassCredited=Классифицировать зачисленных @@ -131,7 +132,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,3 +148,5 @@ 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=Вариант для реального режима не был установлен, мы останавливаемся после этого моделирования 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/ru_RU/workflow.lang b/htdocs/langs/ru_RU/workflow.lang index 3d5e478c0ba..2d1edff056b 100644 --- a/htdocs/langs/ru_RU/workflow.lang +++ b/htdocs/langs/ru_RU/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=Автоматическое создание AutomaticClassification=Автоматическая классификация +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/ru_UA/mrp.lang b/htdocs/langs/ru_UA/mrp.lang new file mode 100644 index 00000000000..4d8f6b98309 --- /dev/null +++ b/htdocs/langs/ru_UA/mrp.lang @@ -0,0 +1,5 @@ +# Dolibarr language file - Source file is en_US - mrp +BillOfMaterials=Bill of Material +ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? +ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? +ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? diff --git a/htdocs/langs/ru_UA/products.lang b/htdocs/langs/ru_UA/products.lang deleted file mode 100644 index 6e900475275..00000000000 --- a/htdocs/langs/ru_UA/products.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - products -CustomCode=Customs / Commodity / HS code diff --git a/htdocs/langs/sk_SK/accountancy.lang b/htdocs/langs/sk_SK/accountancy.lang index 5b1f85a55c1..e3377be2231 100644 --- a/htdocs/langs/sk_SK/accountancy.lang +++ b/htdocs/langs/sk_SK/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=Väčšina nastavení účtovníctva sa vykonáva z menu %s ConfigAccountingExpert=Configuration of the module accounting (double entry) @@ -48,6 +50,7 @@ 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 @@ -144,7 +147,7 @@ NotVentilatedinAccount=Nie je viazaný na účet XLineSuccessfullyBinded=%s products/services successfully bound to an accounting account XLineFailedToBeBinded=%s produkty / služby neboli viazané na žiadny účtovný účet -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=Začnite triediť stránku "Väzba urobiť" najnovšími prvkami ACCOUNTING_LIST_SORT_VENTILATION_DONE=Začnite triediť stránku "Väzba vykonaná" najnovšími prvkami @@ -198,7 +201,8 @@ Docdate=dátum Docref=referencie LabelAccount=Značkový účet LabelOperation=Label operation -Sens=sens +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=časopis @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Číslo kusu TransactionNumShort=Num. transakcie AccountingCategory=Personalized groups -GroupByAccountAccounting=Skupinové účty +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Priradzovať automaticky AutomaticBindingDone=Automatické priradenie dokončené @@ -293,6 +300,7 @@ Accounted=Accounted in ledger NotYetAccounted=Not yet accounted in ledger ShowTutorial=Show Tutorial NotReconciled=Nezlúčené +WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view ## Admin BindingOptions=Binding options @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/sk_SK/admin.lang b/htdocs/langs/sk_SK/admin.lang index 22c255b5c06..bae00fceb7e 100644 --- a/htdocs/langs/sk_SK/admin.lang +++ b/htdocs/langs/sk_SK/admin.lang @@ -56,6 +56,8 @@ GUISetup=Zobraziť SetupArea=Setup UploadNewTemplate=Upload new template(s) FormToTestFileUploadForm=Formulár pre testovanie nahrávania súborov (podľa nastavenia) +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled IfModuleEnabled=Poznámka: áno je účinné len vtedy, ak je modul <b>%s</b> zapnutý 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. @@ -85,7 +87,6 @@ ShowPreview=Zobraziť náhľad ShowHideDetails=Show-Hide details PreviewNotAvailable=Náhľad nie je k dispozícii ThemeCurrentlyActive=Téma aktívnej -CurrentTimeZone=Časové pásmo PHP (server) MySQLTimeZone=TimeZone MySql (databáza) 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=Miesto @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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 PurgeNothingToDelete=Žiadne súbory alebo priečinky na zmazanie @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Preferovaní partneri OtherResources=Other resources ExternalResources=External Resources SocialNetworks=Social Networks +SocialNetworkId=Social Network ID ForDocumentationSeeWiki=Pre používateľov alebo vývojárov dokumentácie (doc, FAQs ...) <br> pozrite sa na Dolibarr Wiki: <br> <a href="%s" target="_blank"><b>%s</b></a> ForAnswersSeeForum=V prípade akýchkoľvek ďalších otázok / help, môžete použiť fórum Dolibarr: <br> <a href="%s" target="_blank"><b>%s</b></a> HelpCenterDesc1=Here are some resources for getting help and support with Dolibarr. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Examples with current configuration ListOfDirectories=Zoznam OpenDocument šablóny zoznamov 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=Príklady syntaxe: <br> c: \\ mydir <br> / Home / mydir <br> DOL_DATA_ROOT / ECM / ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br> Ak chcete vedieť, ako vytvoriť svoje ODT šablóny dokumentov pred ich uložením do týchto adresárov, prečítajte si wiki dokumentácie: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Pozícia Meno / Priezvisko @@ -406,7 +408,7 @@ UrlGenerationParameters=Parametre na zabezpečenie URL SecurityTokenIsUnique=Používame unikátny securekey parameter pre každú adresu URL EnterRefToBuildUrl=Zadajte odkaz na objekt %s GetSecuredUrl=Získajte vypočítanú URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) OldVATRates=Staré Sadzba DPH NewVATRates=Nová sadzba DPH PriceBaseTypeToChange=Zmeniť na cenách s hodnotou základného odkazu uvedeného na @@ -668,7 +670,7 @@ Module54000Desc=Direct print (without opening the documents) using Cups IPP inte Module55000Name=Anketa, Dotazník, Hlasovanie Module55000Desc=Create online polls, surveys or votes (like Doodle, Studs, RDVz etc...) Module59000Name=Okraje -Module59000Desc=Modul pre správu marže +Module59000Desc=Module to follow margins Module60000Name=Provízie Module60000Desc=Modul pre správu provízie Module62000Name=Incoterms @@ -1306,7 +1308,7 @@ 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=Optimalizácia pre vyhľadávače -YouHaveXObjectUseSearchOptim=You have %s %s in the database. You should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,13 @@ ServiceSetup=Služby modul nastavenia ProductServiceSetup=Produkty a služby moduly nastavenie 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=Predvolený typ čiarového kódu použiť pre produkty @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=Nová ponuka MenuHandler=Menu handler MenuModule=Modul zdroja -HideUnauthorizedMenu= Skryť neoprávneným menu (sivá) +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=Id ponuka DetailMenuHandler=Menu handler, kde má novú ponuku DetailMenuModule=Názov modulu, pokiaľ položky ponuky pochádzajú z modulu @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zips MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/sk_SK/banks.lang b/htdocs/langs/sk_SK/banks.lang index 471e6830858..877a8abd81b 100644 --- a/htdocs/langs/sk_SK/banks.lang +++ b/htdocs/langs/sk_SK/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/sk_SK/blockedlog.lang b/htdocs/langs/sk_SK/blockedlog.lang index bce0ea3bd25..05233648848 100644 --- a/htdocs/langs/sk_SK/blockedlog.lang +++ b/htdocs/langs/sk_SK/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/sk_SK/boxes.lang b/htdocs/langs/sk_SK/boxes.lang index dea1fdff8da..8036acd4779 100644 --- a/htdocs/langs/sk_SK/boxes.lang +++ b/htdocs/langs/sk_SK/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=Najnovšie %s upravené príspevky BoxTitleLastModifiedExpenses=Najnovšie %s upravené správy o výdavkoch BoxTitleLatestModifiedBoms=Latest %s modified BOMs BoxTitleLatestModifiedMos=Latest %s modified Manufacturing Orders +BoxTitleLastOutstandingBillReached=Customers with maximum outstanding exceeded BoxGlobalActivity=Globálna aktivita (faktúry, návrhy, objednávky) BoxGoodCustomers=Top zákazníci BoxTitleGoodCustomers=%s Top zákazníkov +BoxScheduledJobs=Naplánované úlohy +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Failed to refresh RSS flux. Latest successful refresh date: %s LastRefreshDate=Najnovší čas obnovenia NoRecordedBookmarks=Žiadne záložky definované. @@ -92,8 +95,8 @@ LastXMonthRolling=Posledný %s mesiac postupu ChooseBoxToAdd=Pridať blok na nástenku BoxAdded=Widget was added in your dashboard BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users) -BoxLastManualEntries=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Účtovníctvo +ValidatedProjects=Validated projects diff --git a/htdocs/langs/sk_SK/cashdesk.lang b/htdocs/langs/sk_SK/cashdesk.lang index 849dfa5d97a..0c85aa44b53 100644 --- a/htdocs/langs/sk_SK/cashdesk.lang +++ b/htdocs/langs/sk_SK/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=Nb faktúr Paymentnumpad=Type of Pad to enter payment Numberspad=Numbers Pad @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/sk_SK/categories.lang b/htdocs/langs/sk_SK/categories.lang index 1f28159b136..9c7e4ed9951 100644 --- a/htdocs/langs/sk_SK/categories.lang +++ b/htdocs/langs/sk_SK/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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=Doplnkové atribúty CategoriesSetup=Tags/categories setup diff --git a/htdocs/langs/sk_SK/companies.lang b/htdocs/langs/sk_SK/companies.lang index 1aae4a6f624..fc39a7f1038 100644 --- a/htdocs/langs/sk_SK/companies.lang +++ b/htdocs/langs/sk_SK/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi VATIntraManualCheck=You can also check manually on the European Commission website <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=Skontrolujte, nie je možné. Skontrolujte, služba nie je poskytovaná členským štátom (%s). NorProspectNorCustomer=Not prospect, nor customer -JuridicalStatus=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=Potenciál diff --git a/htdocs/langs/sk_SK/compta.lang b/htdocs/langs/sk_SK/compta.lang index 86356ba2d4a..2f3486a9535 100644 --- a/htdocs/langs/sk_SK/compta.lang +++ b/htdocs/langs/sk_SK/compta.lang @@ -111,7 +111,7 @@ Refund=Refund SocialContributionsPayments=Social/fiscal taxes payments ShowVatPayment=Zobraziť DPH platbu TotalToPay=Celkom k zaplateniu -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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> -CalcModeDebt=Analysis of known recorded invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Bilancia príjmov a výdavkov, ročné zhrnutie 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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=- Uvedené sumy sú so všetkými daňami 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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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=Správa o treťou stranou IRPF VATReport=Sale tax report VATReportByPeriods=Sale tax report by period +VATReportByMonth=Sale tax report by month VATReportByRates=Sale tax report by rates VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer diff --git a/htdocs/langs/sk_SK/cron.lang b/htdocs/langs/sk_SK/cron.lang index ba8fc86897a..1631b6c9038 100644 --- a/htdocs/langs/sk_SK/cron.lang +++ b/htdocs/langs/sk_SK/cron.lang @@ -6,14 +6,15 @@ Permission23102 = Vytvoriť / upraviť naplánovanú úlohu Permission23103 = Odstrániť naplánovanú úlohu Permission23104 = Spustiť naplánovanú úlohu # Admin -CronSetup= Naplánované úlohy správy Nastavenie -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=Or to check and launch a specific job +CronSetup=Naplánované úlohy správy Nastavenie +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=Bezpečnostný kľúč pre URL spustiť cron 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 environement you can use Scheduled task tools 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 @@ -42,10 +43,11 @@ CronModule=Modul CronNoJobs=Žiadny registrovaný práce CronPriority=Priorita CronLabel=Štítok -CronNbRun=Nb. začať -CronMaxRun=Max number launch +CronNbRun=Number of launches +CronMaxRun=Maximum number of launches CronEach=Každý JobFinished=Práca zahájená a dokončená +Scheduled=Scheduled #Page card CronAdd= Pridať pracovných miest CronEvery=Execute job each @@ -56,16 +58,16 @@ CronNote=Komentár CronFieldMandatory=Pole je povinné %s CronErrEndDateStartDt=Dátum ukončenia nemôže byť pred dátumom začatia StatusAtInstall=Status at module installation -CronStatusActiveBtn=Umožniť +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Zakázať CronTaskInactive=Táto úloha je zakázaný CronId=Id CronClassFile=Filename with class -CronModuleHelp=Name of Dolibarr module directory (also work with external Dolibarr module). <BR> For exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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=Systém príkazového riadka spustiť. CronCreateJob=Create new Scheduled Job CronFrom=Z @@ -76,8 +78,14 @@ CronType_method=Call method of a PHP Class CronType_command=Shell príkaz 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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +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' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/sk_SK/errors.lang b/htdocs/langs/sk_SK/errors.lang index 2b0b88987e9..30e9dea3094 100644 --- a/htdocs/langs/sk_SK/errors.lang +++ b/htdocs/langs/sk_SK/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=Žiadna chyba sa zaväzujeme # Errors ErrorButCommitIsDone=Boli nájdené chyby, ale my overiť aj cez to ErrorBadEMail=Email %s is wrong +ErrorBadMXDomain=Email %s seems wrong (domain has no valid MX record) ErrorBadUrl=Url %s je zle ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=Prihlásenie %s už existuje. ErrorGroupAlreadyExists=Skupina %s už existuje. ErrorRecordNotFound=Záznam nie je nájdený. @@ -48,6 +50,7 @@ ErrorFieldsRequired=Niektoré požadované pole sa nevypĺňa. ErrorSubjectIsRequired=The email topic is required ErrorFailedToCreateDir=Nepodarilo sa vytvoriť adresár. Uistite sa, že webový server má užívateľ oprávnenie na zápis do adresára dokumentov Dolibarr. Ak je parameter <b>safe_mode</b> je povolené na tomto PHP, skontrolujte, či Dolibarr php súbory, vlastné pre užívateľa webového servera (alebo skupina). ErrorNoMailDefinedForThisUser=Žiadna pošta definované pre tohto používateľa +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=Táto funkcia potrebujete mať Java scripty byť aktivovaný do práce. Zmeniť v nastavení - displej. ErrorTopMenuMustHaveAParentWithId0=Ponuka typu &quot;top&quot; nemôže mať rodič menu. Dajte 0 do nadradenej ponuky alebo zvoliť ponuku typu &quot;vľavo&quot;. ErrorLeftMenuMustHaveAParentId=Ponuka typu &quot;ľavica&quot;, musí mať rodič id. @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=This profile name already exists for this export set. ErrorLDAPSetupNotComplete=Dolibarr-LDAP zhoda nie je úplná. ErrorLDAPMakeManualTest=. LDIF súbor bol vytvorený v adresári %s. Skúste načítať ručne z príkazového riadku získať viac informácií o chybách. ErrorCantSaveADoneUserWithZeroPercentage=Can't save an action with "status not started" if field "done by" is also filled. -ErrorRefAlreadyExists=Ref používa pre tvorbu už existuje. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/sk_SK/exports.lang b/htdocs/langs/sk_SK/exports.lang index 5d9514819a8..a9991f8c0fd 100644 --- a/htdocs/langs/sk_SK/exports.lang +++ b/htdocs/langs/sk_SK/exports.lang @@ -26,6 +26,8 @@ FieldTitle=Polia názov NowClickToGenerateToBuildExportFile=Now, select the file format in the combo box and click on "Generate" to build the export file... AvailableFormats=Available Formats LibraryShort=Knižnica +ExportCsvSeparator=Csv caracter separator +ImportCsvSeparator=Csv caracter separator Step=Krok 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. @@ -131,3 +133,4 @@ 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/sk_SK/mails.lang b/htdocs/langs/sk_SK/mails.lang index d8f41131b19..5ee7e05f1ca 100644 --- a/htdocs/langs/sk_SK/mails.lang +++ b/htdocs/langs/sk_SK/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Linka %s v súbore @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Upozornenie -NoNotificationsWillBeSent=Žiadne oznámenia e-mailom sú naplánované pre túto udalosť a spoločnosť -ANotificationsWillBeSent=1 bude zaslaný e-mailom -SomeNotificationsWillBeSent=%s oznámenia bude zaslané e-mailom -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=Vypísať všetky e-maily odosielané oznámenia +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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=Informácie ContactsWithThirdpartyFilter=Contacts with third-party filter Unanswered=Unanswered Answered=Answered IsNotAnAnswer=Is not answer (initial email) IsAnAnswer=Is an answer of an initial email +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/sk_SK/main.lang b/htdocs/langs/sk_SK/main.lang index efb38289b90..b86251db431 100644 --- a/htdocs/langs/sk_SK/main.lang +++ b/htdocs/langs/sk_SK/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=No template available for this email type AvailableVariables=Available substitution variables NoTranslation=Preklad neexistuje Translation=Preklad +CurrentTimeZone=Časové pásmo PHP (server) EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria NoRecordFound=Nebol nájdený žiadny záznam NoRecordDeleted=No record deleted NotEnoughDataYet=Not enough data @@ -85,6 +87,8 @@ FileWasNotUploaded=Súbor vybraný pre pripojenie, ale ešte nebol nahraný. Kli NbOfEntries=No. of entries GoToWikiHelpPage=Read online help (Internet access needed) GoToHelpPage=Prečítajte si pomáhať +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Home Page RecordSaved=Záznam uložený RecordDeleted=Zaznamenajte zmazaný RecordGenerated=Record generated @@ -220,6 +224,7 @@ Value=Hodnota PersonalValue=Osobné hodnota NewObject=New %s NewValue=Nová hodnota +OldValue=Old value %s CurrentValue=Súčasná hodnota Code=Kód Type=Typ @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Voľba +Filters=Filters List=Zoznam FullList=Plný zoznam FullConversation=Full conversation @@ -650,6 +656,7 @@ SupplierPreview=Vendor preview ShowCustomerPreview=Zobraziť zákaznícku náhľad ShowSupplierPreview=Show vendor preview RefCustomer=Ref zákazník +InternalRef=Internal ref. Currency=Mena InfoAdmin=Informácie pre správcov Undo=Zrušiť @@ -671,7 +678,7 @@ SendMail=Odoslať e-mail Email=E-mail NoEMail=Žiadny e-mail AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=Žiadny mobil Owner=Majiteľ FollowingConstantsWillBeSubstituted=Nasledujúci konštanty bude nahradený zodpovedajúcou hodnotou. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/sk_SK/modulebuilder.lang b/htdocs/langs/sk_SK/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/sk_SK/modulebuilder.lang +++ b/htdocs/langs/sk_SK/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/sk_SK/mrp.lang b/htdocs/langs/sk_SK/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/sk_SK/mrp.lang +++ b/htdocs/langs/sk_SK/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/sk_SK/other.lang b/htdocs/langs/sk_SK/other.lang index d758a30e814..cdf766025a8 100644 --- a/htdocs/langs/sk_SK/other.lang +++ b/htdocs/langs/sk_SK/other.lang @@ -5,8 +5,6 @@ Tools=Nástroje TMenuTools=Nástroje ToolsDesc=All tools not included in other menu entries are grouped here.<br>All the tools can be accessed via the left menu. Birthday=Narodeniny -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=narodeniny výstraha aktívna BirthdayAlertOff=narodeniny upozornenia neaktívne TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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=Počet pripojených súborov / dokumentov TotalSizeOfAttachedFiles=Celková veľkosť pripojených súborov / dokumentov @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Právo CalculatedWeight=Vypočítaná hmotnosť CalculatedVolume=Vypočítaný objem Weight=Hmotnosť -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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=Dovoz súbor dát DolibarrNotification=Automatické upozornenie ResizeDesc=Zadajte novú šírku <b>alebo</b> výšku novej. Pomer budú uchovávané pri zmene veľkosti ... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Vývoz plocha diff --git a/htdocs/langs/sk_SK/products.lang b/htdocs/langs/sk_SK/products.lang index ef7e10c7f3f..ad7d3f5440e 100644 --- a/htdocs/langs/sk_SK/products.lang +++ b/htdocs/langs/sk_SK/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Počet cien DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=Počet rodičovských balíčkov produktu @@ -167,8 +168,10 @@ BuyingPrices=Nákupné ceny CustomerPrices=Zákaznícka cena SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +CustomCode=Customs|Commodity|HS code CountryOrigin=Krajina pôvodu +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Nature of product (material/finished) NatureOfProductShort=Nature of product NatureOfProductDesc=Raw material or finished product @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Použite pevnú cenu PriceByQuantity=Rozdielné ceny podľa quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Množstvo rozsah -MultipriceRules=Pravidlá cenových oblastí +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=%% zmena cez %s PercentDiscountOver=%% zľava cez %s diff --git a/htdocs/langs/sk_SK/projects.lang b/htdocs/langs/sk_SK/projects.lang index e66dcd1adf2..43af18884d9 100644 --- a/htdocs/langs/sk_SK/projects.lang +++ b/htdocs/langs/sk_SK/projects.lang @@ -76,15 +76,16 @@ MyActivities=Moje úlohy / činnosti MyProjects=Moje projekty MyProjectsArea=My projects Area DurationEffective=Efektívny čas -ProgressDeclared=Deklarovaná pokrok +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Vypočítaná pokrok +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=Čas +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/sk_SK/recruitment.lang b/htdocs/langs/sk_SK/recruitment.lang index f010df9c509..321f949aa39 100644 --- a/htdocs/langs/sk_SK/recruitment.lang +++ b/htdocs/langs/sk_SK/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/sk_SK/sendings.lang b/htdocs/langs/sk_SK/sendings.lang index 54d61a56291..76606f60e53 100644 --- a/htdocs/langs/sk_SK/sendings.lang +++ b/htdocs/langs/sk_SK/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Ďalšie zásielky pre túto objednávku SendingsAndReceivingForSameOrder=Shipments and receipts for this order SendingsToValidate=Zásielky na overenie StatusSendingCanceled=Zrušený +StatusSendingCanceledShort=Zrušený StatusSendingDraft=Návrh StatusSendingValidated=Overené (výrobky na odoslanie alebo už dodané) StatusSendingProcessed=Spracované @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=Najprv musíte overiť objednávku pred vytvore # Sending methods # ModelDocument DocumentModelTyphon=Viac Celý dokument model pre potvrdenie o doručení (logo. ..) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Konštantná EXPEDITION_ADDON_NUMBER nie je definované SumOfProductVolumes=Súčet objemov produktov SumOfProductWeights=Súčet hmotností produktov diff --git a/htdocs/langs/sk_SK/stocks.lang b/htdocs/langs/sk_SK/stocks.lang index 29fb6b84fcf..0f1519c6e37 100644 --- a/htdocs/langs/sk_SK/stocks.lang +++ b/htdocs/langs/sk_SK/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/sk_SK/ticket.lang b/htdocs/langs/sk_SK/ticket.lang index b0914c5f748..f45e4fb3067 100644 --- a/htdocs/langs/sk_SK/ticket.lang +++ b/htdocs/langs/sk_SK/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Ostatné TicketSeverityShortLOW=Nízky TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=Vysoký -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Čítať Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/sk_SK/website.lang b/htdocs/langs/sk_SK/website.lang index b2c84ed0d5b..e1cfe004a2f 100644 --- a/htdocs/langs/sk_SK/website.lang +++ b/htdocs/langs/sk_SK/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page PageContainer=Strana 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/sk_SK/withdrawals.lang b/htdocs/langs/sk_SK/withdrawals.lang index a13acf88e77..b28d60cf571 100644 --- a/htdocs/langs/sk_SK/withdrawals.lang +++ b/htdocs/langs/sk_SK/withdrawals.lang @@ -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>. ClassCredited=Klasifikovať pripísaná @@ -131,7 +132,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,3 +148,5 @@ 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=Voľba pre reálny režim nebol nastavený, môžeme zastaviť po tomto simuláciu ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorICSmissing=Missing ICS in Bank account %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/sk_SK/workflow.lang b/htdocs/langs/sk_SK/workflow.lang index 2a3db6f62aa..2a596f6e567 100644 --- a/htdocs/langs/sk_SK/workflow.lang +++ b/htdocs/langs/sk_SK/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 diff --git a/htdocs/langs/sl_SI/accountancy.lang b/htdocs/langs/sl_SI/accountancy.lang index 93e33834eff..9ca8ca3875d 100644 --- a/htdocs/langs/sl_SI/accountancy.lang +++ b/htdocs/langs/sl_SI/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Datum Docref=Reference LabelAccount=Račun Label LabelOperation=Label operation -Sens=Sens +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=Revija @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/sl_SI/admin.lang b/htdocs/langs/sl_SI/admin.lang index 38d716f78eb..8e4740be5cc 100644 --- a/htdocs/langs/sl_SI/admin.lang +++ b/htdocs/langs/sl_SI/admin.lang @@ -56,6 +56,8 @@ GUISetup=Prikaz SetupArea=Nastavitve UploadNewTemplate=Upload new template(s) FormToTestFileUploadForm=Testiranje »upload-a« (v skladu z nastavitvami) +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled 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. @@ -85,7 +87,6 @@ ShowPreview=Prikaži predogled ShowHideDetails=Show-Hide details PreviewNotAvailable=Predogled ni na voljo ThemeCurrentlyActive=Trenutno aktivna tema -CurrentTimeZone=Časovni pas PHP strežnika MySQLTimeZone=Časovni pas MySql (baze podatkov) 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=Presledek @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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 PurgeNothingToDelete=No directory or files to delete. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Preferirani partnerji OtherResources=Other resources ExternalResources=External Resources SocialNetworks=Social Networks +SocialNetworkId=Social Network ID ForDocumentationSeeWiki=Glede dokumentacije za uporabnike in razvojnike (Doc, FAQ...),<br>poglejte na Dolibarr Wiki:<br><b><a href="%s" target="_blank">%s</a></b> ForAnswersSeeForum=Za vsa ostala vprašanja/pomoč lahko uporabite Dolibarr forum:<br><b><a href="%s" target="_blank">%s</a></b> HelpCenterDesc1=Here are some resources for getting help and support with Dolibarr. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Examples with current configuration ListOfDirectories=Seznam map z OpenDocument predlogami ListOfDirectoriesForModelGenODT=Seznam map, ki vsebujejo predloge v OpenDocument formatu.<br><br>Tukaj navedite celotno pot do mape.<br>Med mapami vstavite CR.<br>Mapo GED modula dodajte tukaj <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b>.<br><br>Datoteke v tej mapi morajo imeti končnico <b>.odt</b> ali <b>.ods</b>. NumberOfModelFilesFound=Number of ODT/ODS template files found in these directories -ExampleOfDirectoriesForModelGen=Primeri sintakse:<br>c:\\mydir<br>/home/mydir <br>DOL_DATA_ROOT/ecm/ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=Z dodatkom takih oznak v predlogo, boste ob kreiranju dokumenta dobili personalizirane vrednosti: FullListOnOnlineDocumentation=http://wiki.dolibarr.org FirstnameNamePosition=Položaj imena/priimka @@ -406,7 +408,7 @@ UrlGenerationParameters=Parametri za zagotovitev URL SecurityTokenIsUnique=Uporabite edinstven parameter securekey za vsako URL EnterRefToBuildUrl=Vnesite sklic za predmet %s GetSecuredUrl=Get izračuna URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) OldVATRates=Stara stopnja DDV NewVATRates=Nova stopnja DDV PriceBaseTypeToChange=Sprememba cen z definirano osnovno referenčno vrednostjo @@ -668,7 +670,7 @@ Module54000Desc=Direct print (without opening the documents) using Cups IPP inte Module55000Name=Izberi, oceni ali glasuj Module55000Desc=Create online polls, surveys or votes (like Doodle, Studs, RDVz etc...) Module59000Name=Marže -Module59000Desc=Modul za upravljanje z maržami +Module59000Desc=Module to follow margins Module60000Name=Provizije Module60000Desc=Modul za upravljanje s provizijami Module62000Name=Mednarodni Poslovni Izrazi @@ -1306,7 +1308,7 @@ 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=Iskanje optimizacijo -YouHaveXObjectUseSearchOptim=You have %s %s in the database. You should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,13 @@ ServiceSetup=Storitve modul nastavitev ProductServiceSetup=Izdelki in storitve moduli za nastavitev 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=Aktivacija opcije za združevanje PDF dokumenta proizvoda in PDF ponudbe azur v zavihku priložene datoteke proizvod/storitev, če je proizvod/storitev v ponudbi -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=Privzet tip črtne kode za proizvode @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=Nov meni MenuHandler=Menijski vmesnik MenuModule=Modul izvorov -HideUnauthorizedMenu= Zasenči neavtoriziran meni (sivo) +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=ID meni DetailMenuHandler=Upravljavec menijev za prikaz novega menija DetailMenuModule=Ime modula, če vnos prihaja iz modula @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/sl_SI/banks.lang b/htdocs/langs/sl_SI/banks.lang index a73db019812..71a06145d5c 100644 --- a/htdocs/langs/sl_SI/banks.lang +++ b/htdocs/langs/sl_SI/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/sl_SI/blockedlog.lang b/htdocs/langs/sl_SI/blockedlog.lang index 84dc7eb9c06..cb5b53c1bd8 100644 --- a/htdocs/langs/sl_SI/blockedlog.lang +++ b/htdocs/langs/sl_SI/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/sl_SI/boxes.lang b/htdocs/langs/sl_SI/boxes.lang index 92f815a1a33..0bd7b6a8519 100644 --- a/htdocs/langs/sl_SI/boxes.lang +++ b/htdocs/langs/sl_SI/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=Zadnje %s spremenjene donacije BoxTitleLastModifiedExpenses=Zadnja %s poročila o stroških BoxTitleLatestModifiedBoms=Latest %s modified BOMs BoxTitleLatestModifiedMos=Latest %s modified Manufacturing Orders +BoxTitleLastOutstandingBillReached=Customers with maximum outstanding exceeded BoxGlobalActivity=Globalna aktivnost (računi, ponudbe, naročila) BoxGoodCustomers=Dobri kupci BoxTitleGoodCustomers=%s dobri kupci +BoxScheduledJobs=Scheduled jobs +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Failed to refresh RSS flux. Latest successful refresh date: %s LastRefreshDate=Zadnji datum osvežitve podatkov NoRecordedBookmarks=Ni definiranih zaznamkov. @@ -92,8 +95,8 @@ LastXMonthRolling=Zadnji %s tekoči meseci ChooseBoxToAdd=Dodaj vključnik na nadzorno ploščo BoxAdded=Widget was added in your dashboard BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users) -BoxLastManualEntries=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Računovodstvo +ValidatedProjects=Validated projects diff --git a/htdocs/langs/sl_SI/cashdesk.lang b/htdocs/langs/sl_SI/cashdesk.lang index a103bd51275..90b364f16d4 100644 --- a/htdocs/langs/sl_SI/cashdesk.lang +++ b/htdocs/langs/sl_SI/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=Število računov Paymentnumpad=Type of Pad to enter payment Numberspad=Numbers Pad @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/sl_SI/categories.lang b/htdocs/langs/sl_SI/categories.lang index 70060a70318..187bd536897 100644 --- a/htdocs/langs/sl_SI/categories.lang +++ b/htdocs/langs/sl_SI/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories CatList=Seznam značk/kategorij +CatListAll=List of tags/categories (all types) NewCategory=Nova značka/kategorija ModifCat=Spremeni značko/kategorijo CatCreated=Kreirana značka/kategorija @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=ID značke/kategorije -CatSupList=List of vendor tags/categories -CatCusList=Seznam značk/kategorij kupcev/možnih strank +ParentCategory=Parent tag/category +ParentCategoryLabel=Label of parent tag/category +CatSupList=List of vendors tags/categories +CatCusList=List of customers/prospects tags/categories CatProdList=Seznam značk/kategorij proizvodov CatMemberList=Seznam značk/kategorij članov -CatContactList=Seznam kontaktnih oznak/kategorij -CatSupLinks=Povezave med dobavitelji in značkami/kategorijami +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=Povezave med kupci/možnimi strankami in značkami/kategorijami CatContactsLinks=Links between contacts/addresses and tags/categories CatProdLinks=Povezave med proizvodi/storitvami in značkami/kategorijami -CatProJectLinks=Links between projects and tags/categories +CatMembersLinks=Povezave med člani in značkami/kategorijami +CatProjectsLinks=Links between projects and tags/categories +CatUsersLinks=Links between users and tags/categories DeleteFromCat=Odstrani iz značk/kategorije ExtraFieldsCategories=Koplementarni atributi CategoriesSetup=Nastavitev značk/kategorij diff --git a/htdocs/langs/sl_SI/companies.lang b/htdocs/langs/sl_SI/companies.lang index c83ab2f3231..95e4d763b46 100644 --- a/htdocs/langs/sl_SI/companies.lang +++ b/htdocs/langs/sl_SI/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi VATIntraManualCheck=You can also check manually on the European Commission website <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=Kontrola ni možna. Država članica ne zagotavlja storitve poizvedbe (%s). NorProspectNorCustomer=Not prospect, nor customer -JuridicalStatus=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=Potencial diff --git a/htdocs/langs/sl_SI/compta.lang b/htdocs/langs/sl_SI/compta.lang index a3a4ec4adde..2f71f9efc4f 100644 --- a/htdocs/langs/sl_SI/compta.lang +++ b/htdocs/langs/sl_SI/compta.lang @@ -111,7 +111,7 @@ Refund=Vračilo SocialContributionsPayments=Social/fiscal taxes payments ShowVatPayment=Prikaži plačilo DDV TotalToPay=Skupaj za plačilo -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Bilanca prihodkov in stroškov, letni povzetek 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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=- Prikazane vrednosti vključujejo vse davke 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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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=Poročilo tretjih oseb IRPF VATReport=Sale tax report VATReportByPeriods=Sale tax report by period +VATReportByMonth=Sale tax report by month VATReportByRates=Sale tax report by rates VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer diff --git a/htdocs/langs/sl_SI/cron.lang b/htdocs/langs/sl_SI/cron.lang index bf247f95c88..5f3c8ecd5fa 100644 --- a/htdocs/langs/sl_SI/cron.lang +++ b/htdocs/langs/sl_SI/cron.lang @@ -6,14 +6,15 @@ Permission23102 = Ustvari/posodobi načrtovano delo Permission23103 = Izbriši načrtovano delo Permission23104 = Izvedi načrtovano delo # Admin -CronSetup= Scheduled job management setup -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=Or to check and launch a specific job +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 environement you can use Scheduled task tools 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 @@ -42,10 +43,11 @@ CronModule=Modul CronNoJobs=Nobene naloge niso registrirane CronPriority=Prioriteta CronLabel=Oznaka -CronNbRun=Nb. launch -CronMaxRun=Max number launch +CronNbRun=Number of launches +CronMaxRun=Maximum number of launches CronEach=Every JobFinished=Job launched and finished +Scheduled=Scheduled #Page card CronAdd= Dodaj naloge CronEvery=Execute job each @@ -56,16 +58,16 @@ CronNote=Komentar CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Omogočeno +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Onemogoči 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 exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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=Od @@ -76,8 +78,14 @@ 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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +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' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/sl_SI/errors.lang b/htdocs/langs/sl_SI/errors.lang index c9142ec4843..ef8cfd2d53f 100644 --- a/htdocs/langs/sl_SI/errors.lang +++ b/htdocs/langs/sl_SI/errors.lang @@ -5,8 +5,10 @@ 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 je napačen ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=Uporabniško ime %s že obstaja. ErrorGroupAlreadyExists=Skupina %s že obstaja. ErrorRecordNotFound=Ne najdem zapisa. @@ -48,6 +50,7 @@ ErrorFieldsRequired=Nekatera zahtevana polja niso izpolnjena. ErrorSubjectIsRequired=The email topic is required ErrorFailedToCreateDir=Kreiranje mape ni uspelo. Preverite, če ima uporabnik internetne strani dovoljenje za pisanje v mapo z Dolibarr dokumenti. Če je parameter <b>safe_mode</b> v tem PHP omogočen, preverite če je lastnik Dolibarr php datotek uporabnik web strežnika (ali skupina). ErrorNoMailDefinedForThisUser=Ta uporabnik nima določenega Email naslova +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=Za aktiviranje ali delovanje te funkcije je potreben javascript. Spremenite »Nastavitve – Prikaz«. ErrorTopMenuMustHaveAParentWithId0='Zgoernji' meni ne more imeti nadrejenega menija. Vnesite 0 v nadrejeni meni ali izberite vrsto menija 'Levi'. ErrorLeftMenuMustHaveAParentId='Levi' meni mora imeti Nadrejeni ID. @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=This profile name already exists for this export set. ErrorLDAPSetupNotComplete=Dolibarr-LDAP združevanje ni popolno. ErrorLDAPMakeManualTest=Datoteka .ldif je bila ustvarjena v mapi %s. Poskusite jo naložiti ročno preko ukazne vrstice, da bi dobili več podatkov o napaki. ErrorCantSaveADoneUserWithZeroPercentage=Can't save an action with "status not started" if field "done by" is also filled. -ErrorRefAlreadyExists=Referenca, uporabljena za kreiranje, že obstaja. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/sl_SI/exports.lang b/htdocs/langs/sl_SI/exports.lang index b9cb40877c1..e48218574d6 100644 --- a/htdocs/langs/sl_SI/exports.lang +++ b/htdocs/langs/sl_SI/exports.lang @@ -26,6 +26,8 @@ FieldTitle=Naziv polja NowClickToGenerateToBuildExportFile=Now, select the file format in the combo box and click on "Generate" to build the export file... AvailableFormats=Available Formats LibraryShort=Knjižnica +ExportCsvSeparator=Csv caracter separator +ImportCsvSeparator=Csv caracter separator Step=Korak 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. @@ -131,3 +133,4 @@ 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/sl_SI/mails.lang b/htdocs/langs/sl_SI/mails.lang index 8c93e61eedc..e87e6b2b66a 100644 --- a/htdocs/langs/sl_SI/mails.lang +++ b/htdocs/langs/sl_SI/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=%s vrstica v datoteki @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=Email ni bil poslan. Napačen naslov pošiljatelja ali prejemnika. Preverite profil uporabnika. # Module Notifications Notifications=Obvestila -NoNotificationsWillBeSent=Za ta dogodek in podjetje niso predvidena obvestila po e-pošti -ANotificationsWillBeSent=1 obvestilo bo poslano z e-pošto -SomeNotificationsWillBeSent=%s obvestil bo poslanih z e-pošto -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=Seznam vseh poslanih e-poštnih obvestil +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=Konfiguracij pošiljanja e-pošte je bila nastavljena na '%s'. Ta način ne more biti uporabljen za masovno pošiljanje. MailSendSetupIs2=Najprej morate kot administrator preko menija %sDomov - Nastavitve - E-pošta%s spremeniti parameter <strong>'%s'</strong> za uporabo načina '%s'. V tem načinu lahko odprete nastavitve SMTP strežnika, ki vam jih omogoča vaš spletni oprerater in uporabite masovno pošiljanje. MailSendSetupIs3=Če imate vprašanja o nastavitvi SMTP strežnika, lahko vprašate %s. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=Informacija ContactsWithThirdpartyFilter=Contacts with third-party filter Unanswered=Unanswered Answered=Answered IsNotAnAnswer=Is not answer (initial email) IsAnAnswer=Is an answer of an initial email +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/sl_SI/main.lang b/htdocs/langs/sl_SI/main.lang index f7d1c8a39d7..7f2afe8aebe 100644 --- a/htdocs/langs/sl_SI/main.lang +++ b/htdocs/langs/sl_SI/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=No template available for this email type AvailableVariables=Available substitution variables NoTranslation=Ni prevoda Translation=Prevod +CurrentTimeZone=Časovni pas PHP strežnika EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria NoRecordFound=Ni najden zapis NoRecordDeleted=No record deleted NotEnoughDataYet=Not enough data @@ -85,6 +87,8 @@ FileWasNotUploaded=Izbrana je bila datoteka za prilogo, vendar še ni dodana. Kl NbOfEntries=No. of entries GoToWikiHelpPage=Read online help (Internet access needed) GoToHelpPage=Preberite pomoč +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Home Page RecordSaved=Zapis je shranjen RecordDeleted=Zapis je izbrisan RecordGenerated=Record generated @@ -220,6 +224,7 @@ Value=Vrednost PersonalValue=Osebna vrednost NewObject=New %s NewValue=Nova vrednost +OldValue=Old value %s CurrentValue=Trenutna vrednost Code=Koda Type=Tip @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Opcija +Filters=Filters List=Seznam FullList=Celoten seznam FullConversation=Full conversation @@ -650,6 +656,7 @@ SupplierPreview=Vendor preview ShowCustomerPreview=Prikaži pregled kupca ShowSupplierPreview=Show vendor preview RefCustomer=Ref. kupca +InternalRef=Internal ref. Currency=Valuta InfoAdmin=Informacija za administratorje Undo=Razveljavi @@ -671,7 +678,7 @@ SendMail=Pošlji e-pošto Email=E-pošta NoEMail=Ni email-a AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=Ni mobilnega telefona Owner=Lastnik FollowingConstantsWillBeSubstituted=Naslednje konstante bodo zamenjane z ustrezno vrednostjo. @@ -1107,3 +1114,9 @@ UpToDate=Up-to-date OutOfDate=Out-of-date EventReminder=Event Reminder UpdateForAllLines=Update for all lines +OnHold=Ustavljeno +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 diff --git a/htdocs/langs/sl_SI/modulebuilder.lang b/htdocs/langs/sl_SI/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/sl_SI/modulebuilder.lang +++ b/htdocs/langs/sl_SI/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/sl_SI/mrp.lang b/htdocs/langs/sl_SI/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/sl_SI/mrp.lang +++ b/htdocs/langs/sl_SI/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/sl_SI/other.lang b/htdocs/langs/sl_SI/other.lang index 3cc9bcea61e..e5b75647b50 100644 --- a/htdocs/langs/sl_SI/other.lang +++ b/htdocs/langs/sl_SI/other.lang @@ -5,8 +5,6 @@ Tools=Orodja TMenuTools=Orodja ToolsDesc=All tools not included in other menu entries are grouped here.<br>All the tools can be accessed via the left menu. Birthday=Rojstni dan -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=Vklopljeno opozorilo na rojstni dan BirthdayAlertOff=Izklopljeno opozorilo na rojstni dan TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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=Glejte nastavitev modula %s NbOfAttachedFiles=Število pripetih datotek/dokumentov TotalSizeOfAttachedFiles=Skupna velikost pripetih datotek/dokumentov @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Desno CalculatedWeight=Kalkulirana teža CalculatedVolume=Kalkulirana prostornina Weight=Teža -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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=Nabor podatkov za uvoz DolibarrNotification=Avtomatsko obvestilo ResizeDesc=Vnesite novo širino <b>ALI</b> novo višino. Razmerje se bo med spreminjanjem velikosti ohranilo... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Področje izvoza diff --git a/htdocs/langs/sl_SI/products.lang b/htdocs/langs/sl_SI/products.lang index 21ec9a1ac38..7fb5405f77f 100644 --- a/htdocs/langs/sl_SI/products.lang +++ b/htdocs/langs/sl_SI/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Število cen DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=Število nadrejenih sestavljenih izdelkov @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Cene za kupce SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +CustomCode=Customs|Commodity|HS code CountryOrigin=Država porekla +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Nature of product (material/finished) NatureOfProductShort=Nature of product NatureOfProductDesc=Raw material or finished product @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Uporabi fiksno ceno PriceByQuantity=Različne cene glede na količino DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Območje količin -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/sl_SI/projects.lang b/htdocs/langs/sl_SI/projects.lang index 9edb7c2fcaa..452a680f3b5 100644 --- a/htdocs/langs/sl_SI/projects.lang +++ b/htdocs/langs/sl_SI/projects.lang @@ -76,15 +76,16 @@ MyActivities=Moje naloge/aktivnosti MyProjects=Moji projekti MyProjectsArea=My projects Area DurationEffective=Efektivno trajanje -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Čas +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/sl_SI/recruitment.lang b/htdocs/langs/sl_SI/recruitment.lang index 30292aa07dc..9c84e4c01d8 100644 --- a/htdocs/langs/sl_SI/recruitment.lang +++ b/htdocs/langs/sl_SI/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/sl_SI/sendings.lang b/htdocs/langs/sl_SI/sendings.lang index 722f6d6c939..928c2e0f03c 100644 --- a/htdocs/langs/sl_SI/sendings.lang +++ b/htdocs/langs/sl_SI/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Ostale pošiljke za to naročilo SendingsAndReceivingForSameOrder=Shipments and receipts for this order SendingsToValidate=Pošiljke za potrditev StatusSendingCanceled=Preklicano +StatusSendingCanceledShort=Preklicano StatusSendingDraft=Osnutek StatusSendingValidated=Potrjeno (proizvodi za pošiljanje ali že poslani) StatusSendingProcessed=Obdelani @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=Popolnejši vzorec dobavnice (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined== SumOfProductVolumes=Vsota volumnov proizvodov SumOfProductWeights=Vsota tež proizvodov diff --git a/htdocs/langs/sl_SI/stocks.lang b/htdocs/langs/sl_SI/stocks.lang index a9cb3761255..b46640afdac 100644 --- a/htdocs/langs/sl_SI/stocks.lang +++ b/htdocs/langs/sl_SI/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/sl_SI/ticket.lang b/htdocs/langs/sl_SI/ticket.lang index 4fce4674b17..c8506ca6800 100644 --- a/htdocs/langs/sl_SI/ticket.lang +++ b/htdocs/langs/sl_SI/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Ostalo TicketSeverityShortLOW=Majhen potencial TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=Visok potencial -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Preberite Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/sl_SI/website.lang b/htdocs/langs/sl_SI/website.lang index 92889944fa4..26e7a852a93 100644 --- a/htdocs/langs/sl_SI/website.lang +++ b/htdocs/langs/sl_SI/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page PageContainer=Stran 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/sl_SI/withdrawals.lang b/htdocs/langs/sl_SI/withdrawals.lang index 98b270589d9..c0912aaeaf5 100644 --- a/htdocs/langs/sl_SI/withdrawals.lang +++ b/htdocs/langs/sl_SI/withdrawals.lang @@ -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>. ClassCredited=Označi kot prejeto @@ -131,7 +132,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,3 +148,5 @@ 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=Opcija za delo v živo ni bila nastavljena, zato se bo sistem ustavil po simulaciji ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorICSmissing=Missing ICS in Bank account %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/sl_SI/workflow.lang b/htdocs/langs/sl_SI/workflow.lang index 2fdcedce378..e7257c04c73 100644 --- a/htdocs/langs/sl_SI/workflow.lang +++ b/htdocs/langs/sl_SI/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=Samodejno generiranje AutomaticClassification=Samodejno spreminjanje statusa +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/sq_AL/accountancy.lang b/htdocs/langs/sq_AL/accountancy.lang index 4e7da1a8564..b2c8f38576a 100644 --- a/htdocs/langs/sq_AL/accountancy.lang +++ b/htdocs/langs/sq_AL/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Date Docref=Reference LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/sq_AL/admin.lang b/htdocs/langs/sq_AL/admin.lang index 6ca94565b87..ce21ede1d21 100644 --- a/htdocs/langs/sq_AL/admin.lang +++ b/htdocs/langs/sq_AL/admin.lang @@ -56,6 +56,8 @@ GUISetup=Shfaq SetupArea=Konfiguro 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. @@ -85,7 +87,6 @@ ShowPreview=Show preview ShowHideDetails=Show-Hide details PreviewNotAvailable=Preview not available ThemeCurrentlyActive=Theme currently active -CurrentTimeZone=TimeZone PHP (server) MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Dates are stored and returned by database server as if they were kept as submitted string. The timezone has effect only when using the UNIX_TIMESTAMP function (that should not be used by Dolibarr, so database TZ should have no effect, even if changed after data was entered). Space=Space @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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 PurgeNothingToDelete=No directory or files to delete. @@ -256,6 +257,7 @@ 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. @@ -375,7 +377,7 @@ 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:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +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 @@ -406,7 +408,7 @@ UrlGenerationParameters=Parameters to secure URLs SecurityTokenIsUnique=Use a unique securekey parameter for each URL EnterRefToBuildUrl=Enter reference for object %s GetSecuredUrl=Get calculated URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +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 @@ -668,7 +670,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 @@ -1306,7 +1308,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,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 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=New menu MenuHandler=Menu handler MenuModule=Source module -HideUnauthorizedMenu= Hide unauthorized menus (gray) +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 @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/sq_AL/banks.lang b/htdocs/langs/sq_AL/banks.lang index e131a6bbd10..6feb31b8e9c 100644 --- a/htdocs/langs/sq_AL/banks.lang +++ b/htdocs/langs/sq_AL/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/sq_AL/blockedlog.lang b/htdocs/langs/sq_AL/blockedlog.lang index 5afae6e9e53..0bba5605d0f 100644 --- a/htdocs/langs/sq_AL/blockedlog.lang +++ b/htdocs/langs/sq_AL/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/sq_AL/boxes.lang b/htdocs/langs/sq_AL/boxes.lang index 1468b3a7864..c5cf2d90ba8 100644 --- a/htdocs/langs/sq_AL/boxes.lang +++ b/htdocs/langs/sq_AL/boxes.lang @@ -46,9 +46,12 @@ 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=Blerës të mirë BoxTitleGoodCustomers=%s Blerës të mirë +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. @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Accountancy +ValidatedProjects=Validated projects diff --git a/htdocs/langs/sq_AL/cashdesk.lang b/htdocs/langs/sq_AL/cashdesk.lang index 489e2191fa6..1c7c73155f2 100644 --- a/htdocs/langs/sq_AL/cashdesk.lang +++ b/htdocs/langs/sq_AL/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +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 @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/sq_AL/categories.lang b/htdocs/langs/sq_AL/categories.lang index 8acad1ef594..66125ff271d 100644 --- a/htdocs/langs/sq_AL/categories.lang +++ b/htdocs/langs/sq_AL/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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 diff --git a/htdocs/langs/sq_AL/companies.lang b/htdocs/langs/sq_AL/companies.lang index f0fb358a3b8..63049256431 100644 --- a/htdocs/langs/sq_AL/companies.lang +++ b/htdocs/langs/sq_AL/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi 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=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Punonjësit ProspectLevelShort=Potential diff --git a/htdocs/langs/sq_AL/compta.lang b/htdocs/langs/sq_AL/compta.lang index 7a237dbc407..c587a416989 100644 --- a/htdocs/langs/sq_AL/compta.lang +++ b/htdocs/langs/sq_AL/compta.lang @@ -111,7 +111,7 @@ 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 ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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 diff --git a/htdocs/langs/sq_AL/cron.lang b/htdocs/langs/sq_AL/cron.lang index 6238f0fce2c..485accd2a17 100644 --- a/htdocs/langs/sq_AL/cron.lang +++ b/htdocs/langs/sq_AL/cron.lang @@ -6,14 +6,15 @@ 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 -OrToLaunchASpecificJob=Or to check and launch a specific job +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 environement you can use Scheduled task tools 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 @@ -42,10 +43,11 @@ CronModule=Module CronNoJobs=No jobs registered CronPriority=Prioriteti CronLabel=Label -CronNbRun=Nb. launch -CronMaxRun=Max number launch +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 @@ -56,16 +58,16 @@ CronNote=Koment CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Aktivizo +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Çaktivizo 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 exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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 @@ -76,8 +78,14 @@ 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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +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' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/sq_AL/errors.lang b/htdocs/langs/sq_AL/errors.lang index 893f4a35b65..5b26be724d9 100644 --- a/htdocs/langs/sq_AL/errors.lang +++ b/htdocs/langs/sq_AL/errors.lang @@ -5,8 +5,10 @@ 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. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ 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=Ref used for creation already exists. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/sq_AL/exports.lang b/htdocs/langs/sq_AL/exports.lang index 2dcf4317e00..a0eb7161ef2 100644 --- a/htdocs/langs/sq_AL/exports.lang +++ b/htdocs/langs/sq_AL/exports.lang @@ -26,6 +26,8 @@ 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. @@ -131,3 +133,4 @@ 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/sq_AL/mails.lang b/htdocs/langs/sq_AL/mails.lang index 16e913977d4..a79dff4badb 100644 --- a/htdocs/langs/sq_AL/mails.lang +++ b/htdocs/langs/sq_AL/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Notifications -NoNotificationsWillBeSent=No email notifications are planned for this event and company -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent +NotificationsAuto=Notifications Auto. +NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company +ANotificationsWillBeSent=1 automatic notification will be sent by email +SomeNotificationsWillBeSent=%s automatic notifications will be sent by email +AddNewNotification=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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +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/sq_AL/main.lang b/htdocs/langs/sq_AL/main.lang index b52a374d7d5..ba2fa0a111d 100644 --- a/htdocs/langs/sq_AL/main.lang +++ b/htdocs/langs/sq_AL/main.lang @@ -28,7 +28,9 @@ 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 @@ -85,6 +87,8 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C 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 @@ -220,6 +224,7 @@ Value=Value PersonalValue=Personal value NewObject=New %s NewValue=New value +OldValue=Old value %s CurrentValue=Current value Code=Code Type=Type @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Option +Filters=Filters List=List FullList=Full list FullConversation=Full conversation @@ -650,6 +656,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 @@ -671,7 +678,7 @@ SendMail=Send email Email=Email NoEMail=No email AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=No mobile phone Owner=Owner FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/sq_AL/modulebuilder.lang b/htdocs/langs/sq_AL/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/sq_AL/modulebuilder.lang +++ b/htdocs/langs/sq_AL/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/sq_AL/mrp.lang b/htdocs/langs/sq_AL/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/sq_AL/mrp.lang +++ b/htdocs/langs/sq_AL/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/sq_AL/other.lang b/htdocs/langs/sq_AL/other.lang index fd7a7fb44ea..9540d523083 100644 --- a/htdocs/langs/sq_AL/other.lang +++ b/htdocs/langs/sq_AL/other.lang @@ -5,8 +5,6 @@ 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 -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Right CalculatedWeight=Calculated weight CalculatedVolume=Calculated volume Weight=Weight -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/sq_AL/products.lang b/htdocs/langs/sq_AL/products.lang index 497ce01c6dc..93dc7f8448c 100644 --- a/htdocs/langs/sq_AL/products.lang +++ b/htdocs/langs/sq_AL/products.lang @@ -108,7 +108,8 @@ 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=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +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 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/sq_AL/projects.lang b/htdocs/langs/sq_AL/projects.lang index 4a272a821a1..93142ff9135 100644 --- a/htdocs/langs/sq_AL/projects.lang +++ b/htdocs/langs/sq_AL/projects.lang @@ -76,15 +76,16 @@ MyActivities=My tasks/activities MyProjects=My projects MyProjectsArea=My projects Area DurationEffective=Effective duration -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Time +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/sq_AL/recruitment.lang b/htdocs/langs/sq_AL/recruitment.lang index b775e78552e..437445f25dc 100644 --- a/htdocs/langs/sq_AL/recruitment.lang +++ b/htdocs/langs/sq_AL/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/sq_AL/sendings.lang b/htdocs/langs/sq_AL/sendings.lang index dce3be1c1db..cea753bf79b 100644 --- a/htdocs/langs/sq_AL/sendings.lang +++ b/htdocs/langs/sq_AL/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Other shipments for this order SendingsAndReceivingForSameOrder=Shipments and receipts for this order SendingsToValidate=Shipments to validate StatusSendingCanceled=Anulluar +StatusSendingCanceledShort=Anulluar StatusSendingDraft=Draft StatusSendingValidated=Validated (products to ship or already shipped) StatusSendingProcessed=Processed @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=More complete document model for delivery receipts (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/sq_AL/stocks.lang b/htdocs/langs/sq_AL/stocks.lang index 11577ff1d3e..666ede4efd4 100644 --- a/htdocs/langs/sq_AL/stocks.lang +++ b/htdocs/langs/sq_AL/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/sq_AL/ticket.lang b/htdocs/langs/sq_AL/ticket.lang index 97de9a5b5f9..5f259230780 100644 --- a/htdocs/langs/sq_AL/ticket.lang +++ b/htdocs/langs/sq_AL/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Tjetër TicketSeverityShortLOW=Low TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=High -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Read Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/sq_AL/website.lang b/htdocs/langs/sq_AL/website.lang index 03e042e4be6..f17def114b8 100644 --- a/htdocs/langs/sq_AL/website.lang +++ b/htdocs/langs/sq_AL/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/sq_AL/withdrawals.lang b/htdocs/langs/sq_AL/withdrawals.lang index 68f1a63dbe7..92dfe12e1c3 100644 --- a/htdocs/langs/sq_AL/withdrawals.lang +++ b/htdocs/langs/sq_AL/withdrawals.lang @@ -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>. ClassCredited=Classify credited @@ -131,7 +132,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,3 +148,5 @@ 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/sq_AL/workflow.lang b/htdocs/langs/sq_AL/workflow.lang index 299be277e1d..494a0424a75 100644 --- a/htdocs/langs/sq_AL/workflow.lang +++ b/htdocs/langs/sq_AL/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 diff --git a/htdocs/langs/sr_RS/accountancy.lang b/htdocs/langs/sr_RS/accountancy.lang index 66b404cdec9..0f47b67db83 100644 --- a/htdocs/langs/sr_RS/accountancy.lang +++ b/htdocs/langs/sr_RS/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Datum Docref=Referenca LabelAccount=Oznaka računa LabelOperation=Label operation -Sens=Sens +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=Izveštaj @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Deo broj TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/sr_RS/admin.lang b/htdocs/langs/sr_RS/admin.lang index 842fbea4662..e7d50480139 100644 --- a/htdocs/langs/sr_RS/admin.lang +++ b/htdocs/langs/sr_RS/admin.lang @@ -56,6 +56,8 @@ GUISetup=Display SetupArea=Podešavanja 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. @@ -85,7 +87,6 @@ ShowPreview=Show preview ShowHideDetails=Show-Hide details PreviewNotAvailable=Preview not available ThemeCurrentlyActive=Theme currently active -CurrentTimeZone=TimeZone PHP (server) MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Dates are stored and returned by database server as if they were kept as submitted string. The timezone has effect only when using the UNIX_TIMESTAMP function (that should not be used by Dolibarr, so database TZ should have no effect, even if changed after data was entered). Space=Space @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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. @@ -256,6 +257,7 @@ 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. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Examples with current configuration ListOfDirectories=List of OpenDocument templates directories ListOfDirectoriesForModelGenODT=Lista foldera sa templejtima u OpenDocument formatu.<br><br>Staviti apsolutnu putanju foldera.<br>Svaki folder u listi mora biti na novoj liniji.<br>Da biste dodali folder GED modulu, ubacite ga ovde <b>DOL_DATA_ROOT/ecm/ime_vaseg_foldera</b>.<br><br>Fajlovi u tim folderima moraju imati ekstenziju <b>.odt</b> ili <b>.ods</b>. NumberOfModelFilesFound=Number of ODT/ODS template files found in these directories -ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +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 @@ -406,7 +408,7 @@ UrlGenerationParameters=Parameters to secure URLs SecurityTokenIsUnique=Use a unique securekey parameter for each URL EnterRefToBuildUrl=Enter reference for object %s GetSecuredUrl=Get calculated URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +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 @@ -668,7 +670,7 @@ Module54000Desc=Direct print (without opening the documents) using Cups IPP inte Module55000Name=Anketa ili Glasanje 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 @@ -1306,7 +1308,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,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 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=New menu MenuHandler=Menu handler MenuModule=Source module -HideUnauthorizedMenu= Hide unauthorized menus (gray) +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 @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/sr_RS/banks.lang b/htdocs/langs/sr_RS/banks.lang index 2939146c14e..0a1a42832d4 100644 --- a/htdocs/langs/sr_RS/banks.lang +++ b/htdocs/langs/sr_RS/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/sr_RS/blockedlog.lang b/htdocs/langs/sr_RS/blockedlog.lang index 9be5b672696..977e3f9d5c0 100644 --- a/htdocs/langs/sr_RS/blockedlog.lang +++ b/htdocs/langs/sr_RS/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/sr_RS/boxes.lang b/htdocs/langs/sr_RS/boxes.lang index 037853abcf2..9f9318be2df 100644 --- a/htdocs/langs/sr_RS/boxes.lang +++ b/htdocs/langs/sr_RS/boxes.lang @@ -46,9 +46,12 @@ 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=Opšta aktivnost (fakture, ponude, narudžbine) BoxGoodCustomers=Dobri kupci BoxTitleGoodCustomers=%s Dobri kupci +BoxScheduledJobs=Planirane operacije +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Failed to refresh RSS flux. Latest successful refresh date: %s LastRefreshDate=Latest refresh date NoRecordedBookmarks=Nema definisane zabeleške @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Računovodstvo +ValidatedProjects=Validated projects diff --git a/htdocs/langs/sr_RS/cashdesk.lang b/htdocs/langs/sr_RS/cashdesk.lang index 5074b404df8..75b0acd39a2 100644 --- a/htdocs/langs/sr_RS/cashdesk.lang +++ b/htdocs/langs/sr_RS/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +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 @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/sr_RS/categories.lang b/htdocs/langs/sr_RS/categories.lang index 3467c78c1e5..f72f3351441 100644 --- a/htdocs/langs/sr_RS/categories.lang +++ b/htdocs/langs/sr_RS/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories CatList=Lista naziva/kategorija +CatListAll=List of tags/categories (all types) NewCategory=Nov naziv/kategorija ModifCat=Izmeni naziv/kategoriju CatCreated=Kreiran naziv/kategorija @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=ID naziva/kategorije -CatSupList=List of vendor tags/categories -CatCusList=Lista naziva/kategorija kupca/prospekta +ParentCategory=Parent tag/category +ParentCategoryLabel=Label of parent tag/category +CatSupList=List of vendors tags/categories +CatCusList=List of customers/prospects tags/categories CatProdList=Lista naziva/kategorija proizvoda CatMemberList=Lista naziva/kategorija članova -CatContactList=Lista naziva/kategorija kontakata -CatSupLinks=Povezanost između dobavljača i naziva/kategorija +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=Povezanost između kupaca/prospekta i naziva/kategorija CatContactsLinks=Links between contacts/addresses and tags/categories CatProdLinks=Povezanost između proizvoda/usluga i naziva/kategorija -CatProJectLinks=Links between projects and tags/categories +CatMembersLinks=Povezanost između članova i naziva/kategorija +CatProjectsLinks=Links between projects and tags/categories +CatUsersLinks=Links between users and tags/categories DeleteFromCat=Ukloni iz naziva/kategorije ExtraFieldsCategories=Komplementarni atributi CategoriesSetup=TPodešavanje naziva/kategorija diff --git a/htdocs/langs/sr_RS/companies.lang b/htdocs/langs/sr_RS/companies.lang index 31db7cdc260..154132b33da 100644 --- a/htdocs/langs/sr_RS/companies.lang +++ b/htdocs/langs/sr_RS/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi VATIntraManualCheck=You can also check manually on the European Commission website <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=Provera nije moguća. Servis nije dostupan za datu državu (%s). NorProspectNorCustomer=Not prospect, nor customer -JuridicalStatus=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Zaposleni ProspectLevelShort=Potencijal diff --git a/htdocs/langs/sr_RS/compta.lang b/htdocs/langs/sr_RS/compta.lang index edf211abd56..122fa300178 100644 --- a/htdocs/langs/sr_RS/compta.lang +++ b/htdocs/langs/sr_RS/compta.lang @@ -111,7 +111,7 @@ Refund=Povraćaj SocialContributionsPayments=Uplate poreza/doprinosa ShowVatPayment=Prikaži PDV uplatu TotalToPay=Ukupno za uplatu -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account +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=Rač. kod klijenta @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Da li ste sigurni da želite da obrišete ovu up 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>. -CalcModeDebt=Analysis of known recorded invoices even if they are not yet accounted in ledger. +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= Mod <b>%sRE za fakture klijenata - fakture dobavljača%s</b> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Stanje prihoda i rashoda, godišnji prikaz 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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=- Prikazani su bruto iznosi 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=- Sadrži realne uplate računa, troškova, PDV-a i zarada.<br>- Zasniva se na datumima isplate računa, troškova, PDV-a i zarada. Za donacije se zasniva na datumu donacije. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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=Izveštaj po RE subjektima LT2ReportByCustomersES=Izveštaj po subjektu IRPF VATReport=Sale tax report VATReportByPeriods=Sale tax report by period +VATReportByMonth=Sale tax report by month VATReportByRates=Sale tax report by rates VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer diff --git a/htdocs/langs/sr_RS/cron.lang b/htdocs/langs/sr_RS/cron.lang index 184926050c0..5a246d49be9 100644 --- a/htdocs/langs/sr_RS/cron.lang +++ b/htdocs/langs/sr_RS/cron.lang @@ -6,14 +6,15 @@ Permission23102 = Kreiraj/ažuriraj planiranu operaciju Permission23103 = Obriši planiranu operaciju Permission23104 = Izvrši planiranu operaciju # Admin -CronSetup= Podešavanja planiranih operacija -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=Ili za proveru i izvršenje određene operacije +CronSetup=Podešavanja planiranih operacija +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 za URL za izvršenje cron operacija FileToLaunchCronJobs=Command line to check and launch qualified cron jobs CronExplainHowToRunUnix=U Unix okruženju možete koristiti crontab za izvršenje komandne linije svakih 5 minuta -CronExplainHowToRunWin=U Windows okruženju možete koristiti Scheduled task tools za izvršenje komandne linije svakih 5 minuta +CronExplainHowToRunWin=On Microsoft(tm) Windows environment you can use Scheduled Task tools to run the command line each 5 minutes CronMethodDoesNotExists=Klasa %s ne sadrži ni jedan metod %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 @@ -42,10 +43,11 @@ CronModule=Modul CronNoJobs=Nema prijavljenih operacija CronPriority=Prioritet CronLabel=Naziv -CronNbRun=Br. izvršenja -CronMaxRun=Max number launch +CronNbRun=Number of launches +CronMaxRun=Maximum number of launches CronEach=Svakih JobFinished=Operacija je izvršena +Scheduled=Scheduled #Page card CronAdd= Dodaj operacije CronEvery=Izvrši operaciju svakih @@ -56,16 +58,16 @@ CronNote=Komentar CronFieldMandatory=Polje %s je obavezno CronErrEndDateStartDt=Kraj ne može biti pre početka StatusAtInstall=Status at module installation -CronStatusActiveBtn=Aktiviraj +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Deaktiviraj CronTaskInactive=Operacije je deaktivirana CronId=Id CronClassFile=Filename with class -CronModuleHelp=Name of Dolibarr module directory (also work with external Dolibarr module). <BR> For exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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=Komandna linija za izvršenje CronCreateJob=Kreiraj novu planiranu operaciju CronFrom=Od @@ -76,8 +78,14 @@ CronType_method=Call method of a PHP Class CronType_command=Komandna linija 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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +UseMenuModuleToolsToAddCronJobs=Go into menu "<a href="%s">Home - Admin tools - Scheduled jobs</a>" to see and edit scheduled jobs. JobDisabled=Operacija deaktivirana MakeLocalDatabaseDumpShort=Bekap lokalne baze -MakeLocalDatabaseDump=Create a local database dump. Parameters are: compression ('gz' or 'bz' or 'none'), backup type ('mysql' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/sr_RS/errors.lang b/htdocs/langs/sr_RS/errors.lang index b257b6a38d4..29ba9a69da3 100644 --- a/htdocs/langs/sr_RS/errors.lang +++ b/htdocs/langs/sr_RS/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=Nema greške, commit. # Errors ErrorButCommitIsDone=Bilo je grešaka, ali potvrđujemo uprkos tome ErrorBadEMail=Email %s is wrong +ErrorBadMXDomain=Email %s seems wrong (domain has no valid MX record) ErrorBadUrl=URL %s je pogrešan ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=Login %s već postoji ErrorGroupAlreadyExists=Grupa %s već postoji ErrorRecordNotFound=Linija nije pronađena. @@ -48,6 +50,7 @@ ErrorFieldsRequired=Neka obavezna polja nisu popunjena ErrorSubjectIsRequired=The email topic is required ErrorFailedToCreateDir=Greška prilikom kreacije foldera. Proverite da li Web server nalog ima prava da piše u Dolibarr documents folderu. Ako je parametar <b>safe_mode</b> aktivan u PHP-u, proverite da li Dolibarr php fajlovi pripadaju korisniku (ili grupi) Web server naloga. ErrorNoMailDefinedForThisUser=Mail nije definisan za ovog korisnika +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=Za ovu funkcionalnost morate aktivirati javascript. ErrorTopMenuMustHaveAParentWithId0=Meni tipa "Top" ne može imati parent meni. Stavite 0 u parent meni ili izaberite meni tipa "Left". ErrorLeftMenuMustHaveAParentId=Meni tipa "Levi" mora imati parent ID. @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=Ovo ime profila već postoji za ovaj export set. ErrorLDAPSetupNotComplete=Dolibarr-LDAP matching nije završen. ErrorLDAPMakeManualTest=.ldif fajl je generisan u folderu %s. Pokušajte da ga učitate ručno iz komandne linije da biste imali više informacija o greškama. ErrorCantSaveADoneUserWithZeroPercentage=Can't save an action with "status not started" if field "done by" is also filled. -ErrorRefAlreadyExists=Ref korišćena za kreaciju već postoji. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=Lozinka je podešena za ovog člana, ali korisnik nije kreiran. To znači da je lozinka sačuvana, ali se član ne može ulogovati na Dolibarr. Informaciju može koristiti neka eksterna komponenta, ali ako nemate potrebe da definišete korisnika/lozinku za članove, možete deaktivirati opciju "Upravljanje lozinkama za svakog člana" u podešavanjima modula Članovi. Ukoliko morate da kreirate login, ali Vam nije potrebna lozinka, ostavite ovo polje prazno da se ovo upozorenje ne bi prikazivalo. Napomena: email može biti korišćen kao login ako je član povezan sa korisnikom. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Vaša prijava je promenjena. Iz sigurnosn 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/sr_RS/exports.lang b/htdocs/langs/sr_RS/exports.lang index 1ed869416fd..41f2f5ed861 100644 --- a/htdocs/langs/sr_RS/exports.lang +++ b/htdocs/langs/sr_RS/exports.lang @@ -26,6 +26,8 @@ FieldTitle=Naziv polja NowClickToGenerateToBuildExportFile=Now, select the file format in the combo box and click on "Generate" to build the export file... AvailableFormats=Available Formats LibraryShort=Biblioteka +ExportCsvSeparator=Csv caracter separator +ImportCsvSeparator=Csv caracter separator Step=Korak 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. @@ -131,3 +133,4 @@ 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/sr_RS/mails.lang b/htdocs/langs/sr_RS/mails.lang index 9b2a31bd01f..a37342806c3 100644 --- a/htdocs/langs/sr_RS/mails.lang +++ b/htdocs/langs/sr_RS/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Linija %s u fajlu @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=Mail nije poslat. Pogrešan mail primaoca ili pošiljaoca. Proverite profil korisnika. # Module Notifications Notifications=Obaveštenja -NoNotificationsWillBeSent=Nema planiranih obaveštenja za ovaj događaj i kompaniju -ANotificationsWillBeSent=1 obaveštenje će biti poslato mailom -SomeNotificationsWillBeSent=%s obaveštenja će biti poslato mailom -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=Lista svih poslatih obaveštenja +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=Konfiguracija slanja mailova je podešena na "%s". Ovaj mod ne može slati masovne mailove. MailSendSetupIs2=Prvo morate sa admin nalogom otvoriti meni %sHome - Setup - EMails%s da biste promenili parametar <strong>'%s'</strong> i prešli u mod '%s'. U ovom modu, možete uneti podešavanja SMTP servera Vašeg provajdera i koristiti funkcionalnost masovnog emailinga. MailSendSetupIs3=Ukoliko imate pitanja oko podešavanja SMTP servera, možete pitati %s. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=Informacija ContactsWithThirdpartyFilter=Contacts with third-party filter Unanswered=Unanswered Answered=Answered IsNotAnAnswer=Is not answer (initial email) IsAnAnswer=Is an answer of an initial email +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/sr_RS/main.lang b/htdocs/langs/sr_RS/main.lang index d6425161390..1630acdddf6 100644 --- a/htdocs/langs/sr_RS/main.lang +++ b/htdocs/langs/sr_RS/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=No template available for this email type AvailableVariables=Dostupne zamenske promenljive NoTranslation=Nema prevoda Translation=Prevod +CurrentTimeZone=TimeZone PHP (server) EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria NoRecordFound=Nema rezultata NoRecordDeleted=No record deleted NotEnoughDataYet=Not enough data @@ -85,6 +87,8 @@ FileWasNotUploaded=Fajl je selektiran za prilog, ali još uvek nije uploadovan. NbOfEntries=No. of entries GoToWikiHelpPage=Read online help (Internet access needed) GoToHelpPage=Pročitajte pomoć +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Home Page RecordSaved=Linija sačuvana RecordDeleted=Linija obrisana RecordGenerated=Record generated @@ -220,6 +224,7 @@ Value=Vrednost PersonalValue=Lična vrednost NewObject=New %s NewValue=Nova vrednost +OldValue=Old value %s CurrentValue=Trenutna vrednost Code=Kod Type=Tip @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Opcija +Filters=Filters List=Lista FullList=Cela lista FullConversation=Full conversation @@ -650,6 +656,7 @@ SupplierPreview=Vendor preview ShowCustomerPreview=Prikaži preview klijenta ShowSupplierPreview=Show vendor preview RefCustomer=Ref. klijenta +InternalRef=Internal ref. Currency=Valuta InfoAdmin=Informacija za administratore Undo=Undo @@ -671,7 +678,7 @@ SendMail=Pošalji email Email=Email NoEMail=Nema maila AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=Nema mobilnog telefona Owner=Vlasnik FollowingConstantsWillBeSubstituted=Sledeće konstante će biti zamenjene odgovarajućim vrednostima. @@ -1107,3 +1114,9 @@ UpToDate=Up-to-date OutOfDate=Out-of-date EventReminder=Event Reminder UpdateForAllLines=Update for all lines +OnHold=Na čekanju +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 diff --git a/htdocs/langs/sr_RS/modulebuilder.lang b/htdocs/langs/sr_RS/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/sr_RS/modulebuilder.lang +++ b/htdocs/langs/sr_RS/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/sr_RS/mrp.lang b/htdocs/langs/sr_RS/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/sr_RS/mrp.lang +++ b/htdocs/langs/sr_RS/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/sr_RS/other.lang b/htdocs/langs/sr_RS/other.lang index a314caa0fb6..6abb3f27b1a 100644 --- a/htdocs/langs/sr_RS/other.lang +++ b/htdocs/langs/sr_RS/other.lang @@ -5,8 +5,6 @@ Tools=Alati TMenuTools=Alati ToolsDesc=All tools not included in other menu entries are grouped here.<br>All the tools can be accessed via the left menu. Birthday=Datum rođenja -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=Obaveštenje o rođendanu je aktivno BirthdayAlertOff=Obaveštenje o rođendanu je neaktivno TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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=Vidi podešavanja modula %s NbOfAttachedFiles=Broj fajlova/dokumenata u prilogu TotalSizeOfAttachedFiles=Ukupna veličina priloženih fajlova/dokumenata @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Desno CalculatedWeight=Izračunata težina CalculatedVolume=Izračunata zapremina Weight=Težina -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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=Podaci za import DolibarrNotification=Automatsko obaveštenje ResizeDesc=Unesite novu širinu <b>ILI</b> novu visinu. Proporcija će biti održana prilikom promene veličine... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Oblast exporta diff --git a/htdocs/langs/sr_RS/products.lang b/htdocs/langs/sr_RS/products.lang index d553a48ca39..1df147564f2 100644 --- a/htdocs/langs/sr_RS/products.lang +++ b/htdocs/langs/sr_RS/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Broj cena DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=Broj paketa proizvoda @@ -167,8 +168,10 @@ BuyingPrices=Kupovne cene CustomerPrices=Cene klijenta SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +CustomCode=Customs|Commodity|HS code CountryOrigin=Zemlja porekla +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Nature of product (material/finished) NatureOfProductShort=Nature of product NatureOfProductDesc=Raw material or finished product @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Koristi fiksnu cenu PriceByQuantity=Različite cene po količini DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Raspon količina -MultipriceRules=Price segment rules +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=%% varijacija od %s PercentDiscountOver=%% popust od %s diff --git a/htdocs/langs/sr_RS/projects.lang b/htdocs/langs/sr_RS/projects.lang index ac565c0140b..931194501ee 100644 --- a/htdocs/langs/sr_RS/projects.lang +++ b/htdocs/langs/sr_RS/projects.lang @@ -76,15 +76,16 @@ MyActivities=Moji zadaci/aktivnosti MyProjects=Moji projekti MyProjectsArea=Moja zona projekata DurationEffective=Efektivno trajanje -ProgressDeclared=Prijavljeni napredak +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Izračunati napredak +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=Vreme +TimeConsumed=Consumed ListOfTasks=Lista zadataka GoToListOfTimeConsumed=Idi na listu utrošenog vremena GanttView=Gantt View diff --git a/htdocs/langs/sr_RS/recruitment.lang b/htdocs/langs/sr_RS/recruitment.lang index 2d9b75ed0b9..ae1eb5feb23 100644 --- a/htdocs/langs/sr_RS/recruitment.lang +++ b/htdocs/langs/sr_RS/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/sr_RS/sendings.lang b/htdocs/langs/sr_RS/sendings.lang index 6aa01a7b447..25672b23d46 100644 --- a/htdocs/langs/sr_RS/sendings.lang +++ b/htdocs/langs/sr_RS/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Druge isporuke za ovu narudžbinu SendingsAndReceivingForSameOrder=Shipments and receipts for this order SendingsToValidate=Isporuke za potvrdu StatusSendingCanceled=Otkazano +StatusSendingCanceledShort=Poništeno StatusSendingDraft=Nacrt StatusSendingValidated=Potvrđeno (proizvodi za isporuku ili već isporučeni) StatusSendingProcessed=Procesuirano @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=Morate prvo potvrditi porudžbinu pre nego omog # Sending methods # ModelDocument DocumentModelTyphon=Kompletni model dokumenta za prijemnice isporuka (logo, ...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Konstanta EXPEDITION_ADDON_NUMBER nije definisana SumOfProductVolumes=Suma količina proizvoda SumOfProductWeights=Suma težina proizvoda diff --git a/htdocs/langs/sr_RS/stocks.lang b/htdocs/langs/sr_RS/stocks.lang index 2df84e2de08..d33ab3c5d47 100644 --- a/htdocs/langs/sr_RS/stocks.lang +++ b/htdocs/langs/sr_RS/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/sr_RS/ticket.lang b/htdocs/langs/sr_RS/ticket.lang index 88a8ad89046..35102542484 100644 --- a/htdocs/langs/sr_RS/ticket.lang +++ b/htdocs/langs/sr_RS/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Drugo TicketSeverityShortLOW=Nizak TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=Visok -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Pročitaj Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/sr_RS/website.lang b/htdocs/langs/sr_RS/website.lang index 0ff0213ef31..baa3b7e08c8 100644 --- a/htdocs/langs/sr_RS/website.lang +++ b/htdocs/langs/sr_RS/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page PageContainer=Strana 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/sr_RS/withdrawals.lang b/htdocs/langs/sr_RS/withdrawals.lang index e207c6d1316..001a9c81371 100644 --- a/htdocs/langs/sr_RS/withdrawals.lang +++ b/htdocs/langs/sr_RS/withdrawals.lang @@ -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>. ClassCredited=Označi kreditirano @@ -131,7 +132,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,3 +148,5 @@ 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=Opcija za realni mod nije podešena, prekidamo posle ove simulacije. ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorICSmissing=Missing ICS in Bank account %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/sr_RS/workflow.lang b/htdocs/langs/sr_RS/workflow.lang index e623a6593c3..7502f987d7a 100644 --- a/htdocs/langs/sr_RS/workflow.lang +++ b/htdocs/langs/sr_RS/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=Automatsko kriranje AutomaticClassification=Automatsko klasifikovanje +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/sv_SE/accountancy.lang b/htdocs/langs/sv_SE/accountancy.lang index 30f4f0325a6..384ab4af6a9 100644 --- a/htdocs/langs/sv_SE/accountancy.lang +++ b/htdocs/langs/sv_SE/accountancy.lang @@ -16,6 +16,8 @@ ThisService=Tjänsten ThisProduct=Den här produkten DefaultForService=Standard för service DefaultForProduct=Standard för produkter +ProductForThisThirdparty=Product for this thirdparty +ServiceForThisThirdparty=Service for this thirdparty CantSuggest=Kan inte föreslå AccountancySetupDoneFromAccountancyMenu=De flesta inställningarna för bokföringen görs från menyn %s ConfigAccountingExpert=Configuration of the module accounting (double entry) @@ -47,7 +49,8 @@ CountriesInEECExceptMe=Länder i EEG förutom %s CountriesExceptMe=Alla länder utom %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 +VueByAccountAccounting=Visa baserat på redovisningskonto +VueBySubAccountAccounting=View by accounting subaccount MainAccountForCustomersNotDefined=Huvudsakliga bokföringskonto för kunder som inte definierats i installationen MainAccountForSuppliersNotDefined=Huvudkonton för leverantörer som inte definierats i installationen @@ -144,7 +147,7 @@ NotVentilatedinAccount=Ej bunden till bokföringskonto XLineSuccessfullyBinded=%s produkter / tjänster har framgångsrikt bundet till ett bokföringskonto XLineFailedToBeBinded=%s produkter / tjänster var inte bundna till något kontokonto -ACCOUNTING_LIMIT_LIST_VENTILATION=Antal element att förbinda visat per sida (högst rekommenderat: 50) +ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Börja sorteringen av sidan "Bindning att göra" av de senaste elementen ACCOUNTING_LIST_SORT_VENTILATION_DONE=Börja sorteringen av sidan "Bindning gjort" av de senaste elementen @@ -198,7 +201,8 @@ Docdate=Datum Docref=Referens LabelAccount=Etikett konto LabelOperation=Etikettoperation -Sens=Sens +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=Brevkod Lettering=Lettering Codejournal=Loggbok @@ -206,7 +210,8 @@ JournalLabel=Loggboksetikett NumPiece=Stycke nummer TransactionNumShort=Num. transaktion AccountingCategory=Personliga grupper -GroupByAccountAccounting=Grupp efter bokföringskonto +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. ByAccounts=Enligt konton ByPredefinedAccountGroups=Av fördefinierade grupper @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Betalning som inte är kopplad till någon produkt / OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +ShowSubtotalByGroup=Show subtotal by level Pcgtype=Grupp av konto 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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Här kan du se listan över kostnadsrapporter som är bu DescVentilExpenseReportMore=Om du ställer in bokföringskonto på typ av kostnadsrapportrader kommer applikationen att kunna göra alla bindningar mellan dina kostnadsrapporter och konton för ditt kontoplan, bara med ett klick med knappen <strong> "%s" </strong>. Om kontot inte var inställt på avgifterna eller om du fortfarande har några rader som inte är kopplade till något konto måste du göra en manuell bindning från menyn "<strong> %s </strong>". DescVentilDoneExpenseReport=Här kan du se listan över raderna för kostnadsrapporter och deras bokföringskonto +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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Förbind automatiskt AutomaticBindingDone=Automatisk bindning gjord @@ -293,6 +300,7 @@ Accounted=Redovisas i huvudbok NotYetAccounted=Ännu inte redovisad i huvudbok ShowTutorial=Show Tutorial NotReconciled=Inte avstämd +WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view ## Admin BindingOptions=Binding options @@ -337,6 +345,7 @@ Modelcsv_LDCompta10=Export for LD Compta (v10 & higher) Modelcsv_openconcerto=Export for OpenConcerto (Test) Modelcsv_configurable=Exportera CSV konfigurerbar 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) diff --git a/htdocs/langs/sv_SE/admin.lang b/htdocs/langs/sv_SE/admin.lang index 067f3a478a2..68ba4a916a7 100644 --- a/htdocs/langs/sv_SE/admin.lang +++ b/htdocs/langs/sv_SE/admin.lang @@ -38,7 +38,7 @@ YourSession=Din session Sessions=Användarsessioner WebUserGroup=Webbserver användare / grupp PermissionsOnFilesInWebRoot=Permissions on files in web root directory -PermissionsOnFile=Permissions on file %s +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). DBStoringCharset=Databas charset för att lagra data DBSortingCharset=Databas charset att sortera data @@ -56,6 +56,8 @@ GUISetup=Visa SetupArea=Inställning UploadNewTemplate=Ladda upp ny mall (er) FormToTestFileUploadForm=Formulär för att testa filuppladdning (enligt inställningar) +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled 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. @@ -85,7 +87,6 @@ ShowPreview=Visa förhandsgranskning ShowHideDetails=Show-Hide details PreviewNotAvailable=Förhandsgranska inte tillgänglig ThemeCurrentlyActive=Tema för tillfället -CurrentTimeZone=PHP server tidszon MySQLTimeZone=Timezone MySql (databas) TZHasNoEffect=Datum lagras och returneras av databaseserver som om de behölls som inlämnade strängar. Tidszonen har endast effekt när UNIX_TIMESTAMP-funktionen används (som inte ska användas av Dolibarr, så databasen TZ skulle inte ha någon effekt, även om den ändrats efter att data hade angetts). Space=Space @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Ta bort temporära filer +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 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 PurgeNothingToDelete=Ingen katalog eller filer att radera. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Preferred Partners OtherResources=Andra resurser ExternalResources=Externa resurser SocialNetworks=Sociala nätverk +SocialNetworkId=Social Network ID ForDocumentationSeeWiki=För användarens eller utvecklarens dokumentation (Doc, FAQs ...), <br> ta en titt på Dolibarr Wiki: <br> <a href="%s" target="_blank"><b>%s</b></a> ForAnswersSeeForum=För alla andra frågor / hjälp, kan du använda Dolibarr forumet: <br> <a href="%s" target="_blank"><b>%s</b></a> HelpCenterDesc1=Här finns några resurser för att få hjälp och support med Dolibarr. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Exempel med nuvarande konfiguration ListOfDirectories=Förteckning över OpenDocument mallar kataloger ListOfDirectoriesForModelGenODT=Lista över kataloger som innehåller mallfiler med OpenDocument-format. <br> <br> Sätt här hela sökvägen till kataloger. <br> Lägg till en vagnretur mellan eah-katalogen. <br> För att lägga till en katalog över GED-modulen, lägg till här <b> DOL_DATA_ROOT / ecm / ditt katalognamn </b>. <br> <br> Filer i katalogerna måste sluta med <b> .odt </b> eller <b> .ods </b>. NumberOfModelFilesFound=Antal ODT / ODS-mallfiler som finns i dessa kataloger -ExampleOfDirectoriesForModelGen=Exempel på syntax: <br> C: \\ Mydir <br> / Home / Mydir <br> DOL_DATA_ROOT / ECM / ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br> Att veta hur du skapar dina odT dokumentmallar, innan du förvarar dem i dessa kataloger, läs wiki dokumentation: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Ståndpunkt av förnamn / namn @@ -406,7 +408,7 @@ UrlGenerationParameters=Parametrar för att säkra webbadresser SecurityTokenIsUnique=Använd en unik securekey parameter för varje webbadress EnterRefToBuildUrl=Ange referens för objekt %s GetSecuredUrl=Få beräknat URL -ButtonHideUnauthorized=Dölj knappar för icke-administrativa användare för obehöriga åtgärder istället för att visa grått inaktiverade knappar +ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) OldVATRates=Gammal momssats NewVATRates=Ny momssats PriceBaseTypeToChange=Ändra om priser med bas referensvärde som definieras på @@ -668,7 +670,7 @@ Module54000Desc=Direktutskrift (utan att öppna dokumenten) med koppar IPP-grän Module55000Name=Omröstning, undersökning eller omröstning Module55000Desc=Skapa online-omröstningar, undersökningar eller röster (som Doodle, Studs, RDVz etc ...) Module59000Name=Marginaler -Module59000Desc=Modul för att hantera marginaler +Module59000Desc=Module to follow margins Module60000Name=Provision Module60000Desc=Modul för att hantera uppdrag Module62000Name=Incoterms @@ -1306,7 +1308,7 @@ YouUseBestDriver=Du använder drivrutinen %s vilket är den bästa drivrutinen s YouDoNotUseBestDriver=Du använder drivrutinen %s men drivrutinen %s rekommenderas. NbOfObjectIsLowerThanNoPb=You have only %s %s in the database. This does not require any particular optimization. SearchOptim=Sökoptimering -YouHaveXObjectUseSearchOptim=You have %s %s in the database. You should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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=Du använder %s webbläsaren. Den här webbläsaren är ok för säkerhet och prestanda. BrowserIsKO=Du använder %s webbläsaren. Den här webbläsaren är känd för att vara ett dåligt val för säkerhet, prestanda och tillförlitlighet. Vi rekommenderar att du använder Firefox, Chrome, Opera eller Safari. @@ -1596,8 +1598,13 @@ ServiceSetup=Tjänster modul konfiguration ProductServiceSetup=Produkter och tjänster moduler inställning NumberOfProductShowInSelect=Maximalt antal produkter som ska visas i kombinationsvallista (0 = ingen gräns) ViewProductDescInFormAbility=Visa produktbeskrivningar i formulär (visas annars i en verktygstips) +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=Aktivera i produkt / tjänst Bifogade fliken Filer en möjlighet att slå samman produkt PDF-dokument till förslag PDF azur om produkten / tjänsten är på förslaget -ViewProductDescInThirdpartyLanguageAbility=Visa produktbeskrivningar på tredje parts språk +ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) UseSearchToSelectProductTooltip=Även om du har ett stort antal produkter (> 100 000) kan du öka hastigheten genom att ställa in konstant PRODUCT_DONOTSEARCH_ANYWHERE till 1 i Setup-> Other. Sökningen begränsas sedan till början av strängen. UseSearchToSelectProduct=Vänta tills du trycker på en knapp innan du laddar innehållet i produktkombinationslistan (Detta kan öka prestanda om du har ett stort antal produkter, men det är mindre bekvämt) SetDefaultBarcodeTypeProducts=Standard streckkod som ska användas för produkter @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personliga menyer som inte är kopplade till en toppm NewMenu=Ny meny MenuHandler=Meny handler MenuModule=Källa modul -HideUnauthorizedMenu= Göm obehöriga menyer (grå) +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=Id-menyn DetailMenuHandler=Meny hanterare där för att visa nya menyn DetailMenuModule=Modulnamn om menyalternativet kommer från en modul @@ -1983,11 +1990,12 @@ EMailHost=Värd för e-post IMAP-server MailboxSourceDirectory=Postkälla källkatalog MailboxTargetDirectory=Målkatalogen för brevlådan EmailcollectorOperations=Verksamhet att göra av samlare +EmailcollectorOperationsDesc=Operations are executed from top to bottom order MaxEmailCollectPerCollect=Max number of emails collected per collect CollectNow=Samla nu ConfirmCloneEmailCollector=Are you sure you want to clone the Email collector %s ? -DateLastCollectResult=Datum senaste samlingen försökt -DateLastcollectResultOk=Datum senaste samla framgångsrikt +DateLastCollectResult=Date of latest collect try +DateLastcollectResultOk=Date of latest collect success LastResult=Senaste resultatet EmailCollectorConfirmCollectTitle=E-post samla bekräftelse EmailCollectorConfirmCollect=Vill du springa samlingen för den här samlaren nu? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menyinmatningskod (huvudmeny) ECMAutoTree=Visa automatiskt ECM-träd @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/sv_SE/banks.lang b/htdocs/langs/sv_SE/banks.lang index dc82d075631..42c143d1b0b 100644 --- a/htdocs/langs/sv_SE/banks.lang +++ b/htdocs/langs/sv_SE/banks.lang @@ -173,10 +173,11 @@ SEPAMandate=SEPA-mandatet 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 kontantstängsel -NewCashFence=Nytt kontantstängsel +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 diff --git a/htdocs/langs/sv_SE/blockedlog.lang b/htdocs/langs/sv_SE/blockedlog.lang index 480f38a923d..56f0339d071 100644 --- a/htdocs/langs/sv_SE/blockedlog.lang +++ b/htdocs/langs/sv_SE/blockedlog.lang @@ -35,7 +35,7 @@ logDON_DELETE=Donation logisk borttagning logMEMBER_SUBSCRIPTION_CREATE=Medlemskapsabonnemang skapad logMEMBER_SUBSCRIPTION_MODIFY=Medlemsabonnemang modifierad logMEMBER_SUBSCRIPTION_DELETE=Medlems abonnemangs logisk borttagning -logCASHCONTROL_VALIDATE=Kontantskyddsinspelning +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Kundfaktura nedladdning BlockedLogBillPreview=Kundfaktura förhandsvisning BlockedlogInfoDialog=Logguppgifter diff --git a/htdocs/langs/sv_SE/boxes.lang b/htdocs/langs/sv_SE/boxes.lang index 8de035e3c7b..a7deb6f3811 100644 --- a/htdocs/langs/sv_SE/boxes.lang +++ b/htdocs/langs/sv_SE/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=Senast %s ändrade donationer BoxTitleLastModifiedExpenses=Senaste %s modifierade kostnadsrapporterna BoxTitleLatestModifiedBoms=Latest %s modified BOMs BoxTitleLatestModifiedMos=Latest %s modified Manufacturing Orders +BoxTitleLastOutstandingBillReached=Customers with maximum outstanding exceeded BoxGlobalActivity=Global aktivitet (fakturor, förslag, order) BoxGoodCustomers=Bra kunder BoxTitleGoodCustomers=%s Bra kunder +BoxScheduledJobs=Schemalagda jobb +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Misslyckades med att uppdatera RSS-flöde. Senaste framgångsrika uppdateringsdatum: %s LastRefreshDate=Senaste uppdateringsdatum NoRecordedBookmarks=Inga bokmärken definieras. Klicka <a href="%s">här</a> för att lägga till bokmärken. @@ -92,8 +95,8 @@ LastXMonthRolling=Den senaste %s månaden rullande ChooseBoxToAdd=Lägg till widget i din instrumentpanel BoxAdded=Widget har lagts till i din instrumentpanel BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users) -BoxLastManualEntries=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Redovisning +ValidatedProjects=Validated projects diff --git a/htdocs/langs/sv_SE/cashdesk.lang b/htdocs/langs/sv_SE/cashdesk.lang index de64394d96b..96ea227c941 100644 --- a/htdocs/langs/sv_SE/cashdesk.lang +++ b/htdocs/langs/sv_SE/cashdesk.lang @@ -49,8 +49,8 @@ Footer=sidfot AmountAtEndOfPeriod=Belopp vid periodens utgång (dag, månad eller år) TheoricalAmount=Teoretisk mängd RealAmount=Verklig mängd -CashFence=Cash fence -CashFenceDone=Kassaskydd gjord för perioden +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=Antal av fakturor Paymentnumpad=Typ av kudde för att komma in i betalningen Numberspad=Numbers Pad @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/sv_SE/categories.lang b/htdocs/langs/sv_SE/categories.lang index f3c56936403..821c5b52128 100644 --- a/htdocs/langs/sv_SE/categories.lang +++ b/htdocs/langs/sv_SE/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=Projektets taggar / kategorier område UsersCategoriesArea=Användare taggar / kategorier område SubCats=Underkategorier CatList=Lista med taggar / kategorier +CatListAll=List of tags/categories (all types) NewCategory=Ny tagg / kategori ModifCat=Ändra tagg / kategori CatCreated=Tagg / kategori skapad @@ -65,16 +66,22 @@ UsersCategoriesShort=Användare taggar / kategorier StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tagg / kategori id -CatSupList=Lista över leverantörskoder / kategorier -CatCusList=Lista över kund / prospektetiketter / kategorier +ParentCategory=Parent tag/category +ParentCategoryLabel=Label of parent tag/category +CatSupList=List of vendors tags/categories +CatCusList=List of customers/prospects tags/categories CatProdList=Lista över produkter taggar / kategorier CatMemberList=Lista över medlemmar taggar / kategorier -CatContactList=Lista över kontaktkoder / kategorier -CatSupLinks=Länkar mellan leverantörer och taggar / kategorier +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=Länkar mellan kunder / utsikter och taggar / kategorier CatContactsLinks=Links between contacts/addresses and tags/categories CatProdLinks=Länkar mellan produkter / tjänster och taggar / kategorier -CatProJectLinks=Länkar mellan projekt och taggar / kategorier +CatMembersLinks=Links between members and tags/categories +CatProjectsLinks=Links between projects and tags/categories +CatUsersLinks=Links between users and tags/categories DeleteFromCat=Ta bort från taggar / kategori ExtraFieldsCategories=Extra attibut CategoriesSetup=Taggar / kategorier inställning diff --git a/htdocs/langs/sv_SE/companies.lang b/htdocs/langs/sv_SE/companies.lang index 57b74758a58..1e64d1649c3 100644 --- a/htdocs/langs/sv_SE/companies.lang +++ b/htdocs/langs/sv_SE/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Kontrollera momsnumret inom gemenskapen på Europeiska VATIntraManualCheck=Du kan också kontrollera manuellt på Europeiska kommissionens webbplats <a href="%s" target="_blank"> %s </a> ErrorVATCheckMS_UNAVAILABLE=Kontroll inte möjlig. Kontrollera om tjänsten tillhandahålls av medlemsstaten (%s). NorProspectNorCustomer=Inte utsikter, eller kund -JuridicalStatus=Juridisk enhetstyp +JuridicalStatus=Business entity type Workforce=Workforce Staff=anställda ProspectLevelShort=Potentiella diff --git a/htdocs/langs/sv_SE/compta.lang b/htdocs/langs/sv_SE/compta.lang index 481d0ead328..b9ac03cf0ef 100644 --- a/htdocs/langs/sv_SE/compta.lang +++ b/htdocs/langs/sv_SE/compta.lang @@ -111,7 +111,7 @@ Refund=Återbetalning SocialContributionsPayments=Betalning av sociala / skattemässiga skatter ShowVatPayment=Visa mervärdesskatteskäl TotalToPay=Totalt att betala -BalanceVisibilityDependsOnSortAndFilters=Balans är endast synlig i den här listan om tabell sorteras stigande på %s och filtreras för 1 bankkonto +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=Kundbokföringskod SupplierAccountancyCode=Vendor accounting code CustomerAccountancyCodeShort=Cust. konto. koda @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Är du säker på att du vill ta bort denna soci 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> -CalcModeDebt=Analys av kända inspelade fakturor, även om de ännu inte redovisas i huvudboken. +CalcModeDebt=Analysis of known recorded documents even if they are not yet accounted in ledger. CalcModeEngagement=Analys av kända registrerade betalningar, även om de ännu inte är redovisade i huvudboken. CalcModeBookkeeping=Analys av data bokförd i huvudboken. CalcModeLT1= <b>Läge% SRE på kundfakturor - leverantörerna fakturerar% s</b> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Överskott av intäkter och kostnader, årliga samm AnnualByCompanies=Inkomst- och utgiftsbalans, enligt fördefinierade konton AnnualByCompaniesDueDebtMode=Balans av intäkter och kostnader, detalj av fördefinierade grupper, läge <b> %sClaims-Debts%s </b> sa <b> Åtagandebetalning </b>. AnnualByCompaniesInputOutputMode=Balance of income and expenses, detail by predefined groups, mode <b>%sIncomes-Expenses%s</b> said <b>cash accounting</b>. -SeeReportInInputOutputMode=Se %sanalys av payments%s för en beräkning av faktiska betalningar som gjorts även om de ännu inte är redovisade i huvudboken. -SeeReportInDueDebtMode=Se %sanalys av fakturor%s för en beräkning baserad på kända inspelade fakturor, även om de ännu inte är redovisade i huvudboken. -SeeReportInBookkeepingMode=Se <b> %sBokföringsrapport%s </b> för en beräkning på <b> Bokföring huvudboken tabell </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=- Belopp som visas är med alla skatter inkluderade 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=- Det inkluderar de reala betalningarna på fakturor, utgifter, moms och löner. <br> - Det baseras på fakturadatum för fakturor, utgifter, moms och löner. Donationsdatum för donation. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=Det visar rekord i din huvudboken med bokför SeePageForSetup=Se meny <a href="%s"> %s </a> för installation DepositsAreNotIncluded=- Betalningsfakturor ingår ej DepositsAreIncluded=- Betalningsfakturor ingår +LT1ReportByMonth=Tax 2 report by month +LT2ReportByMonth=Tax 3 report by month LT1ReportByCustomers=Rapportera skatt 2 av tredje part LT2ReportByCustomers=Rapportera skatt 3 av tredje part LT1ReportByCustomersES=Rapport från tredje part RE LT2ReportByCustomersES=Rapport från tredje part IRPF VATReport=Försäljningsskatterapport VATReportByPeriods=Försäljningsskattrapport per period +VATReportByMonth=Sale tax report by month VATReportByRates=Försäljningsskattrapport enligt priser VATReportByThirdParties=Försäljningsskattrapport från tredje part VATReportByCustomers=Försäljningsskatt rapport från kund diff --git a/htdocs/langs/sv_SE/cron.lang b/htdocs/langs/sv_SE/cron.lang index a8a025d1345..05f3017600e 100644 --- a/htdocs/langs/sv_SE/cron.lang +++ b/htdocs/langs/sv_SE/cron.lang @@ -7,13 +7,14 @@ Permission23103 = Radera schemalagt jobb Permission23104 = Utför schemalagt jobb # Admin CronSetup=Planerad jobbhantering installation -URLToLaunchCronJobs=URL för att kontrollera och starta kvalificerade cron-jobb -OrToLaunchASpecificJob=Eller för att kontrollera och starta ett specifikt arbete +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=Säkerhetsnyckel för URL för att lansera cron-jobb FileToLaunchCronJobs=Kommandorad för att kontrollera och starta kvalificerade cron-jobb CronExplainHowToRunUnix=I en Unix-miljö bör följande rad läggas i crontab så kommandot exekveras var 5:e minut. CronExplainHowToRunWin=I Microsoft (tm) Windows-miljö kan du använda Schemalagda uppgiftsverktyg för att köra kommandoraden var 5: e minut CronMethodDoesNotExists=Klass %s innehåller ingen metod %s +CronMethodNotAllowed=Method %s of class %s is in blacklist of forbidden methods CronJobDefDesc=Cron-jobbprofiler definieras i modulbeskrivningsfilen. När modulen är aktiverad laddas de och är tillgängliga så att du kan administrera jobben från adminverktygsmenyn %s. CronJobProfiles=Förteckning över fördefinierade cron jobbprofiler # Menu @@ -42,10 +43,11 @@ CronModule=Modul CronNoJobs=Inga jobb registrerade CronPriority=Prioritet CronLabel=Etikett -CronNbRun=Antal lanseringar +CronNbRun=Number of launches CronMaxRun=Maximalt antal lanseringar CronEach=Varje JobFinished=Job lanserad och klar +Scheduled=Scheduled #Page card CronAdd= Lägg till jobb CronEvery=Utför jobbet vardera @@ -56,7 +58,7 @@ CronNote=Kommentar CronFieldMandatory=Fält %s är obligatoriskt CronErrEndDateStartDt=Slutdatum kan inte vara före startdatum StatusAtInstall=Status vid modulinstallation -CronStatusActiveBtn=Aktivera +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Inaktivera CronTaskInactive=Det här jobbet är avaktiverat CronId=Id @@ -76,8 +78,14 @@ CronType_method=Samtalsmetod för en PHP-klass CronType_command=Skalkommando CronCannotLoadClass=Kan inte ladda klassfilen %s (för att använda klass %s) CronCannotLoadObject=Klassfilen %s laddades, men objektet %s kunde inte hittas i det -UseMenuModuleToolsToAddCronJobs=Gå till menyn "Hem - Adminverktyg - Schemalagda jobb" för att se och redigera schemalagda jobb. +UseMenuModuleToolsToAddCronJobs=Go into menu "<a href="%s">Home - Admin tools - Scheduled jobs</a>" to see and edit scheduled jobs. JobDisabled=Jobb inaktiverat MakeLocalDatabaseDumpShort=Lokal databas säkerhetskopia MakeLocalDatabaseDump=Skapa en lokal databasdump. Parametrarna är: komprimering ('gz' eller 'bz' eller 'none'), säkerhetskopieringstyp ('mysql', 'pgsql', 'auto'), 1, 'auto' eller filnamn att bygga, antal backupfiler för att hålla WarningCronDelayed=Uppmärksamhet, för prestationsändamål, vad som än är nästa datum för utförande av aktiverade jobb, kan dina jobb försenas till högst %s timmar innan de körs. +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/sv_SE/errors.lang b/htdocs/langs/sv_SE/errors.lang index feca0db02b2..0ec329c972d 100644 --- a/htdocs/langs/sv_SE/errors.lang +++ b/htdocs/langs/sv_SE/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=Inget fel # Errors ErrorButCommitIsDone=Fel hittades men vi bekräfta trots detta ErrorBadEMail=E-post %s är fel +ErrorBadMXDomain=Email %s seems wrong (domain has no valid MX record) ErrorBadUrl=Url %s är fel ErrorBadValueForParamNotAString=Dåligt värde för din parameter. Det lägger till i allmänhet när översättning saknas. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=Logga %s finns redan. ErrorGroupAlreadyExists=Grupp %s finns redan. ErrorRecordNotFound=Spela in hittades inte. @@ -48,6 +50,7 @@ ErrorFieldsRequired=Vissa obligatoriska fält inte fylls. ErrorSubjectIsRequired=E-postämnet krävs ErrorFailedToCreateDir=Misslyckades med att skapa en katalog. Kontrollera att webbservern användaren har rättigheter att skriva till Dolibarr dokument katalogen. Om parametern <b>safe_mode</b> är aktiv på PHP, kontrollera att Dolibarr php-filer äger till webbserver användare (eller grupp). ErrorNoMailDefinedForThisUser=Ingen post definierats för denna användare +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=Denna funktion måste ha Javascript vara aktiverat för att arbeta. Ändra detta i inställning - displayen. ErrorTopMenuMustHaveAParentWithId0=En meny av typen &quot;Top&quot; kan inte ha en förälder meny. Sätt 0 i överordnade menyn eller välja en meny av typen &quot;Vänster&quot;. ErrorLeftMenuMustHaveAParentId=En meny av typen &quot;Vänster&quot; måste ha en förälder id. @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=Detta profilnamn finns redan för denna export. ErrorLDAPSetupNotComplete=Dolibarr-LDAP matchning inte är fullständig. ErrorLDAPMakeManualTest=A. LDIF filen har genererats i katalogen %s. Försök att läsa in den manuellt från kommandoraden för att få mer information om fel. ErrorCantSaveADoneUserWithZeroPercentage=Kan inte spara en åtgärd med "status inte startad" om fältet "gjort av" också är fyllt. -ErrorRefAlreadyExists=Ref används för att skapa finns redan. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorPleaseTypeBankTransactionReportName=Var god ange kontoutdragsnamnet där posten ska rapporteras ErrorRecordHasChildren=Misslyckades med att radera rekord eftersom det har några barnrekord. ErrorRecordHasAtLeastOneChildOfType=Objektet har minst ett barn av typ %s @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=Du måste välja om artikeln är ErrorDiscountLargerThanRemainToPaySplitItBefore=Den rabatt du försöker att tillämpa är större än förblir att betala. Dela rabatten i 2 mindre rabatter före. ErrorFileNotFoundWithSharedLink=Filen hittades inte. Det kan hända att dela nyckeln ändrades eller filen togs bort nyligen. ErrorProductBarCodeAlreadyExists=Produktens streckkod %s finns redan på en annan produktreferens. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Observera också att det är inte möjligt att använda en virtuell produkt för automatisk ökning / minskning av underprodukt när minst en underprodukt (eller delprodukt av underprodukter) behöver ett serienummer / lotnummer. +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=Beskrivning är obligatorisk för linjer med fri produkt ErrorAPageWithThisNameOrAliasAlreadyExists=Sidan / behållaren <strong> %s </strong> har samma namn eller alternativ alias som den du försöker använda ErrorDuringChartLoad=Fel vid inmatning av kontoplan. Om några konton inte laddades, kan du fortfarande skriva in dem manuellt. @@ -243,6 +246,16 @@ 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 + # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=Ett lösenord har ställts för den här medlemmen. Men inget användarkonto skapades. Så det här lösenordet är lagrat men kan inte användas för att logga in till Dolibarr. Den kan användas av en extern modul / gränssnitt men om du inte behöver definiera någon inloggning eller ett lösenord för en medlem kan du inaktivera alternativet "Hantera en inloggning för varje medlem" från inställningen av medlemsmodulen. Om du behöver hantera en inloggning men inte behöver något lösenord, kan du hålla fältet tomt för att undvika denna varning. Obs! Email kan också användas som inloggning om medlemmen är länkad till en användare. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Din inloggning har ändrats. För säkerh WarningAnEntryAlreadyExistForTransKey=Det finns redan en post för översättningsnyckeln för det här språket WarningNumberOfRecipientIsRestrictedInMassAction=Varning, antalet olika mottagare är begränsat till <b> %s </b> vid användning av massåtgärder på listor WarningDateOfLineMustBeInExpenseReportRange=Varning, datumet för raden ligger inte inom kostnadsberäkningsområdet +WarningProjectDraft=Project is still in draft mode. Don't forget to validate it if you plan to use tasks. WarningProjectClosed=Projektet är stängt. Du måste öppna den först igen. WarningSomeBankTransactionByChequeWereRemovedAfter=Some bank transaction were removed after that the receipt including them were generated. So nb of cheques and total of receipt may differ from number and total in list. -WarningFailedToAddFileIntoDatabaseIndex=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/sv_SE/exports.lang b/htdocs/langs/sv_SE/exports.lang index cd841c26648..445763abcf0 100644 --- a/htdocs/langs/sv_SE/exports.lang +++ b/htdocs/langs/sv_SE/exports.lang @@ -26,6 +26,8 @@ FieldTitle=Fält titel NowClickToGenerateToBuildExportFile=Välj nu filformatet i kombinationsrutan och klicka på "Generera" för att bygga exportfilen ... AvailableFormats=Tillgängliga format LibraryShort=Bibliotek +ExportCsvSeparator=Csv caracter separator +ImportCsvSeparator=Csv caracter separator Step=Steg FormatedImport=Importassistent FormatedImportDesc1=Den här modulen låter dig uppdatera befintliga data eller lägga till nya objekt i databasen från en fil utan teknisk kunskap, med hjälp av en assistent. @@ -131,3 +133,4 @@ KeysToUseForUpdates=Nyckel (kolumn) som ska användas för <b> uppdatering av </ NbInsert=Antal infogade rader: %s NbUpdate=Antal uppdaterade rader: %s MultipleRecordFoundWithTheseFilters=Flera poster har hittats med dessa filter: %s +StocksWithBatch=Stocks and location (warehouse) of products with batch/serial number diff --git a/htdocs/langs/sv_SE/mails.lang b/htdocs/langs/sv_SE/mails.lang index ae4c2707259..d7d01c9a7eb 100644 --- a/htdocs/langs/sv_SE/mails.lang +++ b/htdocs/langs/sv_SE/mails.lang @@ -92,6 +92,7 @@ MailingModuleDescEmailsFromUser=E-postmeddelanden inskrivna av användaren MailingModuleDescDolibarrUsers=Användare med e-post MailingModuleDescThirdPartiesByCategories=Tredje part (enligt kategorier) SendingFromWebInterfaceIsNotAllowed=Skicka från webbgränssnitt är inte tillåtet. +EmailCollectorFilterDesc=All filters must match to have an email being collected # Libelle des modules de liste de destinataires mailing LineInFile=Line %s i filen @@ -125,12 +126,13 @@ TagMailtoEmail=Mottagar Email (inklusive html "mailto:" länk) NoEmailSentBadSenderOrRecipientEmail=Ingen email skickad. Dålig avsändare eller mottagarens e-postadress. Verifiera användarprofil. # Module Notifications Notifications=Anmälningar -NoNotificationsWillBeSent=Inga e-postmeddelanden planeras för detta evenemang och företag -ANotificationsWillBeSent=En anmälan kommer att skickas via e-post -SomeNotificationsWillBeSent=%s anmälningar kommer att skickas via e-post -AddNewNotification=Aktivera ett nytt e-postmeddelandemål / -händelse -ListOfActiveNotifications=Lista alla aktiva mål / händelser för e-postmeddelande -ListOfNotificationsDone=Lista alla e-postmeddelanden skickas +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=Konfiguration av e-post att skicka har ställts in till "% s". Detta läge kan inte användas för att skicka massutskick. MailSendSetupIs2=Du måste först gå, med ett administratörskonto, i meny% Shome - Setup - e-post% s för att ändra parameter <strong>'% s'</strong> för att använda läget "% s". Med det här läget kan du ange inställningar för SMTP-servern från din internetleverantör och använda Mass mejla funktionen. MailSendSetupIs3=Om du har några frågor om hur man ställer in din SMTP-server, kan du be att% s. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Importerad fil måste ha format <strong> email, namn, UseFormatInputEmailToTarget=Ange en sträng med format <strong> email, namn, förnamn, annat </strong> MailAdvTargetRecipients=Mottagare (avancerat urval) AdvTgtTitle=Fyll i inmatningsfält för att välja tredjepart eller kontakter / adresser som ska riktas in -AdvTgtSearchTextHelp=Använd %% som jokertecken. Till exempel för att hitta alla objekt som <b> jean, joe, jim </b>, kan du skriva <b> j%% </b>, du kan också använda; som separator för värde och använd! för utom detta värde. Till exempel <b> jean; joe; jim%%;! Jimo;! Jima% </b> kommer att rikta alla jean, joe, börja med jim men inte jimo och inte allt som börjar med jima +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=Använd intervall för att välja int eller float värde AdvTgtMinVal=Minsta värde AdvTgtMaxVal=Maximalt värde @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Skapa filter AdvTgtOrCreateNewFilter=Namn på nytt filter NoContactWithCategoryFound=Ingen kontakt / adress med en kategori hittad NoContactLinkedToThirdpartieWithCategoryFound=Ingen kontakt / adress med en kategori hittad -OutGoingEmailSetup=Utgående e-postinstallation -InGoingEmailSetup=Inkommande e-postinstallation -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Standard utgående e-postinstallation +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=Information ContactsWithThirdpartyFilter=Kontakter med filter från tredje part Unanswered=Unanswered Answered=Besvarade IsNotAnAnswer=Is not answer (initial email) IsAnAnswer=Is an answer of an initial email +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/sv_SE/main.lang b/htdocs/langs/sv_SE/main.lang index 4820abfdd05..f8603cc6238 100644 --- a/htdocs/langs/sv_SE/main.lang +++ b/htdocs/langs/sv_SE/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=Ingen mall tillgänglig för denna e-posttyp AvailableVariables=Tillgängliga substitutionsvariabler NoTranslation=Ingen översättning Translation=Översättning +CurrentTimeZone=PHP server tidszon EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria NoRecordFound=Ingen post funnen NoRecordDeleted=Ingen post borttagen NotEnoughDataYet=Inte tillräckligt med data @@ -85,6 +87,8 @@ FileWasNotUploaded=En fil är vald att bifogas, men har ännu inte laddats upp. NbOfEntries=Antal poster GoToWikiHelpPage=Läs onlinehjälp (Internet behövs) GoToHelpPage=Läs hjälpen +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Webbsida RecordSaved=Post sparades RecordDeleted=Post raderad RecordGenerated=Post skapad @@ -220,6 +224,7 @@ Value=Värde PersonalValue=Personlig värde NewObject=Ny %s NewValue=Nytt värde +OldValue=Old value %s CurrentValue=Aktuellt värde Code=Kod Type=Typ @@ -433,6 +438,7 @@ RemainToPay=Fortsätt att betala Module=Modul / applikation Modules=Moduler / Applications Option=Alternativ +Filters=Filters List=Lista FullList=Fullständig lista FullConversation=Full conversation @@ -650,6 +656,7 @@ SupplierPreview=Leverantörsförhandsgranskning ShowCustomerPreview=Visa kunden förhandsgranskning ShowSupplierPreview=Visa leverantörsförhandsvisning RefCustomer=Ref. kund +InternalRef=Internal ref. Currency=Valuta InfoAdmin=Information för administratörer Undo=Ångra @@ -671,7 +678,7 @@ SendMail=Skicka e-post Email=epost NoEMail=Ingen e-post AlreadyRead=Redan läst -NotRead=Inte läst +NotRead=Unread NoMobilePhone=Ingen mobiltelefon Owner=Ägare FollowingConstantsWillBeSubstituted=Följande konstanter kommer att ersätta med motsvarande värde. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/sv_SE/members.lang b/htdocs/langs/sv_SE/members.lang index bde1806a162..848cc24cf49 100644 --- a/htdocs/langs/sv_SE/members.lang +++ b/htdocs/langs/sv_SE/members.lang @@ -32,7 +32,7 @@ DateSubscription=Teckningsdag DateEndSubscription=Prenumeration slutdatum EndSubscription=Avsluta prenumeration SubscriptionId=Prenumeration id -WithoutSubscription=Without subscription +WithoutSubscription=Utan prenumeration MemberId=Medlem id NewMember=Ny medlem MemberType=Medlem typ diff --git a/htdocs/langs/sv_SE/modulebuilder.lang b/htdocs/langs/sv_SE/modulebuilder.lang index 84447f97569..9983f774100 100644 --- a/htdocs/langs/sv_SE/modulebuilder.lang +++ b/htdocs/langs/sv_SE/modulebuilder.lang @@ -40,6 +40,7 @@ PageForCreateEditView=PHP-sida för att skapa / redigera / visa en post PageForAgendaTab=PHP-sida för händelsefliken PageForDocumentTab=PHP-sida för dokumentfliken PageForNoteTab=PHP-sida för fliken Not +PageForContactTab=PHP page for contact tab PathToModulePackage=Vägen till zip på modulen / applikationspaketet PathToModuleDocumentation=Ban till fil med modul / ansökningsdokumentation (%s) SpaceOrSpecialCharAreNotAllowed=Mellanslag eller specialtecken är inte tillåtna. @@ -77,7 +78,7 @@ IsAMeasure=Är en åtgärd DirScanned=Directory skannad NoTrigger=Ingen utlösare NoWidget=Ingen widget -GoToApiExplorer=Gå till API-explorer +GoToApiExplorer=API explorer ListOfMenusEntries=Lista över menyuppgifter ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=Lista över definierade behörigheter @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=Om du har kunskap om SQL och PHP kan du använda guiden SeeTopRightMenu=Se <span class="fa fa-bug"> </span> längst upp till höger AddLanguageFile=Lägg till språkfil YouCanUseTranslationKey=Här kan du använda en nyckel som är översättningsnyckeln i språkfilen (se fliken "Språk") -DropTableIfEmpty=(Ta bort tabellen om den är tom) +DropTableIfEmpty=(Destroy table if empty) TableDoesNotExists=Tabellen %s existerar inte TableDropped=Tabell %s utgår InitStructureFromExistingTable=Bygg strukturen array-strängen i en befintlig tabell @@ -126,7 +127,6 @@ UseSpecificEditorURL = Använd en specifik redigeringsadress UseSpecificFamily = Använd en specifik familj UseSpecificAuthor = Använd en specifik författare UseSpecificVersion = Använd en specifik första version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/sv_SE/mrp.lang b/htdocs/langs/sv_SE/mrp.lang index fb36e45f2f3..ae1796e24e4 100644 --- a/htdocs/langs/sv_SE/mrp.lang +++ b/htdocs/langs/sv_SE/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/sv_SE/other.lang b/htdocs/langs/sv_SE/other.lang index 15add067b10..1f8d1297596 100644 --- a/htdocs/langs/sv_SE/other.lang +++ b/htdocs/langs/sv_SE/other.lang @@ -5,8 +5,6 @@ Tools=Verktyg TMenuTools=Verktyg ToolsDesc=Alla verktyg som inte ingår i andra menyposter grupperas här. <br> Alla verktyg kan nås via menyn till vänster. Birthday=Födelsedag -BirthdayDate=Födelsedagsdatum -DateToBirth=Birth date BirthdayAlertOn=födelsedag alert aktiva BirthdayAlertOff=födelsedag alert inaktiv TransKey=Översättning av nyckel: TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Föregående månad (nummer 1-12) på fakturadatum TextPreviousMonthOfInvoice=Föregående månad (text) på fakturadatum NextMonthOfInvoice=Följande månad (nummer 1-12) på fakturadatum TextNextMonthOfInvoice=Följande månad (text) på fakturadatum +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip-fil genererad till <b> %s </b>. DocFileGeneratedInto=Doc-filen genereras till <b> %s </b>. JumpToLogin=Förbindelse förlorad. Gå till inloggningssidan ... @@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Utläggsrapport bekräftat (godkännande krävs) Notify_EXPENSE_REPORT_APPROVE=Kostnadsrapport godkänd Notify_HOLIDAY_VALIDATE=Lämna förfrågan bekräftat (godkännande krävs) Notify_HOLIDAY_APPROVE=Lämna förfrågan godkänd +Notify_ACTION_CREATE=Added action to Agenda SeeModuleSetup=Se inställning av modul %s NbOfAttachedFiles=Antal bifogade filer / dokument TotalSizeOfAttachedFiles=Total storlek på bifogade filer / dokument @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hej)__\n\nVänligen hitta frakt __REF__ bif PredefinedMailContentSendFichInter=__(Hej)__\n\nVänligen hitta intervention __REF__ bifogad\n\n\n__(Vänliga hälsningar)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Du kan klicka på länken nedan för att göra din betalning om den inte redan är klar.\n\n%s\n\n PredefinedMailContentGeneric=__(Hej)__\n\n\n__(Vänliga hälsningar)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendActionComm=Event reminder "__EVENT_LABEL__" on __EVENT_DATE__ at __EVENT_TIME__<br><br>This is an automatic message, please do not reply. DemoDesc=Dolibarr är en kompakt ERP / CRM som stöder flera affärsmoduler. En demo som visar alla moduler ger ingen mening eftersom detta scenario aldrig uppstår (flera hundra tillgängliga). Det finns därför flera demoprofiler tillgängliga. ChooseYourDemoProfil=Välj den demoprofil som bäst passar dina behov ... ChooseYourDemoProfilMore=... eller bygg din egen profil <br> (manuellt modulval) @@ -214,6 +216,7 @@ EMailTextExpenseReportValidated=Kostnadsrapport %s har bekräftats. EMailTextExpenseReportApproved=Kostnadsrapport %s har godkänts. EMailTextHolidayValidated=Lämna förfrågan %s har bekräftats. EMailTextHolidayApproved=Förfrågan %s har godkänts. +EMailTextActionAdded=The action %s has been added to the Agenda. ImportedWithSet=Import dataunderlaget DolibarrNotification=Automatisk anmälan ResizeDesc=Ange nya <b>bredd</b> eller ny höjd. Förhållandet kommer att hållas under storleksändring ... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Kontakt / adress skapad via e-post samlare från ProjectCreatedByEmailCollector=Projekt skapat av e-post samlare från email MSGID %s TicketCreatedByEmailCollector=Biljett skapad av e-post samlare från 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=Export område diff --git a/htdocs/langs/sv_SE/products.lang b/htdocs/langs/sv_SE/products.lang index 35ad5dd24d9..895502e8464 100644 --- a/htdocs/langs/sv_SE/products.lang +++ b/htdocs/langs/sv_SE/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Flera prissegment per produkt / tjänst (varje kund är i ett prissegment) MultiPricesNumPrices=Antal pris DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=Antal förälder förpackningsartikel @@ -167,8 +168,10 @@ BuyingPrices=Köpa priser CustomerPrices=Kundpriser SuppliersPrices=Leverantörspriser SuppliersPricesOfProductsOrServices=Leverantörspriser (av produkter eller tjänster) -CustomCode=Tull / Varu / HS-kod +CustomCode=Customs|Commodity|HS code CountryOrigin=Ursprungsland +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Nature of product (material/finished) NatureOfProductShort=Nature of product NatureOfProductDesc=Raw material or finished product @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Använd fast pris PriceByQuantity=Olika priser m.a.p. mängd DisablePriceByQty=Inaktivera priserna efter antal PriceByQuantityRange=Pris för mängdgaffel -MultipriceRules=Prissegmentregler +MultipriceRules=Automatic prices for segment UseMultipriceRules=Använd prissegmentregler (definierad i produktmoduluppsättning) för att automatiskt beräkna priser för alla andra segment enligt första segmentet PercentVariationOver=%% variation över %s PercentDiscountOver=%% rabatt över %s diff --git a/htdocs/langs/sv_SE/projects.lang b/htdocs/langs/sv_SE/projects.lang index e07fe348437..144d986172d 100644 --- a/htdocs/langs/sv_SE/projects.lang +++ b/htdocs/langs/sv_SE/projects.lang @@ -39,14 +39,14 @@ ShowProject=Visa projekt ShowTask=Visa uppgift SetProject=Ställ projekt NoProject=Inget projekt definieras eller ägs -NbOfProjects=Number of projects -NbOfTasks=Number of tasks +NbOfProjects=Antal projekt +NbOfTasks=Antal uppgifter TimeSpent=Tid som tillbringas TimeSpentByYou=Tid spenderad av dig TimeSpentByUser=Tid spenderad av användaren TimesSpent=Tid -TaskId=Task ID -RefTask=Task ref. +TaskId=UppgiftsID +RefTask=Uppgiftsreferens LabelTask=Task label TaskTimeSpent=Tid som ägnas åt uppgifter TaskTimeUser=Användare @@ -68,7 +68,7 @@ TaskDescription=Uppgiftsbeskrivning NewTask=Ny uppgift AddTask=Skapa uppgift AddTimeSpent=Skapa tid spenderad -AddHereTimeSpentForDay=Lägg till här dags tid för denna dag / uppgift +AddHereTimeSpentForDay=Lägg till här tid för denna dag / uppgift AddHereTimeSpentForWeek=Add here time spent for this week/task Activity=Aktivitet Activities=Uppgifter / aktiviteter @@ -76,18 +76,19 @@ MyActivities=Mina uppgifter / aktiviteter MyProjects=Mina projekt MyProjectsArea=Mina projektområde DurationEffective=Effektiv längd -ProgressDeclared=Förklarades framsteg +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Beräknat framsteg +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=Tid +TimeConsumed=Consumed ListOfTasks=Lista över uppgifter GoToListOfTimeConsumed=Gå till listan över tidskrävt -GanttView=Gantt View +GanttView=Gantt-vy 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 diff --git a/htdocs/langs/sv_SE/recruitment.lang b/htdocs/langs/sv_SE/recruitment.lang index a88bbbbcb31..cc983d2e347 100644 --- a/htdocs/langs/sv_SE/recruitment.lang +++ b/htdocs/langs/sv_SE/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/sv_SE/sendings.lang b/htdocs/langs/sv_SE/sendings.lang index ff472cc3f3e..c11320eba55 100644 --- a/htdocs/langs/sv_SE/sendings.lang +++ b/htdocs/langs/sv_SE/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Andra sändningar för denna beställning SendingsAndReceivingForSameOrder=Sändningar och kvitton för denna beställning SendingsToValidate=Transporter för att bekräfta StatusSendingCanceled=Annullerad +StatusSendingCanceledShort=Annullerad StatusSendingDraft=Förslag StatusSendingValidated=Bekräftat (produkter till ett fartyg eller som redan sänts) StatusSendingProcessed=Bearbetade @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=Du måste först validera ordern innan du kan g # Sending methods # ModelDocument DocumentModelTyphon=Mer komplett dokument modell för leverans intäkter (logo. ..) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Konstant EXPEDITION_ADDON_NUMBER definieras inte SumOfProductVolumes=Summan av produktvolymer SumOfProductWeights=Summan av produktvikter diff --git a/htdocs/langs/sv_SE/stocks.lang b/htdocs/langs/sv_SE/stocks.lang index f840a0301be..3979dcebd89 100644 --- a/htdocs/langs/sv_SE/stocks.lang +++ b/htdocs/langs/sv_SE/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/sv_SE/ticket.lang b/htdocs/langs/sv_SE/ticket.lang index 860b4453738..95a2fb76ef8 100644 --- a/htdocs/langs/sv_SE/ticket.lang +++ b/htdocs/langs/sv_SE/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Biljett - Typer TicketDictCategory=Biljett - Grupper TicketDictSeverity=Ticket - Severiteter TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Programfel -TicketTypeShortBUGHARD=Hårdvarufel -TicketTypeShortCOM=Kommersiell fråga +TicketTypeShortCOM=Kommersiell fråga TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Andra TicketSeverityShortLOW=Låg TicketSeverityShortNORMAL=Vanligt TicketSeverityShortHIGH=Hög -TicketSeverityShortBLOCKING=Kritisk / Blockering +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Fältet '%s' felaktigt MenuTicketMyAssign=Mina biljetter @@ -60,7 +58,6 @@ OriginEmail=E-postkälla Notify_TICKET_SENTBYMAIL=Skicka biljettmeddelande via e-post # Status -NotRead=Inte läst Read=Läsa Assigned=Tilldelad InProgress=Pågående @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Offentligt gränssnitt tillåter alla besöka TicketsAutoAssignTicket=Tilldela automatiskt användaren som skapade biljetten TicketsAutoAssignTicketHelp=När du skapar en biljett kan användaren automatiskt tilldelas biljetten. 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status ändrad: %s till %s TicketNotNotifyTiersAtCreate=Meddela inte företaget på create Unread=Oläst TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/sv_SE/website.lang b/htdocs/langs/sv_SE/website.lang index 7770506abfb..e04af80c19a 100644 --- a/htdocs/langs/sv_SE/website.lang +++ b/htdocs/langs/sv_SE/website.lang @@ -30,7 +30,6 @@ EditInLine=Redigera inline AddWebsite=Lägg till webbplats Webpage=Webbsida / container AddPage=Lägg till sida / behållare -HomePage=Webbsida PageContainer=Sida PreviewOfSiteNotYetAvailable=Förhandsgranskning av din webbplats <strong> %s </strong> ej tillgänglig än. Du måste först '<strong> Importera en fullständig webbplatsmall </strong>' eller bara '<strong> Lägg till en sida / behållare </strong>'. RequestedPageHasNoContentYet=Den begärda sidan med id %s har inget innehåll ännu, eller cachefilen .tpl.php har tagits bort. Redigera innehållet på sidan för att lösa detta. @@ -101,7 +100,7 @@ EmptyPage=Tom sida ExternalURLMustStartWithHttp=Extern webbadress måste börja med http: // eller https: // ZipOfWebsitePackageToImport=Upload the Zip file of the website template package ZipOfWebsitePackageToLoad=or Choose an available embedded website template package -ShowSubcontainers=Inkludera dynamiskt innehåll +ShowSubcontainers=Show dynamic content InternalURLOfPage=Intern webbadress ThisPageIsTranslationOf=Den här sidan / behållaren är en översättning av ThisPageHasTranslationPages=Den här sidan / behållaren har översättning @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/sv_SE/withdrawals.lang b/htdocs/langs/sv_SE/withdrawals.lang index 4b18e747ab8..e1aa6c99928 100644 --- a/htdocs/langs/sv_SE/withdrawals.lang +++ b/htdocs/langs/sv_SE/withdrawals.lang @@ -42,6 +42,7 @@ LastWithdrawalReceipt=Senaste %s direktavköpsintäkterna MakeWithdrawRequest=Gör en förskottsbetalningsförfrågan MakeBankTransferOrder=Make a credit transfer request WithdrawRequestsDone=%s begärda betalningsförfrågningar +BankTransferRequestsDone=%s credit transfer requests recorded ThirdPartyBankCode=Tredjeparts bankkod NoInvoiceCouldBeWithdrawed=Ingen faktura debiteras framgångsrikt. Kontrollera att fakturor är på företag med en giltig IBAN och att IBAN har en UMR (Unique Mandate Reference) med läget <strong> %s </strong>. ClassCredited=Märk krediterad @@ -131,7 +132,8 @@ SEPARCUR=SEPA CUR SEPAFRST=SEPA FRST ExecutionDate=Exekveringsdatum CreateForSepa=Skapa direkt debitfil -ICS=Krediteridentifierare CI +ICS=Creditor Identifier CI for direct debit +ICSTransfer=Creditor Identifier CI for bank transfer END_TO_END="EndToEndId" SEPA XML-tagg - Unikt ID tilldelat per transaktion USTRD="Ostrukturerad" SEPA XML-tagg ADDDAYS=Lägg till dagar till Exekveringsdatum @@ -146,3 +148,5 @@ InfoRejectSubject=Betalningsordern vägrade InfoRejectMessage=Hej, <br> <br> Betalningsordern för fakturan %s relaterad till företaget %s, med ett belopp på %s, har vägrats av banken. <br> <br> - <br> %s ModeWarning=Alternativ på riktigt läget inte var satt, sluta vi efter denna simulering ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorICSmissing=Missing ICS in Bank account %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/sv_SE/workflow.lang b/htdocs/langs/sv_SE/workflow.lang index 6ae9ed67c3b..55f87b7d0d3 100644 --- a/htdocs/langs/sv_SE/workflow.lang +++ b/htdocs/langs/sv_SE/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=Automatisk skapande AutomaticClassification=Automatisk uppmärkning +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/sw_SW/accountancy.lang b/htdocs/langs/sw_SW/accountancy.lang index 3211a0b62df..9e084932477 100644 --- a/htdocs/langs/sw_SW/accountancy.lang +++ b/htdocs/langs/sw_SW/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Date Docref=Reference LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/sw_SW/admin.lang b/htdocs/langs/sw_SW/admin.lang index f1c41a3b62b..f9a6468d94a 100644 --- a/htdocs/langs/sw_SW/admin.lang +++ b/htdocs/langs/sw_SW/admin.lang @@ -56,6 +56,8 @@ 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. @@ -85,7 +87,6 @@ ShowPreview=Show preview ShowHideDetails=Show-Hide details PreviewNotAvailable=Preview not available ThemeCurrentlyActive=Theme currently active -CurrentTimeZone=TimeZone PHP (server) MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Dates are stored and returned by database server as if they were kept as submitted string. The timezone has effect only when using the UNIX_TIMESTAMP function (that should not be used by Dolibarr, so database TZ should have no effect, even if changed after data was entered). Space=Space @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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. @@ -256,6 +257,7 @@ 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. @@ -375,7 +377,7 @@ 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:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +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 @@ -406,7 +408,7 @@ UrlGenerationParameters=Parameters to secure URLs SecurityTokenIsUnique=Use a unique securekey parameter for each URL EnterRefToBuildUrl=Enter reference for object %s GetSecuredUrl=Get calculated URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +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 @@ -668,7 +670,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 @@ -1306,7 +1308,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,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 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=New menu MenuHandler=Menu handler MenuModule=Source module -HideUnauthorizedMenu= Hide unauthorized menus (gray) +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 @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/sw_SW/banks.lang b/htdocs/langs/sw_SW/banks.lang index 9500a5b8b2e..81a23238550 100644 --- a/htdocs/langs/sw_SW/banks.lang +++ b/htdocs/langs/sw_SW/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/sw_SW/blockedlog.lang b/htdocs/langs/sw_SW/blockedlog.lang index 5afae6e9e53..0bba5605d0f 100644 --- a/htdocs/langs/sw_SW/blockedlog.lang +++ b/htdocs/langs/sw_SW/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/sw_SW/boxes.lang b/htdocs/langs/sw_SW/boxes.lang index d6fd298a3a7..9a751483fb1 100644 --- a/htdocs/langs/sw_SW/boxes.lang +++ b/htdocs/langs/sw_SW/boxes.lang @@ -46,9 +46,12 @@ 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. @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Accountancy +ValidatedProjects=Validated projects diff --git a/htdocs/langs/sw_SW/cashdesk.lang b/htdocs/langs/sw_SW/cashdesk.lang index 498baa82200..3fef645d99d 100644 --- a/htdocs/langs/sw_SW/cashdesk.lang +++ b/htdocs/langs/sw_SW/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +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 @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/sw_SW/categories.lang b/htdocs/langs/sw_SW/categories.lang index ba37a43b4ec..4ddf0d6093f 100644 --- a/htdocs/langs/sw_SW/categories.lang +++ b/htdocs/langs/sw_SW/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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 diff --git a/htdocs/langs/sw_SW/companies.lang b/htdocs/langs/sw_SW/companies.lang index dadff6a7894..8dc815b522e 100644 --- a/htdocs/langs/sw_SW/companies.lang +++ b/htdocs/langs/sw_SW/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi 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=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=Potential diff --git a/htdocs/langs/sw_SW/compta.lang b/htdocs/langs/sw_SW/compta.lang index 8f4f058bb87..1afeb6e3727 100644 --- a/htdocs/langs/sw_SW/compta.lang +++ b/htdocs/langs/sw_SW/compta.lang @@ -111,7 +111,7 @@ 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 ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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 diff --git a/htdocs/langs/sw_SW/cron.lang b/htdocs/langs/sw_SW/cron.lang index d2da7ded67e..2ebdda1e685 100644 --- a/htdocs/langs/sw_SW/cron.lang +++ b/htdocs/langs/sw_SW/cron.lang @@ -6,14 +6,15 @@ 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 -OrToLaunchASpecificJob=Or to check and launch a specific job +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 environement you can use Scheduled task tools 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 @@ -42,10 +43,11 @@ CronModule=Module CronNoJobs=No jobs registered CronPriority=Priority CronLabel=Label -CronNbRun=Nb. launch -CronMaxRun=Max number launch +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 @@ -56,16 +58,16 @@ CronNote=Comment CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Enable +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 exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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 @@ -76,8 +78,14 @@ 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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +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' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/sw_SW/errors.lang b/htdocs/langs/sw_SW/errors.lang index 893f4a35b65..5b26be724d9 100644 --- a/htdocs/langs/sw_SW/errors.lang +++ b/htdocs/langs/sw_SW/errors.lang @@ -5,8 +5,10 @@ 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. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ 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=Ref used for creation already exists. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/sw_SW/exports.lang b/htdocs/langs/sw_SW/exports.lang index 2dcf4317e00..a0eb7161ef2 100644 --- a/htdocs/langs/sw_SW/exports.lang +++ b/htdocs/langs/sw_SW/exports.lang @@ -26,6 +26,8 @@ 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. @@ -131,3 +133,4 @@ 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/sw_SW/mails.lang b/htdocs/langs/sw_SW/mails.lang index 1235eef3b27..2d02c5ddcf9 100644 --- a/htdocs/langs/sw_SW/mails.lang +++ b/htdocs/langs/sw_SW/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Notifications -NoNotificationsWillBeSent=No email notifications are planned for this event and company -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent +NotificationsAuto=Notifications Auto. +NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company +ANotificationsWillBeSent=1 automatic notification will be sent by email +SomeNotificationsWillBeSent=%s automatic notifications will be sent by email +AddNewNotification=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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +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/sw_SW/main.lang b/htdocs/langs/sw_SW/main.lang index 96c68cdcfa3..f8ba6f4073c 100644 --- a/htdocs/langs/sw_SW/main.lang +++ b/htdocs/langs/sw_SW/main.lang @@ -28,7 +28,9 @@ 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 @@ -85,6 +87,8 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C 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 @@ -220,6 +224,7 @@ Value=Value PersonalValue=Personal value NewObject=New %s NewValue=New value +OldValue=Old value %s CurrentValue=Current value Code=Code Type=Type @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Option +Filters=Filters List=List FullList=Full list FullConversation=Full conversation @@ -650,6 +656,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 @@ -671,7 +678,7 @@ SendMail=Send email Email=Email NoEMail=No email AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=No mobile phone Owner=Owner FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/sw_SW/modulebuilder.lang b/htdocs/langs/sw_SW/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/sw_SW/modulebuilder.lang +++ b/htdocs/langs/sw_SW/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/sw_SW/mrp.lang b/htdocs/langs/sw_SW/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/sw_SW/mrp.lang +++ b/htdocs/langs/sw_SW/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/sw_SW/other.lang b/htdocs/langs/sw_SW/other.lang index 54c0572d453..7a895bb1ca5 100644 --- a/htdocs/langs/sw_SW/other.lang +++ b/htdocs/langs/sw_SW/other.lang @@ -5,8 +5,6 @@ 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 -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Right CalculatedWeight=Calculated weight CalculatedVolume=Calculated volume Weight=Weight -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/sw_SW/products.lang b/htdocs/langs/sw_SW/products.lang index 97db059594f..9ecc11ed93d 100644 --- a/htdocs/langs/sw_SW/products.lang +++ b/htdocs/langs/sw_SW/products.lang @@ -108,7 +108,8 @@ 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=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +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 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/sw_SW/projects.lang b/htdocs/langs/sw_SW/projects.lang index baf0ecde17f..05aa1f5a560 100644 --- a/htdocs/langs/sw_SW/projects.lang +++ b/htdocs/langs/sw_SW/projects.lang @@ -76,15 +76,16 @@ MyActivities=My tasks/activities MyProjects=My projects MyProjectsArea=My projects Area DurationEffective=Effective duration -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Time +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/sw_SW/recruitment.lang b/htdocs/langs/sw_SW/recruitment.lang index b775e78552e..437445f25dc 100644 --- a/htdocs/langs/sw_SW/recruitment.lang +++ b/htdocs/langs/sw_SW/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/sw_SW/sendings.lang b/htdocs/langs/sw_SW/sendings.lang index 5ce3b7f67e9..73bd9aebd42 100644 --- a/htdocs/langs/sw_SW/sendings.lang +++ b/htdocs/langs/sw_SW/sendings.lang @@ -30,6 +30,7 @@ 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 @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=More complete document model for delivery receipts (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/sw_SW/stocks.lang b/htdocs/langs/sw_SW/stocks.lang index 660443bcded..a1f55010139 100644 --- a/htdocs/langs/sw_SW/stocks.lang +++ b/htdocs/langs/sw_SW/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/sw_SW/ticket.lang b/htdocs/langs/sw_SW/ticket.lang index 59519282c80..982fff90ffa 100644 --- a/htdocs/langs/sw_SW/ticket.lang +++ b/htdocs/langs/sw_SW/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Other TicketSeverityShortLOW=Low TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=High -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Read Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/sw_SW/website.lang b/htdocs/langs/sw_SW/website.lang index 03e042e4be6..f17def114b8 100644 --- a/htdocs/langs/sw_SW/website.lang +++ b/htdocs/langs/sw_SW/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/sw_SW/withdrawals.lang b/htdocs/langs/sw_SW/withdrawals.lang index 114a8d9dd6c..059b3451c11 100644 --- a/htdocs/langs/sw_SW/withdrawals.lang +++ b/htdocs/langs/sw_SW/withdrawals.lang @@ -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>. ClassCredited=Classify credited @@ -131,7 +132,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,3 +148,5 @@ 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/sw_SW/workflow.lang b/htdocs/langs/sw_SW/workflow.lang index 299be277e1d..494a0424a75 100644 --- a/htdocs/langs/sw_SW/workflow.lang +++ b/htdocs/langs/sw_SW/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 diff --git a/htdocs/langs/th_TH/accountancy.lang b/htdocs/langs/th_TH/accountancy.lang index 4c4d303f11c..6755dca4379 100644 --- a/htdocs/langs/th_TH/accountancy.lang +++ b/htdocs/langs/th_TH/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=วันที่ Docref=การอ้างอิง LabelAccount=บัญชีฉลาก LabelOperation=Label operation -Sens=ซองส์ +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=วารสาร @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/th_TH/admin.lang b/htdocs/langs/th_TH/admin.lang index c50cf3e78cf..b816ace6628 100644 --- a/htdocs/langs/th_TH/admin.lang +++ b/htdocs/langs/th_TH/admin.lang @@ -56,6 +56,8 @@ GUISetup=แสดง SetupArea=การติดตั้ง UploadNewTemplate=Upload new template(s) FormToTestFileUploadForm=แบบทดสอบการอัปโหลดไฟล์ (ตามการตั้งค่า) +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled 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. @@ -85,7 +87,6 @@ ShowPreview=แสดงตัวอย่าง ShowHideDetails=Show-Hide details PreviewNotAvailable=ตัวอย่างที่ไม่สามารถใช้ได้ ThemeCurrentlyActive=รูปแบบที่ใช้งานอยู่ในปัจจุบัน -CurrentTimeZone=เขต PHP (เซิร์ฟเวอร์) MySQLTimeZone=เขตฐาน (ฐานข้อมูล) 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=ช่องว่าง @@ -153,8 +154,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=Delete log files, including <b>%s</b> defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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=No directory or files to delete. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=พาร์ทเนอร์ที่ต้อง OtherResources=Other resources ExternalResources=External Resources SocialNetworks=Social Networks +SocialNetworkId=Social Network 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> HelpCenterDesc1=Here are some resources for getting help and support with Dolibarr. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Examples with current configuration ListOfDirectories=รายการ 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=ตัวอย่างของไวยากรณ์: <br> C: \\ mydir <br> / home / mydir <br> DOL_DATA_ROOT / ECM / ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br> หากต้องการทราบวิธีการสร้างเอกสารของคุณ ODT แม่ก่อนที่จะเก็บไว้ในไดเรกทอรีเหล่านั้นอ่านเอกสารวิกิพีเดีย: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=ตำแหน่งชื่อ / นามสกุล @@ -406,7 +408,7 @@ UrlGenerationParameters=พารามิเตอร์ URL ที่การ SecurityTokenIsUnique=ใช้พารามิเตอร์ SecureKey ไม่ซ้ำกันสำหรับแต่ละ URL EnterRefToBuildUrl=ป้อนการอ้างอิงสำหรับวัตถุ% s GetSecuredUrl=รับ URL คำนวณ -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) OldVATRates=อัตราภาษีมูลค่าเพิ่มเก่า NewVATRates=ใหม่อัตราภาษีมูลค่าเพิ่ม PriceBaseTypeToChange=การปรับเปลี่ยนราคาค่าอ้างอิงกับฐานที่กำหนดไว้ใน @@ -668,7 +670,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=อัตรากำไรขั้นต้น -Module59000Desc=โมดูลการจัดการอัตรากำไรขั้นต้น +Module59000Desc=Module to follow margins Module60000Name=คณะกรรมการ Module60000Desc=โมดูลการจัดการค่าคอมมิชชั่น Module62000Name=Incoterms @@ -1306,7 +1308,7 @@ 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=ค้นหาการเพิ่มประสิทธิภาพ -YouHaveXObjectUseSearchOptim=You have %s %s in the database. You should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,13 @@ ServiceSetup=บริการติดตั้งโมดูล ProductServiceSetup=ผลิตภัณฑ์และบริการการติดตั้งโมดูล 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=เปิดใช้งานในผลิตภัณฑ์ / บริการที่แนบมาไฟล์ที่แท็บตัวเลือกที่จะผสานเอกสาร PDF สินค้ากับข้อเสนอในรูปแบบ PDF azur หากผลิตภัณฑ์ / บริการที่อยู่ในข้อเสนอ -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=ประเภทบาร์โค้ดเริ่มต้นที่จะใช้สำหรับผลิตภัณฑ์ @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=เมนูใหม่ MenuHandler=จัดการเมนู MenuModule=โมดูลที่มา -HideUnauthorizedMenu= ซ่อนเมนูไม่ได้รับอนุญาต (สีเทา) +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=เมนู Id DetailMenuHandler=จัดการเมนูที่จะแสดงเมนูใหม่ DetailMenuModule=ชื่อโมดูลถ้ารายการเมนูมาจากโมดูล @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=ไปรษณีย์ MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/th_TH/banks.lang b/htdocs/langs/th_TH/banks.lang index fd3ab8f2696..0a547bb3422 100644 --- a/htdocs/langs/th_TH/banks.lang +++ b/htdocs/langs/th_TH/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/th_TH/blockedlog.lang b/htdocs/langs/th_TH/blockedlog.lang index 88511cd5fbd..1b2467dcb5e 100644 --- a/htdocs/langs/th_TH/blockedlog.lang +++ b/htdocs/langs/th_TH/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/th_TH/boxes.lang b/htdocs/langs/th_TH/boxes.lang index 48979414509..f51f0e660fa 100644 --- a/htdocs/langs/th_TH/boxes.lang +++ b/htdocs/langs/th_TH/boxes.lang @@ -46,9 +46,12 @@ 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 +BoxScheduledJobs=งานที่กำหนดเวลาไว้ +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Failed to refresh RSS flux. Latest successful refresh date: %s LastRefreshDate=Latest refresh date NoRecordedBookmarks=บุ๊คมาร์คไม่มีกำหนด @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=การบัญชี +ValidatedProjects=Validated projects diff --git a/htdocs/langs/th_TH/cashdesk.lang b/htdocs/langs/th_TH/cashdesk.lang index ec6eefe89a4..7dee305ab80 100644 --- a/htdocs/langs/th_TH/cashdesk.lang +++ b/htdocs/langs/th_TH/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=nb ของใบแจ้งหนี้ Paymentnumpad=Type of Pad to enter payment Numberspad=Numbers Pad @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/th_TH/categories.lang b/htdocs/langs/th_TH/categories.lang index 1e978741186..e61138aee8e 100644 --- a/htdocs/langs/th_TH/categories.lang +++ b/htdocs/langs/th_TH/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=Projects tags/categories area UsersCategoriesArea=Users tags/categories area SubCats=Sub-categories CatList=รายการของแท็ก / ประเภท +CatListAll=List of tags/categories (all types) NewCategory=แท็กใหม่ / หมวดหมู่ ModifCat=ปรับเปลี่ยนแท็ก / หมวดหมู่ CatCreated=Tag / สร้างหมวดหมู่ @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag / รหัสหมวดหมู่ -CatSupList=List of vendor tags/categories -CatCusList=รายชื่อลูกค้า / โอกาสแท็ก / ประเภท +ParentCategory=Parent tag/category +ParentCategoryLabel=Label of parent tag/category +CatSupList=List of vendors tags/categories +CatCusList=List of customers/prospects tags/categories CatProdList=รายการของแท็ก / ผลิตภัณฑ์ประเภท CatMemberList=รายชื่อสมาชิกแท็ก / ประเภท -CatContactList=รายการของแท็กติดต่อ / ประเภท -CatSupLinks=การเชื่อมโยงระหว่างซัพพลายเออร์และแท็ก / ประเภท +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=การเชื่อมโยงระหว่างลูกค้า / ลูกค้าเป้าหมาย และ แท็ก / ประเภท CatContactsLinks=Links between contacts/addresses and tags/categories CatProdLinks=การเชื่อมโยงระหว่างผลิตภัณฑ์ / บริการและแท็ก / ประเภท -CatProJectLinks=Links between projects and tags/categories +CatMembersLinks=การเชื่อมโยงระหว่างสมาชิกและแท็ก / ประเภท +CatProjectsLinks=Links between projects and tags/categories +CatUsersLinks=Links between users and tags/categories DeleteFromCat=ลบออกจากแท็ก / หมวดหมู่ ExtraFieldsCategories=คุณลักษณะที่สมบูรณ์ CategoriesSetup=แท็ก / ประเภทการติดตั้ง diff --git a/htdocs/langs/th_TH/companies.lang b/htdocs/langs/th_TH/companies.lang index 698f595ebaf..8956b27f853 100644 --- a/htdocs/langs/th_TH/companies.lang +++ b/htdocs/langs/th_TH/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi VATIntraManualCheck=You can also check manually on the European Commission website <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=ตรวจสอบไม่ได้ บริการตรวจสอบไม่ได้ให้โดยรัฐสมาชิก (% s) NorProspectNorCustomer=Not prospect, nor customer -JuridicalStatus=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=ที่อาจเกิดขึ้น diff --git a/htdocs/langs/th_TH/compta.lang b/htdocs/langs/th_TH/compta.lang index 60fe78c8f6f..a74d5c1967d 100644 --- a/htdocs/langs/th_TH/compta.lang +++ b/htdocs/langs/th_TH/compta.lang @@ -111,7 +111,7 @@ Refund=Refund SocialContributionsPayments=สังคม / การชำระเงินภาษีการคลัง ShowVatPayment=แสดงการชำระเงินภาษีมูลค่าเพิ่ม TotalToPay=ทั้งหมดที่จะต้องจ่าย -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=คุณแน่ใจหรือว่าต ExportDataset_tax_1=ภาษีสังคมและการคลังและการชำระเงิน CalcModeVATDebt=<b>โหมด% sVAT ความมุ่งมั่นบัญชี%</b> s CalcModeVATEngagement=โหมด <b>sVAT% รายได้ค่าใช้จ่าย-%</b> s -CalcModeDebt=Analysis of known recorded invoices even if they are not yet accounted in ledger. +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= <b>โหมด% Sre ในใบแจ้งหนี้ของลูกค้า - ซัพพลายเออร์ใบแจ้งหนี้% s</b> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=ความสมดุลของรายได 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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=- จํานวนเงินที่แสดงเป็นกับภาษีรวมทั้งหมด 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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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=รายงานโดยเรื่องของบุคคลที่สาม LT2ReportByCustomersES=รายงานโดยบุคคลที่สาม IRPF VATReport=Sale tax report VATReportByPeriods=Sale tax report by period +VATReportByMonth=Sale tax report by month VATReportByRates=Sale tax report by rates VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer diff --git a/htdocs/langs/th_TH/cron.lang b/htdocs/langs/th_TH/cron.lang index 85838088924..8294f683d7e 100644 --- a/htdocs/langs/th_TH/cron.lang +++ b/htdocs/langs/th_TH/cron.lang @@ -6,14 +6,15 @@ Permission23102 = สร้าง / การปรับปรุงกำห Permission23103 = ลบงานที่กำหนด Permission23104 = การดำเนินงานที่กำหนด # Admin -CronSetup= กำหนดเวลาการตั้งค่าการจัดการงาน -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=หรือเพื่อตรวจสอบและการเปิดตัวงานที่เฉพาะเจาะจง +CronSetup=กำหนดเวลาการตั้งค่าการจัดการงาน +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=กุญแจสำคัญในการรักษาความปลอดภัยสำหรับ URL ที่จะเปิดตัวงาน cron FileToLaunchCronJobs=Command line to check and launch qualified cron jobs CronExplainHowToRunUnix=ในสภาพแวดล้อมระบบปฏิบัติการยูนิกซ์ที่คุณควรใช้ crontab รายการต่อไปนี้เพื่อเรียกใช้บรรทัดคำสั่งแต่ละ 5 นาที -CronExplainHowToRunWin=ไมโครซอฟท์ (TM) ของ Windows environement คุณสามารถใช้เครื่องมือการจัดตารางงานที่จะเรียกใช้บรรทัดคำสั่งแต่ละ 5 นาที +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 @@ -42,10 +43,11 @@ CronModule=โมดูล CronNoJobs=ไม่มีงานที่ลงทะเบียน CronPriority=ลำดับความสำคัญ CronLabel=ฉลาก -CronNbRun=nb ยิง -CronMaxRun=Max number launch +CronNbRun=Number of launches +CronMaxRun=Maximum number of launches CronEach=ทุกๆ JobFinished=งานเปิดตัวและจบ +Scheduled=Scheduled #Page card CronAdd= เพิ่มงาน CronEvery=ดำเนินงานแต่ละงาน @@ -56,16 +58,16 @@ CronNote=ความเห็น CronFieldMandatory=ทุ่ง% s มีผลบังคับใช้ CronErrEndDateStartDt=วันที่สิ้นสุดไม่สามารถก่อนวันเริ่มต้น StatusAtInstall=Status at module installation -CronStatusActiveBtn=เปิดใช้งาน +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=ปิดการใช้งาน CronTaskInactive=งานนี้ถูกปิดใช้งาน CronId=Id CronClassFile=Filename with class -CronModuleHelp=Name of Dolibarr module directory (also work with external Dolibarr module). <BR> For exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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=บรรทัดคำสั่งระบบที่จะดำเนินการ CronCreateJob=สร้างงานใหม่กำหนด CronFrom=จาก @@ -76,8 +78,14 @@ CronType_method=Call method of a PHP Class CronType_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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +UseMenuModuleToolsToAddCronJobs=Go into menu "<a href="%s">Home - Admin tools - Scheduled jobs</a>" to see and edit scheduled jobs. JobDisabled=ปิดการใช้งาน MakeLocalDatabaseDumpShort=Local database backup -MakeLocalDatabaseDump=Create a local database dump. Parameters are: compression ('gz' or 'bz' or 'none'), backup type ('mysql' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/th_TH/errors.lang b/htdocs/langs/th_TH/errors.lang index 125ecf6e5b3..4de399f8493 100644 --- a/htdocs/langs/th_TH/errors.lang +++ b/htdocs/langs/th_TH/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=ไม่มีข้อผิดพลาดที่เร # Errors ErrorButCommitIsDone=พบข้อผิดพลาด แต่เราตรวจสอบอย่างไรก็ตามเรื่องนี้ ErrorBadEMail=Email %s is wrong +ErrorBadMXDomain=Email %s seems wrong (domain has no valid MX record) ErrorBadUrl=% s url ที่ไม่ถูกต้อง ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=เข้าสู่ระบบ% s อยู่แล้ว ErrorGroupAlreadyExists=s% กลุ่มที่มีอยู่แล้ว ErrorRecordNotFound=บันทึกไม่พบ @@ -48,6 +50,7 @@ ErrorFieldsRequired=ฟิลด์ที่จำเป็นบางคนไ ErrorSubjectIsRequired=The email topic is required ErrorFailedToCreateDir=ล้มเหลวในการสร้างไดเรกทอรี ตรวจสอบการใช้เว็บเซิร์ฟเวอร์ที่มีสิทธิ์ในการเขียนลงในไดเรกทอรีเอกสาร Dolibarr หาก <b>safe_mode</b> พารามิเตอร์เปิดใช้งานบน PHP นี้ตรวจสอบว่า php ไฟล์ Dolibarr เป็นเจ้าของให้กับผู้ใช้เว็บเซิร์ฟเวอร์ (หรือกลุ่ม) ErrorNoMailDefinedForThisUser=จดหมายไม่มีกำหนดไว้สำหรับผู้ใช้นี้ +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=คุณลักษณะนี้จะต้องเปิดการใช้งานได้ในการทำงาน เปลี่ยนนี้ในการตั้งค่า - การแสดงผล ErrorTopMenuMustHaveAParentWithId0=เมนูประเภทยอด 'ไม่สามารถมีเมนูปกครอง ใส่ 0 ในเมนูปกครองหรือเลือกเมนูประเภท 'ซ้าย' ErrorLeftMenuMustHaveAParentId=เมนูชนิด 'ซ้าย' ต้องมีรหัสผู้ปกครอง @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=ชื่อโปรไฟล์นี้มีอ ErrorLDAPSetupNotComplete=การจับคู่ Dolibarr-LDAP ไม่สมบูรณ์ ErrorLDAPMakeManualTest=ไฟล์ .ldif ได้รับการสร้างขึ้นในไดเรกทอรี% s พยายามที่จะโหลดได้ด้วยตนเองจากบรรทัดคำสั่งที่จะมีข้อมูลเพิ่มเติมเกี่ยวกับข้อผิดพลาด ErrorCantSaveADoneUserWithZeroPercentage=Can't save an action with "status not started" if field "done by" is also filled. -ErrorRefAlreadyExists=Ref ใช้สำหรับการสร้างที่มีอยู่แล้ว +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/th_TH/exports.lang b/htdocs/langs/th_TH/exports.lang index e7c28b1980e..4ec434b49a1 100644 --- a/htdocs/langs/th_TH/exports.lang +++ b/htdocs/langs/th_TH/exports.lang @@ -26,6 +26,8 @@ FieldTitle=ชื่อฟิลด์ NowClickToGenerateToBuildExportFile=Now, select the file format in the combo box and click on "Generate" to build the export file... AvailableFormats=Available Formats LibraryShort=ห้องสมุด +ExportCsvSeparator=Csv caracter separator +ImportCsvSeparator=Csv caracter separator 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. @@ -131,3 +133,4 @@ 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/th_TH/mails.lang b/htdocs/langs/th_TH/mails.lang index ea92de0f2ba..ae8e8b52f85 100644 --- a/htdocs/langs/th_TH/mails.lang +++ b/htdocs/langs/th_TH/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=สาย% s ในแฟ้ม @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=ส่งอีเมลไม่มี ผู้ส่งที่ไม่ดีหรืออีเมลของผู้รับ ตรวจสอบรายละเอียดของผู้ใช้ # Module Notifications Notifications=การแจ้งเตือน -NoNotificationsWillBeSent=ไม่มีการแจ้งเตือนอีเมลที่มีการวางแผนสำหรับเหตุการณ์และ บริษัท นี้ -ANotificationsWillBeSent=1 การแจ้งเตือนจะถูกส่งไปทางอีเมล -SomeNotificationsWillBeSent=% s การแจ้งเตือนจะถูกส่งไปทางอีเมล -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=รายการทั้งหมดแจ้งเตือนอีเมลที่ส่ง +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=การกำหนดค่าของการส่งอีเมล์ที่ได้รับการติดตั้งเพื่อ '% s' โหมดนี้ไม่สามารถใช้ในการส่งการส่งอีเมลมวล MailSendSetupIs2=ก่อนอื่นคุณต้องไปกับบัญชีผู้ดูแลระบบลงไปในเมนู% sHome - การติดตั้ง - อีเมล์% s จะเปลี่ยนพารามิเตอร์ <strong>'% s'</strong> เพื่อใช้โหมด '% s' ด้วยโหมดนี้คุณสามารถเข้าสู่การตั้งค่าของเซิร์ฟเวอร์ที่ให้บริการโดยผู้ให้บริการอินเทอร์เน็ตของคุณและใช้คุณลักษณะการส่งอีเมลมวล MailSendSetupIs3=หากคุณมีคำถามใด ๆ เกี่ยวกับวิธีการติดตั้งเซิร์ฟเวอร์ของคุณคุณสามารถขอให้% s @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=ข้อมูล ContactsWithThirdpartyFilter=Contacts with third-party filter Unanswered=Unanswered Answered=Answered IsNotAnAnswer=Is not answer (initial email) IsAnAnswer=Is an answer of an initial email +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/th_TH/main.lang b/htdocs/langs/th_TH/main.lang index 71d84671325..62d14790365 100644 --- a/htdocs/langs/th_TH/main.lang +++ b/htdocs/langs/th_TH/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=No template available for this email type AvailableVariables=Available substitution variables NoTranslation=แปลไม่มี Translation=การแปล +CurrentTimeZone=เขต PHP (เซิร์ฟเวอร์) EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria NoRecordFound=บันทึกไม่พบ NoRecordDeleted=No record deleted NotEnoughDataYet=Not enough data @@ -85,6 +87,8 @@ FileWasNotUploaded=ไฟล์ที่ถูกเลือกสำหรั NbOfEntries=No. of entries GoToWikiHelpPage=อ่านความช่วยเหลือออนไลน์ (อินเทอร์เน็ตจำเป็น) GoToHelpPage=อ่านความช่วยเหลือ +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Home Page RecordSaved=บันทึกที่บันทึกไว้ RecordDeleted=บันทึกลบ RecordGenerated=Record generated @@ -220,6 +224,7 @@ Value=มูลค่า PersonalValue=ค่าส่วนบุคคล NewObject=New %s NewValue=ค่าใหม่ +OldValue=Old value %s CurrentValue=มูลค่าปัจจุบัน Code=รหัส Type=ชนิด @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=ตัวเลือก +Filters=Filters List=รายการ FullList=รายการเต็มรูปแบบ FullConversation=Full conversation @@ -650,6 +656,7 @@ SupplierPreview=Vendor preview ShowCustomerPreview=แสดงตัวอย่างของลูกค้า ShowSupplierPreview=Show vendor preview RefCustomer=อ้าง ลูกค้า +InternalRef=Internal ref. Currency=เงินตรา InfoAdmin=ข้อมูลสำหรับผู้ดูแล Undo=แก้ @@ -671,7 +678,7 @@ SendMail=ส่งอีเมล Email=อีเมล์ NoEMail=ไม่มีอีเมล AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=ไม่มีโทรศัพท์มือถือ Owner=เจ้าของ FollowingConstantsWillBeSubstituted=ค่าคงที่ต่อไปนี้จะถูกแทนที่ด้วยค่าที่สอดคล้องกัน @@ -1107,3 +1114,9 @@ UpToDate=Up-to-date OutOfDate=Out-of-date EventReminder=Event Reminder UpdateForAllLines=Update for all lines +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 diff --git a/htdocs/langs/th_TH/modulebuilder.lang b/htdocs/langs/th_TH/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/th_TH/modulebuilder.lang +++ b/htdocs/langs/th_TH/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/th_TH/mrp.lang b/htdocs/langs/th_TH/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/th_TH/mrp.lang +++ b/htdocs/langs/th_TH/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/th_TH/other.lang b/htdocs/langs/th_TH/other.lang index d877cbda594..b69c81198d1 100644 --- a/htdocs/langs/th_TH/other.lang +++ b/htdocs/langs/th_TH/other.lang @@ -5,8 +5,6 @@ Tools=เครื่องมือ TMenuTools=เครื่องมือ ToolsDesc=All tools not included in other menu entries are grouped here.<br>All the tools can be accessed via the left menu. Birthday=วันเกิด -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=การแจ้งเตือนการใช้งานวันเกิด BirthdayAlertOff=การแจ้งเตือนวันเกิดไม่ได้ใช้งาน TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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=ดูการตั้งค่าของโมดูล% s NbOfAttachedFiles=จำนวนแนบไฟล์ / เอกสาร TotalSizeOfAttachedFiles=ขนาดของไฟล์ที่แนบมา / เอกสาร @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=เหมาะสม CalculatedWeight=น้ำหนักการคำนวณ CalculatedVolume=ปริมาณการคำนวณ Weight=น้ำหนัก -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=กก. WeightUnitg=ก. WeightUnitmg=มก. @@ -214,6 +216,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=การนำเข้าข้อมูลที่ตั้ง DolibarrNotification=การแจ้งเตือนอัตโนมัติ ResizeDesc=<b>ป้อนความกว้างใหม่หรือสูงใหม่</b> อัตราส่วนจะถูกเก็บไว้ในช่วงการปรับขนาด ... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=พื้นที่การส่งออก diff --git a/htdocs/langs/th_TH/products.lang b/htdocs/langs/th_TH/products.lang index 08f045c48a9..5d91c67d7ec 100644 --- a/htdocs/langs/th_TH/products.lang +++ b/htdocs/langs/th_TH/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=จำนวนของราคา DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=จำนวนผู้ปกครองผลิตภัณฑ์บรรจุภัณฑ์ @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=ราคาของลูกค้า SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +CustomCode=Customs|Commodity|HS code CountryOrigin=ประเทศแหล่งกำเนิดสินค้า +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Nature of product (material/finished) NatureOfProductShort=Nature of product NatureOfProductDesc=Raw material or finished product @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=ใช้ราคาคงที่ PriceByQuantity=ราคาที่แตกต่างกันตามปริมาณ DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=จำนวนช่วง -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/th_TH/projects.lang b/htdocs/langs/th_TH/projects.lang index 3cdc4c31d90..dc146212012 100644 --- a/htdocs/langs/th_TH/projects.lang +++ b/htdocs/langs/th_TH/projects.lang @@ -76,15 +76,16 @@ MyActivities=งานของฉัน / กิจกรรม MyProjects=โครงการของฉัน MyProjectsArea=My projects Area DurationEffective=ระยะเวลาที่มีประสิทธิภาพ -ProgressDeclared=ความคืบหน้าการประกาศ +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=ความคืบหน้าของการคำนวณ +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=เวลา +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/th_TH/recruitment.lang b/htdocs/langs/th_TH/recruitment.lang index 45af9e2bfbb..fafd8a9a580 100644 --- a/htdocs/langs/th_TH/recruitment.lang +++ b/htdocs/langs/th_TH/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/th_TH/sendings.lang b/htdocs/langs/th_TH/sendings.lang index 2dcc36fe18f..f5e201c2f33 100644 --- a/htdocs/langs/th_TH/sendings.lang +++ b/htdocs/langs/th_TH/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=การจัดส่งอื่น ๆ สำห SendingsAndReceivingForSameOrder=Shipments and receipts for this order SendingsToValidate=ในการตรวจสอบการจัดส่ง StatusSendingCanceled=ยกเลิก +StatusSendingCanceledShort=ยกเลิก StatusSendingDraft=ร่าง StatusSendingValidated=การตรวจสอบ (สินค้าจะจัดส่งหรือจัดส่งแล้ว) StatusSendingProcessed=การประมวลผล @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=รูปแบบเอกสารที่สมบูรณ์มากขึ้นสำหรับการจัดส่งใบเสร็จรับเงิน (โลโก้ ... ) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=EXPEDITION_ADDON_NUMBER คงที่ไม่ได้กำหนดไว้ SumOfProductVolumes=ผลรวมของปริมาณสินค้า SumOfProductWeights=ผลรวมของน้ำหนักสินค้า diff --git a/htdocs/langs/th_TH/stocks.lang b/htdocs/langs/th_TH/stocks.lang index 25e162a70a3..1ec66e72dee 100644 --- a/htdocs/langs/th_TH/stocks.lang +++ b/htdocs/langs/th_TH/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/th_TH/ticket.lang b/htdocs/langs/th_TH/ticket.lang index 63e20a956df..c66c4830bdf 100644 --- a/htdocs/langs/th_TH/ticket.lang +++ b/htdocs/langs/th_TH/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=อื่น ๆ TicketSeverityShortLOW=ต่ำ TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=สูง -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=อ่าน Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/th_TH/website.lang b/htdocs/langs/th_TH/website.lang index d905e966535..373eab76476 100644 --- a/htdocs/langs/th_TH/website.lang +++ b/htdocs/langs/th_TH/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page PageContainer=หน้า 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/th_TH/withdrawals.lang b/htdocs/langs/th_TH/withdrawals.lang index 4cdd1b59e6f..8390f78c1e3 100644 --- a/htdocs/langs/th_TH/withdrawals.lang +++ b/htdocs/langs/th_TH/withdrawals.lang @@ -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>. ClassCredited=จำแนกเครดิต @@ -131,7 +132,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,3 +148,5 @@ 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=ตัวเลือกสำหรับโหมดจริงไม่ได้ตั้งค่าเราหยุดหลังจากจำลองนี้ 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/th_TH/workflow.lang b/htdocs/langs/th_TH/workflow.lang index 728e20bacb1..e55fdf4eb92 100644 --- a/htdocs/langs/th_TH/workflow.lang +++ b/htdocs/langs/th_TH/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 diff --git a/htdocs/langs/tr_TR/accountancy.lang b/htdocs/langs/tr_TR/accountancy.lang index 9abb47b577e..197742deeac 100644 --- a/htdocs/langs/tr_TR/accountancy.lang +++ b/htdocs/langs/tr_TR/accountancy.lang @@ -16,6 +16,8 @@ ThisService=Bu hizmet ThisProduct=Bu ürün DefaultForService=Hizmet için varsayılan DefaultForProduct=Ürün için varsayılan +ProductForThisThirdparty=Product for this thirdparty +ServiceForThisThirdparty=Service for this thirdparty CantSuggest=Öneri yok AccountancySetupDoneFromAccountancyMenu=Muhasebenin çoğu kurulumu %s menüsünden yapılır. ConfigAccountingExpert=Configuration of the module accounting (double entry) @@ -48,6 +50,7 @@ CountriesExceptMe=%s hariç tüm ülkeler 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=Müşteriler için ana muhasebe hesabı kurulumda tanımlı değil MainAccountForSuppliersNotDefined=Tedarikçiler için ana muhasebe hesabı kurulumda tanımlı değil @@ -144,7 +147,7 @@ NotVentilatedinAccount=Muhasebe hesabına bağlı değil 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="Bağlama yapılacaklar" sayfasının sıralama işlemini en son öğelerden başlatın ACCOUNTING_LIST_SORT_VENTILATION_DONE="Bağlama yapılanlar" sayfasının sıralama işlemini en son öğelerden başlatın @@ -198,7 +201,8 @@ Docdate=Tarih Docref=Referans LabelAccount=Hesap etiketi LabelOperation=Label operation -Sens=Sens (borsa haberleri yayınlama günlüğü) +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=Günlük @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Parça sayısı TransactionNumShort=Num. transaction AccountingCategory=Kişiselleştirilmiş gruplar -GroupByAccountAccounting=Group by accounting account +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=Önceden tanımlanmış gruplar tarafından @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +ShowSubtotalByGroup=Show subtotal by level Pcgtype=Hesap grubu 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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Otomatik Olarak Bağla AutomaticBindingDone=Otomatik bağlama bitti @@ -293,6 +300,7 @@ Accounted=Accounted in ledger NotYetAccounted=Büyük defterde henüz muhasebeleştirilmemiş ShowTutorial=Show Tutorial NotReconciled=Uzlaştırılmadı +WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view ## Admin BindingOptions=Binding options @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/tr_TR/admin.lang b/htdocs/langs/tr_TR/admin.lang index fc4430e87ca..e15ec009134 100644 --- a/htdocs/langs/tr_TR/admin.lang +++ b/htdocs/langs/tr_TR/admin.lang @@ -56,6 +56,8 @@ GUISetup=Ekran SetupArea=Ayarlar UploadNewTemplate=Yeni şablon(lar) yükleyin FormToTestFileUploadForm=Dosya yükleme deneme formu (ayarlara göre) +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled IfModuleEnabled=Not: yalnızca <b>%s</b> modülü etkinleştirildiğinde evet etkilidir. 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. @@ -85,7 +87,6 @@ ShowPreview=Önizleme göster ShowHideDetails=Show-Hide details PreviewNotAvailable=Önizleme yok ThemeCurrentlyActive=Geçerli etkin tema -CurrentTimeZone=PHP Saat Dilimi (sunucu) MySQLTimeZone=MySql Saat Dilimi (veritabanı) TZHasNoEffect=Tarihler veritabanı sunucusu tarafından gönderilmiş dize gibi saklanır ve getirilir. Saat dilimi yalnızca UNIX_TIMESTAMP işlevi kullanıldığında etkilidir (Dolibarr tarafından kullanılmamalıdır, bu nedenle veri girdikten sonra değiştirilse bile veritabanı TZ'nin bir etkisi olmamalıdır). Space=Boşluk @@ -153,8 +154,8 @@ 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=Tüm geçici dosyaları sil (veri kaybetme riskiniz yoktur). Not: Geçici dizin eğer 24 saat önce oluşturulmuşsa silme işlemi tamamlanır. -PurgeDeleteTemporaryFilesShort=Geçici dosyaları sil +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 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 PurgeNothingToDelete=Silinecek dizin ya da dosya yok. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Tercihli Ortaklar OtherResources=Diğer kaynaklar ExternalResources=Dış Kaynaklar SocialNetworks=Sosyal Ağlar +SocialNetworkId=Social Network ID ForDocumentationSeeWiki=Kullanıcıların ve geliştiricilerin belgeleri (Doc, FAQs…), <br>Dolibarr Wiki ye bir göz atın:<br><b><a href="%s" target="_blank">%s</a></b> ForAnswersSeeForum=Herhangi bir başka soru/yardım için Dolibarr forumunu kullanabilirsiniz:<br><b><a href="%s" target="_blank">%s</a></b> HelpCenterDesc1=Burada Dolibar ile ilgili yardım ve destek almak için bazı kaynaklar bulabilirsiniz. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Tanımladığınız mevcut yapılandırma için örnekl ListOfDirectories=OpenDocument (AçıkBelge) temaları dizin listesi ListOfDirectoriesForModelGenODT=OpenDocument biçimli şablon dosyalarını içeren dizinler listesi.<br><br>Buraya tam yol dizinlerini koyun.<br>Her dizin arasına satır başı ekleyin.<br>GED modülü dizinini eklemek için buraya ekleyin<b>DOL_DATA_ROOT/ecm/yourdirectoryname</b>.<br><br>O dizinlerdeki dosyaların bitiş şekli böyle omalıdır <b>.odt</b> or <b>.ods</b>. NumberOfModelFilesFound=Bu dizinlerde bulunana ODT/ODS şablon dosyalarının sayısı -ExampleOfDirectoriesForModelGen=Sözdizimi örnekleri:<br>c:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br>Odt belge şablonlarının nasıl oluşturulacağını öğrenmek için o dizinlere kaydetmeden önce, wiki belgelerini okuyun: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Ad/Soyad konumu @@ -406,7 +408,7 @@ UrlGenerationParameters=URL güvenliği için parametreler SecurityTokenIsUnique=Her URL için benzersiz bir güvenlik anahtarı kullan EnterRefToBuildUrl=Nesen %s için hata referansı GetSecuredUrl=Hesaplanan URL al -ButtonHideUnauthorized=Yönetici olmayan kullanıcıların yetkisiz eylemlerinin önüne geçmek için, butonları gri ve engellenmiş olarak göstermek yerine tamamen gizle. +ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) OldVATRates=Eski KDV oranı NewVATRates=Yeni KDV oranı PriceBaseTypeToChange=Buna göre tanımlanan temel referans değerli fiyatları değiştir @@ -668,7 +670,7 @@ Module54000Desc=Cups IPP arabirimini kullanarak belgeleri açmadan doğrudan yaz Module55000Name=Anket, Araştırma ya da Oylama Module55000Desc=Çevrimiçi anketler, yoklamalar veya oylamalar oluşturun (Doodle, Studs, RDVz vs. gibi) Module59000Name=Kar Oranları -Module59000Desc=Kar Oranı yönetimi modülü +Module59000Desc=Module to follow margins Module60000Name=Komisyonlar Module60000Desc=Komisyon yönetimi modülü Module62000Name=Uluslararası Ticaret Terimleri @@ -1306,7 +1308,7 @@ YouUseBestDriver=Kullandığınız %s sürücüsü şu anda mevcut olan en iyi s YouDoNotUseBestDriver=%s sürücüsünü kullanıyorsunuz fakat %s sürücüsü önerilir. NbOfObjectIsLowerThanNoPb=You have only %s %s in the database. This does not require any particular optimization. SearchOptim=Optimizasyon ara -YouHaveXObjectUseSearchOptim=You have %s %s in the database. You should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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=%s web tarayıcısını kullanıyorsunuz. Bu tarayıcı güvenlik ve performans açısından uygundur. 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. @@ -1596,8 +1598,13 @@ ServiceSetup=Hizmetler modülü kurulumu ProductServiceSetup=Ürünler ve Hizmetler modüllerinin kurulumu NumberOfProductShowInSelect=Aşağı açılan seçim listelerinde gösterilecek maksimum ürün sayısı (0=limit yok) ViewProductDescInFormAbility=Ürün açıklamalarını formlarda göster (aksi takdirde araç ipucu penceresinde gösterilir) +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=Eğer ürün/hizmet teklifte varsa Ekli Dosyalar sekmesinde ürün/hizmet seçeneğini etkinleştirin, böylece ürün PDF belgesini PDF azur teklifine birleştirirsiniz -ViewProductDescInThirdpartyLanguageAbility=Ürün açıklamalarını üçün partinin dilinde görüntüle +ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) UseSearchToSelectProductTooltip=Ayrıca çok fazla sayıda ürüne sahipseniz (>100.000), Ayarlar->Diğer Ayarlar menüsünden PRODUCT_DONOTSEARCH_ANYWHERE sabitini 1 olarak ayarlayarak hızı arttırabilirsiniz. Bu durumda, arama dizenin başlangıcıyla sınırlı olacaktır. UseSearchToSelectProduct=Aşağı açılır listeden ürün içeriği listelemeden önce bir tuşa basarak arama yapmanızı bekler (Çok sayıda ürününüz varsa bu performansı artırabilir, fakat daha az kullanışlıdır) SetDefaultBarcodeTypeProducts=Ürünler için kullanılacak varsayılan barkod türü @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Özelleştirilmiş menüler bir üst menüye bağlant NewMenu=Yeni menü MenuHandler=Menü işleyicisi MenuModule=Kaynak modül -HideUnauthorizedMenu= Yetkisiz menüleri gizle (gri) +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=Kimlik menüsü DetailMenuHandler=Yeni menü göstermek için menü işleyicisi DetailMenuModule=Eğer menü girişi bir modülden geliyorsa modül adı @@ -1983,11 +1990,12 @@ 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=Şimdi topla ConfirmCloneEmailCollector=Are you sure you want to clone the Email collector %s ? -DateLastCollectResult=Date latest collect tried -DateLastcollectResultOk=Date latest collect successfull +DateLastCollectResult=Date of latest collect try +DateLastcollectResultOk=Date of latest collect success LastResult=En son sonuç EmailCollectorConfirmCollectTitle=Email collect confirmation EmailCollectorConfirmCollect=Do you want to run the collection for this collector now ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Posta Kodu MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Otomatik ECM ağacını göster @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/tr_TR/banks.lang b/htdocs/langs/tr_TR/banks.lang index 00371009950..e89ddad9ee5 100644 --- a/htdocs/langs/tr_TR/banks.lang +++ b/htdocs/langs/tr_TR/banks.lang @@ -173,10 +173,11 @@ SEPAMandate=SEPA yetkisi 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 fence -NewCashFence=New cash fence +CashControl=POS cash desk control +NewCashFence=New cash desk 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 diff --git a/htdocs/langs/tr_TR/blockedlog.lang b/htdocs/langs/tr_TR/blockedlog.lang index 072bf60a6d8..14db1cc265b 100644 --- a/htdocs/langs/tr_TR/blockedlog.lang +++ b/htdocs/langs/tr_TR/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Müşteri faturası indir BlockedLogBillPreview=Müşteri faturası önizlemesi BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/tr_TR/boxes.lang b/htdocs/langs/tr_TR/boxes.lang index f374d3c9080..09c86eb5ee9 100644 --- a/htdocs/langs/tr_TR/boxes.lang +++ b/htdocs/langs/tr_TR/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=Değiştirilen son %s bağış BoxTitleLastModifiedExpenses=Değiştirilen son %s gider raporu BoxTitleLatestModifiedBoms=Değiştirilen son %s BOM BoxTitleLatestModifiedMos=Değiştirilen son %s Üretim Siparişleri +BoxTitleLastOutstandingBillReached=Customers with maximum outstanding exceeded BoxGlobalActivity=Genel etkinlik (faturalar, teklifler, siparişler) BoxGoodCustomers=İyi müşteriler BoxTitleGoodCustomers=%s İyi müşteri +BoxScheduledJobs=Planlı İşler +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=RSS akışı yenilenemedi. Son başarılı yenileme tarihi: %s LastRefreshDate=Son yenileme tarihi NoRecordedBookmarks=Tanımlanmış yerimi yok. @@ -83,8 +86,8 @@ BoxTitleLatestModifiedSupplierOrders=Tedarikçi Siparişleri: değiştirilen son BoxTitleLastModifiedCustomerBills=Müşteri Faturaları: değiştirilen son %s BoxTitleLastModifiedCustomerOrders=Müşteri Siparişleri: son değiştirilen %s BoxTitleLastModifiedPropals=Değiştirilen son %s teklif -BoxTitleLatestModifiedJobPositions=Latest %s modified jobs -BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures +BoxTitleLatestModifiedJobPositions=En son %s değiştirilmiş iş +BoxTitleLatestModifiedCandidatures=En son %s değiştirilmiş aday ForCustomersInvoices=Müşteri faturaları ForCustomersOrders=Müşteri siparişleri ForProposals=Teklifler @@ -92,8 +95,8 @@ LastXMonthRolling=Devreden son %s ay ChooseBoxToAdd=Gösterge panelinize ekran etiketi ekleyin BoxAdded=Ekran etiketi gösterge panelinize eklendi BoxTitleUserBirthdaysOfMonth=Bu ayın doğum günleri (kullanıcılar) -BoxLastManualEntries=Muhasebedeki son manuel girişler -BoxTitleLastManualEntries=%s son manuel yapılan girişler +BoxLastManualEntries=Latest record in accountancy entered manually or without source document +BoxTitleLastManualEntries=%s latest record entered manually or without source document NoRecordedManualEntries=Muhasebede manuel giriş kaydı yok BoxSuspenseAccount=Askıdaki hesap muhasebe işlemlerini say BoxTitleSuspenseAccount=Ayrılmamış satır sayısı @@ -102,5 +105,7 @@ SuspenseAccountNotDefined=Askı hesabı tanımlanmamış BoxLastCustomerShipments=Son müşteri gönderileri BoxTitleLastCustomerShipments=Son %s müşteri gönderileri NoRecordedShipments=Kayıtlı müşteri gönderimi yok +BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages AccountancyHome=Muhasebe +ValidatedProjects=Doğrulanmış projeler diff --git a/htdocs/langs/tr_TR/cashdesk.lang b/htdocs/langs/tr_TR/cashdesk.lang index 1c52f025daf..f9c0a22ebd4 100644 --- a/htdocs/langs/tr_TR/cashdesk.lang +++ b/htdocs/langs/tr_TR/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Teorik tutar RealAmount=Gerçek tutar -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=Fatura sayısı Paymentnumpad=Type of Pad to enter payment Numberspad=Numbers Pad @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/tr_TR/categories.lang b/htdocs/langs/tr_TR/categories.lang index 94a510df93f..5369ebbec99 100644 --- a/htdocs/langs/tr_TR/categories.lang +++ b/htdocs/langs/tr_TR/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=Proje etiket/kategori alanı UsersCategoriesArea=Kullanıcı Etiketleri/Kategorileri Alanı SubCats=Alt kategoriler CatList= Etiketler/kategoriler listesi +CatListAll=List of tags/categories (all types) NewCategory=Yeni etiket/kategori ModifCat=Etiket/kategori değiştir CatCreated=Etiket/kategori oluşturuldu @@ -65,16 +66,22 @@ UsersCategoriesShort=Kullanıcı etiketleri/kategorileri StockCategoriesShort=Depo etiketleri / kategorileri ThisCategoryHasNoItems=Bu kategori herhangi bir öğe içermiyor. CategId=Etiket/kategori kimliği -CatSupList=Tedarikçi etiketleri/kategorileri listesi -CatCusList=Müşteri/beklenti etiketleri/kategorileri listesi +ParentCategory=Parent tag/category +ParentCategoryLabel=Label of parent tag/category +CatSupList=List of vendors tags/categories +CatCusList=List of customers/prospects tags/categories CatProdList=Ürün etiketleri/kategorileri listesi CatMemberList=Üye etiketleri/kategorileri listesi -CatContactList=Kişi etiketleri/kategorileri listesi -CatSupLinks=Tedarikçiler ve etiketler/kategoriler arasındaki bağlantılar +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=Müşteriler/beklentiler ve etiketler/kategoriler arasındaki bağlantılar CatContactsLinks=Kişiler/adresler ve etiketler/kategoriler arasındaki bağlantılar CatProdLinks=Ürünler/hizmetler ve etiketler/kategoriler arasındaki bağlantılar -CatProJectLinks=Projeler ve etiketler/kategoriler arasındaki bağlantılar +CatMembersLinks=Üyeler ve etiketler/kategoriler arasındaki bağlantılar +CatProjectsLinks=Projeler ve etiketler/kategoriler arasındaki bağlantılar +CatUsersLinks=Links between users and tags/categories DeleteFromCat=Etiketlerden/kategorilerden kaldır ExtraFieldsCategories=Tamamlayıcı öznitelikler CategoriesSetup=Etiket/kategori ayarları diff --git a/htdocs/langs/tr_TR/companies.lang b/htdocs/langs/tr_TR/companies.lang index 1a0b08308e6..b27fea49898 100644 --- a/htdocs/langs/tr_TR/companies.lang +++ b/htdocs/langs/tr_TR/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Avrupa Komisyonu web sitesinden topluluk içi Vergi Nu VATIntraManualCheck=Avrupa Komisyonu'nun <a href="%s" target="_blank">%s</a> web adresinden de manuel olarak kontrol edebilirsiniz ErrorVATCheckMS_UNAVAILABLE=Denetlemiyor. Denetim hizmeti üye ülke (%s) tarafından sağlanmıyor. NorProspectNorCustomer=Ne aday ne de müşteri -JuridicalStatus=Tüzel Kişilik Türü +JuridicalStatus=Business entity type Workforce=Workforce Staff=Çalışan sayısı ProspectLevelShort=Potansiyel diff --git a/htdocs/langs/tr_TR/compta.lang b/htdocs/langs/tr_TR/compta.lang index 2623f2bdb57..5889d98d6bd 100644 --- a/htdocs/langs/tr_TR/compta.lang +++ b/htdocs/langs/tr_TR/compta.lang @@ -111,7 +111,7 @@ Refund=İade SocialContributionsPayments=Sosyal/mali vergi ödemeleri ShowVatPayment=KDV ödemesi göster TotalToPay=Ödenecek toplam -BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account +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=Müşteri muhasebe kodu SupplierAccountancyCode=Vendor accounting code CustomerAccountancyCodeShort=Müşt. hesap kodu @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Bu sosyal/mali vergiyi silmek istediğinizden em 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>. -CalcModeDebt=Analysis of known recorded invoices even if they are not yet accounted in ledger. +CalcModeDebt=Analysis of known recorded documents even if they are not yet accounted in ledger. CalcModeEngagement=Henüz kayıtlı hesapta olmasa bile, bilinen kayıtlı ödemelerin analizi. CalcModeBookkeeping=Analysis of data journalized in Bookkeeping Ledger table. CalcModeLT1= Müşteri faturaları için mod <b>%sRE tedrikçi faturaları için mod %s</b> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Gelir ve gider bilançosu, yıllık özet 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=Henüz kayıtlı defterde yer almamış olsalar bile, bilinen kayıtlı faturalara dayalı bir hesaplama için %s analizinin %s faturasına bakın. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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=- Gösterilen tutarlara tüm vergiler dahildir 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=- Faturalarda, giderlerde, KDV inde ve maaşlarda yapılan gerçek ödemeleri içerir. <br>- Faturaların, giderleri, KDV nin ve maaşların ödeme tarihleri baz alınır. Bağışlar için bağış tarihi. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting SeePageForSetup=See menu <a href="%s">%s</a> for setup DepositsAreNotIncluded=- Peşinat faturaları dahil değildir DepositsAreIncluded=- Peşinat faturaları dahildir +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=RE Üçüncü partiye göre rapor LT2ReportByCustomersES=Üçüncü parti IRPF Raporu VATReport=Satış vergisi raporu VATReportByPeriods=Döneme göre satış vergisi raporu +VATReportByMonth=Sale tax report by month VATReportByRates=Oranlara göre satış vergisi raporu VATReportByThirdParties=Üçüncü taraflara göre satış vergisi raporu VATReportByCustomers=Müşteriye göre satış vergisi raporu diff --git a/htdocs/langs/tr_TR/cron.lang b/htdocs/langs/tr_TR/cron.lang index 34939dd94f3..3c20bddb891 100644 --- a/htdocs/langs/tr_TR/cron.lang +++ b/htdocs/langs/tr_TR/cron.lang @@ -7,13 +7,14 @@ Permission23103 = Planlı iş sil Permission23104 = Planlı iş yürüt # Admin CronSetup=Planlı iş yönetimi ayarları -URLToLaunchCronJobs=Nitelikli cron işlerini kontrol etmek ve başlatmak için URL -OrToLaunchASpecificJob=Ya da özel bir işi denetlemek ve başlatmak için +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=Cron işlerini başlatacak URL için güvenlik anahtarı FileToLaunchCronJobs=Nitelikli cron işlerini kontrol etmek ve başlatmak için komut satırı CronExplainHowToRunUnix=Unix ortamında komut satırını her 5 dakikada bir çalıştırmak için kron sekmesi girişini kullanmalısınız CronExplainHowToRunWin=On Microsoft(tm) Windows environment you can use Scheduled Task tools to run the command line each 5 minutes CronMethodDoesNotExists=Sınıf %s hiçbir %s yöntemi içermiyor +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=Önceden tanımlanmış cron görevi profillerinin listesi # Menu @@ -46,6 +47,7 @@ CronNbRun=Number of launches CronMaxRun=Maximum number of launches CronEach=Her JobFinished=İş başlatıldı ve bitirildi +Scheduled=Scheduled #Page card CronAdd= İş ekle CronEvery=İş yürütme zamanı @@ -56,7 +58,7 @@ CronNote=Yorum CronFieldMandatory=%s alanı zorunludur CronErrEndDateStartDt=Bitiş tarihi başlama tarihinden önce olamaz StatusAtInstall=Status at module installation -CronStatusActiveBtn=Etkin +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Engelle CronTaskInactive=Bu iş devre dışı CronId=Kimlik @@ -76,8 +78,14 @@ CronType_method=Call method of a PHP Class CronType_command=Kabuk komutu 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=Planlı işleri görmek ve düzenlemek için "Giriş - Yönetici Araçları - Planlı İşler" menüsüne git. +UseMenuModuleToolsToAddCronJobs=Go into menu "<a href="%s">Home - Admin tools - Scheduled jobs</a>" to see and edit scheduled jobs. JobDisabled=İş engellendi MakeLocalDatabaseDumpShort=Yerel veritabanı yedeklemesi 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=Dikkat: Performans amaçlı olarak etkinleştirilmiş işlerin bir sonraki yürütme tarihi ne olursa olsun, işleriniz çalıştırılmadan önce maksimum %s saat ertelenebilir. +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/tr_TR/errors.lang b/htdocs/langs/tr_TR/errors.lang index 8753b1ee175..8cc4092af00 100644 --- a/htdocs/langs/tr_TR/errors.lang +++ b/htdocs/langs/tr_TR/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=Hata yok, taahüt ediyoruz # Errors ErrorButCommitIsDone=Hatalar bulundu, buna rağmen doğruluyoruz ErrorBadEMail=%s e-postası hatalı +ErrorBadMXDomain=Email %s seems wrong (domain has no valid MX record) ErrorBadUrl=URL %s yanlış ErrorBadValueForParamNotAString=Parametreniz için hatalı değer. Genellikle çeviri eksik olduğunda eklenir. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=%s kullanıcı adı zaten var. ErrorGroupAlreadyExists=%s Grubu zaten var. ErrorRecordNotFound=Kayıt bulunamadı. @@ -48,6 +50,7 @@ ErrorFieldsRequired=Bazı gerekli alanlar doldurulmamış. ErrorSubjectIsRequired=E-posta konusu zorunludur ErrorFailedToCreateDir=Dizin oluşturulamadı. Web sunucusu kullanıcısının Dolibarr belgeleri dizinine yazma izinlerini denetleyin. Eğer bu parametre <b>guvenli_mod</b> bu PHP üzerinde etkinleştirilmişse, Dolibarr php dosyalarının web sunucusu kullanıcısına (ya da grubuna) sahip olduğunu denetleyin. ErrorNoMailDefinedForThisUser=Bu kullanıcı için tanımlı posta yok +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=Bu özelliğin çalışması için JavaScriptin etkinleştirilmesi gerekir. Bunu Kurulum - Ekran menüsünden değiştirebilirsiniz. ErrorTopMenuMustHaveAParentWithId0='Üst' menü tipi menünün bir ana menüsü olamaz. Ana menüye 0 koyun ya da 'Sol' menü türünü seçin. ErrorLeftMenuMustHaveAParentId='Sol' tipli bir menünün bir üst tanımı olmalıdır. @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=Bu profil adı, bu dışa aktarma grubu için zaten m ErrorLDAPSetupNotComplete=Dolibarr-LDAP eşleşmesi tamamlanmamış. ErrorLDAPMakeManualTest=A. Ldif dosyası %s dizininde oluşturuldu. Hatalar hakkında daha fazla bilgi almak için komut satırından elle yüklemeyi deneyin. ErrorCantSaveADoneUserWithZeroPercentage=Can't save an action with "status not started" if field "done by" is also filled. -ErrorRefAlreadyExists=Oluşturulması için kullanılan referans zaten var. +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=Kayıt bazı alt kayıtlar içerdiği için silinemedi ErrorRecordHasAtLeastOneChildOfType=Object has at least one child of type %s @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=Dosya bulunamadı. Paylaşım anahtarı değiştirilmiş veya dosya yakın bir zamanda kaldırılmış olabilir. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=PHP'nizdeki upload_max_filesize (%s) parametresi, post_max_size (%s) PHP parametresinden daha yüksek. Bu tutarlı bir kurulum değil. WarningPasswordSetWithNoAccount=Bu üye için bir parola ayarlıdır. Ancak, hiçbir kullanıcı hesabı oluşturulmamıştır. Yani bu şifre saklanır ama Dolibarr'a giriş için kullanılamaz. Dış bir modül/arayüz tarafından kullanılıyor olabilir, ama bir üye için ne bir kullanıcı adı ne de parola tanımlamanız gerekmiyorsa "Her üye için bir kullanıcı adı yönet" seçeneğini devre dışı bırakabilirsiniz. Bir kullanıcı adı yönetmeniz gerekiyorsa ama herhangi bir parolaya gereksinim duymuyorsanız bu uyarıyı engellemek için bu alanı boş bırakabilirsiniz. Not: Eğer bir üye bir kullanıcıya bağlıysa kullanıcı adı olarak e-posta adresi de kullanılabilir. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Kullanıcı adınız değiştirilmiştir. 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/tr_TR/exports.lang b/htdocs/langs/tr_TR/exports.lang index 3818365af40..a909d78355e 100644 --- a/htdocs/langs/tr_TR/exports.lang +++ b/htdocs/langs/tr_TR/exports.lang @@ -26,6 +26,8 @@ FieldTitle=Alan başlğı NowClickToGenerateToBuildExportFile=Şimdi açılan kutudan dosya biçimini seçin ve dışa aktarma dosyasını oluşturmak için "Oluştur" linkine tıklayın... AvailableFormats=Mevcut Formatlar LibraryShort=Kitaplık +ExportCsvSeparator=Csv caracter separator +ImportCsvSeparator=Csv caracter separator Step=Adım FormatedImport=İçe Aktarma Yardımcısı 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. @@ -131,3 +133,4 @@ KeysToUseForUpdates=Key (column) to use for <b>updating</b> existing data NbInsert=Eklenen satır sayısı: %s NbUpdate=Güncellenmiş satır sayısı: %s MultipleRecordFoundWithTheseFilters=Bu filtrelerle birden çok kayıt bulundu: %s +StocksWithBatch=Stocks and location (warehouse) of products with batch/serial number diff --git a/htdocs/langs/tr_TR/mails.lang b/htdocs/langs/tr_TR/mails.lang index 85fe5c91d72..8d33ac213fb 100644 --- a/htdocs/langs/tr_TR/mails.lang +++ b/htdocs/langs/tr_TR/mails.lang @@ -92,6 +92,7 @@ MailingModuleDescEmailsFromUser=Kullanıcı tarafından girilen e-postalar MailingModuleDescDolibarrUsers=E-postaları olan kullanıcılar MailingModuleDescThirdPartiesByCategories=Üçüncü taraflar (kategorilere göre) 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=Satır %s dosyası @@ -125,12 +126,13 @@ TagMailtoEmail=Alıcı E-posta Adresi ("kime:" html linkini içeren) NoEmailSentBadSenderOrRecipientEmail=Gönderilen e-posta yok. Hatalı gönderici ya da alıcı epostası. Kullanıcı profilini doğrula. # Module Notifications Notifications=Bildirimler -NoNotificationsWillBeSent=Bu etkinlik ve firma için hiçbir e-posta bildirimi planlanmamış -ANotificationsWillBeSent=E-posta ile 1 bildirim gönderilecektir -SomeNotificationsWillBeSent=%s bildirim e-posta ile gönderilecektir -AddNewNotification=Yeni bir e-posta bildirim hedefi/etkinliği oluştur -ListOfActiveNotifications=E-posta bildirimi için aktif olan hedef/etkinlik listesi -ListOfNotificationsDone=Gönderilen tüm e-posta bildirimleri listesi +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=E-posta gönderme yapılandırması '%s'ye ayarlandı. Bu mod toplu e-postalama için kullanılamaz. MailSendSetupIs2='%s' Modunu kullanmak için <strong>'%s'</strong> parametresini değiştirecekseniz, önce yönetici hesabı ile %sGiriş - Ayarlar - E-postalar%s menüsüne gitmelisiniz. Bu mod ile İnternet Servis Sağlayıcınız tarafından sağlanan SMTP sunucusu ayarlarını girebilir ve Toplu e-posta özelliğini kullanabilirsiniz. MailSendSetupIs3=SMTP sunucusunun nasıl yapılandırılacağı konusunda sorunuz varsa, %s e sorabilirsiniz. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir UseFormatInputEmailToTarget=Enter a string with format <strong>email;name;firstname;other</strong> MailAdvTargetRecipients=Alıcılar (gelişmiş seçim) 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 +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=Tam sayı veya kayan değer seçmek için aralık kullanın AdvTgtMinVal=En düşük değer AdvTgtMaxVal=En yüksek değer @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Süzgeç oluştur AdvTgtOrCreateNewFilter=Yeni süzgeç adı NoContactWithCategoryFound=Kategorisi olan hiç bir kişi/adres bulunamadı NoContactLinkedToThirdpartieWithCategoryFound=Kategorisi olan hiç bir kişi/adres bulunamadı -OutGoingEmailSetup=Giden e-posta kurulumu -InGoingEmailSetup=Gelen e-posta kurulumu -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Varsayılan giden e-posta kurulumu +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=Bilgi ContactsWithThirdpartyFilter=Üçüncü parti filtreli kişiler Unanswered=Unanswered Answered=Cevaplandı IsNotAnAnswer=Is not answer (initial email) IsAnAnswer=Is an answer of an initial email +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/tr_TR/main.lang b/htdocs/langs/tr_TR/main.lang index ecc538bf1dc..5fa3692202b 100644 --- a/htdocs/langs/tr_TR/main.lang +++ b/htdocs/langs/tr_TR/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=Bu e-posta türü için mevcut şablon yok AvailableVariables=Mevcut yedek değişkenler NoTranslation=Çeviri yok Translation=Çeviri +CurrentTimeZone=PHP Saat Dilimi (sunucu) EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria NoRecordFound=Kayıt bulunamadı NoRecordDeleted=Hiç kayıt silinmedi NotEnoughDataYet=Yeterli bilgi yok @@ -85,6 +87,8 @@ FileWasNotUploaded=Bu ekleme için bir dosya seçildi ama henüz gönderilmedi. NbOfEntries=Kayıt sayısı GoToWikiHelpPage=Çevrimiçi yardım oku (Internet erişimi gerekir) GoToHelpPage=Yardım oku +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Ana Sayfa RecordSaved=Kayıt kaydedildi RecordDeleted=Kayıt silindi RecordGenerated=Kayıt oluşturuldu @@ -220,6 +224,7 @@ Value=Değer PersonalValue=Kişisel değer NewObject=Yeni %s NewValue=Yeni değer +OldValue=Old value %s CurrentValue=Geçerli değer Code=Kod Type=Tür @@ -433,6 +438,7 @@ RemainToPay=Kalan ödeme Module=Modül/Uygulama Modules=Modüller/Uygulamalar Option=Seçenek +Filters=Filters List=Liste FullList=Tüm liste FullConversation=Full conversation @@ -650,6 +656,7 @@ SupplierPreview=Tedarikçi önizlemesi ShowCustomerPreview=Müşteri önizlemeyi göster ShowSupplierPreview=Tedarikçi önizlemesini göster RefCustomer=Müşteri Ref. +InternalRef=Internal ref. Currency=Para birimi InfoAdmin=Yöneticiler için bilgi Undo=Geri al @@ -671,7 +678,7 @@ SendMail=E-posta gönder Email=E-posta NoEMail=E-posta yok AlreadyRead=Zaten okundu -NotRead=Okunmayan +NotRead=Okunmamış NoMobilePhone=Cep telefonu yok Owner=Sahibi FollowingConstantsWillBeSubstituted=Aşağıdaki değişmezler uygun değerlerin yerine konacaktır @@ -1107,3 +1114,9 @@ UpToDate=Up-to-date OutOfDate=Out-of-date EventReminder=Event Reminder UpdateForAllLines=Update for all lines +OnHold=Beklemede +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 diff --git a/htdocs/langs/tr_TR/modulebuilder.lang b/htdocs/langs/tr_TR/modulebuilder.lang index 93b4879a0d0..c80a020642b 100644 --- a/htdocs/langs/tr_TR/modulebuilder.lang +++ b/htdocs/langs/tr_TR/modulebuilder.lang @@ -40,6 +40,7 @@ PageForCreateEditView=Bir kaydı oluşturmak/düzenlemek/görüntülemek için P PageForAgendaTab=Etkinlik sekmesi için PHP sayfası PageForDocumentTab=Belge sekmesi için PHP sayfası PageForNoteTab=Not sekmesi için PHP sayfası +PageForContactTab=PHP page for contact tab PathToModulePackage=Path to zip of module/application package PathToModuleDocumentation=Modül/uygulama dökümantasyon dosyasına yol (%s) SpaceOrSpecialCharAreNotAllowed=Boşluklara veya özel karakterlere izin verilmez. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Taranan dizin NoTrigger=No trigger NoWidget=Ekran etiketi yok -GoToApiExplorer=API gezginine git +GoToApiExplorer=API explorer ListOfMenusEntries=Menü kayıtlarının listesi ListOfDictionariesEntries=Sözlük girişlerinin listesi ListOfPermissionsDefined=Tanımlanan izinlerin listesi @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=Eğer SQL ve PHP hakkında bilginiz varsa, yerel modül SeeTopRightMenu=Sağ üst menüde yer alan <span class="fa fa-bug"></span> simgesine bakın AddLanguageFile=Dil dosyası ekle YouCanUseTranslationKey=You can use here a key that is the translation key found into language file (see tab "Languages") -DropTableIfEmpty=(Boşsa tabloyu sil) +DropTableIfEmpty=(Destroy table if empty) TableDoesNotExists=%s tablosu mevcut değil TableDropped=%s tablosu silindi InitStructureFromExistingTable=Build the structure array string of an existing table @@ -126,7 +127,6 @@ UseSpecificEditorURL = Spesifik bir editör URL'si kullanın UseSpecificFamily = Use a specific family UseSpecificAuthor = Spesifik bir yazar kullanın UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=Önce modül/uygulama etkinleştirilmelidir 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=Nesneden bazı belgeler oluşturmak istiyorum @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/tr_TR/mrp.lang b/htdocs/langs/tr_TR/mrp.lang index b68f85e39d9..1c581bebb72 100644 --- a/htdocs/langs/tr_TR/mrp.lang +++ b/htdocs/langs/tr_TR/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/tr_TR/other.lang b/htdocs/langs/tr_TR/other.lang index 1ac66fd963c..66cfdd557cb 100644 --- a/htdocs/langs/tr_TR/other.lang +++ b/htdocs/langs/tr_TR/other.lang @@ -5,8 +5,6 @@ Tools=Araçlar TMenuTools=Araçlar ToolsDesc=Diğer menü girişlerinde bulunmayan tüm araçlar burada gruplandırılmıştır.<br>Tüm araçlara sol menüden erişilebilir. Birthday=Doğumgünü -BirthdayDate=Doğumgünü tarihi -DateToBirth=Doğum günü BirthdayAlertOn=doğum günü uyarısı etkin BirthdayAlertOff=doğumgünü uyarısı etkin değil TransKey=TransKey anahtarının çevirisi @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Fatura tarihinden önceki ay (sayı 1-12) TextPreviousMonthOfInvoice=Fatura tarihinden önceki ay (metin) NextMonthOfInvoice=Fatura tarihinden sonraki ay (sayı 1-12) TextNextMonthOfInvoice=Fatura tarihinden sonraki ay (metin) +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip dosyası <b>%s</b> içinde oluşturuldu. DocFileGeneratedInto=Doc dosyası <b>%s</b> içinde oluşturuldu. JumpToLogin=Bağlantı kesildi. Giriş sayfasına git... @@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Expense report validated (approval required) Notify_EXPENSE_REPORT_APPROVE=Gider raporu onaylandı Notify_HOLIDAY_VALIDATE=Leave request validated (approval required) Notify_HOLIDAY_APPROVE=Leave request approved +Notify_ACTION_CREATE=Added action to Agenda SeeModuleSetup=%s modülü kurulumuna bak NbOfAttachedFiles=Eklenen dosya/belge sayısı TotalSizeOfAttachedFiles=Eklenen dosyaların/belgelerin toplam boyutu @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\n__REF__ referans numaralı sevk PredefinedMailContentSendFichInter=__(Hello)__\n\n__REF__ referans numaralı müdahaleyi ekte bulabilirsiniz\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Ödemeniz yapılmadıysa ödemenizi yapmak için aşağıdaki bağlantıyı tıklayabilirsiniz.\n\n%s\n\n PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendActionComm=Event reminder "__EVENT_LABEL__" on __EVENT_DATE__ at __EVENT_TIME__<br><br>This is an automatic message, please do not reply. DemoDesc=Dolibarr, çeşitli iş modüllerini destekleyen kompakt bir ERP/CRM çözümüdür. Tüm modüllerin sergilendiği bir demonun mantığı yoktur, çünkü böyle bir senaryo asla gerçekleşmez (birkaç yüz adet mevcut). Bu nedenle birkaç demo profili vardır. ChooseYourDemoProfil=İşlemlerinize uyan demo profilini seçin... ChooseYourDemoProfilMore=...veya kendi profilinizi oluşturun<br>(manuel modül seçimi) @@ -214,6 +216,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=Veri dizisinin içe aktarımı DolibarrNotification=Otomatik bilgilendirme ResizeDesc=Yeni genişliği <b>VEYA</b> yeni yüksekliği gir. Yeniden boyutlandırma sırasında oran kotunacaktır... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Dışa aktarma alanı diff --git a/htdocs/langs/tr_TR/products.lang b/htdocs/langs/tr_TR/products.lang index a5c62b2b2d2..f06d6621115 100644 --- a/htdocs/langs/tr_TR/products.lang +++ b/htdocs/langs/tr_TR/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Ürün/hizmet başına çoklu fiyat segmenti (her müşteri bir fiyat segmentinde) MultiPricesNumPrices=Fiyat sayısı DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=Ana paket ürünü sayısı @@ -167,8 +168,10 @@ BuyingPrices=Alış fiyatları CustomerPrices=Müşteri fiyatları SuppliersPrices=Tedarikçi fiyatları SuppliersPricesOfProductsOrServices=Tedarikçi fiyatları (ürün veya hizmetlerin) -CustomCode=G.T.İ.P Numarası +CustomCode=Customs|Commodity|HS code CountryOrigin=Menşei ülke +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Nature of product (material/finished) NatureOfProductShort=Nature of product NatureOfProductDesc=Raw material or finished product @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Sabit fiyatı kullan PriceByQuantity=Miktara göre değişen fiyatlar DisablePriceByQty=Fiyatları miktara göre devre dışı bırak PriceByQuantityRange=Miktar aralığı -MultipriceRules=Fiyat seviyesi kuralları +MultipriceRules=Automatic prices for segment UseMultipriceRules=İlk segmente göre diğer tüm segmentlerin fiyatlarını otomatik olarak hesaplamak için fiyat segmenti kurallarını (ürün modülü kurulumunda tanımlanan) kullan PercentVariationOver=%s üzerindeki %% değişim PercentDiscountOver=%s üzerindeki %% indirim diff --git a/htdocs/langs/tr_TR/projects.lang b/htdocs/langs/tr_TR/projects.lang index 8b8891d2c6b..24cb80a885a 100644 --- a/htdocs/langs/tr_TR/projects.lang +++ b/htdocs/langs/tr_TR/projects.lang @@ -76,15 +76,16 @@ MyActivities=Görevlerim/etkinliklerim MyProjects=Projelerim MyProjectsArea=Projelerim Alanı DurationEffective=Etken süre -ProgressDeclared=Bildirilen ilerleme +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Mevcut açık görevler -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Hesaplanan ilerleme +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=Süre +TimeConsumed=Consumed ListOfTasks=Görevler listesi GoToListOfTimeConsumed=Tüketilen süre listesine git GanttView=Gantt View diff --git a/htdocs/langs/tr_TR/recruitment.lang b/htdocs/langs/tr_TR/recruitment.lang index 7d2ea6182f2..caede8f42a0 100644 --- a/htdocs/langs/tr_TR/recruitment.lang +++ b/htdocs/langs/tr_TR/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/tr_TR/sendings.lang b/htdocs/langs/tr_TR/sendings.lang index a56954de001..cdbc562d1ac 100644 --- a/htdocs/langs/tr_TR/sendings.lang +++ b/htdocs/langs/tr_TR/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Bu sipariş için diğer sevkiyatlar SendingsAndReceivingForSameOrder=Bu sipariş için gönderiler ve makbuzlar SendingsToValidate=Doğrulanacak sevkiyatlar StatusSendingCanceled=İptal edildi +StatusSendingCanceledShort=İptal edildi StatusSendingDraft=Taslak StatusSendingValidated=Doğrulanmış (sevkedilecek ürünler veya halihazırda sevkedilmişler) StatusSendingProcessed=İşlenmiş @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=Sevkiyatları yapabilmek için önce siparişi # Sending methods # ModelDocument DocumentModelTyphon=Teslimat makbuzları için daha fazla eksiksiz doküman modeli (logo. ..) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=EXPEDITION_ADDON_NUMBER değişmezi tanımlanmamış SumOfProductVolumes=Ürün hacimleri toplamı SumOfProductWeights=Ürün ağırlıkları toplamı diff --git a/htdocs/langs/tr_TR/stocks.lang b/htdocs/langs/tr_TR/stocks.lang index be4eb25d528..07374a8b0f4 100644 --- a/htdocs/langs/tr_TR/stocks.lang +++ b/htdocs/langs/tr_TR/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Varsayılan depo @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/tr_TR/ticket.lang b/htdocs/langs/tr_TR/ticket.lang index 55746ab9f31..86bfb2ce139 100644 --- a/htdocs/langs/tr_TR/ticket.lang +++ b/htdocs/langs/tr_TR/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Destek Bildirimi - Türler TicketDictCategory=Destek Bildirimi - Gruplar TicketDictSeverity=Destek Bildirimi - Önemler TicketDictResolution=Destek Bildirimi - Çözüm -TicketTypeShortBUGSOFT=Yazılım arızası -TicketTypeShortBUGHARD=Donanım arızası -TicketTypeShortCOM=Ticari soru +TicketTypeShortCOM=Ticari soru TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Diğer TicketSeverityShortLOW=Düşük TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=Yüksek -TicketSeverityShortBLOCKING=Kritik/Engelleyici +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress='%s' alanı hatalı MenuTicketMyAssign=Destek bildirimlerim @@ -60,7 +58,6 @@ OriginEmail=E-posta kaynağı Notify_TICKET_SENTBYMAIL=Destek bildirimini e-posta ile gönderil # Status -NotRead=Okunmayan Read=Okundu Assigned=Atanan InProgress=Devam etmekte @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Genel arayüz, ziyaretçilerin destek bildiri TicketsAutoAssignTicket=Destek bildirimini oluşturan kullanıcıyı otomatik olarak atayın TicketsAutoAssignTicketHelp=Bir destek bildirimi oluştururken, kullanıcı otomatik olarak destek bildirimine atanabilir. 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Okunmamış TicketNotCreatedFromPublicInterface=Mevcut değil. Destek bildirimi genel arayüzden oluşturulmadı. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Destek bildirimi referans adı gerekli # diff --git a/htdocs/langs/tr_TR/website.lang b/htdocs/langs/tr_TR/website.lang index 65378d92d62..38b93f9cc3a 100644 --- a/htdocs/langs/tr_TR/website.lang +++ b/htdocs/langs/tr_TR/website.lang @@ -30,7 +30,6 @@ EditInLine=Satır içi düzenle AddWebsite=Web sitesi ekle Webpage=Web sayfası/kapsayıcı AddPage=Sayfa/kapsayıcı ekle -HomePage=Ana Sayfa PageContainer=Sayfa 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=İstenen %s kimlik numaralı sayfa henüz bir içeriğe sahip değil, önbellek dosyası .tpl.php kaldırıldı. Bu sorunu çözmek için sayfa içeriğini düzenleyin. @@ -101,7 +100,7 @@ EmptyPage=Boş sayfa ExternalURLMustStartWithHttp=Harici URL http:// veya https:// ile başlamalıdır ZipOfWebsitePackageToImport=Upload the Zip file of the website template package ZipOfWebsitePackageToLoad=or Choose an available embedded website template package -ShowSubcontainers=Dinamik içeriği dahil et +ShowSubcontainers=Show dynamic content InternalURLOfPage=Sayfanın iç URL'si ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=Bu sayfa/kapsayıcı'nın çevirisi mevcut @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/tr_TR/withdrawals.lang b/htdocs/langs/tr_TR/withdrawals.lang index 04b9a4a8498..fbe921943da 100644 --- a/htdocs/langs/tr_TR/withdrawals.lang +++ b/htdocs/langs/tr_TR/withdrawals.lang @@ -42,6 +42,7 @@ LastWithdrawalReceipt=Latest %s direct debit receipts MakeWithdrawRequest=Otomatik ödeme talebi oluşturun MakeBankTransferOrder=Make a credit transfer request WithdrawRequestsDone=%s direct debit payment requests recorded +BankTransferRequestsDone=%s credit transfer requests recorded ThirdPartyBankCode=Üçüncü parti banka kodu 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>. ClassCredited=Alacak olarak sınıflandır @@ -131,7 +132,8 @@ SEPARCUR=SEPA CUR SEPAFRST=SEPA FRST ExecutionDate=Execution date CreateForSepa=Otomatik ödeme dosyası oluşturun -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,3 +148,5 @@ InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Merhaba, <br> <br> fatura %s, ait olduğu firma %s, tutarı %s olan otomatik ödeme talimatı banka tarafından reddedilmiştir. <br> - <br> -- <br> %s ModeWarning=Gerçek mod için seçenek ayarlanmamış, bu simülasyondan sonra durdururuz ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorICSmissing=Missing ICS in Bank account %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/tr_TR/workflow.lang b/htdocs/langs/tr_TR/workflow.lang index d3cc2b2f0b2..84e8e7d722a 100644 --- a/htdocs/langs/tr_TR/workflow.lang +++ b/htdocs/langs/tr_TR/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=Otomatik oluşturma AutomaticClassification=Otomatik sınıflandırma +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/uk_UA/accountancy.lang b/htdocs/langs/uk_UA/accountancy.lang index f99b2780e48..467fc0b218c 100644 --- a/htdocs/langs/uk_UA/accountancy.lang +++ b/htdocs/langs/uk_UA/accountancy.lang @@ -16,6 +16,8 @@ ThisService=Ця послуга ThisProduct=Цей товар DefaultForService=Default for service DefaultForProduct=Default for product +ProductForThisThirdparty=Product for this thirdparty +ServiceForThisThirdparty=Service for this thirdparty CantSuggest=Can't suggest AccountancySetupDoneFromAccountancyMenu=Більшість налаштувань обліку здійснюється у меню %s ConfigAccountingExpert=Configuration of the module accounting (double entry) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Date Docref=Reference LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/uk_UA/admin.lang b/htdocs/langs/uk_UA/admin.lang index d04882db68a..4fa18be466d 100644 --- a/htdocs/langs/uk_UA/admin.lang +++ b/htdocs/langs/uk_UA/admin.lang @@ -56,6 +56,8 @@ GUISetup=Зовнішній вигляд SetupArea=Налаштування UploadNewTemplate=Завантажити новий шаблон(и) FormToTestFileUploadForm=Форма для тестування завантаження файлу (відповідно до налаштування) +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled IfModuleEnabled=Примітка: так діє, лише якщо модуль <b> %s </b> увімкнено RemoveLock=Видаліть або перейменуйте файл <b> %s </b>, якщо він існує, щоб дозволити використання інструменту "Оновити / Встановити". RestoreLock=Відновіть файл <b> %s </b>, лише з дозволом для читання, щоб відключити подальше використання інструменту "Оновити / Встановити". @@ -85,7 +87,6 @@ ShowPreview=Показати попередній перегляд ShowHideDetails=Show-Hide details PreviewNotAvailable=Попередній перегляд недоступний ThemeCurrentlyActive=Тема наразі активна -CurrentTimeZone=PHP TimeZone (сервер) MySQLTimeZone=TimeZone MySql (база даних) TZHasNoEffect=Дати зберігаються та повертаються сервером баз даних так, ніби вони зберігаються як подані рядки. Часовий пояс діє лише при використанні функції UNIX_TIMESTAMP (яку не використовує Dolibarr, тому часовий пояс бази даних не повинен мати ніякого ефекту, навіть якщо він був змінений після введення даних). Space=Простір @@ -153,8 +154,8 @@ SystemToolsAreaDesc=Ця область забезпечує функції ад Purge=Чистка PurgeAreaDesc=Ця сторінка дозволяє видалити всі файли, що були створені або зберігаються Dolibarr (тимчасові файли або всі файли в каталозі <b> %s </b>). Використовувати цю функцію зазвичай не потрібно. Вона надається як рішення для користувачів, у яких Dolibarr розміщений у провайдера, що не надає дозволу на видалення файлів, створених веб-сервером. PurgeDeleteLogFile=Видалення файлів журналів, включаючи <b> %s </b>, визначених для модуля Syslog (немає ризику втрати даних) -PurgeDeleteTemporaryFiles=Видаліть усі тимчасові файли (без ризику втрати даних). Примітка: Видалення робиться лише в тому випадку, якщо тимчасовий каталог був створений 24 години тому. -PurgeDeleteTemporaryFilesShort=Видалення тимчасових файлів +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 PurgeDeleteAllFilesInDocumentsDir=Видалить усі файли в каталозі: <b> %s </b>. <br> Це видалить усі згенеровані документи, пов'язані з елементами (контрагенти, рахунки тощо), файли, завантажені в модуль ECM, резервні копії бази даних та тимчасові файли. PurgeRunNow=Очистити зараз PurgeNothingToDelete=Немає каталогів або файлів для видалення. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Партнери OtherResources=Інші ресурси ExternalResources=Додаткові ресурси SocialNetworks=Соціальні мережі +SocialNetworkId=Social Network ID ForDocumentationSeeWiki=Для перегляду довідки користувача або документації розробника (Doc, FAQ...), <br> перейдіть на Dolibarr Wiki: <br> <b> <a href="%s" target="_blank"> %s </a> </b> ForAnswersSeeForum=Для будь-яких інших питань/допомоги ви можете скористатися форумом Dolibarr: <br> <b> <a href="%s" target="_blank"> %s </a> </b> HelpCenterDesc1=Ось деякі ресурси для отримання допомоги та підтримки з Dolibarr. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Приклади з поточною конфігура ListOfDirectories=Список каталогів шаблонів 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=Кількість файлів шаблонів ODT/ODS, знайдених у цих каталогах -ExampleOfDirectoriesForModelGen=Приклади синтаксису:<br>c:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed= <br> Щоб дізнатися, як створити шаблони odt-документів, перш ніж зберігати їх у цих каталогах, прочитайте документацію на wiki: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=Розміщення імені та прізвища @@ -406,7 +408,7 @@ UrlGenerationParameters=Параметри безпеки URL SecurityTokenIsUnique=Використовувати унікальний ключ безпеки для кожної URL-адреси EnterRefToBuildUrl=Введіть характеристику для об'єкта %s GetSecuredUrl=Отримати обчислену URL-адресу -ButtonHideUnauthorized=Заховати для звичайних користувачів кнопки привілейованих функцій, замість того щоб відображати їх затемненими. +ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) OldVATRates=Старе значення комісії NewVATRates=Нове значення комісії PriceBaseTypeToChange=Modify on prices with base reference value defined on @@ -668,7 +670,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 @@ -1306,7 +1308,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,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 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=New menu MenuHandler=Menu handler MenuModule=Source module -HideUnauthorizedMenu= Hide unauthorized menus (gray) +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 @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/uk_UA/banks.lang b/htdocs/langs/uk_UA/banks.lang index 676fdcd7500..5e37c104927 100644 --- a/htdocs/langs/uk_UA/banks.lang +++ b/htdocs/langs/uk_UA/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/uk_UA/blockedlog.lang b/htdocs/langs/uk_UA/blockedlog.lang index 5afae6e9e53..0bba5605d0f 100644 --- a/htdocs/langs/uk_UA/blockedlog.lang +++ b/htdocs/langs/uk_UA/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/uk_UA/boxes.lang b/htdocs/langs/uk_UA/boxes.lang index 187fb5abbfe..1dd858b093f 100644 --- a/htdocs/langs/uk_UA/boxes.lang +++ b/htdocs/langs/uk_UA/boxes.lang @@ -46,9 +46,12 @@ 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. @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Accountancy +ValidatedProjects=Validated projects diff --git a/htdocs/langs/uk_UA/cashdesk.lang b/htdocs/langs/uk_UA/cashdesk.lang index a77e6f6893f..a7372bb3b86 100644 --- a/htdocs/langs/uk_UA/cashdesk.lang +++ b/htdocs/langs/uk_UA/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=К-ть рахунків-фактур Paymentnumpad=Type of Pad to enter payment Numberspad=Numbers Pad @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/uk_UA/categories.lang b/htdocs/langs/uk_UA/categories.lang index ba37a43b4ec..4ddf0d6093f 100644 --- a/htdocs/langs/uk_UA/categories.lang +++ b/htdocs/langs/uk_UA/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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 diff --git a/htdocs/langs/uk_UA/companies.lang b/htdocs/langs/uk_UA/companies.lang index 7bb65732df0..e788c649905 100644 --- a/htdocs/langs/uk_UA/companies.lang +++ b/htdocs/langs/uk_UA/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi 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=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=Potential diff --git a/htdocs/langs/uk_UA/compta.lang b/htdocs/langs/uk_UA/compta.lang index f7643379a98..717985b9ddc 100644 --- a/htdocs/langs/uk_UA/compta.lang +++ b/htdocs/langs/uk_UA/compta.lang @@ -111,7 +111,7 @@ 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 ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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 diff --git a/htdocs/langs/uk_UA/cron.lang b/htdocs/langs/uk_UA/cron.lang index 87dc53e8b69..46c3b30f128 100644 --- a/htdocs/langs/uk_UA/cron.lang +++ b/htdocs/langs/uk_UA/cron.lang @@ -6,14 +6,15 @@ 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 -OrToLaunchASpecificJob=Or to check and launch a specific job +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 environement you can use Scheduled task tools 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 @@ -42,10 +43,11 @@ CronModule=Module CronNoJobs=No jobs registered CronPriority=Priority CronLabel=Label -CronNbRun=Nb. launch -CronMaxRun=Max number launch +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 @@ -56,16 +58,16 @@ CronNote=Comment CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Enable +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 exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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=Продавець @@ -76,8 +78,14 @@ 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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +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' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/uk_UA/errors.lang b/htdocs/langs/uk_UA/errors.lang index 893f4a35b65..5b26be724d9 100644 --- a/htdocs/langs/uk_UA/errors.lang +++ b/htdocs/langs/uk_UA/errors.lang @@ -5,8 +5,10 @@ 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. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ 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=Ref used for creation already exists. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/uk_UA/exports.lang b/htdocs/langs/uk_UA/exports.lang index 50ef674d821..e075edfbcbe 100644 --- a/htdocs/langs/uk_UA/exports.lang +++ b/htdocs/langs/uk_UA/exports.lang @@ -133,3 +133,4 @@ 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/uk_UA/mails.lang b/htdocs/langs/uk_UA/mails.lang index 754ce0cee4b..f6e418263bd 100644 --- a/htdocs/langs/uk_UA/mails.lang +++ b/htdocs/langs/uk_UA/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Оповіщення -NoNotificationsWillBeSent=No email notifications are planned for this event and company -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent +NotificationsAuto=Notifications Auto. +NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company +ANotificationsWillBeSent=1 automatic notification will be sent by email +SomeNotificationsWillBeSent=%s automatic notifications will be sent by email +AddNewNotification=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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +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/uk_UA/main.lang b/htdocs/langs/uk_UA/main.lang index 2f257767cd7..e1d4ca6a387 100644 --- a/htdocs/langs/uk_UA/main.lang +++ b/htdocs/langs/uk_UA/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=No template available for this email type AvailableVariables=Available substitution variables NoTranslation=Немає перекладу Translation=Translation +CurrentTimeZone=PHP TimeZone (сервер) EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria NoRecordFound=Записів не знайдено NoRecordDeleted=No record deleted NotEnoughDataYet=Not enough data @@ -85,6 +87,8 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C 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 @@ -220,6 +224,7 @@ Value=Value PersonalValue=Personal value NewObject=New %s NewValue=New value +OldValue=Old value %s CurrentValue=Current value Code=Code Type=Тип @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Option +Filters=Filters List=List FullList=Full list FullConversation=Full conversation @@ -650,6 +656,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 @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/uk_UA/modulebuilder.lang b/htdocs/langs/uk_UA/modulebuilder.lang index 2ac06ba7f55..7a72508aa33 100644 --- a/htdocs/langs/uk_UA/modulebuilder.lang +++ b/htdocs/langs/uk_UA/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/uk_UA/mrp.lang b/htdocs/langs/uk_UA/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/uk_UA/mrp.lang +++ b/htdocs/langs/uk_UA/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/uk_UA/other.lang b/htdocs/langs/uk_UA/other.lang index c6472c143db..6f41e992ef6 100644 --- a/htdocs/langs/uk_UA/other.lang +++ b/htdocs/langs/uk_UA/other.lang @@ -5,8 +5,6 @@ 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 -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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=Див. налаштування модуля %s NbOfAttachedFiles=Number of attached files/documents TotalSizeOfAttachedFiles=Total size of attached files/documents @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Right CalculatedWeight=Calculated weight CalculatedVolume=Calculated volume Weight=Weight -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/uk_UA/products.lang b/htdocs/langs/uk_UA/products.lang index de32e4bd5dc..80d7861289c 100644 --- a/htdocs/langs/uk_UA/products.lang +++ b/htdocs/langs/uk_UA/products.lang @@ -108,7 +108,8 @@ 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=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +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 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/uk_UA/projects.lang b/htdocs/langs/uk_UA/projects.lang index 6218178d78d..0ff4be4d522 100644 --- a/htdocs/langs/uk_UA/projects.lang +++ b/htdocs/langs/uk_UA/projects.lang @@ -76,15 +76,16 @@ MyActivities=My tasks/activities MyProjects=My projects MyProjectsArea=My projects Area DurationEffective=Effective duration -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Time +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/uk_UA/recruitment.lang b/htdocs/langs/uk_UA/recruitment.lang index a160e956958..04e0a8bb779 100644 --- a/htdocs/langs/uk_UA/recruitment.lang +++ b/htdocs/langs/uk_UA/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/uk_UA/sendings.lang b/htdocs/langs/uk_UA/sendings.lang index 43fa631631e..364df1eb8c9 100644 --- a/htdocs/langs/uk_UA/sendings.lang +++ b/htdocs/langs/uk_UA/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Other shipments for this order SendingsAndReceivingForSameOrder=Shipments and receipts for this order SendingsToValidate=Shipments to validate StatusSendingCanceled=Canceled +StatusSendingCanceledShort=Canceled StatusSendingDraft=Проект StatusSendingValidated=Validated (products to ship or already shipped) StatusSendingProcessed=Оброблений @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=More complete document model for delivery receipts (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/uk_UA/stocks.lang b/htdocs/langs/uk_UA/stocks.lang index fddb3382b60..e032197748f 100644 --- a/htdocs/langs/uk_UA/stocks.lang +++ b/htdocs/langs/uk_UA/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/uk_UA/ticket.lang b/htdocs/langs/uk_UA/ticket.lang index cc7caade32a..aa2c156c056 100644 --- a/htdocs/langs/uk_UA/ticket.lang +++ b/htdocs/langs/uk_UA/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Заявка-Типи TicketDictCategory=Заявка-Групи TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Комерційне питання +TicketTypeShortCOM=Комерційне питання TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Інший TicketSeverityShortLOW=Low TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=High -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=Мої заявки @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Не читаються Read=Прочитані Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Непрочитані TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/uk_UA/website.lang b/htdocs/langs/uk_UA/website.lang index ebd59dac2fa..447d9de9a65 100644 --- a/htdocs/langs/uk_UA/website.lang +++ b/htdocs/langs/uk_UA/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/uk_UA/withdrawals.lang b/htdocs/langs/uk_UA/withdrawals.lang index 533989bdd30..c3e1100a0c3 100644 --- a/htdocs/langs/uk_UA/withdrawals.lang +++ b/htdocs/langs/uk_UA/withdrawals.lang @@ -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>. ClassCredited=Classify credited @@ -131,7 +132,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,3 +148,5 @@ 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/uk_UA/workflow.lang b/htdocs/langs/uk_UA/workflow.lang index 299be277e1d..494a0424a75 100644 --- a/htdocs/langs/uk_UA/workflow.lang +++ b/htdocs/langs/uk_UA/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 diff --git a/htdocs/langs/uz_UZ/accountancy.lang b/htdocs/langs/uz_UZ/accountancy.lang index 3211a0b62df..9e084932477 100644 --- a/htdocs/langs/uz_UZ/accountancy.lang +++ b/htdocs/langs/uz_UZ/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Date Docref=Reference LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/uz_UZ/admin.lang b/htdocs/langs/uz_UZ/admin.lang index f1c41a3b62b..f9a6468d94a 100644 --- a/htdocs/langs/uz_UZ/admin.lang +++ b/htdocs/langs/uz_UZ/admin.lang @@ -56,6 +56,8 @@ 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. @@ -85,7 +87,6 @@ ShowPreview=Show preview ShowHideDetails=Show-Hide details PreviewNotAvailable=Preview not available ThemeCurrentlyActive=Theme currently active -CurrentTimeZone=TimeZone PHP (server) MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Dates are stored and returned by database server as if they were kept as submitted string. The timezone has effect only when using the UNIX_TIMESTAMP function (that should not be used by Dolibarr, so database TZ should have no effect, even if changed after data was entered). Space=Space @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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. @@ -256,6 +257,7 @@ 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. @@ -375,7 +377,7 @@ 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:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +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 @@ -406,7 +408,7 @@ UrlGenerationParameters=Parameters to secure URLs SecurityTokenIsUnique=Use a unique securekey parameter for each URL EnterRefToBuildUrl=Enter reference for object %s GetSecuredUrl=Get calculated URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +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 @@ -668,7 +670,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 @@ -1306,7 +1308,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,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 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=New menu MenuHandler=Menu handler MenuModule=Source module -HideUnauthorizedMenu= Hide unauthorized menus (gray) +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 @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/uz_UZ/banks.lang b/htdocs/langs/uz_UZ/banks.lang index 9500a5b8b2e..81a23238550 100644 --- a/htdocs/langs/uz_UZ/banks.lang +++ b/htdocs/langs/uz_UZ/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/uz_UZ/blockedlog.lang b/htdocs/langs/uz_UZ/blockedlog.lang index 5afae6e9e53..0bba5605d0f 100644 --- a/htdocs/langs/uz_UZ/blockedlog.lang +++ b/htdocs/langs/uz_UZ/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/uz_UZ/boxes.lang b/htdocs/langs/uz_UZ/boxes.lang index d6fd298a3a7..9a751483fb1 100644 --- a/htdocs/langs/uz_UZ/boxes.lang +++ b/htdocs/langs/uz_UZ/boxes.lang @@ -46,9 +46,12 @@ 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. @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Accountancy +ValidatedProjects=Validated projects diff --git a/htdocs/langs/uz_UZ/cashdesk.lang b/htdocs/langs/uz_UZ/cashdesk.lang index 498baa82200..3fef645d99d 100644 --- a/htdocs/langs/uz_UZ/cashdesk.lang +++ b/htdocs/langs/uz_UZ/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +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 @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/uz_UZ/categories.lang b/htdocs/langs/uz_UZ/categories.lang index ba37a43b4ec..4ddf0d6093f 100644 --- a/htdocs/langs/uz_UZ/categories.lang +++ b/htdocs/langs/uz_UZ/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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 diff --git a/htdocs/langs/uz_UZ/companies.lang b/htdocs/langs/uz_UZ/companies.lang index dadff6a7894..8dc815b522e 100644 --- a/htdocs/langs/uz_UZ/companies.lang +++ b/htdocs/langs/uz_UZ/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi 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=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=Potential diff --git a/htdocs/langs/uz_UZ/compta.lang b/htdocs/langs/uz_UZ/compta.lang index 8f4f058bb87..1afeb6e3727 100644 --- a/htdocs/langs/uz_UZ/compta.lang +++ b/htdocs/langs/uz_UZ/compta.lang @@ -111,7 +111,7 @@ 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 ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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 diff --git a/htdocs/langs/uz_UZ/cron.lang b/htdocs/langs/uz_UZ/cron.lang index d2da7ded67e..2ebdda1e685 100644 --- a/htdocs/langs/uz_UZ/cron.lang +++ b/htdocs/langs/uz_UZ/cron.lang @@ -6,14 +6,15 @@ 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 -OrToLaunchASpecificJob=Or to check and launch a specific job +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 environement you can use Scheduled task tools 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 @@ -42,10 +43,11 @@ CronModule=Module CronNoJobs=No jobs registered CronPriority=Priority CronLabel=Label -CronNbRun=Nb. launch -CronMaxRun=Max number launch +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 @@ -56,16 +58,16 @@ CronNote=Comment CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Enable +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 exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +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 @@ -76,8 +78,14 @@ 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 "Home - Admin tools - Scheduled jobs" to see and edit scheduled jobs. +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' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep +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/uz_UZ/errors.lang b/htdocs/langs/uz_UZ/errors.lang index 893f4a35b65..5b26be724d9 100644 --- a/htdocs/langs/uz_UZ/errors.lang +++ b/htdocs/langs/uz_UZ/errors.lang @@ -5,8 +5,10 @@ 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. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ 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=Ref used for creation already exists. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/uz_UZ/exports.lang b/htdocs/langs/uz_UZ/exports.lang index 2dcf4317e00..a0eb7161ef2 100644 --- a/htdocs/langs/uz_UZ/exports.lang +++ b/htdocs/langs/uz_UZ/exports.lang @@ -26,6 +26,8 @@ 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. @@ -131,3 +133,4 @@ 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/uz_UZ/mails.lang b/htdocs/langs/uz_UZ/mails.lang index 1235eef3b27..2d02c5ddcf9 100644 --- a/htdocs/langs/uz_UZ/mails.lang +++ b/htdocs/langs/uz_UZ/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Notifications -NoNotificationsWillBeSent=No email notifications are planned for this event and company -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent +NotificationsAuto=Notifications Auto. +NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company +ANotificationsWillBeSent=1 automatic notification will be sent by email +SomeNotificationsWillBeSent=%s automatic notifications will be sent by email +AddNewNotification=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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +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/uz_UZ/main.lang b/htdocs/langs/uz_UZ/main.lang index cc76ba88d89..1744926874f 100644 --- a/htdocs/langs/uz_UZ/main.lang +++ b/htdocs/langs/uz_UZ/main.lang @@ -28,7 +28,9 @@ 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 @@ -85,6 +87,8 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C 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 @@ -220,6 +224,7 @@ Value=Value PersonalValue=Personal value NewObject=New %s NewValue=New value +OldValue=Old value %s CurrentValue=Current value Code=Code Type=Type @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Option +Filters=Filters List=List FullList=Full list FullConversation=Full conversation @@ -650,6 +656,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 @@ -671,7 +678,7 @@ SendMail=Send email Email=Email NoEMail=No email AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=No mobile phone Owner=Owner FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/uz_UZ/modulebuilder.lang b/htdocs/langs/uz_UZ/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/uz_UZ/modulebuilder.lang +++ b/htdocs/langs/uz_UZ/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/uz_UZ/mrp.lang b/htdocs/langs/uz_UZ/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/uz_UZ/mrp.lang +++ b/htdocs/langs/uz_UZ/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/uz_UZ/other.lang b/htdocs/langs/uz_UZ/other.lang index 54c0572d453..7a895bb1ca5 100644 --- a/htdocs/langs/uz_UZ/other.lang +++ b/htdocs/langs/uz_UZ/other.lang @@ -5,8 +5,6 @@ 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 -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Right CalculatedWeight=Calculated weight CalculatedVolume=Calculated volume Weight=Weight -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/uz_UZ/products.lang b/htdocs/langs/uz_UZ/products.lang index 97db059594f..9ecc11ed93d 100644 --- a/htdocs/langs/uz_UZ/products.lang +++ b/htdocs/langs/uz_UZ/products.lang @@ -108,7 +108,8 @@ 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=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +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 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/uz_UZ/projects.lang b/htdocs/langs/uz_UZ/projects.lang index baf0ecde17f..05aa1f5a560 100644 --- a/htdocs/langs/uz_UZ/projects.lang +++ b/htdocs/langs/uz_UZ/projects.lang @@ -76,15 +76,16 @@ MyActivities=My tasks/activities MyProjects=My projects MyProjectsArea=My projects Area DurationEffective=Effective duration -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Time +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/uz_UZ/recruitment.lang b/htdocs/langs/uz_UZ/recruitment.lang index b775e78552e..437445f25dc 100644 --- a/htdocs/langs/uz_UZ/recruitment.lang +++ b/htdocs/langs/uz_UZ/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/uz_UZ/sendings.lang b/htdocs/langs/uz_UZ/sendings.lang index 5ce3b7f67e9..73bd9aebd42 100644 --- a/htdocs/langs/uz_UZ/sendings.lang +++ b/htdocs/langs/uz_UZ/sendings.lang @@ -30,6 +30,7 @@ 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 @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=More complete document model for delivery receipts (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/uz_UZ/stocks.lang b/htdocs/langs/uz_UZ/stocks.lang index 660443bcded..a1f55010139 100644 --- a/htdocs/langs/uz_UZ/stocks.lang +++ b/htdocs/langs/uz_UZ/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/uz_UZ/ticket.lang b/htdocs/langs/uz_UZ/ticket.lang index 59519282c80..982fff90ffa 100644 --- a/htdocs/langs/uz_UZ/ticket.lang +++ b/htdocs/langs/uz_UZ/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Other TicketSeverityShortLOW=Low TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=High -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Read Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/uz_UZ/website.lang b/htdocs/langs/uz_UZ/website.lang index 03e042e4be6..f17def114b8 100644 --- a/htdocs/langs/uz_UZ/website.lang +++ b/htdocs/langs/uz_UZ/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/uz_UZ/withdrawals.lang b/htdocs/langs/uz_UZ/withdrawals.lang index 114a8d9dd6c..059b3451c11 100644 --- a/htdocs/langs/uz_UZ/withdrawals.lang +++ b/htdocs/langs/uz_UZ/withdrawals.lang @@ -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>. ClassCredited=Classify credited @@ -131,7 +132,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,3 +148,5 @@ 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/uz_UZ/workflow.lang b/htdocs/langs/uz_UZ/workflow.lang index 299be277e1d..494a0424a75 100644 --- a/htdocs/langs/uz_UZ/workflow.lang +++ b/htdocs/langs/uz_UZ/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 diff --git a/htdocs/langs/vi_VN/accountancy.lang b/htdocs/langs/vi_VN/accountancy.lang index 0426ce8fd0b..24ec964a46d 100644 --- a/htdocs/langs/vi_VN/accountancy.lang +++ b/htdocs/langs/vi_VN/accountancy.lang @@ -16,6 +16,8 @@ ThisService=Dịch vụ này ThisProduct=Sản phẩm này DefaultForService=Mặc định cho dịch vụ DefaultForProduct=Mặc định cho sản phẩm +ProductForThisThirdparty=Product for this thirdparty +ServiceForThisThirdparty=Service for this thirdparty CantSuggest=Không thể gợi ý AccountancySetupDoneFromAccountancyMenu=Hầu hết các thiết lập của kế toán được thực hiện từ menu %s ConfigAccountingExpert=Configuration of the module accounting (double entry) @@ -48,6 +50,7 @@ CountriesExceptMe=Tất cả các quốc gia trừ %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=Tài khoản kế toán chính cho khách hàng không được định nghĩa trong thiết lập MainAccountForSuppliersNotDefined=Tài khoản kế toán chính cho các nhà cung cấp không được định nghĩa trong thiết lập @@ -144,7 +147,7 @@ NotVentilatedinAccount=Không liên kết với tài khoản kế toán XLineSuccessfullyBinded=%s sản phẩm/ dịch vụ được liên kết thành công với tài khoản kế toán XLineFailedToBeBinded=%s sản phẩm/ dịch vụ không bị ràng buộc với bất kỳ tài khoản kế toán nào -ACCOUNTING_LIMIT_LIST_VENTILATION=Số phần tử để liên kết được hiển thị theo trang (khuyến nghị tối đa: 50) +ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=Bắt đầu sắp xếp trang "Liên kết cần làm" theo các yếu tố gần đây nhất ACCOUNTING_LIST_SORT_VENTILATION_DONE=Bắt đầu sắp xếp trang "Liên kết" theo các yếu tố gần đây nhất @@ -198,7 +201,8 @@ Docdate=Ngày Docref=Tham chiếu LabelAccount=Nhãn tài khoản LabelOperation=Nhãn hoạt động -Sens=Ý nghĩa +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=Mã sắp đặt chữ Lettering=Sắp đặt chữ Codejournal=Nhật ký @@ -206,7 +210,8 @@ JournalLabel=Mã nhật ký NumPiece=Số lượng cái TransactionNumShort=Số Giao dịch AccountingCategory=Nhóm cá nhân hóa -GroupByAccountAccounting=Nhóm theo tài khoản kế toán +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. ByAccounts=Theo tài khoản ByPredefinedAccountGroups=Theo nhóm được xác định trước @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Thanh toán không được liên kết với bất k OpeningBalance=Opening balance ShowOpeningBalance=Xem số dư HideOpeningBalance=Ẩn số dư -ShowSubtotalByGroup=Show subtotal by group +ShowSubtotalByGroup=Show subtotal by level Pcgtype=Nhóm tài khoản PcgtypeDesc=Nhóm tài khoản được sử dụng làm tiêu chí 'bộ lọc' và 'nhóm' được xác định trước cho một số báo cáo kế toán. Ví dụ: 'THU NHẬP' hoặc 'CHI PHÍ' được sử dụng làm nhóm cho tài khoản kế toán của các sản phẩm để xây dựng báo cáo chi phí / thu nhập. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Tham khảo tại đây danh sách các dòng báo cáo DescVentilExpenseReportMore=Nếu bạn thiết lập tài khoản kế toán theo kiểu dòng báo cáo chi phí, ứng dụng sẽ có thể thực hiện tất cả các ràng buộc giữa các dòng báo cáo chi phí và tài khoản kế toán của hệ thống đồ tài khoản của bạn, chỉ bằng một cú nhấp chuột với nút <strong>"%s"</strong> . Nếu tài khoản không được đặt trong từ điển phí hoặc nếu bạn vẫn có một số dòng không bị ràng buộc với bất kỳ tài khoản nào, bạn sẽ phải thực hiện ràng buộc thủ công từ menu " <strong>%s</strong> ". DescVentilDoneExpenseReport=Tham khảo tại đây danh sách các dòng báo cáo chi phí và tài khoản kế toán phí của họ +Closure=Annual closure DescClosure=Tham khảo tại đây số lượng kết chuyển theo tháng không được xác nhận và năm tài chính đã mở OverviewOfMovementsNotValidated=Bước 1 / Tổng quan về các kết chuyển không được xác nhận. (Cần thiết để đóng một năm tài chính) +AllMovementsWereRecordedAsValidated=All movements were recorded as validated +NotAllMovementsCouldBeRecordedAsValidated=Not all movements could be recorded as validated ValidateMovements=Xác nhận các kết chuyển DescValidateMovements=Bất kỳ sửa đổi hoặc xóa viết, chữ và xóa sẽ bị cấm. Tất cả các mục cho một thi hành phải được xác nhận nếu không việc đóng sẽ không thể thực hiện được -SelectMonthAndValidate=Chọn tháng và xác nhận các kết chuyển ValidateHistory=Tự động ràng buộc AutomaticBindingDone=Tự động ràng buộc thực hiện xong @@ -293,6 +300,7 @@ Accounted=Tài khoản trên Sổ cái NotYetAccounted=Chưa hạch toán vào Sổ cái ShowTutorial=Chương trình hướng dẫn NotReconciled=Chưa đối chiếu +WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view ## Admin BindingOptions=Binding options @@ -337,6 +345,7 @@ Modelcsv_LDCompta10=Xuất cho chuẩn LD Compta (v10 hoặc cao hơn) Modelcsv_openconcerto=Xuất dữ liệu cho OpenConcerto (Kiểm tra) Modelcsv_configurable=Xuất dữ liệu cấu hình CSV Modelcsv_FEC=Xuất dữ liệu FEC +Modelcsv_FEC2=Export FEC (With dates generation writing / document reversed) Modelcsv_Sage50_Swiss=Xuất dữ liệu cho Sage 50 Thụy Sĩ Modelcsv_winfic=Export Winfic - eWinfic - WinSis Compta Modelcsv_Gestinumv3=Export for Gestinum (v3) diff --git a/htdocs/langs/vi_VN/admin.lang b/htdocs/langs/vi_VN/admin.lang index ef784047979..3daf83f7d2b 100644 --- a/htdocs/langs/vi_VN/admin.lang +++ b/htdocs/langs/vi_VN/admin.lang @@ -56,6 +56,8 @@ GUISetup=Hiển thị SetupArea=Thiết lập UploadNewTemplate=Tải lên (các) mẫu mới FormToTestFileUploadForm=Mẫu để thử nghiệm việc tải lên tập tin (dựa theo thiết lập) +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled IfModuleEnabled=Ghi chú: Yes chỉ có tác dụng nếu module <b>%s</b> được mở 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. @@ -85,7 +87,6 @@ ShowPreview=Hiển thị xem trước ShowHideDetails=Show-Hide details PreviewNotAvailable=Xem trước không sẵn có ThemeCurrentlyActive=Giao diện hiện đã kích hoạt -CurrentTimeZone=Mã vùng thời gian PHP (server) MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Ngày được lưu trữ và trả về bởi máy chủ cơ sở dữ liệu như thể chúng được giữ dưới dạng chuỗi đã gửi. Múi giờ chỉ có hiệu lực khi sử dụng hàm UNIX_TIMESTAMP (không nên sử dụng bởi Dolibarr, vì vậy TZ cơ sở dữ liệu sẽ không có hiệu lực, ngay cả khi đã thay đổi sau khi nhập dữ liệu). Space=Khoảng trống @@ -153,8 +154,8 @@ 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=Xóa tất cả các tệp tạm thời (không có nguy cơ mất dữ liệu). Lưu ý: Việc xóa chỉ được thực hiện nếu thư mục tạm thời được tạo 24 giờ trước. -PurgeDeleteTemporaryFilesShort=Xóa các tập tin tạm thời +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 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ờ PurgeNothingToDelete=Không có thư mục hoặc tập tin để xóa. @@ -256,6 +257,7 @@ ReferencedPreferredPartners=Đối tác ưu tiên OtherResources=Các tài nguyên khác ExternalResources=Tài nguyên bên ngoài SocialNetworks=Mạng xã hội +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=Dưới đây là một số tài nguyên để nhận trợ giúp và hỗ trợ với Dolibarr. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Ví dụ với cấu hình hiện tại ListOfDirectories=List of OpenDocument templates directories ListOfDirectoriesForModelGenODT=Danh sách các thư mục chứa các tệp mẫu với định dạng OpenDocument. <br><br> Đặt ở đây đường dẫn đầy đủ của các thư mục. <br> Thêm một trở lại đầu giữa thư mục eah. <br> Để thêm một thư mục của mô-đun GED, thêm ở đây <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b>.<br><br> Các tệp trong các thư mục đó phải kết thúc bằng <b>.odt</b> hoặc <b>.ods</b>. NumberOfModelFilesFound=Số tệp mẫu ODT / ODS được tìm thấy trong các thư mục này -ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +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=Chức vụ của Tên/Họ @@ -406,7 +408,7 @@ UrlGenerationParameters=Các thông số để bảo mật URL SecurityTokenIsUnique=Sử dụng một tham số securekey duy nhất cho mỗi URL EnterRefToBuildUrl=Nhập tham chiếu cho đối tượng %s GetSecuredUrl=Nhận URL được tính -ButtonHideUnauthorized=Ẩn các nút cho người dùng không phải quản trị viên cho các hành động không được phép thay vì hiển thị các nút bị tắt màu xám +ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) OldVATRates=Thuế suất VAT cũ NewVATRates=Thuế suất VAT mới PriceBaseTypeToChange=Sửa đổi về giá với giá trị tham chiếu cơ sở được xác định trên @@ -668,7 +670,7 @@ Module54000Desc=In trực tiếp (không mở tài liệu) bằng giao diện Cu Module55000Name=Thăm dò ý kiến, khảo sát hoặc bình chọn Module55000Desc=Tạo các cuộc thăm dò, khảo sát hoặc bình chọn trực tuyến (như Doodle, Studs, RDVz, v.v.) Module59000Name=Lợi nhuận -Module59000Desc=Module quản lý lợi nhuận +Module59000Desc=Module to follow margins Module60000Name=Hoa hồng Module60000Desc=Module quản lý hoa hồng Module62000Name=Incoterms @@ -1306,7 +1308,7 @@ YouUseBestDriver=Bạn sử dụng trình điều khiển %s, trình điều khi YouDoNotUseBestDriver=Bạn sử dụng trình điều khiển %s nhưng trình điều khiển %s được khuyến nghị. NbOfObjectIsLowerThanNoPb=Bạn chỉ có %s %s trong cơ sở dữ liệu. Điều này không yêu cầu bất kỳ tối ưu hóa cụ thể. SearchOptim=Tối ưu hóa tìm kiếm -YouHaveXObjectUseSearchOptim=Bạn có %s %s trong cơ sở dữ liệu. Bạn nên thêm hằng số %s thành 1 trong Nhà - Cài đặt - Khác. Giới hạn tìm kiếm ở đầu chuỗi giúp cơ sở dữ liệu có thể sử dụng các chỉ mục và bạn sẽ nhận được phản hồi ngay lập tức. +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=Bạn có %s %s trong cơ sở dữ liệu và hằng số %s được đặt thành 1 trong Nhà - Cài đặt - Khác. BrowserIsOK=Bạn đang sử dụng trình duyệt web %s. Trình duyệt này là ổn cho bảo mật và hiệu suất. BrowserIsKO=Bạn đang sử dụng trình duyệt web %s. Trình duyệt này được biết đến là một lựa chọn xấu cho bảo mật, hiệu suất và độ tin cậy. Chúng tôi khuyên bạn nên sử dụng Firefox, Chrome, Opera hoặc Safari. @@ -1596,8 +1598,13 @@ ServiceSetup=Cài đặt module dịch vụ ProductServiceSetup=Cài đặt module Sản phẩm và Dịch vụ NumberOfProductShowInSelect=Số lượng sản phẩm tối đa được hiển thị trong danh sách chọn kết hợp (0 = không giới hạn) ViewProductDescInFormAbility=Hiển thị các mô tả sản phẩm trong biểu mẫu (được hiển thị trong cửa sổ bật lên chú giải công cụ) +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=Kích hoạt trong sản phẩm/dịch vụ Tệp tệp đính kèm một tùy chọn để hợp nhất tài liệu PDF của sản phẩm với đề xuất PDF azur nếu sản phẩm/dịch vụ nằm trong đề xuất -ViewProductDescInThirdpartyLanguageAbility=Hiển thị mô tả sản phẩm bằng ngôn ngữ của bên thứ ba +ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) UseSearchToSelectProductTooltip=Ngoài ra, nếu bạn có số lượng lớn sản phẩm (> 100 000), bạn có thể tăng tốc độ bằng cách đặt hằng số PRODUCT_DONOTSEARCH_ANYWHERE thành 1 trong Cài đặt-> Khác. Tìm kiếm sau đó sẽ được giới hạn để bắt đầu chuỗi tìm kiếm. UseSearchToSelectProduct=Đợi cho đến khi bạn nhấn một phím trước khi tải nội dung của danh sách kết hợp sản phẩm - combo list (Điều này có thể tăng hiệu suất nếu bạn có số lượng lớn sản phẩm, nhưng nó không thuận tiện) SetDefaultBarcodeTypeProducts=Loại mã vạch mặc định để sử dụng cho các sản phẩm @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Các menu được cá nhân hóa không được li NewMenu=Menu mới MenuHandler=Xử lý menu MenuModule=Module nguồn -HideUnauthorizedMenu= Ẩn menu không được phép (màu xám) +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=ID menu DetailMenuHandler=Xử lý menu nơi hiển thị menu mới DetailMenuModule=Tên module nếu menu vào đến từ một module @@ -1983,11 +1990,12 @@ EMailHost=Máy chủ email IMAP MailboxSourceDirectory=Thư mục nguồn hộp thư MailboxTargetDirectory=Thư mục đích hộp thư EmailcollectorOperations=Hoạt động để làm bởi trình thu thập +EmailcollectorOperationsDesc=Operations are executed from top to bottom order MaxEmailCollectPerCollect=Số lượng email tối đa được thu thập trên mỗi thu thập CollectNow=Thu thập ngay bây giờ ConfirmCloneEmailCollector=Bạn có chắc chắn muốn sao chép trình thu thập Email %s không? -DateLastCollectResult=Ngày thu thập mới nhất đã thử -DateLastcollectResultOk=Ngày thu thập mới nhất thành công +DateLastCollectResult=Date of latest collect try +DateLastcollectResultOk=Date of latest collect success LastResult=Kết quả mới nhất EmailCollectorConfirmCollectTitle=Email xác nhận thu thập EmailCollectorConfirmCollect=Bạn có muốn chạy trình thu thập cho thu thập này bây giờ không? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Mã mục nhập menu (mainmenu) ECMAutoTree=Hiển thị cây ECM tự động @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/vi_VN/banks.lang b/htdocs/langs/vi_VN/banks.lang index 162d7062272..8a13699a9e8 100644 --- a/htdocs/langs/vi_VN/banks.lang +++ b/htdocs/langs/vi_VN/banks.lang @@ -173,10 +173,11 @@ SEPAMandate=Ủy quyền SEPA 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=Rào cản tiền mặt POS -NewCashFence=Rào cản tiền mặt mới +CashControl=POS cash desk control +NewCashFence=New cash desk 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 diff --git a/htdocs/langs/vi_VN/blockedlog.lang b/htdocs/langs/vi_VN/blockedlog.lang index d0ed0570da4..9b3a20f1438 100644 --- a/htdocs/langs/vi_VN/blockedlog.lang +++ b/htdocs/langs/vi_VN/blockedlog.lang @@ -8,7 +8,7 @@ BrowseBlockedLog=Nhật ký không thể thay đổi ShowAllFingerPrintsMightBeTooLong=Hiển thị tất cả các nhật ký lưu trữ (có thể dài) ShowAllFingerPrintsErrorsMightBeTooLong=Hiển thị tất cả các nhật ký lưu trữ không hợp lệ (có thể dài) DownloadBlockChain=Tải dấu vân tay -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=Lưu trữ nhật ký không hợp lệ. Nó có nghĩa là ai đó (một hacker?) Đã sửa đổi một số dữ liệu của lần này sau khi nó được ghi lại hoặc đã xóa bản ghi lưu trữ trước đó (kiểm tra dòng đó với # tồn tại trước đó). OkCheckFingerprintValidity=Bản ghi nhật ký lưu trữ là hợp lệ. Dữ liệu trên dòng này không được sửa đổi và mục nhập theo sau. OkCheckFingerprintValidityButChainIsKo=Nhật ký lưu trữ có vẻ hợp lệ so với trước đó nhưng chuỗi đã bị hỏng trước đó. AddedByAuthority=Lưu trữ vào ủy quyền từ xa @@ -35,7 +35,7 @@ logDON_DELETE=Đóng góp được xóa logic logMEMBER_SUBSCRIPTION_CREATE=Đăng ký thành viên đã tạo logMEMBER_SUBSCRIPTION_MODIFY=Đăng ký thành viên đã sửa đổi logMEMBER_SUBSCRIPTION_DELETE=Đăng ký thành viên đã xóa logic -logCASHCONTROL_VALIDATE=Hàng rào tiền mặt ghi lại +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Tải hóa đơn khách hàng BlockedLogBillPreview=Xem trước hóa đơn khách hàng BlockedlogInfoDialog=Chi tiết nhật ký diff --git a/htdocs/langs/vi_VN/boxes.lang b/htdocs/langs/vi_VN/boxes.lang index a92b40fb524..20c4c4c059e 100644 --- a/htdocs/langs/vi_VN/boxes.lang +++ b/htdocs/langs/vi_VN/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=Đóng góp sửa đổi mới nhất %s BoxTitleLastModifiedExpenses=Báo cáo chi phí sửa đổi mới nhất %s BoxTitleLatestModifiedBoms=BOMs sửa đổi mới nhất %s BoxTitleLatestModifiedMos=Đơn đặt hàng sản xuất sửa đổi mới nhất %s +BoxTitleLastOutstandingBillReached=Customers with maximum outstanding exceeded BoxGlobalActivity=Hoạt động toàn cầu (hoá đơn, đề xuất, đơn đặt hàng) BoxGoodCustomers=Khách hàng thân thiết BoxTitleGoodCustomers=%s Khách hàng thân thiết +BoxScheduledJobs=Công việc theo lịch trình +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Không thể làm mới thông lượng RSS. Ngày làm mới thành công mới nhất: %s LastRefreshDate=Ngày làm tươi mới nhất NoRecordedBookmarks=Không có dấu trang được xác định. @@ -92,8 +95,8 @@ LastXMonthRolling=%s tháng mới nhất ChooseBoxToAdd=Thêm widget vào bảng điều khiển của bạn BoxAdded=Widget đã được thêm vào trong bảng điều khiển của bạn BoxTitleUserBirthdaysOfMonth=Sinh nhật của tháng này (người dùng) -BoxLastManualEntries=Mục nhập thủ công cuối cùng trong kế toán -BoxTitleLastManualEntries=%s mục nhập thủ công mới nhất +BoxLastManualEntries=Latest record in accountancy entered manually or without source document +BoxTitleLastManualEntries=%s latest record entered manually or without source document NoRecordedManualEntries=Không có mục nhập thủ công được ghi lại trong kế toán BoxSuspenseAccount=Đếm hoạt động kế toán với tài khoản bị đình chỉ BoxTitleSuspenseAccount=Số dòng chưa phân bổ @@ -102,5 +105,7 @@ SuspenseAccountNotDefined=Tài khoản bị đình chỉ không được xác đ BoxLastCustomerShipments=Lô hàng cuối cùng của khách hàng BoxTitleLastCustomerShipments=Lô hàng mới nhất của khách hàng %s NoRecordedShipments=Không ghi nhận lô hàng của khách hàng +BoxCustomersOutstandingBillReached=Customers with oustanding limit reached # Pages AccountancyHome=Kế toán +ValidatedProjects=Validated projects diff --git a/htdocs/langs/vi_VN/cashdesk.lang b/htdocs/langs/vi_VN/cashdesk.lang index b71e1adb3c9..e988007469f 100644 --- a/htdocs/langs/vi_VN/cashdesk.lang +++ b/htdocs/langs/vi_VN/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Chân trang AmountAtEndOfPeriod=Số tiền cuối kỳ (ngày, tháng hoặc năm) TheoricalAmount=Số lượng lý thuyết RealAmount=Số tiền thực tế -CashFence=Cash fence -CashFenceDone=Rào cản tiền mặt được thực hiện trong kỳ +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=Nb của hoá đơn Paymentnumpad=Loại Bảng để nhập thanh toán Numberspad=Bảng số @@ -99,8 +99,9 @@ CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 = <br><b>{TN}</b>được sử dụng để thêm số thiết bị đầu cuối TakeposGroupSameProduct=Nhóm sản phẩm cùng dòng StartAParallelSale=Bắt đầu bán hàng mới -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +SaleStartedAt=Sale started at %s +ControlCashOpening=Control cash popup at opening POS +CloseCashFence=Close cash desk control CashReport=Báo cáo tiền mặt MainPrinterToUse=Máy in chính để dùng OrderPrinterToUse=Máy in đơn hàng để dùng @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/vi_VN/categories.lang b/htdocs/langs/vi_VN/categories.lang index bb15ed66bb6..c7947d9a0d0 100644 --- a/htdocs/langs/vi_VN/categories.lang +++ b/htdocs/langs/vi_VN/categories.lang @@ -19,6 +19,7 @@ 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 CatList=Danh sách thẻ/danh mục +CatListAll=List of tags/categories (all types) NewCategory=Thẻ/danh mục mới ModifCat=Sửa thẻ/ danh mục CatCreated=Thẻ/danh mục đã tạo @@ -65,16 +66,22 @@ UsersCategoriesShort=thẻ/ danh mục Người dùng StockCategoriesShort=thẻ/ danh mục Kho ThisCategoryHasNoItems=Danh mục này không có dữ liệu nào CategId=ID thẻ/ danh mục -CatSupList=Danh sách Nhà cung cấp thẻ/ danh mục -CatCusList=Danh sách khách hàng/ tiềm năng thẻ/ danh mục +ParentCategory=Parent tag/category +ParentCategoryLabel=Label of parent tag/category +CatSupList=List of vendors tags/categories +CatCusList=List of customers/prospects tags/categories CatProdList=Danh sách sản phẩm thẻ/danh mục CatMemberList=Danh sách thành viên thẻ/ danh mục -CatContactList=Danh sách liên lạc thẻ/ danh mục -CatSupLinks=Liên kết giữa nhà cung cấp và thẻ/ danh mục +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=Liên kết giữa khách hàng/ tiềm năng và thẻ/ danh mục CatContactsLinks=Liên kết Liên hệ/địa chỉ với danh mục CatProdLinks=Liên kết giữa sản phẩm/ dịch vụ và thẻ/ danh mục -CatProJectLinks=Liên kết giữa dự án và thẻ/ danh mục +CatMembersLinks=Links between members and tags/categories +CatProjectsLinks=Liên kết giữa dự án và thẻ/ danh mục +CatUsersLinks=Links between users and tags/categories DeleteFromCat=Xóa khỏi thẻ/ danh mục ExtraFieldsCategories=Thuộc tính bổ sung CategoriesSetup=Thiết lập thẻ/ danh mục diff --git a/htdocs/langs/vi_VN/companies.lang b/htdocs/langs/vi_VN/companies.lang index e559f40ecb5..38e3c5dad27 100644 --- a/htdocs/langs/vi_VN/companies.lang +++ b/htdocs/langs/vi_VN/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Kiểm tra ID VAT nội bộ cộng đồng trên tran VATIntraManualCheck=Bạn cũng có thể kiểm tra thủ công trên trang web của Ủy ban Châu Âu <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=Check not possible. Check service is not provided by the member state (%s). NorProspectNorCustomer=Không phải triển vọng, cũng không phải khách hàng -JuridicalStatus=Loại pháp nhân +JuridicalStatus=Business entity type Workforce=Workforce Staff=Nhân viên ProspectLevelShort=Tiềm năng diff --git a/htdocs/langs/vi_VN/compta.lang b/htdocs/langs/vi_VN/compta.lang index f1cc23cf244..fda16aecf93 100644 --- a/htdocs/langs/vi_VN/compta.lang +++ b/htdocs/langs/vi_VN/compta.lang @@ -111,7 +111,7 @@ Refund=Hoàn thuế SocialContributionsPayments=Thanh toán thuế xã hội / tài chính ShowVatPayment=Hiện nộp thuế GTGT TotalToPay=Tổng số trả -BalanceVisibilityDependsOnSortAndFilters=Số dư chỉ hiển thị trong danh sách này nếu bảng được sắp xếp tăng dần trên %s và được lọc cho 1 tài khoản ngân hàng +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=Mã kế toán khách hàng SupplierAccountancyCode=Mã kế toán nhà cung cấp CustomerAccountancyCodeShort=Mã K.toán K.H @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Bạn có chắc chắn muốn xóa khoản than 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> -CalcModeDebt=Phân tích các hóa đơn được ghi lại ngay cả khi chúng chưa được hạch toán vào sổ cái. +CalcModeDebt=Analysis of known recorded documents even if they are not yet accounted in ledger. CalcModeEngagement=Phân tích các khoản thanh toán được ghi lại, ngay cả khi chúng chưa được hạch toán vào sổ cái. CalcModeBookkeeping=Phân tích dữ liệu được báo cáo trong bảng Sổ sách kế toán. CalcModeLT1= Chế độ <b>%sRE trên hoá đơn của khách hàng - nhà cung cấp hoá đơn%s</b> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=Cán cân thu nhập và chi phí, tổng kết hà AnnualByCompanies=Cân đối thu nhập và chi phí, theo các nhóm tài khoản được xác định trước AnnualByCompaniesDueDebtMode=Cân đối thu nhập và chi phí, chi tiết theo các nhóm được xác định trước, chế độ <b>%sKhiếu nại - Nợ%s</b> cho biết <b>Kế toán cam kết</b> . AnnualByCompaniesInputOutputMode=Cân đối thu nhập và chi phí, chi tiết theo các nhóm được xác định trước, chế độ <b>%sThu nhập - Chi phí %s</b> cho biết <b>kế toán tiền mặt</b> . -SeeReportInInputOutputMode=Xem %s Phân tích thanh toán %s để biết tính toán về các khoản thanh toán thực tế được thực hiện ngay cả khi chúng chưa được hạch toán vào Sổ cái. -SeeReportInDueDebtMode=Xem %s phân tích hóa đơn%s để biết cách tính toán dựa trên hóa đơn đã ghi ngay cả khi chúng chưa được hạch toán vào Sổ cái. -SeeReportInBookkeepingMode=Xem <b>%s Sổ sách báo cáo %s</b> để biết tính toán trên <b>bảng Sổ sách kế toán</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=- Các khoản hiển thị là với tất cả các loại thuế bao gồm 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=- Nó bao gồm các khoản thanh toán thực tế được thực hiện trên hóa đơn, chi phí, VAT và tiền lương. <br> - Nó dựa trên ngày thanh toán của hóa đơn, chi phí, VAT và tiền lương. Ngày quyên góp. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=Nó hiển thị ghi nhận trong Sổ cái c SeePageForSetup=Xem menu <a href="%s">%s</a> để thiết lập DepositsAreNotIncluded=- Không bao gồm hóa đơn giảm thanh toán DepositsAreIncluded=- Bao gồm hóa đơn giảm thanh toán +LT1ReportByMonth=Tax 2 report by month +LT2ReportByMonth=Tax 3 report by month LT1ReportByCustomers=Báo cáo thuế 2 của bên thứ ba LT2ReportByCustomers=Báo cáo thuế 3 của bên thứ ba LT1ReportByCustomersES=Báo cáo của bên thứ ba RE LT2ReportByCustomersES=Báo cáo của bên thứ ba IRPF VATReport=Báo cáo thuế bán hàng VATReportByPeriods=Báo cáo thuế bán theo kỳ +VATReportByMonth=Sale tax report by month VATReportByRates=Báo cáo thuế bán hàng theo thuế suất 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 diff --git a/htdocs/langs/vi_VN/cron.lang b/htdocs/langs/vi_VN/cron.lang index 0a3630cf45d..3ea052d3289 100644 --- a/htdocs/langs/vi_VN/cron.lang +++ b/htdocs/langs/vi_VN/cron.lang @@ -7,13 +7,14 @@ Permission23103 = Xóa công việc theo lịch trình Permission23104 = Thực hiện công việc theo lịch trình # Admin CronSetup=Thiết lập quản lý công việc theo lịch trình -URLToLaunchCronJobs=URL để kiểm tra và khởi chạy các công việc định kỳ đủ điều kiện -OrToLaunchASpecificJob=Hoặc để kiểm tra và khởi động một công việc cụ thể +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=Khóa bảo mật cho URL để khởi chạy các công việc định kỳ FileToLaunchCronJobs=Dòng lệnh để kiểm tra và khởi chạy các công việc định kỳ đủ điều kiện CronExplainHowToRunUnix=Trên môi trường Unix, bạn nên sử dụng mục crontab sau để chạy dòng lệnh mỗi 5 phút CronExplainHowToRunWin=Trên môi trường Microsoft (tm) Windows, bạn có thể sử dụng các công cụ Tác vụ theo lịch để chạy dòng lệnh mỗi 5 phút CronMethodDoesNotExists=Lớp %s không chứa bất kỳ phương thức nào %s +CronMethodNotAllowed=Method %s of class %s is in blacklist of forbidden methods CronJobDefDesc=Hồ sơ công việc theo định kỳ được xác định vào tập tin mô tả mô-đun. Khi mô-đun được kích hoạt, chúng được tải và có sẵn để bạn có thể quản lý các công việc từ menu công cụ quản trị %s. CronJobProfiles=Danh sách hồ sơ công việc định kỳ được xác định trước # Menu @@ -46,6 +47,7 @@ CronNbRun=Số lần khởi chạy CronMaxRun=Số lần khởi chạy tối đa CronEach=Mỗi JobFinished=Công việc khởi chạy và kết thúc +Scheduled=Scheduled #Page card CronAdd= Thêm công việc CronEvery=Thực hiện mỗi công việc @@ -56,7 +58,7 @@ CronNote=Nhận xét CronFieldMandatory=Các trường %s là bắt buộc CronErrEndDateStartDt=Ngày kết thúc không thể trước ngày bắt đầu StatusAtInstall=Trạng thái khi cài đặt mô-đun -CronStatusActiveBtn=Kích hoạt +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Vô hiệu hoá CronTaskInactive=Công việc này bị vô hiệu hóa CronId=Id @@ -82,3 +84,8 @@ MakeLocalDatabaseDumpShort=Sao lưu cơ sở dữ liệu cục bộ MakeLocalDatabaseDump=Tạo một kết xuất cơ sở dữ liệu cục bộ. Các tham số là: nén('gz' hoặc 'bz' hoặc 'none'), loại sao lưu ('mysql', 'pssql', 'auto'), 1, 'auto' hoặc tên tệp để tạo, số lượng tệp sao lưu cần giữ WarningCronDelayed=Chú ý, vì mục đích hiệu suất, bất kể ngày nào là ngày thực hiện các công việc được kích hoạt, công việc của bạn có thể bị trì hoãn tối đa là %s giờ trước khi được chạy. DATAPOLICYJob=Trình dọn dẹp dữ liệu và ẩn danh +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/vi_VN/errors.lang b/htdocs/langs/vi_VN/errors.lang index 5c97da8e340..1413520f21d 100644 --- a/htdocs/langs/vi_VN/errors.lang +++ b/htdocs/langs/vi_VN/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=Không có lỗi, chúng tôi cam kết # Errors ErrorButCommitIsDone=Lỗi được tìm thấy nhưng chúng tôi xác nhận mặc dù điều này ErrorBadEMail=Email %s là sai +ErrorBadMXDomain=Email %s seems wrong (domain has no valid MX record) ErrorBadUrl=Url% s là sai ErrorBadValueForParamNotAString=Giá trị xấu cho tham số của bạn. Nói chung khi dịch bị thiếu. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=Đăng nhập% s đã tồn tại. ErrorGroupAlreadyExists=Nhóm% s đã tồn tại. ErrorRecordNotFound=Ghi lại không tìm thấy. @@ -48,6 +50,7 @@ ErrorFieldsRequired=Một số trường yêu cầu không được lấp đầy ErrorSubjectIsRequired=Chủ đề email là bắt buộc ErrorFailedToCreateDir=Không thể tạo một thư mục. Kiểm tra xem người sử dụng máy chủ web có quyền ghi vào thư mục tài liệu Dolibarr. Nếu tham số <b>safe_mode</b> được kích hoạt trên PHP này, hãy kiểm tra các tập tin php Dolibarr sở hữu cho người sử dụng máy chủ web (hoặc một nhóm). ErrorNoMailDefinedForThisUser=Không có thư xác định cho người dùng này +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=Tính năng này cần javascript để được kích hoạt để làm việc. Thay đổi điều này trong thiết lập - hiển thị. ErrorTopMenuMustHaveAParentWithId0=Một thực đơn của loại 'Top' không thể có một trình đơn phụ huynh. Đặt 0 trong trình đơn phụ huynh hoặc chọn một trình đơn của loại 'trái'. ErrorLeftMenuMustHaveAParentId=Một thực đơn của loại 'trái' phải có một id cha mẹ. @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=Tên hồ sơ này đã tồn tại cho bộ xuất k ErrorLDAPSetupNotComplete=Dolibarr-LDAP phù hợp là không đầy đủ. ErrorLDAPMakeManualTest=Một tập tin .ldif đã được tạo ra trong thư mục% s. Hãy thử để tải nó bằng tay từ dòng lệnh để có thêm thông tin về lỗi. ErrorCantSaveADoneUserWithZeroPercentage=Không thể lưu một hành động với "trạng thái chưa bắt đầu" nếu trường "được thực hiện bởi" cũng được điền. -ErrorRefAlreadyExists=Tài liệu tham khảo dùng để tạo đã tồn tại. +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorPleaseTypeBankTransactionReportName=Vui lòng nhập tên sao kê ngân hàng nơi mục nhập phải được báo cáo (Định dạng YYYYMM hoặc YYYYMMDD) ErrorRecordHasChildren=Không thể xóa hồ sơ vì nó có một số hồ sơ con. ErrorRecordHasAtLeastOneChildOfType=Đối tượng có ít nhất một con của loại %s @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=Bạn phải chọn nếu sản p ErrorDiscountLargerThanRemainToPaySplitItBefore=Giảm giá bạn cố gắng áp dụng là lớn hơn tiền còn lại để trả. Chia giảm giá trong 2 giảm giá nhỏ hơn trước. ErrorFileNotFoundWithSharedLink=Tập tin không được tìm thấy. Có thể là khóa chia sẻ đã được sửa đổi hoặc tập tin đã bị xóa gần đây. ErrorProductBarCodeAlreadyExists=Mã vạch sản phẩm %s đã tồn tại trên một tham chiếu sản phẩm khác. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Cũng lưu ý rằng việc sử dụng sản phẩm ảo để tự động tăng / giảm sản phẩm con là không thể khi ít nhất một sản phẩm phụ (hoặc sản phẩm phụ của sản phẩm phụ) cần số sê-ri/ lô. +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=Mô tả là bắt buộc đối với các dòng có sản phẩm miễn phí ErrorAPageWithThisNameOrAliasAlreadyExists=Trang/ khung chứa <strong>%s</strong> có cùng tên hoặc bí danh thay thế mà bạn cố gắng sử dụng ErrorDuringChartLoad=Lỗi khi tải hệ thống tài khoản. Nếu một vài tài khoản chưa được tải, bạn vẫn có thể nhập chúng theo cách thủ công. @@ -243,6 +246,16 @@ ErrorReplaceStringEmpty=Lỗi, cụm từ để thay thế đang trống 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=Giao diện công cộng không được kích hoạt +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 + # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Tham số PHP của bạn upload_max_filesize (%s) cao hơn tham số PHP post_max_size (%s). Đây không phải là một thiết lập phù hợp. WarningPasswordSetWithNoAccount=Một mật khẩu đã được đặt cho thành viên này. Tuy nhiên, không có tài khoản người dùng nào được tạo. Vì vậy, mật khẩu này được lưu trữ nhưng không thể được sử dụng để đăng nhập vào Dolibarr. Nó có thể được sử dụng bởi một mô-đun / giao diện bên ngoài nhưng nếu bạn không cần xác định bất kỳ thông tin đăng nhập hay mật khẩu nào cho thành viên, bạn có thể tắt tùy chọn "Quản lý đăng nhập cho từng thành viên" từ thiết lập mô-đun Thành viên. Nếu bạn cần quản lý thông tin đăng nhập nhưng không cần bất kỳ mật khẩu nào, bạn có thể để trống trường này để tránh cảnh báo này. Lưu ý: Email cũng có thể được sử dụng làm thông tin đăng nhập nếu thành viên được liên kết với người dùng. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Đăng nhập của bạn đã được s WarningAnEntryAlreadyExistForTransKey=Một mục đã tồn tại cho khóa dịch của ngôn ngữ này WarningNumberOfRecipientIsRestrictedInMassAction=Cảnh báo, số lượng người nhận khác nhau được giới hạn ở <b>%s</b> khi sử dụng các hành động hàng loạt trong danh sách WarningDateOfLineMustBeInExpenseReportRange=Cảnh báo, ngày của dòng không nằm trong phạm vi của báo cáo chi phí +WarningProjectDraft=Project is still in draft mode. Don't forget to validate it if you plan to use tasks. WarningProjectClosed=Dự án đã đóng. Bạn phải mở lại nó trước. WarningSomeBankTransactionByChequeWereRemovedAfter=Một số giao dịch ngân hàng đã bị xóa sau đó biên nhận bao gồm cả chúng được tạo ra. Vì vậy, số lượng séc và tổng số hóa đơn có thể khác với số lượng và tổng số trong danh sách. -WarningFailedToAddFileIntoDatabaseIndex=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/vi_VN/exports.lang b/htdocs/langs/vi_VN/exports.lang index 81f0901f077..f15be790dc6 100644 --- a/htdocs/langs/vi_VN/exports.lang +++ b/htdocs/langs/vi_VN/exports.lang @@ -26,6 +26,8 @@ FieldTitle=Tiêu đề trường NowClickToGenerateToBuildExportFile=Bây giờ, chọn định dạng tệp trong hộp combo và nhấp vào "Tạo" để tạo tệp xuất ... AvailableFormats=Các định dạng có sẵn LibraryShort=Thư viện +ExportCsvSeparator=Phân cách thập phân +ImportCsvSeparator=Phân cách thập phân Step=Bước FormatedImport=Trợ lý nhập dữ liệu FormatedImportDesc1=Mô-đun này cho phép bạn cập nhật dữ liệu hiện có hoặc thêm các đối tượng mới vào cơ sở dữ liệu từ một tệp mà không có kiến ​​thức kỹ thuật, sử dụng trợ lý. @@ -37,7 +39,7 @@ FormatedExportDesc3=Khi dữ liệu cần xuất được chọn, bạn có th Sheet=Bảng NoImportableData=Không có dữ liệu có thể nhập (không có mô-đun với định nghĩa để cho phép nhập dữ liệu) FileSuccessfullyBuilt=Tập tin được tạo -SQLUsedForExport=SQL Request used to extract data +SQLUsedForExport=Yêu cầu SQL để xuất liệu LineId=Id của dòng LineLabel=Nhãn của dòng LineDescription=Mô tả của dòng @@ -131,3 +133,4 @@ KeysToUseForUpdates=Khóa (cột) được sử dụng cho <b>cập nhật</b> d NbInsert=Số dòng được chèn: %s NbUpdate=Số dòng cập nhật: %s MultipleRecordFoundWithTheseFilters=Nhiều bản ghi đã được tìm thấy với các bộ lọc này: %s +StocksWithBatch=Stocks and location (warehouse) of products with batch/serial number diff --git a/htdocs/langs/vi_VN/mails.lang b/htdocs/langs/vi_VN/mails.lang index 200b7eae30b..59190543259 100644 --- a/htdocs/langs/vi_VN/mails.lang +++ b/htdocs/langs/vi_VN/mails.lang @@ -92,6 +92,7 @@ MailingModuleDescEmailsFromUser=Email đầu vào của người dùng MailingModuleDescDolibarrUsers=Người dùng có email MailingModuleDescThirdPartiesByCategories=Các bên thứ ba (theo danh mục) SendingFromWebInterfaceIsNotAllowed=Gửi từ giao diện web không được phép. +EmailCollectorFilterDesc=All filters must match to have an email being collected # Libelle des modules de liste de destinataires mailing LineInFile=Dòng %s trong tập tin @@ -125,12 +126,13 @@ TagMailtoEmail=Email người nhận (bao gồm liên kết "mailto:" html) NoEmailSentBadSenderOrRecipientEmail=Không có email nào được gửi. Người gửi hoặc người nhận email xấu. Xác nhận hồ sơ người dùng. # Module Notifications Notifications=Thông báo -NoNotificationsWillBeSent=Không có thông báo email được lên kế hoạch cho sự kiện này và công ty -ANotificationsWillBeSent=1 thông báo sẽ được gửi qua email -SomeNotificationsWillBeSent=Thông báo %s sẽ được gửi qua email -AddNewNotification=Kích hoạt email mới thông báo mục tiêu/sự kiện -ListOfActiveNotifications=Liệt kê tất cả các mục tiêu/sự kiện đang hoạt động để thông báo qua email -ListOfNotificationsDone=Liệt kê tất cả các thông báo email đã gửi +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=Cấu hình gửi email đã được thiết lập thành '%s'. Chế độ này không thể được sử dụng để gửi email hàng loạt. MailSendSetupIs2=Trước tiên, bạn phải đi, với tài khoản quản trị viên, vào menu %sNhà - Cài đặt - EMails %s để thay đổi tham số <strong>'%s'</strong> để sử dụng chế độ '%s' . Với chế độ này, bạn có thể nhập thiết lập máy chủ SMTP do Nhà cung cấp dịch vụ Internet của bạn cung cấp và sử dụng tính năng gửi email hàng loạt. MailSendSetupIs3=Nếu bạn có bất kỳ câu hỏi nào về cách thiết lập máy chủ SMTP của mình, bạn có thể hỏi %s. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Tệp đã nhập phải có định dạng <strong>e UseFormatInputEmailToTarget=Nhập một chuỗi với định dạng <strong>email;tên;họ;tênkhác</strong> MailAdvTargetRecipients=Người nhận (lựa chọn nâng cao) AdvTgtTitle=Điền vào các trường đầu vào để chọn trước bên thứ ba hoặc liên hệ / địa chỉ để nhắm mục tiêu -AdvTgtSearchTextHelp=Sử dụng %% làm ký tự đại diện. Ví dụ: để tìm tất cả các mục như <b>jean, joe, jim</b> , bạn có thể nhập <b>j%%</b> , bạn cũng có thể sử dụng; như dấu phân cách cho giá trị, và sử dụng! ngoại trừ giá trị này. Ví dụ: <b>jean; joe;jim%% ;!Jimo;!Jima%</b> sẽ nhắm mục tiêu tất cả jean, joe, bắt đầu với jim nhưng không phải jimo và không phải mọi thứ bắt đầu bằng jima +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=Sử dụng khoảng để chọn giá trị int hoặc float AdvTgtMinVal=Giá trị tối thiểu AdvTgtMaxVal=Gia trị tối đa @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Tạo bộ lọc AdvTgtOrCreateNewFilter=Tên bộ lọc mới NoContactWithCategoryFound=Không có liên lạc/địa chỉ với một danh mục được tìm thấy NoContactLinkedToThirdpartieWithCategoryFound=Không có liên lạc/địa chỉ với một danh mục được tìm thấy -OutGoingEmailSetup=Thiết lập email đi -InGoingEmailSetup=Thiết lập email đến -OutGoingEmailSetupForEmailing=Thiết lập email gửi đi (cho module %s) -DefaultOutgoingEmailSetup=Thiết lập email gửi đi mặc định +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=Thông tin ContactsWithThirdpartyFilter=Danh bạ với bộ lọc của bên thứ ba Unanswered=Unanswered Answered=Đã trả lời IsNotAnAnswer=Is not answer (initial email) IsAnAnswer=Is an answer of an initial email +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/vi_VN/main.lang b/htdocs/langs/vi_VN/main.lang index 4a0fe321d58..787b79af04c 100644 --- a/htdocs/langs/vi_VN/main.lang +++ b/htdocs/langs/vi_VN/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=Không có sẵn mẫu nào cho loại email này AvailableVariables=Các biến thay thế có sẵn NoTranslation=Không dịch Translation=Dịch +CurrentTimeZone=Mã vùng thời gian PHP (server) EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria NoRecordFound=Không tìm thấy bản ghi NoRecordDeleted=Không có bản ghi nào bị xóa NotEnoughDataYet=Không đủ dữ liệu @@ -85,6 +87,8 @@ FileWasNotUploaded=Một tập tin được chọn để đính kèm nhưng vẫ NbOfEntries=Số lượng các mục GoToWikiHelpPage=Đọc trợ giúp trực tuyến (Cần truy cập Internet) GoToHelpPage=Đọc giúp đỡ +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Trang chủ RecordSaved=Bản ghi đã lưu RecordDeleted=Bản ghi đã xóa RecordGenerated=Bản ghi được tạo @@ -220,6 +224,7 @@ Value=Giá trị PersonalValue=Giá trị cá nhân NewObject=Tạo mới %s NewValue=Giá trị mới +OldValue=Old value %s CurrentValue=Giá trị hiện tại Code=Mã Type=Loại @@ -433,6 +438,7 @@ RemainToPay=Còn lại để trả tiền Module=Mô-đun / Ứng dụng Modules=Mô-đun / Ứng dụng Option=Tùy chọn +Filters=Filters List=Danh sách FullList=Danh mục đầy đủ FullConversation=Full conversation @@ -650,6 +656,7 @@ SupplierPreview=Xem trước nhà cung cấp ShowCustomerPreview=Xem trước khách hàng hiển thị ShowSupplierPreview=Hiển thị xem trước nhà cung cấp RefCustomer=Tham chiếu khách hàng +InternalRef=Internal ref. Currency=Tiền tệ InfoAdmin=Thông tin dành cho người quản trị Undo=Lùi lại @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/vi_VN/modulebuilder.lang b/htdocs/langs/vi_VN/modulebuilder.lang index f2aa036ec7d..d8c8e376b9b 100644 --- a/htdocs/langs/vi_VN/modulebuilder.lang +++ b/htdocs/langs/vi_VN/modulebuilder.lang @@ -40,6 +40,7 @@ PageForCreateEditView=Trang PHP để tạo/chỉnh sửa/xem bản ghi PageForAgendaTab=Trang PHP cho tab sự kiện PageForDocumentTab=Trang PHP cho tab tài liệu PageForNoteTab=Trang PHP cho tab ghi chú +PageForContactTab=PHP page for contact tab PathToModulePackage=Đường dẫn đến zip của gói mô-đun/ứng dụng PathToModuleDocumentation=Đường dẫn đến tệp tài liệu mô-đun/ứng dụng (%s) SpaceOrSpecialCharAreNotAllowed=Khoảng trắng hoặc ký tự đặc biệt không được phép. @@ -77,7 +78,7 @@ IsAMeasure=Là một phép do DirScanned=Thư mục được quét NoTrigger=Không trigger NoWidget=Không có widget -GoToApiExplorer=Đi tới trình khám phá API +GoToApiExplorer=API explorer ListOfMenusEntries=Danh sách các mục menu ListOfDictionariesEntries=Danh sách các mục từ điển ListOfPermissionsDefined=Danh sách các quyền được định nghĩa @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=Nếu bạn có kiến thức về SQL và PHP, bạn c SeeTopRightMenu=Xem <span class="fa fa-bug"></span> trên menu bên phải AddLanguageFile=Thêm tập tin ngôn ngữ YouCanUseTranslationKey=Bạn có thể sử dụng ở đây một khóa là khóa dịch được tìm thấy trong tệp ngôn ngữ (xem tab "Ngôn ngữ") -DropTableIfEmpty=(Xóa bảng nếu trống) +DropTableIfEmpty=(Destroy table if empty) TableDoesNotExists=Bảng %s không tồn tại TableDropped=Bảng %s đã bị xóa InitStructureFromExistingTable=Xây dựng cấu trúc mảng chuỗi của một bảng hiện có @@ -126,7 +127,6 @@ UseSpecificEditorURL = Sử dụng một URL biên tập cụ thể UseSpecificFamily = Sử dụng một họ cụ thể UseSpecificAuthor = Sử dụng một tác giả cụ thể UseSpecificVersion = Sử dụng một phiên bản mở đầu cụ thể -ModuleMustBeEnabled=Mô-đun / ứng dụng phải được bật trước IncludeRefGeneration=Tham chiếu của đối tượng phải được tạo tự động IncludeRefGenerationHelp=Kiểm tra điều này nếu bạn muốn bao gồm mã để quản lý việc tạo tự động của tham chiếu IncludeDocGeneration=Tôi muốn tạo một số tài liệu từ đối tượng @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Kiểu trường: <br> varchar (99), double (24,8), real, text, AsciiToHtmlConverter=Chuyển mã ASCII sang HTML AsciiToPdfConverter=Chuyển ASCII sang PDF 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/vi_VN/mrp.lang b/htdocs/langs/vi_VN/mrp.lang index 5ca0bd1ddbf..1133ac46a0b 100644 --- a/htdocs/langs/vi_VN/mrp.lang +++ b/htdocs/langs/vi_VN/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/vi_VN/other.lang b/htdocs/langs/vi_VN/other.lang index a5a94478621..5ad76877a81 100644 --- a/htdocs/langs/vi_VN/other.lang +++ b/htdocs/langs/vi_VN/other.lang @@ -5,8 +5,6 @@ Tools=Công cụ TMenuTools=Công cụ ToolsDesc=Tất cả các công cụ không bao gồm trong các mục menu khác được nhóm ở đây. <br> Tất cả các công cụ có thể được truy cập thông qua menu bên trái. Birthday=Sinh nhật -BirthdayDate=Ngày sinh nhật -DateToBirth=Ngày sinh BirthdayAlertOn=sinh nhật cảnh báo hoạt động BirthdayAlertOff=sinh nhật không hoạt động cảnh báo TransKey=Dịch khóa TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Tháng trước (số 1-12) ngày hóa đơn TextPreviousMonthOfInvoice=Tháng trước (chữ) của ngày hóa đơn NextMonthOfInvoice=Tháng sau (số 1-12) của ngày hóa đơn TextNextMonthOfInvoice=Tháng sau (chữ) của ngày hóa đơn +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Tệp zip được tạo vào <b>%s</b> . DocFileGeneratedInto=Tệp doc được tạo vào <b>%s</b> . JumpToLogin=Ngắt kết nối. Chuyển đến trang đăng nhập ... @@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Báo cáo chi phí được xác nhận (yêu c Notify_EXPENSE_REPORT_APPROVE=Báo cáo chi phí đã được phê duyệt Notify_HOLIDAY_VALIDATE=Yêu cầu nghỉ phép được xác nhận (yêu cầu phê duyệt) Notify_HOLIDAY_APPROVE=Yêu cầu nghỉ phép đã được phê duyệt +Notify_ACTION_CREATE=Added action to Agenda SeeModuleSetup=Xem thiết lập mô-đun %s NbOfAttachedFiles=Số đính kèm tập tin / tài liệu TotalSizeOfAttachedFiles=Tổng dung lượng của các file đính kèm / tài liệu @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__ (Xin chào) __ \n\nVui lòng tìm vận chu PredefinedMailContentSendFichInter=__ (Xin chào) __ \n\nVui lòng tìm sự can thiệp __REF__ đính kèm \n\n\n__ (Trân trọng) __ \n\n__USER_SIGNATURE__ PredefinedMailContentLink=Bạn có thể nhấp vào liên kết bên dưới để thực hiện thanh toán nếu chưa được thực hiện.\n\n %s\n\n PredefinedMailContentGeneric=__ (Xin chào) __ \n\n\n__ (Trân trọng) __ \n\n__USER_SIGNATURE__ +PredefinedMailContentSendActionComm=Event reminder "__EVENT_LABEL__" on __EVENT_DATE__ at __EVENT_TIME__<br><br>This is an automatic message, please do not reply. DemoDesc=Dolibarr là một ERP / CRM nhỏ gọn hỗ trợ một số mô-đun kinh doanh. Một bản demo giới thiệu tất cả các mô-đun không có ý nghĩa vì kịch bản này không bao giờ xảy ra (có sẵn hàng trăm). Vì vậy, một số hồ sơ demo là có sẵn. ChooseYourDemoProfil=Chọn hồ sơ demo phù hợp nhất với nhu cầu của bạn ... ChooseYourDemoProfilMore=... hoặc xây dựng hồ sơ của riêng bạn <br> (lựa chọn mô-đun thủ công) @@ -214,6 +216,7 @@ EMailTextExpenseReportValidated=Báo cáo chi phí %s đã được xác nhận. EMailTextExpenseReportApproved=Báo cáo chi phí %s đã được phê duyệt. EMailTextHolidayValidated=Yêu cầu nghỉ phép %s đã được xác nhận. EMailTextHolidayApproved=Yêu cầu nghỉ phép %s đã được phê duyệt. +EMailTextActionAdded=The action %s has been added to the Agenda. ImportedWithSet=Thiết lập nhập dữ liệu DolibarrNotification=Thông báo tự động ResizeDesc=Nhập chiều rộng mới <b>HOẶC</b> chiều cao mới. Tỷ lệ sẽ được giữ trong khi thay đổi kích thước ... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Liên hệ / địa chỉ được tạo bởi tr ProjectCreatedByEmailCollector=Dự án được tạo bởi trình thu thập email từ email MSGID %s TicketCreatedByEmailCollector=Vé được tạo bởi trình thu thập email từ email MSGID %s OpeningHoursFormatDesc=Sử dụng một - để tách giờ mở và đóng cửa. <br> Sử dụng một khoảng trắng để nhập các phạm vi khác nhau. <br> Ví dụ: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Khu vực xuất khẩu diff --git a/htdocs/langs/vi_VN/products.lang b/htdocs/langs/vi_VN/products.lang index d2ec4ce1cdc..2e0982b1ff6 100644 --- a/htdocs/langs/vi_VN/products.lang +++ b/htdocs/langs/vi_VN/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Nhiều phân khúc giá cho mỗi sản phẩm/ dịch vụ (mỗi khách hàng một phân khúc giá) MultiPricesNumPrices=Số lượng Giá DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=Số lượng của gói sản phẩm gốc @@ -167,8 +168,10 @@ BuyingPrices=Giá mua CustomerPrices=Giá khách hàng SuppliersPrices=Giá nhà cung cấp SuppliersPricesOfProductsOrServices=Giá nhà cung cấp (của sản phẩm hoặc dịch vụ) -CustomCode=Hải quan / Hàng hóa / HS code +CustomCode=Customs|Commodity|HS code CountryOrigin=Nước xuất xứ +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Loại sản phẩm (nguyên liệu / thành phẩm) NatureOfProductShort=Nature of product NatureOfProductDesc=Raw material or finished product @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Sử dụng giá cố định PriceByQuantity=Giá thay đổi theo số lượng DisablePriceByQty=Vô hiệu giá theo số lượng PriceByQuantityRange=Phạm vi số lượng -MultipriceRules=Quy tắc giá thành phần +MultipriceRules=Automatic prices for segment UseMultipriceRules=Sử dụng các quy tắc phân khúc giá (được định nghĩa bên trong thiết lập module sản phẩm) để tự động tính giá của tất cả phân khúc giá khác dựa theo phân khúc đầu tiên PercentVariationOver=%% biến đổi hơn %s PercentDiscountOver=%% giảm giá hơn %s diff --git a/htdocs/langs/vi_VN/projects.lang b/htdocs/langs/vi_VN/projects.lang index 66a08436bc7..0337979bc3b 100644 --- a/htdocs/langs/vi_VN/projects.lang +++ b/htdocs/langs/vi_VN/projects.lang @@ -76,15 +76,16 @@ MyActivities=Tác vụ/hoạt động của tôi MyProjects=Dự án của tôi MyProjectsArea=Khu vực dự án của tôi DurationEffective=Thời hạn hiệu lực -ProgressDeclared=Tiến độ công bố +ProgressDeclared=Declared real progress TaskProgressSummary=Tiến độ công việc CurentlyOpenedTasks=Công việc còn mở -TheReportedProgressIsLessThanTheCalculatedProgressionByX=Tiến độ khai báo ít hơn %s so với tiến độ tính toán -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=Tiến độ khai báo là nhiều hơn %s so với tiến độ tính toán -ProgressCalculated=Tiến độ được tính toán +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=cái mà tôi liên kết đến WhichIamLinkedToProject=cái mà tôi liên kết với dự án Time=Thời gian +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 diff --git a/htdocs/langs/vi_VN/recruitment.lang b/htdocs/langs/vi_VN/recruitment.lang index c0feca4d244..c62da50ed0c 100644 --- a/htdocs/langs/vi_VN/recruitment.lang +++ b/htdocs/langs/vi_VN/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/vi_VN/sendings.lang b/htdocs/langs/vi_VN/sendings.lang index 9bf1264e824..0311215ed2a 100644 --- a/htdocs/langs/vi_VN/sendings.lang +++ b/htdocs/langs/vi_VN/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=Lô hàng khác về đơn hàng này SendingsAndReceivingForSameOrder=Lô hàng và biên nhận cho đơn đặt hàng này SendingsToValidate=Xác nhận lô hàng StatusSendingCanceled=Hủy bỏ +StatusSendingCanceledShort=Đã hủy StatusSendingDraft=Dự thảo StatusSendingValidated=Xác nhận (sản phẩm để vận chuyển hoặc đã được vận chuyển) StatusSendingProcessed=Xử lý @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=Trước tiên, bạn phải xác nhận đơn # Sending methods # ModelDocument DocumentModelTyphon=Mô hình tài liệu đầy đủ hơn cho hóa đơn giao hàng (logo ...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=EXPEDITION_ADDON_NUMBER liên tục không được xác định SumOfProductVolumes=Tổng khối lượng sản phẩm SumOfProductWeights=Tổng trọng lượng sản phẩm diff --git a/htdocs/langs/vi_VN/stocks.lang b/htdocs/langs/vi_VN/stocks.lang index b2c7c324651..d25ecfa620a 100644 --- a/htdocs/langs/vi_VN/stocks.lang +++ b/htdocs/langs/vi_VN/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Kho mặc định @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/vi_VN/ticket.lang b/htdocs/langs/vi_VN/ticket.lang index ea5424e4654..572f49247ce 100644 --- a/htdocs/langs/vi_VN/ticket.lang +++ b/htdocs/langs/vi_VN/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Vé - Các loại TicketDictCategory=Vé - Nhóm TicketDictSeverity=Vé - Mức độ nghiêm trọng TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Sự cố phần mềm -TicketTypeShortBUGHARD=Sự cố phần cứng -TicketTypeShortCOM=Câu hỏi thương mại +TicketTypeShortCOM=Câu hỏi thương mại TicketTypeShortHELP=Yêu cầu trợ giúp chức năng TicketTypeShortISSUE=Sự cố, lỗi hoặc vấn đề TicketTypeShortREQUEST=Yêu cầu thay đổi hoặc nâng cao @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Khác TicketSeverityShortLOW=Thấp TicketSeverityShortNORMAL=Bình thường TicketSeverityShortHIGH=Cao -TicketSeverityShortBLOCKING=Quan trọng / Chặn +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Trường '%s' không chính xác MenuTicketMyAssign=Vé của tôi @@ -60,7 +58,6 @@ OriginEmail=Nguồn email Notify_TICKET_SENTBYMAIL=Gửi tin nhắn vé qua email # Status -NotRead=Chưa đọc Read=Đọc Assigned=Phân công InProgress=Trong tiến trình xử lý @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Giao diện công cộng cho phép bất kỳ TicketsAutoAssignTicket=Tự động chỉ định người dùng đã tạo vé TicketsAutoAssignTicketHelp=Khi tạo vé, người dùng có thể được tự động chỉ định cho vé. TicketNumberingModules=Mô-đun đánh số vé +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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Trạng thái đã thay đổi: %s thành %s TicketNotNotifyTiersAtCreate=Không thông báo cho công ty khi tạo Unread=Chưa đọc TicketNotCreatedFromPublicInterface=Không có sẵn. Vé không được tạo từ giao diện công cộng. -PublicInterfaceNotEnabled=Giao diện công cộng không được kích hoạt ErrorTicketRefRequired=Tên tham chiếu vé là bắt buộc # diff --git a/htdocs/langs/vi_VN/website.lang b/htdocs/langs/vi_VN/website.lang index 5d047fe8420..5f40936142b 100644 --- a/htdocs/langs/vi_VN/website.lang +++ b/htdocs/langs/vi_VN/website.lang @@ -30,7 +30,6 @@ EditInLine=Chỉnh sửa nội tuyến AddWebsite=Thêm trang web Webpage=Trang web / vùng chứa AddPage=Thêm trang / vùng chứa -HomePage=Trang chủ PageContainer=Trang PreviewOfSiteNotYetAvailable=Xem trước trang web của bạn <strong>%s</strong> chưa có sẵn. Trước tiên, bạn phải ' <strong>Nhập mẫu trang web đầy đủ</strong> ' hoặc chỉ ' <strong>Thêm trang / vùng chứa</strong> '. RequestedPageHasNoContentYet=Trang được yêu cầu có id %s chưa có nội dung hoặc tệp bộ đệm .tpl.php đã bị xóa. Chỉnh sửa nội dung của trang để giải quyết điều này. @@ -101,7 +100,7 @@ EmptyPage=Trang trống ExternalURLMustStartWithHttp=URL bên ngoài phải bắt đầu bằng http:// hoặc https:// ZipOfWebsitePackageToImport=Tải lên tệp Zip của gói mẫu trang web ZipOfWebsitePackageToLoad=hoặc Chọn gói mẫu trang web nhúng có sẵn -ShowSubcontainers=Bao gồm nội dung động +ShowSubcontainers=Show dynamic content InternalURLOfPage=URL nội bộ của trang ThisPageIsTranslationOf=Trang / vùng chứa này là bản dịch của ThisPageHasTranslationPages=Trang / vùng chứa này có bản dịch @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/vi_VN/withdrawals.lang b/htdocs/langs/vi_VN/withdrawals.lang index c3e19547427..2b2c1e76554 100644 --- a/htdocs/langs/vi_VN/withdrawals.lang +++ b/htdocs/langs/vi_VN/withdrawals.lang @@ -42,6 +42,7 @@ LastWithdrawalReceipt=Biên nhận ghi nợ trực tiếp mới nhất %s MakeWithdrawRequest=Tạo một yêu cầu thanh toán ghi nợ trực tiếp MakeBankTransferOrder=Make a credit transfer request WithdrawRequestsDone=%s yêu cầu thanh toán ghi nợ trực tiếp được ghi lại +BankTransferRequestsDone=%s credit transfer requests recorded ThirdPartyBankCode=Mã ngân hàng của bên thứ ba NoInvoiceCouldBeWithdrawed=Không có hóa đơn ghi nợ thành công. Kiểm tra xem hóa đơn có trên các công ty có IBAN hợp lệ không và IBAN có UMR (Tham chiếu ủy quyền duy nhất) với chế độ <strong>%s</strong> . ClassCredited=Phân loại tín dụng @@ -131,7 +132,8 @@ SEPARCUR=SEPA CUR SEPAFRST=SEPA FRST ExecutionDate=Ngày thi hành CreateForSepa=Tạo tập tin ghi nợ trực tiếp -ICS=Định danh chủ nợ CI +ICS=Creditor Identifier CI for direct debit +ICSTransfer=Creditor Identifier CI for bank transfer END_TO_END=Thẻ SEPA XML "EndToEndId" - Id duy nhất được gán cho mỗi giao dịch USTRD=Thẻ SEPA XML "không cấu trúc" ADDDAYS=Thêm ngày vào Ngày thực hiện @@ -146,3 +148,5 @@ InfoRejectSubject=Lệnh thanh toán ghi nợ trực tiếp bị từ chối InfoRejectMessage=Xin chào, <br><br> lệnh thanh toán ghi nợ trực tiếp của hóa đơn %s liên quan đến công ty %s, với số tiền %s đã bị ngân hàng từ chối. <br><br> - <br> %s ModeWarning=Tùy chọn cho chế độ thực không được đặt, chúng tôi dừng lại sau mô phỏng này ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. +ErrorICSmissing=Missing ICS in Bank account %s +TotalAmountOfdirectDebitOrderDiffersFromSumOfLines=Total amount of direct debit order differs from sum of lines diff --git a/htdocs/langs/vi_VN/workflow.lang b/htdocs/langs/vi_VN/workflow.lang index 0084de738c3..5926b4e4b9b 100644 --- a/htdocs/langs/vi_VN/workflow.lang +++ b/htdocs/langs/vi_VN/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=Tạo tự động AutomaticClassification=Phân loại tự động +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/zh_CN/accountancy.lang b/htdocs/langs/zh_CN/accountancy.lang index 9a49f373c52..5bfcb481baa 100644 --- a/htdocs/langs/zh_CN/accountancy.lang +++ b/htdocs/langs/zh_CN/accountancy.lang @@ -16,6 +16,8 @@ ThisService=这项服务 ThisProduct=这个产品 DefaultForService=默认服务 DefaultForProduct=默认产品 +ProductForThisThirdparty=Product for this thirdparty +ServiceForThisThirdparty=Service for this thirdparty CantSuggest=无法建议 AccountancySetupDoneFromAccountancyMenu=大多数会计设置都是从​​菜单%s完成的 ConfigAccountingExpert=Configuration of the module accounting (double entry) @@ -48,6 +50,7 @@ CountriesExceptMe=除%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=未在设置中定义的顾客的主要会计科目 MainAccountForSuppliersNotDefined=未在设置中定义的供应商的主要会计科目 @@ -144,7 +147,7 @@ NotVentilatedinAccount=未绑定到会计科目 XLineSuccessfullyBinded=%s产品/服务绑定到会计科目 XLineFailedToBeBinded=%s产品/服务未绑定到会计科目 -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=按“最近"对“即将绑定”页面进行排序 ACCOUNTING_LIST_SORT_VENTILATION_DONE=按"最近"对"绑定完成"页面进行排序 @@ -198,7 +201,8 @@ Docdate=日期 Docref=参考 LabelAccount=标签帐户 LabelOperation=标签操作 -Sens=SENS +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=Lettering Codejournal=日记帐 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=件数 TransactionNumShort=Num. transaction AccountingCategory=会计分类 -GroupByAccountAccounting=按会计科目分组 +GroupByAccountAccounting=Group by general ledger account +GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=您可以在此处定义一些会计科目组。它们将用于会计分类报告。 ByAccounts=按帐户 ByPredefinedAccountGroups=按预定义的组 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=付款未与任何产品/服务相关联 OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +ShowSubtotalByGroup=Show subtotal by level Pcgtype=帐户组 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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=请在此处查看费用会计帐户绑定(或不绑 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=请在此查询费用报表行及其费用会计帐户清单 +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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=自动绑定 AutomaticBindingDone=自动绑定完成 @@ -293,6 +300,7 @@ Accounted=占总账 NotYetAccounted=尚未计入分类帐 ShowTutorial=Show Tutorial NotReconciled=未调解 +WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view ## Admin BindingOptions=Binding options @@ -337,6 +345,7 @@ Modelcsv_LDCompta10=Export for LD Compta (v10 & higher) Modelcsv_openconcerto=Export for OpenConcerto (Test) Modelcsv_configurable=导出CSV可配置 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) diff --git a/htdocs/langs/zh_CN/admin.lang b/htdocs/langs/zh_CN/admin.lang index c84a23958aa..0c6ae1ca992 100644 --- a/htdocs/langs/zh_CN/admin.lang +++ b/htdocs/langs/zh_CN/admin.lang @@ -56,6 +56,8 @@ GUISetup=主题 SetupArea=设置 UploadNewTemplate=上传新模板 FormToTestFileUploadForm=文件上传功能测试 +ModuleMustBeEnabled=The module/application <b>%s</b> must be enabled +ModuleIsEnabled=The module/application <b>%s</b> has been enabled 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. @@ -85,7 +87,6 @@ ShowPreview=显示预览 ShowHideDetails=Show-Hide details PreviewNotAvailable=无预览 ThemeCurrentlyActive=当前使用的主题 -CurrentTimeZone=PHP 服务器的时区 MySQLTimeZone=MySql 服务器的时区 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=空间 @@ -153,8 +154,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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=删除临时文件 +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 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=未删除目录或文件 @@ -256,6 +257,7 @@ ReferencedPreferredPartners=首选合作伙伴 OtherResources=其他资源 ExternalResources=External Resources SocialNetworks=社交网络 +SocialNetworkId=Social Network 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. @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=Examples with current configuration ListOfDirectories=开源办公软件文档模板目录列表 ListOfDirectoriesForModelGenODT=包含开源办公软件的格式的文档的模板目录列表。<br><br>请在此填写完整的目录路径。<br>每填写一个目录路径结尾按回车换行。<br>添加一个 GED 模块目录, 如下 <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b>。<br><br>该目录中的文件格式必须是 <b>.odt</b> 格式或 <b>.ods</b>格式。 NumberOfModelFilesFound=Number of ODT/ODS template files found in these directories -ExampleOfDirectoriesForModelGen=参考语法格式:<br>c:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +ExampleOfDirectoriesForModelGen=Examples of syntax:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br>要知道如何建立您的ODT文件范本并储存在指定目录,请至wiki网站: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=姓 /名 位置顺序 @@ -406,7 +408,7 @@ UrlGenerationParameters=URL地址的保护参数 SecurityTokenIsUnique=为每个URL使用唯一的securekey参数值 EnterRefToBuildUrl=输入对象 %s 的编号 GetSecuredUrl=获取算得的URL地址 -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +ButtonHideUnauthorized=Hide unauthorized action buttons also for internal users (just greyed otherwise) OldVATRates=以前的增值税率(VAT) NewVATRates=新建增值税率(VAT) PriceBaseTypeToChange=设置了基本参考价值的产品的价格 @@ -668,7 +670,7 @@ Module54000Desc=Direct print (without opening the documents) using Cups IPP inte Module55000Name=问卷, 调查或投票 Module55000Desc=Create online polls, surveys or votes (like Doodle, Studs, RDVz etc...) Module59000Name=利润空间 -Module59000Desc=利润空间管理模块 +Module59000Desc=Module to follow margins Module60000Name=佣金 Module60000Desc=佣金管理模块 Module62000Name=国际贸易术语解释通则 @@ -1306,7 +1308,7 @@ 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=搜索优化 -YouHaveXObjectUseSearchOptim=You have %s %s in the database. You should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,13 @@ ServiceSetup=服务模块设置 ProductServiceSetup=产品和服务模块的设置 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=在产品/服务附加文件选项卡中激活如果产品/服务在提案中,则将产品PDF文档合并到提案PDF azur的选项 -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=默认的条码类型 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=个性化菜单未链接到顶部菜单条目 NewMenu=新建菜单 MenuHandler=菜单处理程序 MenuModule=源模块 -HideUnauthorizedMenu= 是否隐藏未经授权的菜单 (灰色为不可用) +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=菜单编号 DetailMenuHandler=菜单处理程序 (决定何处显示新菜单) DetailMenuModule=模块名称 (如果菜单项来自模块) @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=邮编 MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/zh_CN/banks.lang b/htdocs/langs/zh_CN/banks.lang index 6f2afe060cc..c810652102d 100644 --- a/htdocs/langs/zh_CN/banks.lang +++ b/htdocs/langs/zh_CN/banks.lang @@ -173,10 +173,11 @@ SEPAMandate=SEPA授权 YourSEPAMandate=您的SEPA授权 FindYourSEPAMandate=这是您的SEPA授权,授权我们公司向您的银行直接扣款。返回签名(扫描签名文档)或通过邮件发送给 AutoReportLastAccountStatement=Automatically fill the field 'number of bank statement' with last statement number when making reconciliation -CashControl=POS cash fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/zh_CN/blockedlog.lang b/htdocs/langs/zh_CN/blockedlog.lang index ce7718f76c4..37ec67f2a06 100644 --- a/htdocs/langs/zh_CN/blockedlog.lang +++ b/htdocs/langs/zh_CN/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/zh_CN/boxes.lang b/htdocs/langs/zh_CN/boxes.lang index 99c36d31a7c..6ff10e54c76 100644 --- a/htdocs/langs/zh_CN/boxes.lang +++ b/htdocs/langs/zh_CN/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=最近变更的 %s 份捐款 BoxTitleLastModifiedExpenses=最近变更的 %s 份费用报表 BoxTitleLatestModifiedBoms=Latest %s modified BOMs BoxTitleLatestModifiedMos=Latest %s modified Manufacturing Orders +BoxTitleLastOutstandingBillReached=Customers with maximum outstanding exceeded BoxGlobalActivity=全局活动(账单,报价,订单) BoxGoodCustomers=优质客户 BoxTitleGoodCustomers=%s 优质客户 +BoxScheduledJobs=计划任务 +BoxTitleFunnelOfProspection=Lead funnel FailedToRefreshDataInfoNotUpToDate=Failed to refresh RSS flux. Latest successful refresh date: %s LastRefreshDate=最后刷新日期 NoRecordedBookmarks=未设置任何书签。 @@ -92,8 +95,8 @@ LastXMonthRolling=最后 %s 月波动 ChooseBoxToAdd=点击下拉菜单选择相应视图并添加到你的看板 BoxAdded=插件已添加到仪表板中 BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users) -BoxLastManualEntries=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=会计 +ValidatedProjects=Validated projects diff --git a/htdocs/langs/zh_CN/cashdesk.lang b/htdocs/langs/zh_CN/cashdesk.lang index 4ddbad3d082..bcaf0780474 100644 --- a/htdocs/langs/zh_CN/cashdesk.lang +++ b/htdocs/langs/zh_CN/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +CashFence=Cash desk closing +CashFenceDone=Cash desk closing done for the period NbOfInvoices=发票数 Paymentnumpad=Type of Pad to enter payment Numberspad=Numbers Pad @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/zh_CN/categories.lang b/htdocs/langs/zh_CN/categories.lang index dbd3530d85b..355be943e79 100644 --- a/htdocs/langs/zh_CN/categories.lang +++ b/htdocs/langs/zh_CN/categories.lang @@ -19,6 +19,7 @@ ProjectsCategoriesArea=项目标签/分类区 UsersCategoriesArea=Users tags/categories area SubCats=子类别 CatList=标签/分类列表 +CatListAll=List of tags/categories (all types) NewCategory=新建标签/分类 ModifCat=变更标签/分类 CatCreated=标签/分类已创建 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=标签/分类id号码 -CatSupList=List of vendor tags/categories -CatCusList=客户/准客户标签/分类列表 +ParentCategory=Parent tag/category +ParentCategoryLabel=Label of parent tag/category +CatSupList=List of vendors tags/categories +CatCusList=List of customers/prospects tags/categories CatProdList=产品标签/分类列表 CatMemberList=会员标签/分类列表 -CatContactList=联系人标签/分类列表 -CatSupLinks=链接供应商与标签/分类 +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=链接客户/准客户与标签/分类 CatContactsLinks=Links between contacts/addresses and tags/categories CatProdLinks=链接产品/服务与标签/分类 -CatProJectLinks=链接项目与标签/分类 +CatMembersLinks=Links between members and tags/categories +CatProjectsLinks=链接项目与标签/分类 +CatUsersLinks=Links between users and tags/categories DeleteFromCat=从标签/分类移除 ExtraFieldsCategories=自定义属性 CategoriesSetup=标签/分类设置 diff --git a/htdocs/langs/zh_CN/companies.lang b/htdocs/langs/zh_CN/companies.lang index d2a0362c3fa..8f852619ac3 100644 --- a/htdocs/langs/zh_CN/companies.lang +++ b/htdocs/langs/zh_CN/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi VATIntraManualCheck=You can also check manually on the European Commission website <a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=检查不可能的。检查服务是没有提供的会员国(%s)中。 NorProspectNorCustomer=Not prospect, nor customer -JuridicalStatus=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=雇员 ProspectLevelShort=潜力 diff --git a/htdocs/langs/zh_CN/compta.lang b/htdocs/langs/zh_CN/compta.lang index 6372c1186e3..4ae180df234 100644 --- a/htdocs/langs/zh_CN/compta.lang +++ b/htdocs/langs/zh_CN/compta.lang @@ -111,7 +111,7 @@ Refund=退 SocialContributionsPayments=社会/财政税款 ShowVatPayment=显示增值税纳税 TotalToPay=共支付 -BalanceVisibilityDependsOnSortAndFilters=仅当表格在%s上按升序排序并过滤为1个银行帐户时,才会在此列表中显示余额 +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=客户科目代码 SupplierAccountancyCode=Vendor accounting code CustomerAccountancyCodeShort=客户账户代码 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=你确定要删除这个社会/财政税款吗 ExportDataset_tax_1=社会和财政税和付款 CalcModeVATDebt=模式 <b>%sVAT 关于承诺债务%s</b>. CalcModeVATEngagement=模式 <b>%s 增值税收入,支出 %s</b>. -CalcModeDebt=分析已知的已记录发票,即使它们尚未计入分类帐。 +CalcModeDebt=Analysis of known recorded documents even if they are not yet accounted in ledger. CalcModeEngagement=分析已知的记录付款,即使它们尚未计入分类帐。 CalcModeBookkeeping=Analysis of data journalized in Bookkeeping Ledger table. CalcModeLT1= 模式 <b>%sRE 客户发票 - 供应商发票%s</b> @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=年度总结的收支平衡表 AnnualByCompanies=按预定义的帐户组划分的收入和支出余额 AnnualByCompaniesDueDebtMode=收支平衡,详细按合作方,模式<b>%sClaims-Debts%s</b>,据说<b>承诺债务</b>。 AnnualByCompaniesInputOutputMode=收支平衡,详细按合作方,模式<b>%sIncomes-Expenses%s</b>,据说<b>现金会计</b>。 -SeeReportInInputOutputMode=有关实际付款的计算,请参阅%s of payments%s,即使它们尚未在Ledger中计算。 -SeeReportInDueDebtMode=请参阅%s对invoices%s的分析,以便根据已知的记录发票进行计算,即使它们尚未计入分类帐。 -SeeReportInBookkeepingMode=有关<b>簿记分类帐表</b>的计算,请参阅<b> %sBookeeping report%s </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=- 所示金额均含税 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=- 它包括发票,费用,增值税和工资的实际付款。 <br> - 它基于发票,费用,增值税和工资的付款日期。捐赠的捐赠日期。 @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=它在您的分类帐中显示记录,其中 SeePageForSetup=请参阅菜单<a href="%s"> %s </a>进行设置 DepositsAreNotIncluded=- Down payment invoices are not included DepositsAreIncluded=- 包括预付款发票 +LT1ReportByMonth=Tax 2 report by month +LT2ReportByMonth=Tax 3 report by month LT1ReportByCustomers=由合作方报告税2 LT2ReportByCustomers=由合作方报告税3 LT1ReportByCustomersES=按合作方 RE 报表 LT2ReportByCustomersES=按合作方IRPF的报表 VATReport=销售税报告 VATReportByPeriods=按期间的销售税报告 +VATReportByMonth=Sale tax report by month VATReportByRates=销售税报告按费率计算 VATReportByThirdParties=第三方销售税报告 VATReportByCustomers=客户销售税报告 diff --git a/htdocs/langs/zh_CN/cron.lang b/htdocs/langs/zh_CN/cron.lang index b0b151ccf45..63b93692f0e 100644 --- a/htdocs/langs/zh_CN/cron.lang +++ b/htdocs/langs/zh_CN/cron.lang @@ -6,28 +6,29 @@ Permission23102 = 创建/更新计划任务 Permission23103 = 删除计划任务 Permission23104 = 执行计划任务 # Admin -CronSetup= 计划任务管理设置 -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=或者检查并启动一个特别计划任务 +CronSetup=计划任务管理设置 +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=启动计划任务的URL网址的安全密钥 -FileToLaunchCronJobs=Command line to check and launch qualified cron jobs +FileToLaunchCronJobs=用于检查和启动合格的cron作业的命令行 CronExplainHowToRunUnix=在Unix环境你可以在命令行下每5分钟执行以下计划任务 -CronExplainHowToRunWin=在微软(tm)Windows操作系统环境下你可以使用控制面板中的计划任务工具每5分钟运行 +CronExplainHowToRunWin=On Microsoft(tm) Windows environment you can use Scheduled Task tools to run the command line each 5 minutes CronMethodDoesNotExists=Class类 %s 没有包含任何方法 %s -CronJobDefDesc=Cron job profiles are defined into the module descriptor file. When module is activated, they are loaded and available so you can administer the jobs from the admin tools menu %s. -CronJobProfiles=List of predefined cron job profiles +CronMethodNotAllowed=Method %s of class %s is in blacklist of forbidden methods +CronJobDefDesc=Cron作业配置文件定义在模块描述符文件中。激活模块后,它们将被加载并可用,因此您可以从管理工具菜单%s管理作业。 +CronJobProfiles=预定义的cron作业配置文件列表 # Menu EnabledAndDisabled=启用和禁用 # Page list -CronLastOutput=Latest run output -CronLastResult=Latest result code +CronLastOutput=最新的运行输出 +CronLastResult=最新结果代码 CronCommand=命令 CronList=计划任务 CronDelete=删除计划任务 -CronConfirmDelete=Are you sure you want to delete these scheduled jobs? +CronConfirmDelete=您确定要删除这些预定作业吗? CronExecute=安排计划工作 -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. +CronConfirmExecute=您确定要立即执行这些预定作业吗? +CronInfo=计划作业模块允许计划作业以自动执行它们。也可以手动启动作业。 CronTask=工作 CronNone=无 CronDtStart=之前 @@ -42,10 +43,11 @@ CronModule=模块 CronNoJobs=没有工作注册 CronPriority=优先级 CronLabel=标签 -CronNbRun=运行编号 -CronMaxRun=Max number launch +CronNbRun=Number of launches +CronMaxRun=Maximum number of launches CronEach=每 JobFinished=工作启动和完成 +Scheduled=Scheduled #Page card CronAdd= 添加工作 CronEvery=执行每个工作 @@ -55,29 +57,35 @@ CronSaveSucess=保存成功 CronNote=说明 CronFieldMandatory=栏位 %s 为必填 CronErrEndDateStartDt=结束日期不能早过开始日期啊,时光不能倒流呀魂淡 -StatusAtInstall=Status at module installation -CronStatusActiveBtn=生效 +StatusAtInstall=模块安装时的状态 +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=禁用 CronTaskInactive=这个工作已失效 CronId=Id -CronClassFile=Filename with class -CronModuleHelp=Name of Dolibarr module directory (also work with external Dolibarr module). <BR> For exemple 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 exemple 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 exemple 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 exemple 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 exemple 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> +CronClassFile=带有类的文件名 +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=系统命令行执行。 CronCreateJob=创建新的计划任务 CronFrom=From # Info # Common CronType=工作类型 -CronType_method=Call method of a PHP Class +CronType_method=调用PHP类的方法 CronType_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=请到菜单 "主页 - 管理员工具 - 计划任务" 查看和修改计划任务。 +CronCannotLoadClass=无法加载类文件%s(使用类%s) +CronCannotLoadObject=已加载类文件%s,但未找到对象%s +UseMenuModuleToolsToAddCronJobs=Go into menu "<a href="%s">Home - Admin tools - Scheduled jobs</a>" to see and edit scheduled jobs. JobDisabled=岗位无效 MakeLocalDatabaseDumpShort=本地数据库备份 -MakeLocalDatabaseDump=Create a local database dump. Parameters are: compression ('gz' or 'bz' or 'none'), backup type ('mysql' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep -WarningCronDelayed=Attention, for performance purpose, whatever is next date of execution of enabled jobs, your jobs may be delayed to a maximum of %s hours, before being run. +MakeLocalDatabaseDump=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=注意,出于性能目的,无论启用作业的下一个执行日期是什么,您的作业可能会在运行之前延迟到最大值%s小时。 +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/zh_CN/errors.lang b/htdocs/langs/zh_CN/errors.lang index 33ed9cea573..a7705c06513 100644 --- a/htdocs/langs/zh_CN/errors.lang +++ b/htdocs/langs/zh_CN/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=没有错误,我们承诺 # Errors ErrorButCommitIsDone=发现错误我们将进行验证 ErrorBadEMail=Email %s is wrong +ErrorBadMXDomain=Email %s seems wrong (domain has no valid MX record) ErrorBadUrl=网址 %s 有误 ErrorBadValueForParamNotAString=参数值不正确。它通常在缺少翻译时附加。 +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=登陆%s已经存在。 ErrorGroupAlreadyExists=组%s已经存在。 ErrorRecordNotFound=记录没有找到。 @@ -48,6 +50,7 @@ ErrorFieldsRequired=一些必要的栏位都没有填补。 ErrorSubjectIsRequired=电子邮件主题是必需的 ErrorFailedToCreateDir=无法创建一个目录。检查Web服务器的用户有权限写入Dolibarr文件目录。如果参数<b>safe_mode设置</b>为启用这个PHP,检查Dolibarr php文件到Web服务器的用户拥有(或组)。 ErrorNoMailDefinedForThisUser=没有邮件定义该用户 +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=此功能需要Javascript被激活才能工作。更改此设置 - 显示。 ErrorTopMenuMustHaveAParentWithId0=一个类型'顶'不能有一个父菜单中的菜单。放在父菜单0或选择一个类型为'左'菜单。 ErrorLeftMenuMustHaveAParentId=一个类型为'左'必须有一个父菜单的ID。 @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=导出设定配置名称已存在 ErrorLDAPSetupNotComplete=Dolibarr - LDAP的匹配是不完整的。 ErrorLDAPMakeManualTest=甲。LDIF文件已经生成在目录%s的尝试加载命令行手动有更多的错误信息。 ErrorCantSaveADoneUserWithZeroPercentage=Can't save an action with "status not started" if field "done by" is also filled. -ErrorRefAlreadyExists=号的创作已经存在。 +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorPleaseTypeBankTransactionReportName=请输入必须报告条目的银行对账单名称(格式YYYYMM或YYYYMMDD) ErrorRecordHasChildren=Failed to delete record since it has some child records. ErrorRecordHasAtLeastOneChildOfType=对象至少有一个类型为%s的子项 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=您必须选择文章是否为预 ErrorDiscountLargerThanRemainToPaySplitItBefore=您尝试申请的折扣大于剩余支付。之前将折扣分为2个较小的折扣。 ErrorFileNotFoundWithSharedLink=找不到档案。可能是修改了共享密钥或最近删除了文件。 ErrorProductBarCodeAlreadyExists=产品条形码%s已存在于其他产品参考中。 -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=还要注意,当至少一个子产品(或子产品的子产品)需要序列号/批号时,使用虚拟产品来自动增加/减少子产品是不可能的。 +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=对于包含免费产品的行,必须说明 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. @@ -243,6 +246,16 @@ 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 + # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=为此成员设置了密码。但是,未创建任何用户帐户。因此,此密码已存储,但无法用于登录Dolibarr。它可以由外部模块/接口使用,但如果您不需要为成员定义任何登录名或密码,则可以从成员模块设置中禁用“管理每个成员的登录名”选项。如果您需要管理登录但不需要任何密码,则可以将此字段保留为空以避免此警告。注意:如果成员链接到用户,则电子邮件也可用作登录。 @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=您的登录已被修改。出于安全 WarningAnEntryAlreadyExistForTransKey=此语言的翻译密钥已存在条目 WarningNumberOfRecipientIsRestrictedInMassAction=Warning, number of different recipient is limited to <b>%s</b> when using the mass actions on lists WarningDateOfLineMustBeInExpenseReportRange=警告,行日期不在费用报表范围内 +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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/zh_CN/exports.lang b/htdocs/langs/zh_CN/exports.lang index 2117c02d285..11cfd2fcb7e 100644 --- a/htdocs/langs/zh_CN/exports.lang +++ b/htdocs/langs/zh_CN/exports.lang @@ -26,6 +26,8 @@ FieldTitle=字段标题 NowClickToGenerateToBuildExportFile=Now, select the file format in the combo box and click on "Generate" to build the export file... AvailableFormats=Available Formats LibraryShort=资料库 +ExportCsvSeparator=Csv caracter separator +ImportCsvSeparator=Csv caracter separator 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. @@ -131,3 +133,4 @@ KeysToUseForUpdates=Key (column) to use for <b>updating</b> existing data NbInsert=插入行数:%s NbUpdate=更新行数:%s MultipleRecordFoundWithTheseFilters=使用这些过滤器找到了多条记录:%s +StocksWithBatch=Stocks and location (warehouse) of products with batch/serial number diff --git a/htdocs/langs/zh_CN/mails.lang b/htdocs/langs/zh_CN/mails.lang index c6a2af28558..948f4d6d845 100644 --- a/htdocs/langs/zh_CN/mails.lang +++ b/htdocs/langs/zh_CN/mails.lang @@ -92,6 +92,7 @@ MailingModuleDescEmailsFromUser=用户输入的电子邮件 MailingModuleDescDolibarrUsers=用户使用电子邮件 MailingModuleDescThirdPartiesByCategories=第三方(按类别) SendingFromWebInterfaceIsNotAllowed=不允许从Web界面发送。 +EmailCollectorFilterDesc=All filters must match to have an email being collected # Libelle des modules de liste de destinataires mailing LineInFile=在文件%s的线 @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=没有发送电子邮件发件人或收件人电子邮件错验证用户配置文件 # Module Notifications Notifications=通知 -NoNotificationsWillBeSent=没有电子邮件通知此事件的计划和公司 -ANotificationsWillBeSent=1通知将通过电子邮件发送 -SomeNotificationsWillBeSent=%s的通知将通过电子邮件发送 -AddNewNotification=激活新的电子邮件通知目标/事件 -ListOfActiveNotifications=列出电子邮件通知的所有活动目标/事件 -ListOfNotificationsDone=列出所有发送电子邮件通知 +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=Email电子邮箱配置设定 '%s'. 这个模式无法用于邮件群发。 MailSendSetupIs2=首先您得这么地, 得先有个管理员账号吧 admin , 进入菜单 %s主页 - 设置 - EMails%s 修改参数 <strong>'%s'</strong> 用 '%s'模式。 在此模式下, 您才可输入一个 SMTP 服务器地址 来供您收发邮件。 MailSendSetupIs3=如果你对 SMTP 服务器的配置方面有疑问, 你可到这里询问 %s. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=导入的文件必须具有格式<strong>电子邮件 UseFormatInputEmailToTarget=输入格式为<strong>电子邮件;名称;名字;其他</strong>的字符串 MailAdvTargetRecipients=收件人(高级选择) AdvTgtTitle=填写输入字段以预先选择要定位的第三方或联系人/地址 -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 +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=使用interval选择int或float值 AdvTgtMinVal=最小值 AdvTgtMaxVal=最大值 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=创建筛选 AdvTgtOrCreateNewFilter=新筛选器的名称 NoContactWithCategoryFound=分类没有联系人/地址 NoContactLinkedToThirdpartieWithCategoryFound=分类没有联系人/地址 -OutGoingEmailSetup=发件服务器设置 -InGoingEmailSetup=传入电子邮件设置 -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=默认外发电子邮件设置 +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=信息 ContactsWithThirdpartyFilter=Contacts with third-party filter Unanswered=Unanswered Answered=Answered IsNotAnAnswer=Is not answer (initial email) IsAnAnswer=Is an answer of an initial email +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/zh_CN/main.lang b/htdocs/langs/zh_CN/main.lang index ba5ab7c1706..23a6b0f6baa 100644 --- a/htdocs/langs/zh_CN/main.lang +++ b/htdocs/langs/zh_CN/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=此电子邮件类型没有可用的模板 AvailableVariables=可用的替代变量 NoTranslation=没有翻译 Translation=翻译 +CurrentTimeZone=PHP 服务器的时区 EmptySearchString=Enter non empty search criterias +EnterADateCriteria=Enter a date criteria NoRecordFound=空空如也——没有找到记录 NoRecordDeleted=未删除记录 NotEnoughDataYet=数据不足 @@ -85,6 +87,8 @@ FileWasNotUploaded=一个文件被选中的附件,但还没有上传。点击 NbOfEntries=No. of entries GoToWikiHelpPage=阅读在线帮助文档 (需要访问外网) GoToHelpPage=阅读帮助 +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=Home Page RecordSaved=记录已保存 RecordDeleted=记录已删除 RecordGenerated=Record generated @@ -220,6 +224,7 @@ Value=值 PersonalValue=自定义 NewObject=新%s NewValue=新值 +OldValue=Old value %s CurrentValue=当前值 Code=编码 Type=类型 @@ -433,6 +438,7 @@ RemainToPay=继续付钱 Module=模块/应用程序 Modules=模块/应用 Option=选项 +Filters=Filters List=列表 FullList=全部列表 FullConversation=Full conversation @@ -650,6 +656,7 @@ SupplierPreview=供应商预览 ShowCustomerPreview=显示顾客预览 ShowSupplierPreview=显示供应商预览 RefCustomer=顾客编号 +InternalRef=Internal ref. Currency=货币 InfoAdmin=管理员信息 Undo=复原 @@ -671,7 +678,7 @@ SendMail=发送电子邮件 Email=电子邮件 NoEMail=没有电子邮件 AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=没有手机号码 Owner=拥有者 FollowingConstantsWillBeSubstituted=以下常量将与相应的值代替。 @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/zh_CN/modulebuilder.lang b/htdocs/langs/zh_CN/modulebuilder.lang index 5c6573c3299..520c9966786 100644 --- a/htdocs/langs/zh_CN/modulebuilder.lang +++ b/htdocs/langs/zh_CN/modulebuilder.lang @@ -40,6 +40,7 @@ PageForCreateEditView=用于创建/编辑/查看记录的PHP页面 PageForAgendaTab=事件选项卡的PHP页面 PageForDocumentTab=文档选项卡的PHP页面 PageForNoteTab=注释选项卡的PHP页面 +PageForContactTab=PHP page for contact tab PathToModulePackage=zip /模块/应用程序包的路径 PathToModuleDocumentation=Path to file of module/application documentation (%s) SpaceOrSpecialCharAreNotAllowed=不允许使用空格或特殊字符。 @@ -77,7 +78,7 @@ IsAMeasure=是衡量标准 DirScanned=扫描目录 NoTrigger=没有触发器 NoWidget=无插件 -GoToApiExplorer=转到API资源管理器 +GoToApiExplorer=API explorer ListOfMenusEntries=菜单条目列表 ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=已定义权限的列表 @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n SeeTopRightMenu=请参阅右上方菜单中的<span class="fa fa-bug"></span> AddLanguageFile=添加语言文件 YouCanUseTranslationKey=你可以在这里使用一个密钥,它是在语言文件中找到的翻译密钥(参见“语言”选项卡) -DropTableIfEmpty=(删除表格如果为空) +DropTableIfEmpty=(Destroy table if empty) TableDoesNotExists=表%s不存在 TableDropped=表%s已删除 InitStructureFromExistingTable=构建现有表的结构数组字符串 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/zh_CN/mrp.lang b/htdocs/langs/zh_CN/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/zh_CN/mrp.lang +++ b/htdocs/langs/zh_CN/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/zh_CN/other.lang b/htdocs/langs/zh_CN/other.lang index 4671a563cb1..8a671ff8156 100644 --- a/htdocs/langs/zh_CN/other.lang +++ b/htdocs/langs/zh_CN/other.lang @@ -5,8 +5,6 @@ Tools=工具 TMenuTools=工具 ToolsDesc=All tools not included in other menu entries are grouped here.<br>All the tools can be accessed via the left menu. Birthday=生日 -BirthdayDate=生日 -DateToBirth=Birth date BirthdayAlertOn=生日提醒活跃 BirthdayAlertOff=生日提醒无效 TransKey=关键TransKey的翻译 @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=发票日期的上个月(编号1-12) TextPreviousMonthOfInvoice=发票日期的上个月(文本) NextMonthOfInvoice=发票日期的下个月(编号1-12) TextNextMonthOfInvoice=发票日期的月份(文本) +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip文件生成<b> %s </b>。 DocFileGeneratedInto=Doc文件生成<b> %s </b>。 JumpToLogin=断开。转到登录页面... @@ -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=参见模块设置 %s NbOfAttachedFiles=所附文件数/文件 TotalSizeOfAttachedFiles=所附文件/文档的总大小 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=如果尚未完成,您可以点击下面的链接进行付款。\n\n%s\n\n PredefinedMailContentGeneric=__(你好)__\n\n\n__(此致)__\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是一款具有几百种业务模块支撑的紧凑型ERP / CRM系统。如若所有的业务模块统统向您展示演示我们认为这么做没有任何意义,假如真发生了这样的情况:这几百个业务贵公司统统都涉足到了那么请您直接包养我们吧,土豪请直接 (加我们中国社区QQ群206239089)赞助我们吧,让Dolibarr在中国推得更广走得更远!以下您有几个选择。 ChooseYourDemoProfil=请选择最贴近贵企业需求的演示… ChooseYourDemoProfilMore=...自定义配置<br>(手动选择模块) @@ -137,7 +139,7 @@ Right=右键 CalculatedWeight=计算重量 CalculatedVolume=计算量 Weight=重量 -WeightUnitton=吨 +WeightUnitton=ton WeightUnitkg=公斤 WeightUnitg=克 WeightUnitmg=毫克 @@ -214,6 +216,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=输入数据集 DolibarrNotification=自动通知 ResizeDesc=输入新的高度新的宽度<b>或</b> 。比率将维持在调整大小... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=导出区 diff --git a/htdocs/langs/zh_CN/products.lang b/htdocs/langs/zh_CN/products.lang index e9ad7c64214..71ff5981d18 100644 --- a/htdocs/langs/zh_CN/products.lang +++ b/htdocs/langs/zh_CN/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=价格个数 DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=父级包装产品的数量 @@ -167,8 +168,10 @@ BuyingPrices=买价 CustomerPrices=客户价格 SuppliersPrices=供应商价格 SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=海关/商品/ HS编码 +CustomCode=Customs|Commodity|HS code CountryOrigin=产地国 +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=Nature of product (material/finished) NatureOfProductShort=Nature of product NatureOfProductDesc=Raw material or finished product @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=使用固定价格 PriceByQuantity=不同数量价格 DisablePriceByQty=按数量禁用价格 PriceByQuantityRange=定量范围 -MultipriceRules=市场价格规则 +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=%% 变化 %s PercentDiscountOver=%%折扣超过%s diff --git a/htdocs/langs/zh_CN/projects.lang b/htdocs/langs/zh_CN/projects.lang index 748dc5a455e..29454990c0b 100644 --- a/htdocs/langs/zh_CN/projects.lang +++ b/htdocs/langs/zh_CN/projects.lang @@ -76,15 +76,16 @@ MyActivities=我的任务/活动 MyProjects=我的项目 MyProjectsArea=我的项目区 DurationEffective=有效时间 -ProgressDeclared=进度 +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=计算进展 +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=时间 +TimeConsumed=Consumed ListOfTasks=任务列表 GoToListOfTimeConsumed=转到消耗的时间列表 GanttView=甘特视图 diff --git a/htdocs/langs/zh_CN/recruitment.lang b/htdocs/langs/zh_CN/recruitment.lang index 1fd9b48e629..02e8dce6590 100644 --- a/htdocs/langs/zh_CN/recruitment.lang +++ b/htdocs/langs/zh_CN/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/zh_CN/sendings.lang b/htdocs/langs/zh_CN/sendings.lang index 265e417e1ae..3abc9d1f869 100644 --- a/htdocs/langs/zh_CN/sendings.lang +++ b/htdocs/langs/zh_CN/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=这个订单的其他运输 SendingsAndReceivingForSameOrder=此订单的发货和收货 SendingsToValidate=运输验证 StatusSendingCanceled=取消 +StatusSendingCanceledShort=已取消 StatusSendingDraft=草稿 StatusSendingValidated=验证(产品出货或已经出货) StatusSendingProcessed=加工 @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=您必须先验证订单才能发货。 # Sending methods # ModelDocument DocumentModelTyphon=更多的送货单(logo. ..完整的文档模板) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=没有定义的常数EXPEDITION_ADDON_NUMBER SumOfProductVolumes=产品总数 SumOfProductWeights=产品总重 diff --git a/htdocs/langs/zh_CN/stocks.lang b/htdocs/langs/zh_CN/stocks.lang index 2a32f22f414..8f79f6ef131 100644 --- a/htdocs/langs/zh_CN/stocks.lang +++ b/htdocs/langs/zh_CN/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/zh_CN/ticket.lang b/htdocs/langs/zh_CN/ticket.lang index 2d2ab96304e..4cd03733e48 100644 --- a/htdocs/langs/zh_CN/ticket.lang +++ b/htdocs/langs/zh_CN/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=软件故障 -TicketTypeShortBUGHARD=硬件故障 -TicketTypeShortCOM=商业问题 +TicketTypeShortCOM=商业问题 TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=其他 TicketSeverityShortLOW=低 TicketSeverityShortNORMAL=正常 TicketSeverityShortHIGH=高 -TicketSeverityShortBLOCKING=临界/阻塞 +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=字段'%s'不正确 MenuTicketMyAssign=我的票据 @@ -60,7 +58,6 @@ OriginEmail=电邮来源 Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=没看过 Read=阅读 Assigned=分配 InProgress=进行中 @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=公共接口允许任何访问者创建票证 TicketsAutoAssignTicket=自动分配创建故障单的用户 TicketsAutoAssignTicketHelp=创建故障单时,可以自动将用户分配给故障单。 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=不在创建时通知公司 Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/zh_CN/website.lang b/htdocs/langs/zh_CN/website.lang index 847c0ea30c2..2b160b7e674 100644 --- a/htdocs/langs/zh_CN/website.lang +++ b/htdocs/langs/zh_CN/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=添加网站 Webpage=网页/容器 AddPage=添加页面/容器 -HomePage=主页 PageContainer=页面 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=ID为%s的请求页面尚无内容,或者删除了缓存文件.tpl.php。编辑页面内容以解决此问题。 @@ -101,7 +100,7 @@ EmptyPage=空页面 ExternalURLMustStartWithHttp=外部URL必须以http://或https://开头 ZipOfWebsitePackageToImport=Upload the Zip file of the website template package ZipOfWebsitePackageToLoad=or Choose an available embedded website template package -ShowSubcontainers=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/zh_CN/withdrawals.lang b/htdocs/langs/zh_CN/withdrawals.lang index 952c2388f85..c21b3b1f702 100644 --- a/htdocs/langs/zh_CN/withdrawals.lang +++ b/htdocs/langs/zh_CN/withdrawals.lang @@ -42,6 +42,7 @@ LastWithdrawalReceipt=最新的%s直接借记收据 MakeWithdrawRequest=直接付款请求 MakeBankTransferOrder=Make a credit transfer request WithdrawRequestsDone=%s记录了直接付款请求 +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>. ClassCredited=分类记 @@ -131,7 +132,8 @@ SEPARCUR=SEPA CUR SEPAFRST=SEPA FRST ExecutionDate=执行日期 CreateForSepa=创建直接付款文件 -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,3 +148,5 @@ InfoRejectSubject=直接付款订单被拒绝 InfoRejectMessage=您好,<br> <br>与公司%s相关的发票%s的直接借记支付订单,金额已被%s拒绝了。<br> <br> <br> <br> %s ModeWarning=实模式下的选项没有设置,这个模拟后,我们停止 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/zh_CN/workflow.lang b/htdocs/langs/zh_CN/workflow.lang index 34d49860135..d327a5e148d 100644 --- a/htdocs/langs/zh_CN/workflow.lang +++ b/htdocs/langs/zh_CN/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=自动创建 AutomaticClassification=自动分类 +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated diff --git a/htdocs/langs/zh_HK/accountancy.lang b/htdocs/langs/zh_HK/accountancy.lang index 3211a0b62df..9e084932477 100644 --- a/htdocs/langs/zh_HK/accountancy.lang +++ b/htdocs/langs/zh_HK/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) @@ -48,6 +50,7 @@ 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 @@ -144,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 @@ -198,7 +201,8 @@ Docdate=Date Docref=Reference LabelAccount=Label account LabelOperation=Label operation -Sens=Sens +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 @@ -206,7 +210,8 @@ JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups -GroupByAccountAccounting=Group by accounting account +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 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +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. @@ -271,11 +276,13 @@ DescVentilExpenseReport=Consult here the list of expense report lines bound (or 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 -SelectMonthAndValidate=Select month and validate movements ValidateHistory=Bind Automatically AutomaticBindingDone=Automatic binding done @@ -293,6 +300,7 @@ 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 @@ -337,6 +345,7 @@ 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) diff --git a/htdocs/langs/zh_HK/admin.lang b/htdocs/langs/zh_HK/admin.lang index f1c41a3b62b..f9a6468d94a 100644 --- a/htdocs/langs/zh_HK/admin.lang +++ b/htdocs/langs/zh_HK/admin.lang @@ -56,6 +56,8 @@ 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. @@ -85,7 +87,6 @@ ShowPreview=Show preview ShowHideDetails=Show-Hide details PreviewNotAvailable=Preview not available ThemeCurrentlyActive=Theme currently active -CurrentTimeZone=TimeZone PHP (server) MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Dates are stored and returned by database server as if they were kept as submitted string. The timezone has effect only when using the UNIX_TIMESTAMP function (that should not be used by Dolibarr, so database TZ should have no effect, even if changed after data was entered). Space=Space @@ -153,8 +154,8 @@ 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 temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files +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 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. @@ -256,6 +257,7 @@ 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. @@ -375,7 +377,7 @@ 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:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +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 @@ -406,7 +408,7 @@ UrlGenerationParameters=Parameters to secure URLs SecurityTokenIsUnique=Use a unique securekey parameter for each URL EnterRefToBuildUrl=Enter reference for object %s GetSecuredUrl=Get calculated URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons +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 @@ -668,7 +670,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 @@ -1306,7 +1308,7 @@ 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 should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. +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. @@ -1596,8 +1598,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 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry NewMenu=New menu MenuHandler=Menu handler MenuModule=Source module -HideUnauthorizedMenu= Hide unauthorized menus (gray) +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 @@ -1983,11 +1990,12 @@ 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 latest collect tried -DateLastcollectResultOk=Date latest collect successfull +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 ? @@ -2005,7 +2013,7 @@ WithDolTrackingID=Message from a conversation initiated by a first email sent fr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr WithDolTrackingIDInMsgId=Message sent from Dolibarr WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +CreateCandidature=Create job application FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/zh_HK/banks.lang b/htdocs/langs/zh_HK/banks.lang index 9500a5b8b2e..81a23238550 100644 --- a/htdocs/langs/zh_HK/banks.lang +++ b/htdocs/langs/zh_HK/banks.lang @@ -173,10 +173,11 @@ 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 fence -NewCashFence=New cash fence +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 diff --git a/htdocs/langs/zh_HK/blockedlog.lang b/htdocs/langs/zh_HK/blockedlog.lang index 5afae6e9e53..0bba5605d0f 100644 --- a/htdocs/langs/zh_HK/blockedlog.lang +++ b/htdocs/langs/zh_HK/blockedlog.lang @@ -35,7 +35,7 @@ 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 fence recording +logCASHCONTROL_VALIDATE=Cash desk closing recording BlockedLogBillDownload=Customer invoice download BlockedLogBillPreview=Customer invoice preview BlockedlogInfoDialog=Log Details diff --git a/htdocs/langs/zh_HK/boxes.lang b/htdocs/langs/zh_HK/boxes.lang index d6fd298a3a7..9a751483fb1 100644 --- a/htdocs/langs/zh_HK/boxes.lang +++ b/htdocs/langs/zh_HK/boxes.lang @@ -46,9 +46,12 @@ 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. @@ -92,8 +95,8 @@ 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=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries +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 @@ -102,5 +105,7 @@ 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 AccountancyHome=Accountancy +ValidatedProjects=Validated projects diff --git a/htdocs/langs/zh_HK/cashdesk.lang b/htdocs/langs/zh_HK/cashdesk.lang index 498baa82200..3fef645d99d 100644 --- a/htdocs/langs/zh_HK/cashdesk.lang +++ b/htdocs/langs/zh_HK/cashdesk.lang @@ -49,8 +49,8 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period +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 @@ -99,8 +99,9 @@ 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 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=Close cash fence +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 @@ -122,3 +123,4 @@ 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 diff --git a/htdocs/langs/zh_HK/categories.lang b/htdocs/langs/zh_HK/categories.lang index ba37a43b4ec..4ddf0d6093f 100644 --- a/htdocs/langs/zh_HK/categories.lang +++ b/htdocs/langs/zh_HK/categories.lang @@ -19,6 +19,7 @@ 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 @@ -65,16 +66,22 @@ UsersCategoriesShort=Users tags/categories StockCategoriesShort=Warehouse tags/categories ThisCategoryHasNoItems=This category does not contain any items. CategId=Tag/category id -CatSupList=List of vendor tags/categories -CatCusList=List of customer/prospect tags/categories +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 contact tags/categories -CatSupLinks=Links between suppliers and 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 -CatProJectLinks=Links between projects 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 diff --git a/htdocs/langs/zh_HK/companies.lang b/htdocs/langs/zh_HK/companies.lang index dadff6a7894..8dc815b522e 100644 --- a/htdocs/langs/zh_HK/companies.lang +++ b/htdocs/langs/zh_HK/companies.lang @@ -358,7 +358,7 @@ VATIntraCheckableOnEUSite=Check the intra-Community VAT ID on the European Commi 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=Legal Entity Type +JuridicalStatus=Business entity type Workforce=Workforce Staff=Employees ProspectLevelShort=Potential diff --git a/htdocs/langs/zh_HK/compta.lang b/htdocs/langs/zh_HK/compta.lang index 8f4f058bb87..1afeb6e3727 100644 --- a/htdocs/langs/zh_HK/compta.lang +++ b/htdocs/langs/zh_HK/compta.lang @@ -111,7 +111,7 @@ 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 ascending on %s and filtered for 1 bank account +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 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fisc 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 invoices even if they are not yet accounted in ledger. +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> @@ -154,9 +154,9 @@ 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 %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See <b>%sBookeeping report%s</b> for a calculation on <b>Bookkeeping Ledger table</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. @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting 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 diff --git a/htdocs/langs/zh_HK/cron.lang b/htdocs/langs/zh_HK/cron.lang index 1de1251831a..2ebdda1e685 100644 --- a/htdocs/langs/zh_HK/cron.lang +++ b/htdocs/langs/zh_HK/cron.lang @@ -7,13 +7,14 @@ Permission23103 = Delete Scheduled job Permission23104 = Execute Scheduled job # Admin CronSetup=Scheduled job management setup -URLToLaunchCronJobs=URL to check and launch qualified cron jobs -OrToLaunchASpecificJob=Or to check and launch a specific job +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 @@ -46,6 +47,7 @@ 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 @@ -56,7 +58,7 @@ CronNote=Comment CronFieldMandatory=Fields %s is mandatory CronErrEndDateStartDt=End date cannot be before start date StatusAtInstall=Status at module installation -CronStatusActiveBtn=Enable +CronStatusActiveBtn=Schedule CronStatusInactiveBtn=Disable CronTaskInactive=This job is disabled CronId=Id @@ -82,3 +84,8 @@ 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/zh_HK/errors.lang b/htdocs/langs/zh_HK/errors.lang index 893f4a35b65..5b26be724d9 100644 --- a/htdocs/langs/zh_HK/errors.lang +++ b/htdocs/langs/zh_HK/errors.lang @@ -5,8 +5,10 @@ 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. @@ -48,6 +50,7 @@ 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. @@ -75,7 +78,7 @@ 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=Ref used for creation already exists. +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 @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container <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. @@ -243,6 +246,16 @@ 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 + # 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. @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security pur 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=Warnin, failed to add file entry into ECM database index table +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. diff --git a/htdocs/langs/zh_HK/exports.lang b/htdocs/langs/zh_HK/exports.lang index 3549e3f8b23..a0eb7161ef2 100644 --- a/htdocs/langs/zh_HK/exports.lang +++ b/htdocs/langs/zh_HK/exports.lang @@ -133,3 +133,4 @@ 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/zh_HK/mails.lang b/htdocs/langs/zh_HK/mails.lang index 1235eef3b27..2d02c5ddcf9 100644 --- a/htdocs/langs/zh_HK/mails.lang +++ b/htdocs/langs/zh_HK/mails.lang @@ -92,6 +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 # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file @@ -125,12 +126,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Notifications -NoNotificationsWillBeSent=No email notifications are planned for this event and company -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent +NotificationsAuto=Notifications Auto. +NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company +ANotificationsWillBeSent=1 automatic notification will be sent by email +SomeNotificationsWillBeSent=%s automatic notifications will be sent by email +AddNewNotification=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. @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;fir 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 +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 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=Create filter AdvTgtOrCreateNewFilter=Name of new filter NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +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/zh_HK/main.lang b/htdocs/langs/zh_HK/main.lang index 96c68cdcfa3..f8ba6f4073c 100644 --- a/htdocs/langs/zh_HK/main.lang +++ b/htdocs/langs/zh_HK/main.lang @@ -28,7 +28,9 @@ 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 @@ -85,6 +87,8 @@ FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. C 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 @@ -220,6 +224,7 @@ Value=Value PersonalValue=Personal value NewObject=New %s NewValue=New value +OldValue=Old value %s CurrentValue=Current value Code=Code Type=Type @@ -433,6 +438,7 @@ RemainToPay=Remain to pay Module=Module/Application Modules=Modules/Applications Option=Option +Filters=Filters List=List FullList=Full list FullConversation=Full conversation @@ -650,6 +656,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 @@ -671,7 +678,7 @@ SendMail=Send email Email=Email NoEMail=No email AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=No mobile phone Owner=Owner FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. @@ -1107,3 +1114,9 @@ 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 diff --git a/htdocs/langs/zh_HK/modulebuilder.lang b/htdocs/langs/zh_HK/modulebuilder.lang index 460aef8103b..845dd12624d 100644 --- a/htdocs/langs/zh_HK/modulebuilder.lang +++ b/htdocs/langs/zh_HK/modulebuilder.lang @@ -40,6 +40,7 @@ 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. @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions @@ -105,7 +106,7 @@ TryToUseTheModuleBuilder=If you have knowledge of SQL and PHP, you may use the n 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=(Delete table if empty) +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 @@ -126,7 +127,6 @@ UseSpecificEditorURL = Use a specific editor URL UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first IncludeRefGeneration=The reference of object must be generated automatically IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference IncludeDocGeneration=I want to generate some documents from the object @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, 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/zh_HK/mrp.lang b/htdocs/langs/zh_HK/mrp.lang index f018be890cc..ec999a473a4 100644 --- a/htdocs/langs/zh_HK/mrp.lang +++ b/htdocs/langs/zh_HK/mrp.lang @@ -78,3 +78,27 @@ 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 +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/zh_HK/other.lang b/htdocs/langs/zh_HK/other.lang index 54c0572d453..7a895bb1ca5 100644 --- a/htdocs/langs/zh_HK/other.lang +++ b/htdocs/langs/zh_HK/other.lang @@ -5,8 +5,6 @@ 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 -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into <b>%s</b>. DocFileGeneratedInto=Doc file generated into <b>%s</b>. JumpToLogin=Disconnected. Go to login page... @@ -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 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ at 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) @@ -137,7 +139,7 @@ Right=Right CalculatedWeight=Calculated weight CalculatedVolume=Calculated volume Weight=Weight -WeightUnitton=tonne +WeightUnitton=ton WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,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... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.<br>Use a space to enter different ranges.<br>Example: 8-12 14-18 +PrefixSession=Prefix for session ID ##### Export ##### ExportsArea=Exports area diff --git a/htdocs/langs/zh_HK/products.lang b/htdocs/langs/zh_HK/products.lang index 97db059594f..9ecc11ed93d 100644 --- a/htdocs/langs/zh_HK/products.lang +++ b/htdocs/langs/zh_HK/products.lang @@ -108,7 +108,8 @@ 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=Activate kits (virtual 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 ParentProductsNumber=Number of parent packaging product @@ -167,8 +168,10 @@ BuyingPrices=Buying prices CustomerPrices=Customer prices SuppliersPrices=Vendor prices SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) -CustomCode=Customs / Commodity / HS code +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 @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=Use the fixed price PriceByQuantity=Different prices by quantity DisablePriceByQty=Disable prices by quantity PriceByQuantityRange=Quantity range -MultipriceRules=Price segment rules +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 diff --git a/htdocs/langs/zh_HK/projects.lang b/htdocs/langs/zh_HK/projects.lang index baf0ecde17f..05aa1f5a560 100644 --- a/htdocs/langs/zh_HK/projects.lang +++ b/htdocs/langs/zh_HK/projects.lang @@ -76,15 +76,16 @@ MyActivities=My tasks/activities MyProjects=My projects MyProjectsArea=My projects Area DurationEffective=Effective duration -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Time +TimeConsumed=Consumed ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed GanttView=Gantt View diff --git a/htdocs/langs/zh_HK/recruitment.lang b/htdocs/langs/zh_HK/recruitment.lang index b775e78552e..437445f25dc 100644 --- a/htdocs/langs/zh_HK/recruitment.lang +++ b/htdocs/langs/zh_HK/recruitment.lang @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/zh_HK/sendings.lang b/htdocs/langs/zh_HK/sendings.lang index 5ce3b7f67e9..73bd9aebd42 100644 --- a/htdocs/langs/zh_HK/sendings.lang +++ b/htdocs/langs/zh_HK/sendings.lang @@ -30,6 +30,7 @@ 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 @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=More complete document model for delivery receipts (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/zh_HK/stocks.lang b/htdocs/langs/zh_HK/stocks.lang index 660443bcded..a1f55010139 100644 --- a/htdocs/langs/zh_HK/stocks.lang +++ b/htdocs/langs/zh_HK/stocks.lang @@ -62,6 +62,7 @@ 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 WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders UserDefaultWarehouse=Set a warehouse on Users MainDefaultWarehouse=Default warehouse @@ -240,3 +241,4 @@ InventoryRealQtyHelp=Set value to 0 to reset qty<br>Keep field empty, or remove 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. diff --git a/htdocs/langs/zh_HK/ticket.lang b/htdocs/langs/zh_HK/ticket.lang index 59519282c80..982fff90ffa 100644 --- a/htdocs/langs/zh_HK/ticket.lang +++ b/htdocs/langs/zh_HK/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Other TicketSeverityShortLOW=Low TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=High -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -60,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Read Assigned=Assigned InProgress=In progress @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=Public interface allow any visitors to create 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 @@ -233,7 +231,6 @@ TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled ErrorTicketRefRequired=Ticket reference name is required # diff --git a/htdocs/langs/zh_HK/website.lang b/htdocs/langs/zh_HK/website.lang index 03e042e4be6..f17def114b8 100644 --- a/htdocs/langs/zh_HK/website.lang +++ b/htdocs/langs/zh_HK/website.lang @@ -30,7 +30,6 @@ EditInLine=Edit inline AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container -HomePage=Home Page 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. @@ -101,7 +100,7 @@ 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=Include dynamic content +ShowSubcontainers=Show dynamic content InternalURLOfPage=Internal URL of page ThisPageIsTranslationOf=This page/container is a translation of ThisPageHasTranslationPages=This page/container has translation @@ -137,3 +136,4 @@ 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. diff --git a/htdocs/langs/zh_HK/withdrawals.lang b/htdocs/langs/zh_HK/withdrawals.lang index 114a8d9dd6c..059b3451c11 100644 --- a/htdocs/langs/zh_HK/withdrawals.lang +++ b/htdocs/langs/zh_HK/withdrawals.lang @@ -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>. ClassCredited=Classify credited @@ -131,7 +132,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,3 +148,5 @@ 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/zh_HK/workflow.lang b/htdocs/langs/zh_HK/workflow.lang index 299be277e1d..494a0424a75 100644 --- a/htdocs/langs/zh_HK/workflow.lang +++ b/htdocs/langs/zh_HK/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 diff --git a/htdocs/langs/zh_TW/accountancy.lang b/htdocs/langs/zh_TW/accountancy.lang index bf49bbd2fba..3b4947efd9a 100644 --- a/htdocs/langs/zh_TW/accountancy.lang +++ b/htdocs/langs/zh_TW/accountancy.lang @@ -16,6 +16,8 @@ ThisService=此服務 ThisProduct=此產品 DefaultForService=服務的預設 DefaultForProduct=產品的預設 +ProductForThisThirdparty=Product for this thirdparty +ServiceForThisThirdparty=Service for this thirdparty CantSuggest=無法建議 AccountancySetupDoneFromAccountancyMenu=從%s選單的大部分會計設定已完成 ConfigAccountingExpert=Configuration of the module accounting (double entry) @@ -48,6 +50,7 @@ CountriesExceptMe=除了%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=在設定中客戶的主要會計帳戶尚未定義 MainAccountForSuppliersNotDefined=在設定中供應商的主要會計帳戶尚未定義 @@ -144,7 +147,7 @@ NotVentilatedinAccount=不受會計項目約束 XLineSuccessfullyBinded=%s 產品/服務成功地指定會計項目 XLineFailedToBeBinded=%s 產品/服務沒指定任何會計項目 -ACCOUNTING_LIMIT_LIST_VENTILATION=頁面顯示要綁定的元件數(建議的最大值:50) +ACCOUNTING_LIMIT_LIST_VENTILATION=Maximum number of lines on list and bind page (recommended: 50) ACCOUNTING_LIST_SORT_VENTILATION_TODO=開始按最新元件對“待綁定”頁面進行排序 ACCOUNTING_LIST_SORT_VENTILATION_DONE=開始按最新元件對“完成綁定”頁面進行排序 @@ -198,7 +201,8 @@ Docdate=日期 Docref=參考 LabelAccount=標籤帳戶 LabelOperation=標籤操作 -Sens=意義 +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=字元 Codejournal=日記帳 @@ -206,7 +210,8 @@ JournalLabel=日記帳標籤 NumPiece=件數 TransactionNumShort=交易編號 AccountingCategory=個人化群組 -GroupByAccountAccounting=按會計科目分組 +GroupByAccountAccounting=Group by general ledger account +GroupBySubAccountAccounting=Group by subledger account AccountingAccountGroupsDesc=您可定義某些會計科目大類。他們可以在個人化會計報表中使用。 ByAccounts=依帳戶 ByPredefinedAccountGroups=依大類 @@ -248,7 +253,7 @@ PaymentsNotLinkedToProduct=付款未連結到任何產品/服務 OpeningBalance=初期餘額 ShowOpeningBalance=顯示初期餘額 HideOpeningBalance=隱藏初期餘額 -ShowSubtotalByGroup=依組顯示小計 +ShowSubtotalByGroup=Show subtotal by level Pcgtype=會計項目大類 PcgtypeDesc=用作某些會計報告的預定義“過濾器”和“分組”標準的科目組。例如“ INCOME”或“ EXPENSE”用作產品的會計科目組,以建立費用/收入報告。 @@ -271,11 +276,13 @@ DescVentilExpenseReport=在此查閱費用報表行數是否關聯到費用會 DescVentilExpenseReportMore=如果您在費用報告類型上設定會計帳戶,則應用程序將能夠在費用報告和會計科目表的會計帳戶之間進行所有綁定,只需點擊按鈕<strong>“ %s”即可</strong> 。如果未在費用字典中設定帳戶,或者您仍有某些行未綁定到任何帳戶,則必須從選單“ <strong>%s</strong> ”進行手動綁定。 DescVentilDoneExpenseReport=在此查閱費用報表的清單及其費用會計項目。 +Closure=Annual closure DescClosure=請在此處查詢依照月份的未經驗證活動數和已經開放的會計年度 OverviewOfMovementsNotValidated=第1步/未驗證移動總覽。 (需要關閉一個會計年度) +AllMovementsWereRecordedAsValidated=All movements were recorded as validated +NotAllMovementsCouldBeRecordedAsValidated=Not all movements could be recorded as validated ValidateMovements=驗證動作 DescValidateMovements=禁止修改,刪除任何文字內容。所有條目都必須經過驗證,否則將無法結案 -SelectMonthAndValidate=選擇月份並驗證移動 ValidateHistory=自動關聯 AutomaticBindingDone=自動關聯已完成 @@ -293,6 +300,7 @@ Accounted=計入總帳 NotYetAccounted=尚未記入總帳 ShowTutorial=顯示教程 NotReconciled=未對帳 +WarningRecordWithoutSubledgerAreExcluded=Warning, all operations without subledger account defined are filtered and excluded from this view ## Admin BindingOptions=Binding options @@ -337,6 +345,7 @@ Modelcsv_LDCompta10=LD Compta用之匯出(v10及更高版本) Modelcsv_openconcerto=匯出為OpenConcerto(測試) Modelcsv_configurable=匯出為可設置CSV Modelcsv_FEC=匯出為FEC +Modelcsv_FEC2=Export FEC (With dates generation writing / document reversed) Modelcsv_Sage50_Swiss=匯出為Sage 50 Switzerland Modelcsv_winfic=匯出Winfic-eWinfic-WinSis Compta Modelcsv_Gestinumv3=Export for Gestinum (v3) diff --git a/htdocs/langs/zh_TW/admin.lang b/htdocs/langs/zh_TW/admin.lang index 833e0197a6b..3d26c53e461 100644 --- a/htdocs/langs/zh_TW/admin.lang +++ b/htdocs/langs/zh_TW/admin.lang @@ -37,8 +37,8 @@ UnlockNewSessions=移除連線鎖定 YourSession=您的程序 Sessions=用戶程序 WebUserGroup=網頁伺服器用戶/組別 -PermissionsOnFilesInWebRoot=Permissions on files in web root directory -PermissionsOnFile=Permissions on file %s +PermissionsOnFilesInWebRoot=網站根目錄中檔案的權限 +PermissionsOnFile=檔案%s的權限 NoSessionFound=您的PHP設定似乎不允許列出活動程序。用於保存程序的資料夾( <b>%s</b> )可能受到保護(例如,通過OS權限或PHP指令open_basedir)。 DBStoringCharset=儲存資料的資料庫字集 DBSortingCharset=資料排序以資料庫字集 @@ -56,6 +56,8 @@ GUISetup=顯示設定 SetupArea=設定 UploadNewTemplate=上傳新的範本 FormToTestFileUploadForm=用於測試檔案上傳的表格(根據設定) +ModuleMustBeEnabled=模組/應用程式 <b>%s</b>必須啟用 +ModuleIsEnabled=模組/應用程式 <b>%s</b> 已啟用 IfModuleEnabled=註:若模組<b>%s</b>啓用時,「是的」有效。 RemoveLock=如果存在<b>%s</b>檔案,刪除/重新命名文件以允許使用更新/安裝工具。 RestoreLock=還原檔案唯讀權限檔案<b>%s</b> ,以禁止使用更新/安裝工具。 @@ -73,7 +75,7 @@ DisableJavascriptNote=注意:用於測試或調整目的。為了優化盲人 UseSearchToSelectCompanyTooltip=另外您若有大量合作方 (> 100,000), 您可在 "設定 -> 其他" 設定常數 COMPANY_DONOTSEARCH_ANYWHERE 為 1 增加速度。搜尋則會只限制在字串的開頭。 UseSearchToSelectContactTooltip=另外您若有大量合作方 (> 100,000), 您可在 " 設定 -> 其他" 中設定常數 CONTACT_DONOTSEARCH_ANYWHERE 為 1 以增加速度。搜尋則會只限制在字串的開頭。 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. +DelaiedFullListToSelectContact=載入“聯絡人”組合清單的內容前一直等待到按下任一按鍵。 <br>如果您有大量聯絡人的通訊錄,這可能會提高性能,但不太方便. NumberOfKeyToSearch=觸發搜尋的字元號:%s NumberOfBytes=位元數 SearchString=尋找字串 @@ -82,10 +84,9 @@ AllowToSelectProjectFromOtherCompany=在合作方的文件上,可選擇已連 JavascriptDisabled=JavaScript 不啓動 UsePreviewTabs=使用預覽分頁 ShowPreview=顯示預覽 -ShowHideDetails=Show-Hide details +ShowHideDetails=顯示-隱藏詳細訊息 PreviewNotAvailable=無法預覽 ThemeCurrentlyActive=目前可用主題 -CurrentTimeZone=PHP (伺服器)時區 MySQLTimeZone=MySql (資料庫)時區 TZHasNoEffect=日期由資料庫伺服器已儲存和已返回,就像它們被保存為提交的字串一樣。時區僅在使用UNIX_TIMESTAMP函數時才有效(Dolibarr不應使用,因此即使輸入資料後更改資料庫TZ也不起作用)。 Space=空間 @@ -153,8 +154,8 @@ SystemToolsAreaDesc=此區域提供管理功能。使用選單選擇所需的功 Purge=清除 PurgeAreaDesc=此頁面允許您刪除Dolibarr產生或儲存的所有文件(暫存檔案或<b>%s</b>目錄中的所有文件)。通常不需要使用此功能。此功能提供無權限刪除Web服務器產生之文件的Dolibarr用戶提供了一種解決方法。 PurgeDeleteLogFile=刪除 log 檔案,包含Syslog 模組的 <b>%s</b> (沒有遺失資料風險) -PurgeDeleteTemporaryFiles=刪除所有暫存檔案(沒有丟失資料的風險)。注意:僅對於24小時前於temp目錄產生的檔案才執行刪除操作。 -PurgeDeleteTemporaryFilesShort=刪除範本檔案 +PurgeDeleteTemporaryFiles=刪除所有紀錄與暫存檔案(沒有丟失資料的風險)。注意:僅對於24小時前於temp資料夾已建立的檔案才執行刪除操作。 +PurgeDeleteTemporaryFilesShort=刪除紀錄和暫存檔案 PurgeDeleteAllFilesInDocumentsDir=刪除資料夾中的所有檔案: <b>%s</b> 。 <br>這將刪除所有與元件(合作方,發票等)相關的所有產生文件,上傳到ECM模組中的檔案,資料庫備份轉存和臨時文件。 PurgeRunNow=立即清除 PurgeNothingToDelete=沒有可以刪除的資料夾或檔案。 @@ -256,6 +257,7 @@ ReferencedPreferredPartners=首選合作夥伴 OtherResources=其他資源 ExternalResources=外部資源 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> HelpCenterDesc1=以下是獲得Dolibarr幫助和支持的一些資源。 @@ -274,7 +276,7 @@ NoticePeriod=通知期 NewByMonth=依月份的新通知 Emails=電子郵件 EMailsSetup=電子郵件設定 -EMailsDesc=This page allows you to set parameters or options for email sending. +EMailsDesc=此頁面允許您設定電子郵件傳送的參數或選項。 EmailSenderProfiles=電子郵件寄件者資訊 EMailsSenderProfileDesc=您可以將此部分保留空白。如果您在此處輸入一些電子郵件,當您編寫新電子郵件時,它們將被增加到組合框中的可能寄件人清單中。 MAIN_MAIL_SMTP_PORT=SMTP / SMTPS連接埠(php.ini中的預設值: <b>%s</b> ) @@ -292,7 +294,7 @@ MAIN_MAIL_SMTPS_ID=SMTP 帳號(如果發送服務器需要身份驗證) MAIN_MAIL_SMTPS_PW=SMTP密碼(如果發送伺服器需要身份驗證) MAIN_MAIL_EMAIL_TLS=使用TLS(SSL)加密 MAIN_MAIL_EMAIL_STARTTLS=使用TLS(STARTTLS)加密 -MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED=Authorise les certificats auto-signés +MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED=授權自動簽署證書 MAIN_MAIL_EMAIL_DKIM_ENABLED=使用數位簽章產生電子郵件簽名 MAIN_MAIL_EMAIL_DKIM_DOMAIN=使用數位簽章的電子郵件網域 MAIN_MAIL_EMAIL_DKIM_SELECTOR=數位簽章選擇器名稱 @@ -375,7 +377,7 @@ ExamplesWithCurrentSetup=目前設定的範例 ListOfDirectories=OpenDocument 範本資料夾下的清單 ListOfDirectoriesForModelGenODT=包含具有OpenDocument格式的範本文件的資料夾清單。 <br><br>在這裡放置資料夾的完整路徑。 <br>在eah資料夾之間增加Enter符號。 <br>要增加GED模組的資料夾,請在此處增加<b>DOL_DATA_ROOT/ecm/yourdirectoryname</b> 。 <br><br>這些資料夾中的文件必須以<b>.odt</b>或<b>.ods</b>結尾。 NumberOfModelFilesFound=在這些資料夾中找到的ODT / ODS範本文件數 -ExampleOfDirectoriesForModelGen=語法範例:<br> ç:\\mydir<br>/home/mydir<br>DOL_DATA_ROOT/ecm/ecmdir +ExampleOfDirectoriesForModelGen=語法範例:<br>c:\\myapp\\mydocumentdir\\mysubdir<br>/home/myapp/mydocumentdir/mysubdir<br>DOL_DATA_ROOT/ecm/ecmdir FollowingSubstitutionKeysCanBeUsed=<br>要了解如何建立odt文件範本,然後將它們存儲在那些資料夾中,請參閱Wiki文件: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template FirstnameNamePosition=名字/姓氏的位置 @@ -406,7 +408,7 @@ UrlGenerationParameters=保護網址參數 SecurityTokenIsUnique=為每個網址使用唯一的安全金鑰參數 EnterRefToBuildUrl=輸入項目%s的參考值 GetSecuredUrl=取得計算後網址 -ButtonHideUnauthorized=隱藏非管理員用戶的按鈕以執行未經授權的操作,而不是顯示禁用的灰色按鈕 +ButtonHideUnauthorized=對內部用戶也隱藏未經授權的操作按鈕(否則為灰色) OldVATRates=舊營業稅率 NewVATRates=新營業稅率 PriceBaseTypeToChange=根據已定義的基礎參考價參修改價格 @@ -555,7 +557,7 @@ Module55Name=條碼 Module55Desc=條碼管理 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 +Module57Name=銀行直接轉帳付款 Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=點選撥打 Module58Desc=點選撥打系統(Asterisk, ...)的整合 @@ -668,7 +670,7 @@ Module54000Desc=直接列印(不用打開文件)使用 Cups IPP 介面(印表機 Module55000Name=問卷、調查或投票 Module55000Desc=建立線上問卷,調查或投票(例如Doodle,Studs,RDVz等) Module59000Name=利潤 -Module59000Desc=利潤管理模組 +Module59000Desc=跟隨利潤的模組 Module60000Name=佣金 Module60000Desc=管理佣金的模組 Module62000Name=國際貿易術語 @@ -677,7 +679,7 @@ Module63000Name=資源 Module63000Desc=管理用於分配給事件的資源(印表機,汽車,房間等) Permission11=讀取客戶發票 Permission12=建立/修改客戶發票 -Permission13=Invalidate customer invoices +Permission13=無效的客戶發票 Permission14=驗證客戶發票 Permission15=以電子郵件寄送客戶發票 Permission16=為客戶發票建立付款 @@ -694,7 +696,7 @@ Permission32=建立/修改產品資訊 Permission34=刪除產品 Permission36=查看/管理隱藏的產品 Permission38=匯出產品資訊 -Permission39=Ignore minimum price +Permission39=忽略最低價格 Permission41=讀取專案及任務(已分享專案及以我擔任連絡人的專案)。也可在被指派的任務對自已或等級中輸入耗用的時間(時間表) Permission42=建立/修改專案(已分享專案及以我擔任連絡人的專案)。也可以建立任務及指派用戶到專案及任務 Permission44=刪除專案(已分享專案及以我擔任連絡人的專案) @@ -703,9 +705,9 @@ Permission61=讀取干預 Permission62=建立/修改干預 Permission64=刪除干預 Permission67=匯出干預 -Permission68=Send interventions by email -Permission69=Validate interventions -Permission70=Invalidate interventions +Permission68=使用電子郵件傳送干預措施 +Permission69=驗證干預措施 +Permission70=無效的干預措施 Permission71=讀取會員 Permission72=建立/修改會員 Permission74=刪除會員 @@ -728,7 +730,7 @@ Permission95=讀取報告 Permission101=讀取出貨資訊 Permission102=建立/修改出貨單 Permission104=驗證出貨單 -Permission105=Send sendings by email +Permission105=使用電子郵件傳送傳送 Permission106=匯出出貨單 Permission109=刪除出貨單 Permission111=讀取財務帳戶 @@ -836,10 +838,10 @@ Permission402=建立/修改折扣 Permission403=驗證折扣 Permission404=刪除折扣 Permission430=使用除錯欄 -Permission511=Read payments of salaries (yours and subordinates) +Permission511=讀取薪資支付(您和您的下屬) Permission512=建立/修改薪水支付 Permission514=刪除薪水支付 -Permission517=Read payments of salaries of everybody +Permission517=讀取每個人的薪資支付 Permission519=匯出薪水 Permission520=讀取借款 Permission522=建立/修改借款 @@ -851,19 +853,19 @@ Permission532=建立/修改服務 Permission534=刪除服務 Permission536=查看/管理隱藏服務 Permission538=匯出服務 -Permission561=Read payment orders by credit transfer -Permission562=Create/modify payment order by credit transfer -Permission563=Send/Transmit payment order by credit transfer -Permission564=Record Debits/Rejections of credit transfer -Permission601=Read stickers -Permission602=Create/modify stickers -Permission609=Delete stickers +Permission561=讀取以直接轉帳的付款單 +Permission562=建立/修改直接轉帳的付款單 +Permission563=傳送/傳遞直接轉帳的付款單 +Permission564=記錄借方/拒絕的直接轉帳 +Permission601=讀取標籤 +Permission602=建立/修改標籤 +Permission609=刪除標籤 Permission650=讀取物料清單 Permission651=新增/更新物料清單 Permission652=刪除物料清單 -Permission660=Read Manufacturing Order (MO) -Permission661=Create/Update Manufacturing Order (MO) -Permission662=Delete Manufacturing Order (MO) +Permission660=讀取製造訂單(MO) +Permission661=建立/更新製造訂單(MO) +Permission662=刪除製造訂單(MO) Permission701=讀取捐款 Permission702=建立/修改捐款 Permission703=刪除捐款 @@ -873,8 +875,8 @@ Permission773=刪除費用報告 Permission774=讀取全部費用報告(甚至非屬於用戶的下屬) Permission775=核准費用報告 Permission776=支付費用報告 -Permission777=Read expense reports of everybody -Permission778=Create/modify expense reports of everybody +Permission777=讀取每個人的費用報表 +Permission778=建立/修改每個人的費用報表 Permission779=匯出費用報告 Permission1001=讀取庫存資訊 Permission1002=建立/修改倉庫 @@ -899,9 +901,9 @@ Permission1185=批准採購訂單 Permission1186=訂購採購訂單 Permission1187=確認收到採購訂單 Permission1188=刪除採購訂單 -Permission1189=Check/Uncheck a purchase order reception +Permission1189=選取/反選取採購訂單接收 Permission1190=批准(第二次批准)採購訂單 -Permission1191=Export supplier orders and their attributes +Permission1191=匯出供應商訂單及其屬性 Permission1201=取得匯出結果 Permission1202=建立/修改匯出 Permission1231=讀取供應商發票 @@ -915,8 +917,8 @@ Permission1251=執行從外部資料批次匯入到資料庫的功能 (載入資 Permission1321=匯出客戶發票、屬性及付款資訊 Permission1322=重啟已付帳單 Permission1421=匯出銷售訂單和屬性 -Permission1521=Read documents -Permission1522=Delete documents +Permission1521=讀取文件 +Permission1522=刪除文件 Permission2401=連結到他的用戶帳戶的讀取操作(事件或任務)(如果是事件的所有者或僅被分配) Permission2402=建立/修改連結到自己的用戶帳戶(如果是事件所有者)的活動(事件或任務) Permission2403=刪除連結到自己用戶帳戶的行動(事件或任務)(如果是事件所有者) @@ -931,7 +933,7 @@ Permission2515=設定文件資料夾 Permission2801=在唯讀模式下使用 FTP 客戶端 (僅瀏覽及下載) Permission2802=在寫入模式下使用 FTP 客戶端 (可刪除或上傳檔案) Permission3200=讀取存檔的事件和指紋 -Permission3301=Generate new modules +Permission3301=產生新模組 Permission4001=查看員工 Permission4002=建立員工 Permission4003=刪除員工 @@ -951,13 +953,13 @@ Permission23001=讀取預定工作 Permission23002=建立/更新預定工作 Permission23003=刪除預定工作 Permission23004=執行預定工作 -Permission50101=Use Point of Sale (SimplePOS) -Permission50151=Use Point of Sale (TakePOS) +Permission50101=使用銷售點(SimplePOS) +Permission50151=使用銷售點(TakePOS) Permission50201=讀取交易 Permission50202=匯入交易 -Permission50330=Read objects of Zapier -Permission50331=Create/Update objects of Zapier -Permission50332=Delete objects of Zapier +Permission50330=讀取Zapier的物件 +Permission50331=建立/更新Zapier的物件 +Permission50332=刪除Zapier的物件 Permission50401=將產品和發票與會計科目綁定 Permission50411=讀取分類帳中的操作 Permission50412=分類帳中的寫入/編輯操作 @@ -981,26 +983,26 @@ Permission63001=讀取資源 Permission63002=建立/修改資源 Permission63003=刪除資源 Permission63004=連結資源到行程事件 -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 +Permission64001=允許直接列印 +Permission67000=允許列印收據 +Permission68001=讀取通訊報告 +Permission68002=建立/修改通訊報告 +Permission68004=刪除通訊報告 +Permission941601=讀取收據 +Permission941602=建立和修改收據 +Permission941603=驗證收據 +Permission941604=以電子郵件傳送收據 +Permission941605=匯出收據 +Permission941606=刪除收據 DictionaryCompanyType=合作方類型 DictionaryCompanyJuridicalType=法人合作方 -DictionaryProspectLevel=Prospect potential level for companies -DictionaryProspectContactLevel=Prospect potential level for contacts +DictionaryProspectLevel=公司的潛在機率層級 +DictionaryProspectContactLevel=聯絡人的潛在機率層級 DictionaryCanton=州/省 DictionaryRegion=地區 DictionaryCountry=國家 DictionaryCurrency=幣別 -DictionaryCivility=榮譽稱號 +DictionaryCivility=稱謂或頭銜 DictionaryActions=行程事件類型 DictionarySocialContributions=社會稅或財政稅類型 DictionaryVAT=營業稅率或銷售稅率 @@ -1025,14 +1027,14 @@ DictionaryEMailTemplates=電子郵件範本 DictionaryUnits=單位 DictionaryMeasuringUnits=計算單位 DictionarySocialNetworks=社會網路 -DictionaryProspectStatus=Prospect status for companies -DictionaryProspectContactStatus=Prospect status for contacts +DictionaryProspectStatus=公司的潛在狀態 +DictionaryProspectContactStatus=聯絡人的潛在狀態 DictionaryHolidayTypes=休假類型 DictionaryOpportunityStatus=專案/潛在的潛在狀態 DictionaryExpenseTaxCat=費用報表 -交通類別 DictionaryExpenseTaxRange=費用報表 - 依交通類別劃分範圍 -DictionaryTransportMode=Intracomm report - Transport mode -TypeOfUnit=Type of unit +DictionaryTransportMode=通訊報告-傳送模式 +TypeOfUnit=單位類型 SetupSaved=設定已儲存 SetupNotSaved=設定未儲存 BackToModuleList=返回模組清單 @@ -1083,7 +1085,7 @@ LabelUsedByDefault=若代號沒有找翻譯字句,則使用預設標籤 LabelOnDocuments=文件標籤 LabelOrTranslationKey=標籤或翻譯秘鑰 ValueOfConstantKey=常數設置的值 -ConstantIsOn=Option %s is on +ConstantIsOn= 選項%s啟用中 NbOfDays=天數 AtEndOfMonth=月底 CurrentNext=現在/下一個 @@ -1128,7 +1130,7 @@ LoginPage=登入頁面 BackgroundImageLogin=背景圖片 PermanentLeftSearchForm=左側選單上的永久搜尋表格 DefaultLanguage=預設語言 -EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships +EnableMultilangInterface=為客戶或供應商關係啟用多語言支援 EnableShowLogo=在選單中顯示公司logo CompanyInfo=公司/組織 CompanyIds=公司/組織身分 @@ -1170,8 +1172,8 @@ Delays_MAIN_DELAY_EXPENSEREPORTS=費用報表批准 Delays_MAIN_DELAY_HOLIDAYS=休假申請批准 SetupDescription1=在開始使用Dolibarr之前,必須定義一些初始參數並啟用/設定模組。 SetupDescription2=以下兩個部分是必需的(“設定”選單中的前兩個項目): -SetupDescription3= <a href="%s"> %s-> %s </a> <br> <br>用於自訂您應用程式默認行為的基本參數(例如 跟國家相關的功能)。 -SetupDescription4= <a href="%s"> %s-> %s </a> <br> <br>此軟件是許多模塊/應用程序的套件。必須啟用和配置與您的需求相關的模塊。這些模塊的激活將顯示菜單條目。 +SetupDescription3= <a href="%s"> %s-> %s </a> <br> <br>用於自訂您的應用程式預設行為的基本參數(例如 跟國家相關的功能)。 +SetupDescription4= <a href="%s"> %s-> %s </a> <br> <br>此軟體是許多模組/應用程式的套件。必須啟用和配置與您的需求相關的模組。這些模組啟動後將會顯示在選單上。 SetupDescription5=其他設定選單項目管理可選參數。 LogEvents=安全稽核事件 Audit=稽核 @@ -1182,7 +1184,7 @@ InfoWebServer=關於網頁伺服器 InfoDatabase=關於資料庫 InfoPHP=關於 PHP InfoPerf=關於效能 -InfoSecurity=About Security +InfoSecurity=關於安全性 BrowserName=瀏覽器名稱 BrowserOS=瀏覽器系統 ListOfSecurityEvents=Dolibarr 安全事件清單 @@ -1233,7 +1235,7 @@ RestoreDesc2=將“ 文件”資料夾的備份文件(例如zip文件)還原 RestoreDesc3=將資料庫結構和數據從備份檔案還原到新Dolibarr安裝的資料庫或目前安裝的資料庫 (<b>%s</b>)中。警告,還原完成後,您必須使用備份時間/安裝中存在的登入名稱/密碼才能再次連接。 <br>要將備份數據庫還原到目前安裝中,可以依照此助手進行操作。 RestoreMySQL=MySQL匯入 ForcedToByAModule=有一啟動模組強制<b>%s</b>適用此規則 -ValueIsForcedBySystem=This value is forced by the system. You can't change it. +ValueIsForcedBySystem=此數值由系統設定。您無法更改。 PreviousDumpFiles=現有備份檔案 PreviousArchiveFiles=現有壓縮檔案 WeekStartOnDay=一周的第一天 @@ -1294,8 +1296,8 @@ WarningAtLeastKeyOrTranslationRequired=搜索條件至少要有一個值或翻 NewTranslationStringToShow=顯示新翻譯字串 OriginalValueWas=已覆蓋原始翻譯。 原始翻譯是:<br><br>%s TransKeyWithoutOriginalValue=您為任何語言文件中都不存在的翻譯密鑰'<strong>%s</strong>'強制進行了新翻譯 -TitleNumberOfActivatedModules=Activated modules -TotalNumberOfActivatedModules=Activated modules: <b>%s</b> / <b>%s</b> +TitleNumberOfActivatedModules=已啟用模組 +TotalNumberOfActivatedModules=已啟用模組: <b>%s</b> / <b>%s</b> YouMustEnableOneModule=您至少要啟用 1 個模組 ClassNotFoundIntoPathWarning=在PHP路徑中找不到類別%s YesInSummer=是的,在夏天 @@ -1306,7 +1308,7 @@ YouUseBestDriver=您使用的驅動程式%s是目前的最佳驅動程式。 YouDoNotUseBestDriver=您使用驅動程式%s,但建議使用驅動程式%s。 NbOfObjectIsLowerThanNoPb=您的資料庫中有%s %s。這不需要任何特定的優化。 SearchOptim=搜尋最佳化 -YouHaveXObjectUseSearchOptim=您的資料庫中有%s %s。您應該在首頁-設定-其他中加入常數%s到1。將搜尋限制在字串的開頭,這樣資料庫就可以使用索引,並且您應該立即得到回應。 +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=您在資料庫中具有%s %s,並且在首頁-設定-其他中,常數%s設定為1。 BrowserIsOK=您正在使用%s 網頁瀏覽器。此瀏覽器可以確保安全性和性能。 BrowserIsKO=您正在使用%s 網頁瀏覽器。眾所周知,此瀏覽器是安全性,性能和可靠性的錯誤選擇。我們建議使用Firefox,Chrome,Opera或Safari。 @@ -1564,9 +1566,9 @@ LDAPDescValues=範例值是為具有以下載入模式的<b>OpenLDAP</b>設計 ForANonAnonymousAccess=已驗證存取(例如寫入存取) PerfDolibarr=效能設定/最佳化報告 YouMayFindPerfAdviceHere=此頁面提供了一些與性能有關的檢查或建議。 -NotInstalled=Not installed. -NotSlowedDownByThis=Not slowed down by this. -NotRiskOfLeakWithThis=Not risk of leak with this. +NotInstalled=未安裝。 +NotSlowedDownByThis=並沒有因此而減慢。 +NotRiskOfLeakWithThis=沒有洩漏的風險。 ApplicativeCache=應用程式快取 MemcachedNotAvailable=沒有找到應用程式快取。你可安裝快取伺服器 Memcached 並啟動模組以增加效能。<br>更多的資訊在<a href="http://wiki.dolibarr.org/index.php/Module_MemCached_EN">http://wiki.dolibarr.org/index.php/Module_MemCached_EN</a>。<br>注意多數的伺服器供應商不提供類似的快取伺服器。 MemcachedModuleAvailableButNotSetup=找到應用程式快取的快取模組,但模組設定沒有完成。 @@ -1596,8 +1598,13 @@ ServiceSetup=服務模組設定 ProductServiceSetup=產品和服務模組設定 NumberOfProductShowInSelect=組合選擇清單中可顯示的最大產品數量(0 =無限制) ViewProductDescInFormAbility=在表格中顯示產品描述(否則在工具提示彈出窗口中顯示) +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=若產品/服務在提案/建議書內,啟動產品/服務中附件檔分頁選項以將產品 PDF 文件整合成報價/建議書/提案的 azur 格式 PDF -ViewProductDescInThirdpartyLanguageAbility=在合作方的語言中顯示產品描述 +ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user) UseSearchToSelectProductTooltip=同樣,如果您有大量產品(> 100 000),則可以通過在設定-其他中將PRODUCT_DONOTSEARCH_ANYWHERE常數變數變為1來提高速度。然後搜尋將僅限於字串開頭的。 UseSearchToSelectProduct=等到您按下一個鍵,然後再載入產品組合清單的內容(如果您有很多產品,這可能會提高性能,但是使用起來不太方便) SetDefaultBarcodeTypeProducts=產品預設條碼類型 @@ -1689,7 +1696,7 @@ NotTopTreeMenuPersonalized=個人化選單沒有連結到頂端選單項目 NewMenu=新選單 MenuHandler=選單處理程式 MenuModule=原始碼模組 -HideUnauthorizedMenu= 隱藏未經授權的選單(灰色) +HideUnauthorizedMenu=Hide unauthorized menus also for internal users (just greyed otherwise) DetailId=選單編號 DetailMenuHandler=顯示新的選單的選單處理程式 DetailMenuModule=若選單項目來自一個模組則為模組名稱 @@ -1917,7 +1924,7 @@ ExampleOfNewsMessageForMajorRelease=已提供Dolibarr ERP和CRM %s。版本%s是 ExampleOfNewsMessageForMaintenanceRelease=已提供Dolibarr ERP和CRM %s。版本%s是維護版本,因此僅包含錯誤修復。我們建議所有用戶升級到此版本。維護版本不加入新功能或對資料庫進行更改。您可以從https://www.dolibarr.org下載區域(穩定目錄的子目錄)下載此檔案。您可以閱讀<a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog">ChangeLog</a>以獲得完整的更改列表。 MultiPriceRuleDesc=啟用選項“產品/服務的多種價格”後,您可以為每種產品定義不同的價格(一種價格水平一個)。為了節省您的時間,您可以在此處輸入一個規則,根據第一級的價格自動計算每個級別的價格,因此您只需要為每種產品輸入第一級的價格。此頁面旨在節省您的時間,但僅在您每個級別的價格都相對於第一級別時才有用。在大多數情況下,您可以忽略此頁面。 ModelModulesProduct=產品文件的範本 -WarehouseModelModules=Templates for documents of warehouses +WarehouseModelModules=倉庫檔案模板 ToGenerateCodeDefineAutomaticRuleFirst=為了能夠自動產生代碼,您首先必須定義一個管理器來自動定義條碼編號。 SeeSubstitutionVars=請參閱 * 註釋以取得可能的替代變數清單 SeeChangeLog=查看變更日誌檔案(僅有英文) @@ -1956,7 +1963,7 @@ MAIN_PDF_MARGIN_LEFT=PDF左邊邊距 MAIN_PDF_MARGIN_RIGHT=PDF右邊邊距 MAIN_PDF_MARGIN_TOP=PDF頂部邊距 MAIN_PDF_MARGIN_BOTTOM=PDF底部邊距 -MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=PDF上Logo的高度 NothingToSetup=此模組不需要特別的設定。 SetToYesIfGroupIsComputationOfOtherGroups=若此群組是其他群組的計算值,則將其設定為 "是" EnterCalculationRuleIfPreviousFieldIsYes=如果先前欄位設定為“是”,則輸入計算規則(例如“ CODEGRP1 + CODEGRP2”) @@ -1983,11 +1990,12 @@ EMailHost=IMAP伺服器主機 MailboxSourceDirectory=信箱來源資料夾 MailboxTargetDirectory=信箱目標資料夾 EmailcollectorOperations=收集器要做的操作 +EmailcollectorOperationsDesc=全部訂單的操作已執行 MaxEmailCollectPerCollect=每次收集電子郵件的最大數量 CollectNow=立刻收集 ConfirmCloneEmailCollector=您確定要複製電子郵件收集器%s嗎? -DateLastCollectResult=最新嘗試收集日期 -DateLastcollectResultOk=最新收集成功日期 +DateLastCollectResult=Date of latest collect try +DateLastcollectResultOk=Date of latest collect success LastResult=最新結果 EmailCollectorConfirmCollectTitle=郵件收集確認 EmailCollectorConfirmCollect=您是否要立即執行此收集器的收集? @@ -2003,9 +2011,9 @@ LoadThirdPartyFromName=在%s載入合作方搜尋 (僅載入) LoadThirdPartyFromNameOrCreate= 在%s載入合作方搜尋 (如果找不到就建立) WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr -WithDolTrackingIDInMsgId=Message sent from Dolibarr -WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr -CreateCandidature=Create candidature +WithDolTrackingIDInMsgId=來自Dolibarr的訊息 +WithoutDolTrackingIDInMsgId=未從Dolibarr傳送訊息 +CreateCandidature=建立工作應用程式 FormatZip=Zip MainMenuCode=選單輸入代碼(主選單) ECMAutoTree=顯示自動ECM樹狀圖 @@ -2042,7 +2050,7 @@ DEBUGBAR_LOGS_LINES_NUMBER=控制台中可保留的日誌行數 WarningValueHigherSlowsDramaticalyOutput=警告,較高的值會嚴重降低輸出速度 ModuleActivated=模組%s已啟動並顯示於界面上 IfYouAreOnAProductionSetThis=If you are on a production environment, you should set this property to %s. -AntivirusEnabledOnUpload=Antivirus enabled on uploaded files +AntivirusEnabledOnUpload=在上傳的檔案已啟用了防病毒功能 EXPORTS_SHARE_MODELS=匯出模組功能可分享此模組給所有人 ExportSetup=模組匯出設定 ImportSetup=模組匯入設定 @@ -2073,9 +2081,9 @@ RssNote=注意:每個RSS feed定義都提供一個小部件,您必須啟用 JumpToBoxes=跳至設定 -> 小部件 MeasuringUnitTypeDesc=使用值例如 "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=比例尺是您必須移動小數部分以匹配默認參考單位的位數。對於“時間”單位類型,它是秒數。 80到99之間的值是保留值。 -TemplateAdded=Template added -TemplateUpdated=Template updated -TemplateDeleted=Template deleted +TemplateAdded=範本已增加 +TemplateUpdated=範本已更新 +TemplateDeleted=範本已刪除 MailToSendEventPush=Event reminder email SwitchThisForABetterSecurity=Switching this value to %s is recommended for more security DictionaryProductNature= 產品性質 @@ -2083,3 +2091,7 @@ 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 diff --git a/htdocs/langs/zh_TW/agenda.lang b/htdocs/langs/zh_TW/agenda.lang index dbc8cb5e692..b72514bf7b6 100644 --- a/htdocs/langs/zh_TW/agenda.lang +++ b/htdocs/langs/zh_TW/agenda.lang @@ -14,7 +14,7 @@ EventsNb=事件集數量 ListOfActions=事件清單 EventReports=事件報表 Location=位置 -ToUserOfGroup=Event assigned to any user in group +ToUserOfGroup=將事件分配給群組中的任何用戶 EventOnFullDay=整天事件 MenuToDoActions=全部未完成事件 MenuDoneActions=全部已停止事件 @@ -86,8 +86,8 @@ ProposalDeleted=提案/建議書已刪除 OrderDeleted=訂單已刪除 InvoiceDeleted=發票已刪除 DraftInvoiceDeleted=發票草稿已刪除 -CONTACT_CREATEInDolibarr=Contact %s created -CONTACT_DELETEInDolibarr=Contact %s deleted +CONTACT_CREATEInDolibarr=聯絡人%s已建立 +CONTACT_DELETEInDolibarr=聯絡人%s已刪除 PRODUCT_CREATEInDolibarr=產品 %s 已建立 PRODUCT_MODIFYInDolibarr=產品 %s 已修改 PRODUCT_DELETEInDolibarr=產品 %s 已刪除 @@ -111,7 +111,7 @@ TICKET_CLOSEInDolibarr=服務單%s已關閉 TICKET_DELETEInDolibarr=服務單%s已刪除 BOM_VALIDATEInDolibarr=物料清單(BOM)已驗證 BOM_UNVALIDATEInDolibarr=物料清單(BOM)未驗證 -BOM_CLOSEInDolibarr=物料清單(BOM)已禁用 +BOM_CLOSEInDolibarr=物料清單已停用 BOM_REOPENInDolibarr=物料清單(BOM)重新打開 BOM_DELETEInDolibarr=物料清單(BOM)已刪除 MRP_MO_VALIDATEInDolibarr=MO已驗證 @@ -152,6 +152,7 @@ ActionType=事件類別 DateActionBegin=事件開始日期 ConfirmCloneEvent=您確定要複製事件 <b>%s</b>? RepeatEvent=重覆事件 +OnceOnly=只有一次 EveryWeek=每周 EveryMonth=每月 DayOfMonth=一個月中的某天 @@ -160,9 +161,9 @@ DateStartPlusOne=開始日 +1 小時 SetAllEventsToTodo=將所有事件設定為待辦事項 SetAllEventsToInProgress=將所有事件設定為進行中 SetAllEventsToFinished=將所有事件設定為已完成 -ReminderTime=Reminder period before the event -TimeType=Duration type -ReminderType=Callback type -AddReminder=Create an automatic reminder notification for this event -ErrorReminderActionCommCreation=Error creating the reminder notification for this event -BrowserPush=Browser Notification +ReminderTime=事件前的提醒時間 +TimeType=持續時間類型 +ReminderType=回調類型 +AddReminder=為此事件建立自動提醒通知 +ErrorReminderActionCommCreation=為此事件建立提醒通知時出現錯誤 +BrowserPush=查看彈出通知 diff --git a/htdocs/langs/zh_TW/banks.lang b/htdocs/langs/zh_TW/banks.lang index 9efdccb1287..f3885f17658 100644 --- a/htdocs/langs/zh_TW/banks.lang +++ b/htdocs/langs/zh_TW/banks.lang @@ -173,10 +173,11 @@ SEPAMandate=歐洲統一支付區要求 YourSEPAMandate=您的歐洲統一支付區要求 FindYourSEPAMandate=這是您SEPA的授權,授權我們公司向您的銀行直接付款。退還已簽名(掃描已簽名文檔)或通過郵件發送至 AutoReportLastAccountStatement=進行對帳時,自動用最後一個對帳單編號填寫“銀行對帳單編號”欄位 -CashControl=POS現金圍欄 -NewCashFence=新現金圍欄 +CashControl=POS cash desk control +NewCashFence=New cash desk 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 diff --git a/htdocs/langs/zh_TW/bills.lang b/htdocs/langs/zh_TW/bills.lang index 6ff4433dde0..5e5158ca8af 100644 --- a/htdocs/langs/zh_TW/bills.lang +++ b/htdocs/langs/zh_TW/bills.lang @@ -11,9 +11,9 @@ BillsSuppliersUnpaidForCompany=%s的未付款供應商發票 BillsLate=逾期付款 BillsStatistics=客戶發票統計 BillsStatisticsSuppliers=供應商發票統計 -DisabledBecauseDispatchedInBookkeeping=已經停用,因為發票已發送到記帳簿中 -DisabledBecauseNotLastInvoice=已停用,因為發票不可清除。在這之後一些發票已被紀錄,並且會在記數器上產生空洞。 -DisabledBecauseNotErasable=已停用,因為無法清除 +DisabledBecauseDispatchedInBookkeeping=已關閉,因為發票已發送到記帳簿中 +DisabledBecauseNotLastInvoice=已關閉,因為發票無法抹除。已有一些發票已在這之後被紀錄,並且會在計數器中產生破洞。 +DisabledBecauseNotErasable=已關閉,因為無法清除 InvoiceStandard=標準發票 InvoiceStandardAsk=標準發票 InvoiceStandardDesc=此種發票為一般性發票。 @@ -22,16 +22,16 @@ InvoiceDepositAsk=預付款發票 InvoiceDepositDesc=當收到預付款後,這種發票便完成了。 InvoiceProForma=形式發票 InvoiceProFormaAsk=形式發票 -InvoiceProFormaDesc=<b>形式發票</b>是發票的形式,但沒有真實的會計價值。 +InvoiceProFormaDesc=<b>預編發票</b>是真實發票的影像但沒有真實的會計值。 InvoiceReplacement=替換發票 InvoiceReplacementAsk=替換發票的發票 InvoiceReplacementDesc=<b>替換發票</b>用於完全替換尚未收到付款的發票。 <br><br>注意:只能替換沒有付款的發票。如果您要替換的發票尚未關閉,它將自動關閉為“放棄”。 -InvoiceAvoir=信用票據(折讓單-credit notes) -InvoiceAvoirAsk=信用票據(credit notes)用來更正發票 -InvoiceAvoirDesc=<b>信用票據</b>(折讓單-credit notes)是一種負值發票,用於更正發票顯示的金額與實際支付的金額不同的事實(例如,客戶誤付了太多,或者由於退還了某些產品而無法支付全部金額)`。 -invoiceAvoirWithLines=從原始發票中的行建立信用票據(折讓單-credit notes) -invoiceAvoirWithPaymentRestAmount=建立有未付款提醒原始發票的信用票據(折讓單-credit notes) -invoiceAvoirLineWithPaymentRestAmount=未付款提醒餘額的信用票據(折讓單-credit notes) +InvoiceAvoir=同意折讓照會通知 +InvoiceAvoirAsk=同意折讓照會通知來更正發票 +InvoiceAvoirDesc=<b>同意折讓照會通知</b>就是交易中如有積欠對方款項,例如出貨的損害或錯誤的賠償等等,均可開立 Credit Note 給對方,表示我方願意賠償與還款的誠意,亦即我方欠對方多少錢的意思。(例如,客戶誤付了太多,或者由於退還了某些產品而無法支付全部金額)`。 +invoiceAvoirWithLines=從原始發票項目中建立同意折讓照會通知 +invoiceAvoirWithPaymentRestAmount=建立原始發票尚有未付款的同意折讓照會通知 +invoiceAvoirLineWithPaymentRestAmount=尚未付款金額的同意折讓照會通知 ReplaceInvoice=替換發票%s ReplacementInvoice=替換發票 ReplacedByInvoice=依發票%s替換 @@ -39,17 +39,17 @@ ReplacementByInvoice=依發票替換 CorrectInvoice=正確發票%s CorrectionInvoice=更正發票 UsedByInvoice=被用於支付發票%s -ConsumedBy=消耗者 +ConsumedBy=消耗由 NotConsumed=非消耗品 -NoReplacableInvoice=沒有可替換的發票 -NoInvoiceToCorrect=沒有任何發票(invoice)可以更正 -InvoiceHasAvoir=是一個或幾個信用票據(折讓單-credit notes)的來源 +NoReplacableInvoice=無可替換發票 +NoInvoiceToCorrect=無發票可更正 +InvoiceHasAvoir=是一個或幾個同意折讓照會通知的來源 CardBill=發票卡 -PredefinedInvoices=預定義的發票 +PredefinedInvoices=預定義之發票 Invoice=發票 PdfInvoiceTitle=發票 Invoices=發票 -InvoiceLine=發票行 +InvoiceLine=發票項目 InvoiceCustomer=客戶發票 CustomerInvoice=客戶發票 CustomersInvoices=客戶發票 @@ -61,20 +61,20 @@ Payment=付款 PaymentBack=退款 CustomerInvoicePaymentBack=退款 Payments=付款 -PaymentsBack=退回付款 +PaymentsBack=退款 paymentInInvoiceCurrency=發票幣別 -PaidBack=退款 +PaidBack=償還 DeletePayment=刪除付款 ConfirmDeletePayment=您確定要刪除此付款? -ConfirmConvertToReduc=您是否要將%s轉換為可用信用? +ConfirmConvertToReduc=您是否要將%s轉換為可用貸項? ConfirmConvertToReduc2=此金額將保存在所有折扣中,並可用作此客戶目前或未來發票的折扣。 -ConfirmConvertToReducSupplier=您是否要將%s轉換為可用信用? +ConfirmConvertToReducSupplier=您是否要將%s轉換為貸項? ConfirmConvertToReducSupplier2=此金額將保存在所有折扣中,並可用作此供應商目前或未來發票的折扣。 SupplierPayments=供應商付款 ReceivedPayments=收到付款 ReceivedCustomersPayments=從客戶收到的付款 PayedSuppliersPayments=支付給供應商的款項 -ReceivedCustomersPaymentsToValid=待驗證的客戶已付款單據 +ReceivedCustomersPaymentsToValid=收到客戶已付款去驗證 PaymentsReportsForYear=%s的付款報告 PaymentsReports=付款報告 PaymentsAlreadyDone=付款已完成 @@ -83,27 +83,27 @@ PaymentRule=付款條件 PaymentMode=付款類型 PaymentTypeDC=借/貸卡片 PaymentTypePP=PayPal -IdPaymentMode=付款類型(ID) +IdPaymentMode=付款類型 (id) CodePaymentMode=付款類型(編碼) LabelPaymentMode=付款類型(標籤) PaymentModeShort=付款類型 -PaymentTerm=付款期限 +PaymentTerm=付款條件 PaymentConditions=付款條件 PaymentConditionsShort=付款條件 PaymentAmount=付款金額 -PaymentHigherThanReminderToPay=付款高於提醒付款金額 -HelpPaymentHigherThanReminderToPay=注意,一張或多張帳單的付款金額高於未付金額。<br>編輯您的輸入,否則請確認並考慮為每張超額支付的發票建立信用票據(折讓單-credit notes)。 -HelpPaymentHigherThanReminderToPaySupplier=注意,一張或多張帳單的付款金額高於未付金額。<br>編輯您的輸入,否則請確認並考慮為每張超額支付的發票建立信用票據(折讓單-credit notes)。 -ClassifyPaid=分類'已付款' -ClassifyUnPaid=分類'未付款' -ClassifyPaidPartially=分類'部份支付' -ClassifyCanceled=分類'已放棄' -ClassifyClosed=分類'已關閉' -ClassifyUnBilled=分類'未開票' +PaymentHigherThanReminderToPay=付款高於付款提醒金額 +HelpPaymentHigherThanReminderToPay=注意,一張或多張帳單的付款金額高於未付金額。<br>編輯您的輸入,否則請確認並考慮為每張超額支付的發票建立同意折讓照會通知。 +HelpPaymentHigherThanReminderToPaySupplier=注意,一張或多張帳單的付款金額高於未付金額。<br>編輯您的輸入,否則請確認並考慮為每張超額支付的發票建立同意折讓照會通知。 +ClassifyPaid=分類 '已付款' +ClassifyUnPaid=分類 '未付款' +ClassifyPaidPartially=分類 '部份支付' +ClassifyCanceled=分類 '已放棄' +ClassifyClosed=分類 '已結' +ClassifyUnBilled=分類 '未支付' CreateBill=建立發票 -CreateCreditNote=建立信用票據(折讓單-credit notes) -AddBill=建立發票或信用票據(折讓單-credit notes) -AddToDraftInvoices=增加到草稿發票 +CreateCreditNote=建立同意折讓照會通知 +AddBill=建立發票或同意折讓照會通知 +AddToDraftInvoices=增加至發票草稿 DeleteBill=刪除發票 SearchACustomerInvoice=搜尋客戶發票 SearchASupplierInvoice=搜尋供應商發票 @@ -116,13 +116,13 @@ ConvertExcessReceivedToReduc=將超額付款轉換為可用信用額 ConvertExcessPaidToReduc=將超額付款轉換為可用折扣 EnterPaymentReceivedFromCustomer=輸入從客戶收到的付款 EnterPaymentDueToCustomer=應付客戶款項 -DisabledBecauseRemainderToPayIsZero=已禁用,因為剩餘的未付餘額為零 +DisabledBecauseRemainderToPayIsZero=已關閉,因為剩餘的未付餘額為零 PriceBase=價格基準 BillStatus=發票狀態 StatusOfGeneratedInvoices=已產生發票的狀態 BillStatusDraft=草稿(等待驗證) BillStatusPaid=已付款 -BillStatusPaidBackOrConverted=信用票據(折讓單-credit notes)退款或已標記為可貸 +BillStatusPaidBackOrConverted=同意折讓照會通知退款或已標記為貸項 BillStatusConverted=已付款(已可在最終發票中消費) BillStatusCanceled=已放棄 BillStatusValidated=已驗證(需要付費) @@ -184,10 +184,10 @@ ConfirmCancelBill=您確定要取消發票<b>%s</b>嗎? ConfirmCancelBillQuestion=您為什麼要將此發票分類為“廢棄”? ConfirmClassifyPaidPartially=您確定要將發票<b>%s</b>更改為已付款狀態嗎? ConfirmClassifyPaidPartiallyQuestion=該發票尚未完全支付。關閉此發票的原因是什麼? -ConfirmClassifyPaidPartiallyReasonAvoir=剩餘的未付款項<b>(%s %s)</b>是折扣,因為付款是在到期日前進行的。我用固定營業稅在信用票據(折讓單-credit notes)上。 +ConfirmClassifyPaidPartiallyReasonAvoir=剩餘未付款項<b>(%s %s)</b>同意為折扣,因為付款是在到期日前完成的。我調整了固定營業稅在同意折讓照會通知上。 ConfirmClassifyPaidPartiallyReasonDiscount=未付款餘額<b>(%s %s)</b>是折扣,因為付款是在付款到期日前進行的。 ConfirmClassifyPaidPartiallyReasonDiscountNoVat=未付款餘額<b>(%s %s)</b>是折扣,因為付款是在付款到期日前進行的。。我司接受此折扣不加營業稅。 -ConfirmClassifyPaidPartiallyReasonDiscountVat=未付款餘額<b>(%s %s)</b>是折扣,因為付款是在付款到期日前進行的。我可以在沒有信用票據(折讓單-credit notes)的情況下以這種折扣方式回復營業稅。 +ConfirmClassifyPaidPartiallyReasonDiscountVat=剩餘未付款項<b>(%s %s)</b>同意為折扣,因為付款是在付款到期日前完成的。我在沒有同意折讓照會通知的情況下以這種折扣方式恢復營業稅。 ConfirmClassifyPaidPartiallyReasonBadCustomer=壞客戶 ConfirmClassifyPaidPartiallyReasonProductReturned=產品部分退貨 ConfirmClassifyPaidPartiallyReasonOther=因其他原因而放棄的金額 @@ -196,7 +196,7 @@ ConfirmClassifyPaidPartiallyReasonDiscountVatDesc=在某些國家/地區,只 ConfirmClassifyPaidPartiallyReasonAvoirDesc=如果其他所有條件都不適合,請使用此選項 ConfirmClassifyPaidPartiallyReasonBadCustomerDesc=<b>壞客戶</b>是拒絕付款的客戶。 ConfirmClassifyPaidPartiallyReasonProductReturnedDesc=由於部分產品已退還而付款未完成時,使用此選項 -ConfirmClassifyPaidPartiallyReasonOtherDesc=如果其他所有條件都不適合,請使用此選項,例如在以下情況下: <br> -付款不完整,因為一些產品被運回<br> -聲稱金額太重要,因為忘記了折扣<br>在所有情況下,都必須通過建立信用票據(折讓單-credit notes)在會計系統中更正超額的金額。 +ConfirmClassifyPaidPartiallyReasonOtherDesc=如果其他所有選項都不適用,請使用此選擇,例如在以下情況下: <br> - 付款不完整因為一些產品被運回<br> - 聲稱金額太重要因為忘記了折扣<br>在所有情況下,都必須建立同意折讓照會通知在會計系統中更正超額的金額。 ConfirmClassifyAbandonReasonOther=其他 ConfirmClassifyAbandonReasonOtherDesc=此選擇將在所有其他情況下使用。例如,因為您計劃建立替換發票。 ConfirmCustomerPayment=您確認此為<b>%s</b> %s的付款金額? @@ -210,7 +210,7 @@ AmountOfBills=發票金額 AmountOfBillsHT=發票金額(稅後) AmountOfBillsByMonthHT=每月發票(invoice)金額(稅後) UseSituationInvoices=允許發票狀況 -UseSituationInvoicesCreditNote=允許發票狀況信用票據(折讓單-credit notes) +UseSituationInvoicesCreditNote=允許狀況開立同意折讓照會通知 Retainedwarranty=有保修 AllowedInvoiceForRetainedWarranty=保留保固,可用於以下類型的發票 RetainedwarrantyDefaultPercent=有保修預設百分比 @@ -228,7 +228,7 @@ RetainedWarrantyDateLimit=保修期限制 RetainedWarrantyNeed100Percent=發票情況需要以100%%的進度顯示在PDF上 AlreadyPaid=已付款 AlreadyPaidBack=已償還 -AlreadyPaidNoCreditNotesNoDeposits=已付款(無信用票據(折讓單-credit notes)和預付款) +AlreadyPaidNoCreditNotesNoDeposits=已付款 (無同意折讓照會通知及訂金) Abandoned=已放棄 RemainderToPay=未付款餘額 RemainderToTake=剩餘金額 @@ -287,18 +287,18 @@ AddRelativeDiscount=建立相對折扣 EditRelativeDiscount=編輯相對折扣 AddGlobalDiscount=新增絕對折扣 EditGlobalDiscounts=編輯絕對折扣 -AddCreditNote=建立信用票據(折讓單-credit notes) +AddCreditNote=建立同意折讓照會通知 ShowDiscount=顯示折扣 ShowReduc=顯示折扣 ShowSourceInvoice=顯示來源發票 RelativeDiscount=相對折扣 GlobalDiscount=全域折扣 -CreditNote=信用票據(折讓單-credit notes) -CreditNotes=信用票據(折讓單-credit notes) -CreditNotesOrExcessReceived=信用票據(折讓單-credit notes)或收到的超額款項 +CreditNote=同意折讓照會通知 +CreditNotes=同意折讓照會通知 +CreditNotesOrExcessReceived=同意折讓照會通知或收到的超額款項 Deposit=預付款 Deposits=預付款 -DiscountFromCreditNote=信用票據(折讓單-credit notes)%s的折扣 +DiscountFromCreditNote=從同意折讓照會通知 %s的折扣 DiscountFromDeposit=發票%s的預付款 DiscountFromExcessReceived=付款超過發票%s DiscountFromExcessPaid=付款超過發票%s @@ -336,7 +336,7 @@ RemoveDiscount=取消折扣 WatermarkOnDraftBill=草案發票上的水印(如果為空,則一無所有) InvoiceNotChecked=未選擇發票 ConfirmCloneInvoice=您確定要複製此發票<b>%s</b>嗎? -DisabledBecauseReplacedInvoice=由於發票已被替換,因此操作被禁用 +DisabledBecauseReplacedInvoice=由於發票已被替換,因此操作被關閉 DescTaxAndDividendsArea=該區域提供了所有特殊費用付款的摘要。這裡僅包括在固定年度內付款的記錄。 NbOfPayments=付款編號 SplitDiscount=將折扣分為兩部份 @@ -358,7 +358,7 @@ ListOfPreviousSituationInvoices=舊狀況發票清單 ListOfNextSituationInvoices=下個狀況發票清單 ListOfSituationInvoices=狀況發票的清單 CurrentSituationTotal=目前狀況總數 -DisabledBecauseNotEnouthCreditNote=要從周期中刪除狀況發票,此發票的信用票據(折讓單-credit notes)總計必須涵蓋該發票總計 +DisabledBecauseNotEnouthCreditNote=要從周期中刪除狀況發票,發票的同意折讓照會通知總和必須補足此發票的總和 RemoveSituationFromCycle=從周期中刪除此發票 ConfirmRemoveSituationFromCycle=從周期中刪除此%s發票? ConfirmOuting=確認中 @@ -441,8 +441,8 @@ BankAccountNumberKey=校驗碼 Residence=地址 IBANNumber=IBAN帳號 IBAN=IBAN -CustomerIBAN=IBAN of customer -SupplierIBAN=IBAN of vendor +CustomerIBAN=客戶國際銀行帳戶號碼 +SupplierIBAN=供應商國際銀行帳戶號碼 BIC=BIC / SWIFT BICNumber=BIC / SWIFT代碼 ExtraInfos=額外信息 @@ -498,7 +498,7 @@ ExpectedToPay=預期付款 CantRemoveConciliatedPayment=無法刪除對帳款 PayedByThisPayment=支付這筆款項 ClosePaidInvoicesAutomatically=完全付款後,將所有標準,預付款或替換發票自動分類為“已付款”。 -ClosePaidCreditNotesAutomatically=完全退款後,將所有信用票據(折讓單-credit notes)自動分類為“已付款”。 +ClosePaidCreditNotesAutomatically=當已完全退款後將所有同意折讓照會通知自動分類為 "已付款"。 ClosePaidContributionsAutomatically=完全付款後,將所有社會或財政捐款自動分類為“已付款”。 AllCompletelyPayedInvoiceWillBeClosed=所有沒有餘款的發票將自動關閉,狀態為“已付款”。 ToMakePayment=付款 @@ -512,10 +512,10 @@ YouMustCreateStandardInvoiceFirstDesc=您必須先建立標準發票,然後將 PDFCrabeDescription=發票PDF範本Crabe。完整的發票範本(Sponge範本的舊範本) PDFSpongeDescription=發票PDF範本Sponge。完整的發票範本 PDFCrevetteDescription=發票PDF範本Crevette。狀況發票的完整發票範本 -TerreNumRefModelDesc1=退回編號格式,標準發票為%syymm-nnnn,信用票據(折讓單-credit notes)是%syymm-nnnn的格式,其中yy是年,mm是月,nnnn是不間斷且不返回0的序列 -MarsNumRefModelDesc1=退回編號格式,標準發票退回格式為%syymm-nnnn,替換發票為%syymm-nnnn,預付款發票為%syymm-nnnn,信用票據(折讓單-credit notes)為 %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,信用票據(折讓單-credit notes)格式為%syymm-nnnn,預付款發票格式為%syymm-nnnn,其中yy為年,mm為月,nnnn為不間斷且不返回0的序列 +CactusNumRefModelDesc1=轉回數字格式,標準發票為%syymm-nnnn,同意折讓照會通知為%syymm-nnnn,訂金發票格式為%syymm-nnnn,其中 yy 為年,mm 為月,nnnn 為無空白且不返回0的序列 EarlyClosingReason=提前關閉原因 EarlyClosingComment=提前關閉註記 ##### Types de contacts ##### @@ -531,6 +531,7 @@ TypeContact_invoice_supplier_external_SERVICE=供應商服務聯絡人 InvoiceFirstSituationAsk=第一張狀況發票 InvoiceFirstSituationDesc=<b>狀況發票</b>與進度(例如建築進度)相關的狀況相關聯。每種狀況都與發票相關。 InvoiceSituation=狀況發票 +PDFInvoiceSituation=狀況發票 InvoiceSituationAsk=根據狀況開具發票 InvoiceSituationDesc=在已經存在的狀況下建立新的狀況 SituationAmount=狀況發票金額(淨額) @@ -539,7 +540,7 @@ ModifyAllLines=修改所有行 CreateNextSituationInvoice=建立下一個狀況 ErrorFindNextSituationInvoice=錯誤,無法找到下一個狀況周期參考 ErrorOutingSituationInvoiceOnUpdate=無法為此狀況開票。 -ErrorOutingSituationInvoiceCreditNote=無法開立已連結的信用票據(折讓單-credit notes)。 +ErrorOutingSituationInvoiceCreditNote=無法開立已連結的同意折讓照會通知。 NotLastInCycle=此發票不是周期中最新的,不能修改。 DisabledBecauseNotLastInCycle=下一個狀況已經存在。 DisabledBecauseFinal=此為最後狀況。 @@ -575,3 +576,7 @@ BILL_SUPPLIER_DELETEInDolibarr=供應商發票已刪除 UnitPriceXQtyLessDiscount=單價 x 數量 - 折讓 CustomersInvoicesArea=客戶計費區 SupplierInvoicesArea=供應商付款區 +FacParentLine=發票的母行 +SituationTotalRayToRest=剩下的不含稅 +PDFSituationTitle=情況n°%d +SituationTotalProgress=總進度%d %% diff --git a/htdocs/langs/zh_TW/blockedlog.lang b/htdocs/langs/zh_TW/blockedlog.lang index 98a1bcf5d5c..01d6e9d8300 100644 --- a/htdocs/langs/zh_TW/blockedlog.lang +++ b/htdocs/langs/zh_TW/blockedlog.lang @@ -8,7 +8,7 @@ BrowseBlockedLog=不可更改的日誌 ShowAllFingerPrintsMightBeTooLong=顯示所有存檔的日誌(可能很長) ShowAllFingerPrintsErrorsMightBeTooLong=顯示所有無效的歸檔日誌(可能很長) DownloadBlockChain=下載指紋 -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=歸檔的日誌條目無效。這意味著某人(黑客?)在記錄後已經修改了該記錄的某些數據,或者刪除了先前的存檔記錄(檢查是否存在具有先前#號的行)。 OkCheckFingerprintValidity=歸檔日誌記錄有效。此行上的數據未修改,並且該條目位於上一個條目之後。 OkCheckFingerprintValidityButChainIsKo=與以前的日誌相比,已歸檔的日誌似乎有效,但是先前的鏈已損壞。 AddedByAuthority=已儲存到遠端授權中 @@ -35,7 +35,7 @@ logDON_DELETE=捐贈邏輯刪除 logMEMBER_SUBSCRIPTION_CREATE=會員訂閱已建立 logMEMBER_SUBSCRIPTION_MODIFY=會員訂閱已修改 logMEMBER_SUBSCRIPTION_DELETE=會員訂閱邏輯刪除 -logCASHCONTROL_VALIDATE=現金圍欄記錄 +logCASHCONTROL_VALIDATE=收銀台結帳記錄 BlockedLogBillDownload=客戶發票下載 BlockedLogBillPreview=客戶發票預覽 BlockedlogInfoDialog=日誌詳細訊息 @@ -46,9 +46,9 @@ logDOC_PREVIEW=預覽經過驗證的文件以進行列印或下載 logDOC_DOWNLOAD=下載經過驗證的文件以進行列印或發送 DataOfArchivedEvent=存檔事件的完整數據 ImpossibleToReloadObject=未連結原始項目(類型為%s,編號為%s)(請參閱“完整數據”列以獲取不可更改的保存數據) -BlockedLogAreRequiredByYourCountryLegislation=您所在國家/地區的法規可能要求使用不可更改的日誌模組。禁用此模組可能會使任何未來的交易在法律和法律軟件使用方面均無效,因為它們無法通過稅務審核進行驗證。 -BlockedLogActivatedBecauseRequiredByYourCountryLegislation=由於您所在國家/地區的法律,“不可更改的日誌”模組已啟用。禁用此模組可能會使任何未來的交易在法律和使用合法軟件方面均無效,因為它們無法通過稅務審核進行驗證。 -BlockedLogDisableNotAllowedForCountry=強制使用此模組的國家/地區清單(為防止錯誤地禁用此模組,如果您所在的國家/地區位於此清單中,則必須先編輯此清單才能禁用此模組。另外請注意,啟用/禁用此模組將被記錄到不可更改的日誌)。 +BlockedLogAreRequiredByYourCountryLegislation=您所在國家/地區的法規可能要求使用不可更改的日誌模組。關閉此模組可能會使任何未來的交易在法律和法律軟件使用方面均無效,因為它們無法通過稅務審核進行驗證。 +BlockedLogActivatedBecauseRequiredByYourCountryLegislation=由於您所在國家/地區的法律,“不可更改的日誌”模組已啟用。關閉此模組可能會使任何未來的交易在法律和使用合法軟件方面均無效,因為它們無法通過稅務審核進行驗證。 +BlockedLogDisableNotAllowedForCountry=強制使用此模組的國家/地區清單(為防止錯誤地關閉此模組,如果您所在的國家/地區位於此清單中,則必須先編輯此清單才能關閉此模組。另外請注意,啟用/關閉此模組將被記錄到不可更改的日誌)。 OnlyNonValid=無效的 TooManyRecordToScanRestrictFilters=記錄太多,無法掃描/分析。請使用更嚴格的過濾條件來限制清單。 RestrictYearToExport=限制月/年匯出 diff --git a/htdocs/langs/zh_TW/boxes.lang b/htdocs/langs/zh_TW/boxes.lang index 9dcff47deff..157b6a17cef 100644 --- a/htdocs/langs/zh_TW/boxes.lang +++ b/htdocs/langs/zh_TW/boxes.lang @@ -46,9 +46,12 @@ BoxTitleLastModifiedDonations=最新%s筆已修改捐贈 BoxTitleLastModifiedExpenses=最新%s份已修改費用報告 BoxTitleLatestModifiedBoms=最新%s筆已修改BOM BoxTitleLatestModifiedMos=最新%s筆已修改製造訂單 +BoxTitleLastOutstandingBillReached=超過最大未償還額的客戶 BoxGlobalActivity=全球活動(發票、提案/建議書、訂單) BoxGoodCustomers=好客戶 BoxTitleGoodCustomers=%s位好客戶 +BoxScheduledJobs=排程工作 +BoxTitleFunnelOfProspection=潛在漏斗 FailedToRefreshDataInfoNotUpToDate=無法更新RSS流量。最近成功更新的日期:%s LastRefreshDate=最新更新日期 NoRecordedBookmarks=未定義書籤。 @@ -83,8 +86,8 @@ BoxTitleLatestModifiedSupplierOrders=供應商訂單:最後修改的%s筆 BoxTitleLastModifiedCustomerBills=客戶發票:最後修改的%s張 BoxTitleLastModifiedCustomerOrders=銷售訂單:最後修改的%s筆 BoxTitleLastModifiedPropals=最新%s筆修改的提案/建議書 -BoxTitleLatestModifiedJobPositions=Latest %s modified jobs -BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures +BoxTitleLatestModifiedJobPositions=最新已修改的工作%s +BoxTitleLatestModifiedCandidatures=最新已修改的候選人%s ForCustomersInvoices=客戶發票 ForCustomersOrders=客戶訂單 ForProposals=提案/建議書 @@ -92,8 +95,8 @@ LastXMonthRolling=最新%s月份滾動 ChooseBoxToAdd=將小工具加到您的控制板 BoxAdded=小工具已加到您的控制板中 BoxTitleUserBirthdaysOfMonth=本月的生日(用戶) -BoxLastManualEntries=會計中的最後手動條目 -BoxTitleLastManualEntries=%s最新手動條目 +BoxLastManualEntries=Latest record in accountancy entered manually or without source document +BoxTitleLastManualEntries=%s latest record entered manually or without source document NoRecordedManualEntries=會計中沒有手動條目 BoxSuspenseAccount=用暫記帳戶計算會計操作 BoxTitleSuspenseAccount=未分配的行數 @@ -102,5 +105,7 @@ SuspenseAccountNotDefined=未定義暫記帳戶 BoxLastCustomerShipments=上次客戶發貨 BoxTitleLastCustomerShipments=最新%s筆客戶發貨 NoRecordedShipments=沒有已記錄的客戶發貨 +BoxCustomersOutstandingBillReached=達到最大客戶數 # Pages AccountancyHome=會計 +ValidatedProjects=已驗證的專案 diff --git a/htdocs/langs/zh_TW/cashdesk.lang b/htdocs/langs/zh_TW/cashdesk.lang index 59713d97ac3..e0d7525a4d7 100644 --- a/htdocs/langs/zh_TW/cashdesk.lang +++ b/htdocs/langs/zh_TW/cashdesk.lang @@ -12,16 +12,16 @@ CashDeskOn=在 CashDeskThirdParty=合作方 ShoppingCart=購物車 NewSell=新銷售 -AddThisArticle=加入此文章 +AddThisArticle=加入此物品 RestartSelling=回到銷售 SellFinished=銷售完成 PrintTicket=列印銷售單 SendTicket=送出銷售單 -NoProductFound=未找到文章 +NoProductFound=未找到物品 ProductFound=找到產品 -NoArticle=無文章 +NoArticle=沒有物品 Identification=證明 -Article=文章 +Article=物品 Difference=差異 TotalTicket=全部銷售單 NoVAT=此銷售沒有營業稅 @@ -29,7 +29,7 @@ Change=超額已收到 BankToPay=付款帳戶 ShowCompany=顯示公司 ShowStock=顯示倉庫 -DeleteArticle=點擊刪除此文章 +DeleteArticle=點擊刪除此物品 FilterRefOrLabelOrBC=搜索(參考/標籤) UserNeedPermissionToEditStockToUsePos=您要求減少由發票建立的庫存,所以使用POS的使用者需要具有編輯庫存的權限。 DolibarrReceiptPrinter=Dolibarr 收據印表機 @@ -46,11 +46,11 @@ SearchProduct=搜尋商品 Receipt=收據 Header=頁首 Footer=頁尾 -AmountAtEndOfPeriod=結束的金額(天,月或年) +AmountAtEndOfPeriod=結算金額(天,月或年) TheoricalAmount=理論金額 RealAmount=實際金額 -CashFence=現金圍欄 -CashFenceDone=本期現金圍欄完成 +CashFence=收銀台關閉 +CashFenceDone=本期收銀台關閉完成 NbOfInvoices=發票數 Paymentnumpad=輸入付款的便籤類型 Numberspad=號碼便籤 @@ -77,7 +77,7 @@ POSModule=POS 模組 BasicPhoneLayout=在手機上使用基本佈局 SetupOfTerminalNotComplete=終端機%s的設定尚未完成 DirectPayment=直接付款 -DirectPaymentButton=Add a "Direct cash payment" button +DirectPaymentButton=增加“直接現金付款”按鈕 InvoiceIsAlreadyValidated=發票已通過驗證 NoLinesToBill=無計費項目 CustomReceipt=自訂收據 @@ -94,13 +94,14 @@ TakeposConnectorMethodDescription=具有附加功能的外部模組。可以從 PrintMethod=列印方式 ReceiptPrinterMethodDescription=具有很多參數的強大方法。完全可定制的模板。無法從雲端列印。 ByTerminal=依照站台 -TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad +TakeposNumpadUsePaymentIcon=在小鍵盤的付款按鈕上使用圖示而不是文字 CashDeskRefNumberingModules=POS銷售編號模組 CashDeskGenericMaskCodes6 = <br> <b> {TN} </b>標籤用於增加站台 TakeposGroupSameProduct=群組相同產品線 StartAParallelSale=開啟新的平行銷售 -ControlCashOpening=Control cash box at opening POS -CloseCashFence=關閉現金圍籬 +SaleStartedAt=銷售開始於%s +ControlCashOpening=在打開POS時控制現金彈出窗口 +CloseCashFence=關閉收銀台控制 CashReport=現金報告 MainPrinterToUse=要使用的主印表機 OrderPrinterToUse=要使用的訂單印表機 @@ -112,13 +113,14 @@ RestaurantMenu=選單 CustomerMenu=客戶選單 ScanToMenu=掃描QR Code顯示選單 ScanToOrder=掃描QR Code訂購 -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 +Appearance=出現 +HideCategoryImages=隱藏類別圖片 +HideProductImages=隱藏產品圖片 +NumberOfLinesToShow=要顯示的圖片行數 +DefineTablePlan=定義表格計劃 +GiftReceiptButton=增加“禮物收據”按鈕 +GiftReceipt=禮物收據 +ModuleReceiptPrinterMustBeEnabled=必須先啟用收據印表機模組 +AllowDelayedPayment=允許延遲付款 +PrintPaymentMethodOnReceipts=在收據上列印付款方式 +WeighingScale=秤重 diff --git a/htdocs/langs/zh_TW/categories.lang b/htdocs/langs/zh_TW/categories.lang index 6935e5275bb..c92c7a709c4 100644 --- a/htdocs/langs/zh_TW/categories.lang +++ b/htdocs/langs/zh_TW/categories.lang @@ -1,9 +1,9 @@ # Dolibarr language file - Source file is en_US - categories -Rubrique=標籤/類別 -Rubriques=標籤/類別 -RubriquesTransactions=交易標籤/類別 -categories=標籤/類別 -NoCategoryYet=此類型沒有已建立的標籤/類別 +Rubrique=標籤/分類 +Rubriques=標籤/分類 +RubriquesTransactions=交易標籤/分類 +categories=標籤/分類 +NoCategoryYet=此類型沒有已建立的標籤/分類 In=在 AddIn=加入 modify=修改 @@ -19,6 +19,7 @@ ProjectsCategoriesArea=專案標籤/類別區域 UsersCategoriesArea=用戶標籤/類別區域 SubCats=子類別 CatList=標籤/類別清單 +CatListAll=標籤/分類清單(所有類型) NewCategory=新標籤/類別 ModifCat=修改標籤/類別 CatCreated=標籤/類別已建立 @@ -65,28 +66,34 @@ UsersCategoriesShort=用戶標籤/類別 StockCategoriesShort=倉庫標籤/類別 ThisCategoryHasNoItems=此類別內沒有任何項目。 CategId=標籤/類別編號 -CatSupList=供應商標籤/類別清單 -CatCusList=客戶/潛在方標籤/類別清單 +ParentCategory=母標籤/分類 +ParentCategoryLabel=母標籤/分類的標籤 +CatSupList=供應商標籤/分類清單 +CatCusList=客戶/潛在客戶標籤/分類清單 CatProdList=產品標籤/類別清單 CatMemberList=會員標籤/類別清單 -CatContactList=聯絡人標籤/類別清單 -CatSupLinks=供應商與標籤/類別之間的連結 +CatContactList=聯絡人標籤/分類清單 +CatProjectsList=專案標籤/分類清單 +CatUsersList=用戶標籤/分類清單 +CatSupLinks=供應商與標籤/分類之間的連結 CatCusLinks=客戶/潛在方與標籤/類別之間的連結 CatContactsLinks=聯絡人/地址與標籤/類別之間的連結 CatProdLinks=產品/服務與標籤/類別之間的連結 -CatProJectLinks=專案與標籤/類別之間的連結 +CatMembersLinks=會員與標籤/分類之間的連結 +CatProjectsLinks=專案與標籤/類別之間的連結 +CatUsersLinks=用戶與標籤/分類之間的連結 DeleteFromCat=從標籤/類別中刪除 ExtraFieldsCategories=補充屬性 CategoriesSetup=標籤/類別設定 CategorieRecursiv=自動連結到母標籤/母類別 CategorieRecursivHelp=如果啟用此選項,當將產品增加到子類別時,產品也會增加到母類別中。 AddProductServiceIntoCategory=新增以下產品/服務 -AddCustomerIntoCategory=Assign category to customer -AddSupplierIntoCategory=Assign category to supplier +AddCustomerIntoCategory=分配類別給客戶 +AddSupplierIntoCategory=分配類別給供應商 ShowCategory=顯示標籤/類別 ByDefaultInList=預設在清單中 ChooseCategory=選擇類別 -StocksCategoriesArea=Warehouses Categories -ActionCommCategoriesArea=Events Categories -WebsitePagesCategoriesArea=Page-Container Categories +StocksCategoriesArea=倉庫類別 +ActionCommCategoriesArea=事件類別 +WebsitePagesCategoriesArea=頁面容器類別 UseOrOperatorForCategories=類別的使用或運算 diff --git a/htdocs/langs/zh_TW/companies.lang b/htdocs/langs/zh_TW/companies.lang index 1d83ed486ae..8bbc2a0225b 100644 --- a/htdocs/langs/zh_TW/companies.lang +++ b/htdocs/langs/zh_TW/companies.lang @@ -124,7 +124,7 @@ ProfId1AT=Prof Id 1 (USt.-IdNr) ProfId2AT=Prof Id 2 (USt.-Nr) ProfId3AT=Prof Id 3 (商業登記號碼) ProfId4AT=- -ProfId5AT=EORI number +ProfId5AT=歐盟增值稅號 ProfId6AT=- ProfId1AU=Prof Id 1 (ABN) ProfId2AU=- @@ -136,7 +136,7 @@ ProfId1BE=Prof Id 1 (專業號碼) ProfId2BE=- ProfId3BE=- ProfId4BE=- -ProfId5BE=EORI number +ProfId5BE=歐盟增值稅號 ProfId6BE=- ProfId1BR=- ProfId2BR=IE (國家註冊) @@ -148,7 +148,7 @@ ProfId1CH=UID-Nummer ProfId2CH=- ProfId3CH=Prof Id 1(聯邦碼) ProfId4CH=Prof Id 2(商業記錄碼) -ProfId5CH=EORI number +ProfId5CH=歐盟增值稅號 ProfId6CH=- ProfId1CL=Prof Id 1 (R.U.T.) ProfId2CL=- @@ -166,19 +166,19 @@ ProfId1DE=Prof Id 1 (USt.-IdNr) ProfId2DE=Prof Id 2 (USt.-Nr) ProfId3DE=Prof Id 3 (商業登記號碼) ProfId4DE=- -ProfId5DE=EORI number +ProfId5DE=歐盟增值稅號 ProfId6DE=- ProfId1ES=Prof Id 1 (CIF/NIF) ProfId2ES=Prof Id 2 (社會安全號碼) ProfId3ES=Prof Id 3 (CNAE) ProfId4ES=Prof Id 4 (學院編號) -ProfId5ES=EORI number +ProfId5ES=歐盟增值稅號 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=歐盟增值稅號 ProfId6FR=- ProfId1GB=註冊號 ProfId2GB=- @@ -202,12 +202,12 @@ ProfId1IT=- ProfId2IT=- ProfId3IT=- ProfId4IT=- -ProfId5IT=EORI number +ProfId5IT=歐盟增值稅號 ProfId1LU=Id. prof. 1 (R.C.S.盧森堡) ProfId2LU=Id. prof. 2 (營業執照) ProfId3LU=- ProfId4LU=- -ProfId5LU=EORI number +ProfId5LU=歐盟增值稅號 ProfId6LU=- ProfId1MA=Id prof. 1 (R.C.) ProfId2MA=Id prof. 2 (Patente) @@ -225,13 +225,13 @@ ProfId1NL=KVK數字 ProfId2NL=- ProfId3NL=- ProfId4NL=- -ProfId5NL=EORI number +ProfId5NL=歐盟增值稅號 ProfId6NL=- ProfId1PT=Prof Id 1 (NIPC) ProfId2PT=Prof Id 2(社會安全號碼) ProfId3PT=Prof Id 3(商業記錄碼) ProfId4PT=Prof Id 4 (音樂學院) -ProfId5PT=EORI number +ProfId5PT=歐盟增值稅號 ProfId6PT=- ProfId1SN=RC ProfId2SN=NINEA @@ -255,7 +255,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=歐盟增值稅號 ProfId6RO=- ProfId1RU=Prof Id 1 (OGRN) ProfId2RU=Prof Id 2 (INN) @@ -358,8 +358,8 @@ VATIntraCheckableOnEUSite=檢查在歐盟區網站內的區內營業稅 VATIntraManualCheck=您也可在歐盟網站以人工方式確認<a href="%s" target="_blank">%s</a> ErrorVATCheckMS_UNAVAILABLE=無法檢查。無法使用會員國家(%s)進行檢查服務。 NorProspectNorCustomer=非潛在方或客戶 -JuridicalStatus=法人類型 -Workforce=Workforce +JuridicalStatus=業務實體類型 +Workforce=員工 Staff=僱員 ProspectLevelShort=潛在等級 ProspectLevel=潛在方的可能性 @@ -462,8 +462,8 @@ 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=歐洲(EEC) +RestOfEurope=歐洲其他地區(EEC) +OutOfEurope=歐洲以外(EEC) +CurrentOutstandingBillLate=目前拖欠帳單 +BecarefullChangeThirdpartyBeforeAddProductToInvoice=請注意,根據您的產品價格設定,應在將產品增加到POS之前更改合作方。 diff --git a/htdocs/langs/zh_TW/compta.lang b/htdocs/langs/zh_TW/compta.lang index 5465526e4ed..82b499908a9 100644 --- a/htdocs/langs/zh_TW/compta.lang +++ b/htdocs/langs/zh_TW/compta.lang @@ -69,7 +69,7 @@ SocialContribution=社會稅或財政稅 SocialContributions=社會稅或財政稅 SocialContributionsDeductibles=可抵扣的社會稅或財政稅 SocialContributionsNondeductibles=不可抵扣的社會稅或財政稅 -DateOfSocialContribution=Date of social or fiscal tax +DateOfSocialContribution=社會稅或財政稅的日期 LabelContrib=捐助標籤 TypeContrib=捐助類型 MenuSpecialExpenses=特別支出 @@ -111,7 +111,7 @@ Refund=退款 SocialContributionsPayments=社會/財政稅金 ShowVatPayment=顯示營業稅稅金 TotalToPay=支付總額 -BalanceVisibilityDependsOnSortAndFilters=當表格依%s升序排列並且已過濾為一個銀行帳戶時餘額才可顯示 +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=客戶會計代碼 SupplierAccountancyCode=供應商會計代碼 CustomerAccountancyCodeShort=客戶帳戶代碼 @@ -140,7 +140,7 @@ ConfirmDeleteSocialContribution=您確定要刪除此社會/財政稅金嗎? ExportDataset_tax_1=社會和財政稅金及繳稅 CalcModeVATDebt=<b>%s承諾會計營業稅%s</b>模式. CalcModeVATEngagement=<b>%s收入-支出營業稅%s</b>模式. -CalcModeDebt=分析已知並已記錄發票,即使尚未在分類帳中進行核算。 +CalcModeDebt=Analysis of known recorded documents even if they are not yet accounted in ledger. CalcModeEngagement=分析已知並已記錄付款,即使尚未在分類帳中。 CalcModeBookkeeping=分析記帳簿表中記錄的數據。 CalcModeLT1= <b>客戶發票-供應商發票%s中的%sRE</b>模式 @@ -154,9 +154,9 @@ AnnualSummaryInputOutputMode=收支平衡表,年度匯總 AnnualByCompanies=收入和支出餘額,依預定義帳戶組別 AnnualByCompaniesDueDebtMode=收支平衡表,依預定義組別明細,模式<b>%s債權-債務%s</b>表示<b>承諾會計</b> 。 AnnualByCompaniesInputOutputMode=收支平衡表,依預定義組別明細,方式<b>%s收入-支出%s</b>表示<b>現金會計</b> 。 -SeeReportInInputOutputMode=有關實際付款(即使尚未在分類帳中實際付款)的計算,請參閱%s付款分析%s。 -SeeReportInDueDebtMode=有關基於已記錄發票(即使尚未在分類帳中進行核算)的計算,請參閱%s發票分析%s。 -SeeReportInBookkeepingMode=請參閱<b>%s簿記報告%s</b>了解關於<b>簿記分類帳表</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=-顯示的金額包括所有稅費 RulesResultDue=-包括無論是否付款的未結發票,費用,增值稅,捐贈。還包括已付款薪資。 <br>-它基於發票的開票日期以及費用或稅款的到期日。對於使用“薪資”模組定義的薪資,將使用付款的起息日。 RulesResultInOut=-它包括發票,費用,營業稅和薪水的實際付款。 <br> -它基於發票,費用,營業稅和薪水的付款日期。捐贈的捐贈日期。 @@ -169,12 +169,15 @@ RulesResultBookkeepingPersonalized=它顯示會計帳戶分類帳中的記錄, SeePageForSetup=請參考選單<a href="%s">%s</a>進行設定 DepositsAreNotIncluded=-未包含預付款發票 DepositsAreIncluded=-包含預付款發票 +LT1ReportByMonth=Tax 2 report by month +LT2ReportByMonth=Tax 3 report by month LT1ReportByCustomers=合作方稅率2報告 LT2ReportByCustomers=合作方稅率3報告 LT1ReportByCustomersES=合作方RE報告 LT2ReportByCustomersES=合作方IRPF報告 VATReport=營業稅報告 VATReportByPeriods=分期營業稅報告 +VATReportByMonth=每月營業稅報告 VATReportByRates=營業稅率報告 VATReportByThirdParties=合作方營業稅報告 VATReportByCustomers=客戶銷售稅報告 diff --git a/htdocs/langs/zh_TW/contracts.lang b/htdocs/langs/zh_TW/contracts.lang index d3e8619ee8c..8a6b57e2e85 100644 --- a/htdocs/langs/zh_TW/contracts.lang +++ b/htdocs/langs/zh_TW/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=正在執行的服務 MenuExpiredServices=已過期服務 MenuClosedServices=已關閉服務 NewContract=新合約 -NewContractSubscription=New contract or subscription +NewContractSubscription=新合約或訂閱 AddContract=建立合約 DeleteAContract=刪除合約 ActivateAllOnContract=啟動所有服務 diff --git a/htdocs/langs/zh_TW/cron.lang b/htdocs/langs/zh_TW/cron.lang index b988bac33aa..7bc4d4b9d74 100644 --- a/htdocs/langs/zh_TW/cron.lang +++ b/htdocs/langs/zh_TW/cron.lang @@ -7,13 +7,14 @@ Permission23103 = 刪除預定工作 Permission23104 = 執行預定工作 # Admin CronSetup=預定工作管理設定 -URLToLaunchCronJobs=用於檢查和啟動合格cron作業的URL -OrToLaunchASpecificJob=或是檢查並啟動特定工作 +URLToLaunchCronJobs=用於從瀏覽器檢查和啟動合格cron作業的網址 +OrToLaunchASpecificJob=或以瀏覽器檢查並啟動特定作業 KeyForCronAccess=用於啟動cron作業URL的安全密鑰 FileToLaunchCronJobs=命令列檢查並啟動合格的cron作業 CronExplainHowToRunUnix=在Unix環境中,您應該使用以下crontab條目以每隔5分鐘執行命令行 CronExplainHowToRunWin=在Microsoft(tm)Windows環境中,您可以使用“計劃任務”工具每5分鐘執行命令行 CronMethodDoesNotExists=類別%s不包含任何方法%s +CronMethodNotAllowed=類別%s中的方法%s在禁止方法的黑名單中 CronJobDefDesc=Cron工作設定文件定義在模組描述符檔案中。啟動模組後,它們將被載入使用,因此您可以從管理員工具選單%s管理作業。 CronJobProfiles=預定義cron工作配置文件清單 # Menu @@ -46,6 +47,7 @@ CronNbRun=啟動次數 CronMaxRun=最大啟動次數 CronEach=每一個 JobFinished=工作已啟動並完成 +Scheduled=已預定工作 #Page card CronAdd= 新增工作 CronEvery=執行每個工作 @@ -56,7 +58,7 @@ CronNote=註解 CronFieldMandatory=欄位%s為必填 CronErrEndDateStartDt=結束日期不能早於開始日期 StatusAtInstall=模組安裝狀態 -CronStatusActiveBtn=啓用 +CronStatusActiveBtn=計畫表 CronStatusInactiveBtn=停用 CronTaskInactive=此工作已停用 CronId=Id @@ -82,3 +84,8 @@ MakeLocalDatabaseDumpShort=本地資料庫備份 MakeLocalDatabaseDump=建立本地資料庫備份。參數為:壓縮(“ gz”或“ bz”或“none”),備份類型(“ mysql”,“ pgsql”,“ auto”),1,"自動"或建立檔案名稱,要保留的備份檔案數 WarningCronDelayed=請注意,出於性能目的,無論下一次執行已啟動工作的日期如何,您的工作執行最多可能會延遲%s小時。 DATAPOLICYJob=資料清理器和匿名器 +JobXMustBeEnabled=必須啟用工作%s +# Cron Boxes +LastExecutedScheduledJob=最後執行的計劃工作 +NextScheduledJobExecute=下一個要預定要執行的工作 +NumberScheduledJobError=錯誤的預定工作數量 diff --git a/htdocs/langs/zh_TW/deliveries.lang b/htdocs/langs/zh_TW/deliveries.lang index dd26d50ec74..489be238c4e 100644 --- a/htdocs/langs/zh_TW/deliveries.lang +++ b/htdocs/langs/zh_TW/deliveries.lang @@ -27,5 +27,6 @@ Recipient=收貨人 ErrorStockIsNotEnough=庫存不足 Shippable=可運送 NonShippable=無法運送 +ShowShippableStatus=顯示可運送狀態 ShowReceiving=顯示交貨單 NonExistentOrder=不存在的訂單 diff --git a/htdocs/langs/zh_TW/ecm.lang b/htdocs/langs/zh_TW/ecm.lang index c39a9af9b35..155f77c6998 100644 --- a/htdocs/langs/zh_TW/ecm.lang +++ b/htdocs/langs/zh_TW/ecm.lang @@ -23,7 +23,7 @@ ECMSearchByKeywords=搜尋關鍵字 ECMSearchByEntity=搜尋對象 ECMSectionOfDocuments=目錄中的文件 ECMTypeAuto=自動 -ECMDocsBy=Documents linked to %s +ECMDocsBy=已連結到%s的文件 ECMNoDirectoryYet=未建立資料夾 ShowECMSection=顯示資料夾 DeleteSection=刪除資料夾 @@ -40,4 +40,4 @@ NoDirectoriesFound=找不到目錄 FileNotYetIndexedInDatabase=檔案尚未編入資料庫(嘗試重新上傳) ExtraFieldsEcmFiles=Extrafields Ecm Files ExtraFieldsEcmDirectories=Extrafields Ecm Directories -ECMSetup=ECM Setup +ECMSetup=ECM設定 diff --git a/htdocs/langs/zh_TW/errors.lang b/htdocs/langs/zh_TW/errors.lang index 4eebe27f1aa..f4f7a6ed0cc 100644 --- a/htdocs/langs/zh_TW/errors.lang +++ b/htdocs/langs/zh_TW/errors.lang @@ -5,8 +5,10 @@ NoErrorCommitIsDone=我們保證沒有錯誤 # Errors ErrorButCommitIsDone=發現錯誤,但儘管如此我們仍進行驗證 ErrorBadEMail=電子郵件%s錯誤 +ErrorBadMXDomain=Email %s seems wrong (domain has no valid MX record) ErrorBadUrl=網址%s錯誤 ErrorBadValueForParamNotAString=您的參數值錯誤。一般在轉譯遺失時產生。 +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorLoginAlreadyExists=登入者%s已經存在。 ErrorGroupAlreadyExists=群組%s已經存在。 ErrorRecordNotFound=記錄沒有找到。 @@ -48,6 +50,7 @@ ErrorFieldsRequired=一些必要的欄位都沒有填入。 ErrorSubjectIsRequired=電子郵件主題為必填 ErrorFailedToCreateDir=無法建立資料夾。檢查網頁伺服器中的用戶有權限寫入Dolibarr檔案資料夾。如果PHP使用了參數<b>safe_mode</b>,檢查網頁伺服器的用戶(或群組)擁有Dolibarr php檔案。 ErrorNoMailDefinedForThisUser=沒有此用戶的定義郵件 +ErrorSetupOfEmailsNotComplete=Setup of emails is not complete ErrorFeatureNeedJavascript=此功能需要啟動Javascript。需要變更請前往設定 - 顯示。 ErrorTopMenuMustHaveAParentWithId0=一個類型'頂部'選單不能有一個母選單。在母選單填入0或選擇一個類型為'左'的選單。 ErrorLeftMenuMustHaveAParentId=一個類型為'左'的選單必須有一個母選單的ID。 @@ -75,7 +78,7 @@ ErrorExportDuplicateProfil=此匯出設定已存在此設定檔案名稱。 ErrorLDAPSetupNotComplete=Dolibarr與LDAP的匹配不完整。 ErrorLDAPMakeManualTest=.ldif檔案已在資料夾%s中.請以命令行手動讀取以得到更多的錯誤信息。 ErrorCantSaveADoneUserWithZeroPercentage=如果填寫了“完成者”欄位,則無法使用“狀態未開始”保存操作。 -ErrorRefAlreadyExists=建立參考已經存在。 +ErrorRefAlreadyExists=Reference <b>%s</b> already exists. ErrorPleaseTypeBankTransactionReportName=請輸入必須在報告條目中的銀行對帳單名稱(格式YYYYMM或YYYYMMDD) ErrorRecordHasChildren=因為有子記錄所以刪除失敗。 ErrorRecordHasAtLeastOneChildOfType=項目至少有一個子類別%s @@ -216,7 +219,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=您必須選擇商品是否為預 ErrorDiscountLargerThanRemainToPaySplitItBefore=您嘗試使用的折扣大於剩餘的折扣。將之前的折扣分成2個較小的折扣。 ErrorFileNotFoundWithSharedLink=找不到檔案。可能是共享金鑰最近被修改或檔案被刪除了。 ErrorProductBarCodeAlreadyExists=產品條碼%s已存在於另一個產品參考上。 -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=另請注意,當至少一個子產品(或子產品的子產品)需要序列號/批號時,無法使用虛擬產品自動增加/減少子產品。 +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=對於帶有免費產品的行,必須進行描述說明 ErrorAPageWithThisNameOrAliasAlreadyExists=此頁面/容器<strong>%s</strong>與您嘗試使用的名稱/別名相同 ErrorDuringChartLoad=載入會計科目表時出錯。如果幾個帳戶沒有被載入,您仍然可以手動輸入。 @@ -226,8 +229,8 @@ ErrorURLMustStartWithHttp=網址 %s 必須以 http://或https://開始 ErrorNewRefIsAlreadyUsed=錯誤,新參考已被使用 ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=錯誤,無法刪除連結到已關閉發票的付款。 ErrorSearchCriteriaTooSmall=搜尋條件太小。 -ErrorObjectMustHaveStatusActiveToBeDisabled=項目必須具有“活動”狀態才能被禁用 -ErrorObjectMustHaveStatusDraftOrDisabledToBeActivated=要啟用的項目必須具有“草稿”或“已禁用”狀態 +ErrorObjectMustHaveStatusActiveToBeDisabled=項目必須具有“啟用”狀態才能被關閉 +ErrorObjectMustHaveStatusDraftOrDisabledToBeActivated=要啟用的項目必須具有“草稿”或“已關閉”狀態 ErrorNoFieldWithAttributeShowoncombobox=沒有欄位在項目“ %s”的定義中具有屬性“ showoncombobox”。無法顯示組合清單。 ErrorFieldRequiredForProduct=產品%s必須有欄位'%s' ProblemIsInSetupOfTerminal=問題在於站台%s的設定。 @@ -243,9 +246,19 @@ ErrorReplaceStringEmpty=錯誤,要替換的字串為空 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=未啟用公共界面 +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 + # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=您的PHP參數upload_max_filesize(%s)高於PHP參數post_max_size(%s)。這不是相同的設定。 -WarningPasswordSetWithNoAccount=為此會員設定了密碼。但是,沒有建立用戶帳戶。因此,雖然密碼已儲存,但不能用於登入Dolibarr。外部模組/界面可以使用它,但是如果您不需要為會員定義任何登入名稱或密碼,則可以從會員模組設定中禁用選項“管理每個會員的登入名稱”。如果您需要管理登入名稱但不需要任何密碼,則可以將此欄位保留為空白以避免此警告。注意:如果會員連結到用戶,電子郵件也可以用作登入名稱。 +WarningPasswordSetWithNoAccount=為此會員設定了密碼。但是,沒有建立用戶帳戶。因此,雖然密碼已儲存,但不能用於登入Dolibarr。外部模組/界面可以使用它,但是如果您不需要為會員定義任何登入名稱或密碼,則可以從會員模組設定中關閉選項“管理每個會員的登入名稱”。如果您需要管理登入名稱但不需要任何密碼,則可以將此欄位保留為空白以避免此警告。注意:如果會員連結到用戶,電子郵件也可以用作登入名稱。 WarningMandatorySetupNotComplete=點擊此處設定必填參數 WarningEnableYourModulesApplications=點擊此處啟用您的模組和應用程式 WarningSafeModeOnCheckExecDir=警告,PHP選項<b>safe_mode</b>處於開啟狀態,因此命令必須儲存在php參數<b>safe_mode_exec_dir</b>聲明的資料夾內。 @@ -259,7 +272,7 @@ WarningUntilDirRemoved=只要存在此漏洞(或在設定->其他設定中增 WarningCloseAlways=警告,即使來源元件和目標元件之間的數量不同,也將關閉。請謹慎啟用此功能。 WarningUsingThisBoxSlowDown=警告,使用此框會嚴重降低顯示此框所有頁面的速度。 WarningClickToDialUserSetupNotComplete=您用戶的ClickToDial資訊設定尚未完成(請參閱用戶卡上的ClickToDial分頁)。 -WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=當針對盲人或文字瀏覽器優化了顯示設定時,此功能將被禁用。 +WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=當針對盲人或文字瀏覽器優化了顯示設定時,此功能將被關閉。 WarningPaymentDateLowerThanInvoiceDate=付款日期(%s)早於發票%s的發票日期(%s)。 WarningTooManyDataPleaseUseMoreFilters= 資料太多(超過%s行)。請使用更多過濾器或將常數%s設定為更高的上限。 WarningSomeLinesWithNullHourlyRate=某些用戶記錄了某些時間,但未定義其小時費率。%s每小時使用的值為0 ,但這可能會導致錯誤的花費時間評估。 @@ -267,6 +280,10 @@ WarningYourLoginWasModifiedPleaseLogin=您的登入名稱已修改。為了安 WarningAnEntryAlreadyExistForTransKey=此語言的翻譯密鑰條目已存在 WarningNumberOfRecipientIsRestrictedInMassAction=警告,在清單上使用批次操作時,其他收件人的數量限制為<b>%s</b> WarningDateOfLineMustBeInExpenseReportRange=警告,行的日期不在費用報告的範圍內 +WarningProjectDraft=Project is still in draft mode. Don't forget to validate it if you plan to use tasks. WarningProjectClosed=專案已關閉。您必須先重新打開它。 WarningSomeBankTransactionByChequeWereRemovedAfter=在產生包括它們的收據之後,一些銀行交易將被刪除。因此支票的數量和收據的數量可能與清單中的數量和總數有所不同。 -WarningFailedToAddFileIntoDatabaseIndex=警告,無法將檔案項目增加到ECM資料庫索引表中 +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. diff --git a/htdocs/langs/zh_TW/exports.lang b/htdocs/langs/zh_TW/exports.lang index 7c8d3f0d1dd..721e44dfde2 100644 --- a/htdocs/langs/zh_TW/exports.lang +++ b/htdocs/langs/zh_TW/exports.lang @@ -26,6 +26,8 @@ FieldTitle=欄位標題 NowClickToGenerateToBuildExportFile=現在,在組合框中選擇檔案格式,然後點擊“產生”以建立匯出檔案... AvailableFormats=可用格式 LibraryShort=程式庫 +ExportCsvSeparator=CSV字符分隔器 +ImportCsvSeparator=CSV字符分隔器 Step=步驟 FormatedImport=匯入小幫手 FormatedImportDesc1=此模組允許您更新現有資料或增加新項目到資料庫中而不需要專業技術知識,只須使用小幫手。 @@ -131,3 +133,4 @@ KeysToUseForUpdates=用於<b>更新</b>現有資料的鍵(欄) NbInsert=已插入的行數:%s NbUpdate=已更新的行數:%s MultipleRecordFoundWithTheseFilters=使用過濾器找到了多個記錄:%s +StocksWithBatch=具有批次/序號產品的庫存和位置(倉庫) diff --git a/htdocs/langs/zh_TW/hrm.lang b/htdocs/langs/zh_TW/hrm.lang index 3e8d938470d..e62a5430c67 100644 --- a/htdocs/langs/zh_TW/hrm.lang +++ b/htdocs/langs/zh_TW/hrm.lang @@ -16,4 +16,4 @@ DictionaryFunction=人力資源管理-職位 Employees=員工 Employee=員工 NewEmployee=新員工 -ListOfEmployees=List of employees +ListOfEmployees=員工名單 diff --git a/htdocs/langs/zh_TW/install.lang b/htdocs/langs/zh_TW/install.lang index c785b848207..a717552589b 100644 --- a/htdocs/langs/zh_TW/install.lang +++ b/htdocs/langs/zh_TW/install.lang @@ -209,7 +209,7 @@ MigrationResetBlockedLog=為v7 algorithm重置模組"被阻止的日誌(Blocked ShowNotAvailableOptions=顯示不可用的選項 HideNotAvailableOptions=隱藏不可用的選項 ErrorFoundDuringMigration=在移轉過程中出現了錯誤,因此無法進行下一步。要忽略錯誤,可以<a href="%s">點擊此處</a> ,但是在解決錯誤之前,該應用程序或某些功能可能無法正常運行。 -YouTryInstallDisabledByDirLock=該應用程式嘗試進行自我升級,但是出於安全性考慮,已禁用了安裝/升級頁面(使用.lock後綴重命名資料夾)。 <br> +YouTryInstallDisabledByDirLock=該應用程式嘗試進行自我升級,但是出於安全性考慮,已禁用了安裝/升級頁面(使用.lock副檔名重新命名資料夾)。 <br> YouTryInstallDisabledByFileLock=此應用程式嘗試進行自我升級,但是出於安全性考慮,已禁用了安裝/升級頁面(由於dolibarr檔案資料夾中存在鎖定文件<strong>install.lock</strong> )。 <br> ClickHereToGoToApp=點擊此處前往您的應用程式 ClickOnLinkOrRemoveManualy=如果正在進行升級,請等待。如果沒有,請點擊以下連結。如果始終看到同一頁面,則必須在documents資料夾中刪除/重新命名install.lock檔案。 diff --git a/htdocs/langs/zh_TW/intracommreport.lang b/htdocs/langs/zh_TW/intracommreport.lang index f6373cf6009..1cb77c19dc7 100644 --- a/htdocs/langs/zh_TW/intracommreport.lang +++ b/htdocs/langs/zh_TW/intracommreport.lang @@ -1,4 +1,4 @@ -Module68000Name = Intracomm report +Module68000Name = 通訊報告 Module68000Desc = Intracomm report management (Support for French DEB/DES format) IntracommReportSetup = Intracommreport module setup IntracommReportAbout = About intracommreport @@ -14,16 +14,16 @@ INTRACOMMREPORT_CATEG_FRAISDEPORT=Catégorie de services de type "Frais de port" INTRACOMMREPORT_NUM_DECLARATION=Numéro de déclarant # Menu -MenuIntracommReport=Intracomm report +MenuIntracommReport=通訊報告 MenuIntracommReportNew=New declaration MenuIntracommReportList=清單 # View NewDeclaration=New declaration Declaration=Declaration -AnalysisPeriod=Analysis period +AnalysisPeriod=分析期間 TypeOfDeclaration=Type of declaration -DEB=Goods exchange declaration (DEB) +DEB=貨物交換報關單(DEB) DES=Services exchange declaration (DES) # Export page @@ -32,7 +32,7 @@ IntracommReportTitle=Preparation of an XML file in ProDouane format # List IntracommReportList=List of generated declarations IntracommReportNumber=Numero of declaration -IntracommReportPeriod=Period of nalysis +IntracommReportPeriod=Period of analysis IntracommReportTypeDeclaration=Type of declaration IntracommReportDownload=download XML file diff --git a/htdocs/langs/zh_TW/languages.lang b/htdocs/langs/zh_TW/languages.lang index 8c2475ca6ca..2c762a9075b 100644 --- a/htdocs/langs/zh_TW/languages.lang +++ b/htdocs/langs/zh_TW/languages.lang @@ -1,11 +1,11 @@ # Dolibarr language file - Source file is en_US - languages -Language_am_ET=Ethiopian +Language_am_ET=衣索比亞 Language_ar_AR=阿拉伯語 Language_ar_EG=阿拉伯語(埃及) Language_ar_SA=阿拉伯語 -Language_az_AZ=Azerbaijani +Language_az_AZ=亞塞拜然 Language_bn_BD=孟加拉語 -Language_bn_IN=Bengali (India) +Language_bn_IN=孟加拉語(印度) Language_bg_BG=保加利亞語 Language_bs_BA=波斯尼亞語 Language_ca_ES=加泰羅尼亞語 @@ -23,7 +23,7 @@ Language_en_GB=英語(英國) Language_en_IN=英國(印度) Language_en_NZ=英語(紐西蘭) Language_en_SA=英语 (沙特阿拉伯) -Language_en_SG=English (Singapore) +Language_en_SG=英文(新加坡) Language_en_US=英語(美國) Language_en_ZA=英語(南非) Language_es_ES=西班牙語 @@ -33,16 +33,16 @@ Language_es_CL=西班牙語(智利) Language_es_CO=西班牙語(哥倫比亞) Language_es_DO=西班牙語(多明尼加共和國) Language_es_EC=西班牙語(厄瓜多爾) -Language_es_GT=Spanish (Guatemala) +Language_es_GT=西班牙語(瓜地馬拉) Language_es_HN=西班牙語(洪都拉斯) Language_es_MX=西班牙語(墨西哥) Language_es_PA=西班牙語(巴拿馬) Language_es_PY=西班牙語(巴拉圭) Language_es_PE=西班牙語(秘魯) Language_es_PR=西班牙語(波多黎各) -Language_es_US=Spanish (USA) +Language_es_US=西班牙語(美國) Language_es_UY=西班牙語(烏拉圭) -Language_es_GT=Spanish (Guatemala) +Language_es_GT=西班牙語(瓜地馬拉) Language_es_VE=西班牙語(委內瑞拉) Language_et_EE=愛沙尼亞語 Language_eu_ES=巴斯克語 @@ -51,22 +51,22 @@ Language_fi_FI=芬蘭語 Language_fr_BE=法語(比利時) Language_fr_CA=法語(加拿大) Language_fr_CH=法語(瑞士) -Language_fr_CI=French (Cost Ivory) -Language_fr_CM=French (Cameroun) +Language_fr_CI=法語(象牙海岸) +Language_fr_CM=法語(喀麥隆) Language_fr_FR=法語 -Language_fr_GA=French (Gabon) +Language_fr_GA=法語(加彭) Language_fr_NC=法語 (新喀里多尼亞) -Language_fr_SN=French (Senegal) +Language_fr_SN=法語(塞內加爾) Language_fy_NL=弗里斯蘭語 -Language_gl_ES=Galician +Language_gl_ES=加利西亞語 Language_he_IL=希伯來語 -Language_hi_IN=Hindi (India) +Language_hi_IN=印地語(印度) Language_hr_HR=克羅地亞語 Language_hu_HU=匈牙利語 Language_id_ID=印尼語 Language_is_IS=冰島語 Language_it_IT=意大利語 -Language_it_CH=Italian (Switzerland) +Language_it_CH=義大利文(瑞士) Language_ja_JP=日語 Language_ka_GE=格魯吉亞人語 Language_km_KH=高棉語 @@ -78,7 +78,7 @@ Language_lv_LV=拉脫維亞語 Language_mk_MK=馬其頓語 Language_mn_MN=蒙古語 Language_nb_NO=挪威語(Bokmål) -Language_ne_NP=Nepali +Language_ne_NP=尼泊爾語 Language_nl_BE=荷蘭語(比利時) Language_nl_NL=荷蘭人 Language_pl_PL=波蘭語 @@ -101,5 +101,5 @@ Language_uz_UZ=烏茲別克語 Language_vi_VN=越南語 Language_zh_CN=簡體中文 Language_zh_TW=繁體中文 -Language_zh_HK=Chinese (Hong Kong) +Language_zh_HK=中文(香港) Language_bh_MY=馬來語 diff --git a/htdocs/langs/zh_TW/mails.lang b/htdocs/langs/zh_TW/mails.lang index 1ca5e5ccdb1..c8ad519aa7c 100644 --- a/htdocs/langs/zh_TW/mails.lang +++ b/htdocs/langs/zh_TW/mails.lang @@ -92,6 +92,7 @@ MailingModuleDescEmailsFromUser=用戶輸入的電子郵件 MailingModuleDescDolibarrUsers=擁有電子郵件的用戶 MailingModuleDescThirdPartiesByCategories=合作方(依類別) SendingFromWebInterfaceIsNotAllowed=不允許從Web界面發送。 +EmailCollectorFilterDesc=All filters must match to have an email being collected # Libelle des modules de liste de destinataires mailing LineInFile=在檔案%s的行 @@ -125,12 +126,13 @@ TagMailtoEmail=收件人電子郵件(包括html“ mailto:”連結) NoEmailSentBadSenderOrRecipientEmail=沒有發送電子郵件。寄件人或收件人的電子郵件不正確。驗證用戶資料。 # Module Notifications Notifications=通知 -NoNotificationsWillBeSent=沒有為此事件和公司計畫的電子郵件通知 -ANotificationsWillBeSent=1個通知將通過電子郵件發送 -SomeNotificationsWillBeSent=%s的通知將通過電子郵件發送 -AddNewNotification=啟動新的電子郵件通知目標/事件 -ListOfActiveNotifications=列出所有活動目標/事件以進行電子郵件通知 -ListOfNotificationsDone=列出所有發送電子郵件通知 +NotificationsAuto=自動通知。 +NoNotificationsWillBeSent=沒有為此類型事件和公司計畫的自動電子郵件通知 +ANotificationsWillBeSent=1條自動通知將以電子郵件寄送 +SomeNotificationsWillBeSent=%s的自動通知將以電子郵件寄送 +AddNewNotification=Subscribe to a new automatic email notification (target/event) +ListOfActiveNotifications=List all active subscriptions (targets/events) for automatic email notification +ListOfNotificationsDone=列出所有已寄送的自動電子郵件通知 MailSendSetupIs=電子郵件發送的設定已設定為“ %s”。此模式不能用於發送批次電子郵件。 MailSendSetupIs2=您必須先使用管理員帳戶進入選單%s首頁-設定-EMails%s以將參數<strong>'%s'</strong>更改為使用模式 '%s'。使用此模式 ,您可以輸入Internet服務供應商提供的SMTP伺服器的設定,並使用批次電子郵件功能。 MailSendSetupIs3=如果對如何設定SMTP伺服器有任何疑問,可以詢問%s。 @@ -140,7 +142,7 @@ UseFormatFileEmailToTarget=匯入檔案的格式必須為<strong>電子郵件; UseFormatInputEmailToTarget=輸入字串格式為<strong>電子郵件; 姓;名;其他</strong> MailAdvTargetRecipients=收件人(進階選項) AdvTgtTitle=填寫輸入欄位以預先選擇合作方或聯絡人/地址 -AdvTgtSearchTextHelp=使用%%作為通用字元。例如,要尋找像是<b>jean,joe,jim</b>的所有項目,可以輸入 <b>j%%</b> ,也可以使用;作為數值的分隔字元,並使用!排除此值。例如 <b>jean;joe;jim%%;!jimo;!jima%</b> 將會指向所有沒有jimo與所有以jima開始的jean,joe +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=使用空格選擇整數或浮點值 AdvTgtMinVal=最小值 AdvTgtMaxVal=最大值 @@ -162,13 +164,16 @@ AdvTgtCreateFilter=建立過濾器 AdvTgtOrCreateNewFilter=新過濾器名稱 NoContactWithCategoryFound=找不到具有類別的聯絡人/地址 NoContactLinkedToThirdpartieWithCategoryFound=找不到具有類別的聯絡人/地址 -OutGoingEmailSetup=發送電子郵件設定 -InGoingEmailSetup=接收電子郵件設定 -OutGoingEmailSetupForEmailing=外送電子郵件設定(用於模組%s) -DefaultOutgoingEmailSetup=預設發送電子郵件設定 +OutGoingEmailSetup=Outgoing emails +InGoingEmailSetup=Incoming emails +OutGoingEmailSetupForEmailing=Outgoing emails (for module %s) +DefaultOutgoingEmailSetup=與全域寄送電子郵件設定相同的配置 Information=資訊 ContactsWithThirdpartyFilter=帶有合作方過濾器的聯絡人 -Unanswered=Unanswered +Unanswered=未回應 Answered=已回覆 -IsNotAnAnswer=Is not answer (initial email) -IsAnAnswer=Is an answer of an initial email +IsNotAnAnswer=未回應(原始電子郵件) +IsAnAnswer=是一封原始電子郵件的回應 +RecordCreatedByEmailCollector=由電子郵件收集器%s從電子郵件%s建立的記錄 +DefaultBlacklistMailingStatus=Default contact status for refuse bulk emailing +DefaultStatusEmptyMandatory=Empty but mandatory diff --git a/htdocs/langs/zh_TW/main.lang b/htdocs/langs/zh_TW/main.lang index abc5ed6e22c..74cc374cb06 100644 --- a/htdocs/langs/zh_TW/main.lang +++ b/htdocs/langs/zh_TW/main.lang @@ -28,7 +28,9 @@ NoTemplateDefined=此電子郵件類別沒有可用的範本 AvailableVariables=可用的替代變數 NoTranslation=沒有翻譯 Translation=翻譯 +CurrentTimeZone=PHP (伺服器)時區 EmptySearchString=輸入非空白的搜索字串 +EnterADateCriteria=輸入日期條件 NoRecordFound=沒有找到任何紀錄 NoRecordDeleted=沒有刪除記錄 NotEnoughDataYet=沒有足夠資料 @@ -85,6 +87,8 @@ FileWasNotUploaded=所選定的檔案尚未上傳。點選 "附加檔案"。 NbOfEntries=項目數量 GoToWikiHelpPage=讀取線上幫助 (需要連上網路) GoToHelpPage=讀取幫助 +DedicatedPageAvailable=There is a dedicated help page related to your current screen +HomePage=首頁 RecordSaved=記錄已儲存 RecordDeleted=記錄已刪除 RecordGenerated=記錄已產生 @@ -147,8 +151,8 @@ NotClosed=尚未關閉 Enabled=已啟用 Enable=啓用 Deprecated=已棄用 -Disable=禁用 -Disabled=已禁用 +Disable=關閉 +Disabled=已關閉 Add=新增 AddLink=新增連結 RemoveLink=移除連結 @@ -197,7 +201,7 @@ ReOpen=重新公開 Upload=上傳 ToLink=連線 Select=選擇 -SelectAll=Select all +SelectAll=全選 Choose=選擇 Resize=調整大小 ResizeOrCrop=調整大小或裁剪 @@ -210,7 +214,7 @@ Groups=群組 NoUserGroupDefined=未定義用戶群組 Password=密碼 PasswordRetype=重新輸入您的密碼 -NoteSomeFeaturesAreDisabled=請注意在這個示範中多項功能/模組已禁用。 +NoteSomeFeaturesAreDisabled=請注意在這個示範中多項功能/模組已關閉。 Name=名稱 NameSlashCompany=姓名/公司 Person=人員 @@ -220,6 +224,7 @@ Value=值 PersonalValue=個人設定值 NewObject=新 %s NewValue=新值 +OldValue=Old value %s CurrentValue=目前值 Code=代碼 Type=類型 @@ -258,7 +263,7 @@ Cards=資訊卡 Card=資訊卡 Now=現在 HourStart=開始(時) -Deadline=Deadline +Deadline=最後期限 Date=日期 DateAndHour=日期及小時 DateToday=今日日期 @@ -433,6 +438,7 @@ RemainToPay=保持付款 Module=模組/應用程式 Modules=模組/應用程式 Option=選項 +Filters=Filters List=清單 FullList=全部清單 FullConversation=全部轉換 @@ -494,7 +500,7 @@ By=由 From=從 FromDate=從 FromLocation=從 -at=at +at=在 to=至 To=至 and=和 @@ -650,6 +656,7 @@ SupplierPreview=供應商預覽資訊 ShowCustomerPreview=顯示客戶預覽資訊 ShowSupplierPreview=顯示供應商預覽 RefCustomer=參考客戶 +InternalRef=Internal ref. Currency=貨幣 InfoAdmin=管理員資訊 Undo=復原 @@ -689,7 +696,7 @@ RecordsModified=%s記錄已修改 RecordsDeleted=%s記錄已刪除 RecordsGenerated=%s記錄已產生 AutomaticCode=自動代碼 -FeatureDisabled=功能已禁用 +FeatureDisabled=功能已關閉 MoveBox=移動小工具 Offered=已提供 NotEnoughPermissions=您沒有權限執行這個動作 @@ -703,13 +710,13 @@ PartialWoman=部分 TotalWoman=全部 NeverReceived=從未收到 Canceled=已取消 -YouCanChangeValuesForThisListFromDictionarySetup=您可從選單「設定-字典」改變此清單的值 +YouCanChangeValuesForThisListFromDictionarySetup=您可從選單「首頁-設定-分類」改變此清單的值 YouCanChangeValuesForThisListFrom=您可從選單 %s 修改此清單的值 YouCanSetDefaultValueInModuleSetup=您可以設定一個當在模組設定中產生一個新紀錄時的默認值 Color=色彩 Documents=已連結檔案 Documents2=文件 -UploadDisabled=禁用上傳 +UploadDisabled=上傳已關閉 MenuAccountancy=會計 MenuECM=文件 MenuAWStats=AWStats 軟體 @@ -724,7 +731,7 @@ CurrentMenuManager=目前選單管理器 Browser=瀏覽器 Layout=外觀 Screen=畫面 -DisabledModules=已禁用模組 +DisabledModules=已關閉模組 For=為 ForCustomer=客戶 Signature=簽名 @@ -749,7 +756,7 @@ PrintContentArea=顯示列印頁面的主要內容區域 MenuManager=選單管理器 WarningYouAreInMaintenanceMode=警告,您處於維護模式:僅允許<b>%s</b>登入且在此模式下使用應用程序。 CoreErrorTitle=系統錯誤 -CoreErrorMessage=很抱歉,發生錯誤。連絡您的系統管理員以確認記錄檔或禁用 $dolibarr_main_prod=1 以取得更多資訊。 +CoreErrorMessage=很抱歉,發生錯誤。連絡您的系統管理員以確認記錄檔或關閉 $dolibarr_main_prod=1 以取得更多資訊。 CreditCard=信用卡 ValidatePayment=驗證付款 CreditOrDebitCard=信用卡或金融信用卡 @@ -888,8 +895,8 @@ Miscellaneous=雜項 Calendar=行事曆 GroupBy=群組依... ViewFlatList=檢視平面清單 -ViewAccountList=View ledger -ViewSubAccountList=View subaccount ledger +ViewAccountList=檢視總帳 +ViewSubAccountList=檢視子帳戶總帳 RemoveString=移除字串‘%s’ SomeTranslationAreUncomplete=提供的某些語言可能僅被部分翻譯,或者可能包含錯誤。請通過註冊<a href="https://transifex.com/projects/p/dolibarr/" target="_blank">https://transifex.com/projects/p/dolibarr/</a>來進行改進,以幫助修正您的語言。 DirectDownloadLink=直接下載連結(公共/外部) @@ -1105,5 +1112,11 @@ DateOfBirth=出生日期 SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry=安全許可證已過期,因此操作已被取消。請再試一次。 UpToDate=最新 OutOfDate=過期 -EventReminder=Event Reminder -UpdateForAllLines=Update for all lines +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 diff --git a/htdocs/langs/zh_TW/members.lang b/htdocs/langs/zh_TW/members.lang index 81f115bf880..d31b8fa9640 100644 --- a/htdocs/langs/zh_TW/members.lang +++ b/htdocs/langs/zh_TW/members.lang @@ -19,8 +19,8 @@ MembersCards=會員名片 MembersList=會員清單 MembersListToValid=草案會員清單(待確認) MembersListValid=有效會員清單 -MembersListUpToDate=List of valid members with up-to-date subscription -MembersListNotUpToDate=List of valid members with out-of-date subscription +MembersListUpToDate=最新訂閱的有效會員清單 +MembersListNotUpToDate=訂閱過期的有效會員清單 MembersListResiliated=已被終止會員清單 MembersListQualified=合格會員清單 MenuMembersToValidate=草案會員 @@ -32,7 +32,7 @@ DateSubscription=訂閱日期 DateEndSubscription=訂閱結束日期 EndSubscription=結束訂閱 SubscriptionId=訂閱編號 -WithoutSubscription=Without subscription +WithoutSubscription=沒有訂閱 MemberId=會員編號 NewMember=新會員 MemberType=會員類型 @@ -80,7 +80,7 @@ DeleteType=刪除 VoteAllowed=允許投票 Physical=自然人 Moral=法人 -MorAndPhy=Moral and Physical +MorAndPhy=法人與自然人 Reenable=重新啟用 ResiliateMember=終止會員 ConfirmResiliateMember=您確定要終止此會員嗎? @@ -116,7 +116,7 @@ SendingEmailOnMemberValidation=發送新會員驗證電子郵件 SendingEmailOnNewSubscription=發送新訂閱電子郵件 SendingReminderForExpiredSubscription=發送過期訂閱提醒 SendingEmailOnCancelation=發送取消郵件 -SendingReminderActionComm=Sending reminder for agenda event +SendingReminderActionComm=寄送議程事件提醒 # Topic of email templates YourMembershipRequestWasReceived=您的會員資格已收到。 YourMembershipWasValidated=您的會員資格已通過驗證 @@ -167,7 +167,7 @@ MembersStatisticsByState=會員統計(州/省) MembersStatisticsByTown=會員統計(城鎮) MembersStatisticsByRegion=會員統計(地區) NbOfMembers=會員數 -NbOfActiveMembers=Number of current active members +NbOfActiveMembers=目前活躍會員數 NoValidatedMemberYet=無已驗證的會員 MembersByCountryDesc=此畫面顯示依國家/地區劃分的會員統計訊息。圖形取決於Google線上圖形服務,並且僅在網路連接正常時可用。 MembersByStateDesc=此畫面依州/省顯示有關會員的統計訊息。 @@ -177,7 +177,7 @@ MenuMembersStats=統計 LastMemberDate=最新會員日期 LatestSubscriptionDate=最新訂閱日期 MemberNature=會員性質 -MembersNature=Nature of members +MembersNature=會員性質 Public=資訊是公開的 NewMemberbyWeb=增加了新會員。等待核准 NewMemberForm=新會員表格 diff --git a/htdocs/langs/zh_TW/modulebuilder.lang b/htdocs/langs/zh_TW/modulebuilder.lang index b92626cee0e..bffd8ecac21 100644 --- a/htdocs/langs/zh_TW/modulebuilder.lang +++ b/htdocs/langs/zh_TW/modulebuilder.lang @@ -40,6 +40,7 @@ PageForCreateEditView=建立/編輯/檢視記錄PHP頁面 PageForAgendaTab=事件分頁的PHP頁面 PageForDocumentTab=文件分頁的PHP頁面 PageForNoteTab=註記分頁的PHP頁面 +PageForContactTab=PHP page for contact tab PathToModulePackage=模組/應用程式包的zip路徑 PathToModuleDocumentation=模組/應用程式檔案的文件路徑(%s) SpaceOrSpecialCharAreNotAllowed=不允許使用空格或特殊符號。 @@ -77,7 +78,7 @@ IsAMeasure=Is a measure DirScanned=資料夾已掃描 NoTrigger=沒有觸發器 NoWidget=沒有小工具 -GoToApiExplorer=前往API資源管理器 +GoToApiExplorer=API explorer ListOfMenusEntries=選單條目清單 ListOfDictionariesEntries=分類條目清單 ListOfPermissionsDefined=已定義權限清單 @@ -105,11 +106,11 @@ TryToUseTheModuleBuilder=如果您具有SQL和PHP的知識,則可以使用本 SeeTopRightMenu=請參閱右上方選單中的<span class="fa fa-bug"> </span> AddLanguageFile=增加語言檔案 YouCanUseTranslationKey=您可以在此處使用一個key,此key是在語言檔案中找到的翻譯key(請參見“語言”分頁) -DropTableIfEmpty=(如果為空,則刪除表) +DropTableIfEmpty=(Destroy table if empty) TableDoesNotExists=表%s不存在 TableDropped=表%s已刪除 InitStructureFromExistingTable=建立現有表的結構數組字串 -UseAboutPage=禁用關於頁面 +UseAboutPage=關閉關於頁面 UseDocFolder=禁用文件資料夾 UseSpecificReadme=使用特定的ReadMe檔案 ContentOfREADMECustomized=注意:README.md檔案的內容已替換為ModuleBuilder設定中定義的特定值。 @@ -126,7 +127,6 @@ UseSpecificEditorURL = 使用特定的編輯器網址 UseSpecificFamily = 使用特定的家族 UseSpecificAuthor = 使用特定作者 UseSpecificVersion = 使用特定的初始版本 -ModuleMustBeEnabled=必須先啟用模組/應用程式 IncludeRefGeneration=項目參考必須自動產生 IncludeRefGenerationHelp=如果要包含代碼以自動管理參考的產生成,請點選此選框 IncludeDocGeneration=我想從項目產生一些文件 @@ -140,3 +140,4 @@ TypeOfFieldsHelp=Type of fields:<br>varchar(99), double(24,8), real, text, html, AsciiToHtmlConverter=ASCII到HTML轉換器 AsciiToPdfConverter=ASCII到PDF轉換器 TableNotEmptyDropCanceled=表不為空。刪除已被取消。 +ModuleBuilderNotAllowed=The module builder is available but not allowed to your user. diff --git a/htdocs/langs/zh_TW/mrp.lang b/htdocs/langs/zh_TW/mrp.lang index f52b8abeb1b..58bbdd4bcc7 100644 --- a/htdocs/langs/zh_TW/mrp.lang +++ b/htdocs/langs/zh_TW/mrp.lang @@ -77,4 +77,28 @@ UnitCost=單位成本 TotalCost=總計花費 BOMTotalCost=根據每個要消耗的數量和產品的成本產生此BOM的成本(如果定義則使用“成本價”,如果定義則使用“平均加權價格”,否則使用“最佳採購價”) GoOnTabProductionToProduceFirst=您必須先開始生產才能關閉生產訂單(請參見分頁“ %s”)。但是您可以取消它。 -ErrorAVirtualProductCantBeUsedIntoABomOrMo=A kit can't be used into a BOM or a MO +ErrorAVirtualProductCantBeUsedIntoABomOrMo=套件不能用於物料清單或製造訂單 +Workstation=Workstation +Workstations=Workstations +WorkstationsDescription=Workstations management +WorkstationSetup = Workstations setup +WorkstationSetupPage = Workstations setup page +WorkstationAbout = About Workstation +WorkstationAboutPage = Workstations about 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=Supprimer +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/zh_TW/multicurrency.lang b/htdocs/langs/zh_TW/multicurrency.lang index fc1db29be55..0cf54b67b17 100644 --- a/htdocs/langs/zh_TW/multicurrency.lang +++ b/htdocs/langs/zh_TW/multicurrency.lang @@ -16,5 +16,23 @@ CurrenciesUsed_help_to_add=增加您需要在<b>提案</b> , <b>訂單</b>等 rate=利率 MulticurrencyReceived=已收,原來幣別 MulticurrencyRemainderToTake=剩餘金額,原始貨幣 -MulticurrencyPaymentAmount=付款金額,原來幣別 +MulticurrencyPaymentAmount=付款金額,原始貨幣 AmountToOthercurrency=金額(以接收帳戶的貨幣表示) +CurrencyRateSyncSucceed=貨幣匯率同步成功完成 +MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT=使用文件的匯率進行線上支付 +TabTitleMulticurrencyRate=匯率清單 +ListCurrencyRate=貨幣匯率清單 +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/zh_TW/orders.lang b/htdocs/langs/zh_TW/orders.lang index 05df173b1d9..1213c4f6bdb 100644 --- a/htdocs/langs/zh_TW/orders.lang +++ b/htdocs/langs/zh_TW/orders.lang @@ -6,7 +6,7 @@ OrderId=訂單編號 Order=訂單 PdfOrderTitle=訂單 Orders=訂單 -OrderLine=在線訂單 +OrderLine=訂單行 OrderDate=訂購日期 OrderDateShort=訂購日期 OrderToProcess=訂單處理 @@ -86,11 +86,11 @@ AllOrders=所有訂單 NbOfOrders=訂單號碼 OrdersStatistics=訂單統計 OrdersStatisticsSuppliers=採購訂單統計 -NumberOfOrdersByMonth=按月份訂單數 -AmountOfOrdersByMonthHT=每月訂單量(不含稅) +NumberOfOrdersByMonth=每月訂單數 +AmountOfOrdersByMonthHT=每月訂單金額(不含稅) ListOfOrders=訂單列表 CloseOrder=關閉命令 -ConfirmCloseOrder=您確定要將此訂單設置為已交付嗎?訂單下達後,可以將其設置為開票。 +ConfirmCloseOrder=您確定要將此訂單設為已出貨嗎?訂單下達後,可以將其設為開票。 ConfirmDeleteOrder=您確定要刪除此訂單嗎? ConfirmValidateOrder=您確定要驗證此訂單名稱為<b>%s</b>嗎? ConfirmUnvalidateOrder=您確定要恢復訂單<b>%s</b>到草稿狀態嗎? @@ -106,7 +106,7 @@ RefCustomerOrder=參考的客戶訂單 RefOrderSupplier=參考的供應商訂單 RefOrderSupplierShort=供應商參考訂單 SendOrderByMail=通過郵件發送訂單 -ActionsOnOrder=訂單活動 +ActionsOnOrder=訂單事件 NoArticleOfTypeProduct=沒有“產品”類型的商品,因此該訂單沒有可運送的商品 OrderMode=訂購方式 AuthorRequest=發起者 @@ -146,6 +146,7 @@ PDFEratostheneDescription=完整的訂單模型 PDFEdisonDescription=可產生一份簡單的訂單範本 PDFProformaDescription=完整的形式發票範本 CreateInvoiceForThisCustomer=提單/記名票據 +CreateInvoiceForThisSupplier=提單/記名票據 NoOrdersToInvoice=沒有訂單可計費 CloseProcessedOrdersAutomatically=將所有選定訂單分類為“已處理”。 OrderCreation=訂單新增 diff --git a/htdocs/langs/zh_TW/other.lang b/htdocs/langs/zh_TW/other.lang index 0e643a6518f..9ee8202b562 100644 --- a/htdocs/langs/zh_TW/other.lang +++ b/htdocs/langs/zh_TW/other.lang @@ -5,8 +5,6 @@ Tools=工具 TMenuTools=工具 ToolsDesc=所有在其他選單項目中未包含的工具都在此處。 <br>所有工具均可通過左側選單使用。 Birthday=生日 -BirthdayDate=生日日期 -DateToBirth=生日 BirthdayAlertOn=生日提醒啟動中 BirthdayAlertOff=生日提醒停用中 TransKey=密鑰TransKey的翻譯 @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=發票日期的前一個月(1-12) TextPreviousMonthOfInvoice=發票日期的前一個月(文字) NextMonthOfInvoice=發票日期的下個月(1-12) TextNextMonthOfInvoice=發票日期的下個月(文字) +PreviousMonth=前一個月 +CurrentMonth=目前月份 ZipFileGeneratedInto=壓縮檔案已產生到<b> %s </b>中。 DocFileGeneratedInto=DOC檔案已產生到<b> %s </b>中。 JumpToLogin=已斷線。請前往登入頁面... @@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=費用報告已驗證(需要批准) Notify_EXPENSE_REPORT_APPROVE=費用報告已批准 Notify_HOLIDAY_VALIDATE=休假申請已驗證(需要批准) Notify_HOLIDAY_APPROVE=休假申請已批准 +Notify_ACTION_CREATE=已新增活動至應辦事項 SeeModuleSetup=請參閱模組%s的設定 NbOfAttachedFiles=所附檔案/文件數 TotalSizeOfAttachedFiles=附件大小總計 @@ -99,6 +100,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\n請查看已附上之發貨__RE PredefinedMailContentSendFichInter=__(Hello)__\n\n請查看已附上之干預__REF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=如果付款尚未完成您可以點擊以下連結.\n\n%s\n\n PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendActionComm=活動提醒 "__EVENT_LABEL__" 在 __EVENT_DATE__ 的 __EVENT_TIME__<br><br>\n此為自動提醒訊息,請勿回覆. DemoDesc=Dolibarr是一個嚴謹的ERP / CRM,支援多個業務模組。展示所有模組的DEMO沒有意義,因為這種情況永遠不會發生(有數百種可用)。因此,有幾個DEMO設定檔案可用。 ChooseYourDemoProfil=選擇最適合您需求的DEMO設定檔案... ChooseYourDemoProfilMore=...或建立您自己的設定檔案<br>(手動選擇模組) @@ -137,7 +139,7 @@ Right=右 CalculatedWeight=已計算重量 CalculatedVolume=已計算體積 Weight=重量 -WeightUnitton=公噸 +WeightUnitton=噸 WeightUnitkg=kg WeightUnitg=g WeightUnitmg=mg @@ -214,6 +216,7 @@ EMailTextExpenseReportValidated=費用報告%s已通過驗證。 EMailTextExpenseReportApproved=費用報告%s已批准。 EMailTextHolidayValidated=休假申請%s已通過驗證。 EMailTextHolidayApproved=休假申請%s已被批准。 +EMailTextActionAdded=已新增活動%s至應辦事項中。 ImportedWithSet=匯入資料集 DolibarrNotification=自動通知 ResizeDesc=輸入新的寬度<b>或</b> 新的高度。調整大小時將維持長寬比率... @@ -258,6 +261,7 @@ ContactCreatedByEmailCollector=電子郵件收集器從電子郵件MSGID %s建 ProjectCreatedByEmailCollector=電子郵件收集器從電子郵件MSGID %s建立的專案 TicketCreatedByEmailCollector=電子郵件收集器從電子郵件MSGID %s建立的服務單 OpeningHoursFormatDesc=使用-分隔營業開始時間和營業結束時間。 <br>使用空格輸入不同的範圍。 <br>範例:8-12 14-18 +PrefixSession=程序ID的前綴 ##### Export ##### ExportsArea=出口地區 @@ -278,9 +282,9 @@ LinesToImport=要匯入的行 MemoryUsage=記憶體使用率 RequestDuration=請求期限 -ProductsPerPopularity=Products/Services by popularity +ProductsPerPopularity=依受歡迎程度的產品/服務 PopuProp=依照在提案中受歡迎程度列出的產品/服務 PopuCom=依照在訂單中受歡迎程度列出的產品/服務 ProductStatistics=產品/服務統計 NbOfQtyInOrders=訂單數量 -SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... +SelectTheTypeOfObjectToAnalyze=選擇要分析的項目類型... diff --git a/htdocs/langs/zh_TW/products.lang b/htdocs/langs/zh_TW/products.lang index bcff540d70c..6b2594c3473 100644 --- a/htdocs/langs/zh_TW/products.lang +++ b/htdocs/langs/zh_TW/products.lang @@ -108,7 +108,8 @@ FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=每個產品/服務有多個價格區段(每個客戶屬於一個價格區段) MultiPricesNumPrices=價格數量 DefaultPriceType=增加新銷售價格時的每個預設價格(含稅和不含稅)基準 -AssociatedProductsAbility=Activate kits (virtual 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 ParentProductsNumber=母套裝產品數 @@ -167,8 +168,10 @@ BuyingPrices=採購價格 CustomerPrices=客戶價格 SuppliersPrices=供應商價格 SuppliersPricesOfProductsOrServices=供應商價格(產品或服務) -CustomCode=海關/商品/ HS編碼 +CustomCode=Customs|Commodity|HS code CountryOrigin=原產地 +RegionStateOrigin=Region origin +StateOrigin=State|Province origin Nature=產品性質(材料/成品) NatureOfProductShort=產品性質 NatureOfProductDesc=Raw material or finished product @@ -239,7 +242,7 @@ AlwaysUseFixedPrice=使用固定價格 PriceByQuantity=數量不同的價格 DisablePriceByQty=停用數量價格 PriceByQuantityRange=數量範圍 -MultipriceRules=價格區段規則 +MultipriceRules=Automatic prices for segment UseMultipriceRules=使用價格區段規則(在產品模組設定中定義),根據第一區段自動計算所有其他區段的價格 PercentVariationOver=%%超過%s上的變化 PercentDiscountOver=%%超過%s的折扣 diff --git a/htdocs/langs/zh_TW/projects.lang b/htdocs/langs/zh_TW/projects.lang index 163b487dd3a..81804cf8dcf 100644 --- a/htdocs/langs/zh_TW/projects.lang +++ b/htdocs/langs/zh_TW/projects.lang @@ -76,15 +76,16 @@ MyActivities=我的任務/活動 MyProjects=我的專案 MyProjectsArea=專案區 DurationEffective=有效期限 -ProgressDeclared=進度宣布 +ProgressDeclared=宣布實際進度 TaskProgressSummary=任務進度 CurentlyOpenedTasks=目前的打開任務 -TheReportedProgressIsLessThanTheCalculatedProgressionByX=預計進度比計算的進度少%s -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=預計進度比計算的進度多%s -ProgressCalculated=進度計算 +TheReportedProgressIsLessThanTheCalculatedProgressionByX=宣布的實際進度小於消耗進度%s +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=宣布的實際進度比消耗進度多%s +ProgressCalculated=消耗進度 WhichIamLinkedTo=我連結到的 WhichIamLinkedToProject=此我已連結到專案 Time=時間 +TimeConsumed=已消耗 ListOfTasks=任務清單 GoToListOfTimeConsumed=前往工作時間清單 GanttView=甘特圖 @@ -211,9 +212,9 @@ ProjectNbProjectByMonth=每月建立的專案數 ProjectNbTaskByMonth=每月建立的任務數 ProjectOppAmountOfProjectsByMonth=每月的潛在客戶數量 ProjectWeightedOppAmountOfProjectsByMonth=每月加權的潛在客戶數量 -ProjectOpenedProjectByOppStatus=Open project|lead by lead status -ProjectsStatistics=Statistics on projects or leads -TasksStatistics=Statistics on tasks of projects or leads +ProjectOpenedProjectByOppStatus=依照潛在狀態開啟專案/ 潛在 +ProjectsStatistics=專案/潛在統計 +TasksStatistics=專案/潛在任務的統計 TaskAssignedToEnterTime=任務已分配。應該可以輸入此任務的時間。 IdTaskTime=任務時間ID YouCanCompleteRef=如果要使用一些後綴來完成引用,則建議增加-字元以將其分隔,因此自動編號仍可正確用於下一個專案。例如%s-MYSUFFIX diff --git a/htdocs/langs/zh_TW/recruitment.lang b/htdocs/langs/zh_TW/recruitment.lang index 5302409b57c..71b646c556d 100644 --- a/htdocs/langs/zh_TW/recruitment.lang +++ b/htdocs/langs/zh_TW/recruitment.lang @@ -47,8 +47,8 @@ ResponsibleOfRecruitement=負責招聘 IfJobIsLocatedAtAPartner=如果職缺位於合作夥伴地點 PositionToBeFilled=工作職稱 PositionsToBeFilled=工作職位 -ListOfPositionsToBeFilled=List of job positions -NewPositionToBeFilled=New job positions +ListOfPositionsToBeFilled=工作職位清單 +NewPositionToBeFilled=新職位 JobOfferToBeFilled=Job position to be filled ThisIsInformationOnJobPosition=工作職位空缺訊息 @@ -73,3 +73,4 @@ JobClosedTextCandidateFound=The job position is closed. The position has been fi 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/zh_TW/sendings.lang b/htdocs/langs/zh_TW/sendings.lang index 42c24671414..0a422561415 100644 --- a/htdocs/langs/zh_TW/sendings.lang +++ b/htdocs/langs/zh_TW/sendings.lang @@ -30,6 +30,7 @@ OtherSendingsForSameOrder=此訂單的其他出貨清單 SendingsAndReceivingForSameOrder=此訂單的出貨貨品和收據 SendingsToValidate=出貨驗證 StatusSendingCanceled=已取消 +StatusSendingCanceledShort=已取消 StatusSendingDraft=草案 StatusSendingValidated=已驗證(產品出貨或已經出貨) StatusSendingProcessed=已處理 @@ -65,6 +66,7 @@ ValidateOrderFirstBeforeShipment=您必須先驗證訂單,然後才能進行 # Sending methods # ModelDocument DocumentModelTyphon=交貨收據的更完整文件模型(商標...) +DocumentModelStorm=更完整的文件模型,可用於交貨單和域外兼容性(logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=常數EXPEDITION_ADDON_NUMBER未定義 SumOfProductVolumes=產品體積總和 SumOfProductWeights=產品重量總和 diff --git a/htdocs/langs/zh_TW/stocks.lang b/htdocs/langs/zh_TW/stocks.lang index d2936453e9f..d28483b5676 100644 --- a/htdocs/langs/zh_TW/stocks.lang +++ b/htdocs/langs/zh_TW/stocks.lang @@ -24,13 +24,13 @@ StockAtDateInFuture=將來的日期 StocksByLotSerial=依批次/序號的庫存 LotSerial=批次/序號 LotSerialList=批次/序號清單 -Movements=轉讓 +Movements=庫存移轉 ErrorWarehouseRefRequired=倉庫引用的名稱為必填 ListOfWarehouses=倉庫清單 -ListOfStockMovements=庫存轉讓清單 +ListOfStockMovements=庫存移轉清單 ListOfInventories=庫存清單 -MovementId=轉讓編號 -StockMovementForId=轉讓編號 %d +MovementId=移轉編號 +StockMovementForId=移轉編號 %d ListMouvementStockProject=與項目相關的庫存變動清單 StocksArea=庫存區域 AllWarehouses=所有倉庫 @@ -62,6 +62,7 @@ EnhancedValueOfWarehouses=倉庫價值 UserWarehouseAutoCreate=新增用戶時自動新增用戶倉庫 AllowAddLimitStockByWarehouse=除了每個產品的最小和期望庫存值之外,還管理每個配對(產品倉庫)的最小和期望庫存值 RuleForWarehouse=倉庫規則 +WarehouseAskWarehouseDuringPropal=Set a warehouse on Sale propal WarehouseAskWarehouseDuringOrder=在銷售訂單上設定一個倉庫 UserDefaultWarehouse=在用戶上設定一個倉庫 MainDefaultWarehouse=預設倉庫 @@ -240,3 +241,4 @@ InventoryRealQtyHelp=將值設定為0以重置數量<br>保持欄位為空或刪 UpdateByScaning=以掃描更新 UpdateByScaningProductBarcode=掃描更新(產品條碼) UpdateByScaningLot=掃描更新(批次|序列條碼) +DisableStockChangeOfSubProduct=Deactivate the stock change for all the subproducts of this Kit during this movement. diff --git a/htdocs/langs/zh_TW/ticket.lang b/htdocs/langs/zh_TW/ticket.lang index d591079e2f6..8ce934d6b3e 100644 --- a/htdocs/langs/zh_TW/ticket.lang +++ b/htdocs/langs/zh_TW/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=服務單-類型 TicketDictCategory=服務單-組別 TicketDictSeverity=服務單-嚴重程度 TicketDictResolution=服務單-決議 -TicketTypeShortBUGSOFT=軟體故障 -TicketTypeShortBUGHARD=設備故障 -TicketTypeShortCOM=商業問題 +TicketTypeShortCOM=商業問題 TicketTypeShortHELP=請求有用的幫助 TicketTypeShortISSUE=錯誤或問題 TicketTypeShortREQUEST=變更或增強要求 @@ -44,7 +42,7 @@ TicketTypeShortOTHER=其他 TicketSeverityShortLOW=低 TicketSeverityShortNORMAL=正常 TicketSeverityShortHIGH=高 -TicketSeverityShortBLOCKING=嚴重/阻止 +TicketSeverityShortBLOCKING=嚴重,阻止中 ErrorBadEmailAddress=欄位'%s'不正確 MenuTicketMyAssign=我的服務單 @@ -60,7 +58,6 @@ OriginEmail=電子郵件來源 Notify_TICKET_SENTBYMAIL=以電子郵件發送服務單訊息 # Status -NotRead=未讀 Read=已讀 Assigned=已分配 InProgress=進行中 @@ -109,7 +106,7 @@ TicketPublicInterfaceTextHelpMessageHelpAdmin=此段文字將出現在用戶的 ExtraFieldsTicket=額外屬性 TicketCkEditorEmailNotActivated=HTML編輯器未啟動。請將FCKEDITOR_ENABLE_MAIL內容設為1即可啟動。 TicketsDisableEmail=不要為服務單建立或訊息紀錄發送電子郵件 -TicketsDisableEmailHelp=預設情況下,在建立新服務單或訊息時會發送電子郵件。啟用此選項可禁用*所有*電子郵件通知 +TicketsDisableEmailHelp=預設情況下,在建立新服務單或訊息時會發送電子郵件。啟用此選項可關閉*所有*電子郵件通知 TicketsLogEnableEmail=通過電子郵件啟用日誌 TicketsLogEnableEmailHelp=每次更改時,都會向與此服務單有關的**每個聯絡人**發送電子郵件。 TicketParams=參數 @@ -126,6 +123,7 @@ TicketsActivatePublicInterfaceHelp=公共界面允許任何訪客建立服務單 TicketsAutoAssignTicket=自動分配建立服務單的用戶 TicketsAutoAssignTicketHelp=建立服務單時,可以自動將用戶分配給服務單。 TicketNumberingModules=服務單編號模組 +TicketsModelModule=Document templates for tickets TicketNotifyTiersAtCreation=建立時通知合作方 TicketsDisableCustomerEmail=從公共界面建立服務單時,始終禁用電子郵件 TicketsPublicNotificationNewMessage=當有新訊息時寄送電子郵件 @@ -135,7 +133,7 @@ TicketPublicNotificationNewMessageDefaultEmailHelp=如果沒有分配服務單 # # Index & list page # -TicketsIndex=門票區 +TicketsIndex=服務單區域 TicketList=服務單清單 TicketAssignedToMeInfos=此頁面顯示由目前用戶建立或分配給目前用戶的服務單清單 NoTicketsFound=找不到服務單 @@ -233,7 +231,6 @@ TicketLogStatusChanged=狀態已更改:%s到%s TicketNotNotifyTiersAtCreate=建立時不通知公司 Unread=未讀 TicketNotCreatedFromPublicInterface=無法使用。服務單不是從公共界面建立的。 -PublicInterfaceNotEnabled=未啟用公共界面 ErrorTicketRefRequired=服務單參考名稱為必填 # diff --git a/htdocs/langs/zh_TW/users.lang b/htdocs/langs/zh_TW/users.lang index 0ae2e4c036f..26680ee4029 100644 --- a/htdocs/langs/zh_TW/users.lang +++ b/htdocs/langs/zh_TW/users.lang @@ -20,7 +20,7 @@ DeleteAUser=刪除一位用戶 EnableAUser=啟用用戶 DeleteGroup=刪除 DeleteAGroup=刪除一群組 -ConfirmDisableUser=您確定要禁用用戶 <b>%s</b> ? +ConfirmDisableUser=您確定要關閉用戶 <b>%s</b> ? ConfirmDeleteUser=您確定要刪除用戶 <b>%s</b> ? ConfirmDeleteGroup=您確定要刪除群組 <b>%s</b>? ConfirmEnableUser=您確定要啟用用戶 <b>%s</b>? @@ -46,6 +46,8 @@ RemoveFromGroup=從群組中刪除 PasswordChangedAndSentTo=密碼更改,發送到<b>%s</b>。 PasswordChangeRequest=<b>%s</b>要求變更密碼 PasswordChangeRequestSent=<b>%s</b> 傳送給 <b>%s</b> 要求更改密碼。 +IfLoginExistPasswordRequestSent=如果此登入名稱為有效帳戶,則已發送一封電子郵件以重置密碼。 +IfEmailExistPasswordRequestSent=如果此電子郵件為有效帳戶,則已發送一封用於重置密碼的電子郵件。 ConfirmPasswordReset=確認密碼重設 MenuUsersAndGroups=用戶和群組 LastGroupsCreated=最新建立的%s個群組 @@ -63,7 +65,7 @@ LinkedToDolibarrUser=連線成為 Dolibarr 用戶 LinkedToDolibarrThirdParty=連線成為 Dolibarr 的合作方 CreateDolibarrLogin=建立一位用戶 CreateDolibarrThirdParty=建立一位合作方(客戶/供應商) -LoginAccountDisableInDolibarr=在 Dolibarr 中帳戶已禁用。 +LoginAccountDisableInDolibarr=在 Dolibarr 中帳戶已關閉。 UsePersonalValue=使用個人設定值 InternalUser=內部用戶 ExportDataset_user_1=用戶及其屬性 @@ -73,6 +75,7 @@ CreateInternalUserDesc=此表單使您可以在公司/組織中建立內部用 InternalExternalDesc=一位 <b>內部</b> 使用者是您 公司/組織 的一部分。<br>一位 <b>外部</b> 使用者是顧客,供應商或是其他 (可從第三方的聯絡人紀錄為第三方建立一位外部使用者)。<br><br>以上兩種情形,在 Dolibarr 權限定義權利,外部使用者可以使用一個跟內部使用者不同的選單管理器 (見 首頁 - 設定 - 顯示) PermissionInheritedFromAGroup=因為從權限授予一個用戶的一組繼承。 Inherited=繼承 +UserWillBe=Created user will be UserWillBeInternalUser=建立的用戶將是一個內部用戶(因為沒有連結到一個特定的第三方) UserWillBeExternalUser=建立的用戶將是外部用戶(因為連結到一個特定的第三方) IdPhoneCaller=手機來電者身份 @@ -80,7 +83,7 @@ NewUserCreated=建立用戶%s NewUserPassword=%變動的密碼 NewPasswordValidated=您的新密碼已通過驗證,必須立即用於登錄。 EventUserModified=用戶%s修改 -UserDisabled=用戶%s禁用 +UserDisabled=用戶%s已關閉 UserEnabled=用戶%s啟動 UserDeleted=使用者%s刪除 NewGroupCreated=集團建立%s的 @@ -104,17 +107,19 @@ LoginUsingOpenID=使用OpenID登入 WeeklyHours=工作小時數(每週) ExpectedWorkedHours=預計每週工作時間 ColorUser=用戶顏色 -DisabledInMonoUserMode=在維護模式下禁用 +DisabledInMonoUserMode=在維護模式下已關閉 UserAccountancyCode=用戶帳號 UserLogoff=用戶登出 UserLogged=用戶登入 -DateOfEmployment=Employment date -DateEmployment=入職日期 +DateOfEmployment=到職日期 +DateEmployment=就業機會 +DateEmploymentstart=入職日期 DateEmploymentEnd=離職日期 -CantDisableYourself=您不能禁用自己的用戶記錄 +RangeOfLoginValidity=登入的有效日期範圍 +CantDisableYourself=您不能關閉自己的用戶記錄 ForceUserExpenseValidator=強制使用費用報告表驗證 ForceUserHolidayValidator=強制使用休假請求驗證 ValidatorIsSupervisorByDefault=預設情況下,驗證者是用戶的主管。保持空白狀態以保持這種行為。 UserPersonalEmail=私人信箱 UserPersonalMobile=私人手機 -WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s +WarningNotLangOfInterface=警告,這是用戶使用的主要語言,而不是他選擇查看的界面語言。要更改該用戶可見的界面語言,請前往分頁%s diff --git a/htdocs/langs/zh_TW/website.lang b/htdocs/langs/zh_TW/website.lang index 6a62024abd5..f83dc275c73 100644 --- a/htdocs/langs/zh_TW/website.lang +++ b/htdocs/langs/zh_TW/website.lang @@ -30,7 +30,6 @@ EditInLine=編輯嵌入 AddWebsite=新增網站 Webpage=網頁/容器 AddPage=新增 頁面/容器 -HomePage=首頁 PageContainer=頁面 PreviewOfSiteNotYetAvailable=您的網站<strong>%s</strong>預覽尚不可用。您必須先“ <strong>導入完整的網站模板</strong> ”或僅“ <strong>新增頁面/容器</strong> ”。 RequestedPageHasNoContentYet=要求ID為%s的頁面尚無內容,或暫存檔案.tpl.php被刪除。編輯頁面內容以解決此問題。 @@ -101,7 +100,7 @@ EmptyPage=空白頁 ExternalURLMustStartWithHttp=外部網址必須以http://或https://開始 ZipOfWebsitePackageToImport=上傳網站模板包的Zip檔案 ZipOfWebsitePackageToLoad=或選擇一個可用的嵌入式網站模板包 -ShowSubcontainers=包含動態內容 +ShowSubcontainers=Show dynamic content InternalURLOfPage=頁面的內部網址 ThisPageIsTranslationOf=該頁面/內容是以下內容的翻譯: ThisPageHasTranslationPages=此頁面/內容已翻譯 @@ -137,3 +136,4 @@ RSSFeedDesc=您可以使用此網址獲得類型為“ blogpost”的最新文 PagesRegenerated=已重新產生%s頁面/容器 RegenerateWebsiteContent=重新產生網站快取檔案 AllowedInFrames=Allowed in Frames +DefineListOfAltLanguagesInWebsiteProperties=Define list of all available languages into web site properties. diff --git a/htdocs/langs/zh_TW/withdrawals.lang b/htdocs/langs/zh_TW/withdrawals.lang index b4c32e4de5a..10539908125 100644 --- a/htdocs/langs/zh_TW/withdrawals.lang +++ b/htdocs/langs/zh_TW/withdrawals.lang @@ -11,7 +11,7 @@ PaymentByBankTransferLines=信用轉帳訂單行 WithdrawalsReceipts=直接轉帳付款訂單 WithdrawalReceipt=直接轉帳付款訂單 BankTransferReceipts=信用轉帳訂單行 -BankTransferReceipt=Credit transfer order +BankTransferReceipt=貸方轉帳訂單 LatestBankTransferReceipts=最新%s筆信用轉帳訂單 LastWithdrawalReceipts=最新%s個直接轉帳付款檔案 WithdrawalsLine=直接轉帳訂單行 @@ -40,8 +40,9 @@ CreditTransferStatistics=信用轉帳統計 Rejects=拒絕 LastWithdrawalReceipt=最新%s張直接轉帳付款收據 MakeWithdrawRequest=提出直接轉帳付款請求 -MakeBankTransferOrder=Make a credit transfer request +MakeBankTransferOrder=提出貸記轉帳請求 WithdrawRequestsDone=已記錄%s直接轉帳付款請求 +BankTransferRequestsDone=%s credit transfer requests recorded ThirdPartyBankCode=合作方銀行代碼 NoInvoiceCouldBeWithdrawed=沒有直接轉帳成功的發票。檢查發票上是否有有效IBAN的公司,以及IBAN是否具有模式為<strong> %s </strong>的UMR(唯一授權參考)。 ClassCredited=分類為已記入 @@ -63,7 +64,7 @@ InvoiceRefused=發票被拒絕(向客戶收取拒絕費用) StatusDebitCredit=借項/貸項狀況 StatusWaiting=等候 StatusTrans=傳送 -StatusDebited=Debited +StatusDebited=借貸方 StatusCredited=已記入 StatusPaid=已付款 StatusRefused=已拒絕 @@ -79,13 +80,13 @@ StatusMotif8=其他原因 CreateForSepaFRST=建立直接轉帳付款檔案(SEPA FRST) CreateForSepaRCUR=建立直接轉帳付款檔案(SEPA RCUR) CreateAll=建立直接轉帳付款檔案(全部) -CreateFileForPaymentByBankTransfer=Create file for credit transfer +CreateFileForPaymentByBankTransfer=建立用於信用轉移的檔案 CreateSepaFileForPaymentByBankTransfer=建立信用轉帳文件(SEPA) CreateGuichet=只有辦公室 CreateBanque=只有銀行 OrderWaiting=等待處理 -NotifyTransmision=Record file transmission of order -NotifyCredit=Record credit of order +NotifyTransmision=訂單的檔案傳輸記錄 +NotifyCredit=訂單信用記錄 NumeroNationalEmetter=國際轉帳編號 WithBankUsingRIB=用於RIB的銀行帳戶 WithBankUsingBANBIC=用於IBAN / BIC / SWIFT的銀行帳戶 @@ -131,7 +132,8 @@ SEPARCUR=SEPA CUR SEPAFRST=SEPA FRST ExecutionDate=執行日期 CreateForSepa=建立直接轉帳付款檔案 -ICS=債權人識別碼 +ICS=Creditor Identifier CI for direct debit +ICSTransfer=Creditor Identifier CI for bank transfer END_TO_END="EndToEndId" SEPA XML標籤- 每筆交易分配的唯一ID USTRD="Unstructured" SEPA XML標籤 ADDDAYS=將天數加到執行日期 @@ -146,3 +148,5 @@ InfoRejectSubject=直接轉帳付款訂單已被拒絕 InfoRejectMessage=您好,<br><br>銀行拒絕了與公司%s相關的發票%s的直接轉帳付款訂單 。%s的金額已被銀行拒絕 <br> <br>--<br> %s ModeWarning=未設定實際模式選項,我們將在此模擬後停止 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/zh_TW/workflow.lang b/htdocs/langs/zh_TW/workflow.lang index 2139dc0f143..0c32f533241 100644 --- a/htdocs/langs/zh_TW/workflow.lang +++ b/htdocs/langs/zh_TW/workflow.lang @@ -16,8 +16,10 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=當已確認裝運後(並且如 # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=當供應商發票已確認時(如果發票金額與連接提案的總金額相同),將連接供應商提案分類為開票 descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=當供應商發票已確認時(如果發票金額與連接訂單的總金額相同),將連接的採購訂單分類為開票 -descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +descWORKFLOW_BILL_ON_RECEPTION=驗證連結的供應商訂單後,將接收分類為“已開票” # Autoclose intervention -descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed +descWORKFLOW_TICKET_CLOSE_INTERVENTION=關閉服務單後,關閉與服務單連結的所有干預措施 AutomaticCreation=自動建立 AutomaticClassification=自動分類 +# Autoclassify shipment +descWORKFLOW_SHIPPING_CLASSIFY_CLOSED_INVOICE=Classify linked source shipment as closed when customer invoice is validated 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 ae683c829a5..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 { @@ -377,14 +380,28 @@ class Loan extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Tag loan as payed completely + * 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; @@ -445,7 +489,7 @@ class Loan extends CommonObject * Return label of loan status (unpaid, paid) * * @param int $mode 0=label, 1=short label, 2=Picto + Short label, 3=Picto, 4=Picto + Label - * @param integer $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) + * @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount paid if you have it, 1 otherwise) * @return string Label */ public function getLibStatut($mode = 0, $alreadypaid = -1) @@ -459,7 +503,7 @@ class Loan extends CommonObject * * @param int $status Id status * @param int $mode 0=Label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Label, 5=Short label + Picto - * @param integer $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) + * @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount paid if you have it, 1 otherwise) * @return string Label */ public function LibStatut($status, $mode = 0, $alreadypaid = -1) @@ -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 dc6d72094b2..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,20 +499,21 @@ 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( $this->datep, - $this->fk_typepayment, // Payment mode ID or code ("CHQ or VIR for example") + $this->paymenttype, // Payment mode ID or code ("CHQ or VIR for example") $label, $total, $this->num_payment, @@ -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 91bfaf1f921..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']; } @@ -157,7 +163,7 @@ if ($object->id) $permission = $user->rights->loan->write; $permtoedit = $user->rights->loan->write; $param = '&id='.$object->id; - include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { print $langs->trans("ErrorUnknown"); } 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 79e38dbdeb1..fa1de74b0cc 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 = ""; @@ -93,39 +105,43 @@ $help_url = ''; $title = $langs->trans('Loans'); $sql = "SELECT l.rowid, l.label, l.capital, l.datestart, l.dateend, l.paid,"; -$sql .= " SUM(pl.amount_capital) as alreadypayed"; +$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 = ".$db->escape($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>'; @@ -229,7 +261,7 @@ if ($resql) print '<td class="center width100">'.dol_print_date($db->jdate($obj->dateend), 'day').'</td>'; print '<td class="right nowrap">'; - print $loan_static->LibStatut($obj->paid, 5, $obj->alreadypayed); + print $loan_static->LibStatut($obj->paid, 5, $obj->alreadypaid); print '</td>'; print '<td></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 6aebd9fb33d..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); @@ -149,7 +149,7 @@ print '</div>'; /* - * List of loans payed + * List of loans paid */ $disable_delete = 0; @@ -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">'; @@ -194,13 +191,12 @@ if ($resql) // print '<td class="right">'.price($objp->capital).'</td>'; // Status print '<td class="center">'.$loan->getLibStatut(4, $objp->amount_capital).'</td>'; - // Amount payed + // Amount paid $amount_payed = $objp->amount_capital + $objp->amount_insurance + $objp->amount_interest; 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 1793854631e..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,113 +88,99 @@ 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 $payment = new PaymentLoan($db); - $payment->chid = $chid; + $payment->chid = $chid; $payment->datep = $datepaid; $payment->label = $loan->label; - $payment->amount_capital = $pay_amount_capital; - $payment->amount_insurance = $pay_amount_interest; - $payment->amount_interest = $pay_amount_insurance; + $payment->amount_capital = $pay_amount_capital; + $payment->amount_insurance = $pay_amount_insurance; + $payment->amount_interest = $pay_amount_interest; + $payment->fk_bank = GETPOST('accountid', 'int'); $payment->paymenttype = GETPOST('paymenttype', 'int'); - $payment->num_payment = GETPOST('num_payment'); + $payment->num_payment = GETPOST('num_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) - { - $result = $payment->addPaymentToBank($user, $chid, 'payment_loan', '(LoanPayment)', GETPOST('accountid', 'int'), '', ''); - if (!$result > 0) - { + if (!$error) { + $result = $payment->addPaymentToBank($user, $chid, 'payment_loan', '(LoanPayment)', $payment->fk_bank, '', ''); + 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; } @@ -203,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); @@ -250,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(); @@ -281,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>'; @@ -299,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 5e27a48fa02..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")); @@ -48,7 +54,9 @@ $object->fetch($loanid); $echeances = new LoanSchedule($db); $echeances->fetchAll($object->id); -if ($object->paid > 0 && count($echeances->lines) == 0) $pay_without_schedule = 1; +if ($object->paid > 0 && count($echeances->lines) == 0) { + $pay_without_schedule = 1; +} /* * Actions @@ -86,8 +94,9 @@ if ($action == 'createecheancier' && empty($pay_without_schedule)) { $echeances->lines[] = $new_echeance; $i++; } - var_dump($result); - if ($result > 0) $db->commit(); + if ($result > 0) { + $db->commit(); + } } if ($action == 'updateecheancier' && empty($pay_without_schedule)) { @@ -117,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(); + } } /* @@ -138,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)) { @@ -209,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">'; @@ -226,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>'; @@ -242,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'); @@ -270,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; @@ -297,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; } @@ -320,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 82be9955e0f..90d935705aa 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 @@ -51,19 +52,25 @@ if (!empty($_SERVER['MAIN_SHOW_TUNING_INFO'])) /** * Security: WAF layer for SQL Injection and XSS Injection (scripts) protection (Filters on GET, POST, PHP_SELF). + * Warning: Such a protection can't be enough. It is not reliable as it will alwyas be possible to bypass this. Good protection can + * 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 @@ -73,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); @@ -84,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); @@ -108,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 @@ -117,19 +123,36 @@ 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); + + // We refuse html into html because some hacks try to obfuscate evil strings by inserting HTML into HTML. Example: <img on<a>error=alert(1) to bypass test on onerror + $tmpval = preg_replace('/<[^<]+>/', '', $val); + // List of dom events is on https://www.w3schools.com/jsref/dom_obj_event.asp + $inj += preg_match('/onmouse([a-z]*)\s*=/i', $tmpval); // onmousexxx can be set on img or any html tag like <img title='...' onmouseover=alert(1)> + $inj += preg_match('/ondrag([a-z]*)\s*=/i', $tmpval); // + $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|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; } @@ -142,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')) { @@ -170,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 @@ -192,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'); } @@ -209,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]); + } } @@ -239,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(); @@ -255,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'; @@ -285,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']; @@ -307,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 { @@ -338,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); @@ -349,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; @@ -398,46 +416,68 @@ 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 -{ - // Check all cases that need a token (all POST actions, all actions and mass actions on pages with CSRFCHECK_WITH_TOKEN set, all sensitive GET actions) - if ($_SERVER['REQUEST_METHOD'] == 'POST' || - ((GETPOSTISSET('action') || GETPOSTISSET('massaction')) && defined('CSRFCHECK_WITH_TOKEN')) || - in_array(GETPOST('action', 'aZ09'), array('add', 'addtimespent', 'update', 'install', 'delete', 'deleteprof', 'deletepayment', '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."); - print "Access to this page this way (POST method or page with CSRFCHECK_WITH_TOKEN on or having a sensible value for action parameter) is refused by CSRF protection in main.inc.php. Token not provided.\n"; - print "If you access your server behind a proxy using url rewriting, you might check that all HTTP header is propagated (or add the line \$dolibarr_nocsrfcheck=1 into your conf.php file or MAIN_SECURITY_CSRF_WITH_TOKEN to 0 into setup).\n"; + 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 { + print "Access to this page this way (POST method or GET with a sensible value for 'action' parameter) is refused by CSRF protection in main.inc.php. Token not provided.\n"; + print "If you access your server behind a proxy using url rewriting and the parameter is provided by caller, you might check that all HTTP header are propagated (or add the line \$dolibarr_nocsrfcheck=1 into your conf.php file or MAIN_SECURITY_CSRF_WITH_TOKEN to 0 into setup).\n"; + } die; } } } - if (GETPOSTISSET('token') && GETPOST('token', 'alpha') != $_SESSION['token']) - { - dol_syslog("--- Access to ".$_SERVER["PHP_SELF"]." refused due to invalid token, so we disable POST and some GET parameters - referer=".$_SERVER['HTTP_REFERER'].", action=".GETPOST('action', 'aZ09').", _GET|POST['token']=".GETPOST('token', 'alpha').", _SESSION['token']=".$_SESSION['token'], LOG_WARNING); + $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'); @@ -451,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; } @@ -481,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; } @@ -497,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; @@ -527,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'; @@ -545,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 : ''); @@ -568,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')); @@ -593,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 @@ -601,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"]; @@ -648,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 @@ -682,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 } @@ -704,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')); @@ -721,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; @@ -730,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 @@ -739,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 { @@ -756,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(); @@ -769,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')); @@ -778,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; @@ -787,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 @@ -795,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 { @@ -808,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]); } @@ -851,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; @@ -870,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()); @@ -889,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 @@ -897,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'); @@ -911,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; } @@ -924,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; @@ -935,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"; } @@ -975,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); @@ -1034,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')); } @@ -1057,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); @@ -1083,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 @@ -1095,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; @@ -1120,25 +1194,24 @@ if (!defined('NOREQUIREMENU')) // Functions -if (!function_exists("llxHeader")) -{ +if (!function_exists("llxHeader")) { /** * Show HTML header HTML + BODY + Top menu + left menu + DIV * - * @param string $head Optionnal head lines - * @param string $title HTML title - * @param string $help_url Url links to help page - * Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage - * For other external page: http://server/url - * @param string $target Target to use on links - * @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 - * @param string $morequerystring Query string to add to the link "print" to get same parameters (use only if autodetect fails) - * @param string $morecssonbody More CSS on body tag. - * @param string $replacemainareaby Replace call to main_area() by a print of this string - * @param int $disablenofollow Disable the "nofollow" on page + * @param string $head Optionnal head lines + * @param string $title HTML title + * @param string $help_url Url links to help page + * Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage + * For other external page: http://server/url + * @param string $target Target to use on links + * @param int $disablejs More content into html header + * @param int $disablehead More content into html header + * @param array|string $arrayofjs Array of complementary js files + * @param array|string $arrayofcss Array of complementary css files + * @param string $morequerystring Query string to add to the link "print" to get same parameters (use only if autodetect fails) + * @param string $morecssonbody More CSS on body tag. For example 'classforhorizontalscrolloftabs'. + * @param string $replacemainareaby Replace call to main_area() by a print of this string + * @param int $disablenofollow Disable the "nofollow" on page * @return void */ function llxHeader($head = '', $title = '', $help_url = '', $target = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $morequerystring = '', $morecssonbody = '', $replacemainareaby = '', $disablenofollow = 0) @@ -1150,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)) { @@ -1163,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; } @@ -1185,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 @@ -1195,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 @@ -1213,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', ...: @@ -1233,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 @@ -1263,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"; @@ -1289,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"; @@ -1309,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"; @@ -1375,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; @@ -1390,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"; @@ -1481,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'; @@ -1498,7 +1627,8 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr // To use external ckeditor 4 js lib $pathckeditor = constant('JS_CKEDITOR'); } - print '<script><!-- enable ckeditor by main.inc.php -->'; + print '<script>'; + 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"; @@ -1506,8 +1636,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr print '</script>'."\n"; print '<script src="'.$pathckeditor.$jsckeditor.($ext ? '?'.$ext : '').'"></script>'."\n"; print '<script>'; - if (GETPOST('mode', 'aZ09') == 'Full_inline') - { + if (GETPOST('mode', 'aZ09') == 'Full_inline') { print 'CKEDITOR.disableAutoInline = false;'."\n"; } else { print 'CKEDITOR.disableAutoInline = true;'."\n"; @@ -1516,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"; } @@ -1533,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"; @@ -1562,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 @@ -1607,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); @@ -1636,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">'; @@ -1672,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 { @@ -1684,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>'; @@ -1694,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; @@ -1713,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 = ''; @@ -1735,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); } @@ -1810,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">'; + } } @@ -1828,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" >'; @@ -1849,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 @@ -1863,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'); @@ -1871,18 +2026,29 @@ function top_menu_user($hideloginname = 0, $urllogout = '') $dropdownBody .= '<br><b>'.$langs->trans("CurrentMenuManager").':</b> '.$menumanager->name; $langFlag = picto_from_langcode($langs->getDefaultLang()); $dropdownBody .= '<br><b>'.$langs->trans("CurrentUserLanguage").':</b> '.($langFlag ? $langFlag.' ' : '').$langs->getDefaultLang(); + + $tz = (int) $_SESSION['dol_tz'] + (int) $_SESSION['dol_dst']; + $dropdownBody .= '<br><b>'.$langs->trans("ClientTZ").':</b> '.($tz ? ($tz >= 0 ? '+' : '').$tz : ''); + $dropdownBody .= ' ('.$_SESSION['dol_tz_string'].')'; + //$dropdownBody .= ' &nbsp; &nbsp; &nbsp; '.$langs->trans("DaylingSavingTime").': '; + //if ($_SESSION['dol_dst'] > 0) $dropdownBody .= yn(1); + //else $dropdownBody .= yn(0); + $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 { @@ -1905,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 --> @@ -1927,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> @@ -1961,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> @@ -1984,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(); });'; @@ -2106,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 --> @@ -2119,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 --> @@ -2229,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"); @@ -2309,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']; } @@ -2435,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; @@ -2470,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)) { @@ -2505,37 +2692,55 @@ 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'; @@ -2574,10 +2779,11 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_ // Execute hook printBugtrackInfo $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"); @@ -2605,7 +2811,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); + } } @@ -2619,23 +2827,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"; @@ -2647,9 +2857,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"; @@ -2672,8 +2888,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; @@ -2681,20 +2896,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'; } @@ -2727,7 +2945,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.'"'; @@ -2745,8 +2965,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. @@ -2771,16 +2990,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]); @@ -2791,18 +3011,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->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]); @@ -2810,11 +3037,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 { @@ -2830,55 +3055,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"; @@ -2887,19 +3117,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) { @@ -2907,64 +3134,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 9c8ff72681b..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) { @@ -106,6 +113,7 @@ $titre = $langs->trans("Margins"); $picto = 'margin'; print '<form method="post" name="sel" action="'.$_SERVER['PHP_SELF'].'">'; +print '<input type="hidden" name="token" value="'.newToken().'">'; print dol_get_fiche_head($head, 'agentMargins', $titre, 0, $picto); @@ -113,7 +121,7 @@ print '<table class="border centpercent">'; print '<tr><td class="titlefield">'.$langs->trans('ContactOfInvoice').'</td>'; print '<td class="maxwidthonsmartphone" colspan="4">'; -print $form->select_dolusers($agentid, 'agentid', 1, '', $user->rights->margins->read->all ? 0 : 1, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); +print img_picto('', 'user').$form->select_dolusers($agentid, 'agentid', 1, '', $user->rights->margins->read->all ? 0 : 1, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); print '</td></tr>'; // Start date @@ -153,23 +161,33 @@ $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"; -if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1) $sql .= " AND d.buy_price_ht <> 0"; +// 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 ($agentid > 0) $sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client, u.rowid, u.login, u.lastname, u.firstname"; //else $sql.= " GROUP BY u.rowid, u.login, u.lastname, u.firstname"; $sql .= " GROUP BY s.rowid, s.nom, s.code_client, s.client, u.rowid, u.login, u.lastname, u.firstname"; @@ -179,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 = ''; @@ -212,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) { @@ -255,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); @@ -291,17 +326,44 @@ 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); @@ -310,9 +372,10 @@ $db->free($result); print "\n".'<script type="text/javascript"> $(document).ready(function() { - $("#agentid").change(function() { - $("div.fiche form").submit(); - }); + 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"; 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 0a015f0f73d..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); @@ -87,6 +97,7 @@ $picto = 'margin'; print '<form method="post" name="sel" action="'.$_SERVER['PHP_SELF'].'">'; +print '<input type="hidden" name="token" value="'.newToken().'">'; print dol_get_fiche_head($head, 'customerMargins', $titre, 0, $picto); @@ -97,31 +108,34 @@ 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 $form->select_company($socid, 'socid', '(client=1 OR client=3)', 1, 0, 0); + 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>'; print '<td class="maxwidthonsmartphone" colspan="4">'; - print $form->select_company(null, 'socid', '(client=1 OR client=3)', 1, 0, 0); + print img_picto('', 'company').$form->select_company(null, 'socid', '(client=1 OR client=3)', 1, 0, 0); print '</td></tr>'; } $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 { @@ -138,16 +152,16 @@ foreach ($TRes as $prod) { $TProducts[$prod['key']] = $prod['label']; } -print '<tr><td class="titlefield">'.$langs->trans('ChooseProduct/Service').'</td>'; +print '<tr><td class="titlefield">'.$langs->trans('ProductOrService').'</td>'; print '<td class="maxwidthonsmartpone" colspan="4">'; -print $form->multiselectarray('products', $TProducts, $TSelectedProducts, 0, 0, 'minwidth500'); +print img_picto('', 'product').$form->multiselectarray('products', $TProducts, $TSelectedProducts, 0, 0, 'minwidth500'); print '</td></tr>'; // Categories $TCats = $form->select_all_categories(0, array(), '', 64, 0, 1); print '<tr>'; -print '<td class="titlefield">'.$langs->trans('ChooseCategory').'</td>'; +print '<td class="titlefield">'.$langs->trans('Category').'</td>'; print '<td class="maxwidthonsmartphone" colspan="4">'; print img_picto('', 'category').$form->multiselectarray('categories', $TCats, $TSelectedCats, 0, 0, 'quatrevingtpercent widthcentpercentminusx'); print '</td>'; @@ -201,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,"; @@ -213,47 +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"; -if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1) -$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"; +// 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_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 = ''; @@ -263,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 { @@ -303,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++; @@ -343,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); @@ -365,14 +402,10 @@ $db->free($result); print '<script type="text/javascript"> $(document).ready(function() { - /* - $("#socid").change(function() { - $("div.fiche form").submit(); - });*/ - - $("#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 46f128b2f36..f18cc4ee503 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); @@ -99,31 +105,23 @@ $titre = $langs->trans("Margins"); $picto = 'margin'; print '<form method="post" name="sel" action="'.$_SERVER['PHP_SELF'].'">'; +print '<input type="hidden" name="token" value="'.newToken().'">'; print dol_get_fiche_head($head, 'productMargins', $titre, 0, $picto); print '<table class="border centpercent">'; -if ($id > 0) { - print '<tr><td class="titlefield">'.$langs->trans('ChooseProduct/Service').'</td>'; - print '<td class="maxwidthonsmartpone" colspan="4">'; - $form->select_produits($id, 'id', '', 20, 0, 1, 2, '', 1, array(), 0, 'All'); - print '</td></tr>'; - - if (!$sortorder) $sortorder = "DESC"; - if (!$sortfield) $sortfield = "f.datef"; -} else { - print '<tr><td class="titlefield">'.$langs->trans('ChooseProduct/Service').'</td>'; - print '<td class="maxwidthonsmartphone" colspan="4">'; - $form->select_produits('', 'id', '', 20, 0, 1, 2, '', 1, array(), 0, 'All'); - print '</td></tr>'; -} +// Product +print '<tr><td class="titlefield">'.$langs->trans('ProductOrService').'</td>'; +print '<td class="maxwidthonsmartphone" colspan="4">'; +print img_picto('', 'product').$form->select_produits(($id > 0 ? $id : ''), 'id', '', 20, 0, 1, 2, '', 1, array(), 0, 'All', 0, '', 0, '', null, 1); +print '</td></tr>'; // Categories $TCats = $form->select_all_categories(0, array(), '', 64, 0, 1); print '<tr>'; -print '<td class="titlefield">'.$langs->trans('ChooseCategory').'</td>'; +print '<td class="titlefield">'.$langs->trans('Category').'</td>'; print '<td class="maxwidthonsmartphone" colspan="4">'; print img_picto('', 'category').$form->multiselectarray('categories', $TCats, $TSelectedCats, 0, 0, 'quatrevingtpercent widthcentpercentminusx'); print '</td>'; @@ -177,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,"; @@ -193,40 +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) +if ($id > 0) { $sql .= " AND d.fk_product =".$id; -if (!empty($TSelectedCats)) { - $sql .= ' AND cp.fk_categorie IN ('.implode(',', $TSelectedCats).')'; } -if (!empty($startdate)) - $sql .= " AND f.datef >= '".$db->idate($startdate)."'"; -if (!empty($enddate)) - $sql .= " AND f.datef <= '".$db->idate($enddate)."'"; +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)."'"; +} $sql .= " AND d.buy_price_ht IS NOT NULL"; -if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1) +// 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 = ''; @@ -236,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 { @@ -285,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; @@ -300,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++; @@ -325,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>"; @@ -350,15 +365,10 @@ $db->free($result); print ' <script type="text/javascript"> $(document).ready(function() { - - $("#id").change(function() { - $("div.fiche form").submit(); - }); - + 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/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 5fcec11c93b..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,18 +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"; - if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1) $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"; + // 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_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); @@ -177,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"; @@ -209,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++; @@ -225,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 { @@ -239,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 bfa5ac15811..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 @@ -163,16 +174,19 @@ if ($socid > 0) $sql .= " AND d.fk_facture = f.rowid"; $sql .= " AND f.fk_soc = $socid"; $sql .= " AND d.buy_price_ht IS NOT NULL"; - if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1) $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"; + // 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_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, ''); @@ -187,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) : ''; @@ -222,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++; @@ -237,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 { @@ -252,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 fba9b0d4855..572fff42369 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('ModuleBuilderNotAllowed'); -if (!$user->admin && empty($conf->global->MODULEBUILDER_FOREVERYONE)) accessforbidden('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,20 +230,22 @@ 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'); } // Delete dir and files that can be generated in sub tabs later if we need them (we want a minimal module first) dol_delete_dir_recursive($destdir.'/build/doxygen'); dol_delete_dir_recursive($destdir.'/core/modules/mailings'); + dol_delete_dir_recursive($destdir.'/core/modules/'.strtolower($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'); + dol_delete_file($destdir.'/sql/data.sql'); dol_delete_file($destdir.'/sql/update_x.x.x-y.y.y.sql'); @@ -271,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), @@ -290,39 +302,45 @@ 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)) -{ +if ($dirins && $action == 'initapi' && !empty($module)) { $modulename = ucfirst($module); // Force first letter in uppercase $objectname = $tabobj; @@ -333,8 +351,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), @@ -357,8 +374,7 @@ if ($dirins && $action == 'initapi' && !empty($module)) setEventMessages($langs->trans('ErrorFailToCreateFile', $destfile), null, 'errors'); } } -if ($dirins && $action == 'initphpunit' && !empty($module)) -{ +if ($dirins && $action == 'initphpunit' && !empty($module)) { $modulename = ucfirst($module); // Force first letter in uppercase $objectname = $tabobj; @@ -368,8 +384,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), @@ -407,8 +422,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']); @@ -436,8 +450,7 @@ if ($dirins && $action == 'initsqlextrafields' && !empty($module)) { } // TODO Enable in class the property $isextrafieldmanaged = 1 } -if ($dirins && $action == 'inithook' && !empty($module)) -{ +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'; @@ -445,8 +458,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']); @@ -468,8 +480,7 @@ if ($dirins && $action == 'inithook' && !empty($module)) setEventMessages($langs->trans('ErrorFailToCreateFile', $destfile), null, 'errors'); } } -if ($dirins && $action == 'inittrigger' && !empty($module)) -{ +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'; @@ -477,8 +488,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']); @@ -500,8 +510,7 @@ if ($dirins && $action == 'inittrigger' && !empty($module)) setEventMessages($langs->trans('ErrorFailToCreateFile', $destfile), null, 'errors'); } } -if ($dirins && $action == 'initwidget' && !empty($module)) -{ +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'; @@ -531,8 +540,7 @@ if ($dirins && $action == 'initwidget' && !empty($module)) setEventMessages($langs->trans('ErrorFailToCreateFile', $destfile), null, 'errors'); } } -if ($dirins && $action == 'initcss' && !empty($module)) -{ +if ($dirins && $action == 'initcss' && !empty($module)) { dol_mkdir($dirins.'/'.strtolower($module).'/css'); $srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template'; $srcfile = $srcdir.'/css/mymodule.css.php'; @@ -540,8 +548,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']); @@ -569,8 +576,7 @@ if ($dirins && $action == 'initcss' && !empty($module)) } } -if ($dirins && $action == 'initjs' && !empty($module)) -{ +if ($dirins && $action == 'initjs' && !empty($module)) { dol_mkdir($dirins.'/'.strtolower($module).'/js'); $srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template'; $srcfile = $srcdir.'/js/mymodule.js.php'; @@ -578,8 +584,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']); @@ -606,8 +611,7 @@ if ($dirins && $action == 'initjs' && !empty($module)) setEventMessages($langs->trans('ErrorFailToCreateFile', $destfile), null, 'errors'); } } -if ($dirins && $action == 'initcli' && !empty($module)) -{ +if ($dirins && $action == 'initcli' && !empty($module)) { dol_mkdir($dirins.'/'.strtolower($module).'/scripts'); $srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template'; $srcfile = $srcdir.'/scripts/mymodule.php'; @@ -615,8 +619,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']); @@ -691,19 +694,16 @@ if ($dirins && $action == 'initdoc' && !empty($module)) { } } -if ($dirins && $action == 'addlanguage' && !empty($module)) -{ +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)) -{ +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; @@ -712,11 +712,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); @@ -726,12 +727,10 @@ 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 { /** @@ -747,7 +746,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 @@ -777,66 +776,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; @@ -848,15 +914,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'; @@ -879,15 +943,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'); @@ -896,15 +957,16 @@ if ($dirins && $action == 'initobject' && $module && $objectname) } } - if (!$error) - { + if (!$error) { // Copy some files $filetogenerate = array( 'myobject_card.php'=>strtolower($objectname).'_card.php', 'myobject_note.php'=>strtolower($objectname).'_note.php', + 'myobject_contact.php'=>strtolower($objectname).'_contact.php', 'myobject_document.php'=>strtolower($objectname).'_document.php', 'myobject_agenda.php'=>strtolower($objectname).'_agenda.php', 'myobject_list.php'=>strtolower($objectname).'_list.php', + 'admin/myobject_extrafields.php'=>'admin/'.strtolower($objectname).'_extrafields.php', 'lib/mymodule_myobject.lib.php'=>'lib/'.strtolower($module).'_'.strtolower($objectname).'.lib.php', //'test/phpunit/MyObjectTest.php'=>'test/phpunit/'.strtolower($objectname).'Test.php', 'sql/llx_mymodule_myobject.sql'=>'sql/llx_'.strtolower($module).'_'.strtolower($objectname).'.sql', @@ -917,8 +979,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( @@ -927,8 +988,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'); @@ -938,13 +998,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'); @@ -994,17 +1051,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 @@ -1065,11 +1126,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']); @@ -1089,75 +1148,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; @@ -1170,36 +1225,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); } } @@ -1212,31 +1262,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); @@ -1248,30 +1293,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); @@ -1283,16 +1331,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 @@ -1300,8 +1345,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'); @@ -1312,16 +1356,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); @@ -1332,9 +1373,11 @@ if ($dirins && $action == 'confirm_deleteobject' && $objectname) $filetodelete = array( 'myobject_card.php'=>strtolower($objectname).'_card.php', 'myobject_note.php'=>strtolower($objectname).'_note.php', + 'myobject_contact.php'=>strtolower($objectname).'_contact.php', 'myobject_document.php'=>strtolower($objectname).'_document.php', 'myobject_agenda.php'=>strtolower($objectname).'_agenda.php', 'myobject_list.php'=>strtolower($objectname).'_list.php', + 'admin/myobject_extrafields.php'=>'admin/'.strtolower($objectname).'_extrafields.php', 'lib/mymodule_myobject.lib.php'=>'lib/'.strtolower($module).'_'.strtolower($objectname).'.lib.php', 'test/phpunit/MyObjectTest.php'=>'test/phpunit/'.strtolower($objectname).'Test.php', 'sql/llx_mymodule_myobject.sql'=>'sql/llx_'.strtolower($module).'_'.strtolower($objectname).'.sql', @@ -1353,15 +1396,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'); @@ -1373,8 +1416,7 @@ if ($dirins && $action == 'confirm_deleteobject' && $objectname) } -if ($dirins && $action == 'generatepackage') -{ +if ($dirins && $action == 'generatepackage') { $modulelowercase = strtolower($module); // Dir for module @@ -1386,12 +1428,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()); } @@ -1403,22 +1443,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++; @@ -1432,16 +1471,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'); @@ -1450,39 +1487,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); @@ -1498,32 +1538,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); @@ -1531,16 +1576,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; } @@ -1555,19 +1607,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"); @@ -1582,15 +1636,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; @@ -1600,8 +1651,7 @@ if (!$dirins) $allowfromweb = 0; } } -if ($message) -{ +if ($message) { print $message; } @@ -1614,8 +1664,7 @@ $error = 0; $moduleobj = null; -if (!empty($module) && $module != 'initmodule' && $module != 'deletemodule') -{ +if (!empty($module) && $module != 'initmodule' && $module != 'deletemodule') { $modulelowercase = strtolower($module); $loadclasserrormessage = ''; @@ -1633,8 +1682,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) { @@ -1642,7 +1690,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; @@ -1662,78 +1712,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++; } @@ -1744,10 +1793,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().'">'; @@ -1772,12 +1821,11 @@ if ($module == 'initmodule') print $langs->trans("EnterNameOfModuleToDeleteDesc").'<br><br>'; print '<input type="text" name="module" placeholder="'.dol_escape_htmltag($langs->trans("ModuleKey")).'" value="">'; - print '<input type="submit" class="buttonDelete" value="'.$langs->trans("Delete").'"'.($dirins ? '' : ' disabled="disabled"').'>'; + print '<input type="submit" class="button smallpaddingimp" value="'.$langs->trans("Delete").'"'.($dirins ? '' : ' disabled="disabled"').'>'; print '</form>'; } elseif (!empty($module)) { // Tabs for module - if (!$error) - { + if (!$error) { $dirread = $listofmodules[strtolower($module)]['moduledescriptorrootpath']; $head2 = array(); @@ -1828,6 +1876,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'; @@ -1858,28 +1911,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; } @@ -1905,8 +1951,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">'; @@ -1967,16 +2012,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>'; @@ -1984,16 +2031,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); } @@ -2024,10 +2073,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>'; @@ -2048,8 +2095,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>'; @@ -2087,14 +2133,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>'; @@ -2135,12 +2179,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>'; @@ -2220,8 +2262,7 @@ if ($module == 'initmodule') } } - if ($tab == 'objects') - { + if ($tab == 'objects') { $head3 = array(); $h = 0; @@ -2237,17 +2278,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; @@ -2262,16 +2307,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().'">'; @@ -2309,23 +2355,26 @@ if ($module == 'initmodule') print $langs->trans("EnterNameOfObjectToDeleteDesc").'<br><br>'; print '<input type="text" name="objectname" value="'.dol_escape_htmltag($modulename).'" placeholder="'.dol_escape_htmltag($langs->trans("ObjectKey")).'">'; - print '<input type="submit" class="buttonDelete" name="delete" value="'.dol_escape_htmltag($langs->trans("Delete")).'"'.($dirins ? '' : ' disabled="disabled"').'>'; + print '<input type="submit" class="button smallpaddingimp" name="delete" value="'.dol_escape_htmltag($langs->trans("Delete")).'"'.($dirins ? '' : ' disabled="disabled"').'>'; 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']; @@ -2336,6 +2385,7 @@ if ($module == 'initmodule') $pathtodocument = strtolower($module).'/'.strtolower($tabobj).'_document.php'; $pathtolist = strtolower($module).'/'.strtolower($tabobj).'_list.php'; $pathtonote = strtolower($module).'/'.strtolower($tabobj).'_note.php'; + $pathtocontact = strtolower($module).'/'.strtolower($tabobj).'_contact.php'; $pathtophpunit = strtolower($module).'/test/phpunit/'.strtolower($tabobj).'Test.php'; $pathtosql = strtolower($module).'/sql/llx_'.strtolower($module).'_'.strtolower($tabobj).'.sql'; $pathtosqlextra = strtolower($module).'/sql/llx_'.strtolower($module).'_'.strtolower($tabobj).'_extrafields.sql'; @@ -2354,6 +2404,7 @@ if ($module == 'initmodule') $realpathtodocument = $dirread.'/'.$pathtodocument; $realpathtolist = $dirread.'/'.$pathtolist; $realpathtonote = $dirread.'/'.$pathtonote; + $realpathtocontact = $dirread.'/'.$pathtocontact; $realpathtophpunit = $dirread.'/'.$pathtophpunit; $realpathtosql = $dirread.'/'.$pathtosql; $realpathtosqlextra = $dirread.'/'.$pathtosqlextra; @@ -2364,8 +2415,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; } @@ -2377,34 +2427,30 @@ if ($module == 'initmodule') print ' <a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=editfile&format=php&file='.urlencode($pathtoclass).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>'; print '<br>'; print '<span class="fa fa-file-o"></span> '.$langs->trans("ApiClassFile").' : <strong>'.($realpathtoapi ? '' : '<strike>').$pathtoapi.($realpathtoapi ? '' : '</strike>').'</strong>'; - if ($realpathtoapi) - { + 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="#" 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 buttongen" value="'.$langs->trans("Generate").'"></a>'; + 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>'; } // PHPUnit print '<br>'; print '<span class="fa fa-file-o"></span> '.$langs->trans("TestClassFile").' : <strong>'.($realpathtophpunit ? '' : '<strike>').$pathtophpunit.($realpathtophpunit ? '' : '</strike>').'</strong>'; - - if ($realpathtophpunit) - { + if (dol_is_file($realpathtophpunit)) { print ' <a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=editfile&format=php&file='.urlencode($pathtophpunit).'">'.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($pathtophpunit).'">'.img_picto($langs->trans("Delete"), 'delete').'</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=initphpunit&format=php&file='.urlencode($pathtophpunit).'"><input type="button" class="button buttongen" value="'.$langs->trans("Generate").'"></a>'; + print '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=initphpunit&format=php&file='.urlencode($pathtophpunit).'"><input type="button" class="button smallpaddingimp" value="'.$langs->trans("Generate").'"></a>'; } print '<br>'; @@ -2431,24 +2477,24 @@ if ($module == 'initmodule') //print ' &nbsp; <a href="'.$_SERVER["PHP_SELF"].'">'.$langs->trans("RunSql").'</a>'; print '<br>'; print '<span class="fa fa-file-o"></span> '.$langs->trans("SqlFileExtraFields").' : <strong>'.($realpathtosqlextra ? '' : '<strike>').$pathtosqlextra.($realpathtosqlextra ? '' : '</strike>').'</strong>'; - if ($realpathtosqlextra) - { + if (dol_is_file($realpathtosqlextra) && dol_is_file($realpathtosqlextrakey)) { print ' <a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=editfile&file='.urlencode($pathtosqlextra).'">'.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($pathtosqlextra).'">'.img_picto($langs->trans("Delete"), 'delete').'</a>'; print ' &nbsp; '; print '<a class="reposition editfielda" href="'.$_SERVER["PHP_SELF"].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=droptableextrafields">'.$langs->trans("DropTableIfEmpty").'</a>'; } else { - print '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=initsqlextrafields&format=sql&file='.urlencode($pathtosqlextra).'"><input type="button" class="button buttongen" value="'.$langs->trans("Generate").'"></a>'; + print '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=initsqlextrafields&format=sql&file='.urlencode($pathtosqlextra).'"><input type="button" class="button smallpaddingimp" value="'.$langs->trans("Generate").'"></a>'; } //print ' &nbsp; <a href="'.$_SERVER["PHP_SELF"].'">'.$langs->trans("RunSql").'</a>'; print '<br>'; print '<span class="fa fa-file-o"></span> '.$langs->trans("SqlFileKeyExtraFields").' : <strong>'.($realpathtosqlextrakey ? '' : '<strike>').$pathtosqlextrakey.($realpathtosqlextrakey ? '' : '</strike>').'</strong>'; - if ($realpathtosqlextrakey) - { + if (dol_is_file($realpathtosqlextra) && dol_is_file($realpathtosqlextrakey)) { print ' <a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=editfile&format=sql&file='.urlencode($pathtosqlextrakey).'">'.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($pathtosqlextrakey).'">'.img_picto($langs->trans("Delete"), 'delete').'</a>'; + } else { + print '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=initsqlextrafields&format=sql&file='.urlencode($pathtosqlextra).'"><input type="button" class="button smallpaddingimp" value="'.$langs->trans("Generate").'"></a>'; } //print ' &nbsp; <a href="'.$_SERVER["PHP_SELF"].'">'.$langs->trans("RunSql").'</a>'; print '<br>'; @@ -2463,30 +2509,34 @@ if ($module == 'initmodule') print '<span class="fa fa-file-o"></span> '.$langs->trans("PageForCreateEditView").' : <strong><a href="'.$urlofcard.'?action=create" target="_test">'.($realpathtocard ? '' : '<strike>').$pathtocard.($realpathtocard ? '' : '</strike>').'?action=create</a></strong>'; print ' <a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=editfile&format=php&file='.urlencode($pathtocard).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>'; print '<br>'; - print '<span class="fa fa-file-o"></span> '.$langs->trans("PageForAgendaTab").' : <strong>'.($realpathtoagenda ? '' : '<strike>').$pathtoagenda.($realpathtoagenda ? '' : '</strike>').'</strong>'; - print ' <a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=editfile&format=php&file='.urlencode($pathtoagenda).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>'; - if ($realpathtoagenda) - { + print '<span class="fa fa-file-o"></span> '.$langs->trans("PageForContactTab").' : <strong>'.($realpathtocontact ? '' : '<strike>').$pathtocontact.($realpathtocontact ? '' : '</strike>').'</strong>'; + print ' <a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=editfile&format=php&file='.urlencode($pathtocontact).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>'; + if (dol_is_file($realpathtocontact)) { print ' '; - print '<a class="reposition editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=confirm_removefile&file='.urlencode($pathtoagenda).'">'.img_picto($langs->trans("Delete"), 'delete').'</a>'; + print '<a class="reposition editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=confirm_removefile&file='.urlencode($pathtocontact).'">'.img_picto($langs->trans("Delete"), 'delete').'</a>'; } print '<br>'; print '<span class="fa fa-file-o"></span> '.$langs->trans("PageForDocumentTab").' : <strong>'.($realpathtodocument ? '' : '<strike>').$pathtodocument.($realpathtodocument ? '' : '</strike>').'</strong>'; print ' <a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=editfile&format=php&file='.urlencode($pathtodocument).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>'; - if ($realpathtodocument) - { + if (dol_is_file($realpathtodocument)) { print ' '; print '<a class="reposition editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=confirm_removefile&file='.urlencode($pathtodocument).'">'.img_picto($langs->trans("Delete"), 'delete').'</a>'; } print '<br>'; print '<span class="fa fa-file-o"></span> '.$langs->trans("PageForNoteTab").' : <strong>'.($realpathtonote ? '' : '<strike>').$pathtonote.($realpathtonote ? '' : '</strike>').'</strong>'; print ' <a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=editfile&format=php&file='.urlencode($pathtonote).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>'; - if ($realpathtonote) - { + if (dol_is_file($realpathtonote)) { print ' '; print '<a class="reposition editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=confirm_removefile&file='.urlencode($pathtonote).'">'.img_picto($langs->trans("Delete"), 'delete').'</a>'; } print '<br>'; + print '<span class="fa fa-file-o"></span> '.$langs->trans("PageForAgendaTab").' : <strong>'.($realpathtoagenda ? '' : '<strike>').$pathtoagenda.($realpathtoagenda ? '' : '</strike>').'</strong>'; + print ' <a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=editfile&format=php&file='.urlencode($pathtoagenda).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>'; + if (dol_is_file($realpathtoagenda)) { + print ' '; + print '<a class="reposition editfielda" href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=confirm_removefile&file='.urlencode($pathtoagenda).'">'.img_picto($langs->trans("Delete"), 'delete').'</a>'; + } + print '<br>'; /* This is already on Tab CLI print '<br>'; @@ -2500,26 +2550,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 @@ -2533,8 +2581,7 @@ if ($module == 'initmodule') print '<input type="hidden" name="module" value="'.dol_escape_htmltag($module.($forceddirread ? '@'.$dirread : '')).'">'; print '<input type="hidden" name="tabobj" value="'.dol_escape_htmltag($tabobj).'">'; - print '<input class="button buttongen" type="submit" name="regenerateclasssql" value="'.$langs->trans("RegenerateClassAndSql").'">'; - //print '<input class="button buttongen" type="submit" name="regeneratemissing" value="'.$langs->trans("RegenerateMissingFiles").'">'; + print '<input class="button smallpaddingimp" type="submit" name="regenerateclasssql" value="'.$langs->trans("RegenerateClassAndSql").'">'; print '<br><br>'; print load_fiche_titre($langs->trans("ObjectProperties"), '', ''); @@ -2563,6 +2610,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>'; @@ -2575,8 +2623,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>'; @@ -2595,6 +2642,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>'; @@ -2604,8 +2652,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) { @@ -2636,6 +2683,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']; @@ -2649,90 +2697,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>'; @@ -2775,13 +2888,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; @@ -2814,14 +2925,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>'; @@ -2860,10 +2969,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>'; @@ -2917,7 +3024,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>'; @@ -2950,14 +3057,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>'; @@ -2988,10 +3093,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>'; @@ -3046,10 +3149,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>'; @@ -3065,15 +3166,14 @@ 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> '; print '<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>'; } else { print '<span class="opacitymedium">'.$langs->trans("FileNotYetGenerated").'</span>'; - print '<a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=inithook&format=php&file='.urlencode($pathtohook).'"><input type="button" class="button buttongen" value="'.$langs->trans("Generate").'"></a></td>'; + print '<a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=inithook&format=php&file='.urlencode($pathtohook).'"><input type="button" class="button smallpaddingimp" value="'.$langs->trans("Generate").'"></a></td>'; print '<td></td>'; } print '</tr>'; @@ -3103,15 +3203,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>'; @@ -3124,10 +3222,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>'; @@ -3139,7 +3235,7 @@ if ($module == 'initmodule') } else { print '<tr><td>'; print '<span class="fa fa-file-o"></span> '.$langs->trans("NoTrigger"); - print '<a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=inittrigger&format=php"><input type="button" class="button buttongen" value="'.$langs->trans("Generate").'"></a></td>'; + print '<a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=inittrigger&format=php"><input type="button" class="button smallpaddingimp" value="'.$langs->trans("Generate").'"></a></td>'; print '<td></td>'; print '</tr>'; } @@ -3171,10 +3267,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>'; @@ -3183,14 +3277,13 @@ 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>'; } else { print '<span class="opacitymedium">'.$langs->trans("FileNotYetGenerated").'</span>'; - print '</td><td><a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=initcss&format=php&file='.urlencode($pathtohook).'"><input type="button" class="button buttongen" value="'.$langs->trans("Generate").'"></a></td>'; + print '</td><td><a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=initcss&format=php&file='.urlencode($pathtohook).'"><input type="button" class="button smallpaddingimp" value="'.$langs->trans("Generate").'"></a></td>'; } print '</tr>'; } else { @@ -3219,10 +3312,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>'; @@ -3231,14 +3322,13 @@ 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>'; } else { print '<span class="opacitymedium">'.$langs->trans("FileNotYetGenerated").'</span>'; - print '</td><td><a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=initjs&format=php&file='.urlencode($pathtohook).'"><input type="button" class="button buttongen" value="'.$langs->trans("Generate").'"></a></td>'; + print '</td><td><a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=initjs&format=php&file='.urlencode($pathtohook).'"><input type="button" class="button smallpaddingimp" value="'.$langs->trans("Generate").'"></a></td>'; } print '</tr>'; } else { @@ -3267,22 +3357,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>'; @@ -3292,7 +3378,7 @@ if ($module == 'initmodule') } } else { print '<tr><td><span class="fa fa-file-o"></span> '.$langs->trans("NoWidget"); - print '</td><td><a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=initwidget&format=php"><input type="button" class="button buttongen" value="'.$langs->trans("Generate").'"></a>'; + print '</td><td><a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=initwidget&format=php"><input type="button" class="button smallpaddingimp" value="'.$langs->trans("Generate").'"></a>'; print '</td></tr>'; } print '</table>'; @@ -3322,29 +3408,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; @@ -3355,16 +3479,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>'; @@ -3374,7 +3495,7 @@ if ($module == 'initmodule') } } else { print '<tr><td><span class="fa fa-file-o"></span> '.$langs->trans("NoCLIFile"); - print '</td><td><a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=initcli&format=php"><input type="button" class="button buttongen" value="'.$langs->trans("Generate").'"></a>'; + print '</td><td><a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=initcli&format=php"><input type="button" class="button smallpaddingimp" value="'.$langs->trans("Generate").'"></a>'; print '</td></tr>'; } print '</table>'; @@ -3404,15 +3525,13 @@ if ($module == 'initmodule') } } - if ($tab == 'cron') - { + if ($tab == 'cron') { $pathtofile = $listofmodules[strtolower($module)]['moduledescriptorrelpath']; $cronjobs = $moduleobj->cronjobs; - if ($action != 'editfile' || empty($file)) - { - print '<span class="opacitymedium">'.$langs->trans("CronJobDefDesc", '<a href="'.DOL_URL_ROOT.'/cron/list.php">'.$langs->transnoentities('CronList').'</a>').'</span><br>'; + 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>'; print '<span class="fa fa-file-o"></span> '.$langs->trans("DescriptorFile").' : <strong>'.$pathtofile.'</strong>'; @@ -3440,10 +3559,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>'; @@ -3451,8 +3568,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>'; @@ -3460,8 +3576,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']; @@ -3471,10 +3586,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>'; @@ -3482,7 +3605,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>'; @@ -3521,23 +3646,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>'; @@ -3547,7 +3670,7 @@ if ($module == 'initmodule') } else { print '<tr><td>'; print '<span class="fa fa-file-o"></span> '.$langs->trans("FileNotYetGenerated"); - print '</td><td><a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=initdoc&format=php"><input type="button" class="button buttongen" value="'.$langs->trans("Generate").'"></a></td>'; + print '</td><td><a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread ? '@'.$dirread : '').'&action=initdoc&format=php"><input type="button" class="button smallpaddingimp" value="'.$langs->trans("Generate").'"></a></td>'; print '</tr>'; } print '</table>'; @@ -3591,8 +3714,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; @@ -3604,8 +3728,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; @@ -3623,18 +3748,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>'; } @@ -3649,8 +3774,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) { @@ -3665,8 +3789,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; } @@ -3674,8 +3797,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').')'; @@ -3693,8 +3817,7 @@ if ($module == 'initmodule') print '</form>'; } - if ($tab != 'description') - { + if ($tab != 'description') { print dol_get_fiche_end(); } } diff --git a/htdocs/modulebuilder/template/README.md b/htdocs/modulebuilder/template/README.md index c3afa63e1b7..45c5e4b51eb 100644 --- a/htdocs/modulebuilder/template/README.md +++ b/htdocs/modulebuilder/template/README.md @@ -2,17 +2,17 @@ ## Features -Description... +Description of the module... <!-- ![Screenshot mymodule](img/screenshot_mymodule.png?raw=true "MyModule"){imgmd} --> -Other modules are available on [Dolistore.com](https://www.dolistore.com). +Other external modules are available on [Dolistore.com](https://www.dolistore.com). ## Translations -Translations can be define manually by editing files into directories *langs*. +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. 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 c844f80e4cc..cd2125547e8 100644 --- a/htdocs/modulebuilder/template/admin/myobject_extrafields.php +++ b/htdocs/modulebuilder/template/admin/myobject_extrafields.php @@ -26,9 +26,36 @@ * \brief Page to setup extra fields of myobject */ -require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/bom.lib.php'; +// 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/mymodule.lib.php'; // Load translation files required by the page $langs->loadLangs(array('mymodule@mymodule', 'admin')); @@ -39,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(); +} /* @@ -78,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>"; @@ -89,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')); @@ -100,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 c7cc61171a7..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,28 +92,27 @@ $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 +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 { @@ -131,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); @@ -151,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'; @@ -207,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">'; @@ -216,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>'; @@ -232,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>'; @@ -264,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 @@ -284,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'; @@ -304,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"; @@ -321,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).'">'; @@ -348,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>'; } @@ -387,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++; @@ -413,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); @@ -445,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'); @@ -486,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; @@ -502,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 05ca7f27d16..da616de0d82 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)) { @@ -203,7 +214,7 @@ class MyModuleApi extends DolibarrApi foreach ($request_data as $field => $value) { $this->myobject->$field = $value; } - if (!$this->myobject->create(DolibarrApiAccess::$user)) { + if ($this->myobject->create(DolibarrApiAccess::$user)<0) { throw new RestException(500, "Error creating MyObject", array_merge(array($this->myobject->error), $this->myobject->errors)); } return $this->myobject->id; @@ -236,12 +247,13 @@ 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) - { + if ($this->myobject->update(DolibarrApiAccess::$user, false) > 0) { return $this->get($id); } else { throw new RestException(500, $this->myobject->error); @@ -272,8 +284,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 +349,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 +372,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 a15f0f67fe9..2c96190e232 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -70,7 +70,7 @@ class MyObject extends CommonObject /** - * 'type' if the field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', '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. * 'picto' is code of a picto to show before value in forms @@ -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; } @@ -697,7 +703,7 @@ class MyObject extends CommonObject return -1; }*/ - return $this->setStatusCommon($user, self::STATUS_CANCELED, $notrigger, 'MYOBJECT_CLOSE'); + return $this->setStatusCommon($user, self::STATUS_CANCELED, $notrigger, 'MYOBJECT_CANCEL'); } /** @@ -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 e356792ed42..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,12 +206,12 @@ 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) { // You may make your own code here… // … or use the parent's class function using the provided head and contents templates - parent::showBox($this->info_box_head, $this->info_box_contents); + return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput); } } 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 4917074dad0..d212e10998e 100644 --- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php +++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php @@ -46,23 +46,31 @@ class modMyModule extends DolibarrModules // 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 = 'mymodule'; + // 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 = "other"; + // 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 'ModuleMyModuleName' not found (MyModule is name of module). $this->name = preg_replace('/^mod/i', '', get_class($this)); + // Module description, used if translation string 'ModuleMyModuleDesc' not found (MyModule is name of module). $this->description = "MyModuleDescription"; // Used only if file README.md and README-LL.md not found. - $this->descriptionlong = "MyModule description (Long)"; + $this->descriptionlong = "MyModuleDescription"; + + // 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 = '1.0'; // Url to the file with your last numberversion of this module @@ -70,10 +78,13 @@ class modMyModule 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. // 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) @@ -113,11 +124,14 @@ class modMyModule extends DolibarrModules // 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("/mymodule/temp","/mymodule/subdir"); $this->dirs = array("/mymodule/temp"); + // Config pages. Put here list of php page, stored into mymodule/admin directory, to use to setup module. $this->config_page_url = array("setup.php@mymodule"); + // Dependencies // A condition to hide module $this->hidden = false; @@ -125,9 +139,15 @@ class modMyModule extends DolibarrModules $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("mymodule@mymodule"); - $this->phpmin = array(5, 5); // Minimum version of PHP required by module + + // 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'=>'MyModuleWasAutomaticallyActivatedBecauseOfYourCountryChoice'); @@ -244,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 */ @@ -270,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', @@ -286,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', @@ -390,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'; @@ -412,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 8db58b7ad4e..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,18 +172,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 = ''; + $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); - print dol_get_fiche_head($head, 'agenda', $langs->trans("MyObject"), -1, 'object_'.$object->picto); + print dol_get_fiche_head($head, 'agenda', $langs->trans("MyObject"), -1, $object->picto); // Object card // ------------------------------------------------------------ @@ -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 cc6630c5a01..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,10 +132,10 @@ $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, 'mymodule', $object->id, '', '', 'fk_soc', 'rowid', $isdraft); - -//if (!$permissiontoread) accessforbidden(); +//$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,73 +480,56 @@ 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"; + 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_VALIDATED) { - if ($permissiontoadd) { - print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes">'.$langs->trans("SetToDraft").'</a>'; - } + print dolGetButtonAction($langs->trans('SetToDraft'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes', '', $permissiontoadd); } - // 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"; - } + print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit', '', $permissiontoadd); // Validate 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"); - print '<a class="butActionRefused" href="" title="'.$langs->trans("ErrorAddAtLeastOneLineFirst").'">'.$langs->trans("Validate").'</a>'; - } + 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"); + //print dolGetButtonAction($langs->trans('Validate'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes', '', 0); + print '<a class="butActionRefused" href="" title="'.$langs->trans("ErrorAddAtLeastOneLineFirst").'">'.$langs->trans("Validate").'</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 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"; } } */ // Delete (need delete permission, or if draft, just need create/modify permission) - 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"; - } + print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete', '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)); } print '</div>'."\n"; } @@ -537,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 @@ -577,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 new file mode 100644 index 00000000000..4817efe5e9b --- /dev/null +++ b/htdocs/modulebuilder/template/myobject_contact.php @@ -0,0 +1,213 @@ +<?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 <https://www.gnu.org/licenses/>. + */ + +/** + * \file htdocs/modulebuilder/template/myobject_contact.php + * \ingroup mymodule + * \brief Tab for contacts linked to MyObject + */ + +// 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('/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")); + +$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 MyObject($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->mymodule->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('myobjectcontact', '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, 'mymodule', $object->id); + +$permission = $user->rights->mymodule->myobject->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', 'int')); +} 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('MyObject')." - ".$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 = myobjectPrepareHead($object); + + print dol_get_fiche_head($head, 'contact', $langs->trans("MyObject"), -1, $object->picto); + + $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') . ' : ' . (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/modulebuilder/template/myobject_document.php b/htdocs/modulebuilder/template/myobject_document.php index 7399fa6fb09..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']; } @@ -218,7 +240,7 @@ if ($object->id) //$relativepathwithnofile='myobject/' . dol_sanitizeFileName($object->id).'/'; $relativepathwithnofile = 'myobject/'.dol_sanitizeFileName($object->ref).'/'; - include_once 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/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index 2ed8e4577fa..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) $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. -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 @@ -129,7 +158,7 @@ $arrayfields = array(); 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); + $visible = (int) dol_eval($val['visible'], 1); $arrayfields['t.'.$key] = array( 'label'=>$val['label'], 'checked'=>(($visible < 0) ? 0 : 1), @@ -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 274782a14ea..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'=>'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',), @@ -106,7 +110,7 @@ class Mo extends CommonObject 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>61, 'notnull'=>-1,), 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>62, 'notnull'=>-1,), 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>500, 'notnull'=>1,), - 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'position'=>501, 'notnull'=>-1,), + 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'position'=>501, 'notnull'=>1,), 'date_valid' => array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-2, 'position'=>502,), 'fk_user_creat' => array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'position'=>510, 'notnull'=>1, 'foreignkey'=>'user.rowid',), 'fk_user_modif' => array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'position'=>511, 'notnull'=>-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); @@ -1352,7 +1365,7 @@ class Mo extends CommonObject */ public static function replaceThirdparty($db, $origin_id, $dest_id) { - $tables = array('mrp_production'); + $tables = array('mrp_mo'); return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables); } @@ -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..dd45d306e1f 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'); + +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 01131b9ffa2..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.'">'; @@ -181,7 +186,7 @@ if ($object->id) //$relativepathwithnofile='mo/' . dol_sanitizeFileName($object->id).'/'; $relativepathwithnofile = 'mo/'.dol_sanitizeFileName($object->ref).'/'; - include_once 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/mrp/mo_list.php b/htdocs/mrp/mo_list.php index beeefbd19ff..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.".key($object->fields); // 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..59b4b07fe82 100644 --- a/htdocs/mrp/mo_movements.php +++ b/htdocs/mrp/mo_movements.php @@ -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')); } @@ -236,8 +255,7 @@ $userstatic = new User($db); llxHeader('', $langs->trans('Mo'), ''); // 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 +266,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 +281,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 +321,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 +420,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 +431,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 = ".$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 +486,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 +497,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 +540,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 +556,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 +590,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 +673,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 +707,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 +724,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 +847,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 +888,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 +911,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 09749ae612e..fb597b2e07c 100644 --- a/htdocs/multicurrency/multicurrency_rate.php +++ b/htdocs/multicurrency/multicurrency_rate.php @@ -46,8 +46,10 @@ $confirm = GETPOST('confirm', 'alpha'); $toselect = GETPOST('toselect', 'array'); $id_rate_selected = GETPOST('id_rate', 'int'); $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); +//$search_date_sync = GETPOST('search_date_sync', 'alpha'); $search_date_sync = dol_mktime(0, 0, 0, GETPOST('search_date_syncmonth', 'int'), GETPOST('search_date_syncday', 'int'), GETPOST('search_date_syncyear', 'int')); $search_date_sync_end = dol_mktime(0, 0, 0, GETPOST('search_date_sync_endmonth', 'int'), GETPOST('search_date_sync_endday', 'int'), GETPOST('search_date_sync_endyear', 'int')); + $search_rate = GETPOST('search_rate', 'alpha'); $search_code = GETPOST('search_code', 'alpha'); $multicurrency_code = GETPOST('multicurrency_code', 'alpha'); @@ -76,7 +78,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( @@ -96,11 +100,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); @@ -186,20 +197,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_date_sync_end=""; @@ -216,6 +231,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } + /* * View */ @@ -224,8 +240,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); @@ -305,14 +322,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; } @@ -324,15 +339,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); $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=".$search_date_sync; if ($search_date_sync_end) $param="&search_date_sync_end=".$search_date_sync_end; @@ -342,12 +362,18 @@ if ($resql) // 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">'; @@ -360,9 +386,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>'; } @@ -372,11 +399,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>'; @@ -384,7 +413,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 centpercent liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; @@ -393,23 +424,20 @@ 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 $form->selectDate(dol_print_date($search_date_sync, "%Y-%m-%d"), 'search_date_sync', 0, 0, 1); print $form->selectDate(dol_print_date($search_date_sync_end, "%Y-%m-%d"), 'search_date_sync_end', 0, 0, 1); print '</td>'; } // code - if (!empty($arrayfields['m.code']['checked'])) - { + if (!empty($arrayfields['m.code']['checked'])) { print '<td class="liste_titre" align="left">'; print $form->selectMultiCurrency($multicurrency_code, 'search_code', 1, " code != '".$conf->currency."'", true); 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>'; @@ -428,9 +456,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); @@ -442,8 +476,7 @@ 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">'; @@ -491,11 +524,10 @@ if ($resql) if (! $i) $totalarray['nbfield']++; } - - // Fields from hook - $parameters = ['arrayfields' => $arrayfields, 'obj' => $obj]; - $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; + // Fields from hook + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; // Action print '<td class="nowrap " >'; @@ -503,7 +535,8 @@ if ($resql) { $selected = 0; 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.'&amp;page='.$page.'&amp;sortorder='.$sortorder.'&amp;sortfield='.$sortfield.'&amp;search_code='.$search_code.'&amp;search_rate='.$search_rate.'&amp;search_date_sync='.dol_print_date($search_date_sync, "%Y-%m-%d") .'&amp;search_date_sync_end='.dol_print_date($search_date_sync_end, "%Y-%m-%d") .'&amp;edit_mode='. '1'. '">'.img_picto('edit', 'edit').'</a>'; + $atag = '<a class="editfielda marginleftonly marginrightonly" href="'.$_SERVER["PHP_SELF"].'?action=updateRate&amp;id_rate='.$obj->rowid.'&amp;page='.$page.'&amp;sortorder='.$sortorder.'&amp;sortfield='.$sortfield.'&amp;search_code='.$search_code.'&amp;search_rate='.$search_rate.'&amp;search_date_sync='.dol_print_date($search_date_sync, "%Y-%m-%d") .'&amp;search_date_sync_end='.dol_print_date($search_date_sync_end, "%Y-%m-%d") .'&amp;edit_mode='. '1'. '">'.img_picto('edit', 'edit').'</a>' + print $atag ; 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"' : '').'>'; } @@ -521,8 +554,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 ef583d08ff5..fd9fa3e0456 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -32,7 +32,9 @@ require_once DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php"; // Security check -if (!$user->rights->opensurvey->read) accessforbidden(); +if (empty($user->rights->opensurvey->read)) { + accessforbidden(); +} // Initialisation des variables $action = GETPOST('action', 'aZ09'); @@ -62,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); @@ -81,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'); @@ -128,8 +131,7 @@ if (empty($reshook)) } // Add comment - if (GETPOST('ajoutcomment')) - { + if (GETPOST('ajoutcomment')) { $error = 0; if (!GETPOST('comment')) { @@ -147,8 +149,7 @@ if (empty($reshook)) $resql = $object->addComment($comment, $comment_user); - if (!$resql) - { + if (!$resql) { setEventMessages($langs->trans('ErrorInsertingComment'), null, 'errors'); } } @@ -156,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(); + } } } @@ -177,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); } @@ -193,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')); } @@ -232,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 { @@ -253,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); @@ -279,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>'; @@ -322,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>'; @@ -332,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; '; @@ -346,7 +354,7 @@ print '</form>'."\n"; /* - * Barre d'actions + * Action bar */ print '<div class="tabsAction">'; @@ -354,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>'; } @@ -371,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 6f9a699273b..76e4ffd9023 100644 --- a/htdocs/opensurvey/exportcsv.php +++ b/htdocs/opensurvey/exportcsv.php @@ -30,14 +30,20 @@ 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)) { + accessforbidden(); +} /* @@ -57,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].';'; @@ -69,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].';'; } @@ -87,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 @@ -101,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 { @@ -120,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 0ea701ebf0b..cda1bd81f79 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -31,7 +31,6 @@ */ function opensurvey_prepare_head(Opensurveysondage $object) { - global $langs, $conf; $h = 0; @@ -96,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 50198e5202f..ba608723816 100644 --- a/htdocs/opensurvey/index.php +++ b/htdocs/opensurvey/index.php @@ -31,7 +31,9 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"; $langs->load("opensurvey"); // Security check -if (!$user->rights->opensurvey->read) accessforbidden(); +if (empty($user->rights->opensurvey->read)) { + accessforbidden(); +} $hookmanager = new HookManager($db); @@ -48,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 ea07900ba67..6d12259a39f 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -29,10 +29,10 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"; require_once DOL_DOCUMENT_ROOT."/opensurvey/class/opensurveysondage.class.php"; require_once DOL_DOCUMENT_ROOT."/opensurvey/fonctions.php"; - // Security check -if (!$user->rights->opensurvey->read) accessforbidden(); - +if (empty($user->rights->opensurvey->read)) { + accessforbidden(); +} // Init vars $action = GETPOST('action', 'aZ09'); @@ -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")); @@ -596,7 +591,10 @@ if (GETPOST('ajoutsujet')) } if ($user->rights->opensurvey->write) { - print '<span class="opacitymedium">'.$langs->trans("PollAdminDesc", img_picto('', 'delete'), $langs->trans("Add")).'</span><br>'; + print '<span class="opacitymedium">'; + $s = $langs->trans("PollAdminDesc", '{s1}', $langs->trans("Add")); + print str_replace('{s1}', img_picto('', 'delete'), $s); + print '</span><br>'; } $nbcolonnes = substr_count($object->sujet, ',') + 1; @@ -628,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"; @@ -638,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) { @@ -653,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; } @@ -756,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"; } @@ -776,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; @@ -798,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")).'">'; @@ -926,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); } @@ -966,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]; } } @@ -988,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"; @@ -1041,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") { @@ -1068,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 5ab913f7ce9..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 655d501cac3..dee6476f773 100644 --- a/htdocs/paypal/lib/paypal.lib.php +++ b/htdocs/paypal/lib/paypal.lib.php @@ -82,30 +82,29 @@ 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'; } - dol_syslog("expresscheckout redirect with callSetExpressCheckout $paymentAmount, $currencyCodeType, $paymentType, $returnURL, $cancelURL, $tag, $solutionType, $landingPage, $shipToName, $shipToStreet, $shipToCity, $shipToState, $shipToCountryCode, $shipToZip, $shipToStreet2, $phoneNum"); + dol_syslog("print_paypal_redirect expresscheckout redirect with callSetExpressCheckout $paymentAmount, $currencyCodeType, $paymentType, $returnURL, $cancelURL, $tag, $solutionType, $landingPage, $shipToName, $shipToStreet, $shipToCity, $shipToState, $shipToCountryCode, $shipToZip, $shipToStreet2, $phoneNum"); $resArray = callSetExpressCheckout( $paymentAmount, $currencyCodeType, @@ -127,13 +126,15 @@ function print_paypal_redirect($paymentAmount, $currencyCodeType, $paymentType, $desc ); + 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 $payPalURL = $API_Url.$token; + dol_syslog("Redirect to ".$payPalURL, LOG_INFO); header("Location: ".$payPalURL); exit; } else { @@ -143,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"; @@ -213,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 @@ -255,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 @@ -270,19 +272,17 @@ 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 } $_SESSION["FinalPaymentAmt"] = $paymentAmount; $_SESSION["currencyCodeType"] = $currencyCodeType; $_SESSION["PaymentType"] = $paymentType; // 'Mark', 'Sole' - $_SESSION['ipaddress'] = $_SERVER['REMOTE_ADDR']; // Payer ip + $_SESSION['ipaddress'] = getUserRemoteIP(); // Payer ip //'--------------------------------------------------------------------------------------------------------------- //' Make the API call to PayPal @@ -291,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; } @@ -336,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; @@ -359,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; @@ -378,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; @@ -413,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=" . $_SERVER['REMOTE_ADDR']; - $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; } */ @@ -459,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 { @@ -470,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); @@ -485,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 @@ -504,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 @@ -561,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 @@ -589,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 6cd727d33b8..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 b351b9ec7e1..094ce8670a9 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -16,7 +16,7 @@ * Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com> * Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr> * Copyright (C) 2017 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) 2019-2020 Thibault FOUCART <support@ptibogxiv.net> * Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com> * @@ -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; @@ -289,8 +315,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 +370,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 +415,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 +440,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 +475,12 @@ 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->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 +520,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 +536,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 +601,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 +633,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 +665,7 @@ if (empty($reshook)) } else { $id = $originalId; - if ($object->error == 'ErrorProductAlreadyExists') - { + if ($object->error == 'ErrorProductAlreadyExists') { $db->rollback(); $refalreadyexists++; @@ -607,8 +677,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 +697,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 +715,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 +755,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 +804,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 +814,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 +844,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 +854,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 +884,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 +894,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,56 +940,55 @@ 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(); } } -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 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 @@ -936,8 +996,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // ----------------------------------------- // When used in standard mode // ----------------------------------------- - if ($action == 'create' && $usercancreate) - { + if ($action == 'create' && $usercancreate) { //WYSIWYG Editor require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -952,13 +1011,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(); } @@ -968,10 +1025,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) { @@ -986,8 +1045,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']; @@ -999,10 +1057,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>'; @@ -1023,33 +1082,39 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '</td></tr>'; // Batch number management - if (!empty($conf->productbatch->enabled)) - { + 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")); + $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>'; } $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>'; } @@ -1067,10 +1132,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>'; @@ -1082,7 +1147,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').'">'; @@ -1093,16 +1160,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")); @@ -1116,8 +1181,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 '; @@ -1125,16 +1189,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').'">'; @@ -1142,8 +1204,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').'">'; @@ -1153,8 +1214,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'); @@ -1162,8 +1222,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 @@ -1171,15 +1230,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">'; @@ -1196,8 +1257,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); } @@ -1225,8 +1285,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">'; @@ -1266,8 +1325,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>'; @@ -1276,12 +1334,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } else { $accountancy_code_sell = (GETPOSTISSET('accountancy_code_sell') ? GETPOST('accountancy_code_sell', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT); } - print $formaccounting->select_account($accountancy_code_sell, 'accountancy_code_sell', 1, null, 1, 1, ''); + print $formaccounting->select_account($accountancy_code_sell, 'accountancy_code_sell', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1); 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) { @@ -1289,37 +1346,34 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } else { $accountancy_code_sell_intra = (GETPOSTISSET('accountancy_code_sell_intra') ? GETPOST('accountancy_code_sell_intra', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT); } - print $formaccounting->select_account($accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, null, 1, 1, ''); + print $formaccounting->select_account($accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1); print '</td></tr>'; } // 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); } - print $formaccounting->select_account($accountancy_code_sell_export, 'accountancy_code_sell_export', 1, null, 1, 1, ''); + print $formaccounting->select_account($accountancy_code_sell_export, 'accountancy_code_sell_export', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1); print '</td></tr>'; // Accountancy_code_buy print '<tr><td>'.$langs->trans("ProductAccountancyBuyCode").'</td>'; print '<td>'; - if ($type == 0) - { + 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'); + $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, ''); + 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) { @@ -1327,29 +1381,40 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } else { $accountancy_code_buy_intra = (GETPOSTISSET('accountancy_code_buy_intra') ? GETPOST('accountancy_code_buy_intra', 'alpha') : $conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT); } - print $formaccounting->select_account($accountancy_code_buy_intra, 'accountancy_code_buy_intra', 1, null, 1, 1, ''); + print $formaccounting->select_account($accountancy_code_buy_intra, 'accountancy_code_buy_intra', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1); print '</td></tr>'; } // 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); } - print $formaccounting->select_account($accountancy_code_buy_export, 'accountancy_code_buy_export', 1, null, 1, 1, ''); + print $formaccounting->select_account($accountancy_code_buy_export, 'accountancy_code_buy_export', 1, null, 1, 1, 'minwidth100 maxwidth300 maxwidthonsmartphone', 1); 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>'; @@ -1357,8 +1422,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>'; @@ -1375,8 +1439,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>'; @@ -1400,11 +1463,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'; @@ -1419,8 +1482,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']; @@ -1428,7 +1490,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 @@ -1447,7 +1511,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '<table class="border allwidth">'; // Ref - print '<tr><td class="titlefield fieldrequired">'.$langs->trans("Ref").'</td><td colspan="3"><input name="ref" class="maxwidth200" maxlength="128" value="'.dol_escape_htmltag($object->ref).'"></td></tr>'; + print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Ref").'</td><td colspan="3"><input name="ref" class="maxwidth200" maxlength="128" value="'.dol_escape_htmltag($object->ref).'"></td></tr>'; // Label print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td colspan="3"><input name="label" class="minwidth300 maxwidth400onsmartphone" maxlength="255" value="'.dol_escape_htmltag($object->label).'"></td></tr>'; @@ -1455,8 +1519,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 { @@ -1469,8 +1532,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 { @@ -1481,12 +1543,10 @@ 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)) - { + 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")); + $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>'; } @@ -1494,23 +1554,28 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // 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>'; } @@ -1531,32 +1596,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.'"> '; @@ -1574,8 +1637,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'; @@ -1584,16 +1646,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.'"> '; @@ -1601,8 +1661,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.'"> '; @@ -1611,8 +1670,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'); @@ -1620,22 +1678,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">'; @@ -1651,14 +1710,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); @@ -1674,8 +1731,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%'); @@ -1690,25 +1746,23 @@ 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="titlefield">'.$langs->trans("ProductAccountancySellCode").'</td>'; + print '<tr><td class="titlefieldcreate">'.$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_sell_intra - if ($mysoc->isInEEC()) - { - print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancySellIntraCode").'</td>'; + 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); print '</td></tr>'; } // Accountancy_code_sell_export - print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancySellExportCode").'</td>'; + print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellExportCode").'</td>'; print '<td>'; print $formaccounting->select_account($object->accountancy_code_sell_export, 'accountancy_code_sell_export', 1, '', 1, 1); print '</td></tr>'; @@ -1720,36 +1774,34 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '</td></tr>'; // Accountancy_code_buy_intra - if ($mysoc->isInEEC()) - { - print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancyBuyIntraCode").'</td>'; + 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); print '</td></tr>'; } // Accountancy_code_buy_export - print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancyBuyExportCode").'</td>'; + print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancyBuyExportCode").'</td>'; print '<td>'; print $formaccounting->select_account($object->accountancy_code_buy_export, 'accountancy_code_buy_export', 1, '', 1, 1); print '</td></tr>'; } else { // For external software // Accountancy_code_sell - print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancySellCode").'</td>'; + print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellCode").'</td>'; print '<td><input name="accountancy_code_sell" class="maxwidth200" value="'.$object->accountancy_code_sell.'">'; print '</td></tr>'; // Accountancy_code_sell_intra - if ($mysoc->isInEEC()) - { - print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancySellIntraCode").'</td>'; + 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>'; } // Accountancy_code_sell_export - print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancySellExportCode").'</td>'; + print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancySellExportCode").'</td>'; print '<td><input name="accountancy_code_sell_export" class="maxwidth200" value="'.$object->accountancy_code_sell_export.'">'; print '</td></tr>'; @@ -1759,15 +1811,14 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print '</td></tr>'; // Accountancy_code_buy_intra - if ($mysoc->isInEEC()) - { - print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancyBuyIntraCode").'</td>'; + 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>'; } // Accountancy_code_buy_export - print '<tr><td class="titlefield">'.$langs->trans("ProductAccountancyBuyExportCode").'</td>'; + print '<tr><td class="titlefieldcreate">'.$langs->trans("ProductAccountancyBuyExportCode").'</td>'; print '<td><input name="accountancy_code_buy_export" class="maxwidth200" value="'.$object->accountancy_code_buy_export.'">'; print '</td></tr>'; } @@ -1784,8 +1835,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); @@ -1797,7 +1851,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'); @@ -1809,9 +1865,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'); @@ -1820,26 +1874,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"; @@ -1849,13 +1906,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().'">'; @@ -1865,7 +1925,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"; } @@ -1874,10 +1934,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); @@ -1889,15 +1947,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); @@ -1913,10 +1968,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); @@ -1931,10 +1984,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); @@ -1946,15 +1997,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); @@ -1970,10 +2018,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); @@ -1985,16 +2031,10 @@ 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>'; } } @@ -2008,8 +2048,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); @@ -2040,15 +2079,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;"; @@ -2062,47 +2098,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;'; @@ -2110,12 +2143,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;'; @@ -2124,8 +2155,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>'; @@ -2136,13 +2166,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>'; } @@ -2158,8 +2189,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"; @@ -2173,40 +2203,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"), @@ -2217,8 +2244,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); } @@ -2228,33 +2254,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>'; @@ -2263,12 +2287,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>'; @@ -2288,23 +2309,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); @@ -2318,15 +2336,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); @@ -2340,15 +2356,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); @@ -2362,8 +2376,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">'; @@ -2394,11 +2407,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..6b26421d0f8 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()); @@ -755,9 +784,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 +808,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 +847,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 +901,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 +916,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 +936,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 +1003,6 @@ class Products extends DolibarrApi * @param int $id ID of Attribute * @return array * - * @throws RestException * @throws RestException 401 * @throws RestException 404 * @@ -1002,8 +1046,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 +1193,8 @@ class Products extends DolibarrApi } foreach ($request_data as $field => $value) { - if ($field == 'rowid') { continue; + if ($field == 'rowid') { + continue; } $prodattr->$field = $value; } @@ -1253,7 +1298,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 +1341,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 +1415,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 +1462,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 +1500,8 @@ class Products extends DolibarrApi } foreach ($request_data as $field => $value) { - if ($field == 'rowid') { continue; + if ($field == 'rowid') { + continue; } $objectval->$field = $value; } @@ -1606,8 +1660,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 +1715,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 +1749,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 +1782,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 +1837,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 +1909,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 25051baa9c3..0c1e80792f1 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; /** @@ -407,15 +407,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 +433,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 +601,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,12 +660,14 @@ 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"; @@ -673,12 +687,14 @@ 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); @@ -706,6 +722,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 +772,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 +847,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 +992,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 +1032,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"; @@ -1037,12 +1083,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 +1099,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 +1117,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 +1279,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; @@ -1247,6 +1324,15 @@ class Product extends CommonObject } } + // Remove extrafields + if (!$error) { + $result = $this->deleteExtraFields(); + if ($result < 0) { + $error++; + dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); + } + } + // Delete product if (!$error) { $sqlz = "DELETE FROM ".MAIN_DB_PREFIX."product"; @@ -1274,22 +1360,11 @@ class Product extends CommonObject } } - // Remove extrafields - if (!$error) - { - $result = $this->deleteExtraFields(); - if ($result < 0) { - $error++; - dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); - } - } - if (!$error) { $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); } @@ -1315,8 +1390,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"; @@ -1325,18 +1399,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)."',"; @@ -1352,6 +1427,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; @@ -1359,8 +1439,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"])."',"; @@ -1371,7 +1450,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"])."',"; @@ -1479,7 +1559,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) { @@ -1515,11 +1597,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; @@ -1619,7 +1699,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; @@ -1632,11 +1714,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 @@ -1650,12 +1737,17 @@ class Product extends CommonObject if ($result) { if (count($prodcustprice->lines) > 0) { $pu_ht = price($prodcustprice->lines[0]->price); + $price_min = price($prodcustprice->lines[0]->price_min); $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 +1756,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 +1773,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 +1816,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 +1830,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 +1861,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 +1874,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 +1891,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 +1923,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 +2064,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 +2160,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.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)."'"; } } @@ -2184,10 +2291,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 +2316,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 +2374,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 +2401,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"; @@ -2396,7 +2497,7 @@ class Product extends CommonObject public function load_stats_mo($socid = 0) { // phpcs:enable - global $user, $hookmanager; + global $user, $hookmanager, $action; $error = 0; @@ -2409,7 +2510,7 @@ class Product extends CommonObject $sql .= " SUM(mp.qty) as qty"; $sql .= " FROM ".MAIN_DB_PREFIX."mrp_mo as c"; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."mrp_production as mp ON mp.fk_mo=c.rowid"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= "INNER JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc=c.fk_soc AND sc.fk_user = ".$user->id; } $sql .= " WHERE "; @@ -2439,7 +2540,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; } @@ -2464,7 +2567,7 @@ class Product extends CommonObject $this->stats_bom['qty_toconsume'] = 0; $sql = "SELECT COUNT(DISTINCT b.rowid) as nb_toproduce,"; - $sql .= " b.qty as qty_toproduce"; + $sql .= " SUM(b.qty) as qty_toproduce"; $sql .= " FROM ".MAIN_DB_PREFIX."bom_bom as b"; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."bom_bomline as bl ON bl.fk_bom=b.rowid"; $sql .= " WHERE "; @@ -2506,7 +2609,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; } @@ -2528,14 +2633,14 @@ class Product extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."propaldet as pd"; $sql .= ", ".MAIN_DB_PREFIX."propal as p"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE p.rowid = pd.fk_propal"; $sql .= " AND p.fk_soc = s.rowid"; $sql .= " AND p.entity IN (".getEntity('propal').")"; $sql .= " AND pd.fk_product = ".$this->id; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND p.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; } //$sql.= " AND pr.fk_statut != 0"; @@ -2574,7 +2679,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 { @@ -2594,23 +2701,26 @@ class Product extends CommonObject public function load_stats_proposal_supplier($socid = 0) { // phpcs:enable - global $conf, $user, $hookmanager; + global $conf, $user, $hookmanager, $action; $sql = "SELECT COUNT(DISTINCT p.fk_soc) as nb_suppliers, COUNT(DISTINCT p.rowid) as nb,"; $sql .= " COUNT(pd.rowid) as nb_rows, SUM(pd.qty) as qty"; $sql .= " FROM ".MAIN_DB_PREFIX."supplier_proposaldet as pd"; $sql .= ", ".MAIN_DB_PREFIX."supplier_proposal 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 (empty($user->rights->societe->client->voir) && !$socid) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE p.rowid = pd.fk_supplier_proposal"; $sql .= " AND p.fk_soc = s.rowid"; $sql .= " AND p.entity IN (".getEntity('supplier_proposal').")"; $sql .= " AND pd.fk_product = ".$this->id; - if (!$user->rights->societe->client->voir && !$socid) { $sql .= " AND p.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; + if (empty($user->rights->societe->client->voir) && !$socid) { + $sql .= " AND p.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; } //$sql.= " AND pr.fk_statut != 0"; - if ($socid > 0) { $sql .= " AND p.fk_soc = ".$socid; + if ($socid > 0) { + $sql .= " AND p.fk_soc = ".$socid; } $result = $this->db->query($sql); @@ -2623,7 +2733,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 { @@ -2652,21 +2764,21 @@ class Product extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."commandedet as cd"; $sql .= ", ".MAIN_DB_PREFIX."commande as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid && !$forVirtualStock) { + if (empty($user->rights->societe->client->voir) && !$socid && !$forVirtualStock) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.rowid = cd.fk_commande"; $sql .= " AND c.fk_soc = s.rowid"; $sql .= " AND c.entity IN (".getEntity($forVirtualStock && !empty($conf->global->STOCK_CALCULATE_VIRTUAL_STOCK_TRANSVERSE_MODE) ? 'stock' : 'commande').")"; $sql .= " AND cd.fk_product = ".$this->id; - if (!$user->rights->societe->client->voir && !$socid && !$forVirtualStock) { + if (empty($user->rights->societe->client->voir) && !$socid && !$forVirtualStock) { $sql .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; } if ($socid > 0) { $sql .= " AND c.fk_soc = ".$socid; } if ($filtrestatut <> '') { - $sql .= " AND c.fk_statut in (".$filtrestatut.")"; + $sql .= " AND c.fk_statut in (".$this->db->sanitize($filtrestatut).")"; } $result = $this->db->query($sql); @@ -2708,7 +2820,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); @@ -2725,7 +2837,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(); @@ -2745,28 +2859,28 @@ class Product extends CommonObject public function load_stats_commande_fournisseur($socid = 0, $filtrestatut = '', $forVirtualStock = 0) { // phpcs:enable - global $conf, $user, $hookmanager; + global $conf, $user, $hookmanager, $action; $sql = "SELECT COUNT(DISTINCT c.fk_soc) as nb_suppliers, COUNT(DISTINCT c.rowid) as nb,"; $sql .= " COUNT(cd.rowid) as nb_rows, SUM(cd.qty) as qty"; $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as cd"; $sql .= ", ".MAIN_DB_PREFIX."commande_fournisseur as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid && !$forVirtualStock) { + if (empty($user->rights->societe->client->voir) && !$socid && !$forVirtualStock) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.rowid = cd.fk_commande"; $sql .= " AND c.fk_soc = s.rowid"; $sql .= " AND c.entity IN (".getEntity($forVirtualStock && !empty($conf->global->STOCK_CALCULATE_VIRTUAL_STOCK_TRANSVERSE_MODE) ? 'stock' : 'supplier_order').")"; $sql .= " AND cd.fk_product = ".$this->id; - if (!$user->rights->societe->client->voir && !$socid && !$forVirtualStock) { + if (empty($user->rights->societe->client->voir) && !$socid && !$forVirtualStock) { $sql .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; } if ($socid > 0) { $sql .= " AND c.fk_soc = ".$socid; } if ($filtrestatut != '') { - $sql .= " AND c.fk_statut in (".$filtrestatut.")"; // Peut valoir 0 + $sql .= " AND c.fk_statut in (".$this->db->sanitize($filtrestatut).")"; // Peut valoir 0 } $result = $this->db->query($sql); @@ -2779,7 +2893,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 { @@ -2810,7 +2926,7 @@ class Product extends CommonObject $sql .= ", ".MAIN_DB_PREFIX."commande as c"; $sql .= ", ".MAIN_DB_PREFIX."expedition as e"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid && !$forVirtualStock) { + if (empty($user->rights->societe->client->voir) && !$socid && !$forVirtualStock) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE e.rowid = ed.fk_expedition"; @@ -2819,16 +2935,18 @@ class Product extends CommonObject $sql .= " AND e.entity IN (".getEntity($forVirtualStock && !empty($conf->global->STOCK_CALCULATE_VIRTUAL_STOCK_TRANSVERSE_MODE) ? 'stock' : 'expedition').")"; $sql .= " AND ed.fk_origin_line = cd.rowid"; $sql .= " AND cd.fk_product = ".$this->id; - if (!$user->rights->societe->client->voir && !$socid && !$forVirtualStock) { + if (empty($user->rights->societe->client->voir) && !$socid && !$forVirtualStock) { $sql .= " AND e.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; } if ($socid > 0) { $sql .= " AND e.fk_soc = ".$socid; } if ($filtrestatut <> '') { - $sql .= " AND c.fk_statut in (".$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 (".$filterShipmentStatus.")"; $result = $this->db->query($sql); if ($result) { @@ -2861,7 +2979,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 { @@ -2882,24 +3002,28 @@ class Product extends CommonObject public function load_stats_reception($socid = 0, $filtrestatut = '', $forVirtualStock = 0) { // phpcs:enable - global $conf, $user, $hookmanager; + global $conf, $user, $hookmanager, $action; $sql = "SELECT COUNT(DISTINCT cf.fk_soc) as nb_suppliers, COUNT(DISTINCT cf.rowid) as nb,"; $sql .= " COUNT(fd.rowid) as nb_rows, SUM(fd.qty) as qty"; $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur_dispatch as fd"; $sql .= ", ".MAIN_DB_PREFIX."commande_fournisseur as cf"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid && !$forVirtualStock) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (empty($user->rights->societe->client->voir) && !$socid && !$forVirtualStock) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE cf.rowid = fd.fk_commande"; $sql .= " AND cf.fk_soc = s.rowid"; $sql .= " AND cf.entity IN (".getEntity($forVirtualStock && !empty($conf->global->STOCK_CALCULATE_VIRTUAL_STOCK_TRANSVERSE_MODE) ? 'stock' : 'supplier_order').")"; $sql .= " AND fd.fk_product = ".$this->id; - if (!$user->rights->societe->client->voir && !$socid && !$forVirtualStock) { $sql .= " AND cf.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; + if (empty($user->rights->societe->client->voir) && !$socid && !$forVirtualStock) { + $sql .= " AND cf.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; } - if ($socid > 0) { $sql .= " AND cf.fk_soc = ".$socid; + if ($socid > 0) { + $sql .= " AND cf.fk_soc = ".$socid; } - if ($filtrestatut <> '') { $sql .= " AND cf.fk_statut in (".$filtrestatut.")"; + if ($filtrestatut <> '') { + $sql .= " AND cf.fk_statut IN (".$this->db->sanitize($filtrestatut).")"; } $result = $this->db->query($sql); @@ -2912,7 +3036,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 { @@ -2940,20 +3066,20 @@ class Product extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."mrp_production as mp"; $sql .= ", ".MAIN_DB_PREFIX."mrp_mo as m"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = m.fk_soc"; - if (!$user->rights->societe->client->voir && !$socid && !$forVirtualStock) { + if (empty($user->rights->societe->client->voir) && !$socid && !$forVirtualStock) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE m.rowid = mp.fk_mo"; $sql .= " AND m.entity IN (".getEntity($forVirtualStock && !empty($conf->global->STOCK_CALCULATE_VIRTUAL_STOCK_TRANSVERSE_MODE) ? 'stock' : 'mrp').")"; $sql .= " AND mp.fk_product = ".$this->id; - if (!$user->rights->societe->client->voir && !$socid && !$forVirtualStock) { + if (empty($user->rights->societe->client->voir) && !$socid && !$forVirtualStock) { $sql .= " AND m.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; } if ($socid > 0) { $sql .= " AND m.fk_soc = ".$socid; } if ($filtrestatut <> '') { - $sql .= " AND m.status in (".$filtrestatut.")"; + $sql .= " AND m.status IN (".$this->db->sanitize($filtrestatut).")"; } $sql .= " GROUP BY role"; @@ -2996,12 +3122,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 { @@ -3027,14 +3159,14 @@ class Product extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."contratdet as cd"; $sql .= ", ".MAIN_DB_PREFIX."contrat as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $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 = ".$this->id; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; } //$sql.= " AND c.statut != 0"; @@ -3073,7 +3205,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 { @@ -3099,14 +3233,14 @@ class Product extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."facturedet as fd"; $sql .= ", ".MAIN_DB_PREFIX."facture as f"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.rowid = fd.fk_facture"; $sql .= " AND f.fk_soc = s.rowid"; $sql .= " AND f.entity IN (".getEntity('invoice').")"; $sql .= " AND fd.fk_product = ".$this->id; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND f.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; } //$sql.= " AND f.fk_statut != 0"; @@ -3145,7 +3279,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 { @@ -3164,21 +3300,21 @@ class Product extends CommonObject public function load_stats_facture_fournisseur($socid = 0) { // phpcs:enable - global $conf, $user, $hookmanager; + global $conf, $user, $hookmanager, $action; $sql = "SELECT COUNT(DISTINCT f.fk_soc) as nb_suppliers, COUNT(DISTINCT f.rowid) as nb,"; $sql .= " COUNT(fd.rowid) as nb_rows, SUM(fd.qty) as qty"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn_det as fd"; $sql .= ", ".MAIN_DB_PREFIX."facture_fourn as f"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.rowid = fd.fk_facture_fourn"; $sql .= " AND f.fk_soc = s.rowid"; $sql .= " AND f.entity IN (".getEntity('facture_fourn').")"; $sql .= " AND fd.fk_product = ".$this->id; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND f.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; } //$sql.= " AND f.fk_statut != 0"; @@ -3196,7 +3332,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 { @@ -3223,8 +3361,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) { @@ -3255,8 +3392,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)); @@ -3303,7 +3439,7 @@ class Product extends CommonObject if ($filteronproducttype >= 0) { $sql .= ", ".MAIN_DB_PREFIX."product as p"; } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.rowid = d.fk_facture"; @@ -3313,11 +3449,11 @@ class Product extends CommonObject $sql .= " AND d.fk_product > 0"; } if ($filteronproducttype >= 0) { - $sql .= " AND p.rowid = d.fk_product AND p.fk_product_type =".$filteronproducttype; + $sql .= " AND p.rowid = d.fk_product AND p.fk_product_type = ".((int) $filteronproducttype); } $sql .= " AND f.fk_soc = s.rowid"; $sql .= " AND f.entity IN (".getEntity('invoice').")"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND f.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; } if ($socid > 0) { @@ -3356,7 +3492,7 @@ class Product extends CommonObject if ($filteronproducttype >= 0) { $sql .= ", ".MAIN_DB_PREFIX."product as p"; } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE f.rowid = d.fk_facture_fourn"; @@ -3366,11 +3502,11 @@ class Product extends CommonObject $sql .= " AND d.fk_product > 0"; } if ($filteronproducttype >= 0) { - $sql .= " AND p.rowid = d.fk_product AND p.fk_product_type =".$filteronproducttype; + $sql .= " AND p.rowid = d.fk_product AND p.fk_product_type = ".((int) $filteronproducttype); } $sql .= " AND f.fk_soc = s.rowid"; $sql .= " AND f.entity IN (".getEntity('facture_fourn').")"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND f.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; } if ($socid > 0) { @@ -3407,7 +3543,7 @@ class Product extends CommonObject if ($filteronproducttype >= 0) { $sql .= ", ".MAIN_DB_PREFIX."product as prod"; } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE p.rowid = d.fk_propal"; @@ -3417,11 +3553,11 @@ class Product extends CommonObject $sql .= " AND d.fk_product > 0"; } if ($filteronproducttype >= 0) { - $sql .= " AND prod.rowid = d.fk_product AND prod.fk_product_type =".$filteronproducttype; + $sql .= " AND prod.rowid = d.fk_product AND prod.fk_product_type = ".((int) $filteronproducttype); } $sql .= " AND p.fk_soc = s.rowid"; $sql .= " AND p.entity IN (".getEntity('propal').")"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND p.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; } if ($socid > 0) { @@ -3459,7 +3595,7 @@ class Product extends CommonObject if ($filteronproducttype >= 0) { $sql .= ", ".MAIN_DB_PREFIX."product as prod"; } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE p.rowid = d.fk_supplier_proposal"; @@ -3469,15 +3605,15 @@ class Product extends CommonObject $sql .= " AND d.fk_product > 0"; } if ($filteronproducttype >= 0) { - $sql .= " AND prod.rowid = d.fk_product AND prod.fk_product_type =".$filteronproducttype; + $sql .= " AND prod.rowid = d.fk_product AND prod.fk_product_type = ".((int) $filteronproducttype); } $sql .= " AND p.fk_soc = s.rowid"; $sql .= " AND p.entity IN (".getEntity('supplier_proposal').")"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $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')"; @@ -3510,7 +3646,7 @@ class Product extends CommonObject if ($filteronproducttype >= 0) { $sql .= ", ".MAIN_DB_PREFIX."product as p"; } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.rowid = d.fk_commande"; @@ -3520,11 +3656,11 @@ class Product extends CommonObject $sql .= " AND d.fk_product > 0"; } if ($filteronproducttype >= 0) { - $sql .= " AND p.rowid = d.fk_product AND p.fk_product_type =".$filteronproducttype; + $sql .= " AND p.rowid = d.fk_product AND p.fk_product_type = ".((int) $filteronproducttype); } $sql .= " AND c.fk_soc = s.rowid"; $sql .= " AND c.entity IN (".getEntity('commande').")"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; } if ($socid > 0) { @@ -3561,7 +3697,7 @@ class Product extends CommonObject if ($filteronproducttype >= 0) { $sql .= ", ".MAIN_DB_PREFIX."product as p"; } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } $sql .= " WHERE c.rowid = d.fk_commande"; @@ -3571,11 +3707,11 @@ class Product extends CommonObject $sql .= " AND d.fk_product > 0"; } if ($filteronproducttype >= 0) { - $sql .= " AND p.rowid = d.fk_product AND p.fk_product_type =".$filteronproducttype; + $sql .= " AND p.rowid = d.fk_product AND p.fk_product_type = ".((int) $filteronproducttype); } $sql .= " AND c.fk_soc = s.rowid"; $sql .= " AND c.entity IN (".getEntity('supplier_order').")"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; } if ($socid > 0) { @@ -3612,7 +3748,7 @@ class Product extends CommonObject if ($filteronproducttype >= 0) { $sql .= ", ".MAIN_DB_PREFIX."product as p"; } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } @@ -3625,11 +3761,11 @@ class Product extends CommonObject $sql .= " AND d.fk_product > 0"; } if ($filteronproducttype >= 0) { - $sql .= " AND p.rowid = d.fk_product AND p.fk_product_type =".$filteronproducttype; + $sql .= " AND p.rowid = d.fk_product AND p.fk_product_type = ".((int) $filteronproducttype); } $sql .= " AND c.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; } if ($socid > 0) { @@ -3666,7 +3802,7 @@ class Product extends CommonObject if ($filteronproducttype >= 0) { $sql .= ", ".MAIN_DB_PREFIX."product as p"; } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } @@ -3679,10 +3815,10 @@ class Product extends CommonObject $sql .= " AND d.fk_product > 0"; } if ($filteronproducttype >= 0) { - $sql .= " AND p.rowid = d.fk_product AND p.fk_product_type =".$filteronproducttype; + $sql .= " AND p.rowid = d.fk_product AND p.fk_product_type = ".((int) $filteronproducttype); } - if (!$user->rights->societe->client->voir && !$socid) { + if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= " AND d.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; } if ($socid > 0) { @@ -3726,7 +3862,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; @@ -3739,7 +3875,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; @@ -3810,8 +3946,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)) { @@ -3904,12 +4040,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); @@ -3979,8 +4117,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++; @@ -4061,7 +4198,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; @@ -4093,7 +4230,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)) { @@ -4122,23 +4259,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); @@ -4156,39 +4293,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, @@ -4209,7 +4350,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); } } } @@ -4217,20 +4358,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); } } } @@ -4262,7 +4404,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; } @@ -4284,7 +4428,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; } } @@ -4328,6 +4473,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"; @@ -4336,8 +4482,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']; @@ -4346,6 +4491,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 { @@ -4367,6 +4514,10 @@ class Product extends CommonObject { global $alreadyfound; + if (empty($id)) { + return array(); + } + $sql = "SELECT p.rowid, p.ref, p.label as label, p.fk_product_type,"; $sql .= " pa.qty as qty, pa.fk_product_fils as id, pa.incdec"; $sql .= " FROM ".MAIN_DB_PREFIX."product as p,"; @@ -4377,17 +4528,18 @@ class Product extends CommonObject 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) { return array(); + if ($level > 30) { + return array(); } $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; @@ -4405,8 +4557,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; } } @@ -4431,12 +4582,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; } } @@ -4498,8 +4647,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); } @@ -4513,7 +4661,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) { @@ -4522,7 +4672,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) { @@ -4564,9 +4719,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'; } } @@ -4575,13 +4732,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; @@ -4641,17 +4797,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); } } @@ -4672,17 +4827,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); @@ -4720,12 +4875,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 { @@ -4893,7 +5050,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); @@ -4902,8 +5059,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; @@ -4951,14 +5107,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)) { @@ -4967,37 +5123,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']; } @@ -5030,7 +5198,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; } @@ -5055,8 +5225,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++; @@ -5144,8 +5313,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 } @@ -5178,9 +5346,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++; @@ -5197,14 +5365,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; } } } @@ -5291,10 +5462,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); @@ -5343,10 +5515,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; @@ -5422,7 +5594,6 @@ class Product extends CommonObject $langs->load('products'); $label_type = 'label'; - if ($type == 'short') { $label_type = 'short_label'; } @@ -5448,7 +5619,7 @@ class Product extends CommonObject */ public function hasbatch() { - return ($this->status_batch == 1 ? true : false); + return ($this->status_batch > 0 ? true : false); } @@ -5471,8 +5642,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; } @@ -5498,38 +5668,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); } /** @@ -5639,7 +5780,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 f8f5322f2f8..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'); @@ -237,12 +248,11 @@ if ($object->id) print dol_get_fiche_end(); $param = '&id='.$object->id; - include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; // 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 3111334c785..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,19 +163,28 @@ 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')); - $tva_tx = price2num($tva_tx); + if (!preg_match('/\((.*)\)/', $tva_tx)) { + $tva_tx = price2num($tva_tx); + } + $price_expression = GETPOST('eid', 'int') ? GETPOST('eid', 'int') : ''; // Discard expression if not in expression mode $delivery_time_days = GETPOST('delivery_time_days', 'int') ? GETPOST('delivery_time_days', 'int') : ''; $supplier_reputation = GETPOST('supplier_reputation'); @@ -171,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'); @@ -213,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')) { @@ -281,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 @@ -290,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'); @@ -304,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; @@ -320,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'); } @@ -333,8 +342,7 @@ if (empty($reshook)) } } - if (!$error) - { + if (!$error) { $db->commit(); $action = ''; } else { @@ -351,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); +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'); @@ -391,14 +394,16 @@ 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'); print '<div class="fichecenter">'; print '<div class="underbanner clearboth"></div>'; - print '<table class="border tableforfield" width="100%">'; + print '<table class="border tableforfield centpercent">'; // Cost price. Can be used for margin module for option "calculate margin on explicit cost price print '<tr><td>'; @@ -411,20 +416,24 @@ if ($id > 0 || $ref) print '</td></tr>'; // PMP - print '<tr><td class="titlefield">'.$form->textwithpicto($langs->trans("AverageUnitPricePMPShort"), $langs->trans("AverageUnitPricePMPDesc")).'</td>'; + 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>'; // Best buying Price - print '<tr><td class="titlefield">'.$langs->trans("BuyingPriceMin").'</td>'; + 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>'; @@ -437,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 { @@ -458,9 +465,8 @@ if ($id > 0 || $ref) print '<table class="border centpercent">'; // Supplier - print '<tr><td class="titlefield fieldrequired">'.$langs->trans("Supplier").'</td><td>'; - if ($rowid) - { + print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Supplier").'</td><td>'; + if ($rowid) { $supplier = new Fournisseur($db); $supplier->fetch($socid); print $supplier->getNomUrl(1); @@ -475,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>'; } } @@ -487,19 +491,17 @@ 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" name="ref_fourn" size="12" value="'.$object->ref_supplier.'">'; + print '<input class="flat width150" maxlength="30" name="ref_fourn" value="'.$object->ref_supplier.'">'; } else { - print '<input class="flat" name="ref_fourn" size="12" value="'.(GETPOST("ref_fourn") ?GETPOST("ref_fourn") : '').'">'; + print '<input class="flat width150" maxlength="30" name="ref_fourn" value="'.(GETPOST("ref_fourn") ? GETPOST("ref_fourn") : '').'">'; } print '</td>'; 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); @@ -511,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 { @@ -554,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; } } @@ -576,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); @@ -615,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 : '')).'">'; @@ -697,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>'; @@ -720,12 +722,11 @@ 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>'; - print '<td><input class="flat" name="barcode" value="'.($rowid ? $object->supplier_barcode : '').'"></td>'; + print '<td>'.img_picto('', 'barcode', 'class="pictofixedwidth"').'<input class="flat" name="barcode" value="'.($rowid ? $object->supplier_barcode : '').'"></td>'; print '</tr>'; $formbarcode = new FormBarCode($db); @@ -739,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) : '')).'">'; @@ -752,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'; @@ -776,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>'; } } @@ -791,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>'; @@ -812,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; @@ -836,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>'; } @@ -853,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); @@ -865,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); @@ -920,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); - if (!empty($arrayfields['s.nom']['checked'])) print_liste_field_titre("Suppliers", $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre("SupplierRef", $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder); - if (!empty($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.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 '); + } 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"); @@ -947,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 @@ -987,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>'; @@ -1037,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>'; } @@ -1090,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>'; } @@ -1105,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) { @@ -1126,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); } @@ -1135,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 d5c9ec4966b..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,20 +530,21 @@ 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 ($action == 'addline') { if ($object->status == $object::STATUS_VALIDATED) { print '<tr>'; print '<td>'; 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>'; @@ -439,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 @@ -452,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])) { @@ -505,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++; @@ -525,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 86b8b62fc81..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.minbuyprice'=>array('label'=>$langs->trans("BuyingPriceMinShort"), 'checked'=>1, 'enabled'=>(!empty($user->rights->fournisseur->lire)), 'position'=>41), - 'p.numbuyprice'=>array('label'=>$langs->trans("BuyingPriceNumShort"), 'checked'=>0, 'enabled'=>(!empty($user->rights->fournisseur->lire)), 'position'=>42), - 'p.tva_tx'=>array('label'=>$langs->trans("VATRate"), '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,29 +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'); +} -if (empty($reshook)) -{ +$rightskey = 'produit'; +if ($type == Product::TYPE_SERVICE) { + $rightskey = 'service'; +} + +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; @@ -296,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->produit->lire; - $permissiontodelete = $user->rights->produit->supprimer; + $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'; } @@ -312,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"); @@ -326,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); -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) { @@ -396,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'; @@ -422,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(); @@ -442,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; } @@ -457,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); @@ -472,18 +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'; } } - llxHeader('', $title, $helpurl, ''); + $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')) { @@ -491,70 +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"), ); - $rightskey = 'produit'; - if ($type == Product::TYPE_SERVICE) $rightskey = 'service'; - 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">'; @@ -562,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); @@ -575,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'); @@ -584,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'); @@ -613,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>'; @@ -625,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>'; } @@ -691,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>'; } @@ -712,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>'; } @@ -723,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>'; } @@ -734,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>'; } @@ -746,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>'; } @@ -772,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 @@ -845,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>'; } @@ -898,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 '); } } @@ -933,7 +1138,7 @@ if ($resql) print_liste_field_titre($arrayfields['p.numbuyprice']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right '); } if (!empty($arrayfields['p.tva_tx']['checked'])) { - print_liste_field_titre($arrayfields['p.tva_tx']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right '); + print_liste_field_titre($arrayfields['p.tva_tx']['label'], $_SERVER["PHP_SELF"], 'p.tva_tx', "", $param, '', $sortfield, $sortorder, 'right '); } if (!empty($arrayfields['p.pmp']['checked'])) { print_liste_field_titre($arrayfields['p.pmp']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right '); @@ -962,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'; @@ -993,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"; @@ -1007,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; @@ -1021,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; + } } } @@ -1063,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() } } @@ -1076,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']++; + } } @@ -1290,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; @@ -1323,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); } @@ -1381,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'; @@ -1512,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 f1259b3268f..a08eaa8558b 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,8 +566,7 @@ 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'); $result = $prodcustprice->delete($user); @@ -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,18 +668,16 @@ 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'; } -llxHeader('', $title, $helpurl); +llxHeader('', $title, $helpurl, '', 0, 0, '', '', '', 'classforhorizontalscrolloftabs'); $head = product_prepare_head($object); $titre = $langs->trans("CardProduct".$object->type); @@ -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().'">'; @@ -1192,6 +1183,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) print dol_get_fiche_head(''); + print '<div class="div-table-responsive-no-min">'; print '<table class="border centpercent">'; // VAT @@ -1208,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>'; @@ -1268,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>'; @@ -1279,6 +1270,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print '</table>'; + print '</div>'; print dol_get_fiche_end(); @@ -1326,13 +1318,17 @@ if ($action == 'edit_price' && $object->getRights()->creer) print $langs->trans('UseMultipriceRules').' <input type="checkbox" id="usePriceRules" name="usePriceRules" '.($object->price_autogen ? 'checked' : '').'><br><br>'; } + print '<div class="div-table-responsive-no-min">'; print '<table class="noborder">'; print '<thead><tr class="liste_titre">'; 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>'; @@ -1345,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; @@ -1387,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>'; @@ -1399,6 +1393,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) print '</tbody>'; print '</table>'; + print '</div>'; //print dol_get_fiche_end(); @@ -1413,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); @@ -1456,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">'; @@ -1474,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)) { @@ -1483,28 +1482,27 @@ 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">'; // Date - print "<td>".dol_print_date($db->jdate($objp->dp), "dayhour")."</td>"; + print "<td>".dol_print_date($db->jdate($objp->dp), "dayhour", 'tzuserrel')."</td>"; // Price level if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) { 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>"; } @@ -1515,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; @@ -1584,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>'; } @@ -1621,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); @@ -1645,8 +1656,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) $filter['soc.nom'] = $search_soc; } - if ($action == 'add_customer_price') - { + if ($action == 'add_customer_price') { // Form to add a new customer price $maxpricesupplier = $object->min_recommended_price(); @@ -1657,16 +1667,18 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print '<input type="hidden" name="action" value="add_customer_price_confirm">'; print '<input type="hidden" name="id" value="'.$object->id.'">'; - print dol_get_fiche_head(); - print '<table class="liste centpercent">'; print '<tr>'; print '<td class="fieldrequired">'.$langs->trans('ThirdParty').'</td>'; print '<td>'; - print $form->select_company('', 'socid', 's.client IN (1,2,3)', 'SelectThirdParty', 0, 0, array(), 0, 'minwidth300'); + print img_picto('', 'company').$form->select_company('', 'socid', 's.client IN (1,2,3)', 'SelectThirdParty', 0, 0, array(), 0, 'minwidth300'); 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); @@ -1702,22 +1714,20 @@ 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>'; print '</table>'; - print dol_get_fiche_end(); print '<div class="center">'; // Update all child soc print '<div class="marginbottomonly">'; - print '<input type="checkbox" name="updatechildprice" value="1"> '; - print $langs->trans('ForceUpdateChildPriceSoc'); + print '<input type="checkbox" name="updatechildprice" id="updatechildprice" value="1"> '; + print '<label for="updatechildprice">'.$langs->trans('ForceUpdateChildPriceSoc').'</label>'; print '</div>'; print '<input type="submit" class="button button-save" value="'.$langs->trans("Save").'">'; @@ -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(); @@ -1743,23 +1752,25 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print '<input type="hidden" name="action" value="update_customer_price_confirm">'; print '<input type="hidden" name="lineid" value="'.$prodcustprice->id.'">'; - print dol_get_fiche_head(); - print '<table class="liste centpercent">'; print '<tr>'; - print '<td class="titlefield">'.$langs->trans('ThirdParty').'</td>'; + print '<td class="titlefield fieldrequired">'.$langs->trans('ThirdParty').'</td>'; $staticsoc = new Societe($db); $staticsoc->fetch($prodcustprice->fk_soc); - print "<td colspan='2'>".$staticsoc->getNomUrl(1)."</td>"; + 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>'.$langs->trans("DefaultTaxRate").'</td><td colspan="2">'; + 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); print '</td></tr>'; // Price base - print '<tr><td>'; + print '<tr><td class="fieldrequired">'; print $langs->trans('PriceBase'); print '</td>'; print '<td>'; @@ -1768,7 +1779,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print '</tr>'; // Price - print '<tr><td>'; + print '<tr><td class="fieldrequired">'; $text = $langs->trans('SellingPrice'); print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); print '</td><td>'; @@ -1790,27 +1801,18 @@ 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>'; - // Update all child soc - print '<tr><td>'; - print '</td>'; - print '<td>'; - print '</td>'; - print '</tr>'; - print '</table>'; - print dol_get_fiche_end(); print '<div class="center">'; print '<div class="marginbottomonly">'; - print '<input type="checkbox" name="updatechildprice" value="1"> '; - print $langs->trans('ForceUpdateChildPriceSoc'); + print '<input type="checkbox" name="updatechildprice" id="updatechildprice" value="1"> '; + print '<label for="updatechildprice">'.$langs->trans('ForceUpdateChildPriceSoc').'</label>'; print "</div>"; print '<input type="submit" class="button button-save" value="'.$langs->trans("Save").'">'; @@ -1819,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"; @@ -1849,22 +1850,22 @@ 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.'">'; + print '<div class="div-table-responsive-no-min">'; print '<table class="liste centpercent">'; 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 { @@ -1876,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); @@ -1885,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; @@ -1906,15 +1905,24 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print '<tr class="oddeven">'; print "<td>".$staticsoc->getNomUrl(1)."</td>"; - print "<td>".dol_print_date($line->datec, "dayhour")."</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)); @@ -1922,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 { @@ -1943,11 +1950,11 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print '</tr>'; } print "</table>"; + print '</div>'; } 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"; @@ -1970,11 +1977,11 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="id" value="'.$object->id.'">'; + 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">'; @@ -1990,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 { @@ -2005,12 +2012,11 @@ 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>'; // Line for default price - if ($object->price_base_type == 'HT') - { + if ($object->price_base_type == 'HT') { $pu = $object->price; } else { $pu = $object->price_ttc; @@ -2028,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); @@ -2047,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 { @@ -2060,25 +2072,21 @@ 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) - { - print '<td class="right">'; - print '<a href="'.$_SERVER["PHP_SELF"].'?action=showlog_default_price&amp;id='.$object->id.'">'; + 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')); print '</a>'; print ' '; - print '<a class="marginleftonly editfielda" href="'.$_SERVER["PHP_SELF"].'?action=edit_price&amp;id='.$object->id.'">'; + print '<a class="marginleftonly marginrightonly editfielda" href="'.$_SERVER["PHP_SELF"].'?action=edit_price&amp;id='.$object->id.'">'; print img_edit('default', 0, 'style="vertical-align: middle;"'); print '</a>'; - print ' &nbsp; '; print '</td>'; } 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); @@ -2086,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; @@ -2107,23 +2114,31 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print '<tr class="oddeven">'; print "<td>".$staticsoc->getNomUrl(1)."</td>"; - print "<td>".dol_print_date($line->datec, "dayhour")."</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)); 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 { @@ -2142,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')); @@ -2162,16 +2176,9 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print "</tr>\n"; } } - /*else - { - $colspan=9; - if ($user->rights->produit->supprimer || $user->rights->service->supprimer) $colspan+=1; - print "<tr ".$bc[false].">"; - print '<td colspan="'.$colspan.'">'.$langs->trans('None').'</td>'; - print "</tr>"; - }*/ print "</table>"; + print '</div>'; print "</form>"; } 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 1582646cd8a..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%">'; @@ -244,14 +266,13 @@ if ($id > 0 || !empty($ref)) print '<tr class="liste_titre">'; print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "b.rowid", "", "&amp;id=".$product->id, '', $sortfield, $sortorder); print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "b.date_valid", "", "&amp;id=".$product->id, 'align="center"', $sortfield, $sortorder); - print_liste_field_titre("ToConsume", $_SERVER["PHP_SELF"], "", "", "&amp;id=".$product->id, '', $sortfield, $sortorder, 'center '); - print_liste_field_titre("QtyToProduce", $_SERVER["PHP_SELF"], "", "", "&amp;id=".$product->id, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre("RowMaterial", $_SERVER["PHP_SELF"], "", "", "&amp;id=".$product->id, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre("Finished", $_SERVER["PHP_SELF"], "", "", "&amp;id=".$product->id, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "b.status", "", "&amp;id=".$product->id, '', $sortfield, $sortorder, 'center '); 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 ffd7add3c20..e8c6db0cfff 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"); @@ -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 <> $langs->trans("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 d7a52cd1910..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 */ @@ -119,24 +124,25 @@ class Entrepot extends CommonObject public $fields = array( 'rowid' =>array('type'=>'integer', 'label'=>'ID', 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>10), 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'default'=>1, 'notnull'=>1, 'index'=>1, 'position'=>15), - 'ref' =>array('type'=>'varchar(255)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'showoncombobox'=>1, 'position'=>25), + 'ref' =>array('type'=>'varchar(255)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'showoncombobox'=>1, 'position'=>25, 'searchall'=>1), 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>30), - 'description' =>array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>-2, 'position'=>35), - 'lieu' =>array('type'=>'varchar(64)', 'label'=>'LocationSummary', 'enabled'=>1, 'visible'=>1, 'position'=>40, 'showoncombobox'=>1), + '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), - 'address' =>array('type'=>'varchar(255)', 'label'=>'Address', 'enabled'=>1, 'visible'=>-2, 'position'=>45), - 'zip' =>array('type'=>'varchar(10)', 'label'=>'Zip', 'enabled'=>1, 'visible'=>-2, 'position'=>50), - 'town' =>array('type'=>'varchar(50)', 'label'=>'Town', 'enabled'=>1, 'visible'=>-2, 'position'=>55), + '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), 'fk_departement' =>array('type'=>'sellist:c_departements:label:rowid::active=1', 'label'=>'State', 'enabled'=>1, 'visible'=>0, 'position'=>60), 'fk_pays' =>array('type'=>'sellist:c_country:label:rowid::active=1', 'label'=>'Country', 'enabled'=>1, 'visible'=>-2, 'position'=>65), - 'phone' =>array('type'=>'varchar(20)', 'label'=>'Phone', 'enabled'=>1, 'visible'=>-2, 'position'=>70), - 'fax' =>array('type'=>'varchar(20)', 'label'=>'Fax', 'enabled'=>1, 'visible'=>-2, 'position'=>75), + 'phone' =>array('type'=>'varchar(20)', 'label'=>'Phone', 'enabled'=>1, 'visible'=>-2, 'position'=>70, 'searchall'=>1), + 'fax' =>array('type'=>'varchar(20)', 'label'=>'Fax', 'enabled'=>1, 'visible'=>-2, 'position'=>75, 'searchall'=>1), //'fk_user_author' =>array('type'=>'integer', 'label'=>'Fk user author', 'enabled'=>1, 'visible'=>-2, 'position'=>82), - 'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>500), - 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>501), + 'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>300), + 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>301), //'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>1000), //'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'ModelPDF', 'enabled'=>1, 'visible'=>0, 'position'=>1010), - 'statut' =>array('type'=>'tinyint(4)', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'position'=>200), + 'statut' =>array('type'=>'tinyint(4)', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'position'=>500), ); /** @@ -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 f2c7133618b..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'); @@ -84,88 +90,84 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); -// List of fields to search into when doing a "search in all" -$fieldstosearchall = array( - 't.ref'=>"Ref", - 't.lieu'=>"LocationSummary", - 't.description'=>"Description", - 't.address'=>"Address", - 't.zip'=>'Zip', - 't.town'=>'Town', - 't.phone'=>'Phone', - 't.fax'=>'Fax', -); - // 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'); -} - -// Definition of fields for list -$arrayfields = array( - 'stockqty'=>array('type'=>'float', 'label'=>'PhysicalStock', 'enabled'=>1, 'visible'=>-2, 'position'=>70), - 'estimatedvalue'=>array('type'=>'float', 'label'=>'EstimatedStockValue', 'enabled'=>1, 'visible'=>-2, 'position'=>71), - 'estimatedstockvaluesell'=>array('type'=>'float', 'label'=>'EstimatedStockValueSell', 'enabled'=>1, 'visible'=>-2, 'position'=>72), -); -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']); -} -// 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])) { - $arrayfields["ef.".$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($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$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'); } } + +// 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( + 'stockqty'=>array('type'=>'float', 'label'=>'PhysicalStock', 'enabled'=>1, 'visible'=>-2, 'checked'=>0, 'position'=>170), + 'estimatedvalue'=>array('type'=>'float', 'label'=>'EstimatedStockValue', 'enabled'=>1, 'visible'=>1, 'checked'=>1, 'position'=>171), + 'estimatedstockvaluesell'=>array('type'=>'float', 'label'=>'EstimatedStockValueSell', 'enabled'=>1, 'checked'=>1, 'visible'=>2, 'position'=>172), +); +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'); - /* * 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 } @@ -174,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'; } @@ -196,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 @@ -211,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 @@ -245,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(); @@ -260,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; } @@ -309,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); @@ -326,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">'; @@ -367,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); } @@ -387,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>'; @@ -408,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>'; } } @@ -465,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"; } } @@ -510,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; @@ -533,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') { @@ -557,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; } } @@ -569,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 @@ -606,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"; @@ -626,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'; } @@ -644,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..3221c23aa8d 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,13 +1173,12 @@ 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) -{ +if ($action != 'create' && $action != 'edit' && $action != 'delete' && $id > 0) { print '<br/>'; print '<div class="fichecenter"><div class="fichehalfleft">'; print '<a name="builddoc"></a>'; // ancre @@ -1138,8 +1186,12 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete' && $id > 0) // 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 89df906feda..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>'; @@ -636,19 +643,21 @@ if ($id > 0 || $ref) // Real stock $text_stock_options = $langs->trans("RealStockDesc").'<br>'; $text_stock_options .= $langs->trans("RealStockWillAutomaticallyWhen").'<br>'; - $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE) ? $langs->trans("DeStockOnShipment").'<br>' : ''); - $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) ? $langs->trans("DeStockOnValidateOrder").'<br>' : ''); - $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_BILL) ? $langs->trans("DeStockOnBill").'<br>' : ''); - $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) ? $langs->trans("ReStockOnBill").'<br>' : ''); - $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) ? $langs->trans("ReStockOnValidateOrder").'<br>' : ''); - $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) ? $langs->trans("ReStockOnDispatchOrder").'<br>' : ''); - $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_RECEPTION) || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE) ? $langs->trans("StockOnReception").'<br>' : ''); + $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE) ? '- '.$langs->trans("DeStockOnShipment").'<br>' : ''); + $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) ? '- '.$langs->trans("DeStockOnValidateOrder").'<br>' : ''); + $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_BILL) ? '- '.$langs->trans("DeStockOnBill").'<br>' : ''); + $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) ? '- '.$langs->trans("ReStockOnBill").'<br>' : ''); + $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) ? '- '.$langs->trans("ReStockOnValidateOrder").'<br>' : ''); + $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) ? '- '.$langs->trans("ReStockOnDispatchOrder").'<br>' : ''); + $text_stock_options .= (!empty($conf->global->STOCK_CALCULATE_ON_RECEPTION) || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE) ? '- '.$langs->trans("StockOnReception").'<br>' : ''); print '<tr><td>'; 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 8601ce25ebc..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,30 +104,67 @@ $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)) -{ - if ($action == 'seteatby' && $user->rights->stock->creer) - { - $newvalue = dol_mktime(12, 0, 0, $_POST['eatbymonth'], $_POST['eatbyday'], $_POST['eatbyyear']); +if (empty($reshook)) { + $error = 0; + + $backurlforlist = dol_buildpath('/product/stock/productlot_list.php', 1); + + 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'); - if ($result < 0) dol_print_error($db, $object->error); + if ($result < 0) { + setEventMessages($object->error, null, 'errors'); + $action == 'editeatby'; + } else { + $action = 'view'; + } } - if ($action == 'setsellby' && $user->rights->stock->creer) - { - $newvalue = dol_mktime(12, 0, 0, $_POST['sellbymonth'], $_POST['sellbyday'], $_POST['sellbyyear']); + if ($action == 'setsellby' && $user->rights->stock->creer) { + $newvalue = dol_mktime(12, 0, 0, GETPOST('sellbymonth', 'int'), GETPOST('sellbyday', 'int'), GETPOST('sellbyyear', 'int')); $result = $object->setValueFrom('sellby', $newvalue, '', null, 'date', '', $user, 'PRODUCTLOT_MODIFY'); - if ($result < 0) dol_print_error($db, $object->error); + if ($result < 0) { + setEventMessages($object->error, null, 'errors'); + $action == 'editsellby'; + } else { + $action = 'view'; + } } + $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); @@ -136,8 +184,9 @@ if (empty($reshook)) } } - if ($error) + if ($error) { $action = 'edit_extras'; + } } // Action to add record @@ -152,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'); @@ -241,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'; } @@ -255,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>'; @@ -345,67 +427,84 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '</td>'; print '</tr>'; } + // Other attributes - $cols = 2; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; print '</table>'; 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)) -{ +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').dol_sanitizeFileName($object->ref); - $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 535486f8c62..5b19288deff 100644 --- a/htdocs/product/stock/productlot_document.php +++ b/htdocs/product/stock/productlot_document.php @@ -26,7 +26,7 @@ /** * \file htdocs/product/stock/productlot_document.php * \ingroup product - * \brief Page des documents joints sur les lots produits + * \brief Page of attached documents for porudct lots */ require '../../main.inc.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, 0, $object, $modulepart).dol_sanitizeFileName($object->ref); + 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>'; @@ -153,7 +193,7 @@ if ($object->id) $permission = ($user->rights->produit->creer); $param = '&id='.$object->id; - include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { print $langs->trans("ErrorUnknown"); } 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 ed537f1bd4e..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; } @@ -538,18 +539,16 @@ print dol_get_fiche_head($head, 'replenish', '', -1, ''); print '<span class="opacitymedium">'.$langs->trans("ReplenishmentStatusDesc").'</span>'."\n"; if (empty($fk_warhouse) && !empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE)) { - print '<span class="opacitymedium">'.$langs->trans("ReplenishmentStatusDescPerWarehouse").'</span>'."<br>\n"; + print '<span class="opacitymedium">'.$langs->trans("ReplenishmentStatusDescPerWarehouse").'</span>'."\n"; } -print '<br>'; -if ($usevirtualstock == 1) -{ +print '<br><br>'; +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..d9a9be0cd70 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(); @@ -267,10 +271,15 @@ if ($productid > 0) { 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 9e15a580358..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])) - $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($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$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,12 +420,10 @@ $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 = 'calendarweek'; +$picto = 'clock'; print '<form name="addtime" method="POST" action="'.$_SERVER["PHP_SELF"].($project->id > 0 ? '?id='.$project->id : '').'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; @@ -447,20 +437,22 @@ print '<input type="hidden" name="addtimemonth" value="'.$tmp['mon'].'">'; print '<input type="hidden" name="addtimeday" value="'.$tmp['mday'].'">'; $head = project_timesheet_prepare_head($mode, $usertoprocess); -print dol_get_fiche_head($head, 'inputperday', $langs->trans('TimeSpent'), -1, 'projecttask'); +print dol_get_fiche_head($head, 'inputperday', $langs->trans('TimeSpent'), -1, $picto); // 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,8 +466,11 @@ 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); print '</div>'; print ' '; @@ -500,27 +495,27 @@ $moreforfilter = ''; // If the user can view user other than himself $moreforfilter .= '<div class="divsearchfield">'; -$moreforfilter .= '<div class="inline-block hideonsmartphone">'.$langs->trans('User').' </div>'; +$moreforfilter .= '<div class="inline-block hideonsmartphone"></div>'; $includeonly = 'hierarchyme'; -if (empty($user->rights->user->user->lire)) $includeonly = array($user->id); -$moreforfilter .= $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">'.$langs->trans('Project').' </div>'; - $moreforfilter .= '<input type="text" size="4" name="search_project_ref" class="marginleftonly" value="'.dol_escape_htmltag($search_project_ref).'">'; + $moreforfilter .= '<div class="inline-block"></div>'; + $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">'.$langs->trans('ThirdParty').' </div>'; - $moreforfilter .= '<input type="text" size="4" name="search_thirdparty" class="marginleftonly" value="'.dol_escape_htmltag($search_thirdparty).'">'; + $moreforfilter .= '<div class="inline-block"></div>'; + $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(); @@ -534,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>'; @@ -574,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 @@ -601,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]; } @@ -616,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>'; @@ -642,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>'; @@ -662,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); @@ -677,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]; } @@ -700,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>'; @@ -731,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>'; @@ -763,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 4904e2379f0..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,12 +345,10 @@ $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 = 'calendarweek'; +$picto = 'clock'; print '<form name="addtime" method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; @@ -372,20 +359,22 @@ print '<input type="hidden" name="month" value="'.$month.'">'; print '<input type="hidden" name="year" value="'.$year.'">'; $head = project_timesheet_prepare_head($mode, $usertoprocess); -print dol_get_fiche_head($head, 'inputpermonth', $langs->trans('TimeSpent'), -1, 'projecttask'); +print dol_get_fiche_head($head, 'inputpermonth', $langs->trans('TimeSpent'), -1, $picto); // 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,8 +387,11 @@ 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); print '</div>'; print ' '; @@ -425,27 +417,27 @@ if (! empty($conf->categorie->enabled)) // If the user can view user other than himself $moreforfilter .= '<div class="divsearchfield">'; -$moreforfilter .= '<div class="inline-block hideonsmartphone">'.$langs->trans('User').' </div>'; +$moreforfilter .= '<div class="inline-block hideonsmartphone"></div>'; $includeonly = 'hierachyme'; -if (empty($user->rights->user->user->lire)) $includeonly = array($user->id); -$moreforfilter .= $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">'.$langs->trans('Project').' </div>'; - $moreforfilter .= '<input type="text" size="4" name="search_project_ref" class="marginleftonly" value="'.dol_escape_htmltag($search_project_ref).'">'; + $moreforfilter .= '<div class="inline-block"></div>'; + $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">'.$langs->trans('ThirdParty').' </div>'; - $moreforfilter .= '<input type="text" size="4" name="search_thirdparty" class="marginleftonly" value="'.dol_escape_htmltag($search_thirdparty).'">'; + $moreforfilter .= '<div class="inline-block"></div>'; + $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(); @@ -459,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 @@ -478,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>'; @@ -506,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); @@ -521,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]; } } @@ -545,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; } @@ -559,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>'; @@ -582,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> @@ -614,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"; @@ -628,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 8b49aa2e0c2..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])) - $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($extrafields->attributes['projet_task']['list'][$key]) != 3 && $extrafields->attributes['projet_task']['perms'][$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,12 +440,10 @@ 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 = 'calendarweek'; +$picto = 'clock'; print '<form name="addtime" method="POST" action="'.$_SERVER["PHP_SELF"].'">'; print '<input type="hidden" name="token" value="'.newToken().'">'; @@ -464,20 +456,22 @@ print '<input type="hidden" name="month" value="'.$month.'">'; print '<input type="hidden" name="year" value="'.$year.'">'; $head = project_timesheet_prepare_head($mode, $usertoprocess); -print dol_get_fiche_head($head, 'inputperweek', $langs->trans('TimeSpent'), -1, 'projecttask'); +print dol_get_fiche_head($head, 'inputperweek', $langs->trans('TimeSpent'), -1, $picto); // 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,8 +484,11 @@ 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); print '</div>'; print ' '; @@ -506,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'); @@ -534,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); @@ -544,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">'.$langs->trans('User').' </div>'; +$moreforfilter .= '<div class="inline-block hideonsmartphone"></div>'; $includeonly = 'hierarchyme'; -if (empty($user->rights->user->user->lire)) $includeonly = array($user->id); -$moreforfilter .= $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">'.$langs->trans('Project').' </div>'; - $moreforfilter .= '<input type="text" size="4" name="search_project_ref" class="marginleftonly" value="'.dol_escape_htmltag($search_project_ref).'">'; + $moreforfilter .= '<div class="inline-block"></div>'; + $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">'.$langs->trans('ThirdParty').' </div>'; - $moreforfilter .= '<input type="text" size="4" name="search_thirdparty" class="marginleftonly" value="'.dol_escape_htmltag($search_thirdparty).'">'; + $moreforfilter .= '<div class="inline-block"></div>'; + $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(); @@ -591,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 @@ -632,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>'; } @@ -679,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>'; @@ -713,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); @@ -728,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]; } @@ -753,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; } @@ -768,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>'; @@ -797,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>'; @@ -840,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"; @@ -855,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 a46c64464f8..e0018aa0e4b 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'); @@ -647,8 +615,7 @@ 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'); @@ -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 653083bed04..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,15 +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 - $result = $object->add_contact($user->id, 'PROJECTLEADER', 'internal'); - if ($result < 0) - { + $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) { $langs->load("errors"); setEventMessages($object->error, $object->errors, 'errors'); $error++; @@ -186,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); @@ -198,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); @@ -214,7 +211,7 @@ if (empty($reshook)) } } else { $db->rollback(); - + unset($_POST["ref"]); $action = 'create'; } } else { @@ -222,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; @@ -255,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); @@ -266,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'); } @@ -309,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; @@ -413,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; @@ -424,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 @@ -458,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); @@ -474,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'); @@ -500,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>'; @@ -531,73 +519,77 @@ 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, ...) - 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"' : '') : ' checked="checked"').'"> '; - $htmltext = $langs->trans("ProjectFollowOpportunity"); - print '<label for="usage_opportunity">'.$form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext).'</label>'; - 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(); - } - }); - });'; - print '</script>'; - print '<br>'; + 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"' : '') : ' checked="checked"').'"> '; + $htmltext = $langs->trans("ProjectFollowOpportunity"); + print '<label for="usage_opportunity">'.$form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext).'</label>'; + 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(); + } + }); + });'; + print '</script>'; + print '<br>'; + } + 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)) { + 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>'; + } + 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>'; } - 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)) - { - 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);*/ - 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); @@ -607,9 +599,24 @@ 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"); - print $form->selectarray('public', $array, GETPOST('public') ?GETPOST('public') : $object->public, 0, 0, 0, '', 0, 0, 0, '', '', 1); + 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); + } else { + print '<input type="hidden" name="public" id="public" value="'.(GETPOSTISSET('public') ? GETPOST('public') : $object->public).'">'; + + if ( (GETPOSTISSET('public') ? GETPOST('public') : $object->public)==0) { + print $langs->trans("PrivateProject"); + } else { + print $langs->trans("SharedProject"); + } + } print '</td></tr>'; // Date start @@ -622,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">'; @@ -668,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'); } @@ -679,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 { @@ -721,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(); @@ -737,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')), @@ -788,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">'; @@ -808,83 +807,103 @@ 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 - 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"' : '')).'"> '; - $htmltext = $langs->trans("ProjectFollowOpportunity"); - print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); - print '<script>'; - print '$( document ).ready(function() { + 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"' : '')).'"> '; + $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(); - } - }); - });'; - print '</script>'; - print '<br>'; - } - 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)) - { - 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 (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)) { + 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)) { + 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"); - print $form->selectarray('public', $array, $object->public, 0, 0, 0, '', 0, 0, 0, '', '', 1); + 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); + } else { + print '<input type="hidden" id="public" name="public" value="'.$object->public.'">'; + + if ($object->public == 0) { + print $langs->trans("PrivateProject"); + } else { + print $langs->trans("SharedProject"); + } + } print '</td></tr>'; - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { + if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { $classfortr = ($object->usage_opportunity ? '' : ' hideobject'); // Opportunity status print '<tr class="classuseopportunity'.$classfortr.'"><td>'.$langs->trans("OpportunityStatus").'</td>'; @@ -914,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>'; @@ -936,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); @@ -953,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'); } @@ -971,22 +990,19 @@ 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); - print '<div class="fichecenter">'; print '<div class="fichehalfleft">'; print '<div class="underbanner clearboth"></div>'; @@ -994,64 +1010,79 @@ if ($action == 'create' && $user->rights->projet->creer) print '<table class="border tableforfield" width="100%">'; // Usage - 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"' : '')).'"> '; - $htmltext = $langs->trans("ProjectFollowOpportunity"); - print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); - print '<br>'; + 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"' : '')).'"> '; + $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"' : '')).'"> '; + $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"' : '')).'"> '; + $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>'; } - 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)) - { - 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>'; - } - 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 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($object->opp_amount, '')) print price($object->opp_amount, 0, $langs, 1, 0, -1, $conf->currency); + { + 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); + } 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>'; } @@ -1062,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 @@ -1106,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>'; } @@ -1117,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"> @@ -1180,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 @@ -1200,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>'; @@ -1218,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>'; @@ -1229,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>'; @@ -1240,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>'; @@ -1251,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>'; @@ -1317,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>'; @@ -1335,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..6a08aa7a4bd 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,56 @@ 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); + } + $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 ($updateRes > 0) { - return $updateRes; + if ($updateRes > 0) { + return $updateRes; - } - return false; - } - */ + } + return false; + } + */ /** * Update a task to given project @@ -371,52 +379,52 @@ 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); + } + $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 ($updateRes > 0) { - $result = $this->get($id); - unset($result->line); - return $this->_cleanObjectDatas($result); - } - return false; - }*/ + if ($updateRes > 0) { + $result = $this->get($id); + unset($result->line); + return $this->_cleanObjectDatas($result); + } + return false; + }*/ @@ -443,12 +451,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 +609,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..cd6df68d590 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,56 @@ 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); + } + $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 ($updateRes > 0) { - return $updateRes; + if ($updateRes > 0) { + return $updateRes; - } - return false; - } - */ + } + return false; + } + */ // /** // * Update a task to given project @@ -372,52 +379,52 @@ 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); + } + $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 ($updateRes > 0) { - $result = $this->get($id); - unset($result->line); - return $this->_cleanObjectDatas($result); - } - return false; - }*/ + if ($updateRes > 0) { + $result = $this->get($id); + unset($result->line); + return $this->_cleanObjectDatas($result); + } + return false; + }*/ /** @@ -443,12 +450,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 +527,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 +617,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 f58886c9a3b..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,22 +288,28 @@ 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)) { + if (empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { $this->fields['fk_opp_status']['enabled'] = 0; $this->fields['opp_percent']['enabled'] = 0; $this->fields['opp_amount']['enabled'] = 0; $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..f4b7d8226d0 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; } } @@ -109,7 +110,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 +123,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 e298adcd40c..92f4e4e3b15 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,19 @@ 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"); +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"; llxHeader('', $title, $help_url); $form = new Form($db); -$formcompany = new FormCompany($db); $contactstatic = new Contact($db); $userstatic = new User($db); @@ -133,9 +257,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 +270,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 +292,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,55 +313,67 @@ if ($id > 0 || !empty($ref)) print '<table class="border tableforfield centpercent">'; // Usage - 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"' : '')).'"> '; - $htmltext = $langs->trans("ProjectFollowOpportunity"); - print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); - print '<br>'; + 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"' : '')).'"> '; + $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"' : '')).'"> '; + $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"' : '')).'"> '; + $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>'; } - 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)) - { - 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>'; - } - 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>'; } @@ -236,12 +384,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 @@ -283,10 +435,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 bed7f6a43e1..a069e7bf162 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -48,7 +48,9 @@ $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); @@ -59,16 +61,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"; +} @@ -76,7 +88,7 @@ if (!$sortfield) $sortfield = "name"; * Actions */ -include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; +include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; /* @@ -84,15 +96,16 @@ include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; */ $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"); +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"; 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 +120,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 +133,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); @@ -156,7 +166,7 @@ if ($object->id > 0) $modulepart = 'project'; $permission = ($userWrite > 0); $permtoedit = ($userWrite > 0); - include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { dol_print_error('', 'NoRecordFound'); } diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index aa01ef5d3ef..31f33529774 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; @@ -114,7 +188,9 @@ $hookmanager->initHooks(array('projectOverview')); */ $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"); +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); @@ -139,17 +215,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,55 +236,67 @@ print '<div class="underbanner clearboth"></div>'; print '<table class="border tableforfield centpercent">'; // Usage -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"' : '')).'"> '; - $htmltext = $langs->trans("ProjectFollowOpportunity"); - print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); - print '<br>'; +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"' : '')).'"> '; + $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"' : '')).'"> '; + $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"' : '')).'"> '; + $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>'; } -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)) -{ - 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>'; -} -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>'; } @@ -221,12 +307,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 @@ -271,6 +361,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", @@ -336,8 +438,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", @@ -348,8 +450,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", @@ -486,7 +588,7 @@ $listofreferent = array( 'salaries'=>array( 'name'=>"Salaries", 'title'=>"ListSalariesAssociatedProject", - 'class'=>'PaymentSalary', + 'class'=>'Salary', 'table'=>'payment_salary', 'datefieldname'=>'datev', 'margin'=>'minus', @@ -517,11 +619,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), */ ); @@ -558,24 +660,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'); } } @@ -586,8 +684,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().'">'; @@ -614,7 +711,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'); @@ -623,13 +722,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"; } @@ -651,8 +748,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, @@ -694,25 +790,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'); @@ -743,18 +852,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') { @@ -773,8 +889,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 == 'propal' && $element->status != Propal::STATUS_SIGNED && $element->status != Propal::STATUS_BILLED) $qualifiedforfinalprofit = false; + if ($key == 'intervention' && empty($conf->global->PROJECT_INCLUDE_INTERVENTION_AMOUNT_IN_PROFIT)) { + $qualifiedforfinalprofit = false; + } //var_dump($key.' '.$qualifiedforfinalprofit); // Calculate margin @@ -783,7 +900,7 @@ foreach ($listofreferent as $key => $value) $total_revenue_ht += $total_ht; } - if ($margin != "add") { // Revert sign + if ($margin != "add") { // Revert sign $total_ht = -$total_ht; $total_ttc = -$total_ttc; } @@ -799,18 +916,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>'; @@ -842,8 +965,7 @@ print '<br>'; // Detail -foreach ($listofreferent as $key => $value) -{ +foreach ($listofreferent as $key => $value) { $parameters = array( 'key' => $key, 'value' =>& $value, @@ -870,13 +992,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); @@ -884,20 +1010,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">'; @@ -914,11 +1038,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>'; @@ -937,19 +1061,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; @@ -958,22 +1090,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; @@ -983,26 +1125,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); @@ -1010,8 +1153,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; @@ -1023,19 +1165,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>'; @@ -1045,19 +1186,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); @@ -1075,32 +1216,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; } @@ -1110,18 +1267,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 @@ -1132,28 +1291,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; @@ -1162,113 +1316,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); @@ -1277,8 +1441,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; @@ -1288,8 +1451,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>'; @@ -1297,7 +1459,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>'; @@ -1308,14 +1472,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>'; @@ -1325,28 +1492,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; } } @@ -1357,11 +1529,9 @@ 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'); - $out .= $comboenhancement; print $comboenhancement; } @@ -1382,7 +1552,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')); } @@ -1399,10 +1571,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(); @@ -1414,8 +1584,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 0d34db55fa1..b6b4470dd15 100644 --- a/htdocs/projet/graph_opportunities.inc.php +++ b/htdocs/projet/graph_opportunities.inc.php @@ -17,23 +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, ".MAIN_DB_PREFIX."c_lead_status as cls"; + $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_opp_status = cls.rowid"; $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; @@ -42,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; @@ -66,29 +68,41 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) 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"; + $listofstatus = array_keys($listofoppstatus); - foreach ($listofstatus as $status) - { + // 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 ($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 ($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 6c376fc35f3..c464cf1694b 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'); @@ -95,8 +103,11 @@ $title = $langs->trans("ProjectsArea"); // 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 +120,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 +174,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 +204,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 +223,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 +273,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 +286,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 +304,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.")"; -$sql .= " GROUP BY s.rowid, s.nom, s.email, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.canvas, s.status"; +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 +332,7 @@ if ($resql) print "</tr>\n"; } - while ($i < $num) - { + while ($i < $num) { $obj = $db->fetch_object($resql); if ($i >= $max) { @@ -357,8 +343,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 +365,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 +396,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 5b408717f40..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.'&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 988f16a962a..a0888daee2a 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 ($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->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->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 ba1840c4101..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'); @@ -46,6 +53,18 @@ $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $taskref = GETPOST('taskref', 'alpha'); +// 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; + $backtopage = GETPOST('backtopage', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); @@ -73,16 +92,27 @@ $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); } $extrafields->fetch_name_optionals_label($taskstatic->table_element); $search_array_options = $extrafields->getOptionalsFromPost($taskstatic->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"; +} + + // 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. @@ -112,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); @@ -119,14 +150,8 @@ if ($object->usage_bill_time) { } // Extra fields -if (is_array($extrafields->attributes[$taskstatic->table_element]['label']) && count($extrafields->attributes[$taskstatic->table_element]['label']) > 0) -{ - foreach ($extrafields->attributes[$taskstatic->table_element]['label'] as $key => $val) - { - if (!empty($extrafields->attributes[$taskstatic->table_element]['list'][$key])) - $arrayfields["ef.".$key] = array('label'=>$extrafields->attributes[$taskstatic->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$taskstatic->table_element]['list'][$key] < 0) ? 0 : 1), 'position'=>$extrafields->attributes[$taskstatic->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$taskstatic->table_element]['list'][$key]) != 3 && $extrafields->attributes[$taskstatic->table_element]['perms'][$key])); - } -} +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; + $arrayfields = dol_sort_array($arrayfields, 'position'); $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; @@ -138,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 = ''; @@ -185,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); @@ -213,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 @@ -223,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); @@ -269,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; @@ -286,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; @@ -327,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'); @@ -352,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'; @@ -379,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); @@ -401,37 +462,44 @@ if ($id > 0 || !empty($ref)) print '<table class="border tableforfield" width="100%">'; // Usage - 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"' : '')).'"> '; - $htmltext = $langs->trans("ProjectFollowOpportunity"); - print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); - print '<br>'; + 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"' : '')).'"> '; + $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"' : '')).'"> '; + $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"' : '')).'"> '; + $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>'; } - 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)) - { - 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>'; - } - 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 @@ -441,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 @@ -487,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'); @@ -511,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(''); @@ -519,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; @@ -551,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"); @@ -590,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 } @@ -629,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">'; @@ -652,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>'; @@ -746,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>'; @@ -758,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'; @@ -773,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 '); - if (!empty($arrayfields['t.duration_effective']['checked'])) print_liste_field_titre($arrayfields['t.duration_effective']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['t.progress_calculated']['checked'])) print_liste_field_titre($arrayfields['t.progress_calculated']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['t.progress']['checked'])) print_liste_field_titre($arrayfields['t.progress']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right '); - if (!empty($arrayfields['t.progress_summary']['checked'])) print_liste_field_titre($arrayfields['t.progress_summary']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'center '); - 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'; @@ -799,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>'; } @@ -818,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 51bf3b6dfa8..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,60 +147,72 @@ if ($id > 0 || !empty($ref)) print '<table class="border centpercent">'; // Usage - 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"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> '; - $htmltext = $langs->trans("ProjectFollowOpportunity"); - print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); - print '<br>'; + 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"' : '') : ($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)) { + 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)) { + 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>'; } - 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_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>'; - } - 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>'; - // Usage - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) && !empty($object->usage_opportunity)) - { + // Opportunities + 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, $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>'; } @@ -213,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 @@ -269,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 253c2c787e4..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,30 +57,34 @@ $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'; + } + $result = $object->fetch($id, $ref); - if ($result > 0 && $id > 0) - { - $idfortaskuser = (GETPOST("contactid") != 0) ?GETPOST("contactid") : GETPOST("userid"); // GETPOST('contactid') may val -1 to mean empty or -2 to means "everybody" - if ($idfortaskuser == -2) - { + 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'); + } else { + $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) { $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) - { - $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); - $result = $object->add_contact($val, $type, GETPOST("source", 'aZ09')); + foreach ($contactsofproject as $key => $val) { + $result = $object->add_contact($val, $typeid, $source); } } } else { - $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); - $result = $object->add_contact($idfortaskuser, $typeid, GETPOST("source", 'aZ09')); + $result = $object->add_contact($idfortaskuser, $typeid, $source); } } @@ -96,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 { @@ -121,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)); @@ -154,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); @@ -186,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); @@ -208,37 +209,44 @@ if ($id > 0 || !empty($ref)) print '<table class="border tableforfield centpercent">'; // Usage - 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"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> '; - $htmltext = $langs->trans("ProjectFollowOpportunity"); - print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); - print '<br>'; + 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"' : '') : ($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)) { + 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)) { + 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>'; } - 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_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>'; - } - 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 @@ -248,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 @@ -306,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").': '; @@ -345,18 +357,25 @@ 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; } */ /* * Add a new contact line */ + print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="POST">'; + 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.'">'; + } + 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>'; @@ -365,13 +384,6 @@ if ($id > 0 || !empty($ref)) print '<td colspan="3">&nbsp;</td>'; print "</tr>\n"; - print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="POST">'; - print '<input type="hidden" name="token" value="'.newToken().'">'; - print '<input type="hidden" name="action" value="addcontact">'; - print '<input type="hidden" name="source" value="internal">'; - print '<input type="hidden" name="id" value="'.$id.'">'; - if ($withproject) print '<input type="hidden" name="withproject" value="'.$withproject.'">'; - // Ligne ajout pour contact interne print '<tr class="oddeven nohover">'; @@ -385,28 +397,21 @@ 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'); - print $form->select_dolusers((GETPOST('contactid') ?GETPOST('contactid') : $user->id), 'contactid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 1, $langs->trans("ResourceNotAssignedToProject")); + 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>'; $formcompany->selectTypeContact($object, '', 'type', 'internal', 'rowid'); print '</td>'; - print '<td class="right" colspan="3" ><input type="submit" class="button" value="'.$langs->trans("Add").'"></td>'; + print '<td class="right" colspan="3" ><input type="submit" class="button" value="'.$langs->trans("Add").'" name="addsourceinternal"></td>'; print '</tr>'; - print '</form>'; - // Line to add an external contact. Only if project linked to a third party. - if ($projectstatic->socid) - { - 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="addcontact">'; - print '<input type="hidden" name="source" value="external">'; - print '<input type="hidden" name="id" value="'.$object->id.'">'; - if ($withproject) print '<input type="hidden" name="withproject" value="'.$withproject.'">'; - + if ($projectstatic->socid) { print '<tr class="oddeven">'; print '<td class="nowrap">'; @@ -421,18 +426,18 @@ if ($id > 0 || !empty($ref)) print '<td>'; $contactofproject = $projectstatic->getListContactId('external'); - print $form->selectcontacts($selectedCompany, '', 'contactid', 0, '', $contactofproject); + print $form->selectcontacts($selectedCompany, '', 'contactid', 0, '', $contactofproject, 0, '', false, 0, 0); $nbofcontacts = $form->num; print '</td>'; print '<td>'; - $formcompany->selectTypeContact($object, '', 'type', 'external', 'rowid'); + $formcompany->selectTypeContact($object, '', 'typecontact', 'external', 'rowid'); print '</td>'; - print '<td class="right" colspan="3" ><input type="submit" class="button" id="add-customer-contact" value="'.$langs->trans("Add").'"'; - if (!$nbofcontacts) print ' disabled'; + 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'; + } print '></td>'; print '</tr>'; - - print "</form>"; } } @@ -448,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']; @@ -496,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']; @@ -513,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'); @@ -535,13 +540,14 @@ if ($id > 0 || !empty($ref)) } } print "</table>"; + + print "</form>"; } else { print "ErrorRecordNotFound"; } } -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 ca273bb36ef..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,37 +166,44 @@ if ($object->id > 0) print '<table class="border tableforfield centpercent">'; // Usage - 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"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> '; - $htmltext = $langs->trans("ProjectFollowOpportunity"); - print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); - print '<br>'; + 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"' : '') : ($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)) { + 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)) { + 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>'; } - 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_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>'; - } - 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 @@ -203,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 @@ -255,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); @@ -307,12 +320,14 @@ 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; $relativepathwithnofile = dol_sanitizeFileName($projectstatic->ref).'/'.dol_sanitizeFileName($object->ref).'/'; - include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { header('Location: index.php'); exit; diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index b9d1a19c629..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,39 +123,35 @@ $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 -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], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key] < 0) ? 0 : 1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key])); - } -} +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'); @@ -152,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 = ""; @@ -199,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; +} @@ -215,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; @@ -226,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) @@ -242,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,"; @@ -272,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(); @@ -289,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; } @@ -362,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; } @@ -372,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'); @@ -384,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">'; @@ -435,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); @@ -449,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(); @@ -493,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'])) -{ +// Task Description +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>'; @@ -608,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; @@ -669,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 @@ -683,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'])) - { - print '<td class="nowrap">'; + 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); @@ -761,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; @@ -862,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; @@ -879,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'; @@ -890,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"; } @@ -929,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 af5709c7322..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,37 +141,44 @@ if ($object->id > 0) print '<table class="border tableforfield centpercent">'; // Usage - 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"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> '; - $htmltext = $langs->trans("ProjectFollowOpportunity"); - print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); - print '<br>'; + 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"' : '') : ($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)) { + 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)) { + 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>'; } - 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_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>'; - } - 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 @@ -182,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 @@ -235,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 230dd126de8..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,37 +252,44 @@ if ($id > 0 || !empty($ref)) print '<table class="border tableforfield centpercent">'; // Usage - 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"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> '; - $htmltext = $langs->trans("ProjectFollowOpportunity"); - print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); - print '<br>'; + 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"' : '') : ($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)) { + 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)) { + 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>'; } - 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_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>'; - } - 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 @@ -295,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 @@ -372,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">'; @@ -393,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>'; } @@ -441,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'); } @@ -465,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); @@ -504,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); @@ -519,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>'; @@ -545,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 @@ -578,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>'; @@ -619,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); @@ -634,7 +639,8 @@ if ($id > 0 || !empty($ref)) // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, 'task', $socid, 1, '', 10, 'withproject='.$withproject); + $defaultthirdpartyid = $socid > 0 ? $socid : $object->project->socid; + $formactions->showactions($object, 'task', $defaultthirdpartyid, 1, '', 10, 'withproject='.$withproject); print '</div></div></div>'; } diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index c18ec6e4434..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 = $_POST["timespent_note"]; - if (GETPOST('progress', 'int') > 0) $object->progress = GETPOST('progress', 'int'); // If progress is -1 (not defined), we do not change value - $object->timespent_duration = $_POST["timespent_durationhour"] * 60 * 60; // We store duration in seconds - $object->timespent_duration += ($_POST["timespent_durationmin"] ? $_POST["timespent_durationmin"] : 0) * 60; // We store duration in seconds - if (GETPOST("timehour") != '' && GETPOST("timehour") >= 0) // If hour was entered - { + $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 $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 = $_POST["timespent_note_line"]; - $object->timespent_old_duration = $_POST["old_duration"]; - $object->timespent_duration = $_POST["new_durationhour"] * 60 * 60; // We store duration in seconds - $object->timespent_duration += ($_POST["new_durationmin"] ? $_POST["new_durationmin"] : 0) * 60; // We store duration in seconds - if (GETPOST("timelinehour") != '' && GETPOST("timelinehour") >= 0) // If hour was entered - { + $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 $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'); @@ -248,23 +255,21 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$cancel && $us $object->fetch($id, $ref); // TODO Check that ($task_time->fk_user == $user->id || in_array($task_time->fk_user, $childids)) - $object->timespent_id = $_POST["lineid"]; - $object->timespent_note = $_POST["timespent_note_line"]; - $object->timespent_old_duration = $_POST["old_duration"]; - $object->timespent_duration = $_POST["new_durationhour"] * 60 * 60; // We store duration in seconds - $object->timespent_duration += ($_POST["new_durationmin"] ? $_POST["new_durationmin"] : 0) * 60; // We store duration in seconds - if (GETPOST("timelinehour") != '' && GETPOST("timelinehour") >= 0) // If hour was entered - { + $object->timespent_id = GETPOST("lineid", 'int'); + $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 $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->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,37 +612,44 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) print '<table class="border tableforfield centpercent">'; // Usage - 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"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> '; - $htmltext = $langs->trans("ProjectFollowOpportunity"); - print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); - print '<br>'; + 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"' : '') : ($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)) { + 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)) { + 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>'; } - 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_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>'; - } - 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 @@ -658,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 @@ -708,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 @@ -733,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); @@ -797,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>'; @@ -823,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>'; @@ -845,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); } @@ -858,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); } @@ -869,44 +872,72 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) $arrayfields['value'] = array('label'=>$langs->trans("Value"), 'checked'=>1, 'enabled'=>(empty($conf->salaries->enabled) ? 0 : 1)); $arrayfields['valuebilled'] = array('label'=>$langs->trans("Billed"), 'checked'=>1, 'enabled'=>(((!empty($conf->global->PROJECT_HIDE_TASKS) || empty($conf->global->PROJECT_BILL_TIME_SPENT)) ? 0 : 1) && $projectstatic->usage_bill_time)); // 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])) - $arrayfields["ef.".$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($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key])); - } - } + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; + $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.'">'; @@ -916,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) { @@ -945,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'); @@ -1004,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; } @@ -1044,26 +1084,23 @@ 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"); - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $linktocreatetime, '', $limit, 0, 0, 1); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'clock', 0, $linktocreatetime, '', $limit, 0, 0, 1); } else { print '<!-- List of time spent for project -->'."\n"; $title = $langs->trans("ListTaskTimeForTask"); - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $linktocreatetime, '', $limit, 0, 0, 1); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'clock', 0, $linktocreatetime, '', $limit, 0, 0, 1); } $i = 0; - while ($i < $num) - { + while ($i < $num) { $row = $db->fetch_object($resql); $tasks[$i] = $row; $i++; @@ -1076,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>'; @@ -1102,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>'; @@ -1119,14 +1156,18 @@ 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(); - print $form->select_dolusers((GETPOST('userid', 'int') ? GETPOST('userid', 'int') : $userid), 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToProject"), 'maxwidth200'); + 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) { print img_error($langs->trans('FirstAddRessourceToAllocateTime')).' '.$langs->trans('FirstAddRessourceToAllocateTime'); @@ -1142,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'); @@ -1155,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>'; } @@ -1176,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>'; @@ -1196,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, '', 'maxwidth150').'</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 @@ -1236,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'; @@ -1268,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">'; @@ -1278,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; @@ -1310,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; @@ -1354,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 { @@ -1430,7 +1506,9 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) } } print '</td>'; - if (!$i) $totalarray['nbfield']++; + if (!$i) { + $totalarray['nbfield']++; + } } /* @@ -1445,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(); @@ -1473,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')); } @@ -1511,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; @@ -1525,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>'; @@ -1536,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; @@ -1564,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 { @@ -1594,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); @@ -1603,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>'; } @@ -1633,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')); } @@ -1649,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; @@ -1663,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>'; @@ -1674,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; @@ -1702,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 { @@ -1732,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); @@ -1741,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>'; } @@ -1771,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..d1441a4a98c 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(); @@ -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 ccbf8f5c1d3..ea9eeb377e7 100644 --- a/htdocs/public/emailing/mailing-read.php +++ b/htdocs/public/emailing/mailing-read.php @@ -25,13 +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('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 @@ -53,6 +70,8 @@ function llxFooter() require '../../main.inc.php'; +$mtid = GETPOST('mtid'); +$email = GETPOST('email'); $tag = GETPOST('tag'); $securitykey = GETPOST('securitykey'); @@ -63,31 +82,61 @@ $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)) -{ - $statut = '2'; - $sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles SET statut=".$statut." WHERE tag='".$db->escape($tag)."'"; - dol_syslog("public/emailing/mailing-read.php : Mail read : ".$sql, LOG_DEBUG); +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"; + $sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc, ".MAIN_DB_PREFIX."mailing as m"; + $sql .= " WHERE mc.fk_mailing = m.rowid AND mc.tag='".$db->escape($tag)."'"; $resql = $db->query($sql); + if (!$resql) dol_print_error($db); + + $obj = $db->fetch_object($resql); + + if (empty($obj)) { + print 'Email target not valid. Operation canceled.'; + exit; + } + if (empty($obj->email)) { + print 'Email target not valid. Operation canceled.'; + exit; + } + if ($obj->statut == 2 || $obj->statut == 3) { + print 'Email target already set to read or unsubscribe. Operation canceled.'; + exit; + } + // TODO Test that mtid and email match also with the one found from $tag + /* + if ($obj->email != $email) + { + print 'Email does not match tagnot found. No need to unsubscribe.'; + exit; + } + */ + + //Update status of target + $statut = '2'; + $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 - $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=3 WHERE fk_stcomm != -1 AND rowid IN (SELECT source_id FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE tag='".$db->escape($tag)."' AND source_type='thirdparty' AND source_id is not null)"; - dol_syslog("public/emailing/mailing-read.php : Mail read thirdparty : ".$sql, LOG_DEBUG); - - $resql = $db->query($sql); + 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 = '.((int) $obj->source_id); + $resql = $db->query($sql); + } //Update status communication of contact prospect - $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm=3 WHERE fk_stcomm != -1 AND rowid IN (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."socpeople AS sc INNER JOIN ".MAIN_DB_PREFIX."mailing_cibles AS mc ON mc.tag = '".$db->escape($tag)."' AND mc.source_type = 'contact' AND mc.source_id = sc.rowid)"; - dol_syslog("public/emailing/mailing-read.php : Mail read contact : ".$sql, LOG_DEBUG); - - $resql = $db->query($sql); + 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 = '.((int) $obj->source_id).')'; + $resql = $db->query($sql); + } } $db->close(); diff --git a/htdocs/public/emailing/mailing-unsubscribe.php b/htdocs/public/emailing/mailing-unsubscribe.php index 0d62545cf57..9c39dafa18d 100644 --- a/htdocs/public/emailing/mailing-unsubscribe.php +++ b/htdocs/public/emailing/mailing-unsubscribe.php @@ -27,11 +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('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 @@ -58,6 +71,8 @@ global $user, $conf, $langs; $langs->loadLangs(array("main", "mails")); +$mtid = GETPOST('mtid'); +$email = GETPOST('email'); $tag = GETPOST('tag'); $unsuscrib = GETPOST('unsuscrib'); $securitykey = GETPOST('securitykey'); @@ -69,38 +84,55 @@ $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.email, m.entity"; + $sql = "SELECT mc.rowid, mc.email, mc.statut, m.entity"; $sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc, ".MAIN_DB_PREFIX."mailing as m"; $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); - if (empty($obj->email)) - { - print 'Email not found. No need to unsubscribe.'; + if (empty($obj)) { + print 'Email target not valid. Operation canceled.'; exit; } + if (empty($obj->email)) { + print 'Email target not valid. Operation canceled.'; + exit; + } + if ($obj->statut == 3) { + print 'Email target already set to unsubscribe. Operation canceled.'; + exit; + } + // TODO Test that mtid and email match also with the one found from $tag + /* + if ($obj->email != $email) + { + print 'Email does not match tagnot found. No need to unsubscribe.'; + exit; + } + */ // Update status of mail in recipient mailing list table $statut = '3'; $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) @@ -109,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); @@ -117,7 +149,7 @@ if (!empty($tag) && ($unsuscrib == '1')) */ // Update status communication of email (new usage) - $sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_unsubscribe (date_creat, entity, email) VALUES ('".$db->idate(dol_now())."', ".$db->escape($obj->entity).", '".$db->escape($obj->email)."')"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_unsubscribe (date_creat, entity, email, unsubscribegroup, ip) VALUES ('".$db->idate(dol_now())."', ".$db->escape($obj->entity).", '".$db->escape($obj->email)."', '', '".$db->escape(getUserRemoteIP())."')"; $resql = $db->query($sql); //if (! $resql) dol_print_error($db); No test on errors, may fail if already unsubscribed 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..3d1ee6272cc --- /dev/null +++ b/htdocs/public/eventorganization/attendee_subscription.php @@ -0,0 +1,414 @@ +<?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.'/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); + +// 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 (!GETPOST("societe")) { + $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").' </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..e6b7a3e7a38 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"); @@ -200,11 +214,11 @@ 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"; } @@ -213,8 +227,8 @@ if (empty($reshook) && $action == 'add') { $langs->load("errors"); $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 (GETPOSTISSET("birthmonth") && empty($birthday)) { $error++; $langs->load("errors"); $errmsg .= $langs->trans("ErrorBadDateFormat")."<br>\n"; @@ -226,40 +240,45 @@ if (empty($reshook) && $action == 'add') { } } - if (isset($public)) $public = 1; - else $public = 0; + if (GETPOSTISSET('public')) { + $public = 1; + } else { + $public = 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 = GETPOST("country_id", 'int'); + $adh->state_id = GETPOST("state_id", 'int'); + $adh->typeid = GETPOST("type", 'int'); + $adh->note_private = GETPOST("note_private"); + $adh->morphy = 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 +304,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 +324,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 +337,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 +380,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 +395,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 +410,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 +425,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 +444,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++; @@ -572,7 +615,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 +626,11 @@ 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); + } else { + print ''; + } print '</td></tr>'; } // EMail @@ -594,7 +642,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 +650,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 templae context to public include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; // Comments print '<tr>'; 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 1a643323dce..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,11 +867,12 @@ 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)) - { - print '<input type="hidden" name="amount" value="'.GETPOST("amount", 'int').'">'; + 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 { print '<b>'.price($amount).'</b>'; @@ -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", 'int')) $amount = GETPOST("amount", 'int'); + 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,11 +962,12 @@ 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)) - { - print '<input type="hidden" name="amount" value="'.GETPOST("amount", 'int').'">'; + 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 { print '<b>'.price($amount).'</b>'; @@ -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", 'int'); + 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,14 +1086,15 @@ 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)) - { - print '<input type="hidden" name="amount" value="'.GETPOST("amount", 'int').'">'; + 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 { print '<b>'.price($amount).'</b>'; @@ -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", 'int')) $amount = GETPOST("amount", 'int'); + 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,11 +1293,12 @@ 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)) - { - print '<input type="hidden" name="amount" value="'.GETPOST("amount", 'int').'">'; + 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 { print '<b>'.price($amount).'</b>'; @@ -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 == 'membersubscription') -{ +if ($source == 'member' || $source == 'membersubscription') { $found = true; $langs->load("members"); @@ -1346,8 +1360,7 @@ if ($source == 'membersubscription') $member = new Adherent($db); $result = $member->fetch('', $ref); - if ($result <= 0) - { + if ($result <= 0) { $mesg = $member->error; $error++; } else { @@ -1356,18 +1369,21 @@ if ($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", 'int')) $amount = GETPOST("amount", 'int'); - $amount = price2num($amount); + if (GETPOST("amount", 'alpha')) { + $amount = GETPOST("amount", 'alpha'); + } + $amount = price2num($amount, 'MT'); } if (GETPOST('fulltag', 'alpha')) { $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 == '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 == '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 == '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,15 +1502,24 @@ if ($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); - print '<input type="hidden" name="amount" value="'.GETPOST("amount", 'int').'">'; - print '<input class="flat maxwidth75" type="text" name="newamount" value="'.$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>'; + print '<input type="hidden" name="newamount" value="'.$valtoshow.'">'; + } else { + print '<input class="flat maxwidth75" type="text" name="newamount" value="'.$valtoshow.'">'; + } } else { $valtoshow = $amount; - 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); + $amount = $valtoshow; + } print '<b>'.price($valtoshow).'</b>'; print '<input type="hidden" name="amount" value="'.$valtoshow.'">'; print '<input type="hidden" name="newamount" value="'.$valtoshow.'">'; @@ -1478,8 +1545,7 @@ if ($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"; @@ -1492,16 +1558,19 @@ if ($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"); @@ -1509,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 { @@ -1518,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", 'int')) $amount = GETPOST("amount", 'int'); + if (GETPOST("amount", 'alpha')) { + $amount = GETPOST("amount", 'alpha'); + } $amount = price2num($amount); } @@ -1529,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); @@ -1542,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).'">'; @@ -1558,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; @@ -1583,15 +1662,19 @@ 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); - print '<input type="hidden" name="amount" value="'.GETPOST("amount", 'int').'">'; + 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 { $valtoshow = $amount; - 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); + $amount = $valtoshow; + } print '<b>'.price($valtoshow).'</b>'; print '<input type="hidden" name="amount" value="'.$valtoshow.'">'; print '<input type="hidden" name="newamount" value="'.$valtoshow.'">'; @@ -1617,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"; @@ -1631,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>'; @@ -1683,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>'; @@ -1703,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>'; @@ -1725,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>'; } @@ -1779,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> /** @@ -1834,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; } @@ -1849,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 payed) + // 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'); + } } } @@ -1867,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>'; } @@ -1896,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.'">'; @@ -1911,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 { @@ -1923,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; @@ -1947,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'), @@ -1964,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(); @@ -1977,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({ @@ -2024,248 +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 - { - 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 ac92c958931..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 define must be done before including main.inc.php +// 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 ef4931c4b4a..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,42 +444,44 @@ 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; $ispostactionok = -1; } else { - $postactionmessages[] = 'Subscription created'; + $postactionmessages[] = 'Subscription created (id='.$crowid.')'; $ispostactionok = 1; } } - 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 } @@ -614,43 +666,46 @@ if ($ispaymentok) $ispostactionok = -1; } } else { - $postactionmessages[] = 'Member '.$tmptag['MEM'].' for subscription payed was not found'; + $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(); @@ -718,7 +773,7 @@ if ($ispaymentok) $ispostactionok = -1; } } else { - $postactionmessages[] = 'Invoice payed '.$tmptag['INV'].' was not found'; + $postactionmessages[] = 'Invoice paid '.$tmptag['INV'].' was not found'; $ispostactionok = -1; } } else { @@ -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 bfb1bc99c5a..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 ref = '".$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/theme/eldy/doc/badges.php b/htdocs/public/test/badges.php similarity index 90% rename from htdocs/theme/eldy/doc/badges.php rename to htdocs/public/test/badges.php index 52a422a053c..fd0add00af1 100644 --- a/htdocs/theme/eldy/doc/badges.php +++ b/htdocs/public/test/badges.php @@ -1,39 +1,55 @@ <?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'); -require_once '../../../main.inc.php'; +require_once '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; +if ($dolibarr_main_prod) { + accessforbidden(); +} + ?> <!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."> - - <link href="../style.css.php" rel="stylesheet"> - <link href="doc.css" rel="stylesheet"> + <link href="<?php echo DOL_URL_ROOT ?>/theme/eldy/style.css.php" rel="stylesheet"> </head> - <body class="docpage" > - - <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> + <body class="docpage" style="padding: 20px;"> - <h2 id="example">Example</h2> + <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> + + <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> - + <div class="bd-example"> <h1>Example heading <span class="badge badge-secondary">New</span></h1> <h2>Example heading <span class="badge badge-secondary">New</span></h2> @@ -42,39 +58,39 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; <h5>Example heading <span class="badge badge-secondary">New</span></h5> <h6>Example heading <span class="badge badge-secondary">New</span></h6> </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; &lt;h3&gt;Example heading &lt;span class=&quot;badge badge-secondary&quot;&gt;New&lt;/span&gt;&lt;/h3&gt; &lt;h4&gt;Example heading &lt;span class=&quot;badge badge-secondary&quot;&gt;New&lt;/span&gt;&lt;/h4&gt; &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> - + <div class="bd-example"> <button type="button" class="button"> Notifications <span class="badge badge-primary">4</span> </button> </div> - + <figure class="highlight"><pre> &lt;button type=&quot;button&quot; class=&quot;button&quot;&gt; Notifications &lt;span class=&quot;badge badge-primary&quot;&gt;4&lt;/span&gt; &lt;/button&gt; </pre></figure> - - <div class="warning"> + + <div class="warning"> <p>Note that depending on how they are used, badges may be confusing for users of screen readers and similar assistive technologies. While the styling of badges provides a visual cue as to their purpose, these users will simply be presented with the content of the badge. Depending on the specific situation, these badges may seem like random additional words or numbers at the end of a sentence, link, or button.</p> - + <p>Unless the context is clear (as with the “Notifications” example, where it is understood that the “4” is the number of notifications), consider including additional context with a visually hidden piece of additional text.</p> - + <p><strong>Remember to use aria-label attribute for accessibility in Dolibarr. Don't forget to use aria-hidden on icons included in badges</strong></p> </div> @@ -84,26 +100,26 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; <span class="sr-only">unread messages</span> </button> </div> - + <figure class="highlight"> - <pre> - - + <pre> + + &lt;button type=&quot;button&quot; class=&quot;btn btn-primary&quot;&gt; Profile &lt;span class=&quot;badge badge-light&quot; aria-label=&quot;9 unread messages&quot; &gt;9&lt;/span&gt; &lt;span class=&quot;sr-only&quot;&gt;unread messages&lt;/span&gt; &lt;/button&gt; - - - </pre> + + + </pre> </figure> - + <h2 id="contextual-variations">Contextual variations</h2> - + <p>Add any of the below mentioned modifier classes to change the appearance of a badge.</p> - + <div class="bd-example"> - + <span class="badge badge-primary">Primary</span> <span class="badge badge-secondary">Secondary</span> <span class="badge badge-success">Success</span> @@ -113,10 +129,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; <span class="badge badge-light">Light</span> <span class="badge badge-dark">Dark</span> </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; &lt;span class=&quot;badge badge-success&quot;&gt;Success&lt;/span&gt; @@ -125,41 +141,41 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; &lt;span class=&quot;badge badge-info&quot;&gt;Info&lt;/span&gt; &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"> <h5 id="conveying-meaning-to-assistive-technologies">Conveying meaning to assistive technologies</h5> - + <p>Using color to add meaning only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (e.g. the visible text), or is included through alternative means, such as additional text hidden with the .sr-only class.</p> </div> - - + + <h2 id="contextual-variations">Default status</h2> - + <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> - - + + <h2 id="pill-badges">Pill badges</h2> - + <p>Use the .badge-pill modifier class to make badges more rounded (with a larger border-radius and additional horizontal padding).</p> - + <div class="bd-example"> - + <span class="badge badge-pill badge-primary">Primary</span> <span class="badge badge-pill badge-secondary">Secondary</span> <span class="badge badge-pill badge-success">Success</span> @@ -168,16 +184,16 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; <span class="badge badge-pill badge-info">Info</span> <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; ?> - + </div> - + <figure class="highlight"> <pre> - + &lt;span class=&quot;badge badge-pill badge-primary&quot;&gt;Primary&lt;/span&gt; &lt;span class=&quot;badge badge-pill badge-secondary&quot;&gt;Secondary&lt;/span&gt; &lt;span class=&quot;badge badge-pill badge-success&quot;&gt;Success&lt;/span&gt; @@ -186,19 +202,19 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; &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> - - - + + + <h2 id="dot-badges">Dot badges</h2> - + <p>.dot-pill modifier class to make badges circle.</p> - + <div class="bd-example"> - + <span class="badge badge-dot badge-primary"></span> <span class="badge badge-dot badge-secondary"></span> <span class="badge badge-dot badge-success"></span> @@ -207,16 +223,16 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; <span class="badge badge-dot badge-info"></span> <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; ?> - + </div> - + <figure class="highlight"> <pre> - + &lt;span class=&quot;badge badge-dot badge-primary&quot;&gt;&lt;/span&gt; &lt;span class=&quot;badge badge-dot badge-secondary&quot;&gt;&lt;/span&gt; &lt;span class=&quot;badge badge-dot badge-success&quot;&gt;&lt;/span&gt; @@ -225,27 +241,27 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; &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> - - -<div class="warning"> + + +<div class="warning"> <p>Note that depending on how they are used, badges may be confusing for users of screen readers and similar assistive technologies. While the styling of badges provides a visual cue as to their purpose, these users will simply be presented with the content of the badge. Depending on the specific situation, these badges may seem like random additional words or numbers at the end of a sentence, link, or button.</p> - + <p>Unless the context is clear (as with the “Notifications” example, where it is understood that the “4” is the number of notifications), consider including additional context with a visually hidden piece of additional text.</p> - + <p><strong>Remember to use aria-label attribute for accessibility in Dolibarr. Don't forget to use aria-hidden on icons included in badges</strong></p> -</div> - - +</div> + + <h2 id="links">Links</h2> - + <p>Using the contextual .badge-* classes on an &lt;a&gt; element quickly provide <em>actionable</em> badges with hover and focus states.</p> - + <div class="bd-example"> - + <a href="#" class="badge badge-primary">Primary</a> <a href="#" class="badge badge-secondary">Secondary</a> <a href="#" class="badge badge-success">Success</a> @@ -254,12 +270,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; <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; ?> - + </div> - + <figure class="highlight"><pre> &lt;a href=&quot;#&quot; class=&quot;badge badge-primary&quot;&gt;Primary&lt;/a&gt; &lt;a href=&quot;#&quot; class=&quot;badge badge-secondary&quot;&gt;Secondary&lt;/a&gt; @@ -269,7 +285,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; &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> @@ -280,12 +296,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; <?php print dolGetBadge('your label for accessibility', 'your label <u>with</u> <em>html</em>', 'primary') ?> <?php print dolGetBadge('your label for accessibility', 'your label <u>with</u> <em>html</em>', 'danger', 'pill') ?> <?php print dolGetBadge('your label for accessibility', 'your label <u>with</u> <em>html</em>', 'warning', 'dot') ?> - + <figure class="highlight"><pre> &lt;?php print dolGetBadge('your label for accessibility', 'your label &lt;u&gt;with&lt;/u&gt; &lt;em&gt;html&lt;/em&gt;', 'danger', 'pill') ?&gt; &lt;?php print dolGetBadge('your label for accessibility', 'your label &lt;u&gt;with&lt;/u&gt; &lt;em&gt;html&lt;/em&gt;', 'warning', 'dot') ?&gt; </pre></figure> - + <h2 id="helper">Use status helper function</h2> <p>Using the dolGetStatus function provide in core/lib/functions.lib.php. This function is recommended for code uniformisation and easy maintain</p> <?php @@ -311,8 +327,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; <p><?php print dolGetStatus('your label for accessibility', 'your label', 'your label <u>with</u> <em>html</em>', 'status4', 6) ?></p> <?php $conf->global->MAIN_STATUS_USES_CSS = $saveGlobalConf; ?> - - + + <figure class="highlight"><pre> &lt;?php print dolGetStatus('your label for accessibility', 'your label', 'your label &lt;u&gt;with&lt;/u&gt; &lt;em&gt;html&lt;/em&gt;', 'status4') ?&gt; &lt;?php print dolGetStatus('your label for accessibility', 'your label', 'your label &lt;u&gt;with&lt;/u&gt; &lt;em&gt;html&lt;/em&gt;', 'status4',1) ?&gt; @@ -323,8 +339,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; &lt;?php print dolGetStatus('your label for accessibility', 'your label', 'your label &lt;u&gt;with&lt;/u&gt; &lt;em&gt;html&lt;/em&gt;', 'status4',6) ?&gt; </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 1c81faca1ad..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(); @@ -307,7 +334,9 @@ if (empty($reshook) && $action == 'create_ticket' && GETPOST('add', 'alpha')) { //setEventMessages($langs->trans('YourTicketSuccessfullySaved'), null, 'mesgs'); // Make a redirect to avoid to have ticket submitted twice if we make back - setEventMessages($langs->trans('MesgInfosPublicTicketCreatedWithTrackId', '<strong>'.$object->track_id.'</strong>', '<strong>'.$object->ref.'</strong>'), null, 'warnings'); + $messagetoshow = $langs->trans('MesgInfosPublicTicketCreatedWithTrackId', '{s1}', '{s2}'); + $messagetoshow = str_replace(array('{s1}', '{s2}'), array('<strong>'.$object->track_id.'</strong>', '<strong>'.$object->ref.'</strong>'), $messagetoshow); + setEventMessages($messagetoshow, null, 'warnings'); setEventMessages($langs->trans('PleaseRememberThisId'), null, 'warnings'); header("Location: index.php"); exit; @@ -363,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 0f9542c986a..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'; @@ -51,7 +55,7 @@ $langs->loadLangs(array("companies", "other", "ticket")); // Get parameters $track_id = GETPOST('track_id', 'alpha'); $action = GETPOST('action', 'aZ09'); -$email = GETPOST('email', 'alpha'); +$email = strtolower(GETPOST('email', 'alpha')); if (GETPOST('btn_view_ticket_list')) { unset($_SESSION['track_id_customer']); @@ -61,7 +65,7 @@ if (isset($_SESSION['track_id_customer'])) { $track_id = $_SESSION['track_id_customer']; } if (isset($_SESSION['email_customer'])) { - $email = $_SESSION['email_customer']; + $email = strtolower($_SESSION['email_customer']); } $object = new Ticket($db); @@ -101,7 +105,7 @@ if ($action == "view_ticketlist") { // vérifie si l'adresse email est bien dans les contacts du ticket $contacts = $object->liste_contact(-1, 'external'); foreach ($contacts as $contact) { - if ($contact['email'] == $email) { + if (strtolower($contact['email']) == $email) { $display_ticket_list = true; $_SESSION['email_customer'] = $email; $_SESSION['track_id_customer'] = $track_id; @@ -112,7 +116,7 @@ if ($action == "view_ticketlist") { } if ($object->fk_soc > 0) { $object->fetch_thirdparty(); - if ($email == $object->thirdparty->email) { + if ($email == strtolower($object->thirdparty->email)) { $display_ticket_list = true; $_SESSION['email_customer'] = $email; $_SESSION['track_id_customer'] = $track_id; @@ -121,14 +125,14 @@ if ($action == "view_ticketlist") { if ($object->fk_user_create > 0) { $tmpuser = new User($db); $tmpuser->fetch($object->fk_user_create); - if ($email == $tmpuser->email) { + if ($email == strtolower($tmpuser->email)) { $display_ticket_list = true; $_SESSION['email_customer'] = $email; $_SESSION['track_id_customer'] = $track_id; } } - $emailorigin = CMailFile::getValidAddress($object->origin_email, 2); + $emailorigin = strtolower(CMailFile::getValidAddress($object->origin_email, 2)); if ($email == $emailorigin) { $display_ticket_list = true; $_SESSION['email_customer'] = $email; @@ -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 02c7c9e51d8..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,7 +57,7 @@ $langs->loadLangs(array("companies", "other", "ticket")); $track_id = GETPOST('track_id', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $action = GETPOST('action', 'aZ09'); -$email = GETPOST('email', 'alpha'); +$email = GETPOST('email', 'email'); if (GETPOST('btn_view_ticket')) { unset($_SESSION['email_customer']); @@ -69,10 +73,8 @@ $object = new ActionsTicket($db); * Actions */ -if ($cancel) -{ - if (!empty($backtopage)) - { +if ($cancel) { + if (!empty($backtopage)) { header("Location: ".$backtopage); exit; } @@ -104,16 +106,14 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a if ($ret && $object->dao->id > 0) { // Check if emails provided is the one of author $emailofticket = CMailFile::getValidAddress($object->dao->origin_email, 2); - if ($emailofticket == $email) - { + 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 ($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 == $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 == $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 3bac7265606..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,14 +251,14 @@ 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); - - $object->socid = $objectsrc->socid; $object->ref_supplier = GETPOST('ref_supplier', 'alpha'); $object->model_pdf = GETPOST('model'); @@ -258,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,27 +297,30 @@ if (empty($reshook)) $stockLocation = "ent1".$i."_0"; $qty = "qtyl".$i; - - - //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'); - + //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, '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; @@ -310,18 +330,25 @@ 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; $entrepot_id = is_numeric(GETPOST($ent, 'int')) ? GETPOST($ent, 'int') : GETPOST('entrepot_id', 'int'); - if ($entrepot_id < 0) + if (!empty($lineToTest)) { + $fk_product = $lineToTest->fk_product; + } else { + $fk_product = $linesrc->fk_product; + } + + if ($entrepot_id < 0) { $entrepot_id = ''; - if (!($linesrc->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); @@ -329,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++; } @@ -340,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++; } @@ -356,8 +382,7 @@ if (empty($reshook)) $error++; } - if (!$error) - { + if (!$error) { $db->commit(); header("Location: card.php?id=".$object->id); exit; @@ -368,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); @@ -395,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; } @@ -467,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++; } } @@ -551,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; @@ -565,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 @@ -579,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; @@ -605,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++; } @@ -616,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++; } @@ -633,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); @@ -657,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'; @@ -675,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"); @@ -690,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().'">'; @@ -722,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').'">'; } @@ -733,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>'; @@ -746,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>'; @@ -759,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>'; } @@ -785,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>"; } @@ -824,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 @@ -849,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">'; @@ -860,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"; } @@ -878,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 @@ -896,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 @@ -920,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++; } @@ -944,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>'; @@ -975,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) { @@ -990,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]); @@ -1022,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>'; @@ -1063,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']; @@ -1073,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 @@ -1082,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); } @@ -1111,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>'; } @@ -1134,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); @@ -1174,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; @@ -1207,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; @@ -1225,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>'; @@ -1237,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 @@ -1260,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); } @@ -1286,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 @@ -1333,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">'; @@ -1342,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">'; @@ -1351,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">'; @@ -1372,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">'; @@ -1394,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">'; @@ -1411,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>'; @@ -1427,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">'; @@ -1458,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>'; @@ -1501,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)); @@ -1532,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); @@ -1562,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"> @@ -1576,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 @@ -1586,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>'; } @@ -1640,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); } @@ -1659,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"; @@ -1682,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); } @@ -1702,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>'; @@ -1731,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>'; @@ -1752,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>'; @@ -1764,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); } @@ -1795,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 @@ -1810,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>'; @@ -1842,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); @@ -1857,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"); @@ -1888,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>'; @@ -1915,8 +1901,7 @@ if ($action == 'create') print '</td>'; // Display lines extrafields - if (!empty($rowExtrafieldsStart)) - { + if (!empty($rowExtrafieldsStart)) { print $rowExtrafieldsStart; print $rowExtrafieldsView; print $rowEnd; @@ -1925,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); @@ -1958,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>'; @@ -1983,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>'; @@ -1995,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>'; @@ -2017,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'; } @@ -2032,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>'; } } @@ -2046,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..b2f31505c44 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=".$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=".$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); @@ -1338,7 +1359,9 @@ class Reception extends CommonObject $sql .= " WHERE rowid=".$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 908f7a441be..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,15 +56,27 @@ 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); } - if ($typeobject == 'propal' && $object->$typeobject->id && !empty($conf->propal->enabled)) - { - $objectsrc = new Propal($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(); } } @@ -79,20 +85,18 @@ if ($id > 0 || !empty($ref)) * Actions */ -if ($action == 'addcontact' && $user->rights->reception->creer) -{ - if ($result > 0 && $id > 0) - { - $result = $objectsrc->add_contact(GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'), $_POST["type"], $_POST["source"]); +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 { @@ -101,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 { @@ -150,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); @@ -213,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); @@ -224,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); @@ -259,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 e175437c0cc..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( @@ -110,35 +113,44 @@ $arrayfields = array( 'e.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), 'e.billed'=>array('label'=>$langs->trans("Billed"), 'checked'=>1, 'position'=>1000, 'enabled'=>(!empty($conf->global->WORKFLOW_BILL_ON_RECEPTION))) ); + // 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])) - $arrayfields["ef.".$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($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key])); - } -} +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 = ''; @@ -153,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'); @@ -167,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) { @@ -180,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 { @@ -205,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")); } @@ -215,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; } } @@ -234,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; } @@ -258,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; @@ -273,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 { @@ -287,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( @@ -326,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; @@ -335,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; } } @@ -346,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; @@ -372,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 { @@ -416,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); } } @@ -479,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); } @@ -490,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 a457c2a4427..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 342d32840c5..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 818e1479f0a..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 3049f83a053..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,), @@ -115,8 +115,8 @@ class RecruitmentCandidature extends CommonObject 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,), '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,), - 'phone' => array('type'=>'varchar(64)', 'label'=>'Phone', 'enabled'=>'1', 'position'=>31, 'notnull'=>0, 'visible'=>1,), + 'email' => array('type'=>'varchar(255)', 'label'=>'EMail', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'picto'=>'email'), + '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 c202a523e58..68fb7a1fea6 100644 --- a/htdocs/recruitment/class/recruitmentjobposition.class.php +++ b/htdocs/recruitment/class/recruitmentjobposition.class.php @@ -103,13 +103,13 @@ class RecruitmentJobPosition extends CommonObject '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 object"), 'label' => array('type'=>'varchar(255)', 'label'=>'JobLabel', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth500', 'csslist'=>'tdoverflowmax300', 'showoncombobox'=>'1', 'autofocusoncreate'=>1), - 'qty' => array('type'=>'integer', 'label'=>'NbOfEmployeesExpected', 'enabled'=>'1', 'position'=>45, 'notnull'=>1, 'visible'=>1, 'default'=>'1', 'isameasure'=>'1', 'css'=>'maxwidth75imp',), - 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>'1', 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1,), + 'qty' => array('type'=>'integer', 'label'=>'NbOfEmployeesExpected', 'enabled'=>'1', 'position'=>45, 'notnull'=>1, 'visible'=>1, 'default'=>'1', 'isameasure'=>'1', 'css'=>'maxwidth75imp'), + 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>'1', 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1, 'css'=>'maxwidth500', 'picto'=>'project'), 'fk_user_recruiter' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'ResponsibleOfRecruitement', 'enabled'=>'1', 'position'=>54, 'notnull'=>1, 'visible'=>1, 'foreignkey'=>'user.rowid', 'csslist'=>'tdoverflowmax150'), - 'email_recruiter' => array('type'=>'varchar(255)', 'label'=>'EmailRecruiter', 'enabled'=>'1', 'position'=>54, 'notnull'=>0, 'visible'=>-1, 'help'=>'ToUseAGenericEmail'), + 'email_recruiter' => array('type'=>'varchar(255)', 'label'=>'EmailRecruiter', 'enabled'=>'1', 'position'=>54, 'notnull'=>0, 'visible'=>-1, 'help'=>'ToUseAGenericEmail', 'picto'=>'email'), 'fk_user_supervisor' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'FutureManager', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>-1, 'foreignkey'=>'user.rowid',), 'fk_establishment' => array('type'=>'integer:Establishment:hrm/class/establishment.class.php', 'label'=>'Establishment', 'enabled'=>'$conf->hrm->enabled', 'position'=>56, 'notnull'=>0, 'visible'=>-1, 'foreignkey'=>'establishment.rowid',), - 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'WorkPlace', 'enabled'=>'1', 'position'=>57, 'notnull'=>-1, 'visible'=>-1, 'index'=>1, 'help'=>"IfJobIsLocatedAtAPartner",), + 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'WorkPlace', 'enabled'=>'1', 'position'=>57, 'notnull'=>-1, 'visible'=>-1, 'css'=>'maxwidth500', 'index'=>1, 'help'=>"IfJobIsLocatedAtAPartner", 'picto'=>'company'), 'date_planned' => array('type'=>'date', 'label'=>'DateExpected', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>1,), 'remuneration_suggested' => array('type'=>'varchar(255)', 'label'=>'Remuneration', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>1,), 'description' => array('type'=>'html', 'label'=>'Description', 'enabled'=>'1', 'position'=>65, 'notnull'=>0, 'visible'=>3,), @@ -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 1c801f27fd4..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']; } @@ -195,7 +218,7 @@ if ($object->id) $relativepathwithnofile = 'recruitmentcandidature/'.dol_sanitizeFileName($object->ref).'/'; - include_once 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/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 3005b4cc1be..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.'">'; @@ -196,7 +218,7 @@ if ($object->id) //$relativepathwithnofile='recruitmentjobposition/' . dol_sanitizeFileName($object->id).'/'; $relativepathwithnofile = 'recruitmentjobposition/'.dol_sanitizeFileName($object->ref).'/'; - include_once 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/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 0019d6b99ed..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']; } @@ -135,7 +141,7 @@ if ($object->id > 0) $modulepart = 'dolresource'; $permission = $user->rights->resource->write; - include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { print $langs->trans("ErrorUnknown"); } 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 ccf061b50b7..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; @@ -121,14 +140,8 @@ $arrayfields = array( ), ); // 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])) - $arrayfields["ef.".$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($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key])); - } -} +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'); @@ -136,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(); @@ -151,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'); +} /* @@ -164,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); } @@ -173,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">'; @@ -181,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); @@ -199,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'); } @@ -213,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>'; @@ -235,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; @@ -277,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..5b6134d192d --- 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,76 @@ 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 +542,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 +565,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 +659,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 +677,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 +772,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 6aee986396b..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 @@ -88,6 +97,12 @@ class PaymentSalary extends CommonObject */ public $fk_user_modif; + /** + * @var array + */ + public $fields = array( + 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'index'=>1, 'position'=>1, 'comment'=>'Id'), + ); /** * Constructor @@ -97,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); @@ -269,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; + } } @@ -325,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; } } @@ -688,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 * @@ -698,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 6cc482f1304..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>'; @@ -127,7 +149,7 @@ if ($object->id) $modulepart = 'salaries'; $permission = $user->rights->salaries->write; $param = '&id='.$object->id; - include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { print $langs->trans("ErrorUnknown"); } 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 49b58d61d08..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 e79c1cea177..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,20 +62,20 @@ 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="15"></td> + <td><input type="text" name="code_client" size="16" value="<?php echo $this->control->tpl['customercode']; ?>" maxlength="24"></td> <td><?php echo $this->control->tpl['help_customercode']; ?></td> </tr> </table> @@ -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="15"></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 57b8a06b019..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 ?>"> @@ -75,7 +76,7 @@ $contact = $GLOBALS['objcanvas']->control->object; <tr> <td> <?php if ($this->control->tpl['ismodifiable_customercode']) { ?> - <input type="text" name="code_client" size="16" value="<?php echo $this->control->tpl['customercode']; ?>" maxlength="15"> + <input type="text" name="code_client" size="16" value="<?php echo $this->control->tpl['customercode']; ?>" maxlength="24"> <?php } else { ?> <?php echo $this->control->tpl['customercode']; ?> <input type="hidden" name="code_client" value="<?php echo $this->control->tpl['customercode']; ?>"> @@ -96,7 +97,7 @@ $contact = $GLOBALS['objcanvas']->control->object; <tr> <td> <?php if ($this->control->tpl['ismodifiable_suppliercode']) { ?> - <input type="text" name="code_fournisseur" size="16" value="<?php echo $this->control->tpl['suppliercode']; ?>" maxlength="15"> + <input type="text" name="code_fournisseur" size="16" value="<?php echo $this->control->tpl['suppliercode']; ?>" maxlength="24"> <?php } else { ?> <?php echo $this->control->tpl['suppliercode']; ?> <input type="hidden" name="code_fournisseur" value="<?php echo $this->control->tpl['suppliercode']; ?>"> @@ -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 649d1bf8aca..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,11 +79,11 @@ 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="15"></td> + <td><input type="text" name="code_client" size="16" value="<?php echo $this->control->tpl['customercode']; ?>" maxlength="24"></td> <td><?php echo $this->control->tpl['help_customercode']; ?></td> </tr> </table> @@ -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="15"></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 b5f57544c5f..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; } @@ -73,7 +72,7 @@ if (empty($conf) || !is_object($conf)) <tr> <td> <?php if ($this->control->tpl['ismodifiable_customercode']) { ?> - <input type="text" name="code_client" size="16" value="<?php echo $this->control->tpl['customercode']; ?>" maxlength="15"> + <input type="text" name="code_client" size="16" value="<?php echo $this->control->tpl['customercode']; ?>" maxlength="24"> <?php } else { ?> <?php echo $this->control->tpl['customercode']; ?> <input type="hidden" name="code_client" value="<?php echo $this->control->tpl['customercode']; ?>"> @@ -94,7 +93,7 @@ if (empty($conf) || !is_object($conf)) <tr> <td> <?php if ($this->control->tpl['ismodifiable_suppliercode']) { ?> - <input type="text" name="code_fournisseur" size="16" value="<?php echo $this->control->tpl['suppliercode']; ?>" maxlength="15"> + <input type="text" name="code_fournisseur" size="16" value="<?php echo $this->control->tpl['suppliercode']; ?>" maxlength="24"> <?php } else { ?> <?php echo $this->control->tpl['suppliercode']; ?> <input type="hidden" name="code_fournisseur" value="<?php echo $this->control->tpl['suppliercode']; ?>"> @@ -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 0fc33232c5d..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->delete || ($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,19 +237,18 @@ 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( 'Adherent' => '/adherents/class/adherent.class.php', + 'Don' => '/don/class/don.class.php', 'Societe' => '/societe/class/societe.class.php', //'Categorie' => '/categories/class/categorie.class.php', 'ActionComm' => '/comm/action/class/actioncomm.class.php', @@ -249,7 +266,7 @@ if (empty($reshook)) 'FactureFournisseur' => '/fourn/class/fournisseur.facture.class.php', 'SupplierProposal' => '/supplier_proposal/class/supplier_proposal.class.php', 'ProductFournisseur' => '/fourn/class/fournisseur.product.class.php', - 'Livraison' => '/delivery/class/delivery.class.php', + 'Delivery' => '/delivery/class/delivery.class.php', 'Product' => '/product/class/product.class.php', 'Project' => '/projet/class/project.class.php', 'Ticket' => '/ticket/class/ticket.class.php', @@ -257,59 +274,51 @@ 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; } } } // 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 { @@ -321,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); @@ -357,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')); @@ -476,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)) { @@ -535,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']; @@ -544,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++; } @@ -573,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'); } @@ -582,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'); } @@ -591,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'); } @@ -600,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 @@ -621,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; } @@ -650,7 +654,7 @@ if (empty($reshook)) } setEventMessages($object->error, $object->errors, 'errors'); - $error++; + $error++; } if ($result >= 0 && !$error) { @@ -658,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; @@ -675,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++; } @@ -707,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'); } @@ -728,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'); } @@ -738,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), '', ''); @@ -778,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; } @@ -793,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 { @@ -826,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')); } @@ -903,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') { @@ -978,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'); @@ -1043,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 @@ -1072,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']; @@ -1099,14 +1104,18 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) $("#radiocompany").click(function() { $(".individualline").hide(); $("#typent_id").val(0); + $("#typent_id").change(); $("#effectif_id").val(0); + $("#effectif_id").change(); $("#TypeName").html(document.formsoc.ThirdPartyName.value); document.formsoc.private.value=0; }); $("#radioprivate").click(function() { $(".individualline").show(); $("#typent_id").val(id_te_private); + $("#typent_id").change(); $("#effectif_id").val(id_ef15); + $("#effectif_id").change(); $("#TypeName").html(document.formsoc.LastName.value); document.formsoc.private.value=1; }); @@ -1146,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">'; @@ -1192,16 +1215,17 @@ 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, ''); print '<table class="border centpercent">'; // Name, firstname - print '<tr class="tr-field-thirdparty-name"><td class="titlefieldcreate tdtop">'; - if ($object->particulier || $private) - { + print '<tr class="tr-field-thirdparty-name"><td class="titlefieldcreate">'; + if ($object->particulier || $private) { print '<span id="TypeName" class="fieldrequired">'.$langs->trans('ThirdPartyName').' / '.$langs->trans('LastName', 'name').'</span>'; } else { print '<span id="TypeName" class="fieldrequired">'.$form->editfieldkey('ThirdPartyName', 'name', '', $object, 0).'</span>'; @@ -1210,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>'; @@ -1244,45 +1265,52 @@ 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); - print '<input type="text" name="customer_code" id="customer_code" class="maxwidthonsmartphone" value="'.dol_escape_htmltag($tmpcode).'" maxlength="15">'; + 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); print $form->textwithpicto('', $s, 1); 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); - print '<input type="text" name="supplier_code" id="supplier_code" class="maxwidthonsmartphone" value="'.dol_escape_htmltag($tmpcode).'" maxlength="15">'; + 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); print $form->textwithpicto('', $s, 1); @@ -1297,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>'; } @@ -1317,9 +1346,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Zip / Town 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 quatrevingtpercent'); + 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'); @@ -1327,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', '', $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 '<tr><td>'.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '', empty($conf->global->SOCIETE_EMAIL_MANDATORY) ? '' : $conf->global->SOCIETE_EMAIL_MANDATORY).'</td>'; + 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>'; @@ -1366,7 +1410,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="'.dol_escape_htmltag(GETPOSTISSET($key) ?GETPOST($key, 'alphanohtml') : $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="'.dol_escape_htmltag(GETPOSTISSET($key) ? GETPOST($key, 'alphanohtml') : (empty($object->socialnetworks[$key]) ? '' : $object->socialnetworks[$key])).'">'; print '</td>'; print '</tr>'; } elseif (!empty($object->socialnetworks[$key])) { @@ -1382,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.'">'; @@ -1411,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">'; @@ -1432,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>'; @@ -1456,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; @@ -1481,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">'; @@ -1500,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 @@ -1512,18 +1570,31 @@ 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 ($object->fournisseur) { - 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); - 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)) { + 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); + print "</td></tr>"; + } } // 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">'; @@ -1545,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">'; @@ -1555,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 { @@ -1573,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; } @@ -1582,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'); @@ -1669,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'); } @@ -1684,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']; @@ -1694,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.'; @@ -1782,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'); @@ -1791,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>'; @@ -1809,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 { @@ -1828,19 +1935,23 @@ 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); - print '<input type="text" name="customer_code" id="customer_code" size="16" value="'.dol_escape_htmltag($tmpcode).'" maxlength="15">'; - } elseif ($object->codeclient_modifiable()) - { - print '<input type="text" name="customer_code" id="customer_code" size="16" value="'.dol_escape_htmltag($object->code_client).'" maxlength="15">'; + 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()) { + 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; print '<input type="hidden" name="customer_code" value="'.dol_escape_htmltag($object->code_client).'">'; @@ -1853,32 +1964,34 @@ 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); - print '<input type="text" name="supplier_code" id="supplier_code" size="16" value="'.dol_escape_htmltag($tmpcode).'" maxlength="15">'; - } elseif ($object->codefournisseur_modifiable()) - { - print '<input type="text" name="supplier_code" id="supplier_code" size="16" value="'.dol_escape_htmltag($object->code_fournisseur).'" maxlength="15">'; + 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()) { + 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; print '<input type="hidden" name="supplier_code" value="'.$object->code_fournisseur.'">'; @@ -1891,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>'; } @@ -1913,9 +2027,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Zip / Town 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, '', 'maxwidth50onsmartphone'); + 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'); @@ -1924,15 +2040,15 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Country 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 widthcentpercentminusx'); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + 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); + } 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">'; @@ -1945,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) { @@ -1961,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])) { @@ -1971,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">'; @@ -1999,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>'; @@ -2013,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>'; @@ -2049,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">'; @@ -2077,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 @@ -2098,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">'; @@ -2133,22 +2256,23 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) print "</td></tr>"; // Supplier - 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); - $c = new Categorie($db); - $cats = $c->containing($object->id, Categorie::TYPE_SUPPLIER); - $arrayselected = array(); - foreach ($cats as $cat) { - $arrayselected[] = $cat->id; + 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); + $c = new Categorie($db); + $cats = $c->containing($object->id, Categorie::TYPE_SUPPLIER); + $arrayselected = array(); + foreach ($cats as $cat) { + $arrayselected[] = $cat->id; + } + print img_picto('', 'category').$form->multiselectarray('suppcats', $cate_arbo, $arrayselected, 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0); + print "</td></tr>"; } - print img_picto('', 'category').$form->multiselectarray('suppcats', $cate_arbo, $arrayselected, 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0); - print "</td></tr>"; } // 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">'; @@ -2172,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>'; @@ -2192,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").'">'; @@ -2211,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; } @@ -2222,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>'; @@ -2255,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>'; @@ -2290,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>'; @@ -2304,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>'; @@ -2343,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')); @@ -2355,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>'; @@ -2381,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().'">'; @@ -2396,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().'">'; @@ -2416,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().'">'; @@ -2442,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">'; @@ -2479,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'; @@ -2498,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>'; @@ -2509,7 +2667,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } // Supplier - if ($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); @@ -2522,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); @@ -2557,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>'; @@ -2566,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>'; } @@ -2587,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>'; } @@ -2620,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"; @@ -2691,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; @@ -2711,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); } @@ -2729,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); } } @@ -2754,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 81a1c167a02..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); @@ -1068,7 +1089,7 @@ class Thirdparties extends DolibarrApi /** * Return list of invoices qualified to be corrected by a credit note. * Invoices matching the following rules are returned - * (validated + payment on process) or classified (payed completely or payed partialy) + not already replaced + not already a credit note + * (validated + payment on process) or classified (paid completely or paid partialy) + not already replaced + not already a credit note * * @param int $id Id of thirdparty * @@ -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; @@ -1793,7 +1827,7 @@ class Thirdparties extends DolibarrApi * * Return an array with thirdparty informations * - * @param int $rowid Id of third party to load + * @param int $rowid Id of third party to load (Use 0 to get a specimen record, use null to use other search criterias) * @param string $ref Reference of third party, name (Warning, this can return several records) * @param string $ref_ext External reference of third party (Warning, this information is a free field not provided by Dolibarr) * @param string $barcode Barcode of third party to load @@ -1812,10 +1846,12 @@ 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) { + + if ($rowid === 0) { $result = $this->company->initAsSpecimen(); } else { $result = $this->company->fetch($rowid, $ref, $ref_ext, $barcode, $idprof1, $idprof2, $idprof3, $idprof4, $idprof5, $idprof6, $email, $ref_alias); 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 0aeb64aa427..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 */ @@ -784,17 +817,27 @@ class Societe extends CommonObject $error = 0; // Clean parameters - if (empty($this->status)) $this->status = 0; + if (empty($this->status)) { + $this->status = 0; + } $this->name = $this->name ?trim($this->name) : trim($this->nom); $this->setUpperOrLowerCase(); $this->nom = $this->name; // For backward compatibility - if (empty($this->client)) $this->client = 0; - if (empty($this->fournisseur)) $this->fournisseur = 0; + if (empty($this->client)) { + $this->client = 0; + } + if (empty($this->fournisseur)) { + $this->fournisseur = 0; + } $this->import_key = trim($this->import_key); - if (!empty($this->multicurrency_code)) $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code); - if (empty($this->fk_multicurrency)) - { + $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); + } + if (empty($this->fk_multicurrency)) { $this->multicurrency_code = ''; $this->fk_multicurrency = 0; } @@ -806,20 +849,41 @@ class Societe extends CommonObject $this->db->begin(); // For automatic creation during create action (not used by Dolibarr GUI, can be used by scripts) - if ($this->code_client == -1 || $this->code_client === 'auto') $this->get_codeclient($this, 0); - if ($this->code_fournisseur == -1 || $this->code_fournisseur === 'auto') $this->get_codefournisseur($this, 1); + if ($this->code_client == -1 || $this->code_client === 'auto') { + $this->get_codeclient($this, 0); + } + if ($this->code_fournisseur == -1 || $this->code_fournisseur === 'auto') { + $this->get_codefournisseur($this, 1); + } // Check more parameters (including mandatory setup // If error, this->errors[] is filled $result = $this->verify(); - if ($result >= 0) - { + 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"); @@ -828,48 +892,48 @@ 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); - if ($result) - { + if ($result) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."societe"); $ret = $this->update($this->id, $user, 0, 1, 1, 'add'); // Ajout du commercial affecte - if ($this->commercial_id != '' && $this->commercial_id != -1) - { + 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); } - if ($ret >= 0) - { + if ($ret >= 0) { // Call trigger $result = $this->call_trigger('COMPANY_CREATE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers - } else $error++; + } else { + $error++; + } - if (!$error) - { + if (!$error) { dol_syslog(get_class($this)."::Create success id=".$this->id); $this->db->commit(); return $this->id; } else { - dol_syslog(get_class($this)."::Create echec update ".$this->error." ".join(',', $this->errors), LOG_ERR); + dol_syslog(get_class($this)."::Create echec update ".$this->error.(empty($this->errors) ? '' : ' '.join(',', $this->errors)), LOG_ERR); $this->db->rollback(); return -4; } } else { - if ($this->db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($this->db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $this->error = $langs->trans("ErrorCompanyNameAlreadyExists", $this->name); // duplicate on a field (code or profid or ...) $result = -1; } else { @@ -892,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); @@ -913,17 +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; } /** @@ -943,28 +1044,21 @@ class Societe extends CommonObject $this->name = trim($this->name); $this->nom = $this->name; // For backward compatibility - if (!$this->name) - { + if (!$this->name) { $this->errors[] = 'ErrorBadThirdPartyName'; $result = -2; } - if ($this->client) - { + if ($this->client) { $rescode = $this->check_codeclient(); - if ($rescode <> 0) - { - if ($rescode == -1) - { + if ($rescode != 0 && $rescode != -5) { + if ($rescode == -1) { $this->errors[] = 'ErrorBadCustomerCodeSyntax'; - } elseif ($rescode == -2) - { + } elseif ($rescode == -2) { $this->errors[] = 'ErrorCustomerCodeRequired'; - } elseif ($rescode == -3) - { + } elseif ($rescode == -3) { $this->errors[] = 'ErrorCustomerCodeAlreadyUsed'; - } elseif ($rescode == -4) - { + } elseif ($rescode == -4) { $this->errors[] = 'ErrorPrefixRequired'; } else { $this->errors[] = 'ErrorUnknownOnCustomerCodeCheck'; @@ -974,22 +1068,16 @@ class Societe extends CommonObject } } - if ($this->fournisseur) - { + if ($this->fournisseur) { $rescode = $this->check_codefournisseur(); - if ($rescode <> 0) - { - if ($rescode == -1) - { + if ($rescode != 0 && $rescode != -5) { + if ($rescode == -1) { $this->errors[] = 'ErrorBadSupplierCodeSyntax'; - } elseif ($rescode == -2) - { + } elseif ($rescode == -2) { $this->errors[] = 'ErrorSupplierCodeRequired'; - } elseif ($rescode == -3) - { + } elseif ($rescode == -3) { $this->errors[] = 'ErrorSupplierCodeAlreadyUsed'; - } elseif ($rescode == -4) - { + } elseif ($rescode == -4) { $this->errors[] = 'ErrorPrefixRequired'; } else { $this->errors[] = 'ErrorUnknownOnSupplierCodeCheck'; @@ -1000,22 +1088,17 @@ class Societe extends CommonObject // Check for duplicate or mandatory fields defined into setup $array_to_check = array('IDPROF1', 'IDPROF2', 'IDPROF3', 'IDPROF4', 'IDPROF5', 'IDPROF6', 'EMAIL'); - foreach ($array_to_check as $key) - { + foreach ($array_to_check as $key) { $keymin = strtolower($key); $i = (int) preg_replace('/[^0-9]/', '', $key); $vallabel = $this->$keymin; - if ($i > 0) - { - if ($this->isACompany()) - { + if ($i > 0) { + if ($this->isACompany()) { // Check for mandatory prof id (but only if country is same than ours) - if ($mysoc->country_id > 0 && $this->country_id == $mysoc->country_id) - { + if ($mysoc->country_id > 0 && $this->country_id == $mysoc->country_id) { $idprof_mandatory = 'SOCIETE_'.$key.'_MANDATORY'; - if (!$vallabel && !empty($conf->global->$idprof_mandatory)) - { + if (!$vallabel && !empty($conf->global->$idprof_mandatory)) { $langs->load("errors"); $error++; $this->errors[] = $langs->trans("ErrorProdIdIsMandatory", $langs->transcountry('ProfId'.$i, $this->country_code)).' ('.$langs->trans("ForbiddenBySetupRules").')'; @@ -1024,10 +1107,8 @@ class Societe extends CommonObject } // Check for unicity on profid - if (!$error && $vallabel && $this->id_prof_verifiable($i)) - { - if ($this->id_prof_exists($keymin, $vallabel, ($this->id > 0 ? $this->id : 0))) - { + if (!$error && $vallabel && $this->id_prof_verifiable($i)) { + if ($this->id_prof_exists($keymin, $vallabel, ($this->id > 0 ? $this->id : 0))) { $langs->load("errors"); $error++; $this->errors[] = $langs->transcountry('ProfId'.$i, $this->country_code)." ".$langs->trans("ErrorProdIdAlreadyExist", $vallabel).' ('.$langs->trans("ForbiddenBySetupRules").')'; @@ -1036,21 +1117,17 @@ class Societe extends CommonObject } else { //var_dump($conf->global->SOCIETE_EMAIL_UNIQUE); //var_dump($conf->global->SOCIETE_EMAIL_MANDATORY); - if ($key == 'EMAIL') - { + if ($key == 'EMAIL') { // Check for mandatory - if (!empty($conf->global->SOCIETE_EMAIL_MANDATORY) && !isValidEMail($this->email)) - { + if (!empty($conf->global->SOCIETE_EMAIL_MANDATORY) && !isValidEMail($this->email)) { $langs->load("errors"); $error++; $this->errors[] = $langs->trans("ErrorBadEMail", $this->email).' ('.$langs->trans("ForbiddenBySetupRules").')'; } // Check for unicity - if (!$error && $vallabel && !empty($conf->global->SOCIETE_EMAIL_UNIQUE)) - { - if ($this->id_prof_exists($keymin, $vallabel, ($this->id > 0 ? $this->id : 0))) - { + if (!$error && $vallabel && !empty($conf->global->SOCIETE_EMAIL_UNIQUE)) { + if ($this->id_prof_exists($keymin, $vallabel, ($this->id > 0 ? $this->id : 0))) { $langs->load("errors"); $error++; $this->errors[] = $langs->trans('Email')." ".$langs->trans("ErrorProdIdAlreadyExist", $vallabel).' ('.$langs->trans("ForbiddenBySetupRules").')'; } @@ -1059,7 +1136,9 @@ class Societe extends CommonObject } } - if ($error) $result = -4; + if ($error) { + $result = -4; + } return $result; } @@ -1082,7 +1161,9 @@ class Societe extends CommonObject require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - if (empty($id)) $id = $this->id; + if (empty($id)) { + $id = $this->id; + } $error = 0; @@ -1126,11 +1207,14 @@ class Societe extends CommonObject $this->tva_assuj = trim($this->tva_assuj); $this->tva_intra = dol_sanitizeFileName($this->tva_intra, ''); - if (empty($this->status)) $this->status = 0; + if (empty($this->status)) { + $this->status = 0; + } - if (!empty($this->multicurrency_code)) $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code); - if (empty($this->fk_multicurrency)) - { + if (!empty($this->multicurrency_code)) { + $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code); + } + if (empty($this->fk_multicurrency)) { $this->multicurrency_code = ''; $this->fk_multicurrency = 0; } @@ -1142,8 +1226,12 @@ class Societe extends CommonObject $this->localtax1_value = trim($this->localtax1_value); $this->localtax2_value = trim($this->localtax2_value); - if ($this->capital != '') $this->capital = price2num(trim($this->capital)); - if (!is_numeric($this->capital)) $this->capital = ''; // '' = undef + if ($this->capital != '') { + $this->capital = price2num(trim($this->capital)); + } + if (!is_numeric($this->capital)) { + $this->capital = ''; // '' = undef + } $this->effectif_id = trim($this->effectif_id); $this->forme_juridique_code = trim($this->forme_juridique_code); @@ -1152,41 +1240,44 @@ class Societe extends CommonObject $this->barcode = trim($this->barcode); // For automatic creation - if ($this->code_client == -1 || $this->code_client === 'auto') $this->get_codeclient($this, 0); - if ($this->code_fournisseur == -1 || $this->code_fournisseur === 'auto') $this->get_codefournisseur($this, 1); + if ($this->code_client == -1 || $this->code_client === 'auto') { + $this->get_codeclient($this, 0); + } + if ($this->code_fournisseur == -1 || $this->code_fournisseur === 'auto') { + $this->get_codefournisseur($this, 1); + } $this->code_compta = trim($this->code_compta); $this->code_compta_fournisseur = trim($this->code_compta_fournisseur); // Check parameters. More tests are done later in the ->verify() - if (!is_numeric($this->client) && !is_numeric($this->fournisseur)) - { + if (!is_numeric($this->client) && !is_numeric($this->fournisseur)) { $langs->load("errors"); $this->error = $langs->trans("BadValueForParameterClientOrSupplier"); return -1; } $customer = false; - if (!empty($allowmodcodeclient) && !empty($this->client)) - { + if (!empty($allowmodcodeclient) && !empty($this->client)) { // Attention get_codecompta peut modifier le code suivant le module utilise - if (empty($this->code_compta)) - { + if (empty($this->code_compta)) { $ret = $this->get_codecompta('customer'); - if ($ret < 0) return -1; + if ($ret < 0) { + return -1; + } } $customer = true; } $supplier = false; - if (!empty($allowmodcodefournisseur) && !empty($this->fournisseur)) - { + if (!empty($allowmodcodefournisseur) && !empty($this->fournisseur)) { // Attention get_codecompta peut modifier le code suivant le module utilise - if ($this->code_compta_fournisseur == "") - { + if ($this->code_compta_fournisseur == "") { $ret = $this->get_codecompta('supplier'); - if ($ret < 0) return -1; + if ($ret < 0) { + return -1; + } } $supplier = true; @@ -1196,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); @@ -1205,33 +1299,31 @@ class Societe extends CommonObject // Check name is required and codes are ok or unique. // If error, this->errors[] is filled $result = 0; - if ($action != 'add' && $action != 'merge') - { + if ($action != 'add' && $action != 'merge') { // We don't check when update called during a create because verify was already done. // For a merge, we suppose source data is clean and a customer code of a deleted thirdparty must be accepted into a target thirdparty with empty code without duplicate error $result = $this->verify(); // If there is only one error and error is ErrorBadCustomerCodeSyntax and we don't change customer code, we allow the update // So we can update record that were using and old numbering rule. - if (is_array($this->errors)) - { - if (in_array('ErrorBadCustomerCodeSyntax', $this->errors) && is_object($this->oldcopy) && $this->oldcopy->code_client == $this->code_client) - { - if (($key = array_search('ErrorBadCustomerCodeSyntax', $this->errors)) !== false) unset($this->errors[$key]); // Remove error message + if (is_array($this->errors)) { + if (in_array('ErrorBadCustomerCodeSyntax', $this->errors) && is_object($this->oldcopy) && $this->oldcopy->code_client == $this->code_client) { + if (($key = array_search('ErrorBadCustomerCodeSyntax', $this->errors)) !== false) { + unset($this->errors[$key]); // Remove error message + } } - if (in_array('ErrorBadSupplierCodeSyntax', $this->errors) && is_object($this->oldcopy) && $this->oldcopy->code_fournisseur == $this->code_fournisseur) - { - if (($key = array_search('ErrorBadSupplierCodeSyntax', $this->errors)) !== false) unset($this->errors[$key]); // Remove error message + if (in_array('ErrorBadSupplierCodeSyntax', $this->errors) && is_object($this->oldcopy) && $this->oldcopy->code_fournisseur == $this->code_fournisseur) { + if (($key = array_search('ErrorBadSupplierCodeSyntax', $this->errors)) !== false) { + unset($this->errors[$key]); // Remove error message + } } - if (empty($this->errors)) // If there is no more error, we can make like if there is no error at all - { + if (empty($this->errors)) { // If there is no more error, we can make like if there is no error at all $result = 0; } } } - if ($result >= 0) - { + if ($result >= 0) { dol_syslog(get_class($this)."::update verify ok or not done"); $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET "; @@ -1272,29 +1364,32 @@ class Societe extends CommonObject // Local taxes $sql .= ",localtax1_assuj = ".($this->localtax1_assuj != '' ? "'".$this->db->escape($this->localtax1_assuj)."'" : "null"); $sql .= ",localtax2_assuj = ".($this->localtax2_assuj != '' ? "'".$this->db->escape($this->localtax2_assuj)."'" : "null"); - if ($this->localtax1_assuj == 1) - { - if ($this->localtax1_value != '') - { + if ($this->localtax1_assuj == 1) { + if ($this->localtax1_value != '') { $sql .= ",localtax1_value =".$this->localtax1_value; - } else $sql .= ",localtax1_value =0.000"; - } else $sql .= ",localtax1_value =0.000"; + } else { + $sql .= ",localtax1_value =0.000"; + } + } else { + $sql .= ",localtax1_value =0.000"; + } - if ($this->localtax2_assuj == 1) - { - if ($this->localtax2_value != '') - { + if ($this->localtax2_assuj == 1) { + if ($this->localtax2_value != '') { $sql .= ",localtax2_value =".$this->localtax2_value; - } else $sql .= ",localtax2_value =0.000"; - } else $sql .= ",localtax2_value =0.000"; + } else { + $sql .= ",localtax2_value =0.000"; + } + } else { + $sql .= ",localtax2_value =0.000"; + } $sql .= ",capital = ".($this->capital == '' ? "null" : $this->capital); $sql .= ",prefix_comm = ".(!empty($this->prefix_comm) ? "'".$this->db->escape($this->prefix_comm)."'" : "null"); $sql .= ",fk_effectif = ".(!empty($this->effectif_id) ? "'".$this->db->escape($this->effectif_id)."'" : "null"); - if (isset($this->stcomm_id)) - { + if (isset($this->stcomm_id)) { $sql .= ",fk_stcomm=".(!empty($this->stcomm_id) ? $this->stcomm_id : "0"); } $sql .= ",fk_typent = ".(!empty($this->typent_id) ? "'".$this->db->escape($this->typent_id)."'" : "0"); @@ -1320,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"); @@ -1327,14 +1425,12 @@ class Societe extends CommonObject $sql .= ", fk_incoterms = ".$this->fk_incoterms; $sql .= ", location_incoterms = ".(!empty($this->location_incoterms) ? "'".$this->db->escape($this->location_incoterms)."'" : "null"); - if ($customer) - { + if ($customer) { $sql .= ", code_client = ".(!empty($this->code_client) ? "'".$this->db->escape($this->code_client)."'" : "null"); $sql .= ", code_compta = ".(!empty($this->code_compta) ? "'".$this->db->escape($this->code_compta)."'" : "null"); } - if ($supplier) - { + if ($supplier) { $sql .= ", code_fournisseur = ".(!empty($this->code_fournisseur) ? "'".$this->db->escape($this->code_fournisseur)."'" : "null"); $sql .= ", code_compta_fournisseur = ".(($this->code_compta_fournisseur != "") ? "'".$this->db->escape($this->code_compta_fournisseur)."'" : "null"); } @@ -1345,17 +1441,13 @@ class Societe extends CommonObject $sql .= " WHERE rowid = ".(int) $id; $resql = $this->db->query($sql); - if ($resql) - { - if (is_object($this->oldcopy)) // If we have information on old values - { - if ($this->oldcopy->country_id != $this->country_id) - { + if ($resql) { + if (is_object($this->oldcopy)) { // If we have information on old values + if ($this->oldcopy->country_id != $this->country_id) { unset($this->country_code); unset($this->country); } - if ($this->oldcopy->state_id != $this->state_id) - { + if ($this->oldcopy->state_id != $this->state_id) { unset($this->state_code); unset($this->state); } @@ -1368,11 +1460,9 @@ class Societe extends CommonObject $nbrowsaffected = $this->db->affected_rows($resql); - if (!$error && $nbrowsaffected) - { + if (!$error && $nbrowsaffected) { // Update information on linked member if it is an update - if (!$nosyncmember && !empty($conf->adherent->enabled)) - { + if (!$nosyncmember && !empty($conf->adherent->enabled)) { require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; dol_syslog(get_class($this)."::update update linked member"); @@ -1380,8 +1470,7 @@ class Societe extends CommonObject $lmember = new Adherent($this->db); $result = $lmember->fetch(0, 0, $this->id); - if ($result > 0) - { + if ($result > 0) { $lmember->company = $this->name; //$lmember->firstname=$this->firstname?$this->firstname:$lmember->firstname; // We keep firstname and lastname of member unchanged //$lmember->lastname=$this->lastname?$this->lastname:$lmember->lastname; // We keep firstname and lastname of member unchanged @@ -1395,15 +1484,13 @@ class Societe extends CommonObject $lmember->country_id = $this->country_id; $result = $lmember->update($user, 0, 1, 1, 1); // Use nosync to 1 to avoid cyclic updates - if ($result < 0) - { + if ($result < 0) { $this->error = $lmember->error; $this->errors = array_merge($this->errors, $lmember->errors); dol_syslog(get_class($this)."::update ".$this->error, LOG_ERR); $error++; } - } elseif ($result < 0) - { + } elseif ($result < 0) { $this->error = $lmember->error; $error++; } @@ -1413,34 +1500,30 @@ class Societe extends CommonObject $action = 'update'; // Actions on extra fields - if (!$error) - { + if (!$error) { $result = $this->insertExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; } } // Actions on extra languages - if (!$error && empty($conf->global->MAIN_EXTRALANGUAGES_DISABLED)) // For avoid conflicts if trigger used - { + if (!$error && empty($conf->global->MAIN_EXTRALANGUAGES_DISABLED)) { // For avoid conflicts if trigger used $result = $this->insertExtraLanguages(); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error && $call_trigger) - { + if (!$error && $call_trigger) { // Call trigger $result = $this->call_trigger('COMPANY_MODIFY', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { dol_syslog(get_class($this)."::Update success"); $this->db->commit(); return 1; @@ -1449,8 +1532,7 @@ class Societe extends CommonObject return -1; } } else { - if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { + if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { // Doublon $this->error = $langs->trans("ErrorDuplicateField"); $result = -1; @@ -1490,10 +1572,12 @@ class Societe extends CommonObject global $langs; global $conf; - if (empty($rowid) && empty($ref) && empty($ref_ext) && empty($barcode) && empty($idprof1) && empty($idprof2) && empty($idprof3) && empty($idprof4) && empty($idprof5) && empty($idprof6) && empty($email)) return -1; + if (empty($rowid) && empty($ref) && empty($ref_ext) && empty($barcode) && empty($idprof1) && empty($idprof2) && empty($idprof3) && empty($idprof4) && empty($idprof5) && empty($idprof6) && empty($email)) { + return -1; + } $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'; @@ -1505,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'; @@ -1518,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'; @@ -1528,35 +1614,57 @@ 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; - if ($ref) $sql .= " AND s.nom = '".$this->db->escape($ref)."'"; - if ($ref_alias) $sql .= " AND s.name_alias = '".$this->db->escape($ref_alias)."'"; - if ($ref_ext) $sql .= " AND s.ref_ext = '".$this->db->escape($ref_ext)."'"; - if ($barcode) $sql .= " AND s.barcode = '".$this->db->escape($barcode)."'"; - if ($idprof1) $sql .= " AND s.siren = '".$this->db->escape($idprof1)."'"; - if ($idprof2) $sql .= " AND s.siret = '".$this->db->escape($idprof2)."'"; - if ($idprof3) $sql .= " AND s.ape = '".$this->db->escape($idprof3)."'"; - if ($idprof4) $sql .= " AND s.idprof4 = '".$this->db->escape($idprof4)."'"; - if ($idprof5) $sql .= " AND s.idprof5 = '".$this->db->escape($idprof5)."'"; - if ($idprof6) $sql .= " AND s.idprof6 = '".$this->db->escape($idprof6)."'"; - if ($email) $sql .= " AND s.email = '".$this->db->escape($email)."'"; + if ($rowid) { + $sql .= ' AND s.rowid = '.((int) $rowid); + } + if ($ref) { + $sql .= " AND s.nom = '".$this->db->escape($ref)."'"; + } + if ($ref_alias) { + $sql .= " AND s.name_alias = '".$this->db->escape($ref_alias)."'"; + } + if ($ref_ext) { + $sql .= " AND s.ref_ext = '".$this->db->escape($ref_ext)."'"; + } + if ($barcode) { + $sql .= " AND s.barcode = '".$this->db->escape($barcode)."'"; + } + if ($idprof1) { + $sql .= " AND s.siren = '".$this->db->escape($idprof1)."'"; + } + if ($idprof2) { + $sql .= " AND s.siret = '".$this->db->escape($idprof2)."'"; + } + if ($idprof3) { + $sql .= " AND s.ape = '".$this->db->escape($idprof3)."'"; + } + if ($idprof4) { + $sql .= " AND s.idprof4 = '".$this->db->escape($idprof4)."'"; + } + if ($idprof5) { + $sql .= " AND s.idprof5 = '".$this->db->escape($idprof5)."'"; + } + if ($idprof6) { + $sql .= " AND s.idprof6 = '".$this->db->escape($idprof6)."'"; + } + if ($email) { + $sql .= " AND s.email = '".$this->db->escape($email)."'"; + } $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 thirdparties to avoid duplicate.'; dol_syslog($this->error, LOG_ERR); $result = -2; - } elseif ($num) // $num = 1 - { + } elseif ($num) { // $num = 1 $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; @@ -1584,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); @@ -1642,7 +1752,7 @@ class Societe extends CommonObject $this->prefix_comm = $obj->prefix_comm; - $this->remise_percent = price2num($obj->remise_client); // 0.000000 must be 0 + $this->remise_percent = $obj->remise_client ? price2num($obj->remise_client) : 0; // 0.000000 must be 0 $this->remise_supplier_percent = $obj->remise_supplier; $this->mode_reglement_id = $obj->mode_reglement; $this->cond_reglement_id = $obj->cond_reglement; @@ -1668,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; @@ -1675,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 @@ -1698,11 +1814,14 @@ class Societe extends CommonObject $this->db->free($resql); } else { $this->error = $this->db->lasterror(); + $this->errors[] = $this->db->lasterror(); $result = -3; } // Use first price level if level not defined for third party - if ((!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) && empty($this->price_level)) $this->price_level = 1; + if ((!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) && empty($this->price_level)) { + $this->price_level = 1; + } return $result; } @@ -1719,7 +1838,9 @@ class Societe extends CommonObject { global $langs, $conf, $user; - if (empty($fuser)) $fuser = $user; + if (empty($fuser)) { + $fuser = $user; + } require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -1730,49 +1851,42 @@ class Societe extends CommonObject // Test if child exists $objectisused = $this->isObjectUsed($id); - if (empty($objectisused)) - { + if (empty($objectisused)) { $this->db->begin(); // User is mandatory for trigger call - if (!$error && $call_trigger) - { + if (!$error && $call_trigger) { // Call trigger $result = $this->call_trigger('COMPANY_DELETE', $fuser); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } // End call triggers } - if (!$error) - { + if (!$error) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $static_cat = new Categorie($this->db); $toute_categs = array(); // Fill $toute_categs array with an array of (type => array of ("Categorie" instance)) - if ($this->client || $this->prospect) - { + if ($this->client || $this->prospect) { $toute_categs['customer'] = $static_cat->containing($this->id, Categorie::TYPE_CUSTOMER); } - if ($this->fournisseur) - { + if ($this->fournisseur) { $toute_categs['supplier'] = $static_cat->containing($this->id, Categorie::TYPE_SUPPLIER); } // Remove each "Categorie" - foreach ($toute_categs as $type => $categs_type) - { - foreach ($categs_type as $cat) - { + foreach ($toute_categs as $type => $categs_type) { + foreach ($categs_type as $cat) { $cat->del_type($this, $type); } } } - if (!$error) - { - foreach ($this->childtablesoncascade as $tabletodelete) - { + if (!$error) { + foreach ($this->childtablesoncascade as $tabletodelete) { $deleteFromObject = explode(':', $tabletodelete); if (count($deleteFromObject) >= 2) { $className = str_replace('@', '', $deleteFromObject[0]); @@ -1793,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(); @@ -1804,51 +1918,42 @@ class Societe extends CommonObject } // Removed extrafields - if (!$error) - { + if (!$error) { $result = $this->deleteExtraFields(); - if ($result < 0) - { + if ($result < 0) { $error++; dol_syslog(get_class($this)."::delete error -3 ".$this->error, LOG_ERR); } } // Remove links to subsidiaries companies - if (!$error) - { + if (!$error) { $sql = "UPDATE ".MAIN_DB_PREFIX."societe"; $sql .= " SET parent = NULL"; - $sql .= " WHERE parent = ".$id; - if (!$this->db->query($sql)) - { + $sql .= " WHERE parent = ".((int) $id); + if (!$this->db->query($sql)) { $error++; $this->errors[] = $this->db->lasterror(); } } // Remove third party - if (!$error) - { + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe"; - $sql .= " WHERE rowid = ".$id; - if (!$this->db->query($sql)) - { + $sql .= " WHERE rowid = ".((int) $id); + if (!$this->db->query($sql)) { $error++; $this->errors[] = $this->db->lasterror(); } } - if (!$error) - { + if (!$error) { $this->db->commit(); // Delete directory - if (!empty($conf->societe->multidir_output[$entity])) - { + if (!empty($conf->societe->multidir_output[$entity])) { $docdir = $conf->societe->multidir_output[$entity]."/".$id; - if (dol_is_dir($docdir)) - { + if (dol_is_dir($docdir)) { dol_delete_dir_recursive($docdir); } } @@ -1859,7 +1964,9 @@ class Societe extends CommonObject $this->db->rollback(); return -1; } - } else dol_syslog("Can't remove thirdparty with id ".$id.". There is ".$objectisused." childs", LOG_WARNING); + } else { + dol_syslog("Can't remove thirdparty with id ".$id.". There is ".$objectisused." childs", LOG_WARNING); + } return 0; } @@ -1872,20 +1979,22 @@ class Societe extends CommonObject public function set_as_client() { // phpcs:enable - if ($this->id) - { + if ($this->id) { $newclient = 1; - if ($this->client == 2 || $this->client == 3) $newclient = 3; //If prospect, we keep prospect tag + if ($this->client == 2 || $this->client == 3) { + $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); - if ($resql) - { + if ($resql) { $this->client = $newclient; return 1; - } else return -1; + } else { + return -1; + } } return 0; } @@ -1906,16 +2015,14 @@ class Societe extends CommonObject // Parameter cleaning $note = trim($note); - if (!$note) - { + if (!$note) { $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NoteReason")); return -2; } dol_syslog(get_class($this)."::set_remise_client ".$remise.", ".$note.", ".$user->id); - if ($this->id) - { + if ($this->id) { $this->db->begin(); $now = dol_now(); @@ -1925,8 +2032,7 @@ class Societe extends CommonObject $sql .= " SET remise_client = '".$this->db->escape($remise)."'"; $sql .= " WHERE rowid = ".$this->id; $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->db->rollback(); $this->error = $this->db->error(); return -1; @@ -1941,8 +2047,7 @@ class Societe extends CommonObject $sql .= ")"; $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->db->rollback(); $this->error = $this->db->lasterror(); return -1; @@ -1969,16 +2074,14 @@ class Societe extends CommonObject // Parameter cleaning $note = trim($note); - if (!$note) - { + if (!$note) { $this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NoteReason")); return -2; } dol_syslog(get_class($this)."::set_remise_supplier ".$remise.", ".$note.", ".$user->id); - if ($this->id) - { + if ($this->id) { $this->db->begin(); $now = dol_now(); @@ -1988,8 +2091,7 @@ class Societe extends CommonObject $sql .= " SET remise_supplier = '".$this->db->escape($remise)."'"; $sql .= " WHERE rowid = ".$this->id; $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->db->rollback(); $this->error = $this->db->error(); return -1; @@ -2004,8 +2106,7 @@ class Societe extends CommonObject $sql .= ")"; $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { $this->db->rollback(); $this->error = $this->db->lasterror(); return -1; @@ -2037,24 +2138,20 @@ class Societe extends CommonObject $desc = trim($desc); // Check parameters - if (!$remise > 0) - { + if (!$remise > 0) { $this->error = $langs->trans("ErrorWrongValueForParameter", "1"); return -1; } - if (!$desc) - { + if (!$desc) { $this->error = $langs->trans("ErrorWrongValueForParameter", "3"); return -2; } - if ($this->id > 0) - { + if ($this->id > 0) { // 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. } @@ -2076,14 +2173,15 @@ class Societe extends CommonObject $discount->description = $desc; $result = $discount->create($user); - if ($result > 0) - { + if ($result > 0) { return $result; } else { $this->error = $discount->error; return -3; } - } else return 0; + } else { + return 0; + } } /** @@ -2101,8 +2199,7 @@ class Societe extends CommonObject $discountstatic = new DiscountAbsolute($this->db); $result = $discountstatic->getAvailableDiscounts($this, $user, $filter, $maxvalue, $discount_type); - if ($result >= 0) - { + if ($result >= 0) { return $result; } else { $this->error = $discountstatic->error; @@ -2125,15 +2222,16 @@ 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)) - { + if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { $sql .= ", ".MAIN_DB_PREFIX."usergroup_user as ug"; $sql .= " WHERE ((ug.fk_user = sc.fk_user"; $sql .= " AND ug.entity = ".$conf->entity.")"; $sql .= " OR u.admin = 1)"; - } else $sql .= " WHERE entity in (0, ".$conf->entity.")"; + } else { + $sql .= " WHERE entity in (0, ".$conf->entity.")"; + } $sql .= " AND u.rowid = sc.fk_user AND sc.fk_soc = ".$this->id; if (empty($sortfield) && empty($sortorder)) { @@ -2143,16 +2241,13 @@ class Societe extends CommonObject $sql .= $this->db->order($sortfield, $sortorder); $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($mode)) - { + if (empty($mode)) { $reparray[$i]['id'] = $obj->rowid; $reparray[$i]['lastname'] = $obj->lastname; $reparray[$i]['firstname'] = $obj->firstname; @@ -2164,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; } @@ -2176,7 +2272,6 @@ class Societe extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Set the price level * @@ -2184,29 +2279,25 @@ 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) - { + 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)) - { + if (!$this->db->query($sql)) { dol_print_error($this->db); return -1; } $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)) - { + if (!$this->db->query($sql)) { dol_print_error($this->db); return -1; } @@ -2228,50 +2319,42 @@ class Societe extends CommonObject // phpcs:enable $error = 0; - if ($this->id > 0 && $commid > 0) - { + if ($this->id > 0 && $commid > 0) { $this->db->begin(); - if (!$error) - { + 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) - { + if (!$resql) { dol_syslog(get_class($this)."::add_commercial Error ".$this->db->lasterror()); $error++; } } - if (!$error) - { + if (!$error) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_commerciaux"; $sql .= " (fk_soc, fk_user)"; $sql .= " VALUES (".$this->id.", ".$commid.")"; $resql = $this->db->query($sql); - if (!$resql) - { + if (!$resql) { dol_syslog(get_class($this)."::add_commercial Error ".$this->db->lasterror()); $error++; } } - if (!$error) - { + if (!$error) { $this->context = array('commercial_modified'=>$commid); $result = $this->call_trigger('COMPANY_LINK_SALE_REPRESENTATIVE', $user); - if ($result < 0) - { + if ($result < 0) { $error++; } } - if (!$error) - { + if (!$error) { $this->db->commit(); return 1; } else { @@ -2298,15 +2381,15 @@ class Societe extends CommonObject $this->context = array('commercial_modified'=>$commid); $result = $this->call_trigger('COMPANY_UNLINK_SALE_REPRESENTATIVE', $user); - if ($result < 0) $error++; + if ($result < 0) { + $error++; + } - if ($this->id > 0 && $commid > 0) - { + 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)) - { + if (!$this->db->query($sql)) { dol_syslog(get_class($this)."::del_commercial Erreur"); } } @@ -2327,17 +2410,22 @@ class Societe 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 + } $name = $this->name ? $this->name : $this->nom; if (!empty($conf->global->SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD)) { - if (empty($option) && $this->client > 0) $option = 'customer'; - if (empty($option) && $this->fournisseur > 0) $option = 'supplier'; + if (empty($option) && $this->client > 0) { + $option = 'customer'; + } + if (empty($option) && $this->fournisseur > 0) { + $option = 'supplier'; + } } - if (!empty($conf->global->SOCIETE_ADD_REF_IN_LIST) && (!empty($withpicto))) - { + if (!empty($conf->global->SOCIETE_ADD_REF_IN_LIST) && (!empty($withpicto))) { $code = ''; if (($this->client) && (!empty($this->code_client)) && ($conf->global->SOCIETE_ADD_REF_IN_LIST == 1 || $conf->global->SOCIETE_ADD_REF_IN_LIST == 2)) { $code = $this->code_client.' - '; @@ -2356,18 +2444,18 @@ class Societe extends CommonObject } } - if (!empty($this->name_alias)) $name .= ' ('.$this->name_alias.')'; + if (!empty($this->name_alias)) { + $name .= ' ('.$this->name_alias.')'; + } $result = ''; $label = ''; $linkstart = ''; $linkend = ''; - if (!empty($this->logo) && class_exists('Form')) - { + if (!empty($this->logo) && class_exists('Form')) { $label .= '<div class="photointooltip">'; $label .= Form::showphoto('societe', $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 .= '</div><div style="clear: both;"></div>'; - } elseif (!empty($this->logo_squarred) && class_exists('Form')) - { + } elseif (!empty($this->logo_squarred) && class_exists('Form')) { /*$label.= '<div class="photointooltip">'; $label.= Form::showphoto('societe', $this, 0, 40, 0, 'photowithmargin', '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.= '</div><div style="clear: both;"></div>';*/ @@ -2375,43 +2463,34 @@ class Societe extends CommonObject $label .= '<div class="centpercent">'; - if ($option == 'customer' || $option == 'compta' || $option == 'category') - { + if ($option == 'customer' || $option == 'compta' || $option == 'category') { $label .= img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("Customer").'</u>'; $linkstart = '<a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$this->id; - } elseif ($option == 'prospect' && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) - { + } elseif ($option == 'prospect' && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) { $label .= img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("Prospect").'</u>'; $linkstart = '<a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$this->id; - } elseif ($option == 'supplier' || $option == 'category_supplier') - { + } elseif ($option == 'supplier' || $option == 'category_supplier') { $label .= img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("Supplier").'</u>'; $linkstart = '<a href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$this->id; - } elseif ($option == 'agenda') - { + } elseif ($option == 'agenda') { $label .= img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("ThirdParty").'</u>'; $linkstart = '<a href="'.DOL_URL_ROOT.'/societe/agenda.php?socid='.$this->id; - } elseif ($option == 'project') - { + } elseif ($option == 'project') { $label .= img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("ThirdParty").'</u>'; $linkstart = '<a href="'.DOL_URL_ROOT.'/societe/project.php?socid='.$this->id; - } elseif ($option == 'margin') - { + } elseif ($option == 'margin') { $label .= img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("ThirdParty").'</u>'; $linkstart = '<a href="'.DOL_URL_ROOT.'/margin/tabs/thirdpartyMargins.php?socid='.$this->id.'&type=1'; - } elseif ($option == 'contact') - { + } elseif ($option == 'contact') { $label .= img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("ThirdParty").'</u>'; $linkstart = '<a href="'.DOL_URL_ROOT.'/societe/contact.php?socid='.$this->id; - } elseif ($option == 'ban') - { + } elseif ($option == 'ban') { $label .= img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("ThirdParty").'</u>'; $linkstart = '<a href="'.DOL_URL_ROOT.'/societe/paymentmodes.php?socid='.$this->id; } // By default - if (empty($linkstart)) - { + if (empty($linkstart)) { $label .= img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("ThirdParty").'</u>'; $linkstart = '<a href="'.DOL_URL_ROOT.'/societe/card.php?socid='.$this->id; } @@ -2419,55 +2498,75 @@ class Societe extends CommonObject $label .= ' '.$this->getLibStatut(5); } - if (!empty($this->name)) - { + if (!empty($this->name)) { $label .= '<br><b>'.$langs->trans('Name').':</b> '.dol_escape_htmltag($this->name); - if (!empty($this->name_alias)) $label .= ' ('.dol_escape_htmltag($this->name_alias).')'; + if (!empty($this->name_alias)) { + $label .= ' ('.dol_escape_htmltag($this->name_alias).')'; + } } $label .= '<br><b>'.$langs->trans('Email').':</b> '.$this->email; - if (!empty($this->country_code)) + if (!empty($this->country_code)) { $label .= '<br><b>'.$langs->trans('Country').':</b> '.$this->country_code; - if (!empty($this->tva_intra) || (!empty($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP) && strpos($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP, 'vatnumber') !== false)) - $label .= '<br><b>'.$langs->trans('VATIntra').':</b> '.dol_escape_htmltag($this->tva_intra); - if (!empty($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP)) - { - if (strpos($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP, 'profid1') !== false) $label .= '<br><b>'.$langs->trans('ProfId1'.$this->country_code).':</b> '.$this->idprof1; - if (strpos($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP, 'profid2') !== false) $label .= '<br><b>'.$langs->trans('ProfId2'.$this->country_code).':</b> '.$this->idprof2; - if (strpos($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP, 'profid3') !== false) $label .= '<br><b>'.$langs->trans('ProfId3'.$this->country_code).':</b> '.$this->idprof3; - if (strpos($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP, 'profid4') !== false) $label .= '<br><b>'.$langs->trans('ProfId4'.$this->country_code).':</b> '.$this->idprof4; - if (strpos($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP, 'profid5') !== false) $label .= '<br><b>'.$langs->trans('ProfId5'.$this->country_code).':</b> '.$this->idprof5; - if (strpos($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP, 'profid6') !== false) $label .= '<br><b>'.$langs->trans('ProfId6'.$this->country_code).':</b> '.$this->idprof6; } - if (!empty($this->code_client) && ($this->client == 1 || $this->client == 3)) + if (!empty($this->tva_intra) || (!empty($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP) && strpos($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP, 'vatnumber') !== false)) { + $label .= '<br><b>'.$langs->trans('VATIntra').':</b> '.dol_escape_htmltag($this->tva_intra); + } + if (!empty($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP)) { + if (strpos($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP, 'profid1') !== false) { + $label .= '<br><b>'.$langs->trans('ProfId1'.$this->country_code).':</b> '.$this->idprof1; + } + if (strpos($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP, 'profid2') !== false) { + $label .= '<br><b>'.$langs->trans('ProfId2'.$this->country_code).':</b> '.$this->idprof2; + } + if (strpos($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP, 'profid3') !== false) { + $label .= '<br><b>'.$langs->trans('ProfId3'.$this->country_code).':</b> '.$this->idprof3; + } + if (strpos($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP, 'profid4') !== false) { + $label .= '<br><b>'.$langs->trans('ProfId4'.$this->country_code).':</b> '.$this->idprof4; + } + if (strpos($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP, 'profid5') !== false) { + $label .= '<br><b>'.$langs->trans('ProfId5'.$this->country_code).':</b> '.$this->idprof5; + } + if (strpos($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP, 'profid6') !== false) { + $label .= '<br><b>'.$langs->trans('ProfId6'.$this->country_code).':</b> '.$this->idprof6; + } + } + if (!empty($this->code_client) && ($this->client == 1 || $this->client == 3)) { $label .= '<br><b>'.$langs->trans('CustomerCode').':</b> '.$this->code_client; - if (!empty($this->code_fournisseur) && $this->fournisseur) + } + if (!empty($this->code_fournisseur) && $this->fournisseur) { $label .= '<br><b>'.$langs->trans('SupplierCode').':</b> '.$this->code_fournisseur; - if (!empty($conf->accounting->enabled) && ($this->client == 1 || $this->client == 3)) + } + if (!empty($conf->accounting->enabled) && ($this->client == 1 || $this->client == 3)) { $label .= '<br><b>'.$langs->trans('CustomerAccountancyCode').':</b> '.($this->code_compta ? $this->code_compta : $this->code_compta_client); - if (!empty($conf->accounting->enabled) && $this->fournisseur) + } + if (!empty($conf->accounting->enabled) && $this->fournisseur) { $label .= '<br><b>'.$langs->trans('SupplierAccountancyCode').':</b> '.$this->code_compta_fournisseur; + } $label .= '</div>'; // Add type of canvas $linkstart .= (!empty($this->canvas) ? '&canvas='.$this->canvas : ''); // 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) $linkstart .= '&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) { + $linkstart .= '&save_lastsearch_values=1'; + } $linkstart .= '"'; $linkclose = ''; - if (empty($notooltip)) - { - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { + if (empty($notooltip)) { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("ShowCompany"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip refurl"'; - /* + /* $hookmanager->initHooks(array('thirdpartydao')); $parameters=array('id'=>$this->id); $reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks @@ -2478,15 +2577,18 @@ class Societe extends CommonObject $linkend = '</a>'; global $user; - if (!$user->rights->societe->client->voir && $user->socid > 0 && $this->id != $user->socid) - { + if (!$user->rights->societe->client->voir && $user->socid > 0 && $this->id != $user->socid) { $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 .= dol_escape_htmltag($maxlen ? dol_trunc($name, $maxlen) : $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 .= dol_escape_htmltag($maxlen ? dol_trunc($name, $maxlen) : $name); + } $result .= $linkend; global $action; @@ -2501,12 +2603,47 @@ class Societe extends CommonObject 'save_lastsearch_value'=> $save_lastsearch_value ); $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; } + /** + * 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) * @@ -2533,10 +2670,11 @@ class Societe extends CommonObject $langs->load('companies'); $statusType = 'status4'; - if ($status == 0) $statusType = 'status6'; + if ($status == 0) { + $statusType = 'status6'; + } - if (empty($this->labelStatus) || empty($this->labelStatusShort)) - { + if (empty($this->labelStatus) || empty($this->labelStatusShort)) { $this->labelStatus[0] = $langs->trans("ActivityCeased"); $this->labelStatus[1] = $langs->trans("InActivity"); $this->labelStatusShort[0] = $langs->trans("ActivityCeased"); @@ -2559,9 +2697,10 @@ class Societe extends CommonObject global $langs; $contact_emails = $this->contact_property_array('email', 1); - if ($this->email && $addthirdparty) - { - if (empty($this->name)) $this->name = $this->nom; + if ($this->email && $addthirdparty) { + if (empty($this->name)) { + $this->name = $this->nom; + } $contact_emails['thirdparty'] = $langs->transnoentitiesnoconv("ThirdParty").': '.dol_trunc($this->name, 16)." <".$this->email.">"; } //var_dump($contact_emails) @@ -2581,9 +2720,10 @@ class Societe extends CommonObject $contact_phone = $this->contact_property_array('mobile'); - if (!empty($this->phone)) // If a phone of thirdparty is defined, we add it ot mobile of contacts - { - if (empty($this->name)) $this->name = $this->nom; + if (!empty($this->phone)) { // If a phone of thirdparty is defined, we add it ot mobile of contacts + if (empty($this->name)) { + $this->name = $this->nom; + } // TODO: Tester si tel non deja present dans tableau contact $contact_phone['thirdparty'] = $langs->transnoentitiesnoconv("ThirdParty").': '.dol_trunc($this->name, 16)." <".$this->phone.">"; } @@ -2612,36 +2752,36 @@ class Societe extends CommonObject $sql .= " ORDER BY lastname, firstname"; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $nump = $this->db->num_rows($resql); - if ($nump) - { + if ($nump) { $sepa = "("; $sepb = ")"; - if ($mode == 'email') - { + if ($mode == 'email') { //$sepa="&lt;"; $sepb="&gt;"; $sepa = "<"; $sepb = ">"; } $i = 0; - while ($i < $nump) - { + while ($i < $nump) { $obj = $this->db->fetch_object($resql); - if ($mode == 'email') $property = $obj->email; - elseif ($mode == 'mobile') $property = $obj->phone_mobile; - else $property = $obj->$mode; + if ($mode == 'email') { + $property = $obj->email; + } elseif ($mode == 'mobile') { + $property = $obj->phone_mobile; + } else { + $property = $obj->$mode; + } // Show all contact. If hidedisabled is 1, showonly contacts with status = 1 - if ($obj->status == 1 || empty($hidedisabled)) - { - if (empty($property)) - { - if ($mode == 'email') $property = $langs->transnoentitiesnoconv("NoEMail"); - elseif ($mode == 'mobile') $property = $langs->transnoentitiesnoconv("NoMobilePhone"); + if ($obj->status == 1 || empty($hidedisabled)) { + if (empty($property)) { + if ($mode == 'email') { + $property = $langs->transnoentitiesnoconv("NoEMail"); + } elseif ($mode == 'mobile') { + $property = $langs->transnoentitiesnoconv("NoMobilePhone"); + } } - if (!empty($obj->poste)) - { + if (!empty($obj->poste)) { $contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname, $obj->lastname)).($obj->poste ? " - ".$obj->poste : "").(($mode != 'poste' && $property) ? " ".$sepa.$property.$sepb : ''); } else { $contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname, $obj->lastname)).(($mode != 'poste' && $property) ? " ".$sepa.$property.$sepb : ''); @@ -2670,14 +2810,11 @@ class Societe extends CommonObject $sql = "SELECT rowid, lastname, firstname FROM ".MAIN_DB_PREFIX."socpeople WHERE fk_soc = ".$this->id; $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); $contacts[$obj->rowid] = dolGetFirstLastname($obj->firstname, $obj->lastname); $i++; @@ -2703,14 +2840,11 @@ class Societe extends CommonObject $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."socpeople WHERE fk_soc = ".$this->id; $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); $contact = new Contact($this->db); $contact->fetch($obj->rowid); @@ -2737,23 +2871,26 @@ class Societe extends CommonObject // phpcs:enable $contact_property = ''; - if (empty($rowid)) return ''; + if (empty($rowid)) { + return ''; + } $sql = "SELECT rowid, email, phone_mobile, lastname, firstname"; $sql .= " FROM ".MAIN_DB_PREFIX."socpeople"; $sql .= " WHERE rowid = ".((int) $rowid); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $nump = $this->db->num_rows($resql); - if ($nump) - { + if ($nump) { $obj = $this->db->fetch_object($resql); - if ($mode == 'email') $contact_property = dol_string_nospecial(dolGetFirstLastname($obj->firstname, $obj->lastname), ' ', array(","))." <".$obj->email.">"; - elseif ($mode == 'mobile') $contact_property = $obj->phone_mobile; + if ($mode == 'email') { + $contact_property = dol_string_nospecial(dolGetFirstLastname($obj->firstname, $obj->lastname), ' ', array(","))." <".$obj->email.">"; + } elseif ($mode == 'mobile') { + $contact_property = $obj->phone_mobile; + } } return $contact_property; } else { @@ -2841,15 +2978,15 @@ class Societe extends CommonObject { // phpcs:enable global $conf; - if (!empty($conf->global->SOCIETE_CODECLIENT_ADDON)) - { + if (!empty($conf->global->SOCIETE_CODECLIENT_ADDON)) { $module = $conf->global->SOCIETE_CODECLIENT_ADDON; $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; + } } $mod = new $module(); @@ -2873,15 +3010,15 @@ class Societe extends CommonObject { // phpcs:enable global $conf; - if (!empty($conf->global->SOCIETE_CODECLIENT_ADDON)) - { + if (!empty($conf->global->SOCIETE_CODECLIENT_ADDON)) { $module = $conf->global->SOCIETE_CODECLIENT_ADDON; $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; + } } $mod = new $module(); @@ -2902,23 +3039,29 @@ class Societe extends CommonObject { // phpcs:enable global $conf; - if (!empty($conf->global->SOCIETE_CODECLIENT_ADDON)) - { + if (!empty($conf->global->SOCIETE_CODECLIENT_ADDON)) { $module = $conf->global->SOCIETE_CODECLIENT_ADDON; $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; + } } $mod = new $module(); dol_syslog(get_class($this)."::codeclient_modifiable code_client=".$this->code_client." module=".$module); - if ($mod->code_modifiable_null && !$this->code_client) return 1; - if ($mod->code_modifiable_invalide && $this->check_codeclient() < 0) return 1; - if ($mod->code_modifiable) return 1; // A mettre en dernier + if ($mod->code_modifiable_null && !$this->code_client) { + return 1; + } + if ($mod->code_modifiable_invalide && $this->check_codeclient() < 0) { + return 1; + } + if ($mod->code_modifiable) { + return 1; // A mettre en dernier + } return 0; } else { return 0; @@ -2936,23 +3079,29 @@ class Societe extends CommonObject { // phpcs:enable global $conf; - if (!empty($conf->global->SOCIETE_CODECLIENT_ADDON)) - { + if (!empty($conf->global->SOCIETE_CODECLIENT_ADDON)) { $module = $conf->global->SOCIETE_CODECLIENT_ADDON; $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; + } } $mod = new $module(); dol_syslog(get_class($this)."::codefournisseur_modifiable code_founisseur=".$this->code_fournisseur." module=".$module); - if ($mod->code_modifiable_null && !$this->code_fournisseur) return 1; - if ($mod->code_modifiable_invalide && $this->check_codefournisseur() < 0) return 1; - if ($mod->code_modifiable) return 1; // A mettre en dernier + if ($mod->code_modifiable_null && !$this->code_fournisseur) { + return 1; + } + if ($mod->code_modifiable_invalide && $this->check_codefournisseur() < 0) { + return 1; + } + if ($mod->code_modifiable) { + return 1; // A mettre en dernier + } return 0; } else { return 0; @@ -2976,25 +3125,25 @@ class Societe extends CommonObject { // phpcs:enable global $conf; - if (!empty($conf->global->SOCIETE_CODECLIENT_ADDON)) - { + if (!empty($conf->global->SOCIETE_CODECLIENT_ADDON)) { $module = $conf->global->SOCIETE_CODECLIENT_ADDON; $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; + } } $mod = new $module(); - dol_syslog(get_class($this)."::check_codeclient code_client=".$this->code_client." module=".$module); - $result = $mod->verif($this->db, $this->code_client, $this, 0); - if ($result) { // If error - $this->error = $mod->error; - $this->errors = $mod->errors; - } + dol_syslog(get_class($this)."::check_codeclient code_client=".$this->code_client." module=".$module); + $result = $mod->verif($this->db, $this->code_client, $this, 0); + if ($result) { // If error + $this->error = $mod->error; + $this->errors = $mod->errors; + } return $result; } else { return 0; @@ -3010,20 +3159,22 @@ class Societe extends CommonObject * -2 ErrorCustomerCodeRequired * -3 ErrorCustomerCodeAlreadyUsed * -4 ErrorPrefixRequired + * -5 NotConfigured - Setup empty so any value may be ok or not + * -6 Other (see this->error) */ public function check_codefournisseur() { // phpcs:enable global $conf; - if (!empty($conf->global->SOCIETE_CODECLIENT_ADDON)) - { + if (!empty($conf->global->SOCIETE_CODECLIENT_ADDON)) { $module = $conf->global->SOCIETE_CODECLIENT_ADDON; $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; + } } $mod = new $module(); @@ -3054,26 +3205,28 @@ class Societe extends CommonObject // phpcs:enable global $conf; - if (!empty($conf->global->SOCIETE_CODECOMPTA_ADDON)) - { + if (!empty($conf->global->SOCIETE_CODECOMPTA_ADDON)) { $res = false; $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); - foreach ($dirsociete as $dirroot) - { + foreach ($dirsociete as $dirroot) { $res = dol_include_once($dirroot.$conf->global->SOCIETE_CODECOMPTA_ADDON.'.php'); - if ($res) break; + if ($res) { + break; + } } - if ($res) - { + if ($res) { $classname = $conf->global->SOCIETE_CODECOMPTA_ADDON; $mod = new $classname; // Set code count in $mod->code $result = $mod->get_code($this->db, $this, $type); - if ($type == 'customer') $this->code_compta = $mod->code; - elseif ($type == 'supplier') $this->code_compta_fournisseur = $mod->code; + if ($type == 'customer') { + $this->code_compta = $mod->code; + } elseif ($type == 'supplier') { + $this->code_compta_fournisseur = $mod->code; + } return $result; } else { @@ -3081,8 +3234,11 @@ class Societe extends CommonObject return -1; } } else { - if ($type == 'customer') $this->code_compta = ''; - elseif ($type == 'supplier') $this->code_compta_fournisseur = ''; + if ($type == 'customer') { + $this->code_compta = ''; + } elseif ($type == 'supplier') { + $this->code_compta_fournisseur = ''; + } return 0; } @@ -3098,21 +3254,21 @@ class Societe extends CommonObject public function set_parent($id) { // phpcs:enable - if ($this->id) - { + if ($this->id) { $sql = "UPDATE ".MAIN_DB_PREFIX."societe"; $sql .= " SET parent = ".($id > 0 ? $id : "null"); $sql .= " WHERE rowid = ".$this->id; dol_syslog(get_class($this).'::set_parent', LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->parent = $id; return 1; } else { return -1; } - } else return -1; + } else { + return -1; + } } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -3127,8 +3283,7 @@ class Societe extends CommonObject // phpcs:enable global $conf; - switch ($idprof) - { + switch ($idprof) { case 1: $ret = (empty($conf->global->SOCIETE_IDPROF1_UNIQUE) ? false : true); break; @@ -3168,8 +3323,7 @@ class Societe extends CommonObject // phpcs:enable $field = $idprof; - switch ($idprof) // For backward compatibility - { + switch ($idprof) { // For backward compatibility case '1': case 'idprof1': $field = "siren"; @@ -3192,14 +3346,15 @@ class Societe extends CommonObject case '6': $field = "idprof6"; break; - } + } //Verify duplicate entries $sql = "SELECT COUNT(*) as idprof FROM ".MAIN_DB_PREFIX."societe WHERE ".$field." = '".$this->db->escape($value)."' AND entity IN (".getEntity('societe').")"; - if ($socid) $sql .= " AND rowid <> ".$socid; + if ($socid) { + $sql .= " AND rowid <> ".$socid; + } $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); $count = $obj->idprof; } else { @@ -3208,8 +3363,11 @@ class Societe extends CommonObject } $this->db->free($resql); - if ($count > 0) return true; - else return false; + if ($count > 0) { + return true; + } else { + return false; + } } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -3228,111 +3386,144 @@ class Societe extends CommonObject $ok = 1; - if (!empty($conf->global->MAIN_DISABLEPROFIDRULES)) return 1; + if (!empty($conf->global->MAIN_DISABLEPROFIDRULES)) { + return 1; + } // Check SIREN if country FR - if ($idprof == 1 && $soc->country_code == 'FR') - { + if ($idprof == 1 && $soc->country_code == 'FR') { $chaine = trim($this->idprof1); $chaine = preg_replace('/(\s)/', '', $chaine); - if (!is_numeric($chaine)) return -1; - if (dol_strlen($chaine) != 9) return -1; + if (!is_numeric($chaine)) { + return -1; + } + if (dol_strlen($chaine) != 9) { + return -1; + } // on prend chaque chiffre un par un // si son index (position dans la chaîne en commence à 0 au premier caractère) est impair // on double sa valeur et si cette dernière est supérieure à 9, on lui retranche 9 // on ajoute cette valeur à la somme totale $sum = 0; - for ($index = 0; $index < 9; $index++) - { + for ($index = 0; $index < 9; $index++) { $number = (int) $chaine[$index]; - if (($index % 2) != 0) { if (($number *= 2) > 9) $number -= 9; } + if (($index % 2) != 0) { + if (($number *= 2) > 9) { + $number -= 9; + } + } $sum += $number; } // le numéro est valide si la somme des chiffres est multiple de 10 - if (($sum % 10) != 0) return -1; + if (($sum % 10) != 0) { + return -1; + } } // Verifie SIRET si pays FR - if ($idprof == 2 && $soc->country_code == 'FR') - { + if ($idprof == 2 && $soc->country_code == 'FR') { $chaine = trim($this->idprof2); $chaine = preg_replace('/(\s)/', '', $chaine); - if (!is_numeric($chaine)) return -1; - if (dol_strlen($chaine) != 14) return -1; + if (!is_numeric($chaine)) { + return -1; + } + if (dol_strlen($chaine) != 14) { + return -1; + } // on prend chaque chiffre un par un // si son index (position dans la chaîne en commence à 0 au premier caractère) est pair // on double sa valeur et si cette dernière est supérieure à 9, on lui retranche 9 // on ajoute cette valeur à la somme totale $sum = 0; - for ($index = 0; $index < 14; $index++) - { + for ($index = 0; $index < 14; $index++) { $number = (int) $chaine[$index]; - if (($index % 2) == 0) { if (($number *= 2) > 9) $number -= 9; } + if (($index % 2) == 0) { + if (($number *= 2) > 9) { + $number -= 9; + } + } $sum += $number; } // le numéro est valide si la somme des chiffres est multiple de 10 - if (($sum % 10) != 0) return -1; + if (($sum % 10) != 0) { + return -1; + } } //Verify CIF/NIF/NIE if pays ES //Returns: 1 if NIF ok, 2 if CIF ok, 3 if NIE ok, -1 if NIF bad, -2 if CIF bad, -3 if NIE bad, 0 if unexpected bad - if ($idprof == 1 && $soc->country_code == 'ES') - { + if ($idprof == 1 && $soc->country_code == 'ES') { $string = trim($this->idprof1); $string = preg_replace('/(\s)/', '', $string); $string = strtoupper($string); //Check format - if (!preg_match('/((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)/', $string)) - return 0; + if (!preg_match('/((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)/', $string)) { + return 0; + } $num = array(); - for ($i = 0; $i < 9; $i++) - { + for ($i = 0; $i < 9; $i++) { $num[$i] = substr($string, $i, 1); } //Check NIF - if (preg_match('/(^[0-9]{8}[A-Z]{1}$)/', $string)) - if ($num[8] == substr('TRWAGMYFPDXBNJZSQVHLCKE', substr($string, 0, 8) % 23, 1)) + if (preg_match('/(^[0-9]{8}[A-Z]{1}$)/', $string)) { + if ($num[8] == substr('TRWAGMYFPDXBNJZSQVHLCKE', substr($string, 0, 8) % 23, 1)) { return 1; - else return -1; + } else { + return -1; + } + } //algorithm checking type code CIF $sum = $num[2] + $num[4] + $num[6]; - for ($i = 1; $i < 8; $i += 2) - $sum += intval(substr((2 * $num[$i]), 0, 1)) + intval(substr((2 * $num[$i]), 1, 1)); + for ($i = 1; $i < 8; $i += 2) { + $sum += intval(substr((2 * $num[$i]), 0, 1)) + intval(substr((2 * $num[$i]), 1, 1)); + } $n = 10 - substr($sum, strlen($sum) - 1, 1); //Chek special NIF - if (preg_match('/^[KLM]{1}/', $string)) - if ($num[8] == chr(64 + $n) || $num[8] == substr('TRWAGMYFPDXBNJZSQVHLCKE', substr($string, 1, 8) % 23, 1)) + if (preg_match('/^[KLM]{1}/', $string)) { + if ($num[8] == chr(64 + $n) || $num[8] == substr('TRWAGMYFPDXBNJZSQVHLCKE', substr($string, 1, 8) % 23, 1)) { return 1; - else return -1; + } else { + return -1; + } + } //Check CIF - if (preg_match('/^[ABCDEFGHJNPQRSUVW]{1}/', $string)) - if ($num[8] == chr(64 + $n) || $num[8] == substr($n, strlen($n) - 1, 1)) + if (preg_match('/^[ABCDEFGHJNPQRSUVW]{1}/', $string)) { + if ($num[8] == chr(64 + $n) || $num[8] == substr($n, strlen($n) - 1, 1)) { return 2; - else return -2; + } else { + return -2; + } + } //Check NIE T - if (preg_match('/^[T]{1}/', $string)) - if ($num[8] == preg_match('/^[T]{1}[A-Z0-9]{8}$/', $string)) + if (preg_match('/^[T]{1}/', $string)) { + if ($num[8] == preg_match('/^[T]{1}[A-Z0-9]{8}$/', $string)) { return 3; - else return -3; + } else { + return -3; + } + } //Check NIE XYZ - if (preg_match('/^[XYZ]{1}/', $string)) - if ($num[8] == substr('TRWAGMYFPDXBNJZSQVHLCKE', substr(str_replace(array('X', 'Y', 'Z'), array('0', '1', '2'), $string), 0, 8) % 23, 1)) + if (preg_match('/^[XYZ]{1}/', $string)) { + if ($num[8] == substr('TRWAGMYFPDXBNJZSQVHLCKE', substr(str_replace(array('X', 'Y', 'Z'), array('0', '1', '2'), $string), 0, 8) % 23, 1)) { return 3; - else return -3; + } else { + return -3; + } + } //Can not be verified return -4; @@ -3340,8 +3531,7 @@ class Societe extends CommonObject //Verify NIF if country is PT //Returns: 1 if NIF ok, -1 if NIF bad, 0 if unexpected bad - if ($idprof == 1 && $soc->country_code == 'PT') - { + if ($idprof == 1 && $soc->country_code == 'PT') { $string = trim($this->idprof1); $string = preg_replace('/(\s)/', '', $string); @@ -3420,8 +3610,7 @@ class Societe extends CommonObject // phpcs:enable $sql = 'SELECT COUNT(*) as numproj FROM '.MAIN_DB_PREFIX.'projet WHERE fk_soc = '.$this->id; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); $count = $obj->numproj; } else { @@ -3444,13 +3633,11 @@ 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) - { - if ($this->db->num_rows($result)) - { + if ($result) { + if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; @@ -3493,11 +3680,13 @@ class Societe extends CommonObject $isacompany = 1; } elseif (!empty($this->idprof1) || !empty($this->idprof2) || !empty($this->idprof3) || !empty($this->idprof4) || !empty($this->idprof5) || !empty($this->idprof6)) { $isacompany = 1; - } elseif (!empty($this->typent_code) && $this->typent_code != 'TE_UNKNOWN') - { + } elseif (!empty($this->typent_code) && $this->typent_code != 'TE_UNKNOWN') { // TODO Add a field is_a_company into dictionary - if (preg_match('/^TE_PRIVATE/', $this->typent_code)) $isacompany = 0; - else $isacompany = 1; + if (preg_match('/^TE_PRIVATE/', $this->typent_code)) { + $isacompany = 0; + } else { + $isacompany = 1; + } } return $isacompany; @@ -3529,10 +3718,8 @@ class Societe extends CommonObject $sql .= " WHERE type = ".Categorie::TYPE_SUPPLIER; $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { $this->SupplierCategories[$obj->rowid] = $obj->label; } return 0; @@ -3551,12 +3738,13 @@ class Societe extends CommonObject public function AddFournisseurInCategory($categorie_id) { // phpcs:enable - if ($categorie_id > 0 && $this->id > 0) - { + if ($categorie_id > 0 && $this->id > 0) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie_fournisseur (fk_categorie, fk_soc) "; $sql .= " VALUES (".$categorie_id.", ".$this->id.")"; - if ($resql = $this->db->query($sql)) return 0; + if ($resql = $this->db->query($sql)) { + return 0; + } } else { return 0; } @@ -3576,13 +3764,15 @@ class Societe extends CommonObject */ public function create_from_member(Adherent $member, $socname = '', $socalias = '', $customercode = '') { - // phpcs:enable - global $user, $langs; + // phpcs:enable + global $conf, $user, $langs; dol_syslog(get_class($this)."::create_from_member", LOG_DEBUG); $name = $socname ? $socname : $member->societe; - if (empty($name)) $name = $member->getFullName($langs); + if (empty($name)) { + $name = $member->getFullName($langs); + } $alias = $socalias ? $socalias : ''; @@ -3603,20 +3793,38 @@ 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) - { + + if ($result >= 0) { + // Auto-create contact on thirdparty creation + if (!empty($conf->global->THIRDPARTY_DEFAULT_CREATE_CONTACT)) { + // Fill fields needed by contact + $this->name_bis = $member->lastname; + $this->firstname = $member->firstname; + $this->civility_id = $member->civility_id; + + dol_syslog("We ask to create a contact/address too", LOG_DEBUG); + $result = $this->create_individual($user); + + if ($result < 0) { + setEventMessages($this->error, $this->errors, 'errors'); + $this->db->rollback(); + return -1; + } + } + $sql = "UPDATE ".MAIN_DB_PREFIX."adherent"; $sql .= " SET fk_soc=".$this->id; $sql .= " WHERE rowid=".$member->id; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->db->commit(); return $this->id; } else { @@ -3658,12 +3866,10 @@ class Societe extends CommonObject // We define country_id, country_code and country $country_id = $country_code = $country_label = ''; - if (!empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY)) - { + if (!empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY)) { $tmp = explode(':', $conf->global->MAIN_INFO_SOCIETE_COUNTRY); $country_id = $tmp[0]; - if (!empty($tmp[1])) // If $conf->global->MAIN_INFO_SOCIETE_COUNTRY is "id:code:label" - { + if (!empty($tmp[1])) { // If $conf->global->MAIN_INFO_SOCIETE_COUNTRY is "id:code:label" $country_code = $tmp[1]; $country_label = $tmp[2]; } else // For backward compatibility @@ -3677,22 +3883,21 @@ class Societe extends CommonObject $this->country_id = $country_id; $this->country_code = $country_code; $this->country = $country_label; - if (is_object($langs)) $this->country = ($langs->trans('Country'.$country_code) != 'Country'.$country_code) ? $langs->trans('Country'.$country_code) : $country_label; + if (is_object($langs)) { + $this->country = ($langs->trans('Country'.$country_code) != 'Country'.$country_code) ? $langs->trans('Country'.$country_code) : $country_label; + } //TODO This could be replicated for region but function `getRegion` didn't exist, so I didn't added it. // We define state_id, state_code and state $state_id = 0; $state_code = $state_label = ''; - if (!empty($conf->global->MAIN_INFO_SOCIETE_STATE)) - { + if (!empty($conf->global->MAIN_INFO_SOCIETE_STATE)) { $tmp = explode(':', $conf->global->MAIN_INFO_SOCIETE_STATE); $state_id = $tmp[0]; - if (!empty($tmp[1])) // If $conf->global->MAIN_INFO_SOCIETE_STATE is "id:code:label" - { + if (!empty($tmp[1])) { // If $conf->global->MAIN_INFO_SOCIETE_STATE is "id:code:label" $state_code = $tmp[1]; $state_label = $tmp[2]; - } else // For backward compatibility - { - dol_syslog("Your state setup use an old syntax. Reedit it using setup area.", LOG_ERR); + } else { // For backward compatibility + dol_syslog("Your state setup use an old syntax (entity=".$conf->entity."). Reedit it using setup area.", LOG_ERR); include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; $state_code = getState($state_id, 2, $this->db); // This need a SQL request, but it's the old feature that should not be used anymore $state_label = getState($state_id, 0, $this->db); // This need a SQL request, but it's the old feature that should not be used anymore @@ -3701,7 +3906,9 @@ class Societe extends CommonObject $this->state_id = $state_id; $this->state_code = $state_code; $this->state = $state_label; - if (is_object($langs)) $this->state = ($langs->trans('State'.$state_code) != 'State'.$state_code) ? $langs->trans('State'.$state_code) : $state_label; + if (is_object($langs)) { + $this->state = ($langs->trans('State'.$state_code) != 'State'.$state_code) ? $langs->trans('State'.$state_code) : $state_label; + } $this->phone = empty($conf->global->MAIN_INFO_SOCIETE_TEL) ? '' : $conf->global->MAIN_INFO_SOCIETE_TEL; $this->fax = empty($conf->global->MAIN_INFO_SOCIETE_FAX) ? '' : $conf->global->MAIN_INFO_SOCIETE_FAX; @@ -3715,12 +3922,24 @@ class Societe extends CommonObject $this->youtube_url = empty($conf->global->MAIN_INFO_SOCIETE_YOUTUBE_URL) ? '' : $conf->global->MAIN_INFO_SOCIETE_YOUTUBE_URL; $this->github_url = empty($conf->global->MAIN_INFO_SOCIETE_GITHUB_URL) ? '' : $conf->global->MAIN_INFO_SOCIETE_GITHUB_URL; $this->socialnetworks = array(); - if (!empty($this->facebook_url)) $this->socialnetworks['facebook'] = $this->facebook_url; - if (!empty($this->twitter_url)) $this->socialnetworks['twitter'] = $this->twitter_url; - if (!empty($this->linkedin_url)) $this->socialnetworks['linkedin'] = $this->linkedin_url; - if (!empty($this->instagram_url)) $this->socialnetworks['instagram'] = $this->instagram_url; - if (!empty($this->youtube_url)) $this->socialnetworks['youtube'] = $this->youtube_url; - if (!empty($this->github_url)) $this->socialnetworks['github'] = $this->github_url; + if (!empty($this->facebook_url)) { + $this->socialnetworks['facebook'] = $this->facebook_url; + } + if (!empty($this->twitter_url)) { + $this->socialnetworks['twitter'] = $this->twitter_url; + } + if (!empty($this->linkedin_url)) { + $this->socialnetworks['linkedin'] = $this->linkedin_url; + } + if (!empty($this->instagram_url)) { + $this->socialnetworks['instagram'] = $this->instagram_url; + } + if (!empty($this->youtube_url)) { + $this->socialnetworks['youtube'] = $this->youtube_url; + } + if (!empty($this->github_url)) { + $this->socialnetworks['github'] = $this->github_url; + } // Id prof generiques $this->idprof1 = empty($conf->global->MAIN_INFO_SIREN) ? '' : $conf->global->MAIN_INFO_SIREN; @@ -3820,15 +4039,20 @@ class Societe extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_country as c"; $sql .= " WHERE t.fk_pays = c.rowid AND c.code = '".$this->db->escape($this->country_code)."'"; $sql .= " AND t.active = 1"; - if (empty($localTaxNum)) $sql .= " AND (t.localtax1_type <> '0' OR t.localtax2_type <> '0')"; - elseif ($localTaxNum == 1) $sql .= " AND t.localtax1_type <> '0'"; - elseif ($localTaxNum == 2) $sql .= " AND t.localtax2_type <> '0'"; + if (empty($localTaxNum)) { + $sql .= " AND (t.localtax1_type <> '0' OR t.localtax2_type <> '0')"; + } elseif ($localTaxNum == 1) { + $sql .= " AND t.localtax1_type <> '0'"; + } elseif ($localTaxNum == 2) { + $sql .= " AND t.localtax2_type <> '0'"; + } $resql = $this->db->query($sql); - if ($resql) - { - return ($this->db->num_rows($resql) > 0); - } else return false; + if ($resql) { + return ($this->db->num_rows($resql) > 0); + } else { + return false; + } } /** @@ -3845,10 +4069,11 @@ class Societe extends CommonObject dol_syslog("useNPR", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { return ($this->db->num_rows($resql) > 0); - } else return false; + } else { + return false; + } } /** @@ -3866,10 +4091,9 @@ class Societe extends CommonObject dol_syslog("useRevenueStamp", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); - return (($obj->nb > 0) ?true:false); + return (($obj->nb > 0) ?true:false); } else { $this->error = $this->db->lasterror(); return false; @@ -3900,8 +4124,7 @@ class Societe 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; @@ -3955,30 +4178,45 @@ class Societe extends CommonObject $langs->load('customers'); if ($mode == 2) { - if ($status == '-1' || $status == 'ST_NO') return img_action($langs->trans("StatusProspect-1"), -1, $picto).' '.$langs->trans("StatusProspect-1"); - elseif ($status == '0' || $status == 'ST_NEVER') return img_action($langs->trans("StatusProspect0"), 0, $picto).' '.$langs->trans("StatusProspect0"); - elseif ($status == '1' || $status == 'ST_TODO') return img_action($langs->trans("StatusProspect1"), 1, $picto).' '.$langs->trans("StatusProspect1"); - elseif ($status == '2' || $status == 'ST_PEND') return img_action($langs->trans("StatusProspect2"), 2, $picto).' '.$langs->trans("StatusProspect2"); - elseif ($status == '3' || $status == 'ST_DONE') return img_action($langs->trans("StatusProspect3"), 3, $picto).' '.$langs->trans("StatusProspect3"); - else { + if ($status == '-1' || $status == 'ST_NO') { + return img_action($langs->trans("StatusProspect-1"), -1, $picto).' '.$langs->trans("StatusProspect-1"); + } elseif ($status == '0' || $status == 'ST_NEVER') { + return img_action($langs->trans("StatusProspect0"), 0, $picto).' '.$langs->trans("StatusProspect0"); + } elseif ($status == '1' || $status == 'ST_TODO') { + return img_action($langs->trans("StatusProspect1"), 1, $picto).' '.$langs->trans("StatusProspect1"); + } elseif ($status == '2' || $status == 'ST_PEND') { + return img_action($langs->trans("StatusProspect2"), 2, $picto).' '.$langs->trans("StatusProspect2"); + } elseif ($status == '3' || $status == 'ST_DONE') { + return img_action($langs->trans("StatusProspect3"), 3, $picto).' '.$langs->trans("StatusProspect3"); + } else { return img_action(($langs->trans("StatusProspect".$status) != "StatusProspect".$status) ? $langs->trans("StatusProspect".$status) : $label, 0, $picto).' '.(($langs->trans("StatusProspect".$status) != "StatusProspect".$status) ? $langs->trans("StatusProspect".$status) : $label); } } elseif ($mode == 3) { - if ($status == '-1' || $status == 'ST_NO') return img_action($langs->trans("StatusProspect-1"), -1, $picto); - elseif ($status == '0' || $status == 'ST_NEVER') return img_action($langs->trans("StatusProspect0"), 0, $picto); - elseif ($status == '1' || $status == 'ST_TODO') return img_action($langs->trans("StatusProspect1"), 1, $picto); - elseif ($status == '2' || $status == 'ST_PEND') return img_action($langs->trans("StatusProspect2"), 2, $picto); - elseif ($status == '3' || $status == 'ST_DONE') return img_action($langs->trans("StatusProspect3"), 3, $picto); - else { + if ($status == '-1' || $status == 'ST_NO') { + return img_action($langs->trans("StatusProspect-1"), -1, $picto); + } elseif ($status == '0' || $status == 'ST_NEVER') { + return img_action($langs->trans("StatusProspect0"), 0, $picto); + } elseif ($status == '1' || $status == 'ST_TODO') { + return img_action($langs->trans("StatusProspect1"), 1, $picto); + } elseif ($status == '2' || $status == 'ST_PEND') { + return img_action($langs->trans("StatusProspect2"), 2, $picto); + } elseif ($status == '3' || $status == 'ST_DONE') { + return img_action($langs->trans("StatusProspect3"), 3, $picto); + } else { return img_action(($langs->trans("StatusProspect".$status) != "StatusProspect".$status) ? $langs->trans("StatusProspect".$status) : $label, 0, $picto); } } elseif ($mode == 4) { - if ($status == '-1' || $status == 'ST_NO') return img_action($langs->trans("StatusProspect-1"), -1, $picto).' '.$langs->trans("StatusProspect-1"); - elseif ($status == '0' || $status == 'ST_NEVER') return img_action($langs->trans("StatusProspect0"), 0, $picto).' '.$langs->trans("StatusProspect0"); - elseif ($status == '1' || $status == 'ST_TODO') return img_action($langs->trans("StatusProspect1"), 1, $picto).' '.$langs->trans("StatusProspect1"); - elseif ($status == '2' || $status == 'ST_PEND') return img_action($langs->trans("StatusProspect2"), 2, $picto).' '.$langs->trans("StatusProspect2"); - elseif ($status == '3' || $status == 'ST_DONE') return img_action($langs->trans("StatusProspect3"), 3, $picto).' '.$langs->trans("StatusProspect3"); - else { + if ($status == '-1' || $status == 'ST_NO') { + return img_action($langs->trans("StatusProspect-1"), -1, $picto).' '.$langs->trans("StatusProspect-1"); + } elseif ($status == '0' || $status == 'ST_NEVER') { + return img_action($langs->trans("StatusProspect0"), 0, $picto).' '.$langs->trans("StatusProspect0"); + } elseif ($status == '1' || $status == 'ST_TODO') { + return img_action($langs->trans("StatusProspect1"), 1, $picto).' '.$langs->trans("StatusProspect1"); + } elseif ($status == '2' || $status == 'ST_PEND') { + return img_action($langs->trans("StatusProspect2"), 2, $picto).' '.$langs->trans("StatusProspect2"); + } elseif ($status == '3' || $status == 'ST_DONE') { + return img_action($langs->trans("StatusProspect3"), 3, $picto).' '.$langs->trans("StatusProspect3"); + } else { return img_action(($langs->trans("StatusProspect".$status) != "StatusProspect".$status) ? $langs->trans("StatusProspect".$status) : $label, 0, $picto).' '.(($langs->trans("StatusProspect".$status) != "StatusProspect".$status) ? $langs->trans("StatusProspect".$status) : $label); } } @@ -4009,9 +4247,11 @@ class Societe extends CommonObject public function getOutstandingProposals($mode = 'customer') { $table = 'propal'; - if ($mode == 'supplier') $table = 'supplier_proposal'; + if ($mode == 'supplier') { + $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').")"; @@ -4021,21 +4261,22 @@ class Societe extends CommonObject dol_syslog("getOutstandingProposals", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $outstandingOpened = 0; $outstandingTotal = 0; $outstandingTotalIncTax = 0; while ($obj = $this->db->fetch_object($resql)) { $outstandingTotal += $obj->total_ht; $outstandingTotalIncTax += $obj->total_ttc; - if ($obj->status != 0) // Not a draft - { + if ($obj->status != 0) { + // Not a draft $outstandingOpened += $obj->total_ttc; } } return array('opened'=>$outstandingOpened, 'total_ht'=>$outstandingTotal, 'total_ttc'=>$outstandingTotalIncTax); // 'opened' is 'incl taxes' - } else return array(); + } else { + return array(); + } } /** @@ -4047,7 +4288,9 @@ class Societe extends CommonObject public function getOutstandingOrders($mode = 'customer') { $table = 'commande'; - if ($mode == 'supplier') $table = 'commande_fournisseur'; + if ($mode == 'supplier') { + $table = 'commande_fournisseur'; + } $sql = "SELECT rowid, total_ht, total_ttc, fk_statut as status FROM ".MAIN_DB_PREFIX.$table." as f"; $sql .= " WHERE fk_soc = ".$this->id; @@ -4059,21 +4302,22 @@ class Societe extends CommonObject dol_syslog("getOutstandingOrders", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $outstandingOpened = 0; $outstandingTotal = 0; $outstandingTotalIncTax = 0; while ($obj = $this->db->fetch_object($resql)) { $outstandingTotal += $obj->total_ht; $outstandingTotalIncTax += $obj->total_ttc; - if ($obj->status != 0) // Not a draft - { + if ($obj->status != 0) { + // Not a draft $outstandingOpened += $obj->total_ttc; } } return array('opened'=>$outstandingOpened, 'total_ht'=>$outstandingTotal, 'total_ttc'=>$outstandingTotalIncTax); // 'opened' is 'incl taxes' - } else return array(); + } else { + return array(); + } } /** @@ -4086,7 +4330,9 @@ class Societe extends CommonObject public function getOutstandingBills($mode = 'customer', $late = 0) { $table = 'facture'; - if ($mode == 'supplier') $table = 'facture_fourn'; + if ($mode == 'supplier') { + $table = 'facture_fourn'; + } /* Accurate value of remain to pay is to sum remaintopay for each invoice $paiement = $invoice->getSommePaiement(); @@ -4095,8 +4341,11 @@ class Societe extends CommonObject $alreadypayed=price2num($paiement + $creditnotes + $deposits,'MT'); $remaintopay=price2num($invoice->total_ttc - $paiement - $creditnotes - $deposits,'MT'); */ - if ($mode == 'supplier') $sql = "SELECT rowid, total_ht as total_ht, total_ttc, paye, type, fk_statut as status, close_code FROM ".MAIN_DB_PREFIX.$table." as f"; - else $sql = "SELECT rowid, total as total_ht, total_ttc, paye, fk_statut as status, close_code FROM ".MAIN_DB_PREFIX.$table." as f"; + if ($mode == 'supplier') { + $sql = "SELECT rowid, total_ht as total_ht, total_ttc, paye, type, fk_statut as status, close_code FROM ".MAIN_DB_PREFIX.$table." as f"; + } else { + $sql = "SELECT rowid, total as total_ht, total_ttc, paye, fk_statut as status, close_code FROM ".MAIN_DB_PREFIX.$table." as f"; + } $sql .= " WHERE fk_soc = ".$this->id; if (!empty($late)) { $sql .= " AND date_lim_reglement < '".$this->db->idate(dol_now())."'"; @@ -4109,13 +4358,11 @@ class Societe extends CommonObject dol_syslog("getOutstandingBills", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $outstandingOpened = 0; $outstandingTotal = 0; $outstandingTotalIncTax = 0; - if ($mode == 'supplier') - { + if ($mode == 'supplier') { require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; $tmpobject = new FactureFournisseur($this->db); } else { @@ -4127,17 +4374,15 @@ class Societe extends CommonObject if ($obj->status != $tmpobject::STATUS_DRAFT // Not a draft && !($obj->status == $tmpobject::STATUS_ABANDONED && $obj->close_code == 'replaced') // Not a replaced invoice - ) - { + ) { $outstandingTotal += $obj->total_ht; $outstandingTotalIncTax += $obj->total_ttc; } if ($obj->paye == 0 && $obj->status != $tmpobject::STATUS_DRAFT // Not a draft && $obj->status != $tmpobject::STATUS_ABANDONED // Not abandonned - && $obj->status != $tmpobject::STATUS_CLOSED) // Not classified as paid - //$sql .= " AND (status <> 3 OR close_code <> 'abandon')"; // Not abandonned for undefined reason - { + && $obj->status != $tmpobject::STATUS_CLOSED) { // Not classified as paid + //$sql .= " AND (status <> 3 OR close_code <> 'abandon')"; // Not abandonned for undefined reason $paiement = $tmpobject->getSommePaiement(); $creditnotes = $tmpobject->getSumCreditNotesUsed(); $deposits = $tmpobject->getSumDepositsUsed(); @@ -4147,8 +4392,7 @@ class Societe extends CommonObject //if credit note is converted but not used // TODO Do this also for customer ? - if ($mode == 'supplier' && $obj->type == FactureFournisseur::TYPE_CREDIT_NOTE && $tmpobject->isCreditNoteUsed()) - { + if ($mode == 'supplier' && $obj->type == FactureFournisseur::TYPE_CREDIT_NOTE && $tmpobject->isCreditNoteUsed()) { $outstandingOpened -= $tmpobject->getSumFromThisCreditNotesNotUsed(); } } @@ -4162,6 +4406,7 @@ class Societe extends CommonObject * Return label of status customer is prospect/customer * * @return string Label + * @see getTypeUrl() */ public function getLibCustProspStatut() { @@ -4181,10 +4426,15 @@ class Societe extends CommonObject global $langs; $langs->load('companies'); - if ($status == 0) return $langs->trans("NorProspectNorCustomer"); - elseif ($status == 1) return $langs->trans("Customer"); - elseif ($status == 2) return $langs->trans("Prospect"); - elseif ($status == 3) return $langs->trans("ProspectCustomer"); + if ($status == 0) { + return $langs->trans("NorProspectNorCustomer"); + } elseif ($status == 1) { + return $langs->trans("Customer"); + } elseif ($status == 2) { + return $langs->trans("Prospect"); + } elseif ($status == 3) { + return $langs->trans("ProspectCustomer"); + } } @@ -4203,21 +4453,20 @@ class Societe extends CommonObject { global $conf, $user, $langs; - if (!empty($moreparams) && !empty($moreparams['use_companybankid'])) - { + if (!empty($moreparams) && !empty($moreparams['use_companybankid'])) { $modelpath = "core/modules/bank/doc/"; include_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php'; $companybankaccount = new CompanyBankAccount($this->db); $result = $companybankaccount->fetch($moreparams['use_companybankid']); - if (!$result) dol_print_error($this->db, $companybankaccount->error, $companybankaccount->errors); + if (!$result) { + dol_print_error($this->db, $companybankaccount->error, $companybankaccount->errors); + } $result = $companybankaccount->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); } else { // Positionne le modele sur le nom du modele a utiliser - if (!dol_strlen($modele)) - { - if (!empty($conf->global->COMPANY_ADDON_PDF)) - { + if (!dol_strlen($modele)) { + if (!empty($conf->global->COMPANY_ADDON_PDF)) { $modele = $conf->global->COMPANY_ADDON_PDF; } else { print $langs->trans("Error")." ".$langs->trans("Error_COMPANY_ADDON_PDF_NotDefined"); @@ -4266,47 +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); } /** @@ -4325,7 +4534,6 @@ class Societe extends CommonObject $salesrep = array($salesrep); } - $to_del = array(); // Nothing to delete $to_add = $salesrep; if ($onlyAdd === false) { @@ -4347,8 +4555,7 @@ class Societe extends CommonObject } foreach ($to_add as $add) { $result = $this->add_commercial($user, $add); - if ($result < 0) - { + if ($result < 0) { $error++; break; } @@ -4365,22 +4572,22 @@ class Societe extends CommonObject */ public function setThirdpartyType($typent_id) { - if ($this->id) - { + if ($this->id) { $sql = "UPDATE ".MAIN_DB_PREFIX."societe"; $sql .= " SET fk_typent = ".($typent_id > 0 ? $typent_id : "null"); $sql .= " WHERE rowid = ".$this->id; dol_syslog(get_class($this).'::setThirdpartyType', LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $this->typent_id = $typent_id; - $this->typent_code = dol_getIdFromCode($db, $this->$typent_id, 'c_typent', 'id', 'code'); + $this->typent_code = dol_getIdFromCode($this->db, $this->$typent_id, 'c_typent', 'id', 'code'); return 1; } else { return -1; } - } else return -1; + } else { + return -1; + } } /** @@ -4394,8 +4601,7 @@ class Societe extends CommonObject */ public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id) { - if ($origin_id == $dest_id) - { + if ($origin_id == $dest_id) { dol_syslog('Error: Try to merge a thirdparty into itself'); return false; } @@ -4412,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)); } /** @@ -4430,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 779bf573341..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; @@ -422,8 +473,11 @@ if ($sql_select) $documentstatic->statut = $objp->status; $documentstatic->status = $objp->status; $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">'; @@ -433,22 +487,25 @@ if ($sql_select) // Status print '<td class="center">'; - if ($type_element == 'contract') - { - print $documentstaticline->getLibStatut(2); + if ($type_element == 'contract') { + print $documentstaticline->getLibStatut(5); + } elseif ($type_element == 'invoice') { + print $documentstatic->getLibStatut(5, $objp->paid); } else { - print $documentstatic->getLibStatut(2); + print $documentstatic->getLibStatut(5); } print '</td>'; - print '<td>'; + // Label + 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; @@ -459,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); } @@ -491,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); } @@ -536,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>'; @@ -580,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>'; @@ -606,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 1d7ba3d2925..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>'; @@ -171,7 +178,7 @@ if ($object->id) $permission = $user->rights->societe->creer; $permtoedit = $user->rights->societe->creer; $param = '&id='.$object->id; - include_once 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, 0); } diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index ddd865521d7..a8a4c454c2c 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 = ".$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 2e24f355b37..9c5d261f996 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"]; @@ -251,35 +295,39 @@ if ($action == "change") // Change customer for TakePOS $sql = "UPDATE ".MAIN_DB_PREFIX."facture set fk_soc=".$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->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, 0, 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'])) - { - print '<td class="center">'; - if ($companystatic->fk_parent > 0) - { + if (!empty($arrayfields['s2.nom']['checked'])) { + print '<td class="center tdoverflowmax100">'; + 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,50 +1652,68 @@ 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) { + $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); 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 5730d8f1ff4..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); @@ -157,47 +160,46 @@ if ($result > 0) print '<div class="fichecenter">'; print '<div class="underbanner clearboth"></div>'; - print '<table class="border centpercent">'; + 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 - print load_fiche_titre($langs->trans("ListOfActiveNotifications").' ('.$num.')', '', ''); + + // 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("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"; - $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 69e8efd02e1..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,41 +86,37 @@ 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 -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], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key] < 0) ? 0 : 1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key])); - } -} +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'); -if ($id > 0) -{ +if ($id > 0) { $result = $object->fetch($id); } @@ -123,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; } @@ -138,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 } @@ -178,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'; @@ -204,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>'; } @@ -253,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 @@ -302,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; } @@ -316,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; } @@ -331,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">'; @@ -367,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>'; @@ -388,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'; @@ -413,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 @@ -434,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 + } } } @@ -446,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; } } @@ -492,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>'; @@ -511,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>'; } @@ -530,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..1e4e2ae9c1d 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,7 +254,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>'; @@ -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 db225196ea7..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(); } @@ -317,24 +311,30 @@ class Stripe extends CommonObject * @param int $mode automatic=automatic confirmation/payment when conditions are ok, manual=need to call confirm() on intent * @param boolean $confirmnow false=default, true=try to confirm immediatly after create (if conditions are ok) * @param string $payment_method 'pm_....' (if known) - * @param string $off_session If we use an already known payment method to pay off line. + * @param string $off_session If we use an already known payment method to pay when customer is not available during the checkout flow. * @param string $noidempotency_key Do not use the idempotency_key when creating the PaymentIntent * @return \Stripe\PaymentIntent|null Stripe PaymentIntent or null if not found and failed to create */ - public function getPaymentIntent($amount, $currency_code, $tag, $description = '', $object = null, $customer = null, $key = null, $status = 0, $usethirdpartyemailforreceiptemail = 0, $mode = 'automatic', $confirmnow = false, $payment_method = null, $off_session = 0, $noidempotency_key = 0) + public function getPaymentIntent($amount, $currency_code, $tag, $description = '', $object = null, $customer = null, $key = null, $status = 0, $usethirdpartyemailforreceiptemail = 0, $mode = 'automatic', $confirmnow = false, $payment_method = null, $off_session = 0, $noidempotency_key = 1) { 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,27 +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; } @@ -460,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"; @@ -477,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."); @@ -501,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 = ''; @@ -522,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; @@ -559,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 @@ -586,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; } @@ -656,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); @@ -668,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 { @@ -704,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 { @@ -729,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; @@ -753,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>'; @@ -775,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>'; @@ -798,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)."',"; @@ -807,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); } @@ -848,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"; @@ -871,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 = ""; @@ -908,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 @@ -922,14 +948,13 @@ class Stripe extends CommonObject dol_syslog("* createPaymentStripe get stripeacc", LOG_DEBUG); $stripeacc = $stripe->getStripeAccount($service); // Get Stripe OAuth connect account if it exists (no network access here) - dol_syslog("* createPaymentStripe Create payment on card ".$stripecard->id.", amounttopay=".$amounttopay.", amountstripe=".$amountstripe.", FULLTAG=".$FULLTAG, LOG_DEBUG); + dol_syslog("* createPaymentStripe Create payment for customer ".$customer->id." on source card ".$stripecard->id.", amounttopay=".$amounttopay.", amountstripe=".$amountstripe.", FULLTAG=".$FULLTAG, LOG_DEBUG); // Create payment intent and charge payment (confirmnow = true) $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'; @@ -940,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", @@ -963,8 +987,7 @@ class Stripe extends CommonObject "customer" => "$customer" ); - if ($societe->email && $usethirdpartyemailforreceiptemail) - { + if ($societe->email && $usethirdpartyemailforreceiptemail) { $paymentarray["receipt_email"] = $societe->email; } @@ -979,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", @@ -992,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 @@ -1019,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 { @@ -1033,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 ae40784aa68..122b881495f 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,31 +516,30 @@ if (empty($reshook)) } // Add a product line - if ($action == 'addline' && $usercancreate) - { + if ($action == 'addline' && $usercancreate) { $langs->load('errors'); $error = 0; // Set if we used free entry or predefined product $predef = ''; - $product_desc = (GETPOST('dp_desc') ?GETPOST('dp_desc') : ''); + $product_desc = (GETPOSTISSET('dp_desc') ? GETPOST('dp_desc', 'restricthtml') : ''); $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')); $ref_supplier = GETPOST('fourn_ref', 'alpha'); $prod_entry_mode = GETPOST('prod_entry_mode'); if ($prod_entry_mode == 'free') { $idprod = 0; - $price_ht = GETPOST('price_ht'); + $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); } else { $idprod = GETPOST('idprod', 'int'); - $price_ht = GETPOST('price_ht'); + $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); $tva_tx = ''; } - $qty = GETPOST('qty'.$predef); - $remise_percent = GETPOST('remise_percent'.$predef); - $price_ht_devise = GETPOST('multicurrency_price_ht'); + $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS'); + $remise_percent = price2num(GETPOST('remise_percent'.$predef), 2); + $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); // Extrafields $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); @@ -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); @@ -720,14 +701,15 @@ if (empty($reshook)) $fk_unit = GETPOST('units', 'alpha'); - $tva_tx = price2num($tva_tx); // When vat is text input field + if (!preg_match('/\((.*)\)/', $tva_tx)) { + $tva_tx = price2num($tva_tx); // When vat is text input field + } // Local Taxes $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'); @@ -760,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); @@ -785,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']); @@ -830,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')); @@ -849,27 +835,24 @@ 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') != '') - { - $ht = price2num(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]; } - $ttc = price2num(GETPOST('price_ttc')); + $ttc = price2num(GETPOST('price_ttc'), '', 2); $ht = $ttc / (1 + ($vatratecleaned / 100)); } $price_base_type = 'HT'; - $pu_ht_devise = GETPOST('multicurrency_subprice'); + $pu_ht_devise = price2num(GETPOST('multicurrency_subprice'), 'CU'); // Add buying price $fournprice = (GETPOST('fournprice') ? GETPOST('fournprice') : ''); @@ -887,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'); } } @@ -907,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 { @@ -929,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, @@ -940,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, @@ -999,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) { - $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx'))); + } 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'; + } } } @@ -1062,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'; @@ -1095,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(); @@ -1113,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); @@ -1151,14 +1132,13 @@ if ($action == 'create') print '</td>'; } else { print '<td colspan="2">'; - print $form->select_company('', 'socid', 's.fournisseur=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300'); + print img_picto('', 'company').$form->select_company('', 'socid', 's.fournisseur=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300'); print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&client=0&fournisseur=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddThirdParty").'"></span></a>'; print '</td>'; } print '</tr>'."\n"; - if ($soc->id > 0) - { + if ($soc->id > 0) { // Discounts for third party print '<tr><td>'.$langs->trans('Discounts').'</td><td>'; @@ -1216,23 +1196,24 @@ if ($action == 'create') print '<tr>'; print '<td>'.$langs->trans("DefaultModel").'</td>'; print '<td colspan="2">'; - $liste = ModelePDFSupplierProposal::liste_modeles($db); - print $form->selectarray('model', $liste, ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT ? $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT : $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF)); + $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', $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">'; - - $numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500'); + print img_picto('', 'project').$formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); 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>'; @@ -1258,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 @@ -1270,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>"; @@ -1303,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 @@ -1347,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(); @@ -1390,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 @@ -1438,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; @@ -1462,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> : '; } @@ -1536,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 { @@ -1554,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().'">'; @@ -1577,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 { @@ -1589,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 { @@ -1609,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 { @@ -1643,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); @@ -1651,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 { @@ -1672,7 +1656,6 @@ if ($action == 'create') } // Other attributes - $cols = 2; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; print '</table>'; @@ -1684,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>'; @@ -1781,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); @@ -1805,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; } @@ -1843,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>'; } @@ -1871,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>'; } @@ -1910,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 8a74b14095b..0320a663ea8 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,44 +403,55 @@ 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); $pu_ht = price2num($pu_ht); $pu_ttc = price2num($pu_ttc); - $txtva = price2num($txtva); + if (!preg_match('/\((.*)\)/', $txtva)) { + $txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5' + } $txlocaltax1 = price2num($txlocaltax1); $txlocaltax2 = price2num($txlocaltax2); - $pa_ht = price2num($pa_ht); - if ($price_base_type == 'HT') - { + $pa_ht = price2num($pa_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; @@ -450,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(); @@ -468,23 +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->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->db->rollback(); return -1; } @@ -503,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. } @@ -529,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; } @@ -539,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; } @@ -601,31 +606,35 @@ 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 { - $this->error = $this->db->error(); + $this->error = $this->error(); + $this->errors = $this->errors(); $this->db->rollback(); return -1; } } else { $this->error = $this->line->error; + $this->errors = $this->line->errors; $this->db->rollback(); return -2; } @@ -673,15 +682,20 @@ class SupplierProposal extends CommonObject $remise_percent = price2num($remise_percent); $qty = price2num($qty); $pu = price2num($pu); - $txtva = price2num($txtva); + if (!preg_match('/\((.*)\)/', $txtva)) { + $txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5' + } $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 @@ -694,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. } @@ -730,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; } @@ -788,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); @@ -819,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; @@ -859,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(); @@ -881,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; @@ -898,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"; @@ -945,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++; } @@ -984,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; @@ -1024,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); @@ -1038,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 { @@ -1073,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; @@ -1106,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; @@ -1115,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); @@ -1133,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; } @@ -1153,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 { @@ -1192,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"; @@ -1213,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; @@ -1231,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; @@ -1277,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; } @@ -1302,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); @@ -1404,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 @@ -1413,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; @@ -1428,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; @@ -1523,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; @@ -1555,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 { @@ -1586,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; @@ -1627,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; @@ -1639,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); } @@ -1689,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)) { @@ -1728,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 { @@ -1758,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, '', '', ''); @@ -1792,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) { @@ -1842,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); @@ -1874,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; } @@ -1884,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; } @@ -1893,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) { @@ -1935,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 = ".$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; @@ -2000,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(); @@ -2061,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; @@ -2114,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; @@ -2130,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; @@ -2175,28 +2155,33 @@ 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->trans("SupplierProposalStatusDraft"); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans("SupplierProposalStatusValidated"); - $this->labelStatus[self::STATUS_SIGNED] = $langs->trans("SupplierProposalStatusSigned"); - $this->labelStatus[self::STATUS_NOTSIGNED] = $langs->trans("SupplierProposalStatusNotSigned"); - $this->labelStatus[self::STATUS_CLOSE] = $langs->trans("SupplierProposalStatusClosed"); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans("SupplierProposalStatusDraftShort"); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans("Opened"); - $this->labelStatusShort[self::STATUS_SIGNED] = $langs->trans("SupplierProposalStatusSignedShort"); - $this->labelStatusShort[self::STATUS_NOTSIGNED] = $langs->trans("SupplierProposalStatusNotSignedShort"); - $this->labelStatusShort[self::STATUS_CLOSE] = $langs->trans("SupplierProposalStatusClosedShort"); + $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv("SupplierProposalStatusDraft"); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv("SupplierProposalStatusValidated"); + $this->labelStatus[self::STATUS_SIGNED] = $langs->transnoentitiesnoconv("SupplierProposalStatusSigned"); + $this->labelStatus[self::STATUS_NOTSIGNED] = $langs->transnoentitiesnoconv("SupplierProposalStatusNotSigned"); + $this->labelStatus[self::STATUS_CLOSE] = $langs->transnoentitiesnoconv("SupplierProposalStatusClosed"); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv("SupplierProposalStatusDraftShort"); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv("Opened"); + $this->labelStatusShort[self::STATUS_SIGNED] = $langs->transnoentitiesnoconv("SupplierProposalStatusSignedShort"); + $this->labelStatusShort[self::STATUS_NOTSIGNED] = $langs->transnoentitiesnoconv("SupplierProposalStatusNotSignedShort"); + $this->labelStatusShort[self::STATUS_CLOSE] = $langs->transnoentitiesnoconv("SupplierProposalStatusClosedShort"); } $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); } @@ -2222,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') { @@ -2259,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++; } } @@ -2301,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]; @@ -2328,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; @@ -2337,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; @@ -2350,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]; } @@ -2383,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"; @@ -2392,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); @@ -2421,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"; @@ -2437,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 ''; } @@ -2447,8 +2423,7 @@ class SupplierProposal extends CommonObject $numref = ""; $numref = $obj->getNextValue($soc, $this); - if ($numref != "") - { + if ($numref != "") { return $numref; } else { $this->error = $obj->error; @@ -2476,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 = ''; @@ -2485,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; @@ -2498,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).'"'; } @@ -2523,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).'">'; @@ -2569,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); @@ -2776,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 @@ -2866,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; @@ -2941,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; @@ -2972,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(); @@ -3025,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; } @@ -3073,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); } @@ -3088,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; } @@ -3118,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; @@ -3166,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).""; @@ -3176,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'); @@ -3192,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; } @@ -3246,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..3125f81bc01 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,50 +53,39 @@ $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); } -} - -// 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 { @@ -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 127b45466e8..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 .= ' : '; @@ -165,7 +165,7 @@ if ($object->id > 0) $permission = $user->rights->supplier_proposal->creer; $permtoedit = $user->rights->supplier_proposal->creer; $param = '&id='.$object->id; - include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; } else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/supplier_proposal/index.php b/htdocs/supplier_proposal/index.php index 476c2a14db2..0cfdc5a09b6 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 = ".$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 5fc27d63a8c..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)), @@ -165,14 +178,8 @@ $arrayfields = array( 'sp.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), ); // 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])) - $arrayfields["ef.".$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($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key])); - } -} +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'); @@ -182,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 = ''; @@ -225,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; @@ -255,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) $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(); @@ -278,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 @@ -334,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; } @@ -348,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; @@ -366,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; @@ -380,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">'; @@ -435,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>'; } @@ -445,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>'; @@ -486,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).'">'; @@ -539,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).'">'; @@ -550,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).'">'; @@ -620,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>'; @@ -648,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"; @@ -683,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; @@ -701,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">'; @@ -713,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>'; @@ -728,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 @@ -878,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"; @@ -934,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 43077495238..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 == 'mysql' ? 'latin1' : ''); // 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 == 'mysql' ? 'latin1_swedish_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 baceed47f3e..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 6874665ace7..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 30a9d45ad5a..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 84efe32839e..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,8 +97,10 @@ 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 (!$res > 0) { + if ($maskconst) { + $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity); + } + if (!($res > 0)) { $error++; } } elseif ($action == 'setrefmod') { @@ -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 d8ad03a057c..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 961168221f6..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'; @@ -40,26 +50,27 @@ require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Bar or Restaurant or multiple sales $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; } @@ -71,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; @@ -106,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"> @@ -117,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"> @@ -128,25 +141,21 @@ $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; } } } + $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; @@ -167,21 +176,22 @@ var pageactions=0; var place="<?php echo $place; ?>"; var editaction="qty"; var editnumber=""; +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") } */ @@ -216,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(); } @@ -250,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(); } @@ -271,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 @@ -297,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","");'; @@ -320,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\']);'; } @@ -408,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); @@ -451,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() { @@ -474,26 +481,28 @@ 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() { - console.log("Refresh"); - $("#poslines").load("invoice.php?place="+place, function() { + console.log("Refresh by reloading place="+place+" invoiceid="+invoiceid); + $("#poslines").load("invoice.php?place="+place+"&invoiceid="+invoiceid, function() { //$('#poslines').scrollTop($('#poslines')[0].scrollHeight); }); } function New() { // If we go here,it means $conf->global->TAKEPOS_BAR_RESTAURANT is not defined - console.log("New with place = <?php echo $place; ?>, js place="+place); - invoiceid = $("#invoiceid").val(); + + console.log("New with place = <?php echo $place; ?>, js place="+place+", invoiceid="+invoiceid); + $.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getInvoice&id='+invoiceid, function(data) { var r; @@ -589,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(){ @@ -687,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" }); @@ -721,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"; } @@ -753,37 +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 FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE "; - $sql .= "date(date_creation) = CURDATE() "; - $sql .= ""; + 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()))."'"; $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();"; + } } } ?> @@ -809,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> @@ -831,7 +846,7 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) { </div> <div class="topnav-right"> <div class="login_block_other"> - <input type="text" id="search" name="search" onkeyup="Search2(<?php echo $keyCodeForEnter; ?>);" placeholder="<?php echo $langs->trans("Search"); ?>" autofocus> + <input type="text" id="search" name="search" onkeyup="Search2(<?php echo $keyCodeForEnter; ?>);" placeholder="<?php echo $langs->trans("Search"); ?>" autofocus> <a onclick="ClearSearch();"><span class="fa fa-backspace"></span></a> <a onclick="window.location.href='<?php echo DOL_URL_ROOT.'/'; ?>';"><span class="fas fa-home"></span></a> <?php if (empty($conf->dol_use_jmobile)) { ?> @@ -860,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>'; } ?> @@ -882,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> @@ -907,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> @@ -944,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); + } } } @@ -959,14 +995,19 @@ if (empty($paiementsModes)) { setEventMessages($langs->trans("ProblemIsInSetupOfTerminal", $_SESSION["takeposterminal"]), null, 'errors'); } if (count($maincategories) == 0) { - setEventMessages($langs->trans("TakeposNeedsCategories"), null, 'errors'); + if ($conf->global->TAKEPOS_ROOT_CATEGORY_ID > 0) { + $tmpcategory = new Categorie($db); + $tmpcategory->fetch($conf->global->TAKEPOS_ROOT_CATEGORY_ID); + setEventMessages($langs->trans("TakeposNeedsAtLeastOnSubCategoryIntoParentCategory", $tmpcategory->label), null, 'errors'); + } else { + setEventMessages($langs->trans("TakeposNeedsCategories"), null, 'errors'); + } } // User menu and external TakePOS modules $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 @@ -986,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\');'); } } @@ -1024,17 +1063,18 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") { ); } -$sql = "SELECT rowid, status FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE "; -$sql .= "date(date_creation) = CURDATE() "; +$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.');'); + } } } @@ -1050,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();'); } @@ -1066,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)) { @@ -1088,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.'" />'; @@ -1106,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)) { ?> @@ -1116,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>'; @@ -1138,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 d2fd153e5be..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; } @@ -173,11 +196,13 @@ if ($action == 'valid' && $user->rights->facture->creer) if ($invoice->total_ttc < 0) { $invoice->type = $invoice::TYPE_CREDIT_NOTE; + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture WHERE"; $sql .= " fk_soc = ".((int) $invoice->socid); $sql .= " AND type <> ".Facture::TYPE_CREDIT_NOTE; $sql .= " AND fk_statut >= ".$invoice::STATUS_VALIDATED; $sql .= " ORDER BY rowid DESC"; + $resql = $db->query($sql); if ($resql) { $obj = $db->fetch_object($resql); @@ -250,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; @@ -268,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 { @@ -280,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(); @@ -291,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 @@ -302,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 { @@ -328,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; @@ -356,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; @@ -428,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); } @@ -440,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; @@ -463,8 +483,7 @@ if (($action == "addline" || $action == "freezone") && $placeid == 0) } } -if ($action == "addline") -{ +if ($action == "addline") { $prod = new Product($db); $prod->fetch($idproduct); @@ -484,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 + } } } @@ -528,7 +548,9 @@ if ($action == "freezone") { $tva_tx = GETPOST('tva_tx', 'alpha'); if ($tva_tx != '') { - $tva_tx = price2num($tva_tx); + if (!preg_match('/\((.*)\)/', $tva_tx)) { + $tva_tx = price2num($tva_tx); + } } else { $tva_tx = get_default_tva($mysoc, $customer); } @@ -542,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); @@ -572,21 +592,13 @@ if ($action == "deleteline") { } } +// Action to delete or discard an invoice if ($action == "delete") { // $placeid is the invoice id (it differs from place) and is defined if the place is set and the ref of invoice is '(PROV-POS'.$_SESSION["takeposterminal"].'-'.$place.')', so the fetch at begining of page works. - - /*$reg = array(); - if (preg_match('/^(\d+)-(\d+)$/', $place, $reg)) { - - $place = $reg[1]; - var_dump($place); - }*/ - 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 @@ -599,27 +611,26 @@ if ($action == "delete") { } } - $sql = "UPDATE ".MAIN_DB_PREFIX."facture set fk_soc=".$conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]}; + $sql = "UPDATE ".MAIN_DB_PREFIX."facture"; + $sql .= " SET fk_soc=".$conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]}.", "; + $sql .= " datec = '".$db->idate(dol_now())."'"; $sql .= " WHERE ref='(PROV-POS".$db->escape($_SESSION["takeposterminal"]."-".$place).")'"; $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); } } @@ -627,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); @@ -642,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); @@ -666,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); @@ -681,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'; @@ -700,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; } @@ -709,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>'; } } @@ -735,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; } @@ -749,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>'; } } @@ -766,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; } @@ -780,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>'; } } @@ -798,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 { @@ -823,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 */ @@ -845,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 != "") { @@ -877,8 +897,7 @@ if ($action == "order" and $order_receipt_printer1 != "") { data: 'invoice='+orderprinter1esc }); <?php - } - else { + } else { ?> $.ajax({ type: "POST", @@ -899,8 +918,7 @@ if ($action == "order" and $order_receipt_printer2 != "") { data: 'invoice='+orderprinter2esc }); <?php - } - else { + } else { ?> $.ajax({ type: "POST", @@ -908,7 +926,7 @@ if ($action == "order" and $order_receipt_printer2 != "") { data: '<?php print $headerorder.$order_receipt_printer2.$footerorder; ?>' }); - <?php + <?php } } @@ -928,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 } ?> @@ -955,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() { @@ -1001,42 +1019,64 @@ 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"); + 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>'); <?php $sql = "SELECT rowid, datec, ref FROM ".MAIN_DB_PREFIX."facture"; - $sql .= " WHERE ref LIKE '(PROV-POS".$_SESSION["takeposterminal"]."-0%' AND entity IN (".getEntity('invoice').")"; + if (empty($conf->global->TAKEPOS_CAN_EDIT_IF_ALREADY_VALIDATED)) { + // By default, only invoices with a ref not already defined can in list of open invoice we can edit. + $sql .= " WHERE ref LIKE '(PROV-POS".$db->escape($_SESSION["takeposterminal"])."-0%' AND entity IN (".getEntity('invoice').")"; + } else { + // If TAKEPOS_CAN_EDIT_IF_ALREADY_VALIDATED set, we show also draft invoice that already has a reference defined + $sql .= " WHERE pos_source = '".$db->escape($_SESSION["takeposterminal"])."'"; + $sql .= " AND module_source = 'takepos'"; + $sql .= " AND entity IN (".getEntity('invoice').")"; + } + $sql .= $db->order('datec', 'ASC'); $resql = $db->query($sql); if ($resql) { while ($obj = $db->fetch_object($resql)) { echo '$("#customerandsales").append(\''; - echo '<a class="valignmiddle" onclick="place=\\\''; + 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); - echo '\\\';Refresh();">'; - if ($placeid == $obj->rowid) echo "<b>"; - echo date('H:i', strtotime($obj->datec)); - if ($placeid == $obj->rowid) echo "</b>"; + 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 '<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 '\\\';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); } @@ -1044,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); @@ -1055,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"); } @@ -1100,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"; } @@ -1110,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">'; @@ -1118,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; } @@ -1132,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 @@ -1159,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'); @@ -1196,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>'; @@ -1215,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(); @@ -1235,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>'; @@ -1283,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 = ''; @@ -1295,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"; @@ -1341,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); @@ -1349,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); } @@ -1363,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"]) { @@ -1380,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>'; @@ -1393,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..3e3ab1d3b01 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,43 +240,43 @@ 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; } @@ -282,15 +291,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/config.js b/htdocs/theme/eldy/ckeditor/config.js index 50bf77c00ff..e041516a292 100644 --- a/htdocs/theme/eldy/ckeditor/config.js +++ b/htdocs/theme/eldy/ckeditor/config.js @@ -11,6 +11,7 @@ CKEDITOR.editorConfig = function( config ) config.enterMode = CKEDITOR.ENTER_BR; //config.forceSimpleAmpersand = true; // When you put a <img src="x?a=a&b=b"> into the textarea, and go into "source", then ckeditor change the & into &amp;. We don't want this. But this option does not fix this. //config.entities = false; // When you put a <img src="x?a=a&b=b"> into the textarea, and go into "source", then ckeditor change the & into &amp;. We don't want this. But this option does not fix this. + //config.entities_greek = false; config.resize_enabled = false; //config.resize_maxHeight = 3000; //config.resize_maxWidth = 3000; 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/doc/doc.css b/htdocs/theme/eldy/doc/doc.css deleted file mode 100644 index a8908185d17..00000000000 --- a/htdocs/theme/eldy/doc/doc.css +++ /dev/null @@ -1,5 +0,0 @@ -/* Simple css for Doc page */ -body.docpage{ - background: #fff; - padding:20px; -} \ No newline at end of file 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 e6991388ad0..12d9677c4b5 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); @@ -35,7 +38,7 @@ --oddevencolor: #202020; --colorboxstatsborder: #e0e0e0; --dolgraphbg: rgba(255,255,255,0); - --fieldrequiredcolor: #804000; + --fieldrequiredcolor: #400030; --colortextbacktab: #<?php print $colortextbacktab; ?>; --colorboxiconbg: #eee; --refidnocolor:#444; @@ -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,16 @@ textarea.centpercent { text-transform: uppercase; } .nounderline { - text-decoration: none; + text-decoration: none; +} +.nopadding { + padding: 0; +} +.nopaddingleft { + padding-left: 0; +} +.nopaddingright { + padding-right: 0; } .paddingleft { padding-<?php print $left; ?>: 4px; @@ -682,6 +728,9 @@ textarea.centpercent { .paddingright2 { padding-<?php print $right; ?>: 2px; } +.paddingright2imp { + padding-<?php print $right; ?>: 2px !important; +} .paddingtop { padding-top: 4px; } @@ -713,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; @@ -764,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; } @@ -781,72 +862,84 @@ 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; + font-size: 1em; + /* opacity: 0.5em; */ } +/*#formuserfile input[type='file']:valid { + color: #a00; +} +#formuserfile input[type='file']:empty { + color: #0a0; +}*/ + #formuserfile_link { 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; @@ -856,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"; @@ -874,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 { @@ -888,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 @@ -898,7 +1004,7 @@ div.div-for-modal { if ($conf->browser->layout == 'phone') { ?> .divsearchfieldfilter { - white-space: nowrap; + white-space: nowrap; } <?php } ?> div.confirmmessage { @@ -925,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; @@ -957,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; @@ -979,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 { @@ -1050,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 { } @@ -1076,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 { @@ -1087,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; @@ -1111,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; @@ -1170,7 +1290,7 @@ select.selectarrowonleft option { } table[summary="list_of_modules"] .fa-cog { - font-size: 1.5em; + font-size: 1.5em; } .linkedcol-element { @@ -1206,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; } @@ -1275,16 +1395,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,23 +1412,23 @@ 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, input.widthcentpercentminusx { +select.widthcentpercentminusx, span.widthcentpercentminusx:not(.select2-selection), input.widthcentpercentminusx { width: calc(100% - 52px) !important; display: inline-block; } -select.widthcentpercentminusxx, input.widthcentpercentminusxx { +select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-selection), input.widthcentpercentminusxx { width: calc(100% - 70px) !important; display: inline-block; } @@ -1320,16 +1440,16 @@ select.widthcentpercentminusxx, input.widthcentpercentminusxx { 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; @@ -1351,17 +1471,17 @@ select.widthcentpercentminusxx, input.widthcentpercentminusxx { 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 */ @@ -1387,31 +1507,31 @@ select.widthcentpercentminusxx, input.widthcentpercentminusxx { .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; @@ -1423,36 +1543,36 @@ select.widthcentpercentminusxx, input.widthcentpercentminusxx { } 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; @@ -1467,38 +1587,38 @@ select.widthcentpercentminusxx, input.widthcentpercentminusxx { 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; } @@ -1564,7 +1684,7 @@ td.showDragHandle { float: left; } .classforhorizontalscrolloftabs #id-right { - width:calc(100% - 210px); + width: calc(100% - 210px); display: inline-block; } @@ -1577,6 +1697,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; @@ -1597,23 +1722,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; @@ -1648,8 +1773,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 @@ -1668,10 +1793,17 @@ div.vmenu, td.vmenu { /* rule to reduce top menu - 3rd reduction: The menu for user is on left */ @media only screen and (max-width: <?php echo empty($conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3) ? round($nbtopmenuentries * 47, 0) + 130 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3; ?>px) /* reduction 3 */ { + /* no side-nav */ body.sidebar-collapse .side-nav { display: none; } + /* if no side-nav, we don't need to have width forced */ + .classforhorizontalscrolloftabs #id-right { + width: unset; + display: unset; + } + body.sidebar-collapse .login_block { display: none; } @@ -1689,7 +1821,7 @@ div.vmenu, td.vmenu { padding-left: 20px; padding-right: 20px; position: absolute; - z-index: 90; + z-index: 90; } div.blockvmenulogo { @@ -1725,10 +1857,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; @@ -1747,74 +1883,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 { @@ -1825,23 +1986,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; @@ -1853,28 +2014,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 { @@ -1886,8 +2047,8 @@ span.widthpictotitle.pictotitle { width: 14px; } .pictosubstatus { - padding-left: 2px; - padding-right: 2px; + padding-left: 2px; + padding-right: 2px; } .pictostatus { width: 15px; @@ -1895,14 +2056,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; @@ -1913,14 +2074,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 { @@ -1952,9 +2119,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; @@ -1962,33 +2129,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; @@ -1996,12 +2163,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 { } @@ -2010,8 +2177,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 { @@ -2041,12 +2208,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 */ } @@ -2061,25 +2228,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; @@ -2093,7 +2260,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; @@ -2105,8 +2272,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; } @@ -2118,7 +2285,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; @@ -2166,9 +2333,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; @@ -2178,8 +2345,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 { @@ -2199,10 +2366,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 */ @@ -2212,10 +2379,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{ @@ -2228,9 +2395,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( @@ -2242,8 +2409,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)); @@ -2253,29 +2419,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"; @@ -2298,11 +2464,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 } ?> } @@ -2313,14 +2479,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; @@ -2380,10 +2546,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; @@ -2396,7 +2562,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; @@ -2417,7 +2583,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; @@ -2441,7 +2607,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; } @@ -2480,17 +2646,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; @@ -2528,11 +2694,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; */ @@ -2543,30 +2709,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); ?>); @@ -2582,20 +2751,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 } ?> } @@ -2611,8 +2780,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 { } @@ -2645,22 +2814,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 { @@ -2694,16 +2863,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 @@ -2712,7 +2881,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); } @@ -2730,13 +2899,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 } ?> } @@ -2759,7 +2928,7 @@ td.barre_select { td.photo { background: #F4F4F4; color: #000000; - border: 1px solid #bbb; + border: 1px solid #bbb; } /* ============================================================================== */ @@ -2771,14 +2940,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 */ } @@ -2787,29 +2956,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; } @@ -2819,10 +2988,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%; } @@ -2831,20 +3000,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); } @@ -2856,8 +3025,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 */ @@ -2873,11 +3042,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 { @@ -2901,26 +3070,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; @@ -2929,29 +3098,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; @@ -2961,6 +3123,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 { /* @@ -2970,30 +3138,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; } /* ============================================================================== */ @@ -3041,7 +3209,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; @@ -3078,8 +3249,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 { @@ -3093,14 +3264,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; */ } @@ -3132,10 +3303,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 ?>); @@ -3158,14 +3329,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; @@ -3178,7 +3349,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; @@ -3186,7 +3357,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 { @@ -3197,11 +3368,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 { @@ -3214,19 +3385,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; @@ -3264,11 +3435,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 */ @@ -3289,19 +3466,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 { @@ -3311,10 +3488,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 { @@ -3341,9 +3518,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; @@ -3352,8 +3531,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; @@ -3388,13 +3567,13 @@ div.pagination li:first-child span { border-bottom-left-radius: 4px;*/ } -div.pagination li a:hover, -div.pagination li:not(.paginationafterarrows,.title-button) span:hover, +/*div.pagination li a:hover, +div.pagination li:not(.paginationbeforearrows,.paginationafterarrows,.title-button) span:hover, div.pagination li a:focus, -div.pagination li:not(.paginationafterarrows,.title-button) span:focus { +div.pagination li:not(.paginationbeforearrows,.paginationafterarrows,.title-button) span:focus { -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); -} +}*/ div.pagination li .active a, div.pagination li .active span, div.pagination li .active a:hover, @@ -3441,18 +3620,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 { @@ -3464,7 +3644,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 { @@ -3515,34 +3695,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; @@ -3562,8 +3742,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; @@ -3588,9 +3768,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 { @@ -3602,10 +3782,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; @@ -3613,8 +3793,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; @@ -3627,8 +3807,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 { @@ -3636,30 +3816,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; @@ -3672,10 +3852,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 { @@ -3683,7 +3863,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 { @@ -3712,7 +3892,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 */ @@ -3759,48 +3939,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 { @@ -3808,37 +3988,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 { @@ -3859,31 +4039,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; } } @@ -3895,8 +4075,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; @@ -3934,42 +4114,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; @@ -3979,23 +4159,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 { @@ -4019,8 +4199,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 { @@ -4045,24 +4225,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); @@ -4070,7 +4250,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; @@ -4100,13 +4280,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%; } @@ -4115,19 +4295,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; } @@ -4140,11 +4320,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 { @@ -4155,7 +4335,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; @@ -4178,33 +4358,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); @@ -4223,11 +4403,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; } @@ -4235,7 +4415,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; } @@ -4243,13 +4423,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; } @@ -4308,8 +4488,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; } */ @@ -4319,16 +4499,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 { @@ -4342,7 +4522,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 { @@ -4372,11 +4552,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; } @@ -4396,13 +4586,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; } @@ -4448,14 +4638,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 { @@ -4468,15 +4658,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; } @@ -4485,10 +4675,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] { @@ -4496,16 +4686,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; @@ -4520,9 +4715,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; */ @@ -4539,9 +4734,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; @@ -4557,9 +4752,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; @@ -4569,7 +4764,11 @@ span.websitebuttonsitepreviewdisabled img, a.websitebuttonsitepreviewdisabled im margin-right: 5px; } .websitebar input#previewpageurl { - line-height: 1em; + line-height: 1em; +} + +#divbodywebsite section p { + margin: unset; } @@ -4579,7 +4778,7 @@ span.websitebuttonsitepreviewdisabled img, a.websitebuttonsitepreviewdisabled im /* ============================================================================== */ .dayevent .tagtr:first-of-type { - height: 24px; + height: 24px; } .agendacell { height: 60px; } @@ -4605,10 +4804,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 { } @@ -4616,7 +4815,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; } @@ -4629,7 +4828,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; } @@ -4648,28 +4847,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; + } /* ============================================================================== */ @@ -4845,22 +5044,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; } @@ -4868,7 +5067,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; } @@ -4878,28 +5077,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 { @@ -4913,8 +5112,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; } @@ -4922,28 +5121,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; } @@ -4952,7 +5151,7 @@ pre#editfilecontentaceeditorid { /* ============================================================================== */ .template-upload { - height: 72px !important; + height: 72px !important; } @@ -4973,32 +5172,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; } @@ -5010,55 +5209,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%; } @@ -5072,7 +5271,7 @@ div.scroll2 { } div#GanttChartDIVglisthead, div#GanttChartDIVgcharthead { - line-height: 2; + line-height: 2; } .gtaskname div, .gtaskname, .gstartdate div, .gstartdate, .genddate div, .genddate { @@ -5085,50 +5284,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; } /* ============================================================================== */ @@ -5152,25 +5351,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 { @@ -5201,7 +5400,7 @@ ul.ecmjqft a:active { font-weight: bold !important; } ul.ecmjqft a:hover { - text-decoration: underline; + text-decoration: underline; } div.ecmjqft { vertical-align: middle; @@ -5215,16 +5414,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; } @@ -5254,14 +5453,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; } /* ============================================================================== */ @@ -5324,7 +5523,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; @@ -5337,7 +5536,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; @@ -5376,23 +5575,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; @@ -5412,36 +5611,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; @@ -5468,7 +5667,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; @@ -5516,7 +5715,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 { @@ -5615,34 +5814,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 */ @@ -5696,7 +5897,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; @@ -5786,9 +5987,9 @@ span.noborderoncategories { } .multi-select-menuitem { - clear: both; - float: left; - padding-left: 5px + clear: both; + float: left; + padding-left: 5px } @@ -5797,52 +5998,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; @@ -5855,22 +6056,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; } @@ -5892,18 +6093,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; @@ -5932,16 +6133,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; @@ -6024,40 +6225,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; @@ -6085,11 +6286,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; @@ -6097,7 +6298,7 @@ div.tabsElem a.tab { .lilevel2 { padding-left: 22px; - background: #fff ! important; + background: #fff ! important; } .lilevel3 { @@ -6107,12 +6308,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; } @@ -6121,12 +6322,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; @@ -6138,7 +6333,7 @@ div.tabsElem a.tab { color: #fff; text-decoration: none; padding-top: 18px; - padding-left: 54px; + padding-left: 10px; font-size: 14px; height: 38px; } @@ -6146,14 +6341,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) { @@ -6162,13 +6357,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; + } } @@ -6196,7 +6391,7 @@ div.tabsElem a.tab { .ticketpublicarea { margin-left: 15%; - margin-right: 15%; + margin-right: 15%; } .publicnewticketform { /* margin-top: 25px !important; */ @@ -6204,12 +6399,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; @@ -6234,11 +6430,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; } } @@ -6259,13 +6455,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; } } @@ -6300,80 +6496,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 { @@ -6425,58 +6621,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; } } @@ -6490,21 +6686,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"; @@ -6533,10 +6729,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; } @@ -6561,14 +6766,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) @@ -6587,27 +6792,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; } @@ -6626,21 +6831,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 { @@ -6654,16 +6859,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 { @@ -6683,34 +6888,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 { @@ -6722,32 +6927,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; @@ -6789,7 +6994,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..3eda0c40ee7 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" > */ /* @@ -8,33 +10,33 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> */ .info-box-module-external span.info-box-icon-version { - background: #bbb; + background: #bbb; } .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 +73,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 +84,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 +106,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; */ + /* 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 +182,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 +195,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 +242,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 +295,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 +325,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 +366,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 +382,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 +445,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 +473,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 d7f01b3375e..7d0f75614c7 100644 --- a/htdocs/theme/eldy/manifest.json.php +++ b/htdocs/theme/eldy/manifest.json.php @@ -25,35 +25,131 @@ * \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('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. +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 { + 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/config.js b/htdocs/theme/md/ckeditor/config.js index 50ff0cc6eed..acd38268f8f 100644 --- a/htdocs/theme/md/ckeditor/config.js +++ b/htdocs/theme/md/ckeditor/config.js @@ -9,6 +9,9 @@ CKEDITOR.editorConfig = function( config ) // http://docs.cksource.com/CKEditor_3.x/Developers_Guide // http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html config.enterMode = CKEDITOR.ENTER_BR; + //config.forceSimpleAmpersand = true; // When you put a <img src="x?a=a&b=b"> into the textarea, and go into "source", then ckeditor change the & into &amp;. We don't want this. But this option does not fix this. + //config.entities = false; // When you put a <img src="x?a=a&b=b"> into the textarea, and go into "source", then ckeditor change the & into &amp;. We don't want this. But this option does not fix this. + //config.entities_greek = false; config.resize_enabled = false; //config.resize_maxHeight = 3000; //config.resize_maxWidth = 3000; 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..0946315391a 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'); +} ?> @@ -112,14 +120,14 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = .info-box-module-external span.info-box-icon-version { - background: #bbb; + 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; */ + /* 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 03c5894fdde..b249e81e7df 100644 --- a/htdocs/theme/md/manifest.json.php +++ b/htdocs/theme/md/manifest.json.php @@ -25,35 +25,68 @@ * \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('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. +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 { + 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 0f251bb3067..87a9d6b1b47 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,16 @@ textarea.centpercent { font-weight: normal !important; } .nounderline { - text-decoration: none; + text-decoration: none; +} +.nopadding { + padding: 0; +} +.nopaddingleft { + padding-left: 0; +} +.nopaddingright { + padding-right: 0; } .paddingleft { padding-<?php print $left; ?>: 4px; @@ -801,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; } @@ -859,6 +975,11 @@ body[class*="colorblind-"] .text-success{ { border-right: 1px solid #f4f4f4; } +.borderleftlight +{ + border-left: 1px solid #f4f4f4; +} + #formuserfile { margin-top: 4px; } @@ -870,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; @@ -905,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"; @@ -929,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; } @@ -961,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; @@ -987,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; @@ -1007,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 { @@ -1097,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; @@ -1121,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; @@ -1157,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 { @@ -1174,7 +1336,7 @@ select.selectarrowonleft option { } table[summary="list_of_modules"] .fa-cog { - font-size: 1.5em; + font-size: 1.5em; } .linkedcol-element { @@ -1200,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; } @@ -1211,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; } @@ -1266,16 +1428,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; } } @@ -1283,19 +1445,19 @@ 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 that will be used in priority */ +/* Set a width. Note: add also a max-width, for example maxwidth500, that will be used in priority */ .widthcentpercentminusx { width: calc(100% - 50px) !important; display: inline-block; @@ -1316,7 +1478,7 @@ table[summary="list_of_modules"] .fa-cog { } div.divphotoref { - padding-right: 10px !important; + padding-right: 10px !important; } } @@ -1332,51 +1494,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 { - margin-left: 5px !important; - } + 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; @@ -1388,34 +1550,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; @@ -1430,31 +1592,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; } @@ -1506,13 +1668,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 } ?> } @@ -1618,6 +1781,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 { @@ -1669,7 +1833,7 @@ div.login_block { color: #333 !important; } .login_block_elem a span.atoplogin, .login_block_elem span.atoplogin { - vertical-align: middle; + vertical-align: middle; } @@ -1681,6 +1845,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; @@ -1695,9 +1860,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 */ @@ -1714,76 +1881,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 { @@ -1793,7 +1986,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; @@ -1812,17 +2005,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; @@ -1830,14 +2023,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; @@ -1845,17 +2038,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 { @@ -1892,32 +2092,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; @@ -1925,12 +2125,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 { } @@ -1939,7 +2139,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; @@ -1961,7 +2161,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 { @@ -1998,25 +2200,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; ?>; @@ -2025,12 +2227,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; @@ -2043,12 +2245,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 ?>); @@ -2067,12 +2269,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; @@ -2081,8 +2284,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; } @@ -2107,14 +2310,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 { @@ -2131,14 +2334,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) ?>); @@ -2158,7 +2361,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 { @@ -2186,7 +2389,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 { @@ -2239,8 +2442,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)); @@ -2250,26 +2452,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 { @@ -2293,23 +2495,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; } @@ -2319,13 +2525,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; @@ -2378,12 +2584,12 @@ 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; + border-bottom: 1px solid #ccc; } .login_table .tdinputlogin .fa { padding-left: 10px; @@ -2391,7 +2597,7 @@ form#login { } .login_main_home { - word-break: break-word; + word-break: break-word; } .login_main_message { text-align: center; @@ -2412,7 +2618,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; @@ -2441,9 +2647,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)) { ?> @@ -2456,7 +2662,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 } ?> @@ -2477,17 +2683,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; @@ -2505,11 +2711,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 { @@ -2524,8 +2730,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; */ @@ -2538,26 +2744,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); ?>); @@ -2573,19 +2782,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 } ?> } @@ -2597,11 +2806,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; } @@ -2615,14 +2825,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 @@ -2630,23 +2840,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; @@ -2672,14 +2882,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 { @@ -2690,7 +2900,7 @@ div.blockvmenuend { padding-left: 0 !important; } a.vsmenu.addbookmarkpicto { - padding-right: 10px; + padding-right: 10px; } div.blockvmenufirst { padding-top: 10px; @@ -2702,14 +2912,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 { @@ -2724,13 +2934,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 } ?> } @@ -2753,7 +2963,7 @@ td.barre_select { td.photo { background: #F4F4F4; color: #000000; - border: 1px solid #bbb; + border: 1px solid #bbb; } /* ============================================================================== */ @@ -2765,14 +2975,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 */ } @@ -2781,29 +2991,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; } @@ -2811,30 +3021,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; @@ -2846,8 +3056,8 @@ div.tabBar tr.titre td { /* div.tabBar.tabBarNoTop { - padding-top: 0; - border-top: 0; + padding-top: 0; + border-top: 0; } */ @@ -2857,7 +3067,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; @@ -2875,12 +3085,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; @@ -2899,15 +3109,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; @@ -2916,24 +3126,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; @@ -2942,6 +3146,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 { /* @@ -2951,30 +3162,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; } /* ============================================================================== */ @@ -3022,7 +3233,7 @@ tr.nocellnopadd td.nobordernopadding, tr.nocellnopadd td.nocellnopadd } .smallpaddingimp { - padding: 4px !important; + padding: 4px !important; } .nopaddingleft { padding-<?php print $left; ?>: 0px; @@ -3056,8 +3267,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 { @@ -3073,7 +3284,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 { @@ -3100,10 +3311,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 ?>); @@ -3122,8 +3333,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 */ @@ -3139,8 +3350,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; @@ -3173,21 +3384,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 { @@ -3198,7 +3409,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 { @@ -3225,11 +3436,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 { @@ -3249,17 +3466,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 { @@ -3327,10 +3544,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, @@ -3375,12 +3592,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; } @@ -3492,25 +3709,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 { @@ -3541,8 +3758,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; @@ -3558,11 +3775,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 { @@ -3570,14 +3787,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; @@ -3585,8 +3802,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; @@ -3599,7 +3816,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 { @@ -3607,23 +3824,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 { @@ -3671,7 +3888,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; } @@ -3680,7 +3897,7 @@ div .tdtop { border-bottom: 1px solid #AAA !important; } #tablelines tr td { - height: unset; + height: unset; } @@ -3728,50 +3945,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 { @@ -3782,34 +3999,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; @@ -3839,29 +4056,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; @@ -3871,25 +4088,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 { @@ -3914,8 +4131,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 { @@ -3940,23 +4157,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; ?>); @@ -3964,7 +4181,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; @@ -3995,13 +4212,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%; } @@ -4011,11 +4228,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; } @@ -4035,11 +4252,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 { @@ -4050,7 +4267,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; @@ -4073,20 +4290,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 { @@ -4111,14 +4328,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; } @@ -4131,13 +4348,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; } @@ -4189,7 +4406,7 @@ div#card-errors { .ui-dialog-titlebar { } .ui-dialog-content { - font-size: <?php print $fontsize; ?>px !important; + font-size: <?php print $fontsize; ?>px !important; } @@ -4199,8 +4416,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; } */ @@ -4210,16 +4427,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 { @@ -4233,7 +4450,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 { @@ -4265,7 +4482,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; } @@ -4285,13 +4502,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; } @@ -4337,14 +4554,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 { @@ -4364,15 +4581,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; } @@ -4381,10 +4598,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] { @@ -4392,16 +4609,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; } @@ -4409,7 +4626,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; @@ -4418,11 +4635,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; */ @@ -4438,9 +4655,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; @@ -4459,9 +4676,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; @@ -4471,7 +4688,11 @@ span.websitebuttonsitepreviewdisabled img, a.websitebuttonsitepreviewdisabled im margin-right: 5px; } .websitebar input#previewpageurl { - line-height: 1em; + line-height: 1em; +} + +#divbodywebsite section p { + margin: unset; } @@ -4480,7 +4701,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; } @@ -4509,7 +4730,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; } @@ -4538,28 +4759,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; + } /* ============================================================================== */ @@ -4567,8 +4788,8 @@ td.cal_other_month { /* ============================================================================== */ td.gtaskname { - overflow: hidden; - text-overflow: ellipsis; + overflow: hidden; + text-overflow: ellipsis; } @@ -4744,29 +4965,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; } @@ -4776,28 +4997,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 { @@ -4811,8 +5032,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; } @@ -4820,28 +5041,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; } @@ -4850,7 +5071,7 @@ pre#editfilecontentaceeditorid { /* ============================================================================== */ .template-upload { - height: 72px !important; + height: 72px !important; } @@ -4871,32 +5092,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; } @@ -4908,55 +5129,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%; } @@ -4969,7 +5190,7 @@ div.scroll2 { } div#GanttChartDIVglisthead, div#GanttChartDIVgcharthead { - line-height: 2; + line-height: 2; } .gtaskname div, .gtaskname, .gstartdate div, .gstartdate, .genddate div, .genddate { @@ -4982,45 +5203,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; } @@ -5045,25 +5266,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 { @@ -5093,7 +5314,7 @@ ul.ecmjqft a:active { font-weight: bold !important; } ul.ecmjqft a:hover { - text-decoration: underline; + text-decoration: underline; } div.ecmjqft { @@ -5105,13 +5326,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; } @@ -5141,14 +5362,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; } /* ============================================================================== */ @@ -5211,7 +5432,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; @@ -5224,7 +5445,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; @@ -5260,7 +5481,7 @@ div.dataTables_length select { /* ============================================================================== */ span#select2-taskid-container[title^='--'] { - opacity: 0.3; + opacity: 0.3; } input.select2-input { @@ -5277,16 +5498,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; @@ -5318,7 +5539,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; @@ -5447,34 +5668,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 */ @@ -5528,7 +5749,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; @@ -5616,9 +5837,9 @@ span.noborderoncategories { } .multi-select-menuitem { - clear: both; - float: left; - padding-left: 5px + clear: both; + float: left; + padding-left: 5px } @@ -5627,51 +5848,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; @@ -5684,23 +5905,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; } @@ -5722,11 +5943,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 { @@ -5762,16 +5983,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; @@ -5854,39 +6075,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; @@ -5929,11 +6150,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; @@ -5941,22 +6162,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; } @@ -5993,14 +6214,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) { @@ -6009,13 +6230,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; + } } @@ -6038,7 +6259,7 @@ border-top-right-radius: 6px; .ticketpublicarea { margin-left: 15%; - margin-right: 15%; + margin-right: 15%; } .publicnewticketform { /* margin-top: 25px !important; */ @@ -6076,11 +6297,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; } } @@ -6101,13 +6322,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; } } @@ -6142,80 +6363,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 { @@ -6267,58 +6488,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; } } @@ -6329,10 +6550,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; @@ -6364,10 +6585,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; } @@ -6388,17 +6609,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; } } @@ -6424,26 +6645,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; } @@ -6456,17 +6677,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 */ @@ -6479,20 +6700,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; @@ -6505,22 +6726,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{ @@ -6539,9 +6760,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 84bec78bf30..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,20 +596,24 @@ 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) { - setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); - $action = 'view'; - } else { + if ($result < 0) { $error++; - setEventMessages($object->error, $object->errors, 'errors'); } } - if ($error) $action = 'edit_extras'; + if ($error) { + setEventMessages($object->error, $object->errors, 'errors'); + $action = 'edit_extras'; + } else { + setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); + $action = 'view'; + } } if ($action == "change_property" && GETPOST('btn_update_ticket_prop', 'alpha') && $user->rights->ticket->write) { @@ -634,9 +652,12 @@ 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'; + } } + /* * View */ @@ -644,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'); @@ -668,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); @@ -686,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 @@ -723,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); @@ -758,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(); @@ -773,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>'; @@ -784,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>'; @@ -877,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)) { @@ -937,14 +958,14 @@ elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action = // Creation date print '<tr><td>'.$langs->trans("DateCreation").'</td><td>'; - print dol_print_date($object->datec, 'dayhour'); + print dol_print_date($object->datec, 'dayhour', 'tzuser'); print '<span class="opacitymedium"> - '.$langs->trans("TimeElapsedSince").': <i>'.convertSecondToTime(roundUpToNextMultiple($now - $object->datec, 60)).'</i></span>'; print '</td></tr>'; // Read date print '<tr><td>'.$langs->trans("TicketReadOn").'</td><td>'; if (!empty($object->date_read)) { - print dol_print_date($object->date_read, 'dayhour'); + print dol_print_date($object->date_read, 'dayhour', 'tzuser'); print '<span class="opacitymedium"> - '.$langs->trans("TicketTimeToRead").': <i>'.convertSecondToTime(roundUpToNextMultiple($object->date_read - $object->datec, 60)).'</i>'; print ' - '.$langs->trans("TimeElapsedSince").': <i>'.convertSecondToTime(roundUpToNextMultiple($now - $object->date_read, 60)).'</i></span>'; } @@ -953,7 +974,7 @@ elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action = // Close date print '<tr><td>'.$langs->trans("TicketCloseOn").'</td><td>'; if (!empty($object->date_close)) { - print dol_print_date($object->date_close, 'dayhour'); + print dol_print_date($object->date_close, 'dayhour', 'tzuser'); } print '</td></tr>'; @@ -1009,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; @@ -1119,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">'; @@ -1244,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>'; @@ -1262,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) { @@ -1291,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'; @@ -1374,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 03e87067d10..1d77e323c10 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -223,9 +223,10 @@ class Ticket extends CommonObject /** - * 'type' if the field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password') + * 'type' 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). @@ -236,8 +237,8 @@ class Ticket extends CommonObject * 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...). * 'searchall' is 1 if we want to search in this field when making a search from the quick search button. * 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8). - * 'css' and 'cssview' is the CSS style to use on field. 'css' is used in creation and update. 'cssview' is used in view mode. For example: 'maxwidth200', 'wordbreak' - * 'help' is a string visible as a tooltip on field + * '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") @@ -253,19 +254,19 @@ class Ticket extends CommonObject 'entity' => array('type'=>'integer', 'label'=>'Entity', 'visible'=>0, 'enabled'=>1, 'position'=>5, 'notnull'=>1, 'index'=>1), 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'visible'=>1, 'enabled'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'css'=>''), 'track_id' => array('type'=>'varchar(255)', 'label'=>'TicketTrackId', 'visible'=>-2, 'enabled'=>1, 'position'=>11, 'notnull'=>-1, 'searchall'=>1, 'help'=>"Help text"), - 'fk_user_create' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Author', 'visible'=>1, 'enabled'=>1, 'position'=>15, 'notnull'=>1, 'css'=>'tdoverflowmax150 maxwidth150onsmartphone'), + 'fk_user_create' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Author', 'visible'=>1, 'enabled'=>1, 'position'=>15, 'notnull'=>1, 'css'=>'tdoverflowmax125 maxwidth150onsmartphone'), 'origin_email' => array('type'=>'mail', 'label'=>'OriginEmail', 'visible'=>-2, 'enabled'=>1, 'position'=>16, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'css'=>'tdoverflowmax150'), - 'subject' => array('type'=>'varchar(255)', 'label'=>'Subject', 'visible'=>1, 'enabled'=>1, 'position'=>18, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth200', 'autofocusoncreate'=>1), - 'type_code' => array('type'=>'varchar(32)', 'label'=>'Type', 'visible'=>1, 'enabled'=>1, 'position'=>20, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth150 tdoverflowmax50'), + 'subject' => array('type'=>'varchar(255)', 'label'=>'Subject', 'visible'=>1, 'enabled'=>1, 'position'=>18, 'notnull'=>-1, 'searchall'=>1, 'help'=>"", 'css'=>'maxwidth200 tdoverflowmax200', 'autofocusoncreate'=>1), + 'type_code' => array('type'=>'varchar(32)', 'label'=>'Type', 'visible'=>1, 'enabled'=>1, 'position'=>20, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth125 tdoverflowmax50'), 'category_code' => array('type'=>'varchar(32)', 'label'=>'TicketCategory', 'visible'=>-1, 'enabled'=>1, 'position'=>21, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100'), 'severity_code' => array('type'=>'varchar(32)', 'label'=>'Severity', 'visible'=>1, 'enabled'=>1, 'position'=>22, 'notnull'=>-1, 'help'=>"", 'css'=>'maxwidth100'), - 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'searchall'=>1, 'help'=>"LinkToThirparty", 'css'=>'tdoverflowmax150 maxwidth150onsmartphone'), + 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'visible'=>1, 'enabled'=>'$conf->societe->enabled', 'position'=>50, 'notnull'=>-1, 'index'=>1, 'searchall'=>1, 'help'=>"LinkToThirparty", 'css'=>'tdoverflowmax150 maxwidth150onsmartphone'), 'notify_tiers_at_create' => array('type'=>'integer', 'label'=>'NotifyThirdparty', 'visible'=>-1, 'enabled'=>0, 'position'=>51, 'notnull'=>1, 'index'=>1), 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php', 'label'=>'Project', 'visible'=>-1, 'enabled'=>1, 'position'=>52, 'notnull'=>-1, 'index'=>1, 'help'=>"LinkToProject"), 'timing' => array('type'=>'varchar(20)', 'label'=>'Timing', 'visible'=>-1, 'enabled'=>1, 'position'=>42, 'notnull'=>-1, 'help'=>""), 'datec' => array('type'=>'datetime', 'label'=>'DateCreation', 'visible'=>1, 'enabled'=>1, 'position'=>500, 'notnull'=>1), - 'date_read' => array('type'=>'datetime', 'label'=>'TicketReadOn', 'visible'=>1, 'enabled'=>1, 'position'=>501, 'notnull'=>1), - 'fk_user_assign' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'AssignedTo', 'visible'=>1, 'enabled'=>1, 'position'=>505, 'notnull'=>1, 'css'=>'tdoverflowmax150'), + 'date_read' => array('type'=>'datetime', 'label'=>'TicketReadOn', 'visible'=>-1, 'enabled'=>1, 'position'=>501, 'notnull'=>1), + 'fk_user_assign' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'AssignedTo', 'visible'=>1, 'enabled'=>1, 'position'=>505, 'notnull'=>1, 'css'=>'tdoverflowmax125'), 'date_close' => array('type'=>'datetime', 'label'=>'TicketCloseOn', 'visible'=>-1, 'enabled'=>1, 'position'=>510, 'notnull'=>1), 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'visible'=>-1, 'enabled'=>1, 'position'=>520, 'notnull'=>1), 'message' => array('type'=>'text', 'label'=>'Message', 'visible'=>-2, 'enabled'=>1, 'position'=>540, 'notnull'=>-1,), @@ -409,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 @@ -565,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)) { @@ -580,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; @@ -710,12 +712,12 @@ class Ticket extends CommonObject if (!empty($filter)) { foreach ($filter as $key => $value) { if (strpos($key, 'date')) { // To allow $filter['YEAR(s.dated)']=>$year - $sql .= ' AND '.$key." = '".$this->db->scape($value)."'"; + $sql .= ' AND '.$key." = '".$this->db->escape($value)."'"; } elseif (($key == 't.fk_user_assign') || ($key == 't.type_code') || ($key == 't.category_code') || ($key == 't.severity_code') || ($key == 't.fk_soc')) { $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); } @@ -912,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(); @@ -990,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 @@ -1004,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); @@ -1173,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"; @@ -1190,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; @@ -1318,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 = ''; @@ -1331,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)) : ''); @@ -1436,8 +1451,7 @@ class Ticket extends CommonObject $this->oldcopy = dol_clone($this); $sql = "UPDATE ".MAIN_DB_PREFIX."ticket"; - if ($id_assign_user > 0) - { + if ($id_assign_user > 0) { $sql .= " SET fk_user_assign=".$id_assign_user.", fk_statut = ".Ticket::STATUS_ASSIGNED; } else { $sql .= " SET fk_user_assign=null, fk_statut = ".Ticket::STATUS_READ; @@ -1446,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) { @@ -1587,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; } @@ -1668,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; @@ -1759,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); @@ -1972,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) { @@ -1984,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); @@ -2147,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'); @@ -2464,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']; @@ -2625,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) */ @@ -2669,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']).')'; @@ -2685,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 @@ -2743,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>' : ''); @@ -2768,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 @@ -2786,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); } @@ -2841,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; @@ -2896,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') { @@ -2933,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++; } } @@ -2969,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"; @@ -2978,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 45ee7aba268..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_once 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 53973de6c59..19b352ee936 100644 --- a/htdocs/ticket/list.php +++ b/htdocs/ticket/list.php @@ -2,7 +2,7 @@ /* Copyright (C) 2013-2018 Jean-François FERRY <hello@librethic.io> * Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr> * Copyright (C) 2018 Regis Houssin <regis.houssin@inodbox.com> - * Copyright (C) 2019 Juanjo Menent <jmenent@2byte.es> + * Copyright (C) 2019-2021 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2019-2020 Laurent Destailleur <eldy@users.sourceforge.net> * * This program is free software; you can redistribute it and/or modify @@ -57,6 +57,14 @@ $project_ref = GETPOST('project_ref', 'alpha'); $search_societe = GETPOST('search_societe', 'alpha'); $search_fk_project = GETPOST('search_fk_project', 'int') ?GETPOST('search_fk_project', 'int') : GETPOST('projectid', 'int'); $search_fk_status = GETPOST('search_fk_statut', 'array'); +$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_dateread_start = dol_mktime(0, 0, 0, GETPOST('search_dateread_startmonth', 'int'), GETPOST('search_dateread_startday', 'int'), GETPOST('search_dateread_startyear', 'int')); +$search_dateread_end = dol_mktime(23, 59, 59, GETPOST('search_dateread_endmonth', 'int'), GETPOST('search_dateread_endday', 'int'), GETPOST('search_dateread_endyear', 'int')); +$search_dateclose_start = dol_mktime(0, 0, 0, GETPOST('search_dateclose_startmonth', 'int'), GETPOST('search_dateclose_startday', 'int'), GETPOST('search_dateclose_startyear', 'int')); +$search_dateclose_end = dol_mktime(23, 59, 59, GETPOST('search_dateclose_endmonth', 'int'), GETPOST('search_dateclose_endday', 'int'), GETPOST('search_dateclose_endyear', 'int')); + + $mode = GETPOST('mode', 'alpha'); // Load variable for pagination @@ -64,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; @@ -73,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"; @@ -106,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'; @@ -128,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; @@ -147,33 +169,45 @@ $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 = ''; $search_array_options = array(); + $search_date_start = ''; + $search_date_end = ''; + $search_dateread_start = ''; + $search_dateread_end = ''; + $search_dateclose_start = ''; + $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 } @@ -184,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++; @@ -211,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(); @@ -224,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'); @@ -258,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(); @@ -293,38 +325,42 @@ $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'])) { $newarrayofstatus[] = Ticket::STATUS_NOT_READ; + $newarrayofstatus[] = Ticket::STATUS_READ; $newarrayofstatus[] = Ticket::STATUS_ASSIGNED; $newarrayofstatus[] = Ticket::STATUS_IN_PROGRESS; $newarrayofstatus[] = Ticket::STATUS_NEED_MORE_INFO; @@ -334,23 +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') - { - 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) $sql .= natural_search('fk_project', $search_fk_project, 2); +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 .= ")"; } @@ -365,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; } @@ -393,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); @@ -405,7 +469,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, '', '', '', 'classforhorizontalscrolloftabs'); if ($socid && !$projectid && !$project_ref && $user->rights->societe->lire) { @@ -426,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>'; @@ -483,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); @@ -526,32 +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 ($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">'; @@ -559,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); @@ -581,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>'; } @@ -594,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>'; @@ -615,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 : '').'">'; @@ -637,30 +777,63 @@ foreach ($object->fields as $key => $val) print '</td>'; } elseif ($key == 'fk_user_assign' || $key == 'fk_user_create') { print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">'; - print $form->select_dolusers($search[$key], 'search_'.$key, 1, null, 0, '', '', '0', 0, 0, '', 0, '', ($val['css'] ? $val['css'] : 'maxwidth150')); + print $form->select_dolusers($search[$key], 'search_'.$key, 1, null, 0, '', '', '0', 0, 0, '', 0, '', ($val['css'] ? $val['css'] : 'maxwidth125')); print '</td>'; } 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]); - print Form::multiselectarray('search_fk_statut', $arrayofstatus, $selectedarray, 0, 0, 'minwidth150', 1, 0, '', '', ''); + 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') { + print '<td class="liste_titre center">'; + print '<div class="nowrap">'; + 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; + case 'date_read': + print $form->selectDate($search_dateread_start ?: -1, 'search_dateread_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From")); + break; + case 'date_close': + print $form->selectDate($search_dateclose_start ?: -1, 'search_dateclose_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From")); + } + print '</div>'; + print '<div class="nowrap">'; + 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; + case 'date_read': + print $form->selectDate($search_dateread_end ?: -1, 'search_dateread_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to")); + break; + case 'date_close': + print $form->selectDate($search_dateclose_end ?: -1, 'search_dateclose_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to")); + } + print '</div>'; + print '</td>'; } 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>'; } } @@ -683,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"; } } @@ -707,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 + } } } @@ -721,64 +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 == 'type_code') { + 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') { $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. @@ -796,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; } } @@ -812,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>'; @@ -831,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>'; } @@ -852,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 a35ffbad1b5..57d5c44615f 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->selectarray('users', $liste, '', 1); + 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,8 +834,7 @@ 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); @@ -850,18 +843,14 @@ if ($action == 'create' || $action == 'adduserldap') print '<tr><td class="fieldrequired">'.$langs->trans("Password").'</td>'; print '<td>'; $valuetoshow = ''; - if (preg_match('/ldap/', $dolibarr_main_authentication)) - { + if (preg_match('/ldap/', $dolibarr_main_authentication)) { $valuetoshow .= ($valuetoshow ? ', ' : '').$langs->trans("PasswordOfUserInLDAP"); } - if (preg_match('/http/', $dolibarr_main_authentication)) - { + 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 - { + 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 { @@ -873,21 +862,24 @@ if ($action == 'create' || $action == 'adduserldap') // 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 + if ($reshook > 0) { + $valuetoshow = $hookmanager->resPrint; // to replace + } else { + $valuetoshow .= $hookmanager->resPrint; // to add + } print $valuetoshow; print '</td></tr>'; - if (!empty($conf->api->enabled)) - { + 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)) + 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 @@ -896,16 +888,13 @@ if ($action == 'create' || $action == 'adduserldap') } // 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 +923,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"; } @@ -961,8 +950,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 +962,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'); @@ -1013,13 +1000,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 +1018,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 +1030,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 +1042,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 +1054,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 +1067,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 +1089,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 +1097,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 +1105,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 { @@ -1180,8 +1161,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 +1174,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 +1183,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 +1193,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"; } @@ -1264,7 +1243,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 +1254,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 +1288,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 +1300,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 +1322,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); @@ -1404,8 +1372,7 @@ if ($action == 'create' || $action == 'adduserldap') // 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>'; @@ -1417,18 +1384,13 @@ if ($action == 'create' || $action == 'adduserldap') print '<td class="wordbreak">'; $valuetoshow = ''; - if (preg_match('/ldap/', $dolibarr_main_authentication)) - { - if (!empty($object->ldap_sid)) - { - if ($passDoNotExpire) - { + 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) - { + } elseif ($userChangePassNextLogon) { $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').'<span class="warning">'.$langs->trans("UserMustChangePassNextLogon", $ldap->domainFQDN).'</span>'; - } elseif ($userDisabled) - { + } 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"); @@ -1437,12 +1399,10 @@ if ($action == 'create' || $action == 'adduserldap') $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("PasswordOfUserInLDAP"); } } - if (preg_match('/http/', $dolibarr_main_authentication)) - { + if (preg_match('/http/', $dolibarr_main_authentication)) { $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("HTTPBasicPassword"); } - if (preg_match('/dolibarr/', $dolibarr_main_authentication)) - { + if (preg_match('/dolibarr/', $dolibarr_main_authentication)) { if ($object->pass) { $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : ''); $valuetoshow .= '<span class="opacitymedium">'.$langs->trans("Hidden").'</span>'; @@ -1453,16 +1413,20 @@ if ($action == 'create' || $action == 'adduserldap') $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>'; } - 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 + if ($reshook > 0) { + $valuetoshow = $hookmanager->resPrint; // to replace + } else { + $valuetoshow .= $hookmanager->resPrint; // to add + } print $valuetoshow; print "</td>"; @@ -1472,7 +1436,9 @@ if ($action == 'create' || $action == 'adduserldap') 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 (!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 } @@ -1481,11 +1447,9 @@ if ($action == 'create' || $action == 'adduserldap') // 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,25 +1462,22 @@ 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); @@ -1570,8 +1531,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 +1550,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 +1578,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"; } @@ -1667,8 +1626,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>'; } @@ -1682,8 +1640,7 @@ if ($action == 'create' || $action == 'adduserldap') 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 +1649,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 +1657,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 +1668,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 +1683,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 +1703,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 +1716,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 +1734,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 @@ -1826,18 +1775,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 +1793,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 +1855,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 +1867,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 +1883,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 +1894,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 +1904,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 +1913,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 +1939,7 @@ if ($action == 'create' || $action == 'adduserldap') print "</table>"; - if ($caneditgroup) - { + if ($caneditgroup) { print '</form>'; } print "<br>"; @@ -2021,10 +1949,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 +1962,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 +1971,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 +1991,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 +2002,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.'">'; @@ -2092,18 +2015,14 @@ if ($action == 'create' || $action == 'adduserldap') print '<tr><td>'.$langs->trans("Password").'</td>'; print '<td>'; $valuetoshow = ''; - if (preg_match('/ldap/', $dolibarr_main_authentication)) - { + if (preg_match('/ldap/', $dolibarr_main_authentication)) { $valuetoshow .= ($valuetoshow ? (' '.$langs->trans("or").' ') : '').$langs->trans("PasswordOfUserInLDAP"); } - if (preg_match('/http/', $dolibarr_main_authentication)) - { + 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) - { + 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); @@ -2113,27 +2032,29 @@ if ($action == 'create' || $action == 'adduserldap') // 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 + 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) - { + 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)) + 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 +2072,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,28 +2115,31 @@ 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>'; @@ -2235,19 +2156,18 @@ if ($action == 'create' || $action == 'adduserldap') 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 +2176,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 +2195,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 +2210,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 +2246,19 @@ if ($action == 'create' || $action == 'adduserldap') } print '</td></tr>'; - print '</table><hr><table class="border centpercent">'; + 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 +2283,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 +2293,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 +2307,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 +2319,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 +2331,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 +2343,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 +2356,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 +2374,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 +2389,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 +2404,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 +2417,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 +2443,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 +2457,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 +2478,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 +2496,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 +2514,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 +2525,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 +2535,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 +2565,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 +2588,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 +2599,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 +2607,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 +2618,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'); @@ -2727,17 +2640,17 @@ if ($action == 'create' || $action == 'adduserldap') // Date login validity print '<tr><td>'.$langs->trans("RangeOfLoginValidity").'</td>'; print '<td>'; - if ($caneditfield) - { + 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 ($datestartvalidity && $dateendvalidity) { + print ' - '; + } - if ($caneditfield) - { + if ($caneditfield) { print $form->selectDate($dateendvalidity ? $datendevalidity : $object->dateendvalidity, 'dateendvalidity', 0, 0, 1, 'formdateendvalidity', 1, 0); } else { print dol_print_date($object->dateendvalidity, 'day'); @@ -2770,12 +2683,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 +2712,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 e68ecb8bc1d..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 @@ -142,17 +141,18 @@ class Users extends DolibarrApi * Get properties of an user object * * @param int $id ID of user - * @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 + * @throws RestException 401 Insufficient rights + * @throws RestException 404 User or group not found */ 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 { @@ -177,19 +177,19 @@ class Users extends DolibarrApi * Get properties of an user object by login * * @param string $login Login of user - * @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 * * @url GET login/{login} * - * @throws RestException 401 Insufficient rights - * @throws RestException 404 User or group not found + * @throws RestException 401 Insufficient rights + * @throws RestException 404 User or group not found */ 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) { @@ -211,8 +211,8 @@ class Users extends DolibarrApi * Get properties of an user object by Email * * @param string $email Email of user - * @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 * * @url GET email/{email} * @@ -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,19 +333,22 @@ class Users extends DolibarrApi /** - * Update account + * Update user account * - * @param int $id Id of account to update - * @param array $request_data Datas - * @return array + * @param int $id Id of account to update + * @param array $request_data Datas + * @return array|mixed Record after update * - * @throws RestException + * @throws RestException 401 Not allowed + * @throws RestException 404 Not found + * @throws RestException 500 System error */ 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) { @@ -339,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') { @@ -374,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) { @@ -404,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'); @@ -453,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 = '') { @@ -460,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 @@ -471,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) { @@ -525,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"); } @@ -545,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'); @@ -619,8 +685,7 @@ class Users extends DolibarrApi unset($object->facebook); unset($object->linkedin); - $canreadsalary = ((!empty($conf->salaries->enabled) && !empty(DolibarrApiAccess::$user->rights->salaries->read)) - || (!empty($conf->hrm->enabled) && !empty(DolibarrApiAccess::$user->rights->hrm->employee->read))); + $canreadsalary = ((!empty($conf->salaries->enabled) && !empty(DolibarrApiAccess::$user->rights->salaries->read)) || (empty($conf->salaries->enabled))); if (!$canreadsalary) { unset($object->salary); 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 eb92bd51eb9..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; @@ -1452,11 +1414,12 @@ class User extends CommonObject if ($result > 0) { $sql = "UPDATE ".MAIN_DB_PREFIX."user"; $sql .= " SET fk_socpeople=".$contact->id; - $sql .= ", civility=".$contact->civility_code; - if ($contact->socid) { + $sql .= ", civility='".$this->db->escape($contact->civility_code)."'"; + if ($contact->socid > 0) { $sql .= ", fk_soc=".$contact->socid; } - $sql .= " WHERE rowid=".$this->id; + $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; @@ -1806,7 +1771,7 @@ class User extends CommonObject $adh->pass = $this->pass; - $adh->societe = (empty($adh->societe) && $this->societe_id ? $this->societe_id : $adh->societe); + //$adh->societe = (empty($adh->societe) && $this->societe_id ? $this->societe_id : $adh->societe); $adh->address = $this->address; $adh->town = $this->town; @@ -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); @@ -2418,6 +2391,7 @@ class User extends CommonObject } $result = ''; $label = ''; + $companylink = ''; if (!empty($this->photo)) { $label .= '<div class="photointooltip">'; @@ -2429,53 +2403,54 @@ class User extends CommonObject $label .= '<div class="centpercent">'; $label .= img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("User").'</u>'; $label .= ' '.$this->getLibStatut(4); - $label .= '<br><b>'.$langs->trans('Name').':</b> '.$this->getFullName($langs, ''); + $label .= '<br><b>'.$langs->trans('Name').':</b> '.dol_string_nohtmltag($this->getFullName($langs, '')); if (!empty($this->login)) { - $label .= '<br><b>'.$langs->trans('Login').':</b> '.$this->login; + $label .= '<br><b>'.$langs->trans('Login').':</b> '.dol_string_nohtmltag($this->login); } if (!empty($this->job)) { - $label .= '<br><b>'.$langs->trans("Job").':</b> '.$this->job; + $label .= '<br><b>'.$langs->trans("Job").':</b> '.dol_string_nohtmltag($this->job); } - $label .= '<br><b>'.$langs->trans("Email").':</b> '.$this->email; + $label .= '<br><b>'.$langs->trans("Email").':</b> '.dol_string_nohtmltag($this->email); if (!empty($this->phone)) { - $label .= '<br><b>'.$langs->trans("Phone").':</b> '.$this->phone; + $label .= '<br><b>'.$langs->trans("Phone").':</b> '.dol_string_nohtmltag($this->phone); } if (!empty($this->admin)) { $label .= '<br><b>'.$langs->trans("Administrator").'</b>: '.yn($this->admin); } + $company = ''; if (!empty($this->socid)) { // Add thirdparty for external users $thirdpartystatic = new Societe($db); $thirdpartystatic->fetch($this->socid); if (empty($hidethirdpartylogo)) { $companylink = ' '.$thirdpartystatic->getNomUrl(2, (($option == 'nolink') ? 'nolink' : '')); // picto only of company } - $company = ' ('.$langs->trans("Company").': '.$thirdpartystatic->name.')'; + $company = ' ('.$langs->trans("Company").': '.dol_string_nohtmltag($thirdpartystatic->name).')'; } $type = ($this->socid ? $langs->trans("External").$company : $langs->trans("Internal")); - $label .= '<br><b>'.$langs->trans("Type").':</b> '.$type; + $label .= '<br><b>'.$langs->trans("Type").':</b> '.dol_string_nohtmltag($type); $label .= '</div>'; if ($infologin > 0) { $label .= '<br>'; $label .= '<br><u>'.$langs->trans("Session").'</u>'; - $label .= '<br><b>'.$langs->trans("IPAddress").'</b>: '.$_SERVER["REMOTE_ADDR"]; + $label .= '<br><b>'.$langs->trans("IPAddress").'</b>: '.dol_string_nohtmltag(getUserRemoteIP()); if (!empty($conf->global->MAIN_MODULE_MULTICOMPANY)) { - $label .= '<br><b>'.$langs->trans("ConnectedOnMultiCompany").':</b> '.$conf->entity.' (user entity '.$this->entity.')'; + $label .= '<br><b>'.$langs->trans("ConnectedOnMultiCompany").':</b> '.$conf->entity.' (User entity '.$this->entity.')'; } - $label .= '<br><b>'.$langs->trans("AuthenticationMode").':</b> '.$_SESSION["dol_authmode"].(empty($dolibarr_main_demo) ? '' : ' (demo)'); + $label .= '<br><b>'.$langs->trans("AuthenticationMode").':</b> '.dol_string_nohtmltag($_SESSION["dol_authmode"].(empty($dolibarr_main_demo) ? '' : ' (demo)')); $label .= '<br><b>'.$langs->trans("ConnectedSince").':</b> '.dol_print_date($this->datelastlogin, "dayhour", 'tzuser'); $label .= '<br><b>'.$langs->trans("PreviousConnexion").':</b> '.dol_print_date($this->datepreviouslogin, "dayhour", 'tzuser'); - $label .= '<br><b>'.$langs->trans("CurrentTheme").':</b> '.$conf->theme; - $label .= '<br><b>'.$langs->trans("CurrentMenuManager").':</b> '.$menumanager->name; + $label .= '<br><b>'.$langs->trans("CurrentTheme").':</b> '.dol_string_nohtmltag($conf->theme); + $label .= '<br><b>'.$langs->trans("CurrentMenuManager").':</b> '.dol_string_nohtmltag($menumanager->name); $s = picto_from_langcode($langs->getDefaultLang()); - $label .= '<br><b>'.$langs->trans("CurrentUserLanguage").':</b> '.($s ? $s.' ' : '').$langs->getDefaultLang(); - $label .= '<br><b>'.$langs->trans("Browser").':</b> '.$conf->browser->name.($conf->browser->version ? ' '.$conf->browser->version : '').' ('.$_SERVER['HTTP_USER_AGENT'].')'; - $label .= '<br><b>'.$langs->trans("Layout").':</b> '.$conf->browser->layout; - $label .= '<br><b>'.$langs->trans("Screen").':</b> '.$_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight']; + $label .= '<br><b>'.$langs->trans("CurrentUserLanguage").':</b> '.dol_string_nohtmltag(($s ? $s.' ' : '').$langs->getDefaultLang()); + $label .= '<br><b>'.$langs->trans("Browser").':</b> '.dol_string_nohtmltag($conf->browser->name.($conf->browser->version ? ' '.$conf->browser->version : '').' ('.$_SERVER['HTTP_USER_AGENT'].')'); + $label .= '<br><b>'.$langs->trans("Layout").':</b> '.dol_string_nohtmltag($conf->browser->layout); + $label .= '<br><b>'.$langs->trans("Screen").':</b> '.dol_string_nohtmltag($_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight']); if ($conf->browser->layout == 'phone') { $label .= '<br><b>'.$langs->trans("Phone").':</b> '.$langs->trans("Yes"); } if (!empty($_SESSION["disablemodules"])) { - $label .= '<br><b>'.$langs->trans("DisabledModules").':</b> <br>'.join(', ', explode(',', $_SESSION["disablemodules"])); + $label .= '<br><b>'.$langs->trans("DisabledModules").':</b> <br>'.dol_string_nohtmltag(join(', ', explode(',', $_SESSION["disablemodules"]))); } } if ($infologin < 0) { @@ -2530,21 +2505,20 @@ 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; } if ($withpictoimg > -2 && $withpictoimg != 2) { if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { - $result .= '<span class=" nopadding usertext'.((!isset($this->statut) || $this->statut) ? '' : ' strikefordisabled').($morecss ? ' '.$morecss : '').'">'; + $result .= '<span class="nopadding usertext'.((!isset($this->statut) || $this->statut) ? '' : ' strikefordisabled').($morecss ? ' '.$morecss : '').'">'; } if ($mode == 'login') { - $result .= dol_trunc($this->login, $maxlen); + $result .= dol_string_nohtmltag(dol_trunc($this->login, $maxlen)); } else { - $result .= $this->getFullName($langs, '', ($mode == 'firstelselast' ? 3 : ($mode == 'firstname' ? 2 : -1)), $maxlen); + $result .= dol_string_nohtmltag($this->getFullName($langs, '', ($mode == 'firstelselast' ? 3 : ($mode == 'firstname' ? 2 : -1)), $maxlen)); } if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $result .= '</span>'; @@ -2767,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)) { @@ -2777,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 } @@ -2900,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) { @@ -3099,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..f0b6bcdfe87 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); @@ -501,7 +506,9 @@ class UserGroup extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."usergroup_rights"; $sql .= " WHERE fk_usergroup = $this->id AND fk_id=".$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 5440ceeb725..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']; } @@ -170,7 +179,7 @@ if ($object->id) $permission = $user->rights->user->user->creer; $permtoedit = $user->rights->user->user->creer; $param = '&id='.$object->id; - include_once 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/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 4d215685f53..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>'; + $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 e7a8a31af4e..fe05c551945 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -31,12 +31,8 @@ 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')); +$langs->loadLangs(array('users', 'companies', 'hrm', 'salaries')); $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) @@ -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,27 +318,32 @@ 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) $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 .= preg_replace('/^,/', '', $hookmanager->resPrint); $sql = preg_replace('/,\s*$/', '', $sql); -$sql .= $hookmanager->resPrint; $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; -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 (u.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 (u.rowid = ef.fk_object)"; +} $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 @@ -325,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 s.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 @@ -356,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; } @@ -384,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); @@ -398,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.'">'; @@ -437,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); @@ -455,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'); @@ -464,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>'; } @@ -476,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>'; @@ -506,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 @@ -576,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); @@ -604,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"; @@ -634,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 + } } } @@ -647,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); @@ -661,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; @@ -672,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 @@ -817,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"; @@ -859,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..0c9785d7463 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)) - { + 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,7 +202,7 @@ 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 '<input type="hidden" name="token" value="'.newToken().'">'; @@ -193,59 +211,18 @@ if ($result > 0) $param = "&id=".$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 b058bae9743..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,44 +297,40 @@ $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; - $sqlupdate = 'UPDATE '.MAIN_DB_PREFIX."rights_def SET module_position = ".$modules[$obj->module]->module_position.","; - $sqlupdate .= " family_position = ".$familyposition; + $sqlupdate = 'UPDATE '.MAIN_DB_PREFIX."rights_def SET module_position = ".((int) $modules[$obj->module]->module_position).","; + $sqlupdate .= " family_position = ".((int) $familyposition); $sqlupdate .= " WHERE module_position = 0 AND module = '".$db->escape($obj->module)."'"; $db->query($sqlupdate); } } - 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,45 +406,61 @@ 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 - $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>'; + // Label of permission + $permlabel = (!empty($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">'; + print $permlabel; + if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { + if (preg_match('/_advance$/', $obj->perms)) { + print ' <span class="opacitymedium">('.$langs->trans("AdvancedModeOnly").')</span>'; + } + } + 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 6cda745056a..ed70c6325e3 100644 --- a/htdocs/variants/card.php +++ b/htdocs/variants/card.php @@ -36,15 +36,29 @@ 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 == 'edit') { + if ($action == 'update') { $object->ref = $ref; $object->label = $label; @@ -55,24 +69,21 @@ if ($action) { header('Location: '.dol_buildpath('/variants/card.php?id='.$id, 2)); exit(); } - } elseif ($action == 'update') { + } elseif ($action == 'update_value') { if ($objectval->fetch($valueid) > 0) { $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); @@ -139,7 +151,12 @@ $h++; print dol_get_fiche_head($head, 'variant', $langs->trans('ProductAttributeName'), -1, 'generic'); if ($action == 'edit') { - print '<form method="POST">'; + 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="'.$id.'">'; + print '<input type="hidden" name="valueid" value="'.$valueid.'">'; + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; } @@ -232,7 +249,7 @@ if ($action == 'edit') { if ($action == 'edit_value') { 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="action" value="update_value">'; print '<input type="hidden" name="id" value="'.$id.'">'; print '<input type="hidden" name="valueid" value="'.$valueid.'">'; print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; 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 24da596f3c2..979ec261663 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,13 +109,14 @@ $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]; if (!$features) { - setEventMessages($langs->trans('ErrorFieldsRequired'), null, 'errors'); + if ($action == 'create') { + setEventMessages($langs->trans('ErrorFieldsRequired'), null, 'errors'); + } } else { $reference = trim($reference); if (empty($reference)) { @@ -119,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); } @@ -154,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]); @@ -241,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); @@ -328,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); @@ -355,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 @@ -388,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;'; @@ -464,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 } ?> @@ -602,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> @@ -614,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 } @@ -649,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) { @@ -701,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> @@ -730,8 +742,7 @@ if (!empty($id) || !empty($ref)) $comb2val = new ProductCombination2ValuePair($db); - if ($productCombinations) - { + if ($productCombinations) { ?> <script type="text/javascript"> @@ -763,11 +774,10 @@ if (!empty($id) || !empty($ref)) print ' <div class="inline-block divButAction">'; - print '<a href="combinations.php?id='.$object->id.'&action=add" class="butAction">'.$langs->trans('NewProductCombination').'</a>'; // NewVariant + print '<a href="combinations.php?id='.$object->id.'&action=add&token='.newToken().'" class="butAction">'.$langs->trans('NewProductCombination').'</a>'; // NewVariant - if ($productCombinations) - { - print '<a href="combinations.php?id='.$object->id.'&action=copy" class="butAction">'.$langs->trans('PropagateVariant').'</a>'; + if ($productCombinations) { + print '<a href="combinations.php?id='.$object->id.'&action=copy&token='.newToken().'" class="butAction">'.$langs->trans('PropagateVariant').'</a>'; } print ' </div>'; @@ -789,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(); @@ -798,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>'; @@ -824,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; @@ -837,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>'; @@ -867,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 7864c93243f..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 (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 (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 (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 (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 9abc7b6088f..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 (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,25 +261,21 @@ 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 societe_id - if ( - $fuser->rights->societe->contact->lire && !$fuser->societe_id - || ($fuser->rights->societe->contact->lire && ($fuser->societe_id == $contact->socid)) + // Or for external user who have contact read permission, with restrict on socid + if ($fuser->rights->societe->contact->lire && !$fuser->socid + || ($fuser->rights->societe->contact->lire && ($fuser->socid == $contact->socid)) ) { $contact_result_fields = array( 'id' => $contact->id, @@ -319,10 +321,8 @@ function getContact($authentication, $id, $ref_ext) //Get extrafield values $contact->fetch_optionals(); - if (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 (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 (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 5a8e6fb241c..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', @@ -288,11 +289,13 @@ $server->register( */ function getInvoice($authentication, $id = '', $ref = '', $ref_ext = '') { - global $db, $conf, $langs; + global $db, $conf; 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 : '', @@ -363,26 +361,23 @@ function getInvoice($authentication, $id = '', $ref = '', $ref_ext = '') 'note_private' => $invoice->note_private ? $invoice->note_private : '', 'note_public' => $invoice->note_public ? $invoice->note_public : '', 'status' => $invoice->statut, - 'project_id' => $invoic->fk_project, + 'project_id' => $invoice->fk_project, 'close_code' => $invoice->close_code ? $invoice->close_code : '', 'close_note' => $invoice->close_note ? $invoice->close_note : '', '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)); } @@ -399,11 +394,13 @@ function getInvoice($authentication, $id = '', $ref = '', $ref_ext = '') */ function getInvoicesForThirdParty($authentication, $idthirdparty) { - global $db, $conf, $langs; + global $db, $conf; 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, @@ -482,7 +476,7 @@ function getInvoicesForThirdParty($authentication, $idthirdparty) 'fk_user_valid' => $invoice->user_valid ? $invoice->user_valid : '', 'date' => $invoice->date ?dol_print_date($invoice->date, 'dayrfc') : '', 'date_due' => $invoice->date_lim_reglement ?dol_print_date($invoice->date_lim_reglement, 'dayrfc') : '', - 'date_creation' => $invoice->date_creation ?dol_print_date($invoice->date_creation, 'dayhourrfc') : '', + 'date_creation' => $invoice->date_creation ?dol_print_date($invoice->date_creation, 'dayhourrfc') : '', 'date_validation' => $invoice->date_validation ?dol_print_date($invoice->date_creation, 'dayhourrfc') : '', 'date_modification' => $invoice->datem ?dol_print_date($invoice->datem, 'dayhourrfc') : '', 'type' => $invoice->type, @@ -492,7 +486,7 @@ function getInvoicesForThirdParty($authentication, $idthirdparty) 'note_private' => $invoice->note_private ? $invoice->note_private : '', 'note_public' => $invoice->note_public ? $invoice->note_public : '', 'status'=> $invoice->statut, - 'project_id' => $invoic->fk_project, + 'project_id' => $invoice->fk_project, 'close_code' => $invoice->close_code ? $invoice->close_code : '', 'close_note' => $invoice->close_note ? $invoice->close_note : '', 'payment_mode_id' => $invoice->mode_reglement_id ? $invoice->mode_reglement_id : '', @@ -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)); } @@ -528,19 +520,20 @@ function getInvoicesForThirdParty($authentication, $idthirdparty) * Create an invoice * * @param array $authentication Array of authentication information - * @param Facture $invoice Invoice + * @param array $invoice Invoice * @return array Array result */ function createInvoice($authentication, $invoice) { - global $db, $conf, $langs; + global $db, $conf; $now = dol_now(); - dol_syslog("Function: createInvoice login=".$authentication['login']." id=".$invoice->id. - ", ref=".$invoice->ref.", ref_ext=".$invoice->ref_ext); + 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(); @@ -553,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']; @@ -572,30 +564,33 @@ 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 $key => $line) - { + foreach ($arrayoflines as $line) { // $key can be 'line' or '0','1',... $newline = new FactureLigne($db); $newline->product_type = $line['type']; $newline->desc = $line['desc']; - $newline->fk_product = $line['fk_product']; - $newline->tva_tx = $line['vat_rate']; + $newline->fk_product = $line['product_id']; + $newline->tva_tx = isset($line['vat_rate']) ? $line['vat_rate'] : 0; $newline->qty = $line['qty']; - $newline->subprice = $line['unitprice']; + $newline->subprice = isset($line['unitprice']) ? $line['unitprice'] : null; $newline->total_ht = $line['total_net']; $newline->total_tva = $line['total_vat']; $newline->total_ttc = $line['total']; $newline->date_start = dol_stringtotime($line['date_start']); $newline->date_end = dol_stringtotime($line['date_end']); - $newline->fk_product = $line['product_id']; + $new_invoice->lines[] = $newline; } //var_dump($newobject->date_lim_reglement); exit; @@ -604,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'; @@ -633,8 +623,7 @@ function createInvoice($authentication, $invoice) } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -654,19 +643,20 @@ function createInvoiceFromOrder($authentication, $id_order = '', $ref_order = '' { global $db, $conf; - $now = dol_now(); + dol_syslog("Function: createInvoiceFromOrder login=".$authentication['login']." id=".$id_order.", ref=".$ref_order.", ref_ext=".$ref_ext_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)) { @@ -674,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); } @@ -739,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(); @@ -752,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); @@ -764,34 +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); + if ($invoice['status'] == Facture::STATUS_CLOSED) { + $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'=>''), @@ -799,9 +775,7 @@ function updateInvoice($authentication, $invoice) 'ref'=>$object->ref, 'ref_ext'=>$object->ref_ext ); - } - elseif ($objectfound) - { + } elseif ($objectfound) { $db->rollback(); $error++; $errorcode = 'KO'; @@ -813,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 62e8dc99d72..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 (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 (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' ); /** @@ -354,51 +361,49 @@ $server->register( */ function getOrder($authentication, $id = '', $ref = '', $ref_ext = '') { - global $db, $conf, $langs; + global $db, $conf; 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(); $errorcode = ''; $errorlabel = ''; $error = 0; + $socid = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); - if ($fuser->societe_id) $socid = $fuser->societe_id; + 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 = $order->socid.'User does not have permission for this request'; + $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, @@ -472,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)); } @@ -504,11 +506,13 @@ function getOrder($authentication, $id = '', $ref = '', $ref_ext = '') */ function getOrdersForThirdParty($authentication, $idthirdparty) { - global $db, $conf, $langs; + global $db, $conf; 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(); @@ -516,32 +520,32 @@ function getOrdersForThirdParty($authentication, $idthirdparty) $error = 0; $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); - if ($fuser->societe_id) $socid = $fuser->societe_id; + 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); @@ -549,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, @@ -637,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)); } @@ -670,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(); @@ -682,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']; @@ -705,10 +705,8 @@ function createOrder($authentication, $order) // fetch optionals attributes and labels $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($elementtype, true); - if (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]; } @@ -716,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); @@ -743,10 +743,8 @@ function createOrder($authentication, $order) // fetch optionals attributes and labels $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($elementtype, true); - if (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]; } @@ -760,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++; @@ -792,8 +785,7 @@ function createOrder($authentication, $order) } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -813,52 +805,47 @@ function validOrder($authentication, $id = '', $id_warehouse = 0) { global $db, $conf, $langs; - dol_syslog("Function: validOrder login=".$authentication['login']." id=".$id." ref=".$ref." ref_ext=".$ref_ext); + dol_syslog("Function: validOrder login=".$authentication['login']." id=".$id." id_warehouse=".$id_warehouse); // Init and check authentication $objectresp = array(); $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, $ref, $ref_ext); + $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'; @@ -866,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'=>'')); } @@ -889,11 +874,11 @@ function updateOrder($authentication, $order) { global $db, $conf, $langs; - $now = dol_now(); - 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(); @@ -905,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'; @@ -919,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'; @@ -948,13 +938,10 @@ function updateOrder($authentication, $order) // fetch optionals attributes and labels $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($elementtype, true); - if (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'); } } @@ -965,8 +952,7 @@ function updateOrder($authentication, $order) } } - if ((!$error) && ($objectfound)) - { + if ((!$error) && ($objectfound)) { $db->commit(); $objectresp = array( 'result'=>array('result_code'=>'OK', 'result_label'=>''), @@ -974,9 +960,7 @@ function updateOrder($authentication, $order) 'ref'=>$object->ref, 'ref_ext'=>$object->ref_ext ); - } - elseif ($objectfound) - { + } elseif ($objectfound) { $db->rollback(); $error++; $errorcode = 'KO'; @@ -988,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 71ee78d3c4d..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>'; @@ -145,11 +146,13 @@ $server->register( */ function getVersions($authentication) { - global $db, $conf, $langs; + global $conf; 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)); } @@ -188,11 +189,13 @@ function getVersions($authentication) */ function getDocument($authentication, $modulepart, $file, $refname = '') { - global $db, $conf, $langs, $mysoc; + global $db, $conf; 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->societe_id) $socid = $fuser->societe_id; + 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->societe_id > 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->societe_id != $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,14 +277,9 @@ function getDocument($authentication, $modulepart, $file, $refname = '') clearstatcache(); - if (!$error) - { - if (file_exists($original_file)) - { - dol_syslog("Function: getDocument $original_file $filename content-type=$type"); - - $file = $fileparams['fullname']; - $filename = basename($file); + if (!$error) { + if (file_exists($original_file)) { + dol_syslog("Function: getDocument $original_file content-type=$type"); $f = fopen($original_file, 'r'); $content_file = fread($f, filesize($original_file)); @@ -303,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 = ''; @@ -313,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 8a9b19d76d6..6bf43bf78f6 100644 --- a/htdocs/webservices/server_payment.php +++ b/htdocs/webservices/server_payment.php @@ -42,9 +42,9 @@ 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>'; print $langs->trans("ToActivateModule"); @@ -139,14 +139,16 @@ $server->register( */ function createPayment($authentication, $payment) { - global $db, $conf, $langs; + global $db, $conf; $now = dol_now(); 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(); @@ -162,10 +164,9 @@ function createPayment($authentication, $payment) $errorlabel = "You must specify the amount and the third party's ID."; } - if (!$error) - { + if (!$error) { $soc = new Societe($db); - $res = $soc->fetch($payment['thirdparty_id']); + $soc->fetch($payment['thirdparty_id']); $new_payment = new Paiement($db); $new_payment->amount = doubleval($payment['amount']); @@ -187,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'; @@ -206,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 f723dcfd054..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 (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)) $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 (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; @@ -479,83 +483,88 @@ function getProductOrService($authentication, $id = '', $ref = '', $ref_ext = '' */ function createProductOrService($authentication, $product) { - global $db, $conf, $langs; + global $db, $conf; $now = dol_now(); 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 ($product['price_net'] > 0) $product['price_base_type'] = 'HT'; - if ($product['price'] > 0) $product['price_base_type'] = 'TTC'; + 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 ($product['price_net'] > 0 && $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 ($product['barcode'] && !$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); $newobject->ref = $product['ref']; - $newobject->ref_ext = $product['ref_ext']; - $newobject->type = $product['type']; - $newobject->label = $product['label']; - $newobject->description = $product['description']; - $newobject->note_public = $product['note_public']; - $newobject->note_private = $product['note_private']; - $newobject->status = $product['status_tosell']; - $newobject->status_buy = $product['status_tobuy']; - $newobject->price = $product['price_net']; - $newobject->price_ttc = $product['price']; - $newobject->tva_tx = $product['vat_rate']; + $newobject->ref_ext = empty($product['ref_ext']) ? '' : $product['ref_ext']; + $newobject->type = empty($product['type']) ? 0 : $product['type']; + $newobject->label = empty($product['label']) ? '' : $product['label']; + $newobject->description = empty($product['description']) ? '' : $product['description']; + $newobject->note_public = empty($product['note_public']) ? '' : $product['note_public']; + $newobject->note_private = empty($product['note_private']) ? '' :$product['note_private']; + $newobject->status = empty($product['status_tosell']) ? 0 : $product['status_tosell']; + $newobject->status_buy = empty($product['status_tobuy']) ? 0 : $product['status_tobuy']; + $newobject->price = isset($product['price_net']) ? $product['price_net'] : 0; + $newobject->price_ttc = isset($product['price']) ? $product['price'] : 0; + $newobject->tva_tx = empty($product['vat_rate']) ? 0 : $product['vat_rate']; $newobject->price_base_type = $product['price_base_type']; $newobject->date_creation = $now; - if ($product['barcode']) - { + if (!empty($product['barcode'])) { $newobject->barcode = $product['barcode']; $newobject->barcode_type = $product['barcode_type']; } - $newobject->stock_reel = $product['stock_real']; - $newobject->pmp = $product['pmp']; - $newobject->seuil_stock_alert = $product['stock_alert']; + $newobject->stock_reel = isset($product['stock_real']) ? $product['stock_real'] : null; + $newobject->pmp = isset($product['pmp']) ? $product['pmp'] : null; + $newobject->seuil_stock_alerte = isset($product['stock_alert']) ? $product['stock_alert'] : null; - $newobject->country_id = $product['country_id']; - if ($product['country_code']) $newobject->country_id = getCountry($product['country_code'], 3); - $newobject->customcode = $product['customcode']; + $newobject->country_id = isset($product['country_id']) ? $product['country_id'] : 0; + if (!empty($product['country_code'])) { + $newobject->country_id = getCountry($product['country_code'], 3); + } + $newobject->customcode = isset($product['customcode']) ? $product['customcode'] : ''; - $newobject->canvas = $product['canvas']; + $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 (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)); } @@ -650,43 +645,51 @@ function createProductOrService($authentication, $product) */ function updateProductOrService($authentication, $product) { - global $db, $conf, $langs; + global $db, $conf; $now = dol_now(); 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,30 +702,29 @@ 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']; } - $newobject->stock_reel = $product['stock_real']; - $newobject->pmp = $product['pmp']; - $newobject->seuil_stock_alert = $product['stock_alert']; + $newobject->stock_reel = isset($product['stock_real']) ? $product['stock_real'] : null; + $newobject->pmp = isset($product['pmp']) ? $product['pmp'] : null; + $newobject->seuil_stock_alerte = isset($product['stock_alert']) ? $product['stock_alert'] : null; - $newobject->country_id = $product['country_id']; - if ($product['country_code']) $newobject->country_id = getCountry($product['country_code'], 3); - $newobject->customcode = $product['customcode']; + $newobject->country_id = isset($product['country_id']) ? $product['country_id'] : 0; + if (!empty($product['country_code'])) { + $newobject->country_id = getCountry($product['country_code'], 3); + } + $newobject->customcode = isset($product['customcode']) ? $product['customcode'] : ''; - $newobject->canvas = $product['canvas']; + $newobject->canvas = isset($product['canvas']) ? $product['canvas'] : ''; $elementtype = 'product'; $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($elementtype, true); - if (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)); } @@ -824,15 +808,18 @@ function updateProductOrService($authentication, $product) */ function deleteProductOrService($authentication, $listofidstring) { - global $db, $conf, $langs; + global $db, $conf; 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 $key => $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; @@ -917,53 +893,56 @@ function deleteProductOrService($authentication, $listofidstring) */ function getListOfProductsOrServices($authentication, $filterproduct) { - global $db, $conf, $langs; + global $db, $conf; 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 (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 9d4c93c9ce9..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 => $_) -{ +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 (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 (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)); } @@ -338,11 +331,13 @@ function createProject($authentication, $project) */ function getProject($authentication, $id = '', $ref = '') { - global $db, $conf, $langs; + global $db, $conf; 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 (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 be90b60c36f..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>'; @@ -225,11 +226,13 @@ $server->register( */ function getSupplierInvoice($authentication, $id = '', $ref = '', $ref_ext = '') { - global $db, $conf, $langs; + global $db, $conf; 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)); } @@ -329,30 +324,30 @@ function getSupplierInvoice($authentication, $id = '', $ref = '', $ref_ext = '') * @param array $authentication Array of authentication information * @param int $idthirdparty Id thirdparty * @return array Array result - * */ function getSupplierInvoicesForThirdParty($authentication, $idthirdparty) { - global $db, $conf, $langs; + global $db, $conf; 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(); $errorcode = ''; $errorlabel = ''; $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 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 3a1e911f510..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 (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' ); @@ -290,47 +294,48 @@ $server->register( */ function getThirdParty($authentication, $id = '', $ref = '', $ref_ext = '') { - global $db, $conf, $langs; + global $db, $conf; 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(); - $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."; + $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) - { + 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, 'supplier_code' => $thirdparty->code_fournisseur, 'customer_code_accountancy' => $thirdparty->code_compta, 'supplier_code_accountancy' => $thirdparty->code_compta_fournisseur, - 'fk_user_author' => $thirdparty->fk_user_author, + 'user_creation' => $thirdparty->user_creation, 'date_creation' => dol_print_date($thirdparty->date_creation, 'dayhourrfc'), + 'user_modification' => $thirdparty->user_modification, 'date_modification' => dol_print_date($thirdparty->date_modification, 'dayhourrfc'), 'address' => $thirdparty->address, 'zip' => $thirdparty->zip, @@ -350,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, @@ -365,11 +370,11 @@ function getThirdParty($authentication, $id = '', $ref = '', $ref_ext = '') //Get extrafield values $thirdparty->fetch_optionals(); - if (is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) - { - foreach ($extrafields->attributes[$elementtype]['label'] as $key=>$label) - { - $thirdparty_result_fields = array_merge($thirdparty_result_fields, array('options_'.$key => $thirdparty->array_options['options_'.$key])); + 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])); + } } } @@ -377,20 +382,20 @@ function getThirdParty($authentication, $id = '', $ref = '', $ref_ext = '') $objectresp = array( 'result'=>array('result_code'=>'OK', 'result_label'=>''), 'thirdparty'=>$thirdparty_result_fields); - } - else { + } elseif ($result == -2) { + $error++; + $errorcode = 'DUPLICATE_FOUND'; $errorlabel = 'Object found several times for id='.$id.' or ref='.$ref.' or ref_ext='.$ref_ext; + } 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)); } @@ -408,13 +413,15 @@ function getThirdParty($authentication, $id = '', $ref = '', $ref_ext = '') */ function createThirdParty($authentication, $thirdparty) { - global $db, $conf, $langs; + global $db, $conf; $now = dol_now(); 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(); @@ -422,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); @@ -451,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); @@ -468,12 +475,12 @@ function createThirdParty($authentication, $thirdparty) $newobject->capital = $thirdparty['capital']; - $newobject->barcode = $thirdparty['barcode']; - $newobject->tva_assuj = $thirdparty['vat_used']; - $newobject->tva_intra = $thirdparty['vat_number']; + $newobject->barcode = empty($thirdparty['barcode']) ? '' : $thirdparty['barcode']; + $newobject->tva_assuj = empty($thirdparty['vat_used']) ? 0 : $thirdparty['vat_used']; + $newobject->tva_intra = empty($thirdparty['vat_number']) ? '' : $thirdparty['vat_number']; - $newobject->canvas = $thirdparty['canvas']; - $newobject->particulier = $thirdparty['individual']; + $newobject->canvas = empty($thirdparty['canvas']) ? '' : $thirdparty['canvas']; + $newobject->particulier = empty($thirdparty['individual']) ? 0 : $thirdparty['individual']; $elementtype = 'societe'; @@ -481,12 +488,12 @@ function createThirdParty($authentication, $thirdparty) // fetch optionals attributes and labels $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($elementtype, true); - if (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] = $thirdparty[$key]; + if (isset($thirdparty[$key])) { + $newobject->array_options[$key] = $thirdparty[$key]; + } } } @@ -498,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 ($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'; @@ -521,8 +526,7 @@ function createThirdParty($authentication, $thirdparty) } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -538,13 +542,15 @@ function createThirdParty($authentication, $thirdparty) */ function updateThirdParty($authentication, $thirdparty) { - global $db, $conf, $langs; + global $db, $conf; $now = dol_now(); 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(); @@ -556,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'; @@ -586,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); @@ -615,12 +622,12 @@ function updateThirdParty($authentication, $thirdparty) // fetch optionals attributes and labels $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($elementtype, true); - if (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] = $thirdparty[$key]; + if (isset($thirdparty[$key])) { + $object->array_options[$key] = $thirdparty[$key]; + } } } @@ -632,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'; @@ -653,8 +657,7 @@ function updateThirdParty($authentication, $thirdparty) } } - if ($error) - { + if ($error) { $objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)); } @@ -672,13 +675,13 @@ function updateThirdParty($authentication, $thirdparty) */ function getListOfThirdParties($authentication, $filterthirdparty) { - global $db, $conf, $langs; - - $now = dol_now(); + global $db, $conf; 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(); @@ -689,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); @@ -713,21 +722,19 @@ 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 (is_array($extrafields->attributes[$elementtype]['label']) && count($extrafields->attributes[$elementtype]['label'])) - { - foreach ($extrafields->attributes[$elementtype]['label'] as $key=>$label) - { - $extrafieldsOptions['options_'.$key] = $obj->{$key}; + 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}; + } } } @@ -746,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 @@ -782,11 +786,13 @@ function getListOfThirdParties($authentication, $filterthirdparty) */ function deleteThirdParty($authentication, $id = '', $ref = '', $ref_ext = '') { - global $db, $conf, $langs; + global $db, $conf; 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(); @@ -794,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 6f7ed5c10aa..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 (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( @@ -308,11 +312,13 @@ $server->register( */ function getUser($authentication, $id, $ref = '', $ref_ext = '') { - global $db, $conf, $langs; + global $db, $conf; 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)); } @@ -399,13 +398,13 @@ function getUser($authentication, $id, $ref = '', $ref_ext = '') */ function getListOfGroups($authentication) { - global $db, $conf, $langs; - - $now = dol_now(); + global $db, $conf; 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(); @@ -415,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,9 +468,11 @@ function createUserFromThirdparty($authentication, $thirdpartywithuser) { global $db, $conf, $langs; - dol_syslog("Function: createUserFromThirdparty login=".$authentication['login']." id=".$id." ref=".$ref." ref_ext=".$ref_ext); + 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 = ''; @@ -487,24 +480,23 @@ function createUserFromThirdparty($authentication, $thirdpartywithuser) $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); - if ($fuser->societe_id) $socid = $fuser->societe_id; + 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 - $sql = "SELECT s.rowid as societe_id FROM ".MAIN_DB_PREFIX."societe as s"; + $sql = "SELECT s.rowid as socid FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON sp.fk_soc = s.rowid"; $sql .= " WHERE s.entity=".$conf->entity; $sql .= " AND s.email='".$db->escape($thirdpartywithuser['email'])."'"; @@ -512,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 @@ -543,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; } @@ -569,8 +556,7 @@ function createUserFromThirdparty($authentication, $thirdpartywithuser) $socid_return = $thirdparty->create($fuser); - if ($socid_return > 0) - { + if ($socid_return > 0) { $thirdparty->fetch($socid_return); /* @@ -599,10 +585,8 @@ function createUserFromThirdparty($authentication, $thirdpartywithuser) // fetch optionals attributes and labels $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($elementtype, true); - if (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]; @@ -611,8 +595,7 @@ function createUserFromThirdparty($authentication, $thirdpartywithuser) $contact_id = $contact->create($fuser); - if ($contact_id > 0) - { + if ($contact_id > 0) { /* * User creation * @@ -620,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; } @@ -644,7 +625,7 @@ function createUserFromThirdparty($authentication, $thirdpartywithuser) } } else { $error++; - $errors = ($thirdparty->error ? array($thirdparty->error) : $thirdparty->errors); + $errorcode = join(', ', ($thirdparty->error ? array($thirdparty->error) : $thirdparty->errors)); } } } else { @@ -658,11 +639,10 @@ function createUserFromThirdparty($authentication, $thirdpartywithuser) } } - if ($error) - { + if ($error) { $db->rollback(); $objectresp = array( - 'result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel) + 'result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel) ); } @@ -680,11 +660,13 @@ function createUserFromThirdparty($authentication, $thirdpartywithuser) function setUserPassword($authentication, $shortuser) { - global $db, $conf, $langs; + global $db, $conf; - dol_syslog("Function: setUserPassword login=".$authentication['login']." id=".$id." ref=".$ref." ref_ext=".$ref_ext); + 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 = ''; @@ -692,51 +674,43 @@ function setUserPassword($authentication, $shortuser) $fuser = check_authentication($authentication, $error, $errorcode, $errorlabel); - if ($fuser->societe_id) $socid = $fuser->societe_id; + 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' => ''), - 'groups'=>$arraygroups ); - } - 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 42b39e7e902..6e3f0113432 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -184,6 +184,11 @@ class Website extends CommonObject $tmparray = explode(',', $this->otherlang); if (is_array($tmparray)) { foreach ($tmparray 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,' + if (empty(trim($val))) { + unset($tmparray[$key]); + continue; + } $tmparray[$key] = preg_replace('/[_-].*$/', '', trim($val)); // en_US or en-US -> en } $this->otherlang = join(',', $tmparray); @@ -244,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)); } } @@ -494,6 +501,11 @@ class Website extends CommonObject $tmparray = explode(',', $this->otherlang); if (is_array($tmparray)) { foreach ($tmparray 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,' + if (empty(trim($val))) { + unset($tmparray[$key]); + continue; + } $tmparray[$key] = preg_replace('/[_-].*$/', '', trim($val)); // en_US or en-US -> en } $this->otherlang = join(',', $tmparray); @@ -520,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(); @@ -540,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)); } } @@ -593,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) { @@ -603,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); @@ -645,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; } @@ -678,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'; @@ -690,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); @@ -718,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); @@ -728,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'; @@ -821,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; @@ -854,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'); @@ -865,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); } @@ -909,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 ''; } @@ -928,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 ''; } @@ -987,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 ''; } @@ -998,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; } @@ -1019,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 : ''); @@ -1081,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"; @@ -1090,9 +1091,16 @@ class Website extends CommonObject } } + $line .= "\n-- For Dolibarr v14+ --\n"; + $line .= "UPDATE llx_website SET fk_default_lang = '".$this->fk_default_lang."' WHERE rowid = __WEBSITE_ID__;\n"; + $line .= "UPDATE llx_website SET otherlang = '".$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.'/.'; @@ -1102,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 ''; @@ -1127,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; } @@ -1137,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; } @@ -1172,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++; } @@ -1190,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++; } @@ -1208,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]); @@ -1237,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) { @@ -1274,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; } @@ -1298,15 +1290,14 @@ class Website extends CommonObject $error = 0; $object = $this; - if (empty($object->ref)) - { - $this->error = 'Function importWebSite called on object not loaded (object->ref is empty)'; + 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) { @@ -1316,6 +1307,7 @@ class Website extends CommonObject $num = $this->db->num_rows($resql); + // Loop on each container/page $i = 0; while ($i < $num) { $obj = $this->db->fetch_object($resql); @@ -1333,13 +1325,15 @@ class Website extends CommonObject $error++; } - // Regenerate alternative aliases pages - if (is_array($aliasesarray)) - { - foreach ($aliasesarray as $aliasshortcuttocreate) - { - if (trim($aliasshortcuttocreate)) - { + // Add main alias to list of alternative aliases + if (!empty($objectpagestatic->pageurl) && !in_array($objectpagestatic->pageurl, $aliasesarray)) { + $aliasesarray[] = $objectpagestatic->pageurl; + } + + // Regenerate all aliases pages (pages with a natural name) + 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) { @@ -1383,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', @@ -1393,7 +1389,7 @@ class Website extends CommonObject 'bn'=>'bn_DB', 'bs'=>'bs_BA', 'ca'=>'ca_ES', - 'zh'=>'zh_TW', + 'zh'=>'zh_CN', 'cs'=>'cs_CZ', 'da'=>'da_DK', 'et'=>'et_EE', @@ -1416,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 + } } } @@ -1471,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; @@ -1501,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]); @@ -1510,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 30961013806..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; /** @@ -161,7 +161,7 @@ class WebsitePage extends CommonObject //'status' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'index'=>true, 'position'=>1000), 'fk_website' =>array('type'=>'integer', 'label'=>'WebsiteId', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>40, 'searchall'=>0, 'foreignkey'=>'websitepage.rowid'), 'fk_page' =>array('type'=>'integer', 'label'=>'ParentPageId', 'enabled'=>1, 'visible'=>1, 'notnull'=>-1, 'position'=>45, 'searchall'=>0, 'foreignkey'=>'website.rowid'), - 'allowed_in_frames' =>array('type'=>'integer', 'label'=>'AllowedInFrames', 'enabled'=>1, 'visible'=>-1, 'position'=>48, 'searchall'=>0), + 'allowed_in_frames' =>array('type'=>'integer', 'label'=>'AllowedInFrames', 'enabled'=>1, 'visible'=>-1, 'position'=>48, 'searchall'=>0, 'default'=>0), 'htmlheader' =>array('type'=>'text', 'label'=>'HtmlHeader', 'enabled'=>1, 'visible'=>0, 'position'=>50, 'searchall'=>0), 'content' =>array('type'=>'mediumtext', 'label'=>'Content', 'enabled'=>1, 'visible'=>0, 'position'=>51, 'searchall'=>0), 'grabbed_from' =>array('type'=>'varchar(255)', 'label'=>'GrabbedFrom', 'enabled'=>1, 'visible'=>1, 'index'=>1, 'position'=>400, 'comment'=>'URL page content was grabbed from'), @@ -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,8 +407,8 @@ 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; - // Manage filter + $sql .= ' WHERE t.fk_website = '.((int) $websiteid); + // Manage filter (same than into countAll) $sqlwhere = array(); if (count($filter) > 0) { foreach ($filter as $key => $value) { @@ -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,15 +509,30 @@ 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; - // Manage filter + $sql .= ' WHERE t.fk_website = '.((int) $websiteid); + // Manage filter (same than into fetchAll) $sqlwhere = array(); if (count($filter) > 0) { foreach ($filter as $key => $value) { - if ($key == 't.rowid' || $key == 't.fk_website') { - $sqlwhere[] = $key.'='.$value; + if ($key == 't.rowid' || $key == 't.fk_website' || $key == 'status') { + $sqlwhere[] = $key.' = '.$value; + } elseif ($key == 'type_container') { + $sqlwhere[] = $key." = '".$this->db->escape($value)."'"; } elseif ($key == 'lang' || $key == 't.lang') { - $sqlwhere[] = $key." = '".$this->db->escape(substr($value, 0, 2))."'"; + $listoflang = array(); + $foundnull = 0; + foreach (explode(',', $value) as $tmpvalue) { + if ($tmpvalue == 'null') { + $foundnull++; + continue; + } + $listoflang[] = "'".$this->db->escape(substr(str_replace("'", '', $tmpvalue), 0, 2))."'"; + } + $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).'%\''; } @@ -548,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 @@ -582,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; @@ -598,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; @@ -683,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 @@ -742,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.'>'; @@ -761,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; @@ -792,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'); @@ -803,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 1b477a0272b..f992a4ba0d0 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,33 +568,30 @@ 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,' + if (empty(trim($val))) continue; $arrayotherlang[$key] = substr(trim($val), 0, 2); // Kept short language code only } @@ -562,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))); @@ -642,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']); @@ -679,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]) : ''); } @@ -749,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; @@ -776,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++; @@ -795,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; @@ -817,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; @@ -844,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'])); @@ -885,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 { @@ -929,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'); @@ -959,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'; @@ -967,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'); @@ -1008,8 +1052,7 @@ if ($action == 'addcontainer') } } - if (!$error) - { + if (!$error) { $pageid = $objectpage->create($user); if ($pageid <= 0) { $error++; @@ -1022,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'); } @@ -1034,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 { @@ -1044,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. @@ -1095,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); } @@ -1162,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(); @@ -1171,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); } @@ -1221,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); } @@ -1250,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++; @@ -1276,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(); @@ -1302,31 +1315,27 @@ 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,' + if (empty(trim($val))) continue; $arrayotherlang[$key] = substr(trim($val), 0, 2); // Kept short language code only } @@ -1336,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'; @@ -1345,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); @@ -1354,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'); } @@ -1365,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'); } @@ -1414,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'); } @@ -1441,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'); } @@ -1452,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'); } @@ -1480,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'; } } @@ -1568,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'; @@ -1591,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); @@ -1612,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'); @@ -1621,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')); @@ -1703,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'); @@ -1729,70 +1753,93 @@ 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'; dol_mkdir($pathofwebsite); - // 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); + + // Delete also pages into language subdirectories + if (empty($objectpage->lang) || !in_array($objectpage->lang, explode(',', $object->otherlang))) { + $dirname = dirname($fileoldalias); + $filename = basename($fileoldalias); + $sublangs = explode(',', $object->otherlang); + foreach ($sublangs as $sublang) { + // Under certain conditions $sublang can be an empty string + // ($object->otherlang with empty string or with string like this 'en,,sv') + // if is the case we try to re-delete the main alias file. Avoid it. + if (empty(trim($sublang))) continue; + $fileoldaliassub = $dirname.'/'.$sublang.'/'.$filename; + dol_delete_file($fileoldaliassub); + } + } } // 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'); + + // Delete also pages into language subdirectories + if (empty($objectpage->lang) || !in_array($objectpage->lang, explode(',', $object->otherlang))) { + $dirname = dirname($pathofwebsite.'/'.trim($tmpaliasalt).'.php'); + $filename = basename($pathofwebsite.'/'.trim($tmpaliasalt).'.php'); + $sublangs = explode(',', $object->otherlang); + foreach ($sublangs as $sublang) { + // Under certain conditions $ sublang can be an empty string + // ($object->otherlang with empty string or with string like this 'en,,sv') + // if is the case we try to re-delete the main alias file. Avoid it. + if (empty(trim($sublang))) continue; + $fileoldaliassub = $dirname.'/'.$sublang.'/'.$filename; + dol_delete_file($fileoldaliassub); + } + } } } } - // Save page alias + // 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'); + } } } } @@ -1801,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; @@ -1856,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'); @@ -1874,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'; @@ -1912,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; } @@ -1924,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); @@ -1974,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'; + } } } @@ -2007,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'; @@ -2025,32 +2054,43 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf dol_mkdir($pathofwebsite); - // 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 generate the alias.php page - if (!empty($fileoldalias)) + // Now delete the old alias.php page if we removed one + /*if (!empty($fileoldalias)) { dol_syslog("We regenerate alias page new name=".$filealias.", old name=".$fileoldalias); dol_delete_file($fileoldalias); - } + + // Delete also pages into language subdirectories + if (empty($objectpage->lang) || !in_array($objectpage->lang, explode(',', $object->otherlang))) { + $dirname = dirname($fileoldalias); + $filename = basename($fileoldalias); + $sublangs = explode(',', $object->otherlang); + foreach ($sublangs as $sublang) { + $fileoldaliassub = $dirname.'/'.$sublang.'/'.$filename; + dol_delete_file($fileoldaliassub); + } + } + }*/ // 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; @@ -2059,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(); @@ -2075,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'); @@ -2089,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"); @@ -2103,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 { @@ -2125,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); @@ -2213,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'; +} /* @@ -2225,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( @@ -2241,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"; @@ -2254,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">'; } @@ -2311,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); @@ -2360,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).'"'; @@ -2406,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"); @@ -2419,31 +2639,35 @@ 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">'; print '<input type="submit" class="buttonDelete bordertransp" name="deletesite" value="'.$langs->trans("Delete").'"'.($atleastonepage ? ' disabled="disabled"' : '').'>'; + // Regenerate all pages + print '<a href="'.$_SERVER["PHP_SEFL"].'?action=regeneratesite&website='.$website->ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("RegenerateWebsiteContent")).'"><span class="fa fa-cogs"><span></a>'; + + 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 '<a href="'.$_SERVER["PHP_SEFL"].'?action=regeneratesite&website='.$website->ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("RegenerateWebsiteContent")).'"><span class="fa fa-cogs"><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); @@ -2462,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; @@ -2472,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); @@ -2524,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>'; @@ -2538,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 -->'; @@ -2555,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'); @@ -2585,8 +2807,7 @@ if (!GETPOST('hide_websitemenu')) } print $out; - } - else { + } else { print $langs->trans("New"); } @@ -2597,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') { @@ -2666,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 @@ -2678,6 +2901,7 @@ if (!GETPOST('hide_websitemenu')) $onlylang[$website->lang] = $website->lang.' ('.$langs->trans("Default").')'; } foreach (explode(',', $website->otherlang) as $langkey) { + if (empty(trim($langkey))) continue; $onlylang[$langkey] = $langkey; } $textifempty = $langs->trans("Default"); @@ -2698,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"; @@ -2763,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>'; @@ -2815,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).'">'; @@ -2851,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'); } @@ -2882,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() { @@ -2944,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.=""; } @@ -3107,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"); @@ -3210,8 +3420,7 @@ if ($action == 'editcss') } -if ($action == 'createsite') -{ +if ($action == 'createsite') { print '<div class="fiche">'; print '<br>'; @@ -3221,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">'; @@ -3234,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, ...'); @@ -3282,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").'">'; @@ -3302,8 +3520,7 @@ if ($action == 'createsite') print '<br>'; } -if ($action == 'importsite') -{ +if ($action == 'importsite') { print '<div class="fiche">'; print '<br>'; @@ -3333,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>'; @@ -3344,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.'">'; @@ -3389,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>'; @@ -3427,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; @@ -3437,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'); @@ -3466,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>'; @@ -3521,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) { @@ -3547,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)); @@ -3608,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')) { @@ -3628,11 +3867,11 @@ if ($action == 'editmeta' || $action == 'createcontainer') // Edit properties of print '<tr><td class="toptd">'.$form->editfieldkey('Categories', 'categories', '', $objectpage, 0).'</td><td>'; print img_picto('', 'category', 'class="paddingright"'); - print $form->multiselectarray('categories', $cate_arbo, (GETPOSTISSET('categories') ? GETPOST('categories', 'array') : $arrayselected), null, null, 'quatrevingtpercent widthcentpercentminusx'); + print $form->multiselectarray('categories', $cate_arbo, (GETPOSTISSET('categories') ? GETPOST('categories', 'array') : $arrayselected), null, null, 'minwidth200 widthcentpercentminusxx'); print "</td></tr>"; } - if (!empty($conf->global->WEBSITE_PAGE_SHOW_INTERNAL_LINKS_TO_OBJECT)) { + if (!empty($conf->global->WEBSITE_PAGE_SHOW_INTERNAL_LINKS_TO_OBJECT)) { // TODO Replace this with link into element_element ? print '<tr><td class="titlefieldcreate">'; print 'ObjectClass'; print '</td><td>'; @@ -3651,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 { @@ -3673,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); } @@ -3703,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").'">'; @@ -3713,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; @@ -3759,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 = ''; @@ -3789,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'; @@ -3806,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); @@ -3821,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">'; @@ -3884,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"); @@ -3904,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']); @@ -3922,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">'; @@ -3953,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">'; @@ -3966,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>'; @@ -3977,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 @@ -4000,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)) { @@ -4026,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 @@ -4041,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">'; @@ -4068,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>'; @@ -4126,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>'; @@ -4164,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>'; @@ -4178,8 +4448,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = print '</table>'; print '</div>'; print '<br>'; - } - else { + } else { print '<div class="warning">'.$listofpages['message'].'</div>'; } @@ -4189,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 @@ -4242,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); @@ -4256,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 @@ -4277,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); @@ -4289,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(); @@ -4298,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"; @@ -4324,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 59432aea44b..00000000000 --- a/htdocs/zapier/hook_list.php +++ /dev/null @@ -1,592 +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 -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], 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key] < 0) ? 0 : 1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key])); - } -} -$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 5c98dc2913b..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__); @@ -74,29 +76,36 @@ $duration_value2 = isset($argv[4]) ? $argv[4] : 'none'; $error = 0; print $script_file." launched with mode ".$mode." default lang=".$langs->defaultlang.(is_numeric($duration_value) ? " delay=".$duration_value : "").(is_numeric($duration_value2) ? " after=".$duration_value2 : "")."\n"; -if ($mode != 'confirm') +if ($mode != 'confirm') { $conf->global->MAIN_DISABLE_ALL_MAILS = 1; +} $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; @@ -115,6 +124,7 @@ if ($resql) { print "We found ".$num." couples (services to expire-".$targettype.") qualified\n"; dol_syslog("We found ".$num." couples (services to expire-".$targettype.") qualified"); $message = ''; + $oldtarget = ''; if ($num) { while ($i < $num) { @@ -124,12 +134,17 @@ if ($resql) { // Check if this record is a break after previous one $startbreak = false; - if ($newemail != $oldemail || $oldemail == 'none') + if ($newemail != $oldemail || $oldemail == 'none') { $startbreak = true; - if ($obj->sid && $obj->sid != $oldsid) - $startbreak = true; - if ($obj->cid && $obj->cid != $oldcid) + } + if ($obj->sid && $obj->sid != $oldsid) { $startbreak = true; + } + if ($targettype == 'contacts') { + if ($obj->cid && $obj->cid != $oldcid) { + $startbreak = true; + } + } if ($startbreak) { // Break onto sales representative (new email or cid) @@ -138,20 +153,23 @@ 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; $oldsid = $obj->sid; - $oldcid = $obj->cid; - $oldlang = $obj->lang; + if ($targettype == 'contacts') { + $oldcid = $obj->cid; + } + $oldlang = $obj->default_lang; $oldtarget = (empty($obj->cfirstname) && empty($obj->clastname)) ? $obj->name : ($obj->clastname." ".$obj->cfirstname); $message = ''; $total = 0; $foundtoprocess = 0; - $target = (empty($obj->cfirstname) && empty($obj->clastname)) ? $obj->name : ($obj->clastname." ".$obj->cfirstname); // if (empty($newemail)) print "Warning: Customer ".$target." has no email. Notice disabled.\n"; } @@ -167,10 +185,12 @@ if ($resql) { dol_syslog("email_expire_services_to_customers.php: ".$newemail." ".$message); $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.", ".($obj->cid ? "contact id ".$obj->cid." ".$obj->clastname." ".$obj->cfirstname.", " : "")."email ".$newemail.", lang ".$outputlangs->defaultlang.": "; - if (dol_strlen($newemail)) + 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)) { print "qualified."; - else print "disqualified (no email)."; + } else { + print "disqualified (no email)."; + } print "\n"; unset($outputlangs); @@ -182,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"; + } } } } @@ -222,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); @@ -231,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; @@ -246,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)) { @@ -262,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 eec151376ee..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__); @@ -70,16 +72,18 @@ $duration_value = isset($argv[2]) ? $argv[2] : 'none'; print $script_file." launched with mode ".$mode." default lang=".$langs->defaultlang.(is_numeric($duration_value) ? " delay=".$duration_value : "")."\n"; -if ($mode != 'confirm') +if ($mode != 'confirm') { $conf->global->MAIN_DISABLE_ALL_MAILS = 1; +} $sql = "SELECT DISTINCT c.ref, c.fk_soc, cd.date_fin_validite, cd.total_ttc, cd.description as description, p.label as plabel, s.rowid, s.nom as name, s.email, s.default_lang,"; $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 @@ -106,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; @@ -117,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 @@ -134,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); @@ -147,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 { @@ -183,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); @@ -192,25 +201,31 @@ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldsalerepre $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_SALESREPRESENTATIVES_SUBJECT) ? $title : $conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_SALESREPRESENTATIVES_SUBJECT); $sendto = $oldemail; - $from = $conf->global->MAIN_MAIL_EMAIL_FROM; - $errorsto = $conf->global->MAIN_MAIL_ERRORS_TO; + $from = empty($conf->global->MAIN_MAIL_EMAIL_FROM) ? '' : $conf->global->MAIN_MAIL_EMAIL_FROM; + $errorsto = empty($conf->global->MAIN_MAIL_ERRORS_TO) ? '' : $conf->global->MAIN_MAIL_ERRORS_TO; $msgishtml = - 1; print "- Send email for ".$oldsalerepresentative." (".$oldemail."), total: ".$total."\n"; dol_syslog("email_expire_services_to_representatives.php: send mail to ".$oldemail); $usehtml = 0; - if (dol_textishtml($conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_SALESREPRESENTATIVES_FOOTER)) + if (!empty($conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_SALESREPRESENTATIVES_FOOTER) && dol_textishtml($conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_SALESREPRESENTATIVES_FOOTER)) { $usehtml += 1; - if (dol_textishtml($conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_SALESREPRESENTATIVES_HEADER)) + } + if (!empty($conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_SALESREPRESENTATIVES_HEADER) && dol_textishtml($conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_SALESREPRESENTATIVES_HEADER)) { $usehtml += 1; + } $allmessage = ''; if (!empty($conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_SALESREPRESENTATIVES_HEADER)) { @@ -223,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 fab2452c2b8..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; } @@ -74,12 +80,18 @@ if (empty($conf->global->MAILING_LIMIT_SENDBYCLI)) @set_time_limit(0); print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n"; -if ($conf->global->MAILING_LIMIT_SENDBYCLI == '-1') {} +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') { +} $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"; @@ -115,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; @@ -198,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)) { @@ -222,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); @@ -252,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']; @@ -332,7 +354,7 @@ if ($resql) { } if (!empty($conf->global->MAILING_DELAY)) { - sleep($conf->global->MAILING_DELAY); + usleep((float) $conf->global->MAILING_DELAY * 1000000); } } } else { @@ -360,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 bc35f0f4240..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__); @@ -62,7 +66,7 @@ $user = new User($db); @set_time_limit(0); print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n"; -if (!in_array($type, array('thirdparties', 'contacts', 'users', 'members'))) { +if (!in_array($type, array('all', 'thirdparties', 'contacts', 'users', 'members'))) { print "Bad value for parameter type.\n"; exit(-1); } @@ -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 9b59fcab6f7..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__); @@ -74,27 +76,34 @@ $duration_value2 = isset($argv[4]) ? $argv[4] : 'none'; $error = 0; print $script_file." launched with mode ".$mode." default lang=".$langs->defaultlang.(is_numeric($duration_value) ? " delay=".$duration_value : "").(is_numeric($duration_value2) ? " after=".$duration_value2 : "")."\n"; -if ($mode != 'confirm') +if ($mode != 'confirm') { $conf->global->MAIN_DISABLE_ALL_MAILS = 1; +} $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; @@ -113,6 +122,7 @@ if ($resql) { print "We found ".$num." couples (unpayed validated invoices-".$targettype.") qualified\n"; dol_syslog("We found ".$num." couples (unpayed validated invoices-".$targettype.") qualified"); $message = ''; + $oldtarget = ''; if ($num) { while ($i < $num) { @@ -122,12 +132,17 @@ if ($resql) { // Check if this record is a break after previous one $startbreak = false; - if ($newemail != $oldemail || $oldemail == 'none') + if ($newemail != $oldemail || $oldemail == 'none') { $startbreak = true; - if ($obj->sid && $obj->sid != $oldsid) - $startbreak = true; - if ($obj->cid && $obj->cid != $oldcid) + } + if ($obj->sid && $obj->sid != $oldsid) { $startbreak = true; + } + if ($targettype == 'contacts') { + if ($obj->cid && $obj->cid != $oldcid) { + $startbreak = true; + } + } if ($startbreak) { // Break onto sales representative (new email or cid) @@ -136,20 +151,23 @@ 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; $oldsid = $obj->sid; - $oldcid = $obj->cid; - $oldlang = $obj->lang; + if ($targettype == 'contacts') { + $oldcid = $obj->cid; + } + $oldlang = $obj->default_lang; $oldtarget = (empty($obj->cfirstname) && empty($obj->clastname)) ? $obj->name : ($obj->clastname." ".$obj->cfirstname); $message = ''; $total = 0; $foundtoprocess = 0; - $target = (empty($obj->cfirstname) && empty($obj->clastname)) ? $obj->name : ($obj->clastname." ".$obj->cfirstname); // if (empty($newemail)) print "Warning: Customer ".$target." has no email. Notice disabled.\n"; } @@ -165,10 +183,12 @@ if ($resql) { dol_syslog("email_unpaid_invoices_to_customers.php: ".$newemail." ".$message); $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.", ".($obj->cid ? "contact id ".$obj->cid." ".$obj->clastname." ".$obj->cfirstname.", " : "")."email ".$newemail.", lang ".$outputlangs->defaultlang.": "; - if (dol_strlen($newemail)) + 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)) { print "qualified."; - else print "disqualified (no email)."; + } else { + print "disqualified (no email)."; + } print "\n"; unset($outputlangs); @@ -180,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"; + } } } } @@ -219,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); @@ -229,18 +251,20 @@ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldtarget) $subject = (empty($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_SUBJECT) ? $newlangs->trans("ListOfYourUnpaidInvoices") : $conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_CUSTOMERS_SUBJECT); $sendto = $oldemail; - $from = $conf->global->MAIN_MAIL_EMAIL_FROM; - $errorsto = $conf->global->MAIN_MAIL_ERRORS_TO; + $from = empty($conf->global->MAIN_MAIL_EMAIL_FROM) ? '' : $conf->global->MAIN_MAIL_EMAIL_FROM; + $errorsto = empty($conf->global->MAIN_MAIL_ERRORS_TO) ? '' : $conf->global->MAIN_MAIL_ERRORS_TO; $msgishtml = - 1; print "- Send email to '".$oldtarget."' (".$oldemail."), total: ".$total."\n"; dol_syslog("email_unpaid_invoices_to_customers.php: send mail to ".$oldemail); $usehtml = 0; - if (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 (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)) { @@ -254,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 d401894363d..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__); @@ -70,8 +72,9 @@ $duration_value = isset($argv[2]) ? $argv[2] : 'none'; print $script_file." launched with mode ".$mode." default lang=".$langs->defaultlang.(is_numeric($duration_value) ? " delay=".$duration_value : "")."\n"; -if ($mode != 'confirm') +if ($mode != 'confirm') { $conf->global->MAIN_DISABLE_ALL_MAILS = 1; +} $sql = "SELECT f.ref, f.total_ttc, f.date_lim_reglement as due_date, s.nom as name, s.email, s.default_lang,"; $sql .= " u.rowid as uid, u.lastname, u.firstname, u.email, u.lang"; @@ -81,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 @@ -110,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; @@ -121,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 @@ -138,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); @@ -151,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 { @@ -186,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); @@ -196,18 +205,20 @@ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldsalerepre $subject = (empty($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_SUBJECT) ? $newlangs->trans("ListOfYourUnpaidInvoices") : $conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_SALESREPRESENTATIVES_SUBJECT); $sendto = $oldemail; - $from = $conf->global->MAIN_MAIL_EMAIL_FROM; - $errorsto = $conf->global->MAIN_MAIL_ERRORS_TO; + $from = empty($conf->global->MAIN_MAIL_EMAIL_FROM) ? '' : $conf->global->MAIN_MAIL_EMAIL_FROM; + $errorsto = empty($conf->global->MAIN_MAIL_ERRORS_TO) ? '' : $conf->global->MAIN_MAIL_ERRORS_TO; $msgishtml = - 1; print "- Send email for ".$oldsalerepresentative." (".$oldemail."), total: ".$total."\n"; dol_syslog("email_unpaid_invoices_to_representatives.php: send mail to ".$oldemail); $usehtml = 0; - if (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 (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)) { @@ -220,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 9acb13432d2..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,313 +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.'); + } - 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 2d5598f49b3..03eacd13745 100644 --- a/test/phpunit/DateLibTest.php +++ b/test/phpunit/DateLibTest.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(); @@ -69,97 +68,103 @@ class DateLibTest extends PHPUnit\Framework\TestCase $this->savlangs=$langs; $this->savdb=$db; + $langs->load("admin"); + 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; $db=$this->savdb; // With same hours - $date1=dol_mktime(0, 0, 0, 1, 1, 2012); - $date2=dol_mktime(0, 0, 0, 1, 2, 2012); + $date1=dol_mktime(0, 0, 0, 1, 1, 2012, 'gmt'); + $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 - $date1=dol_mktime(0, 0, 0, 1, 1, 2012); - $date2=dol_mktime(12, 0, 0, 1, 2, 2012); + $date1=dol_mktime(0, 0, 0, 1, 1, 2012, 'gmt'); + $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) @@ -167,277 +172,277 @@ 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); - $date2=dol_mktime(0, 0, 0, 1, 2, 2013); - $date3=dol_mktime(0, 0, 0, 1, 3, 2013); + // 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_public_holiday($date1, $date2, 'FR', 1); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(1, $result, 'NumPublicHoliday for Tuesday 1 - Wednesday 2 jan 2013 for FR'); // 1 closed days (country france) + $result=num_public_holiday($date1, $date2, 'FR', 1); + print __METHOD__." for Tuesday 1 - Wednesday 2 jan 2013 for FR result=".$result."\n"; + $this->assertEquals(1, $result, 'NumPublicHoliday for Tuesday 1 - Wednesday 2 jan 2013 for FR'); // 1 closed days (country france) - $result=num_public_holiday($date1, $date2, 'XX', 1); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(1, $result, 'NumPublicHoliday for Tuesday 1 - Wednesday 2 jan 2013 for XX'); // 1 closed days (country unknown) + $result=num_public_holiday($date1, $date2, 'XX', 1); + print __METHOD__." for Tuesday 1 - Wednesday 2 jan 2013 for XX result=".$result."\n"; + $this->assertEquals(1, $result, 'NumPublicHoliday for Tuesday 1 - Wednesday 2 jan 2013 for XX'); // 1 closed days (country unknown) - $result=num_public_holiday($date2, $date3, 'FR', 1); - print __METHOD__." result=".$result."\n"; - $this->assertEquals(0, $result, 'NumPublicHoliday for Wednesday 2 - Thursday 3 jan 2013 for FR'); // no closed days + print '----'."\n"; + $result=num_public_holiday($date2, $date3, 'FR', 1); + print __METHOD__." for Wednesday 2 - Thursday 3 jan 2013 for FR result=".$result."\n"; + $this->assertEquals(0, $result, 'NumPublicHoliday for Wednesday 2 - Thursday 3 jan 2013 for FR'); // no closed days - // Check with easter monday - $date1=dol_mktime(0, 0, 0, 4, 21, 2019); - $date2=dol_mktime(0, 0, 0, 4, 23, 2019); + // Check with easter monday + $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); - $date2=dol_mktime(0, 0, 0, 1, 6, 2013); + // 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); - $date2=dol_mktime(0, 0, 0, 1, 2, 2013); - $date3=dol_mktime(0, 0, 0, 1, 3, 2013); + // 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); - $date2=dol_mktime(0, 0, 0, 1, 6, 2013); + // 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); @@ -445,18 +450,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'; @@ -464,26 +469,26 @@ 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 - } + } } diff --git a/test/phpunit/DateLibTzFranceTest.php b/test/phpunit/DateLibTzFranceTest.php index 7e96e39030e..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') { - print "\n".__METHOD__." This PHPUnit test can be launched manually only onto a server with PHP timezone set to TZ+1 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 0f5b0bd82e3..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='excel2007new'; + $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 Excel2007new 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 0250b659e47..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; - /** - * testFactureCreate - * - * @return int - */ - public function testFactureRecCreate() - { - global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -142,63 +142,90 @@ class FactureRecTest extends PHPUnit\Framework\TestCase $localobjectinv=new Facture($this->savdb); $localobjectinv->initAsSpecimen(); - $localobjectinv->create($user); + $result = $localobjectinv->create($user); + + 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); - $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; - return $result; - } + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThan(0, $result, 'Create recurring invoice from common invoice'); + + return $result; + } + + /** + * 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; + + $localobject=new FactureRec($this->savdb); + $result = $localobject->fetch($id); + + print __METHOD__." result=".$result."\n"; + $this->assertGreaterThan(0, $result); + return $result; + } + /** + * 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'; + } - - - /** - * 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'; - } - - /** - * 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 64959e1cd4f..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,338 +47,344 @@ $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, array( 'newref','oldref','id','lines','client','thirdparty','brouillon','user_author','date_creation','date_validation','datem','date_modification', - 'ref','statut','paye','specimen','ref','actiontypecode','actionmsg2','actionmsg','mode_reglement','cond_reglement', + 'ref','statut','status','paye','specimen','ref','actiontypecode','actionmsg2','actionmsg','mode_reglement','cond_reglement', 'cond_reglement_doc', 'modelpdf', 'multicurrency_total_ht','multicurrency_total_tva', 'multicurrency_total_ttc','fk_multicurrency','multicurrency_code','multicurrency_tx', 'retained_warranty' ,'retained_warranty_date_limit', 'retained_warranty_fk_cond_reglement', 'specimen', 'situation_cycle_ref', 'situation_counter', 'situation_final', '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 ae8ea17efb6..b98237d1b29 100644 --- a/test/phpunit/FilesLibTest.php +++ b/test/phpunit/FilesLibTest.php @@ -1,6 +1,4 @@ <?php -use Sabre\VObject\Property\Boolean; - /* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com> * @@ -32,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(); @@ -77,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; @@ -175,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; @@ -197,322 +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); - /** - * testDolDirList - * - * @return void - * - * @depends testDolCompressUnCompress - * The depends says test is run only if previous is ok - */ - public function testDolDirList() - { - global $conf,$user,$langs,$db; + $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'); + } - // 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)); - } + /** + * 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)); + } - /** - * 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 7cbb6af5955..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,1416 +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"; - } - - - /** - * 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 e9bf019740c..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,71 +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 Export and compare the file exported with the $file imported. + - // TODO - // Run import on file and check the record with field "auto" are filled - // according to option - $this->assertEquals(0, 0); 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 a937bdbd9f8..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,194 +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 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); + 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 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 no be null"); - $this->assertEquals(404, $object['error']['code']); + 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 existing user 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(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() - { + /** + * 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'); - // 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__." Result 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 3eda8354113..01cd3343877 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,141 +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 1a'); + /* + $test = ''; + $result=testSqlAndScriptInject($test, 0); + $this->assertGreaterThanOrEqual(0, $result, 'Error on testSqlAndScriptInject kkk'); + */ - // Should detect XSS - $expectedresult=1; + $_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'); - $_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'); + $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'); - $test="<img src='1.jpg' onerror =javascript:alert('XSS')>"; - $result=testSqlAndScriptInject($test, 0); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa'); + // Should detect XSS + $expectedresult=1; - $test="<img src='1.jpg' onerror =javascript:alert('XSS')>"; - $result=testSqlAndScriptInject($test, 2); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa2'); + $_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=# 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 = 'javascript&colon&#x3B;alert(1)'; + $result=testSqlAndScriptInject($test, 0); + $this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject expected 1a'); - $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, 0); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa'); - $test='<SCRIPT SRC=http://xss.rocks/xss.js></SCRIPT>'; - $result=testSqlAndScriptInject($test, 0); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject ccc'); + $test="<img src='1.jpg' onerror =javascript:alert('XSS')>"; + $result=testSqlAndScriptInject($test, 2); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa2'); - $test='<IMG SRC="javascript:alert(\'XSS\');">'; - $result=testSqlAndScriptInject($test, 1); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject ddd'); + $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 """><SCRIPT>alert("XSS")</SCRIPT>">'; - $result=testSqlAndScriptInject($test, 0); - $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject eee'); + $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='<!-- Google analytics --> + $test='<SCRIPT SRC=http://xss.rocks/xss.js></SCRIPT>'; + $result=testSqlAndScriptInject($test, 0); + $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject ccc'); + + $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), @@ -231,262 +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'); - /** - * testGETPOST - * - * @return string - */ - public function testGETPOST() - { - global $conf,$user,$langs,$db; + $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; - $_COOKIE["id"]=111; + $_COOKIE["id"]=111; $_GET["param1"]="222"; - $_POST["param1"]="333"; + $_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["param8"]="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 + $_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, ''); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($result, ''); - $result=GETPOST("param1", 'int'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($result, 222); + $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); + $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 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'); + $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", 'nohtml'); - 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); - // 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("param5", 'aZ09'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($_GET["param5"], $result); - // With alphanohtml, we must convert the html entities like &#110; - $result=GETPOST("param8", 'alphanohtml'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals("Hacker<svg onload='console.log(123)'", $result); + $result=GETPOST("param6", 'alpha'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('>', $result); - $result=GETPOST("param9", 'alphanohtml'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($_POST["param9"], $result); + $result=GETPOST("param6", 'nohtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('">', $result); - $result=GETPOST("param10", 'alphanohtml'); - print __METHOD__." result=".$result."\n"; - $this->assertEquals($_POST["param9"], $result, 'We should get param9 after processing param10'); + $result=GETPOST("param6b"); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('abc', $result); - return $result; - } + // With restricthtml we must remove html open/close tag and content but not htmlentities like &#110; - /** - * testCheckLoginPassEntity - * - * @return void - */ - public function testCheckLoginPassEntity() - { - $login=checkLoginPassEntity('loginbidon', 'passwordbidon', 1, array('dolibarr')); - print __METHOD__." login=".$login."\n"; - $this->assertEquals($login, ''); + $result=GETPOST("param7", 'restricthtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('"c:\this is a path~1\aaa&#110;" abcdef', $result); - $login=checkLoginPassEntity('admin', 'passwordbidon', 1, array('dolibarr')); - print __METHOD__." login=".$login."\n"; - $this->assertEquals($login, ''); + // 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); - $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("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'); - $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("param8c", 'alphanohtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($_POST['param8c'], $result, 'Test a string with non closing html tag with alphanohtml'); - $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("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'); - /** - * 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("param8e", 'alphanohtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($_POST['param8e'], $result, 'Test a string with non closing html tag with 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'); + $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 <'); - $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'); + $result=GETPOST("param9", 'alphanohtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($_POST["param9"], $result); - return 0; - } + $result=GETPOST("param10", 'alphanohtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals($_POST["param9"], $result, 'We should get param9 after processing param10'); - /** - * 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'); + $result=GETPOST("param11", 'alphanohtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals("Name", $result, 'Test an email string with alphanohtml'); - $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'); + $result=GETPOST("param11", 'alphawithlgt'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(trim($_POST["param11"]), $result, 'Test an email string with alphawithlgt'); - return 0; - } + $result=GETPOST("param12", 'restricthtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(trim($_POST["param12"]), $result, 'Test a string with DOCTYPE and restricthtml'); - /** - * 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'); + /*$result=GETPOST("param13", 'alphanohtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(trim($_POST["param13"]), $result, 'Test a string and alphanohtml'); - $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'); + $result=GETPOST("param14", 'alphanohtml'); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(trim($_POST["param14"]), $result, 'Test a string and alphanohtml'); + */ - $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'); + // Special test for GETPOST of backtopage or backtolist parameter - return 0; - } + $_POST["backtopage"]='//www.google.com'; + $result=GETPOST("backtopage"); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('www.google.com', $result, 'Test for backtopage param'); - /** - * testGetRandomPassword - * - * @return number - */ - public function testGetRandomPassword() - { - global $conf; + $_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'); - $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); + $_POST["backtolist"]='::HTTPS://www.google.com'; + $result=GETPOST("backtolist"); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('www.google.com', $result, 'Test for backtopage param'); - $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); + $_POST["backtopage"]='http:www.google.com'; + $result=GETPOST("backtopage"); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('httpwww.google.com', $result, 'Test for backtopage param'); - $conf->global->USER_PASSWORD_GENERATED='None'; - $genpass2=getRandomPassword(false); // Should return an empty string - print __METHOD__." genpass2=".$genpass2."\n"; - $this->assertEquals($genpass2, ''); + $_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'); - $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); + $_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'); - return 0; - } + return $result; + } - /** - * testRestrictedArea - * - * @return void - */ - public function testRestrictedArea() - { - global $conf,$user,$langs,$db; + /** + * testCheckLoginPassEntity + * + * @return void + */ + public function testCheckLoginPassEntity() + { + $login=checkLoginPassEntity('loginbidon', 'passwordbidon', 1, array('dolibarr')); + print __METHOD__." login=".$login."\n"; + $this->assertEquals($login, ''); + + $login=checkLoginPassEntity('admin', 'passwordbidon', 1, array('dolibarr')); + print __METHOD__." login=".$login."\n"; + $this->assertEquals($login, ''); + + $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'); + + $login=checkLoginPassEntity('admin', 'admin', 1, array('http','dolibarr')); // Should work because of second authetntication method + print __METHOD__." login=".$login."\n"; + $this->assertEquals($login, 'admin'); + + $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 + } + + /** + * 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."; + + $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'); + + $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'); + + 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 10 chars + print __METHOD__." genpass3=".$genpass3."\n"; + $this->assertEquals(strlen($genpass3), 10); + + return 0; + } + + /** + * testRestrictedArea + * + * @return void + */ + public function testRestrictedArea() + { + global $conf,$user,$langs,$db; $conf=$this->savconf; $user=$this->savuser; $langs=$this->savlangs; @@ -497,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 650e391587b..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(); @@ -61,6 +60,9 @@ class WebservicesInvoicesTest extends PHPUnit\Framework\TestCase protected $ns = 'http://www.dolibarr.org/ns/'; + protected $pass = 'admin'; + + /** * Constructor * We save global variables into local variables @@ -82,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); } @@ -93,14 +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(); // create a third_party, needed to create an invoice // @@ -129,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'); } @@ -141,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, @@ -241,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'=>'admin', - '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']."\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'=>'admin', - '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, @@ -396,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'=>'admin', - '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 7b90fcbbd88..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,280 +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 - ) - ); - 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,'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']); - 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 + // ) + //) ); /**